@lobehub/chat 1.0.2 → 1.0.3
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
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 1.0.3](https://github.com/lobehub/lobe-chat/compare/v1.0.2...v1.0.3)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-06-17**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix clerk `UNAUTHORIZED` 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 clerk `UNAUTHORIZED` auth error, closes [#2907](https://github.com/lobehub/lobe-chat/issues/2907) ([bb33ba4](https://github.com/lobehub/lobe-chat/commit/bb33ba4))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
5
30
|
### [Version 1.0.2](https://github.com/lobehub/lobe-chat/compare/v1.0.1...v1.0.2)
|
|
6
31
|
|
|
7
32
|
<sup>Released on **2024-06-17**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
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",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useRouter, useSearchParams } from 'next/navigation';
|
|
4
4
|
import { memo, useEffect } from 'react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
5
6
|
import { createStoreUpdater } from 'zustand-utils';
|
|
6
7
|
|
|
7
8
|
import { LOBE_URL_IMPORT_NAME } from '@/const/url';
|
|
@@ -14,8 +15,10 @@ import { useUserStore } from '@/store/user';
|
|
|
14
15
|
import { authSelectors } from '@/store/user/selectors';
|
|
15
16
|
|
|
16
17
|
const StoreInitialization = memo(() => {
|
|
17
|
-
|
|
18
|
+
// prefetch error ns to avoid don't show error content correctly
|
|
19
|
+
useTranslation('error');
|
|
18
20
|
|
|
21
|
+
const router = useRouter();
|
|
19
22
|
const [isLogin, useInitUserState, importUrlShareSettings] = useUserStore((s) => [
|
|
20
23
|
authSelectors.isLogin(s),
|
|
21
24
|
s.useInitUserState,
|
|
@@ -57,21 +60,14 @@ const StoreInitialization = memo(() => {
|
|
|
57
60
|
importUrlShareSettings(searchParam);
|
|
58
61
|
}, [searchParam]);
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
// router.prefetch('/settings/agent');
|
|
69
|
-
// router.prefetch('/settings/sync');
|
|
70
|
-
// } else {
|
|
71
|
-
// router.prefetch('/chat/settings/modal');
|
|
72
|
-
// router.prefetch('/settings/modal');
|
|
73
|
-
// }
|
|
74
|
-
// }, [router, mobile]);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (mobile) {
|
|
65
|
+
router.prefetch('/me');
|
|
66
|
+
} else {
|
|
67
|
+
router.prefetch('/chat/settings/modal');
|
|
68
|
+
router.prefetch('/settings/modal');
|
|
69
|
+
}
|
|
70
|
+
}, [router, mobile]);
|
|
75
71
|
|
|
76
72
|
return null;
|
|
77
73
|
});
|