@lobehub/chat 1.136.5 → 1.136.7

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 (64) hide show
  1. package/.github/workflows/desktop-pr-build.yml +3 -3
  2. package/.github/workflows/release-desktop-beta.yml +3 -3
  3. package/.github/workflows/release.yml +1 -1
  4. package/.github/workflows/test.yml +3 -3
  5. package/CHANGELOG.md +50 -0
  6. package/changelog/v1.json +14 -0
  7. package/package.json +62 -62
  8. package/packages/const/src/user.ts +2 -0
  9. package/packages/model-runtime/src/{utils/anthropicHelpers.test.ts → core/contextBuilders/anthropic.test.ts} +6 -6
  10. package/packages/model-runtime/src/{utils/anthropicHelpers.ts → core/contextBuilders/anthropic.ts} +3 -3
  11. package/packages/model-runtime/src/{utils/openaiHelpers.test.ts → core/contextBuilders/openai.test.ts} +5 -5
  12. package/packages/model-runtime/src/{utils/openaiHelpers.ts → core/contextBuilders/openai.ts} +4 -4
  13. package/packages/model-runtime/src/{utils/sensenovaHelpers.test.ts → core/contextBuilders/sensenova.test.ts} +1 -1
  14. package/packages/model-runtime/src/core/openaiCompatibleFactory/createImage.ts +1 -1
  15. package/packages/model-runtime/src/core/openaiCompatibleFactory/index.test.ts +1 -1
  16. package/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts +1 -1
  17. package/packages/model-runtime/src/core/parameterResolver.test.ts +300 -0
  18. package/packages/model-runtime/src/core/parameterResolver.ts +275 -0
  19. package/packages/model-runtime/src/{utils/cloudflareHelpers.test.ts → core/streams/cloudflare.test.ts} +2 -6
  20. package/packages/model-runtime/src/{utils/cloudflareHelpers.ts → core/streams/cloudflare.ts} +1 -1
  21. package/packages/model-runtime/src/index.ts +1 -1
  22. package/packages/model-runtime/src/providers/anthropic/generateObject.ts +1 -1
  23. package/packages/model-runtime/src/providers/anthropic/index.test.ts +1 -1
  24. package/packages/model-runtime/src/providers/anthropic/index.ts +10 -21
  25. package/packages/model-runtime/src/providers/azureOpenai/index.test.ts +2 -2
  26. package/packages/model-runtime/src/providers/azureOpenai/index.ts +1 -1
  27. package/packages/model-runtime/src/providers/baichuan/index.ts +5 -3
  28. package/packages/model-runtime/src/providers/bedrock/index.test.ts +167 -0
  29. package/packages/model-runtime/src/providers/bedrock/index.ts +11 -3
  30. package/packages/model-runtime/src/providers/cloudflare/index.ts +3 -3
  31. package/packages/model-runtime/src/providers/cohere/index.ts +13 -9
  32. package/packages/model-runtime/src/providers/github/index.ts +1 -1
  33. package/packages/model-runtime/src/providers/groq/index.ts +9 -2
  34. package/packages/model-runtime/src/providers/minimax/index.ts +24 -6
  35. package/packages/model-runtime/src/providers/mistral/index.ts +16 -9
  36. package/packages/model-runtime/src/providers/moonshot/index.ts +5 -1
  37. package/packages/model-runtime/src/providers/openai/index.ts +10 -10
  38. package/packages/model-runtime/src/providers/perplexity/index.ts +20 -12
  39. package/packages/model-runtime/src/providers/qwen/index.ts +27 -29
  40. package/packages/model-runtime/src/providers/search1api/index.ts +1 -1
  41. package/packages/model-runtime/src/providers/sensenova/index.ts +1 -1
  42. package/packages/model-runtime/src/providers/zhipu/index.ts +21 -18
  43. package/packages/model-runtime/src/types/chat.ts +1 -1
  44. package/packages/types/src/user/index.ts +8 -0
  45. package/packages/web-crawler/package.json +1 -1
  46. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/BottomActions.tsx +12 -15
  47. package/src/app/[variants]/(main)/labs/components/Hero.tsx +43 -0
  48. package/src/app/[variants]/(main)/labs/components/LabCard.tsx +85 -0
  49. package/src/app/[variants]/(main)/labs/page.tsx +59 -0
  50. package/src/features/ChatInput/InputEditor/index.tsx +38 -16
  51. package/src/locales/default/common.ts +1 -0
  52. package/src/locales/default/index.ts +2 -0
  53. package/src/locales/default/labs.ts +14 -0
  54. package/src/middleware.ts +1 -0
  55. package/src/store/chat/slices/topic/action.ts +0 -2
  56. package/src/store/user/slices/preference/selectors.ts +3 -0
  57. package/packages/types/src/sync.ts +0 -41
  58. /package/{.changelogrc.js → .changelogrc.cjs} +0 -0
  59. /package/{.commitlintrc.js → .commitlintrc.cjs} +0 -0
  60. /package/{.prettierrc.js → .prettierrc.cjs} +0 -0
  61. /package/{.releaserc.js → .releaserc.cjs} +0 -0
  62. /package/{.remarkrc.js → .remarkrc.cjs} +0 -0
  63. /package/{.stylelintrc.js → .stylelintrc.cjs} +0 -0
  64. /package/packages/model-runtime/src/{utils/sensenovaHelpers.ts → core/contextBuilders/sensenova.ts} +0 -0
