@lobehub/chat 1.111.12 → 1.112.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 +51 -0
- package/changelog/v1.json +14 -0
- package/package.json +1 -1
- package/src/app/[variants]/(auth)/next-auth/signin/AuthSignInBox.tsx +5 -1
- package/src/app/[variants]/(main)/_layout/Desktop/SideBar/TopActions.test.tsx +15 -3
- package/src/app/[variants]/(main)/_layout/Desktop/SideBar/TopActions.tsx +13 -10
- package/src/config/aiModels/google.ts +40 -3
- package/src/config/featureFlags/schema.test.ts +3 -0
- package/src/config/featureFlags/schema.ts +3 -0
- 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.112.1](https://github.com/lobehub/lobe-chat/compare/v1.112.0...v1.112.1)
|
6
|
+
|
7
|
+
<sup>Released on **2025-08-16**</sup>
|
8
|
+
|
9
|
+
#### 💄 Styles
|
10
|
+
|
11
|
+
- **misc**: Add Imagen 4 GA models, style improve auth sign in box loading.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### Styles
|
19
|
+
|
20
|
+
- **misc**: Add Imagen 4 GA models, closes [#8799](https://github.com/lobehub/lobe-chat/issues/8799) ([2e9ad20](https://github.com/lobehub/lobe-chat/commit/2e9ad20))
|
21
|
+
- **misc**: Style improve auth sign in box loading, closes [#8805](https://github.com/lobehub/lobe-chat/issues/8805) ([62f5a1b](https://github.com/lobehub/lobe-chat/commit/62f5a1b))
|
22
|
+
|
23
|
+
</details>
|
24
|
+
|
25
|
+
<div align="right">
|
26
|
+
|
27
|
+
[](#readme-top)
|
28
|
+
|
29
|
+
</div>
|
30
|
+
|
31
|
+
## [Version 1.112.0](https://github.com/lobehub/lobe-chat/compare/v1.111.12...v1.112.0)
|
32
|
+
|
33
|
+
<sup>Released on **2025-08-15**</sup>
|
34
|
+
|
35
|
+
#### ✨ Features
|
36
|
+
|
37
|
+
- **feature-flags**: Add ai_image flag to control AI painting UI.
|
38
|
+
|
39
|
+
<br/>
|
40
|
+
|
41
|
+
<details>
|
42
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
43
|
+
|
44
|
+
#### What's improved
|
45
|
+
|
46
|
+
- **feature-flags**: Add ai_image flag to control AI painting UI, closes [#8797](https://github.com/lobehub/lobe-chat/issues/8797) ([a1c66c8](https://github.com/lobehub/lobe-chat/commit/a1c66c8))
|
47
|
+
|
48
|
+
</details>
|
49
|
+
|
50
|
+
<div align="right">
|
51
|
+
|
52
|
+
[](#readme-top)
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
5
56
|
### [Version 1.111.12](https://github.com/lobehub/lobe-chat/compare/v1.111.11...v1.111.12)
|
6
57
|
|
7
58
|
<sup>Released on **2025-08-14**</sup>
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {
|
4
|
+
"improvements": [
|
5
|
+
"Add Imagen 4 GA models, style improve auth sign in box loading."
|
6
|
+
]
|
7
|
+
},
|
8
|
+
"date": "2025-08-16",
|
9
|
+
"version": "1.112.1"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"children": {},
|
13
|
+
"date": "2025-08-15",
|
14
|
+
"version": "1.112.0"
|
15
|
+
},
|
2
16
|
{
|
3
17
|
"children": {},
|
4
18
|
"date": "2025-08-14",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.112.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",
|
@@ -7,7 +7,7 @@ import { createStyles } from 'antd-style';
|
|
7
7
|
import { AuthError } from 'next-auth';
|
8
8
|
import { signIn } from 'next-auth/react';
|
9
9
|
import { useRouter, useSearchParams } from 'next/navigation';
|
10
|
-
import { memo } from 'react';
|
10
|
+
import { memo, useState } from 'react';
|
11
11
|
import { useTranslation } from 'react-i18next';
|
12
12
|
|
13
13
|
import BrandWatermark from '@/components/BrandWatermark';
|
@@ -70,6 +70,7 @@ export default memo(() => {
|
|
70
70
|
const { styles } = useStyles();
|
71
71
|
const { t } = useTranslation('clerk');
|
72
72
|
const router = useRouter();
|
73
|
+
const [loadingProvider, setLoadingProvider] = useState<string | null>(null);
|
73
74
|
|
74
75
|
const oAuthSSOProviders = useUserStore((s) => s.oAuthSSOProviders);
|
75
76
|
|
@@ -79,9 +80,11 @@ export default memo(() => {
|
|
79
80
|
const callbackUrl = searchParams.get('callbackUrl') ?? '/';
|
80
81
|
|
81
82
|
const handleSignIn = async (provider: string) => {
|
83
|
+
setLoadingProvider(provider);
|
82
84
|
try {
|
83
85
|
await signIn(provider, { redirectTo: callbackUrl });
|
84
86
|
} catch (error) {
|
87
|
+
setLoadingProvider(null);
|
85
88
|
// Signin can fail for a number of reasons, such as the user
|
86
89
|
// not existing, or the user not having the correct role.
|
87
90
|
// In some cases, you may want to redirect to a custom error
|
@@ -127,6 +130,7 @@ export default memo(() => {
|
|
127
130
|
className={styles.button}
|
128
131
|
icon={AuthIcons(provider, 16)}
|
129
132
|
key={provider}
|
133
|
+
loading={loadingProvider === provider}
|
130
134
|
onClick={() => handleSignIn(provider)}
|
131
135
|
>
|
132
136
|
{provider}
|
@@ -13,7 +13,7 @@ import { useSessionStore } from '@/store/session';
|
|
13
13
|
import TopActions, { TopActionProps } from './TopActions';
|
14
14
|
|
15
15
|
beforeAll(() => {
|
16
|
-
initServerConfigStore({ featureFlags: { market: true } });
|
16
|
+
initServerConfigStore({ featureFlags: { market: true, ai_image: true } });
|
17
17
|
});
|
18
18
|
|
19
19
|
beforeEach(() => {
|
@@ -21,7 +21,7 @@ beforeEach(() => {
|
|
21
21
|
});
|
22
22
|
|
23
23
|
afterEach(() => {
|
24
|
-
createServerConfigStore().setState({ featureFlags: { market: true } });
|
24
|
+
createServerConfigStore().setState({ featureFlags: { market: true, ai_image: true } });
|
25
25
|
cleanup();
|
26
26
|
});
|
27
27
|
|
@@ -56,10 +56,11 @@ const renderTopActions = (props: TopActionProps = {}) => {
|
|
56
56
|
};
|
57
57
|
|
58
58
|
describe('TopActions', () => {
|
59
|
-
it('should render Chat and Market by default', () => {
|
59
|
+
it('should render Chat, AI Image and Market by default', () => {
|
60
60
|
renderTopActions();
|
61
61
|
|
62
62
|
expect(screen.getByText('tab.chat')).toBeInTheDocument();
|
63
|
+
expect(screen.getByText('tab.aiImage')).toBeInTheDocument();
|
63
64
|
expect(screen.getByText('tab.discover')).toBeInTheDocument();
|
64
65
|
});
|
65
66
|
|
@@ -85,6 +86,17 @@ describe('TopActions', () => {
|
|
85
86
|
expect(screen.queryByText('tab.files')).not.toBeInTheDocument();
|
86
87
|
});
|
87
88
|
|
89
|
+
it('should not render AI Image icon when ai_image is disabled', () => {
|
90
|
+
act(() => {
|
91
|
+
createServerConfigStore().setState({ featureFlags: { ai_image: false } });
|
92
|
+
});
|
93
|
+
|
94
|
+
renderTopActions();
|
95
|
+
|
96
|
+
expect(screen.getByText('tab.chat')).toBeInTheDocument();
|
97
|
+
expect(screen.queryByText('tab.aiImage')).not.toBeInTheDocument();
|
98
|
+
});
|
99
|
+
|
88
100
|
it('should switch back to previous active session', () => {
|
89
101
|
act(() => {
|
90
102
|
useSessionStore.setState({ activeId: '1' });
|
@@ -27,7 +27,8 @@ export interface TopActionProps {
|
|
27
27
|
const TopActions = memo<TopActionProps>(({ tab, isPinned }) => {
|
28
28
|
const { t } = useTranslation('common');
|
29
29
|
const switchBackToChat = useGlobalStore((s) => s.switchBackToChat);
|
30
|
-
const { showMarket, enableKnowledgeBase } =
|
30
|
+
const { showMarket, enableKnowledgeBase, showAiImage } =
|
31
|
+
useServerConfigStore(featureFlagsSelectors);
|
31
32
|
const hotkey = useUserStore(settingsSelectors.getHotkeyById(HotkeyEnum.NavigateToChat));
|
32
33
|
|
33
34
|
const isChatActive = tab === SidebarTabKey.Chat && !isPinned;
|
@@ -75,15 +76,17 @@ const TopActions = memo<TopActionProps>(({ tab, isPinned }) => {
|
|
75
76
|
/>
|
76
77
|
</Link>
|
77
78
|
)}
|
78
|
-
|
79
|
-
<
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
79
|
+
{showAiImage && (
|
80
|
+
<Link aria-label={t('tab.aiImage')} href={'/image'}>
|
81
|
+
<ActionIcon
|
82
|
+
active={isImageActive}
|
83
|
+
icon={Palette}
|
84
|
+
size={ICON_SIZE}
|
85
|
+
title={t('tab.aiImage')}
|
86
|
+
tooltipProps={{ placement: 'right' }}
|
87
|
+
/>
|
88
|
+
</Link>
|
89
|
+
)}
|
87
90
|
{showMarket && (
|
88
91
|
<Link aria-label={t('tab.discover')} href={'/discover'}>
|
89
92
|
<ActionIcon
|
@@ -587,8 +587,46 @@ const imagenBaseParameters: ModelParamsSchema = {
|
|
587
587
|
const googleImageModels: AIImageModelCard[] = [
|
588
588
|
{
|
589
589
|
description: 'Imagen 4th generation text-to-image model series',
|
590
|
-
displayName: '
|
590
|
+
displayName: 'Imagen 4',
|
591
591
|
enabled: true,
|
592
|
+
id: 'imagen-4.0-generate-001',
|
593
|
+
organization: 'Deepmind',
|
594
|
+
parameters: imagenBaseParameters,
|
595
|
+
pricing: {
|
596
|
+
units: [{ name: 'imageGeneration', rate: 0.04, strategy: 'fixed', unit: 'image' }],
|
597
|
+
},
|
598
|
+
releasedAt: '2024-08-14',
|
599
|
+
type: 'image',
|
600
|
+
},
|
601
|
+
{
|
602
|
+
description: 'Imagen 4th generation text-to-image model series Ultra version',
|
603
|
+
displayName: 'Imagen 4 Ultra',
|
604
|
+
enabled: true,
|
605
|
+
id: 'imagen-4.0-ultra-generate-001',
|
606
|
+
organization: 'Deepmind',
|
607
|
+
parameters: imagenBaseParameters,
|
608
|
+
pricing: {
|
609
|
+
units: [{ name: 'imageGeneration', rate: 0.06, strategy: 'fixed', unit: 'image' }],
|
610
|
+
},
|
611
|
+
releasedAt: '2024-08-14',
|
612
|
+
type: 'image',
|
613
|
+
},
|
614
|
+
{
|
615
|
+
description: 'Imagen 4th generation text-to-image model series Fast version',
|
616
|
+
displayName: 'Imagen 4 Fast',
|
617
|
+
enabled: true,
|
618
|
+
id: 'imagen-4.0-fast-generate-001',
|
619
|
+
organization: 'Deepmind',
|
620
|
+
parameters: imagenBaseParameters,
|
621
|
+
pricing: {
|
622
|
+
units: [{ name: 'imageGeneration', rate: 0.02, strategy: 'fixed', unit: 'image' }],
|
623
|
+
},
|
624
|
+
releasedAt: '2024-08-14',
|
625
|
+
type: 'image',
|
626
|
+
},
|
627
|
+
{
|
628
|
+
description: 'Imagen 4th generation text-to-image model series',
|
629
|
+
displayName: 'Imagen 4 Preview 06-06',
|
592
630
|
id: 'imagen-4.0-generate-preview-06-06',
|
593
631
|
organization: 'Deepmind',
|
594
632
|
parameters: imagenBaseParameters,
|
@@ -600,8 +638,7 @@ const googleImageModels: AIImageModelCard[] = [
|
|
600
638
|
},
|
601
639
|
{
|
602
640
|
description: 'Imagen 4th generation text-to-image model series Ultra version',
|
603
|
-
displayName: '
|
604
|
-
enabled: true,
|
641
|
+
displayName: 'Imagen 4 Ultra Preview 06-06',
|
605
642
|
id: 'imagen-4.0-ultra-generate-preview-06-06',
|
606
643
|
organization: 'Deepmind',
|
607
644
|
parameters: imagenBaseParameters,
|
@@ -12,6 +12,7 @@ describe('FeatureFlagsSchema', () => {
|
|
12
12
|
create_session: true,
|
13
13
|
edit_agent: false,
|
14
14
|
dalle: true,
|
15
|
+
ai_image: true,
|
15
16
|
});
|
16
17
|
|
17
18
|
expect(result.success).toBe(true);
|
@@ -36,6 +37,7 @@ describe('mapFeatureFlagsEnvToState', () => {
|
|
36
37
|
create_session: true,
|
37
38
|
edit_agent: false,
|
38
39
|
dalle: true,
|
40
|
+
ai_image: true,
|
39
41
|
check_updates: true,
|
40
42
|
welcome_suggest: true,
|
41
43
|
};
|
@@ -48,6 +50,7 @@ describe('mapFeatureFlagsEnvToState', () => {
|
|
48
50
|
showOpenAIApiKey: true,
|
49
51
|
showOpenAIProxyUrl: false,
|
50
52
|
showDalle: true,
|
53
|
+
showAiImage: true,
|
51
54
|
enableCheckUpdates: true,
|
52
55
|
showWelcomeSuggest: true,
|
53
56
|
};
|
@@ -24,6 +24,7 @@ export const FeatureFlagsSchema = z.object({
|
|
24
24
|
|
25
25
|
plugins: z.boolean().optional(),
|
26
26
|
dalle: z.boolean().optional(),
|
27
|
+
ai_image: z.boolean().optional(),
|
27
28
|
speech_to_text: z.boolean().optional(),
|
28
29
|
token_counter: z.boolean().optional(),
|
29
30
|
|
@@ -66,6 +67,7 @@ export const DEFAULT_FEATURE_FLAGS: IFeatureFlags = {
|
|
66
67
|
|
67
68
|
plugins: true,
|
68
69
|
dalle: true,
|
70
|
+
ai_image: true,
|
69
71
|
|
70
72
|
check_updates: true,
|
71
73
|
welcome_suggest: true,
|
@@ -106,6 +108,7 @@ export const mapFeatureFlagsEnvToState = (config: IFeatureFlags) => {
|
|
106
108
|
|
107
109
|
enablePlugins: config.plugins,
|
108
110
|
showDalle: config.dalle,
|
111
|
+
showAiImage: config.ai_image,
|
109
112
|
showChangelog: config.changelog,
|
110
113
|
|
111
114
|
enableCheckUpdates: config.check_updates,
|