@lobehub/chat 1.40.2 → 1.40.4
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/(main)/changelog/page.tsx +3 -1
- package/src/app/(main)/chat/(workspace)/features/ChangelogModal.tsx +11 -0
- package/src/app/(main)/chat/(workspace)/page.tsx +8 -5
- package/src/app/@modal/(.)changelog/modal/page.tsx +3 -1
- package/src/components/Loading/BrandTextLoading/index.tsx +5 -0
- package/src/config/featureFlags/schema.ts +3 -0
- package/src/config/modelProviders/deepseek.ts +7 -7
- package/src/features/ChangelogModal/index.tsx +8 -2
- package/src/features/User/UserPanel/useMenu.tsx +1 -1
- package/src/server/services/changelog/index.test.ts +4 -2
- package/src/server/services/changelog/index.ts +10 -2
- package/src/store/serverConfig/selectors.test.ts +1 -0
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,56 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.40.4](https://github.com/lobehub/lobe-chat/compare/v1.40.3...v1.40.4)
|
6
|
+
|
7
|
+
<sup>Released on **2024-12-28**</sup>
|
8
|
+
|
9
|
+
#### 💄 Styles
|
10
|
+
|
11
|
+
- **misc**: Update deepseek V3 model.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### Styles
|
19
|
+
|
20
|
+
- **misc**: Update deepseek V3 model, closes [#5199](https://github.com/lobehub/lobe-chat/issues/5199) ([868f556](https://github.com/lobehub/lobe-chat/commit/868f556))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.40.3](https://github.com/lobehub/lobe-chat/compare/v1.40.2...v1.40.3)
|
31
|
+
|
32
|
+
<sup>Released on **2024-12-26**</sup>
|
33
|
+
|
34
|
+
#### 🐛 Bug Fixes
|
35
|
+
|
36
|
+
- **misc**: Fix fetch error in changelog modal.
|
37
|
+
|
38
|
+
<br/>
|
39
|
+
|
40
|
+
<details>
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
42
|
+
|
43
|
+
#### What's fixed
|
44
|
+
|
45
|
+
- **misc**: Fix fetch error in changelog modal, closes [#5194](https://github.com/lobehub/lobe-chat/issues/5194) ([e9433be](https://github.com/lobehub/lobe-chat/commit/e9433be))
|
46
|
+
|
47
|
+
</details>
|
48
|
+
|
49
|
+
<div align="right">
|
50
|
+
|
51
|
+
[](#readme-top)
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
5
55
|
### [Version 1.40.2](https://github.com/lobehub/lobe-chat/compare/v1.40.1...v1.40.2)
|
6
56
|
|
7
57
|
<sup>Released on **2024-12-26**</sup>
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {
|
4
|
+
"improvements": [
|
5
|
+
"Update deepseek V3 model."
|
6
|
+
]
|
7
|
+
},
|
8
|
+
"date": "2024-12-28",
|
9
|
+
"version": "1.40.4"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"children": {
|
13
|
+
"fixes": [
|
14
|
+
"Fix fetch error in changelog modal."
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"date": "2024-12-26",
|
18
|
+
"version": "1.40.3"
|
19
|
+
},
|
2
20
|
{
|
3
21
|
"children": {
|
4
22
|
"improvements": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.40.
|
3
|
+
"version": "1.40.4",
|
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",
|
@@ -149,7 +149,7 @@
|
|
149
149
|
"antd": "^5.22.6",
|
150
150
|
"antd-style": "^3.7.1",
|
151
151
|
"brotli-wasm": "^3.0.1",
|
152
|
-
"chroma-js": "^
|
152
|
+
"chroma-js": "^3.1.2",
|
153
153
|
"dayjs": "^1.11.13",
|
154
154
|
"debug": "^4.3.7",
|
155
155
|
"dexie": "^3.2.7",
|
@@ -38,6 +38,8 @@ const Page = async () => {
|
|
38
38
|
const changelogService = new ChangelogService();
|
39
39
|
const data = await changelogService.getChangelogIndex();
|
40
40
|
|
41
|
+
if (!data) return notFound();
|
42
|
+
|
41
43
|
const ld = ldModule.generate({
|
42
44
|
description: t('changelog.description', { appName: BRANDING_NAME }),
|
43
45
|
title: t('changelog.title', { appName: BRANDING_NAME }),
|
@@ -48,7 +50,7 @@ const Page = async () => {
|
|
48
50
|
<>
|
49
51
|
<StructuredData ld={ld} />
|
50
52
|
<Flexbox gap={mobile ? 16 : 48}>
|
51
|
-
{data
|
53
|
+
{data?.map((item) => (
|
52
54
|
<Fragment key={item.id}>
|
53
55
|
<Suspense
|
54
56
|
fallback={
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import ChangelogModal from '@/features/ChangelogModal';
|
2
|
+
import { ChangelogService } from '@/server/services/changelog';
|
3
|
+
|
4
|
+
const Changelog = async () => {
|
5
|
+
const service = new ChangelogService();
|
6
|
+
const id = await service.getLatestChangelogId();
|
7
|
+
|
8
|
+
return <ChangelogModal currentId={id} />;
|
9
|
+
};
|
10
|
+
|
11
|
+
export default Changelog;
|
@@ -1,14 +1,15 @@
|
|
1
|
+
import { Suspense } from 'react';
|
2
|
+
|
1
3
|
import StructuredData from '@/components/StructuredData';
|
2
4
|
import { serverFeatureFlags } from '@/config/featureFlags';
|
3
5
|
import { BRANDING_NAME } from '@/const/branding';
|
4
|
-
import ChangelogModal from '@/features/ChangelogModal';
|
5
6
|
import { ldModule } from '@/server/ld';
|
6
7
|
import { metadataModule } from '@/server/metadata';
|
7
|
-
import { ChangelogService } from '@/server/services/changelog';
|
8
8
|
import { translation } from '@/server/translation';
|
9
9
|
import { isMobileDevice } from '@/utils/server/responsive';
|
10
10
|
|
11
11
|
import PageTitle from '../features/PageTitle';
|
12
|
+
import Changelog from './features/ChangelogModal';
|
12
13
|
import TelemetryNotification from './features/TelemetryNotification';
|
13
14
|
|
14
15
|
export const generateMetadata = async () => {
|
@@ -21,7 +22,7 @@ export const generateMetadata = async () => {
|
|
21
22
|
};
|
22
23
|
|
23
24
|
const Page = async () => {
|
24
|
-
const hideDocs = serverFeatureFlags()
|
25
|
+
const { hideDocs, showChangelog } = serverFeatureFlags();
|
25
26
|
const mobile = await isMobileDevice();
|
26
27
|
const { t } = await translation('metadata');
|
27
28
|
const ld = ldModule.generate({
|
@@ -35,8 +36,10 @@ const Page = async () => {
|
|
35
36
|
<StructuredData ld={ld} />
|
36
37
|
<PageTitle />
|
37
38
|
<TelemetryNotification mobile={mobile} />
|
38
|
-
{!hideDocs && !mobile && (
|
39
|
-
<
|
39
|
+
{showChangelog && !hideDocs && !mobile && (
|
40
|
+
<Suspense>
|
41
|
+
<Changelog />
|
42
|
+
</Suspense>
|
40
43
|
)}
|
41
44
|
</>
|
42
45
|
);
|
@@ -20,9 +20,11 @@ const Page = async () => {
|
|
20
20
|
const changelogService = new ChangelogService();
|
21
21
|
const data = await changelogService.getChangelogIndex();
|
22
22
|
|
23
|
+
if (!data) return notFound();
|
24
|
+
|
23
25
|
return (
|
24
26
|
<>
|
25
|
-
{data
|
27
|
+
{data?.map((item) => (
|
26
28
|
<Suspense fallback={<Loading />} key={item.id}>
|
27
29
|
<Post locale={locale} mobile={mobile} {...item} />
|
28
30
|
</Suspense>
|
@@ -1,8 +1,13 @@
|
|
1
1
|
import { Center } from 'react-layout-kit';
|
2
2
|
|
3
|
+
import { isCustomBranding } from '@/const/version';
|
4
|
+
|
5
|
+
import CircleLoading from '../CircleLoading';
|
3
6
|
import LobeChatText from './LobeChatText';
|
4
7
|
|
5
8
|
export default () => {
|
9
|
+
if (isCustomBranding) return <CircleLoading />;
|
10
|
+
|
6
11
|
return (
|
7
12
|
<Center height={'100%'} width={'100%'}>
|
8
13
|
<LobeChatText />
|
@@ -24,6 +24,7 @@ export const FeatureFlagsSchema = z.object({
|
|
24
24
|
token_counter: z.boolean().optional(),
|
25
25
|
|
26
26
|
welcome_suggest: z.boolean().optional(),
|
27
|
+
changelog: z.boolean().optional(),
|
27
28
|
|
28
29
|
clerk_sign_up: z.boolean().optional(),
|
29
30
|
|
@@ -72,6 +73,7 @@ export const DEFAULT_FEATURE_FLAGS: IFeatureFlags = {
|
|
72
73
|
|
73
74
|
market: true,
|
74
75
|
speech_to_text: true,
|
76
|
+
changelog: true,
|
75
77
|
|
76
78
|
// the flags below can only be used with commercial license
|
77
79
|
// if you want to use it in the commercial usage
|
@@ -94,6 +96,7 @@ export const mapFeatureFlagsEnvToState = (config: IFeatureFlags) => {
|
|
94
96
|
|
95
97
|
enablePlugins: config.plugins,
|
96
98
|
showDalle: config.dalle,
|
99
|
+
showChangelog: config.changelog,
|
97
100
|
|
98
101
|
enableCheckUpdates: config.check_updates,
|
99
102
|
showWelcomeSuggest: config.welcome_suggest,
|
@@ -6,23 +6,23 @@ const DeepSeek: ModelProviderCard = {
|
|
6
6
|
{
|
7
7
|
contextWindowTokens: 65_536,
|
8
8
|
description:
|
9
|
-
'
|
10
|
-
displayName: 'DeepSeek
|
9
|
+
'最新模型 DeepSeek-V3 多项评测成绩超越 Qwen2.5-72B 和 Llama-3.1-405B 等开源模型,性能对齐领军闭源模型 GPT-4o 与 Claude-3.5-Sonnet。',
|
10
|
+
displayName: 'DeepSeek V3',
|
11
11
|
enabled: true,
|
12
12
|
functionCall: true,
|
13
13
|
id: 'deepseek-chat',
|
14
14
|
pricing: {
|
15
|
-
cachedInput: 0.
|
15
|
+
cachedInput: 0.5,
|
16
16
|
currency: 'CNY',
|
17
|
-
input:
|
18
|
-
output:
|
17
|
+
input: 2,
|
18
|
+
output: 8,
|
19
19
|
},
|
20
|
-
releasedAt: '2024-
|
20
|
+
releasedAt: '2024-12-26',
|
21
21
|
},
|
22
22
|
],
|
23
23
|
checkModel: 'deepseek-chat',
|
24
24
|
description:
|
25
|
-
'DeepSeek 是一家专注于人工智能技术研究和应用的公司,其最新模型 DeepSeek-
|
25
|
+
'DeepSeek 是一家专注于人工智能技术研究和应用的公司,其最新模型 DeepSeek-V3 多项评测成绩超越 Qwen2.5-72B 和 Llama-3.1-405B 等开源模型,性能对齐领军闭源模型 GPT-4o 与 Claude-3.5-Sonnet。',
|
26
26
|
id: 'deepseek',
|
27
27
|
modelList: { showModelFetcher: true },
|
28
28
|
modelsUrl: 'https://platform.deepseek.com/api-docs/zh-cn/quick_start/pricing',
|
@@ -7,11 +7,17 @@ import { memo } from 'react';
|
|
7
7
|
import { useGlobalStore } from '@/store/global';
|
8
8
|
|
9
9
|
const ChangelogModal = memo<{ currentId?: string }>(({ currentId }) => {
|
10
|
-
const latestChangelogId = useGlobalStore((s) =>
|
10
|
+
const [latestChangelogId, updateSystemStatus] = useGlobalStore((s) => [
|
11
|
+
s.status.latestChangelogId,
|
12
|
+
s.updateSystemStatus,
|
13
|
+
]);
|
11
14
|
const router = useRouter();
|
12
15
|
|
13
16
|
useTimeout(() => {
|
14
|
-
if (
|
17
|
+
if (!currentId) return;
|
18
|
+
if (!latestChangelogId) {
|
19
|
+
updateSystemStatus({ latestChangelogId: currentId });
|
20
|
+
} else if (latestChangelogId !== currentId) {
|
15
21
|
router.push('/changelog/modal');
|
16
22
|
}
|
17
23
|
}, 1000);
|
@@ -188,7 +188,7 @@ export const useMenu = () => {
|
|
188
188
|
{
|
189
189
|
icon: <Icon icon={FileClockIcon} />,
|
190
190
|
key: 'changelog',
|
191
|
-
label: <Link href={'/changelog'}>{t('changelog')}</Link>,
|
191
|
+
label: <Link href={'/changelog/modal'}>{t('changelog')}</Link>,
|
192
192
|
},
|
193
193
|
{
|
194
194
|
children: [
|
@@ -93,10 +93,12 @@ describe('ChangelogService', () => {
|
|
93
93
|
});
|
94
94
|
|
95
95
|
it('should handle fetch errors', async () => {
|
96
|
-
(global.fetch as any).mockRejectedValue(
|
96
|
+
(global.fetch as any).mockRejectedValue(
|
97
|
+
new Error('Fetch failed', { cause: { code: 'Timeout' } }),
|
98
|
+
);
|
97
99
|
|
98
100
|
const result = await service.getChangelogIndex();
|
99
|
-
expect(result).
|
101
|
+
expect(result).toEqual([]);
|
100
102
|
});
|
101
103
|
|
102
104
|
it('should return only community items when config type is community', async () => {
|
@@ -53,8 +53,16 @@ export class ChangelogService {
|
|
53
53
|
|
54
54
|
return this.mergeChangelogs(data.cloud, data.community).slice(0, 5);
|
55
55
|
} catch (e) {
|
56
|
-
|
57
|
-
|
56
|
+
const cause = (e as Error).cause as { code: string };
|
57
|
+
if (cause.code.includes('ETIMEDOUT')) {
|
58
|
+
console.warn(
|
59
|
+
'[ChangelogFetchTimeout] fail to fetch changelog lists due to network timeout. Please check your network connection.',
|
60
|
+
);
|
61
|
+
} else {
|
62
|
+
console.error('Error getting changelog lists:', e);
|
63
|
+
}
|
64
|
+
|
65
|
+
return [];
|
58
66
|
}
|
59
67
|
}
|
60
68
|
|