@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.
- package/.github/workflows/desktop-pr-build.yml +8 -8
- package/.github/workflows/docker.yml +17 -16
- package/.github/workflows/e2e.yml +3 -3
- package/.github/workflows/release-desktop-beta.yml +8 -8
- package/.github/workflows/release.yml +1 -1
- package/.github/workflows/test.yml +4 -4
- package/CHANGELOG.md +25 -0
- package/changelog/v1.json +9 -0
- package/package.json +1 -1
- package/packages/const/src/index.ts +0 -1
- package/packages/const/src/url.ts +1 -4
- package/packages/context-engine/src/index.ts +1 -6
- package/packages/context-engine/src/processors/GroupMessageFlatten.ts +12 -2
- package/packages/context-engine/src/processors/__tests__/GroupMessageFlatten.test.ts +73 -9
- package/packages/context-engine/src/providers/index.ts +0 -2
- package/packages/database/package.json +1 -1
- package/packages/database/src/models/__tests__/message.grouping.test.ts +812 -0
- package/packages/database/src/models/__tests__/message.test.ts +322 -170
- package/packages/database/src/models/message.ts +62 -24
- package/packages/database/src/utils/__tests__/groupMessages.test.ts +145 -2
- package/packages/database/src/utils/groupMessages.ts +7 -5
- package/packages/types/src/message/common/base.ts +13 -0
- package/packages/types/src/message/common/image.ts +8 -0
- package/packages/types/src/message/common/metadata.ts +39 -0
- package/packages/types/src/message/common/tools.ts +10 -0
- package/packages/types/src/message/db/params.ts +47 -1
- package/packages/types/src/message/ui/chat.ts +4 -1
- package/packages/types/src/search.ts +16 -0
- package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/V1Mobile/index.tsx +2 -2
- package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/V1Mobile/useSend.ts +6 -4
- package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/useSend.ts +15 -10
- package/src/app/[variants]/(main)/chat/@session/features/SessionListContent/List/Item/index.tsx +4 -2
- package/src/components/Thinking/index.tsx +4 -3
- package/src/features/AgentSetting/AgentPlugin/index.tsx +2 -2
- package/src/features/ChatInput/ActionBar/STT/browser.tsx +2 -2
- package/src/features/ChatInput/ActionBar/STT/openai.tsx +2 -2
- package/src/features/ChatInput/ActionBar/Tools/useControls.tsx +1 -3
- package/src/features/Conversation/Error/ErrorJsonViewer.tsx +4 -3
- package/src/features/Conversation/Error/OllamaBizError/index.tsx +7 -2
- package/src/features/Conversation/Error/index.tsx +15 -5
- package/src/features/Conversation/MarkdownElements/LobeArtifact/Render/index.tsx +2 -2
- package/src/features/Conversation/Messages/Assistant/Extra/index.tsx +2 -2
- package/src/features/Conversation/Messages/Assistant/MessageContent.tsx +5 -3
- package/src/features/Conversation/Messages/Assistant/Tool/Inspector/BuiltinPluginTitle.tsx +2 -2
- package/src/features/Conversation/Messages/Assistant/Tool/Inspector/ToolTitle.tsx +4 -2
- package/src/features/Conversation/Messages/Assistant/Tool/Render/CustomRender.tsx +2 -2
- package/src/features/Conversation/Messages/Assistant/Tool/Render/index.tsx +2 -2
- package/src/features/Conversation/Messages/Assistant/Tool/index.tsx +2 -2
- package/src/features/Conversation/Messages/Assistant/index.tsx +4 -4
- package/src/features/Conversation/Messages/Default.tsx +2 -2
- package/src/features/Conversation/Messages/User/Extra.tsx +2 -2
- package/src/features/Conversation/Messages/User/index.tsx +4 -4
- package/src/features/Conversation/Messages/index.tsx +3 -3
- package/src/features/Conversation/components/AutoScroll.tsx +2 -2
- package/src/features/Conversation/components/Extras/Usage/UsageDetail/index.tsx +9 -6
- package/src/features/PluginTag/index.tsx +1 -3
- package/src/features/PluginsUI/Render/BuiltinType/index.test.tsx +37 -28
- package/src/features/Portal/Artifacts/Body/index.tsx +2 -2
- package/src/server/modules/ModelRuntime/trace.ts +11 -4
- package/src/server/routers/lambda/message.ts +14 -3
- package/src/services/chat/chat.test.ts +1 -40
- package/src/services/chat/contextEngineering.test.ts +0 -30
- package/src/services/chat/contextEngineering.ts +1 -12
- package/src/services/chat/index.ts +2 -7
- package/src/services/chat/types.ts +1 -1
- package/src/services/message/_deprecated.ts +1 -1
- package/src/services/message/client.ts +8 -2
- package/src/services/message/server.ts +7 -2
- package/src/services/message/type.ts +6 -1
- package/src/store/chat/helpers.test.ts +99 -0
- package/src/store/chat/helpers.ts +21 -2
- package/src/store/chat/selectors.ts +1 -1
- package/src/store/chat/slices/aiChat/actions/generateAIChat.ts +3 -3
- package/src/store/chat/slices/builtinTool/actions/index.ts +1 -4
- package/src/store/chat/slices/message/action.test.ts +5 -1
- package/src/store/chat/slices/message/action.ts +102 -14
- package/src/store/chat/slices/message/reducer.test.ts +363 -5
- package/src/store/chat/slices/message/reducer.ts +87 -3
- package/src/store/chat/slices/message/{selectors.test.ts → selectors/chat.test.ts} +266 -30
- package/src/store/chat/slices/message/{selectors.ts → selectors/chat.ts} +29 -79
- package/src/store/chat/slices/message/selectors/index.ts +2 -0
- package/src/store/chat/slices/message/selectors/messageState.test.ts +36 -0
- package/src/store/chat/slices/message/selectors/messageState.ts +80 -0
- package/src/store/chat/slices/plugin/action.test.ts +34 -132
- package/src/store/chat/slices/plugin/action.ts +1 -44
- package/src/store/tool/selectors/tool.test.ts +1 -1
- package/src/store/tool/selectors/tool.ts +6 -8
- package/src/store/tool/slices/builtin/action.test.ts +83 -35
- package/src/store/tool/slices/builtin/action.ts +0 -9
- package/src/store/tool/slices/builtin/selectors.test.ts +4 -30
- package/src/store/tool/slices/builtin/selectors.ts +15 -21
- package/src/tools/index.ts +0 -6
- package/src/tools/renders.ts +0 -3
- package/src/tools/web-browsing/Portal/Search/Footer.tsx +2 -2
- package/packages/const/src/guide.ts +0 -89
- package/packages/context-engine/src/providers/InboxGuide.ts +0 -102
- package/packages/context-engine/src/providers/__tests__/InboxGuideProvider.test.ts +0 -121
- package/src/services/chat/__snapshots__/chat.test.ts.snap +0 -110
- package/src/store/chat/slices/builtinTool/actions/__tests__/dalle.test.ts +0 -121
- package/src/store/chat/slices/builtinTool/actions/dalle.ts +0 -124
- package/src/tools/dalle/Render/GalleyGrid.tsx +0 -60
- package/src/tools/dalle/Render/Item/EditMode.tsx +0 -66
- package/src/tools/dalle/Render/Item/Error.tsx +0 -49
- package/src/tools/dalle/Render/Item/Image.tsx +0 -44
- package/src/tools/dalle/Render/Item/ImageFileItem.tsx +0 -57
- package/src/tools/dalle/Render/Item/index.tsx +0 -88
- package/src/tools/dalle/Render/ToolBar.tsx +0 -56
- package/src/tools/dalle/Render/index.tsx +0 -52
- 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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
github.event_name
|
|
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 == '
|
|
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 == '
|
|
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 != '
|
|
73
|
-
type=raw,value=latest,enable=${{ github.event_name != '
|
|
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@
|
|
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@
|
|
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 == '
|
|
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 == '
|
|
150
|
-
type=semver,pattern={{version}},enable=${{ github.event_name != '
|
|
151
|
-
type=raw,value=latest,enable=${{ github.event_name != '
|
|
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 == '
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
265
|
+
uses: actions/download-artifact@v6
|
|
266
266
|
with:
|
|
267
267
|
name: merged-release
|
|
268
268
|
path: release
|
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
- uses: actions/checkout@v5
|
|
29
29
|
|
|
30
30
|
- name: Setup Node.js
|
|
31
|
-
uses: actions/setup-node@
|
|
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@
|
|
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@
|
|
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@
|
|
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
|
+
[](#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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
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",
|
|
@@ -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 (
|
|
71
|
-
assistantMsg.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
|
|
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
|
},
|