@lobehub/lobehub 2.0.0-next.8 → 2.0.0-next.9

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 (109) hide show
  1. package/.github/workflows/desktop-pr-build.yml +8 -8
  2. package/.github/workflows/docker.yml +17 -16
  3. package/.github/workflows/e2e.yml +3 -3
  4. package/.github/workflows/release-desktop-beta.yml +8 -8
  5. package/.github/workflows/release.yml +1 -1
  6. package/.github/workflows/test.yml +4 -4
  7. package/CHANGELOG.md +25 -0
  8. package/changelog/v1.json +9 -0
  9. package/package.json +1 -1
  10. package/packages/const/src/index.ts +0 -1
  11. package/packages/const/src/url.ts +1 -4
  12. package/packages/context-engine/src/index.ts +1 -6
  13. package/packages/context-engine/src/processors/GroupMessageFlatten.ts +12 -2
  14. package/packages/context-engine/src/processors/__tests__/GroupMessageFlatten.test.ts +73 -9
  15. package/packages/context-engine/src/providers/index.ts +0 -2
  16. package/packages/database/package.json +1 -1
  17. package/packages/database/src/models/__tests__/message.grouping.test.ts +812 -0
  18. package/packages/database/src/models/__tests__/message.test.ts +322 -170
  19. package/packages/database/src/models/message.ts +62 -24
  20. package/packages/database/src/utils/__tests__/groupMessages.test.ts +145 -2
  21. package/packages/database/src/utils/groupMessages.ts +7 -5
  22. package/packages/types/src/message/common/base.ts +13 -0
  23. package/packages/types/src/message/common/image.ts +8 -0
  24. package/packages/types/src/message/common/metadata.ts +39 -0
  25. package/packages/types/src/message/common/tools.ts +10 -0
  26. package/packages/types/src/message/db/params.ts +47 -1
  27. package/packages/types/src/message/ui/chat.ts +4 -1
  28. package/packages/types/src/search.ts +16 -0
  29. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/V1Mobile/index.tsx +2 -2
  30. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/V1Mobile/useSend.ts +6 -4
  31. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/useSend.ts +15 -10
  32. package/src/app/[variants]/(main)/chat/@session/features/SessionListContent/List/Item/index.tsx +4 -2
  33. package/src/components/Thinking/index.tsx +4 -3
  34. package/src/features/AgentSetting/AgentPlugin/index.tsx +2 -2
  35. package/src/features/ChatInput/ActionBar/STT/browser.tsx +2 -2
  36. package/src/features/ChatInput/ActionBar/STT/openai.tsx +2 -2
  37. package/src/features/ChatInput/ActionBar/Tools/useControls.tsx +1 -3
  38. package/src/features/Conversation/Error/ErrorJsonViewer.tsx +4 -3
  39. package/src/features/Conversation/Error/OllamaBizError/index.tsx +7 -2
  40. package/src/features/Conversation/Error/index.tsx +15 -5
  41. package/src/features/Conversation/MarkdownElements/LobeArtifact/Render/index.tsx +2 -2
  42. package/src/features/Conversation/Messages/Assistant/Extra/index.tsx +2 -2
  43. package/src/features/Conversation/Messages/Assistant/MessageContent.tsx +5 -3
  44. package/src/features/Conversation/Messages/Assistant/Tool/Inspector/BuiltinPluginTitle.tsx +2 -2
  45. package/src/features/Conversation/Messages/Assistant/Tool/Inspector/ToolTitle.tsx +4 -2
  46. package/src/features/Conversation/Messages/Assistant/Tool/Render/CustomRender.tsx +2 -2
  47. package/src/features/Conversation/Messages/Assistant/Tool/Render/index.tsx +2 -2
  48. package/src/features/Conversation/Messages/Assistant/Tool/index.tsx +2 -2
  49. package/src/features/Conversation/Messages/Assistant/index.tsx +4 -4
  50. package/src/features/Conversation/Messages/Default.tsx +2 -2
  51. package/src/features/Conversation/Messages/User/Extra.tsx +2 -2
  52. package/src/features/Conversation/Messages/User/index.tsx +4 -4
  53. package/src/features/Conversation/Messages/index.tsx +3 -3
  54. package/src/features/Conversation/components/AutoScroll.tsx +2 -2
  55. package/src/features/Conversation/components/Extras/Usage/UsageDetail/index.tsx +9 -6
  56. package/src/features/PluginTag/index.tsx +1 -3
  57. package/src/features/PluginsUI/Render/BuiltinType/index.test.tsx +37 -28
  58. package/src/features/Portal/Artifacts/Body/index.tsx +2 -2
  59. package/src/server/modules/ModelRuntime/trace.ts +11 -4
  60. package/src/server/routers/lambda/message.ts +14 -3
  61. package/src/services/chat/chat.test.ts +1 -40
  62. package/src/services/chat/contextEngineering.test.ts +0 -30
  63. package/src/services/chat/contextEngineering.ts +1 -12
  64. package/src/services/chat/index.ts +2 -7
  65. package/src/services/chat/types.ts +1 -1
  66. package/src/services/message/_deprecated.ts +1 -1
  67. package/src/services/message/client.ts +8 -2
  68. package/src/services/message/server.ts +7 -2
  69. package/src/services/message/type.ts +6 -1
  70. package/src/store/chat/helpers.test.ts +99 -0
  71. package/src/store/chat/helpers.ts +21 -2
  72. package/src/store/chat/selectors.ts +1 -1
  73. package/src/store/chat/slices/aiChat/actions/generateAIChat.ts +3 -3
  74. package/src/store/chat/slices/builtinTool/actions/index.ts +1 -4
  75. package/src/store/chat/slices/message/action.test.ts +5 -1
  76. package/src/store/chat/slices/message/action.ts +102 -14
  77. package/src/store/chat/slices/message/reducer.test.ts +363 -5
  78. package/src/store/chat/slices/message/reducer.ts +87 -3
  79. package/src/store/chat/slices/message/{selectors.test.ts → selectors/chat.test.ts} +266 -30
  80. package/src/store/chat/slices/message/{selectors.ts → selectors/chat.ts} +29 -79
  81. package/src/store/chat/slices/message/selectors/index.ts +2 -0
  82. package/src/store/chat/slices/message/selectors/messageState.test.ts +36 -0
  83. package/src/store/chat/slices/message/selectors/messageState.ts +80 -0
  84. package/src/store/chat/slices/plugin/action.test.ts +34 -132
  85. package/src/store/chat/slices/plugin/action.ts +1 -44
  86. package/src/store/tool/selectors/tool.test.ts +1 -1
  87. package/src/store/tool/selectors/tool.ts +6 -8
  88. package/src/store/tool/slices/builtin/action.test.ts +83 -35
  89. package/src/store/tool/slices/builtin/action.ts +0 -9
  90. package/src/store/tool/slices/builtin/selectors.test.ts +4 -30
  91. package/src/store/tool/slices/builtin/selectors.ts +15 -21
  92. package/src/tools/index.ts +0 -6
  93. package/src/tools/renders.ts +0 -3
  94. package/src/tools/web-browsing/Portal/Search/Footer.tsx +2 -2
  95. package/packages/const/src/guide.ts +0 -89
  96. package/packages/context-engine/src/providers/InboxGuide.ts +0 -102
  97. package/packages/context-engine/src/providers/__tests__/InboxGuideProvider.test.ts +0 -121
  98. package/src/services/chat/__snapshots__/chat.test.ts.snap +0 -110
  99. package/src/store/chat/slices/builtinTool/actions/__tests__/dalle.test.ts +0 -121
  100. package/src/store/chat/slices/builtinTool/actions/dalle.ts +0 -124
  101. package/src/tools/dalle/Render/GalleyGrid.tsx +0 -60
  102. package/src/tools/dalle/Render/Item/EditMode.tsx +0 -66
  103. package/src/tools/dalle/Render/Item/Error.tsx +0 -49
  104. package/src/tools/dalle/Render/Item/Image.tsx +0 -44
  105. package/src/tools/dalle/Render/Item/ImageFileItem.tsx +0 -57
  106. package/src/tools/dalle/Render/Item/index.tsx +0 -88
  107. package/src/tools/dalle/Render/ToolBar.tsx +0 -56
  108. package/src/tools/dalle/Render/index.tsx +0 -52
  109. package/src/tools/dalle/index.ts +0 -92
