@lobehub/chat 1.124.1 → 1.124.2

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.
Files changed (100) hide show
  1. package/.github/scripts/pr-comment.js +11 -2
  2. package/.github/workflows/desktop-pr-build.yml +86 -12
  3. package/.github/workflows/release-desktop-beta.yml +91 -20
  4. package/CHANGELOG.md +25 -0
  5. package/apps/desktop/electron-builder.js +8 -4
  6. package/changelog/v1.json +9 -0
  7. package/package.json +1 -1
  8. package/packages/const/src/hotkeys.ts +1 -1
  9. package/packages/const/src/index.ts +1 -0
  10. package/packages/const/src/settings/hotkey.ts +3 -2
  11. package/packages/const/src/trace.ts +1 -1
  12. package/packages/const/src/user.ts +1 -2
  13. package/packages/database/src/client/db.test.ts +19 -13
  14. package/packages/electron-server-ipc/src/ipcClient.test.ts +783 -1
  15. package/packages/file-loaders/src/loadFile.test.ts +61 -0
  16. package/packages/file-loaders/src/utils/isTextReadableFile.test.ts +43 -0
  17. package/packages/file-loaders/src/utils/parser-utils.test.ts +155 -0
  18. package/packages/model-runtime/package.json +2 -1
  19. package/packages/model-runtime/src/ai21/index.test.ts +2 -2
  20. package/packages/model-runtime/src/ai360/index.test.ts +2 -2
  21. package/packages/model-runtime/src/akashchat/index.test.ts +19 -0
  22. package/packages/model-runtime/src/anthropic/index.test.ts +1 -2
  23. package/packages/model-runtime/src/baichuan/index.test.ts +1 -2
  24. package/packages/model-runtime/src/bedrock/index.test.ts +1 -2
  25. package/packages/model-runtime/src/bfl/createImage.test.ts +1 -2
  26. package/packages/model-runtime/src/bfl/index.test.ts +1 -2
  27. package/packages/model-runtime/src/cloudflare/index.test.ts +1 -2
  28. package/packages/model-runtime/src/cohere/index.test.ts +19 -0
  29. package/packages/model-runtime/src/deepseek/index.test.ts +2 -2
  30. package/packages/model-runtime/src/fireworksai/index.test.ts +2 -2
  31. package/packages/model-runtime/src/giteeai/index.test.ts +2 -2
  32. package/packages/model-runtime/src/github/index.test.ts +2 -2
  33. package/packages/model-runtime/src/google/createImage.test.ts +1 -2
  34. package/packages/model-runtime/src/google/index.test.ts +1 -1
  35. package/packages/model-runtime/src/groq/index.test.ts +2 -3
  36. package/packages/model-runtime/src/huggingface/index.test.ts +40 -0
  37. package/packages/model-runtime/src/hunyuan/index.test.ts +2 -3
  38. package/packages/model-runtime/src/internlm/index.test.ts +2 -2
  39. package/packages/model-runtime/src/jina/index.test.ts +19 -0
  40. package/packages/model-runtime/src/lmstudio/index.test.ts +2 -2
  41. package/packages/model-runtime/src/minimax/index.test.ts +19 -0
  42. package/packages/model-runtime/src/mistral/index.test.ts +2 -3
  43. package/packages/model-runtime/src/modelscope/index.test.ts +19 -0
  44. package/packages/model-runtime/src/moonshot/index.test.ts +1 -2
  45. package/packages/model-runtime/src/nebius/index.test.ts +19 -0
  46. package/packages/model-runtime/src/novita/index.test.ts +3 -4
  47. package/packages/model-runtime/src/nvidia/index.test.ts +19 -0
  48. package/packages/model-runtime/src/openrouter/index.test.ts +2 -3
  49. package/packages/model-runtime/src/perplexity/index.test.ts +2 -3
  50. package/packages/model-runtime/src/ppio/index.test.ts +3 -4
  51. package/packages/model-runtime/src/qwen/index.test.ts +2 -2
  52. package/packages/model-runtime/src/sambanova/index.test.ts +19 -0
  53. package/packages/model-runtime/src/search1api/index.test.ts +19 -0
  54. package/packages/model-runtime/src/sensenova/index.test.ts +2 -2
  55. package/packages/model-runtime/src/spark/index.test.ts +2 -2
  56. package/packages/model-runtime/src/stepfun/index.test.ts +2 -2
  57. package/packages/model-runtime/src/taichu/index.test.ts +4 -5
  58. package/packages/model-runtime/src/tencentcloud/index.test.ts +1 -1
  59. package/packages/model-runtime/src/togetherai/index.test.ts +1 -2
  60. package/packages/model-runtime/src/upstage/index.test.ts +1 -2
  61. package/packages/model-runtime/src/utils/openaiCompatibleFactory/index.test.ts +9 -7
  62. package/packages/model-runtime/src/utils/streams/anthropic.ts +2 -2
  63. package/packages/model-runtime/src/utils/streams/openai/openai.ts +20 -13
  64. package/packages/model-runtime/src/utils/streams/openai/responsesStream.test.ts +1 -2
  65. package/packages/model-runtime/src/utils/streams/openai/responsesStream.ts +2 -2
  66. package/packages/model-runtime/src/utils/streams/protocol.ts +2 -2
  67. package/packages/model-runtime/src/wenxin/index.test.ts +2 -3
  68. package/packages/model-runtime/src/xai/index.test.ts +2 -2
  69. package/packages/model-runtime/src/zeroone/index.test.ts +1 -2
  70. package/packages/model-runtime/src/zhipu/index.test.ts +2 -3
  71. package/packages/model-runtime/vitest.config.mts +0 -7
  72. package/packages/types/src/index.ts +2 -0
  73. package/packages/types/src/message/base.ts +1 -1
  74. package/packages/types/src/openai/chat.ts +2 -3
  75. package/packages/utils/package.json +2 -1
  76. package/packages/utils/src/_deprecated/parseModels.test.ts +1 -1
  77. package/packages/utils/src/_deprecated/parseModels.ts +1 -1
  78. package/packages/utils/src/client/topic.test.ts +1 -2
  79. package/packages/utils/src/client/topic.ts +1 -2
  80. package/packages/utils/src/electron/desktopRemoteRPCFetch.ts +1 -1
  81. package/packages/utils/src/fetch/fetchSSE.ts +7 -8
  82. package/packages/utils/src/fetch/parseError.ts +1 -3
  83. package/packages/utils/src/format.test.ts +1 -2
  84. package/packages/utils/src/index.ts +1 -0
  85. package/packages/utils/src/toolManifest.ts +1 -2
  86. package/packages/utils/src/trace.ts +1 -1
  87. package/packages/utils/vitest.config.mts +1 -1
  88. package/packages/web-crawler/src/__tests__/urlRules.test.ts +275 -0
  89. package/packages/web-crawler/src/crawImpl/__tests__/exa.test.ts +269 -0
  90. package/packages/web-crawler/src/crawImpl/__tests__/firecrawl.test.ts +284 -0
  91. package/packages/web-crawler/src/crawImpl/__tests__/naive.test.ts +234 -0
  92. package/packages/web-crawler/src/crawImpl/__tests__/tavily.test.ts +359 -0
  93. package/packages/web-crawler/src/utils/__tests__/errorType.test.ts +217 -0
  94. package/packages/web-crawler/vitest.config.mts +3 -0
  95. package/scripts/electronWorkflow/mergeMacReleaseFiles.ts +207 -0
  96. package/src/components/Thinking/index.tsx +2 -3
  97. package/src/features/ChatInput/StoreUpdater.tsx +2 -0
  98. package/src/libs/traces/index.ts +1 -1
  99. package/src/server/modules/ModelRuntime/trace.ts +1 -2
  100. package/packages/model-runtime/src/openrouter/__snapshots__/index.test.ts.snap +0 -113
