@lobehub/lobehub 2.0.0-next.95 → 2.0.0-next.97

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 (267) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/apps/desktop/src/preload/index.ts +2 -2
  3. package/apps/desktop/src/preload/invoke.ts +1 -1
  4. package/apps/desktop/src/preload/routeInterceptor.ts +41 -41
  5. package/changelog/v1.json +18 -0
  6. package/locales/ar/common.json +21 -0
  7. package/locales/ar/hotkey.json +4 -0
  8. package/locales/ar/models.json +6 -0
  9. package/locales/bg-BG/common.json +21 -0
  10. package/locales/bg-BG/hotkey.json +4 -0
  11. package/locales/bg-BG/models.json +6 -0
  12. package/locales/de-DE/common.json +21 -0
  13. package/locales/de-DE/hotkey.json +4 -0
  14. package/locales/de-DE/models.json +6 -0
  15. package/locales/en-US/common.json +21 -0
  16. package/locales/en-US/hotkey.json +4 -0
  17. package/locales/en-US/models.json +6 -0
  18. package/locales/es-ES/common.json +21 -0
  19. package/locales/es-ES/hotkey.json +4 -0
  20. package/locales/es-ES/models.json +6 -0
  21. package/locales/fa-IR/common.json +21 -0
  22. package/locales/fa-IR/hotkey.json +4 -0
  23. package/locales/fa-IR/models.json +6 -0
  24. package/locales/fr-FR/common.json +21 -0
  25. package/locales/fr-FR/hotkey.json +4 -0
  26. package/locales/fr-FR/models.json +6 -0
  27. package/locales/it-IT/common.json +21 -0
  28. package/locales/it-IT/hotkey.json +4 -0
  29. package/locales/it-IT/models.json +6 -0
  30. package/locales/ja-JP/common.json +21 -0
  31. package/locales/ja-JP/hotkey.json +4 -0
  32. package/locales/ja-JP/models.json +6 -0
  33. package/locales/ko-KR/common.json +21 -0
  34. package/locales/ko-KR/hotkey.json +4 -0
  35. package/locales/ko-KR/models.json +6 -0
  36. package/locales/nl-NL/common.json +21 -0
  37. package/locales/nl-NL/hotkey.json +4 -0
  38. package/locales/nl-NL/models.json +6 -0
  39. package/locales/pl-PL/common.json +21 -0
  40. package/locales/pl-PL/hotkey.json +4 -0
  41. package/locales/pl-PL/models.json +6 -0
  42. package/locales/pt-BR/common.json +21 -0
  43. package/locales/pt-BR/hotkey.json +4 -0
  44. package/locales/pt-BR/models.json +6 -0
  45. package/locales/ru-RU/common.json +21 -0
  46. package/locales/ru-RU/hotkey.json +4 -0
  47. package/locales/ru-RU/models.json +6 -0
  48. package/locales/tr-TR/common.json +21 -0
  49. package/locales/tr-TR/hotkey.json +4 -0
  50. package/locales/tr-TR/models.json +6 -0
  51. package/locales/vi-VN/common.json +21 -0
  52. package/locales/vi-VN/hotkey.json +4 -0
  53. package/locales/vi-VN/models.json +6 -0
  54. package/locales/zh-CN/common.json +21 -0
  55. package/locales/zh-CN/hotkey.json +4 -0
  56. package/locales/zh-CN/models.json +6 -0
  57. package/locales/zh-TW/common.json +21 -0
  58. package/locales/zh-TW/hotkey.json +4 -0
  59. package/locales/zh-TW/models.json +6 -0
  60. package/package.json +3 -1
  61. package/packages/const/src/hotkeys.ts +6 -0
  62. package/packages/conversation-flow/src/__tests__/indexing.test.ts +513 -0
  63. package/packages/conversation-flow/src/__tests__/structuring.test.ts +600 -0
  64. package/packages/database/src/client/db.ts +12 -12
  65. package/packages/database/src/repositories/dataImporter/index.ts +10 -10
  66. package/packages/database/src/schemas/topic.ts +1 -1
  67. package/packages/database/src/server/models/ragEval/evaluation.ts +1 -1
  68. package/packages/types/src/hotkey.ts +1 -0
  69. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/Desktop/ClassicChat.tsx +1 -1
  70. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/Desktop/GroupChat.tsx +1 -1
  71. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/ChatItem/index.tsx +1 -1
  72. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/Content.tsx +2 -2
  73. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/index.tsx +1 -1
  74. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatMinimap/index.tsx +1 -1
  75. package/src/app/[variants]/(main)/settings/_layout/Desktop/index.tsx +41 -8
  76. package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/Card.tsx +6 -4
  77. package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/index.tsx +16 -4
  78. package/src/app/[variants]/(main)/settings/provider/(list)/index.tsx +15 -3
  79. package/src/app/[variants]/(main)/settings/provider/detail/index.tsx +23 -15
  80. package/src/components/InvalidAPIKey/APIKeyForm/Bedrock.tsx +1 -1
  81. package/src/components/InvalidAPIKey/APIKeyForm/ComfyUIForm.tsx +1 -1
  82. package/src/components/InvalidAPIKey/APIKeyForm/ProviderApiKeyForm.tsx +1 -1
  83. package/src/components/InvalidAPIKey/APIKeyForm/__tests__/ComfyUIForm.test.tsx +1 -1
  84. package/src/components/InvalidAPIKey/index.tsx +1 -1
  85. package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/getNodeContent.test.ts +1 -2
  86. package/src/features/{Conversation → ChatList}/Messages/Assistant/Actions/index.tsx +2 -2
  87. package/src/features/{Conversation → ChatList}/Messages/Assistant/Extra/index.test.tsx +3 -3
  88. package/src/features/{Conversation → ChatList}/Messages/Assistant/Extra/index.tsx +6 -5
  89. package/src/features/{Conversation → ChatList}/Messages/Assistant/MessageContent.tsx +1 -1
  90. package/src/features/{Conversation → ChatList}/Messages/Group/Actions/WithContentId.tsx +2 -2
  91. package/src/features/{Conversation → ChatList}/Messages/Group/ContentBlock.tsx +2 -2
  92. package/src/features/{Conversation → ChatList}/Messages/Group/Error/index.tsx +2 -1
  93. package/src/features/{Conversation → ChatList}/Messages/Group/Group.tsx +1 -1
  94. package/src/features/{Conversation → ChatList}/Messages/Group/GroupItem.tsx +3 -2
  95. package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/ApprovalActions.tsx +1 -1
  96. package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/index.tsx +1 -2
  97. package/src/features/{Conversation → ChatList}/Messages/Group/index.tsx +1 -1
  98. package/src/features/{Conversation → ChatList}/Messages/User/Extra.tsx +3 -3
  99. package/src/features/{Conversation → ChatList}/Messages/User/index.tsx +1 -1
  100. package/src/features/{Conversation → ChatList}/Messages/index.tsx +1 -1
  101. package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/Preview.tsx +1 -1
  102. package/src/features/{Conversation → ChatList}/components/SkeletonList.tsx +1 -1
  103. package/src/features/{Conversation → ChatList}/components/VirtualizedList/index.tsx +1 -1
  104. package/src/features/OllamaSetupGuide/index.tsx +1 -1
  105. package/src/features/PluginsUI/Render/MCPType/index.tsx +1 -1
  106. package/src/features/Portal/GroupThread/Body/ThreadChatItem.tsx +1 -1
  107. package/src/features/Portal/GroupThread/Body/ThreadChatList.tsx +1 -1
  108. package/src/features/Portal/Thread/Chat/ChatInput/index.tsx +1 -1
  109. package/src/features/Portal/Thread/Chat/ChatItem.tsx +1 -1
  110. package/src/features/Portal/Thread/Chat/ChatList.tsx +1 -1
  111. package/src/features/Portal/Thread/Chat/index.tsx +1 -1
  112. package/src/features/ShareModal/ShareImage/ChatList/index.tsx +1 -1
  113. package/src/layout/GlobalProvider/Cmdk.tsx +470 -0
  114. package/src/layout/GlobalProvider/CmdkLazy.tsx +17 -0
  115. package/src/layout/GlobalProvider/index.tsx +2 -0
  116. package/src/locales/default/common.ts +21 -0
  117. package/src/locales/default/hotkey.ts +4 -0
  118. package/src/services/debug.ts +4 -4
  119. package/src/services/electron/remoteServer.ts +5 -5
  120. package/src/services/electron/settings.ts +6 -6
  121. package/src/services/mcp.ts +18 -18
  122. package/src/services/models.ts +20 -20
  123. /package/src/features/{Conversation → ChatList}/Error/AccessCodeForm.tsx +0 -0
  124. /package/src/features/{Conversation → ChatList}/Error/ChatInvalidApiKey.tsx +0 -0
  125. /package/src/features/{Conversation → ChatList}/Error/ClerkLogin/index.tsx +0 -0
  126. /package/src/features/{Conversation → ChatList}/Error/ErrorJsonViewer.tsx +0 -0
  127. /package/src/features/{Conversation → ChatList}/Error/OAuthForm.tsx +0 -0
  128. /package/src/features/{Conversation → ChatList}/Error/OllamaBizError/InvalidOllamaModel.tsx +0 -0
  129. /package/src/features/{Conversation → ChatList}/Error/OllamaBizError/index.tsx +0 -0
  130. /package/src/features/{Conversation → ChatList}/Error/index.tsx +0 -0
  131. /package/src/features/{Conversation → ChatList}/Error/style.tsx +0 -0
  132. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/Render/Icon.tsx +0 -0
  133. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/Render/index.tsx +0 -0
  134. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/index.ts +0 -0
  135. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/rehypePlugin.test.ts +0 -0
  136. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/rehypePlugin.ts +0 -0
  137. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeThinking/Render.tsx +0 -0
  138. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeThinking/index.ts +0 -0
  139. /package/src/features/{Conversation → ChatList}/MarkdownElements/LocalFile/Render/index.tsx +0 -0
  140. /package/src/features/{Conversation → ChatList}/MarkdownElements/LocalFile/index.ts +0 -0
  141. /package/src/features/{Conversation → ChatList}/MarkdownElements/Mention/Render.tsx +0 -0
  142. /package/src/features/{Conversation → ChatList}/MarkdownElements/Mention/index.ts +0 -0
  143. /package/src/features/{Conversation → ChatList}/MarkdownElements/Thinking/Render.tsx +0 -0
  144. /package/src/features/{Conversation → ChatList}/MarkdownElements/Thinking/index.ts +0 -0
  145. /package/src/features/{Conversation → ChatList}/MarkdownElements/index.ts +0 -0
  146. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/__snapshots__/createRemarkSelfClosingTagPlugin.test.ts.snap +0 -0
  147. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkCustomTagPlugin.ts +0 -0
  148. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkCustomTagWithAttributesPlugin.ts +0 -0
  149. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkSelfClosingTagPlugin.test.ts +0 -0
  150. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkSelfClosingTagPlugin.ts +0 -0
  151. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/getNodeContent.ts +0 -0
  152. /package/src/features/{Conversation → ChatList}/MarkdownElements/type.ts +0 -0
  153. /package/src/features/{Conversation → ChatList}/MarkdownElements/utils.ts +0 -0
  154. /package/src/features/{Conversation → ChatList}/Messages/Assistant/Actions/Error.tsx +0 -0
  155. /package/src/features/{Conversation → ChatList}/Messages/Assistant/CollapsedMessage.tsx +0 -0
  156. /package/src/features/{Conversation → ChatList}/Messages/Assistant/FileChunks/Item/index.tsx +0 -0
  157. /package/src/features/{Conversation → ChatList}/Messages/Assistant/FileChunks/Item/style.ts +0 -0
  158. /package/src/features/{Conversation → ChatList}/Messages/Assistant/FileChunks/index.tsx +0 -0
  159. /package/src/features/{Conversation → ChatList}/Messages/Assistant/IntentUnderstanding.tsx +0 -0
  160. /package/src/features/{Conversation → ChatList}/Messages/Assistant/Reasoning/index.tsx +0 -0
  161. /package/src/features/{Conversation → ChatList}/Messages/Assistant/SearchGrounding.tsx +0 -0
  162. /package/src/features/{Conversation → ChatList}/Messages/Assistant/index.tsx +0 -0
  163. /package/src/features/{Conversation → ChatList}/Messages/Default.tsx +0 -0
  164. /package/src/features/{Conversation → ChatList}/Messages/Group/Actions/WithoutContentId.tsx +0 -0
  165. /package/src/features/{Conversation → ChatList}/Messages/Group/Actions/index.tsx +0 -0
  166. /package/src/features/{Conversation → ChatList}/Messages/Group/CollapsedMessage.tsx +0 -0
  167. /package/src/features/{Conversation → ChatList}/Messages/Group/EditState.tsx +0 -0
  168. /package/src/features/{Conversation → ChatList}/Messages/Group/GroupContext.ts +0 -0
  169. /package/src/features/{Conversation → ChatList}/Messages/Group/MessageContent.tsx +0 -0
  170. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/BuiltinPluginTitle.tsx +0 -0
  171. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/Debug.tsx +0 -0
  172. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/PluginResult.tsx +0 -0
  173. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/PluginState.tsx +0 -0
  174. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/Settings.tsx +0 -0
  175. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/StatusIndicator.tsx +0 -0
  176. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/ToolTitle.tsx +0 -0
  177. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/index.tsx +0 -0
  178. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/AbortResponse.tsx +0 -0
  179. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Arguments/ObjectEntity.tsx +0 -0
  180. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Arguments/ValueCell.tsx +0 -0
  181. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Arguments/index.tsx +0 -0
  182. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/CustomRender.tsx +0 -0
  183. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/ErrorResponse.tsx +0 -0
  184. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/Fallback.tsx +0 -0
  185. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/KeyValueEditor.tsx +0 -0
  186. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/ModeSelector.tsx +0 -0
  187. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/index.tsx +0 -0
  188. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/LoadingPlaceholder/index.tsx +0 -0
  189. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/PluginSettings.tsx +0 -0
  190. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/RejectedResponse.tsx +0 -0
  191. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/index.tsx +0 -0
  192. /package/src/features/{Conversation → ChatList}/Messages/Group/Tools.tsx +0 -0
  193. /package/src/features/{Conversation → ChatList}/Messages/Supervisor/TodoList.tsx +0 -0
  194. /package/src/features/{Conversation → ChatList}/Messages/Supervisor/index.tsx +0 -0
  195. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/BuiltinPluginTitle.tsx +0 -0
  196. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/Debug.tsx +0 -0
  197. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/PluginResult.tsx +0 -0
  198. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/PluginState.tsx +0 -0
  199. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/Settings.tsx +0 -0
  200. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/ToolTitle.tsx +0 -0
  201. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/index.tsx +0 -0
  202. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/Arguments/ObjectEntity.tsx +0 -0
  203. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/Arguments/ValueCell.tsx +0 -0
  204. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/Arguments/index.tsx +0 -0
  205. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/CustomRender.tsx +0 -0
  206. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/ErrorResponse.tsx +0 -0
  207. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/KeyValueEditor.tsx +0 -0
  208. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/PluginSettings.tsx +0 -0
  209. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/index.tsx +0 -0
  210. /package/src/features/{Conversation → ChatList}/Messages/Tool/ToolItem.tsx +0 -0
  211. /package/src/features/{Conversation → ChatList}/Messages/Tool/index.tsx +0 -0
  212. /package/src/features/{Conversation → ChatList}/Messages/User/Actions/ActionsBar.tsx +0 -0
  213. /package/src/features/{Conversation → ChatList}/Messages/User/Actions/MessageBranch.tsx +0 -0
  214. /package/src/features/{Conversation → ChatList}/Messages/User/Actions/index.tsx +0 -0
  215. /package/src/features/{Conversation → ChatList}/Messages/User/BelowMessage.tsx +0 -0
  216. /package/src/features/{Conversation → ChatList}/Messages/User/FileListViewer/Item.tsx +0 -0
  217. /package/src/features/{Conversation → ChatList}/Messages/User/FileListViewer/index.tsx +0 -0
  218. /package/src/features/{Conversation → ChatList}/Messages/User/ImageFileListViewer.tsx +0 -0
  219. /package/src/features/{Conversation → ChatList}/Messages/User/MarkdownRender/ContentPreview.tsx +0 -0
  220. /package/src/features/{Conversation → ChatList}/Messages/User/MarkdownRender/index.tsx +0 -0
  221. /package/src/features/{Conversation → ChatList}/Messages/User/MessageContent.tsx +0 -0
  222. /package/src/features/{Conversation → ChatList}/Messages/User/VideoFileListViewer.tsx +0 -0
  223. /package/src/features/{Conversation → ChatList}/components/AutoScroll.tsx +0 -0
  224. /package/src/features/{Conversation → ChatList}/components/BackBottom/index.tsx +0 -0
  225. /package/src/features/{Conversation → ChatList}/components/BackBottom/style.ts +0 -0
  226. /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/PdfPreview.tsx +0 -0
  227. /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/index.tsx +0 -0
  228. /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/style.ts +0 -0
  229. /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/template.ts +0 -0
  230. /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/usePdfGeneration.ts +0 -0
  231. /package/src/features/{Conversation → ChatList}/components/Extras/ExtraContainer.tsx +0 -0
  232. /package/src/features/{Conversation → ChatList}/components/Extras/TTS/FilePlayer.tsx +0 -0
  233. /package/src/features/{Conversation → ChatList}/components/Extras/TTS/InitPlayer.tsx +0 -0
  234. /package/src/features/{Conversation → ChatList}/components/Extras/TTS/Player.tsx +0 -0
  235. /package/src/features/{Conversation → ChatList}/components/Extras/TTS/index.tsx +0 -0
  236. /package/src/features/{Conversation → ChatList}/components/Extras/Translate.tsx +0 -0
  237. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/AnimatedNumber.tsx +0 -0
  238. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/ModelCard.tsx +0 -0
  239. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/TokenProgress.tsx +0 -0
  240. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/index.tsx +0 -0
  241. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/pricing.ts +0 -0
  242. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/tokens.test.ts +0 -0
  243. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/tokens.ts +0 -0
  244. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/index.tsx +0 -0
  245. /package/src/features/{Conversation → ChatList}/components/History/HistoryDivider.tsx +0 -0
  246. /package/src/features/{Conversation → ChatList}/components/History/index.tsx +0 -0
  247. /package/src/features/{Conversation → ChatList}/components/OTPInput.tsx +0 -0
  248. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/index.tsx +0 -0
  249. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/style.ts +0 -0
  250. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/type.ts +0 -0
  251. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/Preview.tsx +0 -0
  252. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/index.tsx +0 -0
  253. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/template.test.ts +0 -0
  254. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/template.ts +0 -0
  255. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/type.ts +0 -0
  256. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/index.tsx +0 -0
  257. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/style.ts +0 -0
  258. /package/src/features/{Conversation → ChatList}/components/ThreadDivider/index.tsx +0 -0
  259. /package/src/features/{Conversation → ChatList}/components/VirtualizedList/VirtuosoContext.ts +0 -0
  260. /package/src/features/{Conversation → ChatList}/components/WideScreenContainer/index.tsx +0 -0
  261. /package/src/features/{Conversation → ChatList}/context/InPortalThreadContext.ts +0 -0
  262. /package/src/features/{Conversation → ChatList}/hooks/useChatListActionsBar.tsx +0 -0
  263. /package/src/features/{Conversation → ChatList}/hooks/useDoubleClickEdit.ts +0 -0
  264. /package/src/features/{Conversation → ChatList}/index.ts +0 -0
  265. /package/src/features/{Conversation → ChatList}/types/index.ts +0 -0
  266. /package/src/features/{Conversation → ChatList}/utils/markdown.test.ts +0 -0
  267. /package/src/features/{Conversation → ChatList}/utils/markdown.ts +0 -0