@@ -31,7 +31,7 @@ jobs:
31
31
  fetch-depth: 0
32
32
 
33
33
  - name: Setup Node.js
34
- uses: actions/setup-node@v5
34
+ uses: actions/setup-node@v6
35
35
  with:
36
36
  node-version: 22
37
37
  package-manager-cache: false
@@ -65,7 +65,7 @@ jobs:
65
65
  fetch-depth: 0
66
66
 
67
67
  - name: Setup Node.js
68
- uses: actions/setup-node@v5
68
+ uses: actions/setup-node@v6
69
69
  with:
70
70
  node-version: 22
71
71
  package-manager-cache: false
@@ -110,7 +110,7 @@ jobs:
110
110
  run_install: false
111
111
 
112
112
  - name: Setup Node.js
113
- uses: actions/setup-node@v5
113
+ uses: actions/setup-node@v6
114
114
  with:
115
115
  node-version: 22
116
116
  package-manager-cache: false
@@ -202,7 +202,7 @@ jobs:
202
202
 
203
203
  # 上传构建产物
204
204
  - name: Upload artifact
205
- uses: actions/upload-artifact@v4
205
+ uses: actions/upload-artifact@v5
206
206
  with:
207
207
  name: release-${{ matrix.os }}
208
208
  path: |
