@lobehub/chat 1.2.10 β 1.2.12
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 +51 -0
- package/package.json +1 -1
- package/src/app/(auth)/signup/[[...signup]]/page.tsx +8 -0
- package/src/app/(main)/settings/_layout/Mobile/Header.tsx +12 -2
- package/src/config/featureFlags/schema.ts +6 -0
- package/src/config/modelProviders/deepseek.ts +4 -4
- package/src/layout/AuthProvider/Clerk/index.tsx +19 -1
- package/src/store/serverConfig/selectors.test.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,57 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 1.2.12](https://github.com/lobehub/lobe-chat/compare/v1.2.11...v1.2.12)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-07-07**</sup>
|
|
8
|
+
|
|
9
|
+
#### π Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fixed mobile web page navigation issue with inbox assistant, support to disable clerk signup with feature flag.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fixed mobile web page navigation issue with inbox assistant, closes [#2693](https://github.com/lobehub/lobe-chat/issues/2693) ([4476a5e](https://github.com/lobehub/lobe-chat/commit/4476a5e))
|
|
21
|
+
- **misc**: Support to disable clerk signup with feature flag, closes [#3126](https://github.com/lobehub/lobe-chat/issues/3126) ([4ead315](https://github.com/lobehub/lobe-chat/commit/4ead315))
|
|
22
|
+
|
|
23
|
+
</details>
|
|
24
|
+
|
|
25
|
+
<div align="right">
|
|
26
|
+
|
|
27
|
+
[](#readme-top)
|
|
28
|
+
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
### [Version 1.2.11](https://github.com/lobehub/lobe-chat/compare/v1.2.10...v1.2.11)
|
|
32
|
+
|
|
33
|
+
<sup>Released on **2024-07-07**</sup>
|
|
34
|
+
|
|
35
|
+
#### π Styles
|
|
36
|
+
|
|
37
|
+
- **misc**: Update deepseek max token.
|
|
38
|
+
|
|
39
|
+
<br/>
|
|
40
|
+
|
|
41
|
+
<details>
|
|
42
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
43
|
+
|
|
44
|
+
#### Styles
|
|
45
|
+
|
|
46
|
+
- **misc**: Update deepseek max token, closes [#3143](https://github.com/lobehub/lobe-chat/issues/3143) ([4a241b9](https://github.com/lobehub/lobe-chat/commit/4a241b9))
|
|
47
|
+
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
<div align="right">
|
|
51
|
+
|
|
52
|
+
[](#readme-top)
|
|
53
|
+
|
|
54
|
+
</div>
|
|
55
|
+
|
|
5
56
|
### [Version 1.2.10](https://github.com/lobehub/lobe-chat/compare/v1.2.9...v1.2.10)
|
|
6
57
|
|
|
7
58
|
<sup>Released on **2024-07-05**</sup>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
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",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { SignUp } from '@clerk/nextjs';
|
|
2
|
+
import { redirect } from 'next/navigation';
|
|
2
3
|
|
|
4
|
+
import { serverFeatureFlags } from '@/config/featureFlags';
|
|
3
5
|
import { metadataModule } from '@/server/metadata';
|
|
4
6
|
import { translation } from '@/server/translation';
|
|
5
7
|
|
|
@@ -13,6 +15,12 @@ export const generateMetadata = async () => {
|
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
const Page = () => {
|
|
18
|
+
const enableClerkSignUp = serverFeatureFlags().enableClerkSignUp;
|
|
19
|
+
|
|
20
|
+
if (!enableClerkSignUp) {
|
|
21
|
+
redirect('/login');
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
return <SignUp path="/signup" />;
|
|
17
25
|
};
|
|
18
26
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { MobileNavBar, MobileNavBarTitle } from '@lobehub/ui';
|
|
4
4
|
import { Tag } from 'antd';
|
|
5
|
-
import { useRouter } from 'next/navigation';
|
|
5
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
6
6
|
import { memo } from 'react';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { Flexbox } from 'react-layout-kit';
|
|
@@ -16,7 +16,17 @@ const Header = memo(() => {
|
|
|
16
16
|
const { t } = useTranslation('setting');
|
|
17
17
|
|
|
18
18
|
const router = useRouter();
|
|
19
|
+
const searchParams = useSearchParams();
|
|
19
20
|
const activeSettingsKey = useActiveSettingsKey();
|
|
21
|
+
|
|
22
|
+
const handleBackClick = () => {
|
|
23
|
+
if (searchParams.has('session') && searchParams.has('showMobileWorkspace')) {
|
|
24
|
+
router.push(`/chat?${searchParams.toString()}`);
|
|
25
|
+
} else {
|
|
26
|
+
router.push(enableAuth ? '/me/settings' : '/me');
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
20
30
|
return (
|
|
21
31
|
<MobileNavBar
|
|
22
32
|
center={
|
|
@@ -33,7 +43,7 @@ const Header = memo(() => {
|
|
|
33
43
|
}
|
|
34
44
|
/>
|
|
35
45
|
}
|
|
36
|
-
onBackClick={
|
|
46
|
+
onBackClick={handleBackClick}
|
|
37
47
|
showBackButton
|
|
38
48
|
style={mobileHeaderSticky}
|
|
39
49
|
/>
|
|
@@ -16,6 +16,8 @@ export const FeatureFlagsSchema = z.object({
|
|
|
16
16
|
|
|
17
17
|
check_updates: z.boolean().optional(),
|
|
18
18
|
welcome_suggest: z.boolean().optional(),
|
|
19
|
+
|
|
20
|
+
clerk_sign_up: z.boolean().optional(),
|
|
19
21
|
});
|
|
20
22
|
|
|
21
23
|
// TypeScript η±»εοΌδ» Zod schema ηζ
|
|
@@ -36,6 +38,8 @@ export const DEFAULT_FEATURE_FLAGS: IFeatureFlags = {
|
|
|
36
38
|
|
|
37
39
|
check_updates: true,
|
|
38
40
|
welcome_suggest: true,
|
|
41
|
+
|
|
42
|
+
clerk_sign_up: true,
|
|
39
43
|
};
|
|
40
44
|
|
|
41
45
|
export const mapFeatureFlagsEnvToState = (config: IFeatureFlags) => {
|
|
@@ -53,5 +57,7 @@ export const mapFeatureFlagsEnvToState = (config: IFeatureFlags) => {
|
|
|
53
57
|
|
|
54
58
|
enableCheckUpdates: config.check_updates,
|
|
55
59
|
showWelcomeSuggest: config.welcome_suggest,
|
|
60
|
+
|
|
61
|
+
enableClerkSignUp: config.clerk_sign_up,
|
|
56
62
|
};
|
|
57
63
|
};
|
|
@@ -7,14 +7,14 @@ const DeepSeek: ModelProviderCard = {
|
|
|
7
7
|
displayName: 'DeepSeek-V2',
|
|
8
8
|
enabled: true,
|
|
9
9
|
id: 'deepseek-chat',
|
|
10
|
-
tokens:
|
|
10
|
+
tokens: 128_000,
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
|
-
description: '
|
|
14
|
-
displayName: 'DeepSeek-
|
|
13
|
+
description: 'ζ
ιΏε€ηηΌη¨εζ°ε¦δ»»ε‘',
|
|
14
|
+
displayName: 'DeepSeek-Coder-V2',
|
|
15
15
|
enabled: true,
|
|
16
16
|
id: 'deepseek-coder',
|
|
17
|
-
tokens:
|
|
17
|
+
tokens: 128_000,
|
|
18
18
|
},
|
|
19
19
|
],
|
|
20
20
|
checkModel: 'deepseek-chat',
|
|
@@ -4,10 +4,13 @@ import { ClerkProvider } from '@clerk/nextjs';
|
|
|
4
4
|
import { PropsWithChildren, memo, useEffect, useMemo, useState, useTransition } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
|
|
7
|
+
import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
|
|
8
|
+
|
|
7
9
|
import UserUpdater from './UserUpdater';
|
|
8
10
|
import { useAppearance } from './useAppearance';
|
|
9
11
|
|
|
10
12
|
const Clerk = memo(({ children }: PropsWithChildren) => {
|
|
13
|
+
const { enableClerkSignUp } = useServerConfigStore(featureFlagsSelectors);
|
|
11
14
|
const appearance = useAppearance();
|
|
12
15
|
const {
|
|
13
16
|
i18n: { language, getResourceBundle },
|
|
@@ -27,8 +30,23 @@ const Clerk = memo(({ children }: PropsWithChildren) => {
|
|
|
27
30
|
});
|
|
28
31
|
}, [count, setCount, isPending, startTransition]);
|
|
29
32
|
|
|
33
|
+
const updatedAppearance = useMemo(
|
|
34
|
+
() => ({
|
|
35
|
+
...appearance,
|
|
36
|
+
elements: {
|
|
37
|
+
...appearance.elements,
|
|
38
|
+
...(!enableClerkSignUp ? { footerAction: { display: 'none' } } : {}),
|
|
39
|
+
},
|
|
40
|
+
}),
|
|
41
|
+
[appearance, enableClerkSignUp],
|
|
42
|
+
);
|
|
43
|
+
|
|
30
44
|
return (
|
|
31
|
-
<ClerkProvider
|
|
45
|
+
<ClerkProvider
|
|
46
|
+
appearance={updatedAppearance}
|
|
47
|
+
localization={localization}
|
|
48
|
+
signUpUrl={!enableClerkSignUp ? '/login' : '/signup'} // Redirect sign-up to sign-in if disabled
|
|
49
|
+
>
|
|
32
50
|
{children}
|
|
33
51
|
<UserUpdater />
|
|
34
52
|
</ClerkProvider>
|