@@ -36,10 +36,19 @@ module.exports = async ({ github, context, releaseUrl, version, tag }) => {
36
36
  // Generate combined download table
37
37
  let assetTable = '| Platform | File | Size |\n| --- | --- | --- |\n';
38
38
 
39
- // Add macOS assets
39
+ // Add macOS assets with architecture detection
40
40
  macAssets.forEach((asset) => {
41
41
  const sizeInMB = (asset.size / (1024 * 1024)).toFixed(2);
42
- assetTable += `| macOS | [${asset.name}](${asset.browser_download_url}) | ${sizeInMB} MB |\n`;
42
+
43
+ // Detect architecture from filename
44
+ let architecture = '';
45
+ if (asset.name.includes('arm64')) {
46
+ architecture = ' (Apple Silicon)';
47
+ } else if (asset.name.includes('x64') || asset.name.includes('-mac.')) {
48
+ architecture = ' (Intel)';
49
+ }
50
+
51
+ assetTable += `| macOS${architecture} | [${asset.name}](${asset.browser_download_url}) | ${sizeInMB} MB |\n`;
43
52
  });
44
53
 
45
54
  // Add Windows assets
@@ -32,18 +32,18 @@ jobs:
32
32
  with:
33
33
  node-version: 22
34
34
 
35
- - name: Setup pnpm
36
- uses: pnpm/action-setup@v2
35
+ - name: Install bun
36
+ uses: oven-sh/setup-bun@v1
37
37
  with:
38
- version: 10
38
+ bun-version: ${{ secrets.BUN_VERSION }}
39
39
 
40
40
  - name: Install deps
41
- run: pnpm install
41
+ run: bun i
42
42
  env:
43
43
  NODE_OPTIONS: --max-old-space-size=6144
44
44
 
45
45
  - name: Lint
46
- run: pnpm run lint
46
+ run: bun run lint
47
47
  env:
48
48
  NODE_OPTIONS: --max-old-space-size=6144
49
49
 
@@ -93,7 +93,7 @@ jobs:
93
93
  runs-on: ${{ matrix.os }}
94
94
  strategy:
95
95
  matrix:
96
- os: [macos-latest, windows-2025, ubuntu-latest]
96
+ os: [macos-latest, macos-13, windows-2025, ubuntu-latest]
97
97
  steps:
98
98
  - uses: actions/checkout@v5
99
99
  with:
@@ -172,6 +172,27 @@ jobs:
172
172
  NEXT_PUBLIC_DESKTOP_PROJECT_ID: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_PROJECT_ID }}