@@ -229,7 +229,7 @@ jobs:
229
229
  uses: actions/checkout@v5
230
230
 
231
231
  - name: Setup Node.js
232
- uses: actions/setup-node@v5
232
+ uses: actions/setup-node@v6
233
233
  with:
234
234
  node-version: 22
235
235
  package-manager-cache: false
@@ -241,7 +241,7 @@ jobs:
241
241
 
242
242
  # 下载所有平台的构建产物
243
243
  - name: Download artifacts
244
- uses: actions/download-artifact@v5
244
+ uses: actions/download-artifact@v6
245
245
  with:
246
246
  path: release
247
247
  pattern: release-*
@@ -267,7 +267,7 @@ jobs:
267
267
 
268
268
  # 上传合并后的构建产物
269
269
  - name: Upload artifacts with merged macOS files
270
- uses: actions/upload-artifact@v4
270
+ uses: actions/upload-artifact@v5
271
271
  with:
272
272
  name: merged-release-pr
273
273
  path: release/
@@ -290,7 +290,7 @@ jobs:
290
290
 
291
291
  # 下载合并后的构建产物
292
292
  - name: Download merged artifacts
293
- uses: actions/download-artifact@v5
293
+ uses: actions/download-artifact@v6
294
294
  with:
295
295
  name: merged-release-pr
296
296
  path: release
@@ -7,13 +7,13 @@ on:
7
7
  workflow_dispatch:
8
8
  release:
9
9
  types: [published]
10
- pull_request:
11
10
  pull_request_target:
12
11
  types: [synchronize, labeled, unlabeled]
13
12
 
14
13
  concurrency:
15
14
  group: ${{ github.ref }}-${{ github.workflow }}
16
- cancel-in-progress: true
15
+ # PR 构建时取消旧的运行,但 release 构建不取消
16
+ cancel-in-progress: ${{ github.event_name != 'release' }}
17
17
 
18
18
  env:
19
19
  REGISTRY_IMAGE: lobehub/lobehub
