@lobehub/chat 1.124.1 → 1.124.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 +50 -0
- package/changelog/v1.json +18 -0
- package/package.json +1 -1
- package/packages/const/package.json +3 -1
- package/packages/const/src/analytics.ts +1 -1
- package/packages/const/src/desktop.ts +3 -2
- package/packages/const/src/discover.ts +3 -2
- package/packages/const/src/guide.ts +2 -2
- package/packages/const/src/hotkeys.ts +1 -1
- package/packages/const/src/index.ts +2 -0
- package/packages/const/src/settings/common.ts +1 -1
- package/packages/const/src/settings/genUserLLMConfig.test.ts +1 -2
- package/packages/const/src/settings/genUserLLMConfig.ts +1 -2
- package/packages/const/src/settings/hotkey.ts +3 -2
- package/packages/const/src/settings/index.ts +1 -3
- package/packages/const/src/settings/knowledge.ts +1 -1
- package/packages/const/src/settings/llm.ts +2 -4
- package/packages/const/src/settings/systemAgent.ts +1 -5
- package/packages/const/src/settings/tts.ts +1 -1
- package/packages/const/src/trace.ts +1 -1
- package/packages/const/src/url.ts +2 -2
- package/packages/const/src/user.ts +1 -2
- package/packages/database/src/client/db.test.ts +19 -13
- package/packages/electron-server-ipc/src/ipcClient.test.ts +783 -1
- package/packages/file-loaders/src/loadFile.test.ts +61 -0
- package/packages/file-loaders/src/utils/isTextReadableFile.test.ts +43 -0
- package/packages/file-loaders/src/utils/parser-utils.test.ts +155 -0
- package/packages/model-runtime/package.json +2 -1
- package/packages/model-runtime/src/ai21/index.test.ts +2 -2
- package/packages/model-runtime/src/ai360/index.test.ts +2 -2
- package/packages/model-runtime/src/akashchat/index.test.ts +19 -0
- package/packages/model-runtime/src/anthropic/index.test.ts +1 -2
- package/packages/model-runtime/src/baichuan/index.test.ts +1 -2
- package/packages/model-runtime/src/bedrock/index.test.ts +1 -2
- package/packages/model-runtime/src/bfl/createImage.test.ts +1 -2
- package/packages/model-runtime/src/bfl/index.test.ts +1 -2
- package/packages/model-runtime/src/cloudflare/index.test.ts +1 -2
- package/packages/model-runtime/src/cohere/index.test.ts +19 -0
- package/packages/model-runtime/src/deepseek/index.test.ts +2 -2
- package/packages/model-runtime/src/fireworksai/index.test.ts +2 -2
- package/packages/model-runtime/src/giteeai/index.test.ts +2 -2
- package/packages/model-runtime/src/github/index.test.ts +2 -2
- package/packages/model-runtime/src/google/createImage.test.ts +1 -2
- package/packages/model-runtime/src/google/index.test.ts +1 -1
- package/packages/model-runtime/src/groq/index.test.ts +2 -3
- package/packages/model-runtime/src/higress/index.ts +2 -3
- package/packages/model-runtime/src/huggingface/index.test.ts +40 -0
- package/packages/model-runtime/src/hunyuan/index.test.ts +2 -3
- package/packages/model-runtime/src/internlm/index.test.ts +2 -2
- package/packages/model-runtime/src/jina/index.test.ts +19 -0
- package/packages/model-runtime/src/lmstudio/index.test.ts +2 -2
- package/packages/model-runtime/src/minimax/index.test.ts +19 -0
- package/packages/model-runtime/src/mistral/index.test.ts +2 -3
- package/packages/model-runtime/src/modelscope/index.test.ts +19 -0
- package/packages/model-runtime/src/moonshot/index.test.ts +1 -2
- package/packages/model-runtime/src/nebius/index.test.ts +19 -0
- package/packages/model-runtime/src/novita/index.test.ts +3 -4
- package/packages/model-runtime/src/nvidia/index.test.ts +19 -0
- package/packages/model-runtime/src/openrouter/index.test.ts +2 -3
- package/packages/model-runtime/src/perplexity/index.test.ts +2 -3
- package/packages/model-runtime/src/ppio/index.test.ts +3 -4
- package/packages/model-runtime/src/qwen/index.test.ts +2 -2
- package/packages/model-runtime/src/sambanova/index.test.ts +19 -0
- package/packages/model-runtime/src/search1api/index.test.ts +19 -0
- package/packages/model-runtime/src/sensenova/index.test.ts +2 -2
- package/packages/model-runtime/src/spark/index.test.ts +2 -2
- package/packages/model-runtime/src/stepfun/index.test.ts +2 -2
- package/packages/model-runtime/src/taichu/index.test.ts +4 -5
- package/packages/model-runtime/src/tencentcloud/index.test.ts +1 -1
- package/packages/model-runtime/src/togetherai/index.test.ts +1 -2
- package/packages/model-runtime/src/upstage/index.test.ts +1 -2
- package/packages/model-runtime/src/utils/openaiCompatibleFactory/index.test.ts +9 -7
- package/packages/model-runtime/src/utils/streams/anthropic.ts +2 -2
- package/packages/model-runtime/src/utils/streams/openai/openai.ts +20 -13
- package/packages/model-runtime/src/utils/streams/openai/responsesStream.test.ts +1 -2
- package/packages/model-runtime/src/utils/streams/openai/responsesStream.ts +2 -2
- package/packages/model-runtime/src/utils/streams/protocol.ts +2 -2
- package/packages/model-runtime/src/wenxin/index.test.ts +2 -3
- package/packages/model-runtime/src/xai/index.test.ts +2 -2
- package/packages/model-runtime/src/zeroone/index.test.ts +1 -2
- package/packages/model-runtime/src/zhipu/index.test.ts +2 -3
- package/packages/model-runtime/vitest.config.mts +0 -7
- package/packages/types/src/discover/index.ts +0 -8
- package/packages/types/src/index.ts +4 -0
- package/packages/types/src/message/base.ts +1 -1
- package/packages/types/src/openai/chat.ts +2 -3
- package/packages/types/src/tool/index.ts +1 -0
- package/packages/types/src/tool/tool.ts +1 -1
- package/packages/types/src/user/settings/index.ts +1 -2
- package/packages/utils/package.json +2 -1
- package/packages/utils/src/_deprecated/parseModels.test.ts +1 -1
- package/packages/utils/src/_deprecated/parseModels.ts +1 -1
- package/packages/utils/src/client/topic.test.ts +1 -2
- package/packages/utils/src/client/topic.ts +1 -2
- package/packages/utils/src/electron/desktopRemoteRPCFetch.ts +1 -1
- package/packages/utils/src/fetch/fetchSSE.ts +7 -8
- package/packages/utils/src/fetch/parseError.ts +1 -3
- package/packages/utils/src/format.test.ts +1 -2
- package/packages/utils/src/index.ts +1 -0
- package/packages/utils/src/toolManifest.ts +1 -2
- package/packages/utils/src/trace.ts +1 -1
- package/packages/utils/vitest.config.mts +1 -2
- package/packages/web-crawler/src/__tests__/urlRules.test.ts +275 -0
- package/packages/web-crawler/src/crawImpl/__tests__/exa.test.ts +269 -0
- package/packages/web-crawler/src/crawImpl/__tests__/firecrawl.test.ts +284 -0
- package/packages/web-crawler/src/crawImpl/__tests__/naive.test.ts +234 -0
- package/packages/web-crawler/src/crawImpl/__tests__/tavily.test.ts +359 -0
- package/packages/web-crawler/src/utils/__tests__/errorType.test.ts +217 -0
- package/packages/web-crawler/vitest.config.mts +3 -0
- package/src/app/(backend)/webapi/models/[provider]/pull/route.ts +0 -2
- package/src/app/(backend)/webapi/models/[provider]/route.ts +0 -2
- package/src/app/(backend)/webapi/text-to-image/[provider]/route.ts +0 -2
- package/src/app/(backend)/webapi/trace/route.ts +0 -2
- package/src/components/Thinking/index.tsx +2 -3
- package/src/features/ChatInput/StoreUpdater.tsx +2 -0
- package/src/libs/traces/index.ts +1 -1
- package/src/server/modules/ModelRuntime/trace.ts +1 -2
- package/packages/const/src/settings/sync.ts +0 -5
- package/packages/model-runtime/src/openrouter/__snapshots__/index.test.ts.snap +0 -113
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,56 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.124.3](https://github.com/lobehub/lobe-chat/compare/v1.124.2...v1.124.3)
|
6
|
+
|
7
|
+
<sup>Released on **2025-09-06**</sup>
|
8
|
+
|
9
|
+
#### ♻ Code Refactoring
|
10
|
+
|
11
|
+
- **misc**: Refactor to remove edge runtime and add more tests.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### Code refactoring
|
19
|
+
|
20
|
+
- **misc**: Refactor to remove edge runtime and add more tests, closes [#9133](https://github.com/lobehub/lobe-chat/issues/9133) ([6f87034](https://github.com/lobehub/lobe-chat/commit/6f87034))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.124.2](https://github.com/lobehub/lobe-chat/compare/v1.124.1...v1.124.2)
|
31
|
+
|
32
|
+
<sup>Released on **2025-09-06**</sup>
|
33
|
+
|
34
|
+
#### 🐛 Bug Fixes
|
35
|
+
|
36
|
+
- **misc**: Fix ChatInput send command switch.
|
37
|
+
|
38
|
+
<br/>
|
39
|
+
|
40
|
+
<details>
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
42
|
+
|
43
|
+
#### What's fixed
|
44
|
+
|
45
|
+
- **misc**: Fix ChatInput send command switch, closes [#9131](https://github.com/lobehub/lobe-chat/issues/9131) ([4d5246a](https://github.com/lobehub/lobe-chat/commit/4d5246a))
|
46
|
+
|
47
|
+
</details>
|
48
|
+
|
49
|
+
<div align="right">
|
50
|
+
|
51
|
+
[](#readme-top)
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
5
55
|
### [Version 1.124.1](https://github.com/lobehub/lobe-chat/compare/v1.124.0...v1.124.1)
|
6
56
|
|
7
57
|
<sup>Released on **2025-09-06**</sup>
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {
|
4
|
+
"improvements": [
|
5
|
+
"Refactor to remove edge runtime and add more tests."
|
6
|
+
]
|
7
|
+
},
|
8
|
+
"date": "2025-09-06",
|
9
|
+
"version": "1.124.3"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"children": {
|
13
|
+
"fixes": [
|
14
|
+
"Fix ChatInput send command switch."
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"date": "2025-09-06",
|
18
|
+
"version": "1.124.2"
|
19
|
+
},
|
2
20
|
{
|
3
21
|
"children": {
|
4
22
|
"fixes": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.124.
|
3
|
+
"version": "1.124.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",
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import { DesktopHotkeyConfig } from '@lobechat/types';
|
2
|
+
|
3
|
+
import { DESKTOP_HOTKEYS_REGISTRATION } from './hotkeys';
|
3
4
|
|
4
5
|
export const DESKTOP_USER_ID = 'DEFAULT_DESKTOP_USER';
|
5
6
|
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import { DEFAULT_AGENT_CONFIG } from '@/const/settings';
|
2
1
|
import {
|
3
2
|
DiscoverAssistantDetail,
|
4
3
|
DiscoverModelDetail,
|
5
4
|
DiscoverPluginDetail,
|
6
5
|
DiscoverProviderDetail,
|
7
|
-
} from '
|
6
|
+
} from '@lobechat/types';
|
7
|
+
|
8
|
+
import { DEFAULT_AGENT_CONFIG } from './settings';
|
8
9
|
|
9
10
|
const DEFAULT_CREATED_AT = new Date().toISOString();
|
10
11
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import urlJoin from 'url-join';
|
2
2
|
|
3
|
-
import { BRANDING_EMAIL } from '
|
3
|
+
import { BRANDING_EMAIL } from './branding';
|
4
4
|
import {
|
5
5
|
BLOG,
|
6
6
|
DOCKER_IMAGE,
|
@@ -11,7 +11,7 @@ import {
|
|
11
11
|
SELF_HOSTING_DOCUMENTS,
|
12
12
|
USAGE_DOCUMENTS,
|
13
13
|
WIKI,
|
14
|
-
} from '
|
14
|
+
} from './url';
|
15
15
|
|
16
16
|
export const INBOX_GUIDE_SYSTEMROLE = `# Role: LobeChat Support Assistant
|
17
17
|
|
@@ -1,9 +1,11 @@
|
|
1
1
|
export * from './auth';
|
2
2
|
export * from './branding';
|
3
3
|
export * from './currency';
|
4
|
+
export * from './desktop';
|
4
5
|
export * from './layoutTokens';
|
5
6
|
export * from './message';
|
6
7
|
export * from './session';
|
7
8
|
export * from './settings';
|
9
|
+
export * from './trace';
|
8
10
|
export * from './user';
|
9
11
|
export * from './version';
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import { ModelProvider } from '@lobechat/model-runtime';
|
2
|
-
import { UserModelProviderConfig } from '@lobechat/types';
|
2
|
+
import { ModelProviderCard, UserModelProviderConfig } from '@lobechat/types';
|
3
3
|
|
4
4
|
import * as ProviderCards from '@/config/modelProviders';
|
5
|
-
import { ModelProviderCard } from '@/types/llm';
|
6
5
|
|
7
6
|
export const genUserLLMConfig = (specificConfig: Record<any, any>): UserModelProviderConfig => {
|
8
7
|
return Object.keys(ModelProvider).reduce((config, providerKey) => {
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
|
1
|
+
import { UserHotkeyConfig } from '@lobechat/types';
|
2
|
+
|
3
|
+
import { HOTKEYS_REGISTRATION } from '../hotkeys';
|
3
4
|
|
4
5
|
export const DEFAULT_HOTKEY_CONFIG: UserHotkeyConfig = HOTKEYS_REGISTRATION.reduce(
|
5
6
|
(acc: UserHotkeyConfig, item) => {
|
@@ -1,10 +1,9 @@
|
|
1
|
-
import { UserSettings } from '
|
1
|
+
import { UserSettings } from '@lobechat/types';
|
2
2
|
|
3
3
|
import { DEFAULT_AGENT } from './agent';
|
4
4
|
import { DEFAULT_COMMON_SETTINGS } from './common';
|
5
5
|
import { DEFAULT_HOTKEY_CONFIG } from './hotkey';
|
6
6
|
import { DEFAULT_LLM_CONFIG } from './llm';
|
7
|
-
import { DEFAULT_SYNC_CONFIG } from './sync';
|
8
7
|
import { DEFAULT_SYSTEM_AGENT_CONFIG } from './systemAgent';
|
9
8
|
import { DEFAULT_TOOL_CONFIG } from './tool';
|
10
9
|
import { DEFAULT_TTS_CONFIG } from './tts';
|
@@ -22,7 +21,6 @@ export const DEFAULT_SETTINGS: UserSettings = {
|
|
22
21
|
hotkey: DEFAULT_HOTKEY_CONFIG,
|
23
22
|
keyVaults: {},
|
24
23
|
languageModel: DEFAULT_LLM_CONFIG,
|
25
|
-
sync: DEFAULT_SYNC_CONFIG,
|
26
24
|
systemAgent: DEFAULT_SYSTEM_AGENT_CONFIG,
|
27
25
|
tool: DEFAULT_TOOL_CONFIG,
|
28
26
|
tts: DEFAULT_TTS_CONFIG,
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import { ModelProvider } from '@lobechat/model-runtime';
|
2
|
-
|
3
1
|
import { genUserLLMConfig } from './genUserLLMConfig';
|
4
2
|
|
5
3
|
export const DEFAULT_LLM_CONFIG = genUserLLMConfig({
|
@@ -18,10 +16,10 @@ export const DEFAULT_LLM_CONFIG = genUserLLMConfig({
|
|
18
16
|
export const DEFAULT_MODEL = 'gpt-5-mini';
|
19
17
|
|
20
18
|
export const DEFAULT_EMBEDDING_MODEL = 'text-embedding-3-small';
|
21
|
-
export const DEFAULT_EMBEDDING_PROVIDER =
|
19
|
+
export const DEFAULT_EMBEDDING_PROVIDER = 'openai';
|
22
20
|
|
23
21
|
export const DEFAULT_RERANK_MODEL = 'rerank-english-v3.0';
|
24
22
|
export const DEFAULT_RERANK_PROVIDER = 'cohere';
|
25
23
|
export const DEFAULT_RERANK_QUERY_MODE = 'full_text';
|
26
24
|
|
27
|
-
export const DEFAULT_PROVIDER =
|
25
|
+
export const DEFAULT_PROVIDER = 'openai';
|
@@ -1,8 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
QueryRewriteSystemAgent,
|
3
|
-
SystemAgentItem,
|
4
|
-
UserSystemAgentConfig,
|
5
|
-
} from '@/types/user/settings';
|
1
|
+
import { QueryRewriteSystemAgent, SystemAgentItem, UserSystemAgentConfig } from '@lobechat/types';
|
6
2
|
|
7
3
|
import { DEFAULT_MODEL, DEFAULT_PROVIDER } from './llm';
|
8
4
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import qs from 'query-string';
|
2
2
|
import urlJoin from 'url-join';
|
3
3
|
|
4
|
-
import { isDev } from '@/utils/env';
|
5
|
-
|
6
4
|
import { INBOX_SESSION_ID } from './session';
|
7
5
|
|
6
|
+
const isDev = process.env.NODE_ENV === 'development';
|
7
|
+
|
8
8
|
export const UTM_SOURCE = 'chat_preview';
|
9
9
|
|
10
10
|
export const OFFICIAL_URL = 'https://lobechat.com';
|
@@ -58,19 +58,25 @@ beforeEach(() => {
|
|
58
58
|
|
59
59
|
describe('DatabaseManager', () => {
|
60
60
|
describe('Callback Handling', () => {
|
61
|
-
it(
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
61
|
+
it(
|
62
|
+
'should properly track loading states',
|
63
|
+
async () => {
|
64
|
+
await manager.initialize(callbacks);
|
65
|
+
|
66
|
+
// 验证状态转换顺序
|
67
|
+
expect(stateChanges).toEqual([
|
68
|
+
DatabaseLoadingState.Initializing,
|
69
|
+
DatabaseLoadingState.LoadingDependencies,
|
70
|
+
DatabaseLoadingState.LoadingWasm,
|
71
|
+
DatabaseLoadingState.Migrating,
|
72
|
+
DatabaseLoadingState.Finished,
|
73
|
+
DatabaseLoadingState.Ready,
|
74
|
+
]);
|
75
|
+
},
|
76
|
+
{
|
77
|
+
timeout: 15000,
|
78
|
+
},
|
79
|
+
);
|
74
80
|
|
75
81
|
it('should report dependencies loading progress', async () => {
|
76
82
|
await manager.initialize(callbacks);
|