@lobehub/chat 1.28.3 → 1.28.5
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 +42 -0
- package/package.json +1 -1
- package/src/config/modelProviders/github.ts +1 -1
- package/src/services/file/index.ts +2 -3
- package/src/services/import/index.ts +2 -3
- package/src/services/message/index.ts +2 -3
- package/src/services/plugin/index.ts +2 -3
- package/src/services/session/index.ts +2 -3
- package/src/services/topic/index.ts +2 -2
- package/src/services/upload.ts +1 -1
- package/src/services/user/index.ts +2 -3
- package/src/store/user/slices/common/action.ts +2 -1
- package/src/store/user/slices/sync/action.ts +6 -2
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,48 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.28.5](https://github.com/lobehub/lobe-chat/compare/v1.28.4...v1.28.5)
|
6
|
+
|
7
|
+
<sup>Released on **2024-11-08**</sup>
|
8
|
+
|
9
|
+
<br/>
|
10
|
+
|
11
|
+
<details>
|
12
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
13
|
+
|
14
|
+
</details>
|
15
|
+
|
16
|
+
<div align="right">
|
17
|
+
|
18
|
+
[](#readme-top)
|
19
|
+
|
20
|
+
</div>
|
21
|
+
|
22
|
+
### [Version 1.28.4](https://github.com/lobehub/lobe-chat/compare/v1.28.3...v1.28.4)
|
23
|
+
|
24
|
+
<sup>Released on **2024-11-07**</sup>
|
25
|
+
|
26
|
+
#### 🐛 Bug Fixes
|
27
|
+
|
28
|
+
- **misc**: Disable model fetch for GitHub.
|
29
|
+
|
30
|
+
<br/>
|
31
|
+
|
32
|
+
<details>
|
33
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
34
|
+
|
35
|
+
#### What's fixed
|
36
|
+
|
37
|
+
- **misc**: Disable model fetch for GitHub, closes [#4638](https://github.com/lobehub/lobe-chat/issues/4638) ([e1f6a3a](https://github.com/lobehub/lobe-chat/commit/e1f6a3a))
|
38
|
+
|
39
|
+
</details>
|
40
|
+
|
41
|
+
<div align="right">
|
42
|
+
|
43
|
+
[](#readme-top)
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
5
47
|
### [Version 1.28.3](https://github.com/lobehub/lobe-chat/compare/v1.28.2...v1.28.3)
|
6
48
|
|
7
49
|
<sup>Released on **2024-11-06**</sup>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.28.
|
3
|
+
"version": "1.28.5",
|
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",
|
@@ -209,7 +209,7 @@ const Github: ModelProviderCard = {
|
|
209
209
|
description: '通过GitHub模型,开发人员可以成为AI工程师,并使用行业领先的AI模型进行构建。',
|
210
210
|
enabled: true,
|
211
211
|
id: 'github',
|
212
|
-
modelList: { showModelFetcher: true },
|
212
|
+
// modelList: { showModelFetcher: true },
|
213
213
|
name: 'GitHub',
|
214
214
|
url: 'https://github.com/marketplace/models',
|
215
215
|
};
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { isServerMode } from '@/const/version';
|
2
|
-
|
3
1
|
import { ClientService } from './client';
|
4
2
|
import { ServerService } from './server';
|
5
3
|
|
6
|
-
export const fileService =
|
4
|
+
export const fileService =
|
5
|
+
process.env.NEXT_PUBLIC_SERVICE_MODE === 'server' ? new ServerService() : new ClientService();
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { isServerMode } from '@/const/version';
|
2
|
-
|
3
1
|
import { ClientService } from './client';
|
4
2
|
import { ServerService } from './server';
|
5
3
|
|
6
|
-
export const importService =
|
4
|
+
export const importService =
|
5
|
+
process.env.NEXT_PUBLIC_SERVICE_MODE === 'server' ? new ServerService() : new ClientService();
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { isServerMode } from '@/const/version';
|
2
|
-
|
3
1
|
import { ClientService } from './client';
|
4
2
|
import { ServerService } from './server';
|
5
3
|
|
6
|
-
export const messageService =
|
4
|
+
export const messageService =
|
5
|
+
process.env.NEXT_PUBLIC_SERVICE_MODE === 'server' ? new ServerService() : new ClientService();
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { isServerMode } from '@/const/version';
|
2
|
-
|
3
1
|
import { ClientService } from './client';
|
4
2
|
import { ServerService } from './server';
|
5
3
|
|
6
|
-
export const pluginService =
|
4
|
+
export const pluginService =
|
5
|
+
process.env.NEXT_PUBLIC_SERVICE_MODE === 'server' ? new ServerService() : new ClientService();
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { isServerMode } from '@/const/version';
|
2
|
-
|
3
1
|
import { ClientService } from './client';
|
4
2
|
import { ServerService } from './server';
|
5
3
|
|
6
|
-
export const sessionService =
|
4
|
+
export const sessionService =
|
5
|
+
process.env.NEXT_PUBLIC_SERVICE_MODE === 'server' ? new ServerService() : new ClientService();
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { isServerMode } from '@/const/version';
|
2
1
|
|
3
2
|
import { ClientService } from './client';
|
4
3
|
import { ServerService } from './server';
|
5
4
|
|
6
|
-
export const topicService =
|
5
|
+
export const topicService =
|
6
|
+
process.env.NEXT_PUBLIC_SERVICE_MODE === 'server' ? new ServerService() : new ClientService();
|
package/src/services/upload.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import { fileEnv } from '@/config/file';
|
2
|
-
import { FileModel } from '@/database/client/models/file';
|
3
2
|
import { edgeClient } from '@/libs/trpc/client';
|
4
3
|
import { API_ENDPOINTS } from '@/services/_url';
|
5
4
|
import { FileMetadata, UploadFileParams } from '@/types/files';
|
@@ -68,6 +67,7 @@ class UploadService {
|
|
68
67
|
};
|
69
68
|
|
70
69
|
uploadToClientDB = async (params: UploadFileParams, file: File) => {
|
70
|
+
const { FileModel } = await import('@/database/client/models/file');
|
71
71
|
const fileArrayBuffer = await file.arrayBuffer();
|
72
72
|
|
73
73
|
// save to local storage
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { isServerMode } from '@/const/version';
|
2
|
-
|
3
1
|
import { ClientService } from './client';
|
4
2
|
import { ServerService } from './server';
|
5
3
|
|
6
|
-
export const userService =
|
4
|
+
export const userService =
|
5
|
+
process.env.NEXT_PUBLIC_SERVICE_MODE === 'server' ? new ServerService() : new ClientService();
|
@@ -5,7 +5,6 @@ import type { StateCreator } from 'zustand/vanilla';
|
|
5
5
|
import { DEFAULT_PREFERENCE } from '@/const/user';
|
6
6
|
import { useOnlyFetchOnceSWR } from '@/libs/swr';
|
7
7
|
import { userService } from '@/services/user';
|
8
|
-
import { ClientService } from '@/services/user/client';
|
9
8
|
import type { UserStore } from '@/store/user';
|
10
9
|
import type { GlobalServerConfig } from '@/types/serverConfig';
|
11
10
|
import { UserInitializationState } from '@/types/user';
|
@@ -47,6 +46,8 @@ export const createCommonSlice: StateCreator<
|
|
47
46
|
await mutate(GET_USER_STATE_KEY);
|
48
47
|
},
|
49
48
|
updateAvatar: async (avatar) => {
|
49
|
+
const { ClientService } = await import('@/services/user/client');
|
50
|
+
|
50
51
|
const clientService = new ClientService();
|
51
52
|
|
52
53
|
await clientService.updateAvatar(avatar);
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import useSWR, { SWRResponse } from 'swr';
|
2
2
|
import type { StateCreator } from 'zustand/vanilla';
|
3
3
|
|
4
|
-
import { syncService } from '@/services/sync';
|
5
4
|
import type { UserStore } from '@/store/user';
|
6
5
|
import { OnSyncEvent, PeerSyncStatus } from '@/types/sync';
|
7
6
|
import { browserInfo } from '@/utils/platform';
|
@@ -53,6 +52,8 @@ export const createSyncSlice: StateCreator<
|
|
53
52
|
const defaultUserName = `My ${browserInfo.browser} (${browserInfo.os})`;
|
54
53
|
|
55
54
|
set({ syncStatus: PeerSyncStatus.Connecting });
|
55
|
+
const { syncService } = await import('@/services/sync');
|
56
|
+
|
56
57
|
return syncService.enabledSync({
|
57
58
|
channel: {
|
58
59
|
name: sync.channelName,
|
@@ -83,7 +84,10 @@ export const createSyncSlice: StateCreator<
|
|
83
84
|
if (!userId) return false;
|
84
85
|
|
85
86
|
// if user don't enable sync, stop sync
|
86
|
-
if (!userEnableSync)
|
87
|
+
if (!userEnableSync) {
|
88
|
+
const { syncService } = await import('@/services/sync');
|
89
|
+
return syncService.disableSync();
|
90
|
+
}
|
87
91
|
|
88
92
|
return get().triggerEnableSync(userId, onEvent);
|
89
93
|
},
|