@@ -23,9 +23,10 @@ jobs:
23
23
  build:
24
24
  # 添加 PR label 触发条件
25
25
  if: |
26
- (github.event_name == 'pull_request' &&
27
- contains(github.event.pull_request.labels.*.name, 'trigger:build-docker')) ||
28
- github.event_name != 'pull_request'
26
+ github.event_name == 'release' ||
27
+ github.event_name == 'workflow_dispatch' ||
28
+ (github.event_name == 'pull_request_target' &&
29
+ contains(github.event.pull_request.labels.*.name, 'trigger:build-docker'))
29
30
 
30
31
  strategy:
31
32
  matrix:
@@ -52,7 +53,7 @@ jobs:
52
53
 
53
54
  # 为 PR 生成特殊的 tag
54
55
  - name: Generate PR metadata
55
- if: github.event_name == 'pull_request'
56
+ if: github.event_name == 'pull_request_target'
56
57
  id: pr_meta
57
58
  env:
58
59
  BRANCH_NAME: ${{ github.head_ref }}
@@ -67,10 +68,10 @@ jobs:
67
68
  images: ${{ env.REGISTRY_IMAGE }}
68
69
  tags: |
69
70
  # PR 构建使用特殊的 tag
70
- type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request' }}
71
+ type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request_target' }}
71
72
  # release 构建使用版本号
72
- type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request' }}
73
- type=raw,value=latest,enable=${{ github.event_name != 'pull_request' }}
73
+ type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request_target' }}
74
+ type=raw,value=latest,enable=${{ github.event_name != 'pull_request_target' }}
74
75
 
75
76
  - name: Docker login
76
77
  uses: docker/login-action@v3
@@ -103,7 +104,7 @@ jobs:
103
104
  touch "/tmp/digests/${digest#sha256:}"
104
105
 
105
106
  - name: Upload artifact
106
- uses: actions/upload-artifact@v4
107
+ uses: actions/upload-artifact@v5
107
108
  with:
108
109
  name: digest-${{ env.PLATFORM_PAIR }}
