@lobehub/chat 1.51.11 → 1.51.13
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 +50 -0
- package/changelog/v1.json +18 -0
- package/package.json +2 -2
- package/src/app/[variants]/(main)/layout.tsx +2 -0
- package/src/app/[variants]/layout.tsx +1 -0
- package/src/app/[variants]/page.tsx +0 -1
- package/src/layout/GlobalProvider/ImportSettings.tsx +30 -0
- package/src/layout/GlobalProvider/StoreInitialization.tsx +6 -31
- package/src/layout/GlobalProvider/index.tsx +3 -1
- /package/src/app/{(auth) → [variants]/(auth)}/layout.tsx +0 -0
- /package/src/app/{(auth) → [variants]/(auth)}/login/[[...login]]/page.tsx +0 -0
- /package/src/app/{(auth) → [variants]/(auth)}/next-auth/error/AuthErrorPage.tsx +0 -0
- /package/src/app/{(auth) → [variants]/(auth)}/next-auth/error/page.tsx +0 -0
- /package/src/app/{(auth) → [variants]/(auth)}/signup/[[...signup]]/page.tsx +0 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,56 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.51.13](https://github.com/lobehub/lobe-chat/compare/v1.51.12...v1.51.13)
|
6
|
+
|
7
|
+
<sup>Released on **2025-02-07**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix next auth error.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Fix next auth error, closes [#5825](https://github.com/lobehub/lobe-chat/issues/5825) ([4509b7a](https://github.com/lobehub/lobe-chat/commit/4509b7a))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.51.12](https://github.com/lobehub/lobe-chat/compare/v1.51.11...v1.51.12)
|
31
|
+
|
32
|
+
<sup>Released on **2025-02-07**</sup>
|
33
|
+
|
34
|
+
#### 🐛 Bug Fixes
|
35
|
+
|
36
|
+
- **misc**: Try to fix next-auth issue.
|
37
|
+
|
38
|
+
<br/>
|
39
|
+
|
40
|
+
<details>
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
42
|
+
|
43
|
+
#### What's fixed
|
44
|
+
|
45
|
+
- **misc**: Try to fix next-auth issue, closes [#5813](https://github.com/lobehub/lobe-chat/issues/5813) ([8e316bd](https://github.com/lobehub/lobe-chat/commit/8e316bd))
|
46
|
+
|
47
|
+
</details>
|
48
|
+
|
49
|
+
<div align="right">
|
50
|
+
|
51
|
+
[](#readme-top)
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
5
55
|
### [Version 1.51.11](https://github.com/lobehub/lobe-chat/compare/v1.51.10...v1.51.11)
|
6
56
|
|
7
57
|
<sup>Released on **2025-02-06**</sup>
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {
|
4
|
+
"fixes": [
|
5
|
+
"Fix next auth error."
|
6
|
+
]
|
7
|
+
},
|
8
|
+
"date": "2025-02-07",
|
9
|
+
"version": "1.51.13"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"children": {
|
13
|
+
"fixes": [
|
14
|
+
"Try to fix next-auth issue."
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"date": "2025-02-07",
|
18
|
+
"version": "1.51.12"
|
19
|
+
},
|
2
20
|
{
|
3
21
|
"children": {
|
4
22
|
"fixes": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.51.
|
3
|
+
"version": "1.51.13",
|
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",
|
@@ -317,7 +317,7 @@
|
|
317
317
|
"vitest": "~1.2.2",
|
318
318
|
"vitest-canvas-mock": "^0.3.3"
|
319
319
|
},
|
320
|
-
"packageManager": "pnpm@
|
320
|
+
"packageManager": "pnpm@9.15.4",
|
321
321
|
"publishConfig": {
|
322
322
|
"access": "public",
|
323
323
|
"registry": "https://registry.npmjs.org"
|
@@ -0,0 +1,30 @@
|
|
1
|
+
'use client';
|
2
|
+
|
3
|
+
import { useQueryState } from 'nuqs';
|
4
|
+
import { memo, useEffect } from 'react';
|
5
|
+
|
6
|
+
import { LOBE_URL_IMPORT_NAME } from '@/const/url';
|
7
|
+
import { useUserStore } from '@/store/user';
|
8
|
+
|
9
|
+
const ImportSettings = memo(() => {
|
10
|
+
const [importUrlShareSettings, isUserStateInit] = useUserStore((s) => [
|
11
|
+
s.importUrlShareSettings,
|
12
|
+
s.isUserStateInit,
|
13
|
+
]);
|
14
|
+
|
15
|
+
// Import settings from the url
|
16
|
+
const [searchParam] = useQueryState(LOBE_URL_IMPORT_NAME, {
|
17
|
+
clearOnDefault: true,
|
18
|
+
defaultValue: '',
|
19
|
+
});
|
20
|
+
|
21
|
+
useEffect(() => {
|
22
|
+
// Why use `usUserStateInit`,
|
23
|
+
// see: https://github.com/lobehub/lobe-chat/pull/4072
|
24
|
+
if (searchParam && isUserStateInit) importUrlShareSettings(searchParam);
|
25
|
+
}, [searchParam, isUserStateInit]);
|
26
|
+
|
27
|
+
return null;
|
28
|
+
});
|
29
|
+
|
30
|
+
export default ImportSettings;
|
@@ -1,12 +1,10 @@
|
|
1
1
|
'use client';
|
2
2
|
|
3
3
|
import { useRouter } from 'next/navigation';
|
4
|
-
import {
|
5
|
-
import { memo, useEffect } from 'react';
|
4
|
+
import { memo } from 'react';
|
6
5
|
import { useTranslation } from 'react-i18next';
|
7
6
|
import { createStoreUpdater } from 'zustand-utils';
|
8
7
|
|
9
|
-
import { LOBE_URL_IMPORT_NAME } from '@/const/url';
|
10
8
|
import { useIsMobile } from '@/hooks/useIsMobile';
|
11
9
|
import { useEnabledDataSync } from '@/hooks/useSyncData';
|
12
10
|
import { useAgentStore } from '@/store/agent';
|
@@ -23,14 +21,11 @@ const StoreInitialization = memo(() => {
|
|
23
21
|
useTranslation('error');
|
24
22
|
|
25
23
|
const router = useRouter();
|
26
|
-
const [isLogin, isSignedIn, useInitUserState
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
s.importUrlShareSettings,
|
32
|
-
s.isUserStateInit,
|
33
|
-
]);
|
24
|
+
const [isLogin, isSignedIn, useInitUserState] = useUserStore((s) => [
|
25
|
+
authSelectors.isLogin(s),
|
26
|
+
s.isSignedIn,
|
27
|
+
s.useInitUserState,
|
28
|
+
]);
|
34
29
|
|
35
30
|
const { serverConfig } = useServerConfigStore();
|
36
31
|
|
@@ -81,26 +76,6 @@ const StoreInitialization = memo(() => {
|
|
81
76
|
useStoreUpdater('isMobile', mobile);
|
82
77
|
useStoreUpdater('router', router);
|
83
78
|
|
84
|
-
// Import settings from the url
|
85
|
-
const [searchParam] = useQueryState(LOBE_URL_IMPORT_NAME, {
|
86
|
-
clearOnDefault: true,
|
87
|
-
defaultValue: '',
|
88
|
-
});
|
89
|
-
|
90
|
-
useEffect(() => {
|
91
|
-
// Why use `usUserStateInit`,
|
92
|
-
// see: https://github.com/lobehub/lobe-chat/pull/4072
|
93
|
-
if (searchParam && isUserStateInit) importUrlShareSettings(searchParam);
|
94
|
-
}, [searchParam, isUserStateInit]);
|
95
|
-
|
96
|
-
useEffect(() => {
|
97
|
-
if (mobile) {
|
98
|
-
router.prefetch('/me');
|
99
|
-
} else {
|
100
|
-
router.prefetch('/chat/settings/modal');
|
101
|
-
}
|
102
|
-
}, [router, mobile]);
|
103
|
-
|
104
79
|
return null;
|
105
80
|
});
|
106
81
|
|
@@ -9,6 +9,7 @@ import { getAntdLocale } from '@/utils/locale';
|
|
9
9
|
|
10
10
|
import AntdV5MonkeyPatch from './AntdV5MonkeyPatch';
|
11
11
|
import AppTheme from './AppTheme';
|
12
|
+
import ImportSettings from './ImportSettings';
|
12
13
|
import Locale from './Locale';
|
13
14
|
import QueryProvider from './Query';
|
14
15
|
import ReactScan from './ReactScan';
|
@@ -54,8 +55,9 @@ const GlobalLayout = async ({
|
|
54
55
|
serverConfig={serverConfig}
|
55
56
|
>
|
56
57
|
<QueryProvider>{children}</QueryProvider>
|
58
|
+
<StoreInitialization />
|
57
59
|
<Suspense>
|
58
|
-
<
|
60
|
+
<ImportSettings />
|
59
61
|
<ReactScan />
|
60
62
|
{process.env.NODE_ENV === 'development' && <DevPanel />}
|
61
63
|
</Suspense>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|