@lobehub/lobehub 2.0.0-next.35 → 2.0.0-next.36

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 (154) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/changelog/v1.json +9 -0
  3. package/next.config.ts +5 -6
  4. package/package.json +2 -2
  5. package/packages/agent-runtime/src/core/__tests__/runtime.test.ts +112 -77
  6. package/packages/agent-runtime/src/core/runtime.ts +63 -18
  7. package/packages/agent-runtime/src/types/generalAgent.ts +55 -0
  8. package/packages/agent-runtime/src/types/index.ts +1 -0
  9. package/packages/agent-runtime/src/types/instruction.ts +10 -3
  10. package/packages/const/src/user.ts +0 -1
  11. package/packages/context-engine/src/processors/GroupMessageFlatten.ts +8 -6
  12. package/packages/context-engine/src/processors/__tests__/GroupMessageFlatten.test.ts +12 -12
  13. package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/assistant-group-branches.json +249 -0
  14. package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/index.ts +4 -0
  15. package/packages/conversation-flow/src/__tests__/fixtures/inputs/branch/multi-assistant-group.json +260 -0
  16. package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/active-index-1.json +4 -0
  17. package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/assistant-group-branches.json +481 -0
  18. package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/conversation.json +5 -1
  19. package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/index.ts +4 -0
  20. package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/multi-assistant-group.json +407 -0
  21. package/packages/conversation-flow/src/__tests__/fixtures/outputs/branch/nested.json +18 -2
  22. package/packages/conversation-flow/src/__tests__/fixtures/outputs/complex-scenario.json +25 -3
  23. package/packages/conversation-flow/src/__tests__/parse.test.ts +12 -0
  24. package/packages/conversation-flow/src/index.ts +1 -1
  25. package/packages/conversation-flow/src/transformation/FlatListBuilder.ts +112 -34
  26. package/packages/conversation-flow/src/types/flatMessageList.ts +0 -12
  27. package/packages/conversation-flow/src/{types.ts → types/index.ts} +3 -14
  28. package/packages/database/src/models/message.ts +18 -19
  29. package/packages/types/src/aiChat.ts +2 -0
  30. package/packages/types/src/importer.ts +2 -2
  31. package/packages/types/src/message/ui/chat.ts +17 -1
  32. package/packages/types/src/message/ui/extra.ts +2 -2
  33. package/packages/types/src/message/ui/params.ts +2 -2
  34. package/packages/types/src/user/preference.ts +0 -4
  35. package/packages/utils/src/tokenizer/index.ts +3 -11
  36. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/Desktop/MessageFromUrl.tsx +3 -3
  37. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/V1Mobile/index.tsx +1 -1
  38. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/V1Mobile/useSend.ts +3 -3
  39. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/useSend.ts +6 -6
  40. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/Content.tsx +5 -3
  41. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/WelcomeChatItem/AgentWelcome/OpeningQuestions.tsx +2 -2
  42. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/WelcomeChatItem/GroupWelcome/GroupUsageSuggest.tsx +2 -2
  43. package/src/app/[variants]/(main)/labs/page.tsx +0 -9
  44. package/src/features/ChatInput/ActionBar/STT/browser.tsx +3 -3
  45. package/src/features/ChatInput/ActionBar/STT/openai.tsx +3 -3
  46. package/src/features/Conversation/Error/AccessCodeForm.tsx +1 -1
  47. package/src/features/Conversation/Error/ChatInvalidApiKey.tsx +1 -1
  48. package/src/features/Conversation/Error/ClerkLogin/index.tsx +1 -1
  49. package/src/features/Conversation/Error/OAuthForm.tsx +1 -1
  50. package/src/features/Conversation/Error/index.tsx +0 -5
  51. package/src/features/Conversation/Messages/Assistant/Actions/index.tsx +13 -10
  52. package/src/features/Conversation/Messages/Assistant/Extra/index.test.tsx +3 -8
  53. package/src/features/Conversation/Messages/Assistant/Extra/index.tsx +2 -6
  54. package/src/features/Conversation/Messages/Assistant/MessageContent.tsx +7 -9
  55. package/src/features/Conversation/Messages/Assistant/Tool/Inspector/PluginResult.tsx +2 -2
  56. package/src/features/Conversation/Messages/Assistant/Tool/Inspector/PluginState.tsx +2 -2
  57. package/src/features/Conversation/Messages/Assistant/Tool/Render/PluginSettings.tsx +4 -1
  58. package/src/features/Conversation/Messages/Assistant/Tool/Render/index.tsx +2 -3
  59. package/src/features/Conversation/Messages/Assistant/index.tsx +57 -60
  60. package/src/features/Conversation/Messages/Default.tsx +1 -0
  61. package/src/features/Conversation/Messages/Group/Actions/WithContentId.tsx +38 -10
  62. package/src/features/Conversation/Messages/Group/Actions/index.tsx +1 -1
  63. package/src/features/Conversation/Messages/Group/ContentBlock.tsx +1 -3
  64. package/src/features/Conversation/Messages/Group/GroupChildren.tsx +12 -12
  65. package/src/features/Conversation/Messages/Group/MessageContent.tsx +7 -1
  66. package/src/features/Conversation/Messages/Group/Tool/Render/PluginSettings.tsx +1 -1
  67. package/src/features/Conversation/Messages/Group/index.tsx +2 -1
  68. package/src/features/Conversation/Messages/Supervisor/index.tsx +2 -2
  69. package/src/features/Conversation/Messages/User/{Actions.tsx → Actions/ActionsBar.tsx} +26 -25
  70. package/src/features/Conversation/Messages/User/Actions/MessageBranch.tsx +107 -0
  71. package/src/features/Conversation/Messages/User/Actions/index.tsx +42 -0
  72. package/src/features/Conversation/Messages/User/index.tsx +43 -44
  73. package/src/features/Conversation/Messages/index.tsx +3 -3
  74. package/src/features/Conversation/components/AutoScroll.tsx +3 -3
  75. package/src/features/Conversation/components/Extras/Usage/UsageDetail/AnimatedNumber.tsx +55 -0
  76. package/src/features/Conversation/components/Extras/Usage/UsageDetail/index.tsx +5 -2
  77. package/src/features/Conversation/components/VirtualizedList/index.tsx +29 -20
  78. package/src/features/Conversation/hooks/useChatListActionsBar.tsx +8 -10
  79. package/src/features/Portal/Thread/Chat/ChatInput/useSend.ts +3 -3
  80. package/src/hooks/useHotkeys/chatScope.ts +15 -7
  81. package/src/server/routers/lambda/__tests__/aiChat.test.ts +1 -1
  82. package/src/server/routers/lambda/__tests__/integration/message.integration.test.ts +0 -26
  83. package/src/server/routers/lambda/aiChat.ts +3 -2
  84. package/src/server/routers/lambda/message.ts +8 -16
  85. package/src/server/services/message/__tests__/index.test.ts +29 -39
  86. package/src/server/services/message/index.ts +41 -36
  87. package/src/services/electron/desktopNotification.ts +6 -6
  88. package/src/services/electron/file.ts +6 -6
  89. package/src/services/file/ClientS3/index.ts +8 -8
  90. package/src/services/message/__tests__/metadata-race-condition.test.ts +157 -0
  91. package/src/services/message/index.ts +21 -15
  92. package/src/services/upload.ts +11 -11
  93. package/src/services/utils/abortableRequest.test.ts +161 -0
  94. package/src/services/utils/abortableRequest.ts +67 -0
  95. package/src/store/chat/agents/GeneralChatAgent.ts +137 -0
  96. package/src/store/chat/agents/createAgentExecutors.ts +395 -0
  97. package/src/store/chat/helpers.test.ts +0 -99
  98. package/src/store/chat/helpers.ts +0 -11
  99. package/src/store/chat/slices/aiChat/actions/__tests__/conversationControl.test.ts +332 -0
  100. package/src/store/chat/slices/aiChat/actions/__tests__/conversationLifecycle.test.ts +257 -0
  101. package/src/store/chat/slices/aiChat/actions/__tests__/helpers.ts +11 -2
  102. package/src/store/chat/slices/aiChat/actions/__tests__/rag.test.ts +6 -6
  103. package/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts +391 -0
  104. package/src/store/chat/slices/aiChat/actions/__tests__/streamingStates.test.ts +179 -0
  105. package/src/store/chat/slices/aiChat/actions/conversationControl.ts +157 -0
  106. package/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts +329 -0
  107. package/src/store/chat/slices/aiChat/actions/generateAIGroupChat.ts +14 -14
  108. package/src/store/chat/slices/aiChat/actions/index.ts +12 -6
  109. package/src/store/chat/slices/aiChat/actions/rag.ts +9 -6
  110. package/src/store/chat/slices/aiChat/actions/streamingExecutor.ts +604 -0
  111. package/src/store/chat/slices/aiChat/actions/streamingStates.ts +84 -0
  112. package/src/store/chat/slices/builtinTool/actions/__tests__/localSystem.test.ts +4 -4
  113. package/src/store/chat/slices/builtinTool/actions/__tests__/search.test.ts +11 -11
  114. package/src/store/chat/slices/builtinTool/actions/interpreter.ts +8 -8
  115. package/src/store/chat/slices/builtinTool/actions/localSystem.ts +2 -2
  116. package/src/store/chat/slices/builtinTool/actions/search.ts +8 -8
  117. package/src/store/chat/slices/message/action.test.ts +79 -68
  118. package/src/store/chat/slices/message/actions/index.ts +39 -0
  119. package/src/store/chat/slices/message/actions/internals.ts +77 -0
  120. package/src/store/chat/slices/message/actions/optimisticUpdate.ts +260 -0
  121. package/src/store/chat/slices/message/actions/publicApi.ts +224 -0
  122. package/src/store/chat/slices/message/actions/query.ts +120 -0
  123. package/src/store/chat/slices/message/actions/runtimeState.ts +108 -0
  124. package/src/store/chat/slices/message/initialState.ts +13 -0
  125. package/src/store/chat/slices/message/reducer.test.ts +48 -370
  126. package/src/store/chat/slices/message/reducer.ts +17 -81
  127. package/src/store/chat/slices/message/selectors/chat.test.ts +13 -50
  128. package/src/store/chat/slices/message/selectors/chat.ts +78 -242
  129. package/src/store/chat/slices/message/selectors/dbMessage.ts +140 -0
  130. package/src/store/chat/slices/message/selectors/displayMessage.ts +301 -0
  131. package/src/store/chat/slices/message/selectors/messageState.ts +5 -2
  132. package/src/store/chat/slices/plugin/action.test.ts +62 -64
  133. package/src/store/chat/slices/plugin/action.ts +34 -28
  134. package/src/store/chat/slices/thread/action.test.ts +28 -31
  135. package/src/store/chat/slices/thread/action.ts +13 -10
  136. package/src/store/chat/slices/thread/selectors/index.ts +8 -6
  137. package/src/store/chat/slices/topic/reducer.ts +11 -3
  138. package/src/store/chat/store.ts +1 -1
  139. package/src/store/user/slices/preference/selectors/labPrefer.ts +0 -3
  140. package/packages/database/src/models/__tests__/message.grouping.test.ts +0 -812
  141. package/packages/database/src/utils/__tests__/groupMessages.test.ts +0 -1132
  142. package/packages/database/src/utils/groupMessages.ts +0 -361
  143. package/packages/utils/src/tokenizer/client.ts +0 -35
  144. package/packages/utils/src/tokenizer/estimated.ts +0 -4
  145. package/packages/utils/src/tokenizer/server.ts +0 -11
  146. package/packages/utils/src/tokenizer/tokenizer.worker.ts +0 -12
  147. package/src/app/(backend)/webapi/tokenizer/index.test.ts +0 -32
  148. package/src/app/(backend)/webapi/tokenizer/route.ts +0 -8
  149. package/src/features/Conversation/Error/InvalidAccessCode.tsx +0 -79
  150. package/src/store/chat/slices/aiChat/actions/__tests__/generateAIChat.test.ts +0 -975
  151. package/src/store/chat/slices/aiChat/actions/__tests__/generateAIChatV2.test.ts +0 -1050
  152. package/src/store/chat/slices/aiChat/actions/generateAIChat.ts +0 -720
  153. package/src/store/chat/slices/aiChat/actions/generateAIChatV2.ts +0 -849
  154. package/src/store/chat/slices/message/action.ts +0 -629