109
110
  path: /tmp/digests/*
@@ -121,7 +122,7 @@ jobs:
121
122
  fetch-depth: 0
122
123
 
123
124
  - name: Download digests
124
- uses: actions/download-artifact@v5
125
+ uses: actions/download-artifact@v6
125
126
  with:
126
127
  path: /tmp/digests
127
128
  pattern: digest-*
@@ -132,7 +133,7 @@ jobs:
132
133
 
133
134
  # 为 merge job 添加 PR metadata 生成
134
135
  - name: Generate PR metadata
135
- if: github.event_name == 'pull_request'
136
+ if: github.event_name == 'pull_request_target'
136
137
  id: pr_meta
137
138
  env:
138
139
  BRANCH_NAME: ${{ github.head_ref }}
@@ -146,9 +147,9 @@ jobs:
146
147
  with:
147
148
  images: ${{ env.REGISTRY_IMAGE }}
148
149
  tags: |
149
- type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request' }}
150
- type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request' }}
151
- type=raw,value=latest,enable=${{ github.event_name != 'pull_request' }}
150
+ type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request_target' }}
151
+ type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request_target' }}
152
+ type=raw,value=latest,enable=${{ github.event_name != 'pull_request_target' }}
152
153
 
153
154
  - name: Docker login
154
155
  uses: docker/login-action@v3
@@ -167,7 +168,7 @@ jobs:
167
168
  docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
168
169
 
169
170
  - name: Comment on PR with Docker build info
170
- if: github.event_name == 'pull_request'
171
+ if: github.event_name == 'pull_request_target'
171
172
  uses: actions/github-script@v8
172
173
  with:
173
174
  github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -17,7 +17,7 @@ jobs:
17
17
  timeout-minutes: 25
18
18
  steps:
19
19
  - name: Checkout
20
- uses: actions/checkout@v4
20
+ uses: actions/checkout@v5
21
21
 
22
22
  - name: Setup Bun
23
23
  uses: oven-sh/setup-bun@v2
@@ -37,7 +37,7 @@ jobs:
37
37
 
38
38
  - name: Upload Cucumber HTML report (on failure)
39
39
  if: failure()
40
- uses: actions/upload-artifact@v4
40
+ uses: actions/upload-artifact@v5
41
41
  with:
42
42
  name: cucumber-report
43
43
  path: e2e/reports
@@ -45,7 +45,7 @@ jobs:
45
45
 
46
46
  - name: Upload screenshots (on failure)
47
47
  if: failure()
48
- uses: actions/upload-artifact@v4
48
+ uses: actions/upload-artifact@v5
49
49
  with:
50
50
  name: test-screenshots
51
51
  path: e2e/screenshots
@@ -24,7 +24,7 @@ jobs:
24
24
  fetch-depth: 0
25
25
 
26
26
  - name: Setup Node.js
27
- uses: actions/setup-node@v5
27
+ uses: actions/setup-node@v6
28
28
  with:
29
29
  node-version: 22
30
30
  package-manager-cache: false
@@ -53,7 +53,7 @@ jobs:
53
53
  fetch-depth: 0
54
54
 
55
55
  - name: Setup Node.js
56
- uses: actions/setup-node@v5
56
+ uses: actions/setup-node@v6
57
57
  with:
58
58
  node-version: 22
59
59
  package-manager-cache: false
@@ -94,7 +94,7 @@ jobs:
94
94
  run_install: false
95
95
 
96
96
  - name: Setup Node.js
97
- uses: actions/setup-node@v5
97
+ uses: actions/setup-node@v6
98
98
  with:
99
99
  node-version: 22
100
100
  package-manager-cache: false
@@ -181,7 +181,7 @@ jobs:
181
181
 
182
182
  # 上传构建产物 (工作流处理重命名,不依赖 electron-builder 钩子)
183
183
  - name: Upload artifact
184
- uses: actions/upload-artifact@v4
184
+ uses: actions/upload-artifact@v5
185
185
  with:
186
186
  name: release-${{ matrix.os }}
187
187
  path: |
@@ -208,7 +208,7 @@ jobs:
208
208
  uses: actions/checkout@v5
209
209
 
210
210
  - name: Setup Node.js
211
- uses: actions/setup-node@v5
211
+ uses: actions/setup-node@v6
212
212
  with:
213
213
  node-version: 22
214
214
  package-manager-cache: false
@@ -220,7 +220,7 @@ jobs:
220
220
 
221
221
  # 下载所有平台的构建产物
222
222
  - name: Download artifacts
223
- uses: actions/download-artifact@v5
223
+ uses: actions/download-artifact@v6
224
224
  with:
225
225
  path: release
226
226
  pattern: release-*
@@ -246,7 +246,7 @@ jobs:
246
246
 
247
247
  # 上传合并后的构建产物
248
248
  - name: Upload artifacts with merged macOS files
249
- uses: actions/upload-artifact@v4
249
+ uses: actions/upload-artifact@v5
250
250
  with:
251
251
  name: merged-release
252
252
  path: release/
@@ -262,7 +262,7 @@ jobs:
262
262
  steps:
263
263
  # 下载合并后的构建产物
264
264
  - name: Download merged artifacts
265
- uses: actions/download-artifact@v5
265
+ uses: actions/download-artifact@v6
266
266
  with:
267
267
  name: merged-release
268
268
  path: release
@@ -34,7 +34,7 @@ jobs:
34
34
  token: ${{ secrets.GH_TOKEN }}
35
35
 
36
36
  - name: Setup Node.js
37
- uses: actions/setup-node@v5
37
+ uses: actions/setup-node@v6
38
38
  with:
39
39
  node-version: 22
40
40
  package-manager-cache: false
@@ -28,7 +28,7 @@ jobs:
28
28
  - uses: actions/checkout@v5
29
29
 
30
30
  - name: Setup Node.js
31
- uses: actions/setup-node@v5
31
+ uses: actions/setup-node@v6
32
32
  with:
33
33
  node-version: 22
34
34
  package-manager-cache: false
@@ -63,7 +63,7 @@ jobs:
63
63
  - uses: actions/checkout@v5
64
64
 
65
65
  - name: Setup Node.js
66
- uses: actions/setup-node@v5
66
+ uses: actions/setup-node@v6
67
67
  with:
68
68
  node-version: 22
69
69
  package-manager-cache: false
@@ -96,7 +96,7 @@ jobs:
96
96
  - uses: actions/checkout@v5
97
97
 
98
98
  - name: Setup Node.js
99
- uses: actions/setup-node@v5
99
+ uses: actions/setup-node@v6
100
100
  with:
101
101
  node-version: 22
102
102
  package-manager-cache: false
@@ -140,7 +140,7 @@ jobs:
140
140
  - uses: actions/checkout@v5
141
141
 
142
142
  - name: Setup Node.js
143
- uses: actions/setup-node@v5
143
+ uses: actions/setup-node@v6
144
144
  with:
145
145
  node-version: 22
146
146
  package-manager-cache: false
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## [Version 2.0.0-next.9](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.8...v2.0.0-next.9)
6
+
7
+ <sup>Released on **2025-11-02**</sup>
8
+
9
+ #### ♻ Code Refactoring
10
+
11
+ - **misc**: Remove dalle builtin plugin.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Code refactoring
19
+
20
+ - **misc**: Remove dalle builtin plugin, closes [#9952](https://github.com/lobehub/lobe-chat/issues/9952) ([2d4d70a](https://github.com/lobehub/lobe-chat/commit/2d4d70a))
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 2.0.0-next.8](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.7...v2.0.0-next.8)
6
31
 
7
32
  <sup>Released on **2025-11-02**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Remove dalle builtin plugin."
6
+ ]
7
+ },
8
+ "date": "2025-11-02",
9
+ "version": "2.0.0-next.9"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "improvements": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/lobehub",
3
- "version": "2.0.0-next.8",
3
+ "version": "2.0.0-next.9",
4
4
  "description": "LobeHub - an open-source,comprehensive AI Agent 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",
@@ -3,7 +3,6 @@ export * from './branding';
3
3
  export * from './currency';
4
4
  export * from './desktop';
5
5
  export * from './discover';
6
- export * from './guide';
7
6
  export * from './layoutTokens';
8
7
  export * from './message';
9
8
  export * from './meta';
@@ -8,26 +8,23 @@ const isDev = process.env.NODE_ENV === 'development';
8
8
  export const UTM_SOURCE = 'chat_preview';
9
9
 
10
10
  export const OFFICIAL_URL = 'https://lobechat.com';
11
- export const OFFICIAL_PREVIEW_URL = 'https://chat-preview.lobehub.com';
12
11
  export const OFFICIAL_SITE = 'https://lobehub.com';
12
+ export const OFFICIAL_DOMAIN = 'lobehub.com';
13
13
 
14
14
  export const OG_URL = '/og/cover.png?v=1';
15
15
 
16
16
  export const GITHUB = 'https://github.com/lobehub/lobe-chat';
17
17
  export const GITHUB_ISSUES = urlJoin(GITHUB, 'issues/new/choose');
18
18
  export const CHANGELOG = 'https://lobehub.com/changelog';
19
- export const DOCKER_IMAGE = 'https://hub.docker.com/r/lobehub/lobe-chat';
20
19
 
21
20
  export const DOCUMENTS = urlJoin(OFFICIAL_SITE, '/docs');
22
21
  export const USAGE_DOCUMENTS = urlJoin(DOCUMENTS, '/usage');
23
22
  export const SELF_HOSTING_DOCUMENTS = urlJoin(DOCUMENTS, '/self-hosting');
24
- export const WEBRTC_SYNC_DOCUMENTS = urlJoin(SELF_HOSTING_DOCUMENTS, '/advanced/webrtc');
25
23
  export const DATABASE_SELF_HOSTING_URL = urlJoin(SELF_HOSTING_DOCUMENTS, '/server-database');
26
24
 
27
25
  // use this for the link
28
26
  export const DOCUMENTS_REFER_URL = `${DOCUMENTS}?utm_source=${UTM_SOURCE}`;
29
27
 
30
- export const WIKI = urlJoin(GITHUB, 'wiki');
31
28
  export const WIKI_PLUGIN_GUIDE = urlJoin(USAGE_DOCUMENTS, '/plugins/development');
32
29
  export const MANUAL_UPGRADE_URL = urlJoin(SELF_HOSTING_DOCUMENTS, '/advanced/upstream-sync');
33
30
 
@@ -10,12 +10,7 @@ export type { ContextEngineConfig } from './pipeline';
10
10
  export { ContextEngine } from './pipeline';
11
11
 
12
12
  // Context Providers
13
- export {
14
- HistorySummaryProvider,
15
- InboxGuideProvider,
16
- SystemRoleInjector,
17
- ToolSystemRoleProvider,
18
- } from './providers';
13
+ export { HistorySummaryProvider, SystemRoleInjector, ToolSystemRoleProvider } from './providers';
19
14
 
20
15
  // Processors
21
16
  export {
@@ -67,8 +67,18 @@ export class GroupMessageFlattenProcessor extends BaseProcessor {
67
67
  }
68
68
 
69
69
  // Add reasoning if present (for models that support reasoning)
70
- if (message.reasoning) {
71
- assistantMsg.reasoning = message.reasoning;
70
+ if (child.reasoning) {
71
+ assistantMsg.reasoning = child.reasoning;
72
+ }
73
+
74
+ // Add error if present
75
+ if (child.error) {
76
+ assistantMsg.error = child.error;
77
+ }
78
+
79
+ // Add imageList if present
80
+ if (child.imageList && child.imageList.length > 0) {
81
+ assistantMsg.imageList = child.imageList;
72
82
  }
73
83
 
74
84
  // Preserve other fields that might be needed
@@ -340,7 +340,7 @@ describe('GroupMessageFlattenProcessor', () => {
340
340
  expect(result.messages[0].id).toBe('msg-group-1');
341
341
  });
342
342
 
343
- it('should preserve reasoning field from group message', async () => {
343
+ it('should preserve reasoning field from child block', async () => {
344
344
  const processor = new GroupMessageFlattenProcessor();
345
345
 
346
346
  const input: any[] = [
@@ -348,14 +348,14 @@ describe('GroupMessageFlattenProcessor', () => {
348
348
  id: 'msg-group-1',
349
349
  role: 'group',
350
350
  content: '',
351
- reasoning: {
352
- content: 'Thinking about the query...',
353
- signature: 'sig-123',
354
- },
355
351
  children: [
356
352
  {
357
353
  id: 'msg-1',
358
354
  content: 'Result',
355
+ reasoning: {
356
+ content: 'Thinking about the query...',
357
+ signature: 'sig-123',
358
+ },
359
359
  tools: [],
360
360
  },
361
361
  ],
@@ -372,6 +372,70 @@ describe('GroupMessageFlattenProcessor', () => {
372
372
  });
373
373
  });
374
374
 
375
+ it('should preserve error field from child block', async () => {
376
+ const processor = new GroupMessageFlattenProcessor();
377
+
378
+ const input: any[] = [
379
+ {
380
+ id: 'msg-group-1',
381
+ role: 'group',
382
+ content: '',
383
+ children: [
384
+ {
385
+ id: 'msg-1',
386
+ content: 'Error occurred',
387
+ error: {
388
+ type: 'InvalidAPIKey',
389
+ message: 'API key is invalid',
390
+ },
391
+ tools: [],
392
+ },
393
+ ],
394
+ },
395
+ ];
396
+
397
+ const context = createContext(input);
398
+ const result = await processor.process(context);
399
+
400
+ expect(result.messages).toHaveLength(1);
401
+ expect(result.messages[0].error).toEqual({
402
+ type: 'InvalidAPIKey',
403
+ message: 'API key is invalid',
404
+ });
405
+ });
406
+
407
+ it('should preserve imageList field from child block', async () => {
408
+ const processor = new GroupMessageFlattenProcessor();
409
+
410
+ const input: any[] = [
411
+ {
412
+ id: 'msg-group-1',
413
+ role: 'group',
414
+ content: '',
415
+ children: [
416
+ {
417
+ id: 'msg-1',
418
+ content: 'Here are the images',
419
+ imageList: [
420
+ { id: 'img-1', url: 'https://example.com/img1.jpg', alt: 'Image 1' },
421
+ { id: 'img-2', url: 'https://example.com/img2.jpg', alt: 'Image 2' },
422
+ ],
423
+ tools: [],
424
+ },
425
+ ],
426
+ },
427
+ ];
428
+
429
+ const context = createContext(input);
430
+ const result = await processor.process(context);
431
+
432
+ expect(result.messages).toHaveLength(1);
433
+ expect(result.messages[0].imageList).toEqual([
434
+ { id: 'img-1', url: 'https://example.com/img1.jpg', alt: 'Image 1' },
435
+ { id: 'img-2', url: 'https://example.com/img2.jpg', alt: 'Image 2' },
436
+ ]);
437
+ });
438
+
375
439
  it('should preserve parent/thread/group/topic IDs', async () => {
376
440
  const processor = new GroupMessageFlattenProcessor();
377
441
 
@@ -435,10 +499,6 @@ describe('GroupMessageFlattenProcessor', () => {
435
499
  id: 'msg_LnIlOyMUnX1ylf',
436
500
  role: 'group',
437
501
  content: '',
438
- reasoning: {
439
- content:
440
- '**Checking Hangzhou weather**\n\nIt seems the user is asking to check the weather in Hangzhou...',
441
- },
442
502
  createdAt: '2025-10-27T10:47:59.475Z',
443
503
  updatedAt: '2025-10-27T10:48:10.768Z',
444
504
  topicId: 'tpc_WQ1wRvxdDpLw',
@@ -451,6 +511,10 @@ describe('GroupMessageFlattenProcessor', () => {
451
511
  {
452
512
  content: '',
453
513
  id: 'msg_LnIlOyMUnX1ylf',
514
+ reasoning: {
515
+ content:
516
+ '**Checking Hangzhou weather**\n\nIt seems the user is asking to check the weather in Hangzhou...',
517
+ },
454
518
  performance: {
455
519
  tps: 29.336734693877553,
456
520
  ttft: 3844,
@@ -1,11 +1,9 @@
1
1
  // Context Provider exports
2
2
  export { HistorySummaryProvider } from './HistorySummary';
3
- export { InboxGuideProvider } from './InboxGuide';
4
3
  export { SystemRoleInjector } from './SystemRoleInjector';
5
4
  export { ToolSystemRoleProvider } from './ToolSystemRole';
6
5
 
7
6
  // Re-export types
8
7
  export type { HistorySummaryConfig } from './HistorySummary';
9
- export type { InboxGuideConfig } from './InboxGuide';
10
8
  export type { SystemRoleInjectorConfig } from './SystemRoleInjector';
11
9
  export type { ToolSystemRoleConfig } from './ToolSystemRole';
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "scripts": {
11
11
  "test": "npm run test:client-db && npm run test:server-db",
12
- "test:client-db": "vitest run",
12
+ "test:client-db": "vitest run --silent='passed-only'",
13
13
  "test:coverage": "vitest --coverage --silent='passed-only' --config vitest.config.server.mts",
14
14
  "test:server-db": "vitest run --config vitest.config.server.mts"
15
15
  },