@@ -36,7 +36,7 @@ jobs:
36
36
  - name: Install bun
37
37
  uses: oven-sh/setup-bun@v2
38
38
  with:
39
- bun-version: ${{ secrets.BUN_VERSION }}
39
+ bun-version: 1.2.23
40
40
 
41
41
  - name: Install deps
42
42
  run: bun i
@@ -188,7 +188,7 @@ jobs:
188
188
  else
189
189
  ARCH_SUFFIX="x64"
190
190
  fi
191
-
191
+
192
192
  mv latest-mac.yml "latest-mac-${ARCH_SUFFIX}.yml"
193
193
  echo "✅ Renamed latest-mac.yml to latest-mac-${ARCH_SUFFIX}.yml (detected: $SYSTEM_ARCH)"
194
194
  ls -la latest-mac-*.yml
@@ -234,7 +234,7 @@ jobs:
234
234
  - name: Install bun
235
235
  uses: oven-sh/setup-bun@v2
236
236
  with:
237
- bun-version: ${{ secrets.BUN_VERSION }}
237
+ bun-version: 1.2.23
238
238
 
239
239
  # 下载所有平台的构建产物
240
240
  - name: Download artifacts
@@ -32,7 +32,7 @@ jobs:
32
32
  - name: Install bun
33
33
  uses: oven-sh/setup-bun@v2
34
34
  with:
35
- bun-version: ${{ secrets.BUN_VERSION }}
35
+ bun-version: 1.2.23
36
36
 
37
37
  - name: Install deps
38
38
  run: bun i
@@ -170,7 +170,7 @@ jobs:
170
170
  else
171
171
  ARCH_SUFFIX="x64"
172
172
  fi
173
-
173
+
174
174
  mv latest-mac.yml "latest-mac-${ARCH_SUFFIX}.yml"
175
175
  echo "✅ Renamed latest-mac.yml to latest-mac-${ARCH_SUFFIX}.yml (detected: $SYSTEM_ARCH)"
176
176
  ls -la latest-mac-*.yml
@@ -216,7 +216,7 @@ jobs:
216
216
  - name: Install bun
217
217
  uses: oven-sh/setup-bun@v2
218
218
  with:
219
- bun-version: ${{ secrets.BUN_VERSION }}
219
+ bun-version: 1.2.23
220
220
 
221
221
  # 下载所有平台的构建产物
222
222
  - name: Download artifacts
@@ -41,7 +41,7 @@ jobs:
41
41
  - name: Install bun
42
42
  uses: oven-sh/setup-bun@v2
43
43
  with:
44
- bun-version: ${{ secrets.BUN_VERSION }}
44
+ bun-version: 1.2.23
45
45
 
