@lobehub/chat 1.49.0 → 1.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/changelog/v1.json +9 -0
- package/package.json +2 -2
- package/src/app/(main)/_layout/Mobile/index.tsx +2 -2
- package/src/app/(main)/chat/_layout/Mobile.tsx +2 -2
- package/src/app/(main)/files/(content)/_layout/Mobile.tsx +2 -2
- package/src/app/(main)/repos/[id]/_layout/Mobile.tsx +2 -2
- package/src/components/DataStyleModal/index.tsx +3 -1
- package/src/features/InitClientDB/EnableModal.tsx +9 -1
- package/src/hooks/useShowMobileWorkspace.ts +7 -0
- package/src/hooks/useWorkspaceModal.tsx +2 -2
- package/src/middleware.ts +4 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.49.1](https://github.com/lobehub/lobe-chat/compare/v1.49.0...v1.49.1)
|
6
|
+
|
7
|
+
<sup>Released on **2025-01-27**</sup>
|
8
|
+
|
9
|
+
#### ♻ Code Refactoring
|
10
|
+
|
11
|
+
- **misc**: UseMobileWorkspace use nqus to replace useQuery.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### Code refactoring
|
19
|
+
|
20
|
+
- **misc**: UseMobileWorkspace use nqus to replace useQuery, closes [#5603](https://github.com/lobehub/lobe-chat/issues/5603) ([70e5272](https://github.com/lobehub/lobe-chat/commit/70e5272))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
## [Version 1.49.0](https://github.com/lobehub/lobe-chat/compare/v1.48.4...v1.49.0)
|
6
31
|
|
7
32
|
<sup>Released on **2025-01-27**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.49.
|
3
|
+
"version": "1.49.1",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
5
5
|
"keywords": [
|
6
6
|
"framework",
|
@@ -129,7 +129,7 @@
|
|
129
129
|
"@lobehub/chat-plugins-gateway": "^1.9.0",
|
130
130
|
"@lobehub/icons": "^1.61.1",
|
131
131
|
"@lobehub/tts": "^1.28.0",
|
132
|
-
"@lobehub/ui": "^1.164.
|
132
|
+
"@lobehub/ui": "^1.164.8",
|
133
133
|
"@neondatabase/serverless": "^0.10.4",
|
134
134
|
"@next/third-parties": "^15.1.4",
|
135
135
|
"@react-spring/web": "^9.7.5",
|
@@ -5,7 +5,7 @@ import { usePathname } from 'next/navigation';
|
|
5
5
|
import qs from 'query-string';
|
6
6
|
import { PropsWithChildren, memo } from 'react';
|
7
7
|
|
8
|
-
import {
|
8
|
+
import { useShowMobileWorkspace } from '@/hooks/useShowMobileWorkspace';
|
9
9
|
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
10
10
|
|
11
11
|
import NavBar from './NavBar';
|
@@ -22,7 +22,7 @@ const MOBILE_NAV_ROUTES = new Set([
|
|
22
22
|
]);
|
23
23
|
|
24
24
|
const Layout = memo(({ children }: PropsWithChildren) => {
|
25
|
-
const
|
25
|
+
const showMobileWorkspace = useShowMobileWorkspace();
|
26
26
|
const pathname = usePathname();
|
27
27
|
const { url } = qs.parseUrl(pathname);
|
28
28
|
const showNav = !showMobileWorkspace && MOBILE_NAV_ROUTES.has(url);
|
@@ -5,7 +5,7 @@ import { Suspense, memo } from 'react';
|
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
6
6
|
|
7
7
|
import InitClientDB from '@/features/InitClientDB';
|
8
|
-
import {
|
8
|
+
import { useShowMobileWorkspace } from '@/hooks/useShowMobileWorkspace';
|
9
9
|
|
10
10
|
import { LayoutProps } from './type';
|
11
11
|
|
@@ -18,7 +18,7 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
18
18
|
}));
|
19
19
|
|
20
20
|
const Layout = memo<LayoutProps>(({ children, session }) => {
|
21
|
-
const
|
21
|
+
const showMobileWorkspace = useShowMobileWorkspace();
|
22
22
|
const { styles } = useStyles();
|
23
23
|
|
24
24
|
return (
|
@@ -4,7 +4,7 @@ import { createStyles } from 'antd-style';
|
|
4
4
|
import { memo } from 'react';
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
6
6
|
|
7
|
-
import {
|
7
|
+
import { useShowMobileWorkspace } from '@/hooks/useShowMobileWorkspace';
|
8
8
|
|
9
9
|
import { LayoutProps } from './type';
|
10
10
|
|
@@ -17,7 +17,7 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
17
17
|
}));
|
18
18
|
|
19
19
|
const Layout = memo<LayoutProps>(({ children, menu }) => {
|
20
|
-
const
|
20
|
+
const showMobileWorkspace = useShowMobileWorkspace();
|
21
21
|
const { styles } = useStyles();
|
22
22
|
|
23
23
|
return (
|
@@ -4,7 +4,7 @@ import { createStyles } from 'antd-style';
|
|
4
4
|
import { memo } from 'react';
|
5
5
|
import { Flexbox } from 'react-layout-kit';
|
6
6
|
|
7
|
-
import {
|
7
|
+
import { useShowMobileWorkspace } from '@/hooks/useShowMobileWorkspace';
|
8
8
|
|
9
9
|
import { LayoutProps } from './type';
|
10
10
|
|
@@ -17,7 +17,7 @@ const useStyles = createStyles(({ css, token }) => ({
|
|
17
17
|
}));
|
18
18
|
|
19
19
|
const Layout = memo<LayoutProps>(({ children, menu }) => {
|
20
|
-
const
|
20
|
+
const showMobileWorkspace = useShowMobileWorkspace();
|
21
21
|
const { styles } = useStyles();
|
22
22
|
|
23
23
|
return (
|
@@ -26,6 +26,7 @@ const useStyles = createStyles(({ css, token, prefixCls, isDarkMode }) => ({
|
|
26
26
|
|
27
27
|
interface DataStyleModalProps {
|
28
28
|
children: ReactNode;
|
29
|
+
height?: number | string;
|
29
30
|
icon: LucideIcon;
|
30
31
|
onOpenChange?: (open: boolean) => void;
|
31
32
|
open: boolean;
|
@@ -34,7 +35,7 @@ interface DataStyleModalProps {
|
|
34
35
|
}
|
35
36
|
|
36
37
|
const DataStyleModal = memo<DataStyleModalProps>(
|
37
|
-
({ icon, onOpenChange, title, open, children, width = 550 }) => {
|
38
|
+
({ icon, onOpenChange, title, open, children, width = 550, height }) => {
|
38
39
|
const { styles } = useStyles();
|
39
40
|
|
40
41
|
return (
|
@@ -46,6 +47,7 @@ const DataStyleModal = memo<DataStyleModalProps>(
|
|
46
47
|
}}
|
47
48
|
closable={false}
|
48
49
|
footer={null}
|
50
|
+
height={height}
|
49
51
|
open={open}
|
50
52
|
title={
|
51
53
|
<Flexbox gap={8} horizontal>
|
@@ -8,6 +8,7 @@ import { Center, Flexbox } from 'react-layout-kit';
|
|
8
8
|
|
9
9
|
import DataStyleModal from '@/components/DataStyleModal';
|
10
10
|
import { useGlobalStore } from '@/store/global';
|
11
|
+
import { useServerConfigStore } from '@/store/serverConfig';
|
11
12
|
|
12
13
|
import PGliteIcon from './PGliteIcon';
|
13
14
|
|
@@ -56,6 +57,8 @@ interface EnableClientDBModalProps {
|
|
56
57
|
const EnableClientDBModal = memo<EnableClientDBModalProps>(({ open }) => {
|
57
58
|
const { t } = useTranslation('common');
|
58
59
|
const { styles } = useStyles();
|
60
|
+
const isMobile = useServerConfigStore((s) => s.isMobile);
|
61
|
+
|
59
62
|
const markPgliteEnabled = useGlobalStore((s) => s.markPgliteEnabled);
|
60
63
|
const features = [
|
61
64
|
{
|
@@ -76,7 +79,12 @@ const EnableClientDBModal = memo<EnableClientDBModalProps>(({ open }) => {
|
|
76
79
|
];
|
77
80
|
|
78
81
|
return (
|
79
|
-
<DataStyleModal
|
82
|
+
<DataStyleModal
|
83
|
+
height={isMobile ? '80vh' : undefined}
|
84
|
+
icon={CpuIcon}
|
85
|
+
open={open}
|
86
|
+
title={t('clientDB.modal.title')}
|
87
|
+
>
|
80
88
|
<Center gap={48}>
|
81
89
|
<Flexbox>
|
82
90
|
<Flexbox className={styles.intro} style={{ textAlign: 'center' }} width={460}>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { useEffect } from 'react';
|
2
2
|
import useMergeState from 'use-merge-value';
|
3
3
|
|
4
|
-
import {
|
4
|
+
import { useShowMobileWorkspace } from '@/hooks/useShowMobileWorkspace';
|
5
5
|
import { useServerConfigStore } from '@/store/serverConfig';
|
6
6
|
|
7
7
|
export const useWorkspaceModal = (
|
@@ -9,7 +9,7 @@ export const useWorkspaceModal = (
|
|
9
9
|
onChange?: (v: boolean) => void,
|
10
10
|
): [boolean, (v: boolean) => void] => {
|
11
11
|
const mobile = useServerConfigStore((s) => s.isMobile);
|
12
|
-
const
|
12
|
+
const showMobileWorkspace = useShowMobileWorkspace();
|
13
13
|
const [isModalOpen, setIsModalOpen] = useMergeState(false, {
|
14
14
|
defaultValue: false,
|
15
15
|
onChange,
|
package/src/middleware.ts
CHANGED