@@ -0,0 +1,481 @@
1
+ {
2
+ "contextTree": [
3
+ {
4
+ "id": "msg_6zcyh1hELkzOmu",
5
+ "type": "message"
6
+ },
7
+ {
8
+ "id": "msg_xXSCL5uzwDANSn",
9
+ "type": "message"
10
+ },
11
+ {
12
+ "id": "msg_HhaoxginXhbfU9",
13
+ "type": "message"
14
+ },
15
+ {
16
+ "activeBranchIndex": 1,
17
+ "branches": [
18
+ [
19
+ {
20
+ "id": "msg_h5nXrbCVGj2uWy",
21
+ "type": "message"
22
+ }
23
+ ],
24
+ [
25
+ {
26
+ "id": "msg_eEAXz3HLKeAmEQ",
27
+ "type": "message"
28
+ },
29
+ {
30
+ "id": "msg_nSG0QuSDSmYlXj",
31
+ "type": "message"
32
+ }
33
+ ],
34
+ [
35
+ {
36
+ "id": "msg_GjcBeBlQ69teA7",
37
+ "type": "message"
38
+ },
39
+ {
40
+ "id": "msg_VMXrVH9hXeCP1R",
41
+ "type": "message"
42
+ }
43
+ ]
44
+ ],
45
+ "id": "branch-msg_HhaoxginXhbfU9-0",
46
+ "parentMessageId": "msg_HhaoxginXhbfU9",
47
+ "type": "branch"
48
+ },
49
+ {
50
+ "id": "msg_wpUElxuYslyASJ",
51
+ "type": "message"
52
+ },
53
+ {
54
+ "id": "msg_LHG8QeuqpcFZml",
55
+ "type": "message"
56
+ },
57
+ {
58
+ "id": "msg_jEKKxHQbz5duC6",
59
+ "type": "message"
60
+ }
61
+ ],
62
+ "flatList": [
63
+ {
64
+ "id": "msg_6zcyh1hELkzOmu",
65
+ "role": "user",
66
+ "content": "你好",
67
+ "createdAt": "2025-11-07T07:19:44.264Z",
68
+ "updatedAt": "2025-11-07T07:19:44.264Z",
69
+ "topicId": "tpc_ruVgxvO16Ljh",
70
+ "chunksList": [],
71
+ "extra": {},
72
+ "fileList": [],
73
+ "imageList": [],
74
+ "meta": {},
75
+ "videoList": []
76
+ },
77
+ {
78
+ "id": "msg_xXSCL5uzwDANSn",
79
+ "role": "assistant",
80
+ "content": "你好!我是您的AI助手,很高兴为您服务!我可以帮您:\n\n🔍 **搜索网络信息** - 查找最新资讯、技术文档、学术资料等\n💻 **搜索GitHub代码** - 查找真实项目中的代码示例和实现模式\n📄 **浏览网页内容** - 获取特定网页的详细信息\n\n请告诉我您需要什么帮助?比如:\n- 想了解某个技术概念或库的使用方法\n- 需要查找最新的新闻或资讯\n- 想看看其他开发者如何实现特定功能\n- 需要获取某个网页的详细内容\n\n我会根据您的需求选择最合适的工具来为您提供帮助!",
81
+ "metadata": {
82
+ "tps": 21.633839199225054,
83
+ "cost": 0.000171,
84
+ "ttft": 1287,
85
+ "latency": 7481,
86
+ "duration": 6194,
87
+ "totalTokens": 3934,
88
+ "inputTextTokens": 3800,
89
+ "outputTextTokens": 134,
90
+ "totalInputTokens": 3800,
91
+ "inputCachedTokens": 3776,
92
+ "totalOutputTokens": 134,
93
+ "inputCacheMissTokens": 24
94
+ },
95
+ "createdAt": "2025-11-07T07:19:44.908Z",
96
+ "updatedAt": "2025-11-07T07:19:53.454Z",
97
+ "topicId": "tpc_ruVgxvO16Ljh",
98
+ "parentId": "msg_6zcyh1hELkzOmu",
99
+ "chunksList": [],
100
+ "extra": {
101
+ "model": "deepseek-chat",
102
+ "provider": "deepseek"
103
+ },
104
+ "fileList": [],
105
+ "imageList": [],
106
+ "meta": {},
107
+ "model": "deepseek-chat",
108
+ "provider": "deepseek",
109
+ "videoList": []
110
+ },
111
+ {
112
+ "id": "msg_HhaoxginXhbfU9",
113
+ "role": "user",
114
+ "content": "你好",
115
+ "metadata": {
116
+ "activeBranchIndex": 1
117
+ },
118
+ "createdAt": "2025-11-07T07:21:05.366Z",
119
+ "updatedAt": "2025-11-07T07:24:17.810Z",
120
+ "topicId": "tpc_ruVgxvO16Ljh",
121
+ "parentId": "msg_xXSCL5uzwDANSn",
122
+ "chunksList": [],
123
+ "extra": {},
124
+ "fileList": [],
125
+ "imageList": [],
126
+ "meta": {},
127
+ "videoList": [],
128
+ "branch": {
129
+ "activeBranchIndex": 1,
130
+ "count": 3
131
+ }
132
+ },
133
+ {
134
+ "id": "msg_eEAXz3HLKeAmEQ",
135
+ "role": "assistant",
136
+ "content": "你好!😊 我是您的AI助手,很高兴再次与您交流!\n\n我可以为您提供多种帮助:\n\n🔍 **网络搜索** - 查找最新资讯、技术文档、学术资料等\n💻 **GitHub代码搜索** - 查找真实项目中的代码示例和实现模式\n📄 **网页内容抓取** - 获取特定网页的详细信息\n\n请告诉我您需要什么帮助?比如:\n- 想了解某个编程概念或库的使用方法\n- 需要查找最新的技术资讯或新闻\n- 想看看其他开发者如何实现特定功能\n- 需要获取某个网页的详细内容\n\n我会根据您的需求选择最合适的工具来为您服务!",
137
+ "metadata": {
138
+ "tps": 23.98775093569241,
139
+ "cost": 0.000179,
140
+ "ttft": 1522,
141
+ "latency": 7400,
142
+ "duration": 5878,
143
+ "totalTokens": 4076,
144
+ "inputTextTokens": 3935,
145
+ "outputTextTokens": 141,
146
+ "totalInputTokens": 3935,
147
+ "inputCachedTokens": 3904,
148
+ "totalOutputTokens": 141,
149
+ "inputCacheMissTokens": 31
150
+ },
151
+ "createdAt": "2025-11-07T07:21:41.587Z",
152
+ "updatedAt": "2025-11-07T07:21:48.866Z",
153
+ "topicId": "tpc_ruVgxvO16Ljh",
154
+ "parentId": "msg_HhaoxginXhbfU9",
155
+ "chunksList": [],
156
+ "extra": {
157
+ "model": "deepseek-chat",
158
+ "provider": "deepseek"
159
+ },
160
+ "fileList": [],
161
+ "imageList": [],
162
+ "meta": {},
163
+ "model": "deepseek-chat",
164
+ "provider": "deepseek",
165
+ "videoList": []
166
+ },
167
+ {
168
+ "id": "msg_nSG0QuSDSmYlXj",
169
+ "role": "user",
170
+ "content": "你好",
171
+ "createdAt": "2025-11-07T07:23:33.255Z",
172
+ "updatedAt": "2025-11-07T07:23:33.255Z",
173
+ "topicId": "tpc_ruVgxvO16Ljh",
174
+ "parentId": "msg_eEAXz3HLKeAmEQ",
175
+ "chunksList": [],
176
+ "extra": {},
177
+ "fileList": [],
178
+ "imageList": [],
179
+ "meta": {},
180
+ "videoList": []
181
+ },
182
+ {
183
+ "id": "msg_wpUElxuYslyASJ",
184
+ "role": "assistant",
185
+ "content": "今天天气怎么样?",
186
+ "createdAt": "2025-11-07T07:24:15.934Z",
187
+ "updatedAt": "2025-11-07T07:24:15.934Z",
188
+ "topicId": "tpc_ruVgxvO16Ljh",
189
+ "chunksList": [],
190
+ "extra": {},
191
+ "fileList": [],
192
+ "imageList": [],
193
+ "meta": {},
194
+ "videoList": []
195
+ },
196
+ {
197
+ "id": "msg_LHG8QeuqpcFZml",
198
+ "role": "user",
199
+ "content": "你好",
200
+ "createdAt": "2025-11-07T07:35:12.401Z",
201
+ "updatedAt": "2025-11-07T07:35:12.401Z",
202
+ "topicId": "tpc_ruVgxvO16Ljh",
203
+ "parentId": "msg_wpUElxuYslyASJ",
204
+ "chunksList": [],
205
+ "extra": {},
206
+ "fileList": [],
207
+ "imageList": [],
208
+ "meta": {},
209
+ "videoList": []
210
+ },
211
+ {
212
+ "id": "msg_jEKKxHQbz5duC6",
213
+ "role": "assistant",
214
+ "content": "...",
215
+ "createdAt": "2025-11-07T07:35:13.056Z",
216
+ "updatedAt": "2025-11-07T07:35:13.056Z",
217
+ "topicId": "tpc_ruVgxvO16Ljh",
218
+ "parentId": "msg_LHG8QeuqpcFZml",
219
+ "chunksList": [],
220
+ "extra": {
221
+ "model": "deepseek-chat",
222
+ "provider": "deepseek"
223
+ },
224
+ "fileList": [],
225
+ "imageList": [],
226
+ "meta": {},
227
+ "model": "deepseek-chat",
228
+ "provider": "deepseek",
229
+ "videoList": []
230
+ }
231
+ ],
232
+ "messageMap": {
233
+ "msg_6zcyh1hELkzOmu": {
234
+ "id": "msg_6zcyh1hELkzOmu",
235
+ "role": "user",
236
+ "content": "你好",
237
+ "createdAt": "2025-11-07T07:19:44.264Z",
238
+ "updatedAt": "2025-11-07T07:19:44.264Z",
239
+ "topicId": "tpc_ruVgxvO16Ljh",
240
+ "chunksList": [],
241
+ "extra": {},
242
+ "fileList": [],
243
+ "imageList": [],
244
+ "meta": {},
245
+ "videoList": []
246
+ },
247
+ "msg_xXSCL5uzwDANSn": {
248
+ "id": "msg_xXSCL5uzwDANSn",
249
+ "role": "assistant",
250
+ "content": "你好!我是您的AI助手,很高兴为您服务!我可以帮您:\n\n🔍 **搜索网络信息** - 查找最新资讯、技术文档、学术资料等\n💻 **搜索GitHub代码** - 查找真实项目中的代码示例和实现模式\n📄 **浏览网页内容** - 获取特定网页的详细信息\n\n请告诉我您需要什么帮助?比如:\n- 想了解某个技术概念或库的使用方法\n- 需要查找最新的新闻或资讯\n- 想看看其他开发者如何实现特定功能\n- 需要获取某个网页的详细内容\n\n我会根据您的需求选择最合适的工具来为您提供帮助!",
251
+ "metadata": {
252
+ "tps": 21.633839199225054,
253
+ "cost": 0.000171,
254
+ "ttft": 1287,
255
+ "latency": 7481,
256
+ "duration": 6194,
257
+ "totalTokens": 3934,
258
+ "inputTextTokens": 3800,
259
+ "outputTextTokens": 134,
260
+ "totalInputTokens": 3800,
261
+ "inputCachedTokens": 3776,
262
+ "totalOutputTokens": 134,
263
+ "inputCacheMissTokens": 24
264
+ },
265
+ "createdAt": "2025-11-07T07:19:44.908Z",
266
+ "updatedAt": "2025-11-07T07:19:53.454Z",
267
+ "topicId": "tpc_ruVgxvO16Ljh",
268
+ "parentId": "msg_6zcyh1hELkzOmu",
269
+ "chunksList": [],
270
+ "extra": {
271
+ "model": "deepseek-chat",
272
+ "provider": "deepseek"
273
+ },
274
+ "fileList": [],
275
+ "imageList": [],
276
+ "meta": {},
277
+ "model": "deepseek-chat",
278
+ "provider": "deepseek",
279
+ "videoList": []
280
+ },
281
+ "msg_HhaoxginXhbfU9": {
282
+ "id": "msg_HhaoxginXhbfU9",
283
+ "role": "user",
284
+ "content": "你好",
285
+ "metadata": {
286
+ "activeBranchIndex": 1
287
+ },
288
+ "createdAt": "2025-11-07T07:21:05.366Z",
289
+ "updatedAt": "2025-11-07T07:24:17.810Z",
290
+ "topicId": "tpc_ruVgxvO16Ljh",
291
+ "parentId": "msg_xXSCL5uzwDANSn",
292
+ "chunksList": [],
293
+ "extra": {},
294
+ "fileList": [],
295
+ "imageList": [],
296
+ "meta": {},
297
+ "videoList": []
298
+ },
299
+ "msg_h5nXrbCVGj2uWy": {
300
+ "id": "msg_h5nXrbCVGj2uWy",
301
+ "role": "assistant",
302
+ "content": "你好!很高兴再次与您交流!😊\n\n我是您的AI助手,可以为您提供多种帮助:\n\n**我能做什么:**\n- 🔍 **网络搜索** - 查找最新资讯、技术文档、学术资料等\n- 💻 **GitHub代码搜索** - 查找真实项目中的代码示例和最佳实践\n- 📄 **网页内容获取** - 提取特定网页的详细信息\n\n**例如您可以问我:**\n- \"帮我搜索一下React Hooks的最佳实践\"\n- \"查找Python中如何处理异常的真实代码示例\"\n- \"获取某个技术博客的最新文章内容\"\n- \"了解当前热门的技术趋势\"\n\n请告诉我您今天需要什么帮助?我会根据您的具体需求选择最合适的工具来为您服务!",
303
+ "metadata": {
304
+ "tps": 20.645337708504236,
305
+ "cost": 0.000216,
306
+ "ttft": 1524,
307
+ "latency": 8838,
308
+ "duration": 7314,
309
+ "totalTokens": 4086,
310
+ "inputTextTokens": 3935,
311
+ "outputTextTokens": 151,
312
+ "totalInputTokens": 3935,
313
+ "inputCachedTokens": 3776,
314
+ "totalOutputTokens": 151,
315
+ "inputCacheMissTokens": 159
316
+ },
317
+ "createdAt": "2025-11-07T07:21:11.767Z",
318
+ "updatedAt": "2025-11-07T07:21:20.560Z",
319
+ "topicId": "tpc_ruVgxvO16Ljh",
320
+ "parentId": "msg_HhaoxginXhbfU9",
321
+ "chunksList": [],
322
+ "extra": {
323
+ "model": "deepseek-chat",
324
+ "provider": "deepseek"
325
+ },
326
+ "fileList": [],
327
+ "imageList": [],
328
+ "meta": {},
329
+ "model": "deepseek-chat",
330
+ "provider": "deepseek",
331
+ "videoList": []
332
+ },
333
+ "msg_eEAXz3HLKeAmEQ": {
334
+ "id": "msg_eEAXz3HLKeAmEQ",
335
+ "role": "assistant",
336
+ "content": "你好!😊 我是您的AI助手,很高兴再次与您交流!\n\n我可以为您提供多种帮助:\n\n🔍 **网络搜索** - 查找最新资讯、技术文档、学术资料等\n💻 **GitHub代码搜索** - 查找真实项目中的代码示例和实现模式\n📄 **网页内容抓取** - 获取特定网页的详细信息\n\n请告诉我您需要什么帮助?比如:\n- 想了解某个编程概念或库的使用方法\n- 需要查找最新的技术资讯或新闻\n- 想看看其他开发者如何实现特定功能\n- 需要获取某个网页的详细内容\n\n我会根据您的需求选择最合适的工具来为您服务!",
337
+ "metadata": {
338
+ "tps": 23.98775093569241,
339
+ "cost": 0.000179,
340
+ "ttft": 1522,
341
+ "latency": 7400,
342
+ "duration": 5878,
343
+ "totalTokens": 4076,
344
+ "inputTextTokens": 3935,
345
+ "outputTextTokens": 141,
346
+ "totalInputTokens": 3935,
347
+ "inputCachedTokens": 3904,
348
+ "totalOutputTokens": 141,
349
+ "inputCacheMissTokens": 31
350
+ },
351
+ "createdAt": "2025-11-07T07:21:41.587Z",
352
+ "updatedAt": "2025-11-07T07:21:48.866Z",
353
+ "topicId": "tpc_ruVgxvO16Ljh",
354
+ "parentId": "msg_HhaoxginXhbfU9",
355
+ "chunksList": [],
356
+ "extra": {
357
+ "model": "deepseek-chat",
358
+ "provider": "deepseek"
359
+ },
360
+ "fileList": [],
361
+ "imageList": [],
362
+ "meta": {},
363
+ "model": "deepseek-chat",
364
+ "provider": "deepseek",
365
+ "videoList": []
366
+ },
367
+ "msg_GjcBeBlQ69teA7": {
368
+ "id": "msg_GjcBeBlQ69teA7",
369
+ "role": "assistant",
370
+ "content": "你好!我是您的AI助手,很高兴为您服务!\n\n我可以为您提供以下帮助:\n\n🔍 **网络搜索** - 查找最新的新闻、技术文档、学术资料等\n💻 **GitHub代码搜索** - 查找真实项目中的代码示例和最佳实践\n📄 **网页内容获取** - 获取特定网页的详细信息\n\n请告诉我您需要什么帮助?比如:\n- 想了解某个技术概念或库的使用方法\n- 需要查找最新的新闻或资讯\n- 想看看其他开发者如何实现特定功能\n- 需要获取某个网页的详细内容\n\n我会根据您的需求选择最合适的工具来为您提供帮助!",
371
+ "metadata": {
372
+ "tps": 23.99573409171703,
373
+ "cost": 0.000176,
374
+ "ttft": 1194,
375
+ "latency": 6820,
376
+ "duration": 5626,
377
+ "totalTokens": 4070,
378
+ "inputTextTokens": 3935,
379
+ "outputTextTokens": 135,
380
+ "totalInputTokens": 3935,
381
+ "inputCachedTokens": 3904,
382
+ "totalOutputTokens": 135,
383
+ "inputCacheMissTokens": 31
384
+ },
385
+ "createdAt": "2025-11-07T07:22:25.223Z",
386
+ "updatedAt": "2025-11-07T07:22:32.162Z",
387
+ "topicId": "tpc_ruVgxvO16Ljh",
388
+ "parentId": "msg_HhaoxginXhbfU9",
389
+ "chunksList": [],
390
+ "extra": {
391
+ "model": "deepseek-chat",
392
+ "provider": "deepseek"
393
+ },
394
+ "fileList": [],
395
+ "imageList": [],
396
+ "meta": {},
397
+ "model": "deepseek-chat",
398
+ "provider": "deepseek",
399
+ "videoList": []
400
+ },
401
+ "msg_nSG0QuSDSmYlXj": {
402
+ "id": "msg_nSG0QuSDSmYlXj",
403
+ "role": "user",
404
+ "content": "你好",
405
+ "createdAt": "2025-11-07T07:23:33.255Z",
406
+ "updatedAt": "2025-11-07T07:23:33.255Z",
407
+ "topicId": "tpc_ruVgxvO16Ljh",
408
+ "parentId": "msg_eEAXz3HLKeAmEQ",
409
+ "chunksList": [],
410
+ "extra": {},
411
+ "fileList": [],
412
+ "imageList": [],
413
+ "meta": {},
414
+ "videoList": []
415
+ },
416
+ "msg_VMXrVH9hXeCP1R": {
417
+ "id": "msg_VMXrVH9hXeCP1R",
418
+ "role": "user",
419
+ "content": "你是谁?",
420
+ "createdAt": "2025-11-07T07:23:49.990Z",
421
+ "updatedAt": "2025-11-07T07:23:49.990Z",
422
+ "topicId": "tpc_ruVgxvO16Ljh",
423
+ "parentId": "msg_GjcBeBlQ69teA7",
424
+ "chunksList": [],
425
+ "extra": {},
426
+ "fileList": [],
427
+ "imageList": [],
428
+ "meta": {},
429
+ "videoList": []
430
+ },
431
+ "msg_wpUElxuYslyASJ": {
432
+ "id": "msg_wpUElxuYslyASJ",
433
+ "role": "assistant",
434
+ "content": "今天天气怎么样?",
435
+ "createdAt": "2025-11-07T07:24:15.934Z",
436
+ "updatedAt": "2025-11-07T07:24:15.934Z",
437
+ "topicId": "tpc_ruVgxvO16Ljh",
438
+ "chunksList": [],
439
+ "extra": {},
440
+ "fileList": [],
441
+ "imageList": [],
442
+ "meta": {},
443
+ "videoList": []
444
+ },
445
+ "msg_LHG8QeuqpcFZml": {
446
+ "id": "msg_LHG8QeuqpcFZml",
447
+ "role": "user",
448
+ "content": "你好",
449
+ "createdAt": "2025-11-07T07:35:12.401Z",
450
+ "updatedAt": "2025-11-07T07:35:12.401Z",
451
+ "topicId": "tpc_ruVgxvO16Ljh",
452
+ "parentId": "msg_wpUElxuYslyASJ",
453
+ "chunksList": [],
454
+ "extra": {},
455
+ "fileList": [],
456
+ "imageList": [],
457
+ "meta": {},
458
+ "videoList": []
459
+ },
460
+ "msg_jEKKxHQbz5duC6": {
461
+ "id": "msg_jEKKxHQbz5duC6",
462
+ "role": "assistant",
463
+ "content": "...",
464
+ "createdAt": "2025-11-07T07:35:13.056Z",
465
+ "updatedAt": "2025-11-07T07:35:13.056Z",
466
+ "topicId": "tpc_ruVgxvO16Ljh",
467
+ "parentId": "msg_LHG8QeuqpcFZml",
468
+ "chunksList": [],
469
+ "extra": {
470
+ "model": "deepseek-chat",
471
+ "provider": "deepseek"
472
+ },
473
+ "fileList": [],
474
+ "imageList": [],
475
+ "meta": {},
476
+ "model": "deepseek-chat",
477
+ "provider": "deepseek",
478
+ "videoList": []
479
+ }
480
+ }
481
+ }
@@ -63,7 +63,11 @@
63
63
  "parentId": null,