173
173
  NEXT_PUBLIC_DESKTOP_UMAMI_BASE_URL: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_BASE_URL }}
174
174
 
175
+ # 处理 macOS latest-mac.yml 重命名 (避免多架构覆盖)
176
+ - name: Rename macOS latest-mac.yml for multi-architecture support
177
+ if: runner.os == 'macOS'
178
+ run: |
179
+ cd apps/desktop/release
180
+ if [ -f "latest-mac.yml" ]; then
181
+ # 根据运行环境检测架构
182
+ if [[ "${{ matrix.os }}" == *"arm64"* || "${{ matrix.os }}" == "macos-latest" ]]; then
183
+ ARCH_SUFFIX="arm"
184
+ else
185
+ ARCH_SUFFIX="intel"
186
+ fi
187
+
188
+ mv latest-mac.yml "latest-mac-${ARCH_SUFFIX}.yml"
189
+ echo "✅ Renamed latest-mac.yml to latest-mac-${ARCH_SUFFIX}.yml"
190
+ ls -la latest-mac-*.yml
191
+ else
192
+ echo "⚠️ latest-mac.yml not found, skipping rename"
193
+ ls -la latest*.yml || echo "No latest*.yml files found"
194
+ fi
195
+
175
196
  # 上传构建产物
176
197
  - name: Upload artifact
177
198
  uses: actions/upload-artifact@v4