46
46
  - name: Install deps
47
47
  run: bun i
@@ -71,7 +71,7 @@ jobs:
71
71
  - name: Install bun
72
72
  uses: oven-sh/setup-bun@v2
73
73
  with:
74
- bun-version: ${{ secrets.BUN_VERSION }}
74
+ bun-version: 1.2.23
75
75
 
76
76
  - name: Install deps
77
77
  run: bun i
@@ -104,7 +104,7 @@ jobs:
104
104
  - name: Install bun
105
105
  uses: oven-sh/setup-bun@v2
106
106
  with:
107
- bun-version: ${{ secrets.BUN_VERSION }}
107
+ bun-version: 1.2.23
108
108
 
109
109
  - name: Install deps
110
110
  run: bun i
@@ -148,7 +148,7 @@ jobs:
148
148
  - name: Install bun
149
149
  uses: oven-sh/setup-bun@v2
150
150
  with:
151
- bun-version: ${{ secrets.BUN_VERSION }}
151
+ bun-version: 1.2.23
152
152
 
153
153
  - name: Install deps
154
154
  run: bun i
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.136.7](https://github.com/lobehub/lobe-chat/compare/v1.136.6...v1.136.7)
6
+
7
+ <sup>Released on **2025-10-11**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Disable rich text in markdown editor.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Disable rich text in markdown editor, closes [#9637](https://github.com/lobehub/lobe-chat/issues/9637) ([9349ce2](https://github.com/lobehub/lobe-chat/commit/9349ce2))
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
+
30
+ ### [Version 1.136.6](https://github.com/lobehub/lobe-chat/compare/v1.136.5...v1.136.6)
31
+
32
+ <sup>Released on **2025-10-11**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **bedrock**: Add parameter conflict handling for Claude 4+ models.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **bedrock**: Add parameter conflict handling for Claude 4+ models, closes [#9627](https://github.com/lobehub/lobe-chat/issues/9627) [#9523](https://github.com/lobehub/lobe-chat/issues/9523) ([54b6217](https://github.com/lobehub/lobe-chat/commit/54b6217))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 1.136.5](https://github.com/lobehub/lobe-chat/compare/v1.136.4...v1.136.5)
6
56
 
7
57
  <sup>Released on **2025-10-11**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,18 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Disable rich text in markdown editor."
6
+ ]
7
+ },
8
+ "date": "2025-10-11",
9
+ "version": "1.136.7"
10
+ },
11
+ {
12
+ "children": {},
13
+ "date": "2025-10-11",
14
+ "version": "1.136.6"
15
+ },
2
16
  {
3
17
  "children": {},
4
18
  "date": "2025-10-11",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.136.5",
3
+ "version": "1.136.7",
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",
@@ -129,20 +129,20 @@
129
129
  "@azure-rest/ai-inference": "1.0.0-beta.5",
130
130
  "@azure/core-auth": "^1.10.1",
131
131
  "@cfworker/json-schema": "^4.1.1",
132
- "@clerk/localizations": "^3.25.0",
133
- "@clerk/nextjs": "^6.31.10",
134
- "@clerk/themes": "^2.4.18",
132
+ "@clerk/localizations": "^3.25.7",
133
+ "@clerk/nextjs": "^6.33.3",
134
+ "@clerk/themes": "^2.4.25",
135
135
  "@codesandbox/sandpack-react": "^2.20.0",
136
- "@cyntler/react-doc-viewer": "^1.17.0",
136
+ "@cyntler/react-doc-viewer": "^1.17.1",
137
137
  "@electric-sql/pglite": "0.2.17",
138
138
  "@emotion/react": "^11.14.0",
139
139
  "@fal-ai/client": "^1.6.2",
140
140
  "@formkit/auto-animate": "^0.9.0",
141
- "@google/genai": "^1.19.0",
141
+ "@google/genai": "^1.24.0",
142
142
  "@huggingface/inference": "^2.8.1",
143
143
  "@icons-pack/react-simple-icons": "^13.8.0",
144
144
  "@khmyznikov/pwa-install": "0.3.9",
145
- "@langchain/community": "^0.3.55",
145
+ "@langchain/community": "^0.3.57",
146
146
  "@lobechat/agent-runtime": "workspace:*",
147
147
  "@lobechat/const": "workspace:*",
148
148
  "@lobechat/context-engine": "workspace:*",
@@ -160,48 +160,48 @@
160
160
  "@lobehub/charts": "^2.1.2",
161
161
  "@lobehub/chat-plugin-sdk": "^1.32.4",
162
162
  "@lobehub/chat-plugins-gateway": "^1.9.0",
163
- "@lobehub/editor": "^1.11.0",
164
- "@lobehub/icons": "^2.32.2",
163
+ "@lobehub/editor": "^1.16.0",
164
+ "@lobehub/icons": "^2.42.0",
165
165
  "@lobehub/market-sdk": "^0.22.7",
166
166
  "@lobehub/tts": "^2.0.1",
167
- "@lobehub/ui": "^2.13.0",
168
- "@modelcontextprotocol/sdk": "^1.18.0",
169
- "@neondatabase/serverless": "^1.0.1",
170
- "@next/third-parties": "^15.5.3",
167
+ "@lobehub/ui": "^2.13.2",
168
+ "@modelcontextprotocol/sdk": "^1.20.0",
169
+ "@neondatabase/serverless": "^1.0.2",
170
+ "@next/third-parties": "^15.5.4",
171
171
  "@react-spring/web": "^9.7.5",
172
172
  "@serwist/next": "^9.2.1",
173
173
  "@t3-oss/env-nextjs": "^0.13.8",
174
- "@tanstack/react-query": "^5.87.4",
175
- "@trpc/client": "^11.5.1",
176
- "@trpc/next": "^11.5.1",
177
- "@trpc/react-query": "^11.5.1",
178
- "@trpc/server": "^11.5.1",
174
+ "@tanstack/react-query": "^5.90.2",
175
+ "@trpc/client": "^11.6.0",
176
+ "@trpc/next": "^11.6.0",
177
+ "@trpc/react-query": "^11.6.0",
178
+ "@trpc/server": "^11.6.0",
179
179
  "@vercel/analytics": "^1.5.0",
180
180
  "@vercel/edge-config": "^1.4.0",
181
- "@vercel/functions": "^3.0.0",
181
+ "@vercel/functions": "^3.1.3",
182
182
  "@vercel/speed-insights": "^1.2.0",
183
183
  "@xterm/xterm": "^5.5.0",
184
184
  "ahooks": "^3.9.5",
185
- "antd": "^5.27.3",
185
+ "antd": "^5.27.4",
186
186
  "antd-style": "^3.7.1",
187
187
  "brotli-wasm": "^3.0.1",
188
188
  "chroma-js": "^3.1.2",
189
189
  "cookie": "^1.0.2",
190
190
  "countries-and-timezones": "^3.8.0",
191
191
  "dayjs": "^1.11.18",
192
- "debug": "^4.4.1",
192
+ "debug": "^4.4.3",
193
193
  "dexie": "^3.2.7",
194
194
  "diff": "^8.0.2",
195
- "drizzle-orm": "^0.44.5",
195
+ "drizzle-orm": "^0.44.6",
196
196
  "drizzle-zod": "^0.5.1",
197
197
  "epub2": "^3.0.2",
198
198
  "fast-deep-equal": "^3.1.3",
199
199
  "file-type": "^21.0.0",
200
- "framer-motion": "^12.23.12",
201
- "gpt-tokenizer": "^3.0.1",
200
+ "framer-motion": "^12.23.24",
201
+ "gpt-tokenizer": "^3.2.0",
202
202
  "gray-matter": "^4.0.3",
203
203
  "html-to-text": "^9.0.5",
204
- "i18next": "^25.5.2",
204
+ "i18next": "^25.6.0",
205
205
  "i18next-browser-languagedetector": "^8.2.0",
206
206
  "i18next-resources-to-backend": "^1.2.1",
207
207
  "idb-keyval": "^6.2.2",
@@ -210,24 +210,24 @@
210
210
  "js-sha256": "^0.11.1",
211
211
  "jsonl-parse-stringify": "^1.0.3",
212
212
  "keyv": "^4.5.4",
213
- "langchain": "^0.3.33",
213
+ "langchain": "^0.3.35",
214
214
  "langfuse": "^3.38.5",
215
215
  "langfuse-core": "^3.38.5",
216
216
  "lodash-es": "^4.17.21",
217
217
  "lucide-react": "^0.544.0",
218
- "mammoth": "^1.10.0",
218
+ "mammoth": "^1.11.0",
219
219
  "markdown-to-txt": "^2.0.1",
220
220
  "mdast-util-to-markdown": "^2.1.2",
221
221
  "model-bank": "workspace:*",
222
222
  "modern-screenshot": "^4.6.6",
223
- "nanoid": "^5.1.5",
223
+ "nanoid": "^5.1.6",
224
224
  "next": "~15.3.5",
225
225
  "next-auth": "5.0.0-beta.29",
226
226
  "next-mdx-remote": "^5.0.0",
227
227
  "nextjs-toploader": "^3.9.17",
228
228
  "node-machine-id": "^1.1.12",
229
229
  "numeral": "^2.0.6",
230
- "nuqs": "^2.6.0",
230
+ "nuqs": "^2.7.1",
231
231
  "officeparser": "5.1.1",
232
232
  "oidc-provider": "^9.5.1",
233
233
  "ollama": "^0.6.0",
@@ -238,43 +238,43 @@
238
238
  "pdf-parse": "^1.1.1",
239
239
  "pdfjs-dist": "4.8.69",
240
240
  "pg": "^8.16.3",
241
- "pino": "^9.9.5",
241
+ "pino": "^9.13.1",
242
242
  "plaiceholder": "^3.0.0",
243
243
  "polished": "^4.3.1",
244
- "posthog-js": "^1.264.2",
244
+ "posthog-js": "^1.275.1",
245
245
  "pure-rand": "^7.0.1",
246
246
  "pwa-install-handler": "^2.6.3",
247
- "query-string": "^9.3.0",
247
+ "query-string": "^9.3.1",
248
248
  "random-words": "^2.0.1",
249
- "react": "^19.1.1",
249
+ "react": "^19.2.0",
250
250
  "react-confetti": "^6.4.0",
251
- "react-dom": "^19.1.1",
251
+ "react-dom": "^19.2.0",
252
252
  "react-fast-marquee": "^1.6.5",
253
253
  "react-hotkeys-hook": "^5.1.0",
254
- "react-i18next": "^15.7.3",
254
+ "react-i18next": "^15.7.4",
255
255
  "react-layout-kit": "^2.0.0",
256
256
  "react-lazy-load": "^4.0.1",
257
257
  "react-pdf": "^9.2.1",
258
258
  "react-rnd": "^10.5.2",
259
259
  "react-scan": "^0.4.3",
260
- "react-virtuoso": "^4.14.0",
260
+ "react-virtuoso": "^4.14.1",
261
261
  "react-wrap-balancer": "^1.1.1",
262
262
  "remark": "^15.0.1",
263
263
  "remark-gfm": "^4.0.1",
264
264
  "remark-html": "^16.0.1",
265
265
  "resolve-accept-language": "^3.1.13",
266
266
  "rtl-detect": "^1.1.2",
267
- "semver": "^7.7.2",
268
- "sharp": "^0.34.3",
269
- "shiki": "^3.12.2",
267
+ "semver": "^7.7.3",
268
+ "sharp": "^0.34.4",
269
+ "shiki": "^3.13.0",
270
270
  "ssrf-safe-fetch": "workspace:*",
271
271
  "stripe": "^17.7.0",
272
272
  "superjson": "^2.2.2",
273
- "svix": "^1.76.1",
274
- "swr": "2.3.4",
273
+ "svix": "^1.77.0",
274
+ "swr": "^2.3.6",
275
275
  "systemjs": "^6.15.1",
276
- "tokenx": "^1.0.0",
277
- "ts-md5": "^2.0.0",
276
+ "tokenx": "^1.1.0",
277
+ "ts-md5": "^2.0.1",
278
278
  "ua-parser-js": "^1.0.41",
279
279
  "unstructured-client": "^0.19.0",
280
280
  "url-join": "^5.0.0",
@@ -290,14 +290,14 @@
290
290
  "devDependencies": {
291
291
  "@commitlint/cli": "^19.8.1",
292
292
  "@edge-runtime/vm": "^5.0.0",
293
- "@huggingface/tasks": "^0.19.0",
293
+ "@huggingface/tasks": "^0.19.50",
294
294
  "@lobechat/types": "workspace:*",
295
295
  "@lobehub/i18n-cli": "^1.25.1",
296
296
  "@lobehub/lint": "^1.26.2",
297
297
  "@lobehub/market-types": "^1.11.4",
298
298
  "@lobehub/seo-cli": "^1.7.0",
299
- "@next/bundle-analyzer": "^15.5.3",
300
- "@next/eslint-plugin-next": "^15.5.3",
299
+ "@next/bundle-analyzer": "^15.5.4",
300
+ "@next/eslint-plugin-next": "^15.5.4",
301
301
  "@peculiar/webcrypto": "^1.5.0",
302
302
  "@prettier/sync": "^0.6.1",
303
303
  "@semantic-release/exec": "^6.0.3",
@@ -312,12 +312,12 @@
312
312
  "@types/json-schema": "^7.0.15",
313
313
  "@types/lodash": "^4.17.20",
314
314
  "@types/lodash-es": "^4.17.12",
315
- "@types/node": "^22.18.1",
315
+ "@types/node": "^22.18.9",
316
316
  "@types/numeral": "^2.0.5",
317
317
  "@types/oidc-provider": "^9.5.0",
318
318
  "@types/pg": "^8.15.5",
319
- "@types/react": "^19.1.12",
320
- "@types/react-dom": "^19.1.9",
319
+ "@types/react": "^19.2.2",
320
+ "@types/react-dom": "^19.2.1",
321
321
  "@types/rtl-detect": "^1.0.3",
322
322
  "@types/semver": "^7.7.1",
323
323
  "@types/systemjs": "^6.15.3",
@@ -329,28 +329,28 @@
329
329
  "ajv-keywords": "^5.1.0",
330
330
  "commitlint": "^19.8.1",
331
331
  "consola": "^3.4.2",
332
- "cross-env": "^10.0.0",
332
+ "cross-env": "^10.1.0",
333
333
  "crypto-js": "^4.2.0",
334
- "dbdocs": "^0.16.1",
335
- "dotenv": "^17.2.2",
334
+ "dbdocs": "^0.16.2",
335
+ "dotenv": "^17.2.3",
336
336
  "dotenv-expand": "^12.0.3",
337
- "dpdm-fast": "^1.0.13",
337
+ "dpdm-fast": "^1.0.14",
338
338
  "drizzle-dbml-generator": "^0.10.0",
339
- "drizzle-kit": "^0.31.4",
339
+ "drizzle-kit": "^0.31.5",
340
340
  "eslint": "^8.57.1",
341
341
  "eslint-plugin-mdx": "^3.6.2",
342
- "fake-indexeddb": "^6.2.2",
343
- "fs-extra": "^11.3.1",
342
+ "fake-indexeddb": "^6.2.3",
343
+ "fs-extra": "^11.3.2",
344
344
  "glob": "^11.0.3",
345
- "happy-dom": "^18.0.1",
345
+ "happy-dom": "^20.0.0",
346
346
  "husky": "^9.1.7",
347
- "import-in-the-middle": "^1.14.2",
347
+ "import-in-the-middle": "^1.15.0",
348
348
  "just-diff": "^6.0.2",
349
349
  "lint-staged": "^15.5.2",
350
350
  "lodash": "^4.17.21",
351
351
  "markdown-table": "^3.0.4",
352
352
  "mcp-hello-world": "^1.1.2",
353
- "mime": "^4.0.7",
353
+ "mime": "^4.1.0",
354
354
  "node-fetch": "^3.3.2",
355
355
  "node-gyp": "^11.4.2",
356
356
  "openapi-typescript": "^7.9.1",
@@ -364,12 +364,12 @@
364
364
  "semantic-release": "^21.1.2",
365
365
  "serwist": "^9.2.1",
366
366
  "stylelint": "^15.11.0",
367
- "tsx": "^4.20.5",
367
+ "tsx": "^4.20.6",
368
368
  "type-fest": "^4.41.0",
369
- "typescript": "^5.9.2",
369
+ "typescript": "^5.9.3",
370
370
  "unified": "^11.0.5",
371
371
  "unist-util-visit": "^5.0.0",
372
- "vite": "^7.1.5",
372
+ "vite": "^7.1.9",
373
373
  "vitest": "^3.2.4"
374
374
  },
375
375
  "packageManager": "pnpm@10.18.0",
@@ -1,6 +1,8 @@
1
1
  import { TopicDisplayMode, UserPreference } from '@lobechat/types';
2
2
 
3
3
  export const DEFAULT_PREFERENCE: UserPreference = {
4
+ disableInputMarkdownRender: false,
5
+ enableGroupChat: false,
4
6
  guide: {
5
7
  moveSettingsToAvatar: true,
6
8
  topic: true,
@@ -1,25 +1,25 @@
1
1
  import { OpenAI } from 'openai';
2
2
  import { describe, expect, it, vi } from 'vitest';
3
3
 
4
- import { OpenAIChatMessage, UserMessageContentPart } from '../types/chat';
5
- import { imageUrlToBase64 } from '../utils/imageToBase64';
4
+ import { OpenAIChatMessage, UserMessageContentPart } from '../../types/chat';
5
+ import { imageUrlToBase64 } from '../../utils/imageToBase64';
6
+ import { parseDataUri } from '../../utils/uriParser';
6
7
  import {
7
8
  buildAnthropicBlock,
8
9
  buildAnthropicMessage,
9
10
  buildAnthropicMessages,
10
11
  buildAnthropicTools,
11
- } from './anthropicHelpers';
12
- import { parseDataUri } from './uriParser';
12
+ } from './anthropic';
13
13
 
14
14
  // Mock the parseDataUri function since it's an implementation detail
15
- vi.mock('./uriParser', () => ({
15
+ vi.mock('../../utils/uriParser', () => ({
16
16
  parseDataUri: vi.fn().mockReturnValue({
17
17
  mimeType: 'image/jpeg',
18
18
  base64: 'base64EncodedString',
19
19
  type: 'base64',
20
20
  }),
21
21
  }));
22
- vi.mock('../utils/imageToBase64');
22
+ vi.mock('../../utils/imageToBase64');
23
23
 
24
24
  describe('anthropicHelpers', () => {
25
25
  describe('buildAnthropicBlock', () => {
@@ -1,9 +1,9 @@
1
1
  import Anthropic from '@anthropic-ai/sdk';
2
2
  import OpenAI from 'openai';
3
3
 
4
- import { OpenAIChatMessage, UserMessageContentPart } from '../types';
5
- import { imageUrlToBase64 } from '../utils/imageToBase64';
6
- import { parseDataUri } from './uriParser';
4
+ import { OpenAIChatMessage, UserMessageContentPart } from '../../types';
5
+ import { imageUrlToBase64 } from '../../utils/imageToBase64';
6
+ import { parseDataUri } from '../../utils/uriParser';
7
7
 
8
8
  export const buildAnthropicBlock = async (
9
9
  content: UserMessageContentPart,
@@ -1,18 +1,18 @@
1
1
  import OpenAI from 'openai';
2
2
  import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
3
3
 
4
- import { imageUrlToBase64 } from './imageToBase64';
4
+ import { imageUrlToBase64 } from '../../utils/imageToBase64';
5
+ import { parseDataUri } from '../../utils/uriParser';
5
6
  import {
6
7
  convertImageUrlToFile,
7
8
  convertMessageContent,
8
9
  convertOpenAIMessages,
9
10
  convertOpenAIResponseInputs,
10
- } from './openaiHelpers';
11
- import { parseDataUri } from './uriParser';
11
+ } from './openai';
12
12
 
13
13
  // 模拟依赖
14
- vi.mock('./imageToBase64');
15
- vi.mock('./uriParser');
14
+ vi.mock('../../utils/imageToBase64');
15
+ vi.mock('../../utils/uriParser');
16
16
 
17
17
  describe('convertMessageContent', () => {
18
18
  beforeEach(() => {
@@ -1,9 +1,9 @@
1
1
  import OpenAI, { toFile } from 'openai';
2
2
 
3
- import { disableStreamModels, systemToUserModels } from '../const/models';
4
- import { ChatStreamPayload, OpenAIChatMessage } from '../types';
5
- import { imageUrlToBase64 } from './imageToBase64';
6
- import { parseDataUri } from './uriParser';
3
+ import { disableStreamModels, systemToUserModels } from '../../const/models';
4
+ import { ChatStreamPayload, OpenAIChatMessage } from '../../types';
5
+ import { imageUrlToBase64 } from '../../utils/imageToBase64';
6
+ import { parseDataUri } from '../../utils/uriParser';
7
7
 
8
8
  export const convertMessageContent = async (
9
9
  content: OpenAI.ChatCompletionContentPart,
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, it } from 'vitest';
2
2
 
3
- import { convertSenseNovaMessage } from './sensenovaHelpers';
3
+ import { convertSenseNovaMessage } from './sensenova';
4
4
 
5
5
  describe('convertSenseNovaMessage', () => {
6
6
  it('should convert string content to text type array', () => {
@@ -6,8 +6,8 @@ import OpenAI from 'openai';
6
6
  import { CreateImagePayload, CreateImageResponse } from '../../types/image';
7
7
  import { getModelPricing } from '../../utils/getModelPricing';
8
8
  import { imageUrlToBase64 } from '../../utils/imageToBase64';
9
- import { convertImageUrlToFile } from '../../utils/openaiHelpers';
10
9
  import { parseDataUri } from '../../utils/uriParser';
10
+ import { convertImageUrlToFile } from '../contextBuilders/openai';
11
11
  import { convertOpenAIImageUsage } from '../usageConverters/openai';
12
12
 
13
13
  const log = createDebug('lobe-image:openai-compatible');
@@ -11,7 +11,7 @@ import type { Stream } from 'openai/streaming';
11
11
  import { Mock, afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
12
12
 
13
13
  import * as debugStreamModule from '../../utils/debugStream';
14
- import * as openaiHelpers from '../../utils/openaiHelpers';
14
+ import * as openaiHelpers from '../contextBuilders/openai';
15
15
  import { createOpenAICompatibleRuntime } from './index';
16
16
 
17
17
  const sleep = async (ms: number) =>
@@ -29,10 +29,10 @@ import { desensitizeUrl } from '../../utils/desensitizeUrl';
29
29
  import { getModelPropertyWithFallback } from '../../utils/getFallbackModelProperty';
30
30
  import { getModelPricing } from '../../utils/getModelPricing';
31
31
  import { handleOpenAIError } from '../../utils/handleOpenAIError';
32
- import { convertOpenAIMessages, convertOpenAIResponseInputs } from '../../utils/openaiHelpers';
33
32
  import { postProcessModelList } from '../../utils/postProcessModelList';
34
33
  import { StreamingResponse } from '../../utils/response';
35
34
  import { LobeRuntimeAI } from '../BaseAI';
35
+ import { convertOpenAIMessages, convertOpenAIResponseInputs } from '../contextBuilders/openai';
36
36
  import { OpenAIResponsesStream, OpenAIStream, OpenAIStreamOptions } from '../streams';
37
37
  import { createOpenAICompatibleImage } from './createImage';
38
38
  import { transformResponseAPIToStream, transformResponseToStream } from './nonStreamToStream';