@@ -17,39 +17,39 @@ interface ImportResult {
17
17
  type ConflictStrategy = 'skip' | 'override' | 'merge';
18
18
 
19
19
  interface TableImportConfig {
20
- // 冲突处理策略
20
+ // Conflict resolution strategy
21
21
  conflictStrategy?: ConflictStrategy;
22
- // 字段处理函数
22
+ // Field processing functions
23
23
  fieldProcessors?: {
24
24
  [field: string]: (value: any) => any;
25
25
  };
26
- // 是否使用复合主键(没有单独的id字段)
26
+ // Whether to use composite key (no separate id field)
27
27
  isCompositeKey?: boolean;
28
- // 是否保留原始ID
28
+ // Whether to preserve original ID
29
29
  preserveId?: boolean;
30
- // 关系字段定义
30
+ // Relation field definitions
31
31
  relations?: {
32
32
  field: string;
33
33
  sourceField?: string;
34
34
  sourceTable: string;
35
35
  }[];
36
- // 自引用字段
36
+ // Self-reference fields
37
37
  selfReferences?: {
38
38
  field: string;
39
39
  sourceField?: string;
40
40
  }[];
41
- // 表名
41
+ // Table name
42
42
  table: string;
43
- // 唯一约束字段
43
+ // Unique constraint fields
44
44
  uniqueConstraints?: string[];
45
45
  }
46
46
 
47
- // 导入表配置
47
+ // Import table configuration
48
48
  const IMPORT_TABLE_CONFIG: TableImportConfig[] = [
49
49
  {
50
50
  conflictStrategy: 'merge',
51
51
  preserveId: true,
52
- // 特殊表,ID与用户ID相同
52
+ // Special table, ID same as user ID
53
53
  table: 'userSettings',
54
54
  uniqueConstraints: ['id'],
55
55
  },
@@ -77,7 +77,7 @@ export type ThreadItem = typeof threads.$inferSelect;
77
77
  export const insertThreadSchema = createInsertSchema(threads);
78
78
 
79
79
  /**
80
- * 文档与话题关联表 - 实现文档和话题的多对多关系
80
+ * Document-Topic association table - Implements many-to-many relationship between documents and topics
81
81
  */
82
82
  export const topicDocuments = pgTable(
83
83
  'topic_documents',
@@ -56,7 +56,7 @@ export class EvalEvaluationModel {
56
56
  ),
57
57
  );
58
58
 
59
- // 然后查询每个评估的记录统计
59
+ // Then query record statistics for each evaluation
60
60
  const evaluationIds = evaluations.map((evals) => evals.id);
61
61
 
62
62
  const recordStats = await this.db
@@ -60,6 +60,7 @@ export const KeyEnum = {
60
60
  export const HotkeyEnum = {
61
61
  AddUserMessage: 'addUserMessage',
62
62
  ClearCurrentMessages: 'clearCurrentMessages',
63
+ CommandPalette: 'commandPalette',
63
64
  DeleteAndRegenerateMessage: 'deleteAndRegenerateMessage',
64
65
  DeleteLastMessage: 'deleteLastMessage',
65
66
  EditMessage: 'editMessage',
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
6
6
  import { Flexbox } from 'react-layout-kit';
7
7
 
8
8
  import { type ActionKeys, ChatInputProvider, DesktopChatInput } from '@/features/ChatInput';
9
- import WideScreenContainer from '@/features/Conversation/components/WideScreenContainer';
9
+ import WideScreenContainer from '@/features/ChatList/components/WideScreenContainer';
10
10
  import { useChatStore } from '@/store/chat';
11
11
  import { aiChatSelectors } from '@/store/chat/selectors';
12
12
 
@@ -9,7 +9,7 @@ import { Flexbox } from 'react-layout-kit';
9
9
 
10
10
  import { DEFAULT_AVATAR } from '@/const/meta';
11
11
  import { type ActionKeys, ChatInputProvider, DesktopChatInput } from '@/features/ChatInput';
12
- import WideScreenContainer from '@/features/Conversation/components/WideScreenContainer';
12
+ import WideScreenContainer from '@/features/ChatList/components/WideScreenContainer';
13
13
  import { useChatStore } from '@/store/chat';
14
14
  import { aiChatSelectors } from '@/store/chat/selectors';
15
15
  import { useSessionStore } from '@/store/session';
@@ -1,7 +1,7 @@
1
1
  import { createStyles } from 'antd-style';
2
2
  import React, { memo } from 'react';
3
3
 
4
- import { ChatItem } from '@/features/Conversation';
4
+ import { ChatItem } from '@/features/ChatList';
5
5
  import { useAgentStore } from '@/store/agent';
6
6
  import { agentChatConfigSelectors } from '@/store/agent/selectors';
7
7
  import { useChatStore } from '@/store/chat';
@@ -2,8 +2,8 @@
2
2
 
3
3
  import React, { memo, useCallback } from 'react';
4
4
 
5
- import { SkeletonList, VirtualizedList } from '@/features/Conversation';
6
- import WideScreenContainer from '@/features/Conversation/components/WideScreenContainer';
5
+ import { SkeletonList, VirtualizedList } from '@/features/ChatList';
6
+ import WideScreenContainer from '@/features/ChatList/components/WideScreenContainer';
7
7
  import { useFetchMessages } from '@/hooks/useFetchMessages';
8
8
  import { useChatStore } from '@/store/chat';
9
9
  import { displayMessageSelectors } from '@/store/chat/selectors';
@@ -1,7 +1,7 @@
1
1
  import { Suspense, lazy } from 'react';
2
2
  import { Flexbox } from 'react-layout-kit';
3
3
 
4
- import { SkeletonList } from '@/features/Conversation';
4
+ import { SkeletonList } from '@/features/ChatList';
5
5
 
6
6
  const Content = lazy(() => import('./Content'));
7
7
 
@@ -16,7 +16,7 @@ import {
16
16
  getVirtuaGlobalRef,
17
17
  subscribeVirtuaActiveIndex,
18
18
  subscribeVirtuaGlobalRef,
19
- } from '@/features/Conversation/components/VirtualizedList/VirtuosoContext';
19
+ } from '@/features/ChatList/components/VirtualizedList/VirtuosoContext';
20
20
  import { useChatStore } from '@/store/chat';
21
21
  import { displayMessageSelectors } from '@/store/chat/selectors';
22
22
 
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
 
3
3
  import { useResponsive, useTheme } from 'antd-style';
4
- import { memo, useRef } from 'react';
4
+ import { memo, useEffect, useRef } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
+ import { useSearchParams } from 'react-router-dom';
6
7
 
7
8
  import SettingContainer from '@/features/Setting/SettingContainer';
8
- import { parseAsStringEnum, useQueryParam } from '@/hooks/useQueryParam';
9
9
  import { SettingsTabs } from '@/store/global/initialState';
10
10
 
11
11
  import CategoryContent from '../CategoryContent';
@@ -13,18 +13,51 @@ import SettingsContent from '../SettingsContent';
13
13
  import { LayoutProps } from '../type';
14
14
  import Header from './Header';
15
15
  import SideBar from './SideBar';
16
+ import useMergedState from 'rc-util/lib/hooks/useMergedState';
16
17
 
17
18
  const Layout = memo<LayoutProps>(() => {
18
19
  const ref = useRef<HTMLDivElement | null>(null);
19
20
  const { md = true } = useResponsive();
20
21
  const theme = useTheme();
21
22
 
22
- const [activeTab, setActiveTab] = useQueryParam(
23
- 'active',
24
- parseAsStringEnum(Object.values(SettingsTabs)).withDefault(SettingsTabs.Common),
25
- );
23
+ const [searchParams, setSearchParams] = useSearchParams();
24
+
25
+ const [activeTabState, setActiveTabState] = useMergedState({
26
+ active: searchParams.get('active') as SettingsTabs ? searchParams.get('active') as SettingsTabs : SettingsTabs.Common,
27
+ }, {
28
+ onChange: (obj: {
29
+ active: SettingsTabs;
30
+ provider?: string;
31
+ }) => {
32
+ if (obj.provider) {
33
+ setSearchParams({ active: obj.active, provider: obj.provider });
34
+ } else {
35
+ searchParams.delete('provider');
36
+ setSearchParams({ active: obj.active });
37
+ }
38
+ },
39
+ });
40
+
41
+ const setActiveTab = (tab: SettingsTabs) => {
42
+ if (tab === SettingsTabs.Provider) {
43
+ setActiveTabState({ active: tab, provider: 'all' });
44
+ } else {
45
+ setActiveTabState({
46
+ active: tab,
47
+ });
48
+ }
49
+ };
50
+
51
+ useEffect(() => {
52
+ return () => {
53
+ setSearchParams((prevParams) => {
54
+ prevParams.delete('active');
55
+ return prevParams;
56
+ });
57
+ };
58
+ }, []);
26
59
 
27
- const category = <CategoryContent activeTab={activeTab} onMenuSelect={setActiveTab} />;
60
+ const category = <CategoryContent activeTab={activeTabState.active} onMenuSelect={setActiveTab} />;
28
61
 
29
62
  return (
30
63
  <Flexbox
@@ -39,7 +72,7 @@ const Layout = memo<LayoutProps>(() => {
39
72
  <Header getContainer={() => ref.current!}>{category}</Header>
40
73
  )}
41
74
  <SettingContainer maxWidth={'none'}>
42
- <SettingsContent activeTab={activeTab} mobile={false} />
75
+ <SettingsContent activeTab={activeTabState.active} mobile={false} />
43
76
  </SettingContainer>
44
77
  </Flexbox>
45
78
  );
@@ -5,7 +5,6 @@ import { memo } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { Flexbox } from 'react-layout-kit';
7
7
 
8
- import Link from '@/components/Link';
9
8
  import { AiProviderListItem } from '@/types/aiProvider';
10
9
 
11
10
  import EnableSwitch from './EnableSwitch';
@@ -13,9 +12,10 @@ import { useStyles } from './style';
13
12
 
14
13
  interface ProviderCardProps extends AiProviderListItem {
15
14
  loading?: boolean;
15
+ onProviderSelect: (provider: string) => void;
16
16
  }
17
17
  const ProviderCard = memo<ProviderCardProps>(
18
- ({ id, description, name, enabled, source, logo, loading }) => {
18
+ ({ id, description, name, enabled, source, logo, loading, onProviderSelect }) => {
19
19
  const { t } = useTranslation('providers');
20
20
  const { cx, styles, theme } = useStyles();
21
21
 
@@ -33,7 +33,9 @@ const ProviderCard = memo<ProviderCardProps>(
33
33
  return (
34
34
  <Flexbox className={cx(styles.container)} gap={24}>
35
35
  <Flexbox gap={12} padding={16} width={'100%'}>
36
- <Link href={`/settings?active=provider&provider=${id}`}>
36
+ <div onClick={() => {
37
+ onProviderSelect(id);
38
+ }} style={{ cursor: 'pointer' }}>
37
39
  <Flexbox gap={12} width={'100%'}>
38
40
  <Flexbox align={'center'} horizontal justify={'space-between'}>
39
41
  {source === 'builtin' ? (
@@ -68,7 +70,7 @@ const ProviderCard = memo<ProviderCardProps>(
68
70
  {source === 'custom' ? description : t(`${id}.description`)}
69
71
  </Text>
70
72
  </Flexbox>
71
- </Link>
73
+ </div>
72
74
  <Divider style={{ margin: '4px 0' }} />
73
75
  <Flexbox horizontal justify={'space-between'}>
74
76
  <div />
@@ -14,7 +14,12 @@ const loadingArr = Array.from({ length: 12 })
14
14
  .fill('-')
15
15
  .map((item, index) => `${index}x${item}`);
16
16
 
17
- const List = memo(() => {
17
+ type ListProps = {
18
+ onProviderSelect: (provider: string) => void;
19
+ };
20
+
21
+ const List = memo((props: ListProps) => {
22
+ const { onProviderSelect } = props;
18
23
  const { t } = useTranslation('modelProvider');
19
24
  const enabledList = useAiInfraStore(aiProviderSelectors.enabledAiProviderList, isEqual);
20
25
  const disabledList = useAiInfraStore(aiProviderSelectors.disabledAiProviderList, isEqual);
@@ -30,7 +35,14 @@ const List = memo(() => {
30
35
  </Flexbox>
31
36
  <Grid gap={16} rows={3}>
32
37
  {loadingArr.map((item) => (
33
- <Card enabled={false} id={item} key={item} loading source={'builtin'} />
38
+ <Card
39
+ enabled={false}
40
+ id={item}
41
+ key={item}
42
+ loading
43
+ onProviderSelect={onProviderSelect}
44
+ source={'builtin'}
45
+ />
34
46
  ))}
35
47
  </Grid>
36
48
  </Flexbox>
@@ -47,7 +59,7 @@ const List = memo(() => {
47
59
  </Flexbox>
48
60
  <Grid gap={16} rows={3}>
49
61
  {enabledList.map((item) => (
50
- <Card {...item} key={item.id} />
62
+ <Card {...item} key={item.id} onProviderSelect={onProviderSelect} />
51
63
  ))}
52
64
  </Grid>
53
65
  </Flexbox>
@@ -60,7 +72,7 @@ const List = memo(() => {
60
72
  </Flexbox>
61
73
  <Grid gap={16} rows={3}>
62
74
  {disabledList.map((item) => (
63
- <Card {...item} key={item.id} />
75
+ <Card {...item} key={item.id} onProviderSelect={onProviderSelect} />
64
76
  ))}
65
77
  </Grid>
66
78
  </Flexbox>
@@ -1,20 +1,32 @@
1
1
  'use client';
2
2
 
3
3
  import { isCustomBranding } from '@/const/version';
4
- import { parseAsString, useQueryParam } from '@/hooks/useQueryParam';
5
4
 
6
5
  import DesktopLayout from '../_layout/Desktop';
7
6
  import MobileLayout from '../_layout/Mobile';
8
7
  import ProviderDetailPage from '../detail';
9
8
  import Footer from './Footer';
9
+ import { useMemo, useState } from 'react';
10
+ import { useSearchParams } from 'react-router-dom';
10
11
 
11
12
  const Page = (props: { mobile?: boolean }) => {
12
- const [Provider, setProvider] = useQueryParam('provider', parseAsString.withDefault('all'));
13
+ const [SearchParams, setSearchParams] = useSearchParams();
14
+ const [provider, setProviderState] = useState(SearchParams.get('provider') || 'all');
15
+ const setProvider = (provider: string) => {
16
+ setSearchParams({ active: 'provider', provider });
17
+ setProviderState(provider);
18
+ };
19
+
13
20
  const { mobile } = props;
14
21
  const ProviderLayout = mobile ? MobileLayout : DesktopLayout;
22
+
23
+ const ProviderListPage = useMemo(() => {
24
+ return <ProviderDetailPage id={provider} onProviderSelect={setProvider} />;
25
+ }, [provider]);
26
+
15
27
  return (
16
28
  <ProviderLayout onProviderSelect={setProvider}>
17
- <ProviderDetailPage id={Provider} />
29
+ {ProviderListPage}
18
30
  {!isCustomBranding && <Footer />}
19
31
  </ProviderLayout>
20
32
  );
@@ -1,22 +1,30 @@
1
- import NewAPI from './newapi';
2
- import ProviderGrid from '../(list)/ProviderGrid';
3
- import Azure from './azure';
4
- import AzureAI from './azureai';
5
- import Bedrock from './bedrock';
6
- import Cloudflare from './cloudflare';
7
- import ComfyUI from './comfyui';
8
- import DefaultPage from './default/ProviderDetialPage';
9
- import GitHub from './github';
10
- import Ollama from './ollama';
11
- import OpenAI from './openai';
12
- import VertexAI from './vertexai';
1
+ import dynamic from 'next/dynamic';
2
+ import Loading from '@/components/Loading/BrandTextLoading';
13
3
 
14
- const ProviderDetailPage = (props: { id?: string | null }) => {
15
- const { id } = props;
4
+ const NewAPI = dynamic(() => import('./newapi'), { loading: () => <Loading />, ssr: false });
5
+ const OpenAI = dynamic(() => import('./openai'), { loading: () => <Loading />, ssr: false });
6
+ const VertexAI = dynamic(() => import('./vertexai'), { loading: () => <Loading />, ssr: false });
7
+ const GitHub = dynamic(() => import('./github'), { loading: () => <Loading />, ssr: false });
8
+ const Ollama = dynamic(() => import('./ollama'), { loading: () => <Loading />, ssr: false });
9
+ const ComfyUI = dynamic(() => import('./comfyui'), { loading: () => <Loading />, ssr: false });
10
+ const Cloudflare = dynamic(() => import('./cloudflare'), { loading: () => <Loading />, ssr: false });
11
+ const Bedrock = dynamic(() => import('./bedrock'), { loading: () => <Loading />, ssr: false });
12
+ const AzureAI = dynamic(() => import('./azureai'), { loading: () => <Loading />, ssr: false });
13
+ const Azure = dynamic(() => import('./azure'), { loading: () => <Loading />, ssr: false });
14
+ const ProviderGrid = dynamic(() => import('../(list)/ProviderGrid'), { loading: () => <Loading />, ssr: false });
15
+ const DefaultPage = dynamic(() => import('./default/ProviderDetialPage'), { loading: () => <Loading />, ssr: false });
16
+
17
+ type ProviderDetailPageProps = {
18
+ id?: string | null;
19
+ onProviderSelect: (provider: string) => void;
20
+ }
21
+
22
+ const ProviderDetailPage = (props: ProviderDetailPageProps) => {
23
+ const { id, onProviderSelect } = props;
16
24
 
17
25
  switch (id) {
18
26
  case 'all': {
19
- return <ProviderGrid />;
27
+ return <ProviderGrid onProviderSelect={onProviderSelect} />;
20
28
  }
21
29
  case 'azure': {
22
30
  return <Azure />;
@@ -6,7 +6,7 @@ import { ModelProvider } from 'model-bank';
6
6
  import { memo, useState } from 'react';
7
7
  import { useTranslation } from 'react-i18next';
8
8
 
9
- import { FormAction } from '@/features/Conversation/Error/style';
9
+ import { FormAction } from '@/features/ChatList/Error/style';
10
10
  import { aiProviderSelectors, useAiInfraStore } from '@/store/aiInfra';
11
11
 
12
12
  const BedrockForm = memo<{ description: string }>(({ description }) => {
@@ -10,7 +10,7 @@ import { Center, Flexbox } from 'react-layout-kit';
10
10
 
11
11
  import { FormInput, FormPassword } from '@/components/FormInput';
12
12
  import KeyValueEditor from '@/components/KeyValueEditor';
13
- import { FormAction } from '@/features/Conversation/Error/style';
13
+ import { FormAction } from '@/features/ChatList/Error/style';
14
14
  import { useAiInfraStore } from '@/store/aiInfra';
15
15
  import { ComfyUIKeyVault } from '@/types/user/settings';
16
16
 
@@ -4,7 +4,7 @@ import { ReactNode, memo, useContext, useState } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
 
6
6
  import { FormInput, FormPassword } from '@/components/FormInput';
7
- import { FormAction } from '@/features/Conversation/Error/style';
7
+ import { FormAction } from '@/features/ChatList/Error/style';
8
8
  import { useProviderName } from '@/hooks/useProviderName';
9
9
  import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
10
10
  import { GlobalLLMProviderKey } from '@/types/user/settings';
@@ -97,7 +97,7 @@ vi.mock('react-layout-kit', () => ({
97
97
  )),
98
98
  }));
99
99
 
100
- vi.mock('@/features/Conversation/Error/style', () => ({
100
+ vi.mock('@/features/ChatList/Error/style', () => ({
101
101
  FormAction: vi.fn(({ children, title, description, avatar, ...props }) => (
102
102
  <div data-testid="form-action" {...props}>
103
103
  <div data-testid="avatar">{avatar}</div>
@@ -1,6 +1,6 @@
1
1
  import { memo } from 'react';
2
2
 
3
- import { ErrorActionContainer } from '@/features/Conversation/Error/style';
3
+ import { ErrorActionContainer } from '@/features/ChatList/Error/style';
4
4
 
5
5
  import APIKeyForm from './APIKeyForm';
6
6
 
@@ -1,8 +1,7 @@
1
- import { toMarkdown } from 'mdast-util-to-markdown';
2
1
  import { Parent } from 'unist';
3
2
  import { expect } from 'vitest';
4
3
 
5
- import { treeNodeToString } from '@/features/Conversation/MarkdownElements/remarkPlugins/getNodeContent';
4
+ import { treeNodeToString } from './getNodeContent';
6
5
 
7
6
  describe('treeNodeToString', () => {
8
7
  it('with latex', () => {
@@ -5,13 +5,13 @@ import { useSearchParams } from 'next/navigation';
5
5
  import { memo, use, useCallback, useContext, useMemo, useState } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
 
8
- import ShareMessageModal from '@/features/Conversation/components/ShareMessageModal';
9
- import { VirtuaContext } from '@/features/Conversation/components/VirtualizedList/VirtuosoContext';
10
8
  import { useChatStore } from '@/store/chat';
11
9
  import { messageStateSelectors, threadSelectors } from '@/store/chat/selectors';
12
10
  import { useSessionStore } from '@/store/session';
13
11
  import { sessionSelectors } from '@/store/session/selectors';
14
12
 
13
+ import ShareMessageModal from '../../../components/ShareMessageModal';
14
+ import { VirtuaContext } from '../../../components/VirtualizedList/VirtuosoContext';
15
15
  import { InPortalThreadContext } from '../../../context/InPortalThreadContext';
16
16
  import { useChatListActionsBar } from '../../../hooks/useChatListActionsBar';
17
17
  import { ErrorActionsBar } from './Error';
@@ -9,13 +9,13 @@ import { AssistantMessageExtra } from './index';
9
9
  vi.mock('zustand/traditional');
10
10
 
11
11
  // Mock TTS and Translate components
12
- vi.mock('@/features/Conversation/components/Extras/TTS', () => ({
12
+ vi.mock('@/features/ChatList/components/Extras/TTS', () => ({
13
13
  default: vi.fn(() => <div>TTS Component</div>),
14
14
  }));
15
- vi.mock('@/features/Conversation/components/Extras/Translate', () => ({
15
+ vi.mock('@/features/ChatList/components/Extras/Translate', () => ({
16
16
  default: vi.fn(() => <div>Translate Component</div>),
17
17
  }));
18
- vi.mock('@/features/Conversation/components/Extras/Usage', () => ({
18
+ vi.mock('@/features/ChatList/components/Extras/Usage', () => ({
19
19
  default: vi.fn(() => <div>Usage Component</div>),
20
20
  }));
21
21
 
@@ -1,15 +1,16 @@
1
+ import { LOADING_FLAT } from '@lobechat/const';
1
2
  import { ModelPerformance, ModelUsage } from '@lobechat/types';
2
3
  import { memo } from 'react';
3
4
  import { Flexbox } from 'react-layout-kit';
4
5
 
5
- import { LOADING_FLAT } from '@/const/message';
6
- import ExtraContainer from '@/features/Conversation/components/Extras/ExtraContainer';
7
- import TTS from '@/features/Conversation/components/Extras/TTS';
8
- import Translate from '@/features/Conversation/components/Extras/Translate';
9
- import Usage from '@/features/Conversation/components/Extras/Usage';
10
6
  import { useChatStore } from '@/store/chat';
11
7
  import { messageStateSelectors } from '@/store/chat/selectors';
12
8
 
9
+ import ExtraContainer from '../../../components/Extras/ExtraContainer';
10
+ import TTS from '../../../components/Extras/TTS';
11
+ import Translate from '../../../components/Extras/Translate';
12
+ import Usage from '../../../components/Extras/Usage';
13
+
13
14
  interface AssistantMessageExtraProps {
14
15
  content: string;
15
16
  extra?: any;
@@ -3,12 +3,12 @@ import { UIChatMessage } from '@lobechat/types';
3
3
  import { ReactNode, memo } from 'react';
4
4
  import { Flexbox } from 'react-layout-kit';
5
5
 
6
- import { CollapsedMessage } from '@/features/Conversation/Messages/Assistant/CollapsedMessage';
7
6
  import { useChatStore } from '@/store/chat';
8
7
  import { aiChatSelectors, messageStateSelectors } from '@/store/chat/selectors';
9
8
 
10
9
  import { DefaultMessage } from '../Default';
11
10
  import ImageFileListViewer from '../User/ImageFileListViewer';
11
+ import { CollapsedMessage } from './CollapsedMessage';
12
12
  import FileChunks from './FileChunks';
13
13
  import IntentUnderstanding from './IntentUnderstanding';
14
14
  import Reasoning from './Reasoning';
@@ -5,13 +5,13 @@ import { useSearchParams } from 'next/navigation';
5
5
  import { memo, use, useCallback, useContext, useMemo, useState } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
 
8
- import ShareMessageModal from '@/features/Conversation/components/ShareMessageModal';
9
- import { VirtuaContext } from '@/features/Conversation/components/VirtualizedList/VirtuosoContext';
10
8
  import { useChatStore } from '@/store/chat';
11
9
  import { messageStateSelectors, threadSelectors } from '@/store/chat/selectors';
12
10
  import { useSessionStore } from '@/store/session';
13
11
  import { sessionSelectors } from '@/store/session/selectors';
14
12
 
13
+ import ShareMessageModal from '../../../components/ShareMessageModal';
14
+ import { VirtuaContext } from '../../../components/VirtualizedList/VirtuosoContext';
15
15
  import { InPortalThreadContext } from '../../../context/InPortalThreadContext';
16
16
  import { useChatListActionsBar } from '../../../hooks/useChatListActionsBar';
17
17
 
@@ -4,13 +4,13 @@ import { memo, useMemo } from 'react';
4
4
  import { Flexbox } from 'react-layout-kit';
5
5
 
6
6
  import { LOADING_FLAT } from '@/const/message';
7
- import { markdownElements } from '@/features/Conversation/MarkdownElements';
8
- import Reasoning from '@/features/Conversation/Messages/Assistant/Reasoning';
9
7
  import { useChatStore } from '@/store/chat';
10
8
  import { aiChatSelectors, messageStateSelectors } from '@/store/chat/selectors';
11
9
  import { useUserStore } from '@/store/user';
12
10
  import { userGeneralSettingsSelectors } from '@/store/user/selectors';
13
11
 
12
+ import { markdownElements } from '../../MarkdownElements';
13
+ import Reasoning from '../Assistant/Reasoning';
14
14
  import ImageFileListViewer from '../User/ImageFileListViewer';
15
15
  import ErrorContent from './Error';
16
16
  import MessageContent from './MessageContent';
@@ -5,9 +5,10 @@ import { memo } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { Flexbox } from 'react-layout-kit';
7
7
 
8
- import ErrorMessageExtra, { useErrorContent } from '@/features/Conversation/Error';
9
8
  import { useChatStore } from '@/store/chat';
10
9
 
10
+ import ErrorMessageExtra, { useErrorContent } from '../../../Error';
11
+
11
12
  export interface ErrorContentProps {
12
13
  error?: ChatMessageError;
13
14
  id: string;
@@ -4,10 +4,10 @@ import isEqual from 'fast-deep-equal';
4
4
  import { memo, useMemo } from 'react';
5
5
  import { Flexbox } from 'react-layout-kit';
6
6
 
7
- import { CollapsedMessage } from '@/features/Conversation/Messages/Group/CollapsedMessage';
8
7
  import { useChatStore } from '@/store/chat';
9
8
  import { messageStateSelectors } from '@/store/chat/slices/message/selectors';
10
9
 
10
+ import { CollapsedMessage } from './CollapsedMessage';
11
11
  import { GroupMessageContext } from './GroupContext';
12
12
  import GroupItem from './GroupItem';
13
13
 
@@ -3,10 +3,11 @@ import isEqual from 'fast-deep-equal';
3
3
  import { memo, use } from 'react';
4
4
  import { Flexbox } from 'react-layout-kit';
5
5
 
6
- import { ContentBlock } from '@/features/Conversation/Messages/Group/ContentBlock';
7
- import { VirtuaContext } from '@/features/Conversation/components/VirtualizedList/VirtuosoContext';
8
6
  import { useChatStore } from '@/store/chat';
9
7
 
8
+ import { VirtuaContext } from '../../components/VirtualizedList/VirtuosoContext';
9
+ import { ContentBlock } from './ContentBlock';
10
+
10
11
  interface GroupItemProps extends AssistantContentBlock {
11
12
  contentId?: string;
12
13
  disableEditing?: boolean;
@@ -5,10 +5,10 @@ import { memo, useState } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { Flexbox } from 'react-layout-kit';
7
7
 
8
- import { useGroupMessage } from '@/features/Conversation/Messages/Group/GroupContext';
9
8
  import { useChatStore } from '@/store/chat';
10
9
  import { useUserStore } from '@/store/user';
11
10
 
11
+ import { useGroupMessage } from '../../../GroupContext';
12
12
  import { ApprovalMode } from './index';
13
13
 
14
14
  interface ApprovalActionsProps {
@@ -3,8 +3,7 @@ import { ChatToolResult, ToolIntervention } from '@lobechat/types';
3
3
  import { Suspense, memo } from 'react';
4
4
  import { Flexbox } from 'react-layout-kit';
5
5
 
6
- import AbortResponse from '@/features/Conversation/Messages/Group/Tool/Render/AbortResponse';
7
-
6
+ import AbortResponse from './AbortResponse';
8
7
  import CustomRender from './CustomRender';
9
8
  import ErrorResponse from './ErrorResponse';
10
9
  import Intervention from './Intervention';