@@ -189,8 +210,62 @@ jobs:
189
210
  apps/desktop/release/*.tar.gz*
190
211
  retention-days: 5
191
212
 
192
- publish-pr:
213
+ # 合并 macOS 多架构 latest-mac.yml 文件
214
+ merge-mac-files:
193
215
  needs: [build, version]
216
+ name: Merge macOS Release Files for PR
217
+ runs-on: ubuntu-latest
218
+ permissions:
219
+ contents: write
220
+ steps:
221
+ - name: Checkout repository
222
+ uses: actions/checkout@v5
223
+
224
+ - name: Setup Node.js
225
+ uses: actions/setup-node@v4
226
+ with:
227
+ node-version: 22
228
+
229
+ - name: Install required dependencies only
230
+ run: |
231
+ # 创建临时目录并安装依赖
232
+ mkdir -p temp-deps
233
+ cd temp-deps
234
+ npm init -y
235
+ npm install fs-extra yaml tsx
236
+ # 确保回到项目根目录
237
+ cd ${{ github.workspace }}
238
+
239
+ # 下载所有平台的构建产物
240
+ - name: Download artifacts
241
+ uses: actions/download-artifact@v4
242
+ with:
243
+ path: release
244
+ pattern: release-*
245
+ merge-multiple: true
246
+
247
+ # 列出下载的构建产物
248
+ - name: List downloaded artifacts
249
+ run: ls -R release
250
+
251
+ # 合并 macOS YAML 文件 (确保在项目根目录执行)
252
+ - name: Merge latest-mac.yml files
253
+ working-directory: ${{ github.workspace }}
254
+ run: NODE_PATH="${PWD}/temp-deps/node_modules" "${PWD}/temp-deps/node_modules/.bin/tsx" scripts/electronWorkflow/mergeMacReleaseFiles.ts ${{ needs.version.outputs.version }}
255
+ env:
256
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
257
+ RELEASE_TAG: ${{ needs.version.outputs.version }}
258
+
259
+ # 上传合并后的构建产物
260
+ - name: Upload artifacts with merged macOS files
261
+ uses: actions/upload-artifact@v4
262
+ with:
263
+ name: merged-release-pr
264
+ path: release/
265
+ retention-days: 1
266
+
267
+ publish-pr:
268
+ needs: [merge-mac-files, version]
194
269
  name: Publish PR Build
195
270
  runs-on: ubuntu-latest
196
271
  # Grant write permissions for creating release and commenting on PR
@@ -204,16 +279,15 @@ jobs:
204
279
  with:
205
280
  fetch-depth: 0
206
281
 
207
- # 下载所有平台的构建产物
208
- - name: Download artifacts
282
+ # 下载合并后的构建产物
283
+ - name: Download merged artifacts
209
284
  uses: actions/download-artifact@v4
210
285
  with:
286
+ name: merged-release-pr
211
287
  path: release
212
- pattern: release-*
213
- merge-multiple: true
214
288
 
215
289
  # 列出所有构建产物
216
- - name: List artifacts
290
+ - name: List final artifacts
217
291
  run: ls -R release
218
292
 
219
293
  # 生成PR发布描述
@@ -28,16 +28,16 @@ jobs:
28
28
  with:
29
29
  node-version: 22
30
30
 
31
- - name: Setup pnpm
32
- uses: pnpm/action-setup@v2
31
+ - name: Install bun
32
+ uses: oven-sh/setup-bun@v1
33
33
  with:
34
- version: 10
34
+ bun-version: ${{ secrets.BUN_VERSION }}
35
35
 
36
36
  - name: Install deps
37
- run: pnpm install
37
+ run: bun i
38
38
 
39
39
  - name: Lint
40
- run: pnpm run lint
40
+ run: bun run lint
41
41
 
42
42
  version:
43
43
  name: Determine version
@@ -80,7 +80,7 @@ jobs:
80
80
  runs-on: ${{ matrix.os }}
81
81
  strategy:
82
82
  matrix:
83
- os: [macos-latest, windows-2025, ubuntu-latest]
83
+ os: [macos-latest, macos-13, windows-2025, ubuntu-latest]
84
84
  steps:
85
85
  - uses: actions/checkout@v5
86
86
  with:
@@ -91,14 +91,14 @@ jobs:
91
91
  with:
92
92
  node-version: 22
93
93
 
94
- - name: Setup pnpm
95
- uses: pnpm/action-setup@v2
94
+ - name: Install bun
95
+ uses: oven-sh/setup-bun@v1
96
96
  with:
97
- version: 10
97
+ bun-version: ${{ secrets.BUN_VERSION }}
98
98
 
99
- # node-linker=hoisted 模式将可以确保 asar 压缩可用
99
+ # bun install 默认行为应该能确保 asar 压缩可用
100
100
  - name: Install deps
101
- run: pnpm install --node-linker=hoisted
101
+ run: bun i
102
102
 
103
103
  - name: Install deps on Desktop
104
104
  run: npm run install-isolated --prefix=./apps/desktop
@@ -154,7 +154,28 @@ jobs:
154
154
  NEXT_PUBLIC_DESKTOP_PROJECT_ID: ${{ secrets.UMAMI_BETA_DESKTOP_PROJECT_ID }}
155
155
  NEXT_PUBLIC_DESKTOP_UMAMI_BASE_URL: ${{ secrets.UMAMI_BETA_DESKTOP_BASE_URL }}
156
156
 
157
- # 上传构建产物,移除了 zip 相关部分
157
+ # 处理 macOS latest-mac.yml 重命名 (避免多架构覆盖)
158
+ - name: Rename macOS latest-mac.yml for multi-architecture support
159
+ if: runner.os == 'macOS'
160
+ run: |
161
+ cd apps/desktop/release
162
+ if [ -f "latest-mac.yml" ]; then
163
+ # 根据运行环境检测架构
164
+ if [[ "${{ matrix.os }}" == *"arm64"* || "${{ matrix.os }}" == "macos-latest" ]]; then
165
+ ARCH_SUFFIX="arm"
166
+ else
167
+ ARCH_SUFFIX="intel"
168
+ fi
169
+
170
+ mv latest-mac.yml "latest-mac-${ARCH_SUFFIX}.yml"
171
+ echo "✅ Renamed latest-mac.yml to latest-mac-${ARCH_SUFFIX}.yml"
172
+ ls -la latest-mac-*.yml
173
+ else
174
+ echo "⚠️ latest-mac.yml not found, skipping rename"
175
+ ls -la latest*.yml || echo "No latest*.yml files found"
176
+ fi
177
+
178
+ # 上传构建产物 (工作流处理重命名,不依赖 electron-builder 钩子)
158
179
  - name: Upload artifact
159
180
  uses: actions/upload-artifact@v4
160
181
  with:
@@ -171,17 +192,32 @@ jobs:
171
192
  apps/desktop/release/*.tar.gz*
172
193
  retention-days: 5
173
194
 
174
- # 正式版发布 job
175
- publish-release:
195
+ # 合并 macOS 多架构 latest-mac.yml 文件
196
+ merge-mac-files:
176
197
  needs: [build, version]
177
- name: Publish Beta Release
198
+ name: Merge macOS Release Files
178
199
  runs-on: ubuntu-latest
179
- # Grant write permission to contents for uploading release assets
180
200
  permissions:
181
201
  contents: write
182
- outputs:
183
- artifact_path: ${{ steps.set_path.outputs.path }}
184
202
  steps:
203
+ - name: Checkout repository
204
+ uses: actions/checkout@v5
205
+
206
+ - name: Setup Node.js
207
+ uses: actions/setup-node@v4
208
+ with:
209
+ node-version: 22
210
+
211
+ - name: Install required dependencies only
212
+ run: |
213
+ # 创建临时目录并安装依赖
214
+ mkdir -p temp-deps
215
+ cd temp-deps
216
+ npm init -y
217
+ npm install fs-extra yaml tsx
218
+ # 确保回到项目根目录
219
+ cd ${{ github.workspace }}
220
+
185
221
  # 下载所有平台的构建产物
186
222
  - name: Download artifacts
187
223
  uses: actions/download-artifact@v4
@@ -190,11 +226,46 @@ jobs:
190
226
  pattern: release-*
191
227
  merge-multiple: true
192
228
 
229
+ # 列出下载的构建产物
230
+ - name: List downloaded artifacts
231
+ run: ls -R release
232
+
233
+ # 合并 macOS YAML 文件 (确保在项目根目录执行)
234
+ - name: Merge latest-mac.yml files
235
+ working-directory: ${{ github.workspace }}
236
+ run: NODE_PATH="${PWD}/temp-deps/node_modules" "${PWD}/temp-deps/node_modules/.bin/tsx" scripts/electronWorkflow/mergeMacReleaseFiles.ts ${{ github.event.release.tag_name }}
237
+ env:
238
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
239
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
240
+
241
+ # 上传合并后的构建产物
242
+ - name: Upload artifacts with merged macOS files
243
+ uses: actions/upload-artifact@v4
244
+ with:
245
+ name: merged-release
246
+ path: release/
247
+ retention-days: 1
248
+
249
+ # 发布所有平台构建产物
250
+ publish-release:
251
+ needs: [merge-mac-files]
252
+ name: Publish Beta Release
253
+ runs-on: ubuntu-latest
254
+ permissions:
255
+ contents: write
256
+ steps:
257
+ # 下载合并后的构建产物
258
+ - name: Download merged artifacts
259
+ uses: actions/download-artifact@v4
260
+ with:
261
+ name: merged-release
262
+ path: release
263
+
193
264
  # 列出所有构建产物
194
- - name: List artifacts
265
+ - name: List final artifacts
195
266
  run: ls -R release
196
267
 
197
- # 将构建产物上传到现有 release
268
+ # 将构建产物上传到现有 release (现在包含合并后的 latest-mac.yml)
198
269
  - name: Upload to Release
199
270
  uses: softprops/action-gh-release@v1
200
271
  with:
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.124.2](https://github.com/lobehub/lobe-chat/compare/v1.124.1...v1.124.2)
6
+
7
+ <sup>Released on **2025-09-06**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix ChatInput send command switch.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **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))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
5
30
  ### [Version 1.124.1](https://github.com/lobehub/lobe-chat/compare/v1.124.0...v1.124.1)
6
31
 
7
32
  <sup>Released on **2025-09-06**</sup>
@@ -1,12 +1,15 @@
1
1
  const dotenv = require('dotenv');
2
+ const os = require('node:os');
2
3
 
3
4
  dotenv.config();
4
5
 
5
6
  const packageJSON = require('./package.json');
6
7
 
7
8
  const channel = process.env.UPDATE_CHANNEL;
9
+ const arch = os.arch();
8
10
 
9
11
  console.log(`🚄 Build Version ${packageJSON.version}, Channel: ${channel}`);
12
+ console.log(`🏗️ Building for architecture: ${arch}`);
10
13
 
11
14
  const isNightly = channel === 'nightly';
12
15
  const isBeta = packageJSON.name.includes('beta');
@@ -87,12 +90,13 @@ const config = {
87
90
  hardenedRuntime: true,
88
91
  notarize: true,
89
92
  target:
90
- // 降低构建时间,nightly 只打 arm64
93
+ // 降低构建时间,nightly 只打 dmg
94
+ // 根据当前机器架构只构建对应架构的包
91
95
  isNightly
92
- ? [{ arch: ['arm64'], target: 'dmg' }]
96
+ ? [{ arch: [arch === 'arm64' ? 'arm64' : 'x64'], target: 'dmg' }]
93
97
  : [
94
- { arch: ['x64', 'arm64'], target: 'dmg' },
95
- { arch: ['x64', 'arm64'], target: 'zip' },
98
+ { arch: [arch === 'arm64' ? 'arm64' : 'x64'], target: 'dmg' },
99
+ { arch: [arch === 'arm64' ? 'arm64' : 'x64'], target: 'zip' },
96
100
  ],
97
101
  },
98
102
  npmRebuild: true,
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix ChatInput send command switch."
6
+ ]
7
+ },
8
+ "date": "2025-09-06",
9
+ "version": "1.124.2"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "fixes": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.124.1",
3
+ "version": "1.124.2",
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",
@@ -6,7 +6,7 @@ import {
6
6
  HotkeyItem,
7
7
  HotkeyScopeEnum,
8
8
  KeyEnum,
9
- } from '@/types/hotkey';
9
+ } from '@lobechat/types';
10
10
 
11
11
  const combineKeys = (keys: string[]) => keys.join('+');
12
12
 
@@ -5,5 +5,6 @@ export * from './layoutTokens';
5
5
  export * from './message';
6
6
  export * from './session';
7
7
  export * from './settings';
8
+ export * from './trace';
8
9
  export * from './user';
9
10
  export * from './version';
@@ -1,5 +1,6 @@
1
- import { HOTKEYS_REGISTRATION } from '@/const/hotkeys';
2
- import { UserHotkeyConfig } from '@/types/user/settings';
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,4 +1,4 @@
1
- import { TraceNameMap } from '@/types/trace';
1
+ import { TraceNameMap } from '@lobechat/types';
2
2
 
3
3
  export const LOBE_CHAT_TRACE_HEADER = 'X-lobe-trace';
4
4
  export const LOBE_CHAT_TRACE_ID = 'X-lobe-chat-trace-id';
@@ -1,5 +1,4 @@
1
- import { TopicDisplayMode } from '@/types/topic';
2
- import { UserPreference } from '@/types/user';
1
+ import { TopicDisplayMode, UserPreference } from '@lobechat/types';
3
2
 
4
3
  export const DEFAULT_PREFERENCE: UserPreference = {
5
4
  guide: {
@@ -58,19 +58,25 @@ beforeEach(() => {
58
58
 
59
59
  describe('DatabaseManager', () => {
60
60
  describe('Callback Handling', () => {
61
- it('should properly track loading states', async () => {
62
- await manager.initialize(callbacks);
63
-
64
- // 验证状态转换顺序
65
- expect(stateChanges).toEqual([
66
- DatabaseLoadingState.Initializing,
67
- DatabaseLoadingState.LoadingDependencies,
68
- DatabaseLoadingState.LoadingWasm,
69
- DatabaseLoadingState.Migrating,
70
- DatabaseLoadingState.Finished,
71
- DatabaseLoadingState.Ready,
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);