64
64
  "createdAt": 1704067200000,
65
65
  "updatedAt": 1704067200000,
66
- "meta": {}
66
+ "meta": {},
67
+ "branch": {
68
+ "activeBranchIndex": 0,
69
+ "count": 3
70
+ }
67
71
  },
68
72
  {
69
73
  "id": "msg-202",
@@ -1,14 +1,18 @@
1
1
  import type { SerializedParseResult } from '../..';
2
2
  import activeIndex1 from './active-index-1.json';
3
3
  import assistantBranch from './assistant-branch.json';
4
+ import assistantGroupBranches from './assistant-group-branches.json';
4
5
  import assistantUserBranch from './assistant-user-branch.json';
5
6
  import conversation from './conversation.json';
7
+ import multiAssistantGroup from './multi-assistant-group.json';
6
8
  import nested from './nested.json';
7
9
 
8
10
  export const branch = {
9
11
  activeIndex1: activeIndex1 as unknown as SerializedParseResult,
10
12
  assistantBranch: assistantBranch as unknown as SerializedParseResult,
13
+ assistantGroupBranches: assistantGroupBranches as unknown as SerializedParseResult,
11
14
  assistantUserBranch: assistantUserBranch as unknown as SerializedParseResult,
12
15
  conversation: conversation as unknown as SerializedParseResult,
16
+ multiAssistantGroup: multiAssistantGroup as unknown as SerializedParseResult,
13
17
  nested: nested as unknown as SerializedParseResult,
14
18
  };