@lobehub/lobehub 2.0.0-next.96 → 2.0.0-next.98

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 (272) hide show
  1. package/.console-log-whitelist.json +14 -0
  2. package/.github/workflows/check-console-log.yml +117 -0
  3. package/.github/workflows/desktop-pr-build.yml +4 -4
  4. package/.github/workflows/release-desktop-beta.yml +4 -4
  5. package/.github/workflows/release.yml +1 -1
  6. package/.github/workflows/test.yml +5 -5
  7. package/CHANGELOG.md +66 -0
  8. package/apps/desktop/src/preload/index.ts +2 -2
  9. package/apps/desktop/src/preload/invoke.ts +1 -1
  10. package/apps/desktop/src/preload/routeInterceptor.ts +41 -41
  11. package/changelog/v1.json +21 -0
  12. package/docs/development/database-schema.dbml +1 -0
  13. package/e2e/package.json +1 -1
  14. package/locales/ar/file.json +9 -11
  15. package/locales/ar/models.json +6 -0
  16. package/locales/bg-BG/file.json +8 -10
  17. package/locales/bg-BG/models.json +6 -0
  18. package/locales/de-DE/file.json +9 -11
  19. package/locales/de-DE/models.json +6 -0
  20. package/locales/en-US/file.json +12 -14
  21. package/locales/en-US/models.json +6 -0
  22. package/locales/es-ES/file.json +7 -9
  23. package/locales/es-ES/models.json +6 -0
  24. package/locales/fa-IR/file.json +9 -11
  25. package/locales/fa-IR/models.json +6 -0
  26. package/locales/fr-FR/file.json +6 -8
  27. package/locales/fr-FR/models.json +6 -0
  28. package/locales/it-IT/file.json +8 -10
  29. package/locales/it-IT/models.json +6 -0
  30. package/locales/ja-JP/file.json +10 -12
  31. package/locales/ja-JP/models.json +6 -0
  32. package/locales/ko-KR/file.json +8 -10
  33. package/locales/ko-KR/models.json +6 -0
  34. package/locales/nl-NL/file.json +8 -10
  35. package/locales/nl-NL/models.json +6 -0
  36. package/locales/pl-PL/file.json +7 -9
  37. package/locales/pl-PL/models.json +6 -0
  38. package/locales/pt-BR/file.json +7 -9
  39. package/locales/pt-BR/models.json +6 -0
  40. package/locales/ru-RU/file.json +9 -11
  41. package/locales/ru-RU/models.json +6 -0
  42. package/locales/tr-TR/file.json +8 -10
  43. package/locales/tr-TR/models.json +6 -0
  44. package/locales/vi-VN/file.json +9 -11
  45. package/locales/vi-VN/models.json +6 -0
  46. package/locales/zh-CN/file.json +10 -12
  47. package/locales/zh-CN/models.json +6 -0
  48. package/locales/zh-TW/file.json +10 -12
  49. package/locales/zh-TW/models.json +6 -0
  50. package/package.json +3 -2
  51. package/packages/database/migrations/0047_add_slug_document.sql +6 -0
  52. package/packages/database/migrations/meta/0047_snapshot.json +7891 -0
  53. package/packages/database/migrations/meta/_journal.json +7 -0
  54. package/packages/database/src/client/db.ts +12 -12
  55. package/packages/database/src/core/migrations.json +16 -7
  56. package/packages/database/src/models/document.ts +2 -2
  57. package/packages/database/src/repositories/dataImporter/index.ts +10 -10
  58. package/packages/database/src/schemas/file.ts +7 -1
  59. package/packages/database/src/schemas/topic.ts +1 -1
  60. package/packages/database/src/server/models/ragEval/evaluation.ts +1 -1
  61. package/packages/model-bank/src/aiModels/qwen.ts +5 -3
  62. package/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts +21 -21
  63. package/packages/obervability-otel/package.json +2 -2
  64. package/scripts/checkConsoleLog.mts +148 -0
  65. package/scripts/prebuild.mts +5 -5
  66. package/src/app/[variants]/(main)/changelog/index.tsx +1 -1
  67. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/Desktop/ClassicChat.tsx +1 -1
  68. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatInput/Desktop/GroupChat.tsx +1 -1
  69. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/ChatItem/index.tsx +1 -1
  70. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/Content.tsx +2 -2
  71. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatList/index.tsx +1 -1
  72. package/src/app/[variants]/(main)/chat/components/conversation/features/ChatMinimap/index.tsx +1 -1
  73. package/src/app/[variants]/(main)/settings/_layout/Desktop/index.tsx +20 -16
  74. package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/Card.tsx +6 -3
  75. package/src/app/[variants]/(main)/settings/provider/(list)/index.tsx +3 -2
  76. package/src/app/[variants]/(main)/settings/provider/detail/index.tsx +14 -4
  77. package/src/app/[variants]/desktopRouter.config.tsx +23 -0
  78. package/src/app/[variants]/mobileRouter.config.tsx +23 -0
  79. package/src/components/InvalidAPIKey/APIKeyForm/Bedrock.tsx +1 -1
  80. package/src/components/InvalidAPIKey/APIKeyForm/ComfyUIForm.tsx +1 -1
  81. package/src/components/InvalidAPIKey/APIKeyForm/ProviderApiKeyForm.tsx +1 -1
  82. package/src/components/InvalidAPIKey/APIKeyForm/__tests__/ComfyUIForm.test.tsx +1 -1
  83. package/src/components/InvalidAPIKey/index.tsx +1 -1
  84. package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/getNodeContent.test.ts +1 -2
  85. package/src/features/{Conversation → ChatList}/Messages/Assistant/Actions/index.tsx +2 -2
  86. package/src/features/{Conversation → ChatList}/Messages/Assistant/Extra/index.test.tsx +3 -3
  87. package/src/features/{Conversation → ChatList}/Messages/Assistant/Extra/index.tsx +6 -5
  88. package/src/features/{Conversation → ChatList}/Messages/Assistant/MessageContent.tsx +1 -1
  89. package/src/features/{Conversation → ChatList}/Messages/Group/Actions/WithContentId.tsx +2 -2
  90. package/src/features/{Conversation → ChatList}/Messages/Group/ContentBlock.tsx +2 -2
  91. package/src/features/{Conversation → ChatList}/Messages/Group/Error/index.tsx +2 -1
  92. package/src/features/{Conversation → ChatList}/Messages/Group/Group.tsx +1 -1
  93. package/src/features/{Conversation → ChatList}/Messages/Group/GroupItem.tsx +3 -2
  94. package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/ApprovalActions.tsx +1 -1
  95. package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/index.tsx +1 -2
  96. package/src/features/{Conversation → ChatList}/Messages/Group/index.tsx +1 -1
  97. package/src/features/{Conversation → ChatList}/Messages/User/Extra.tsx +3 -3
  98. package/src/features/{Conversation → ChatList}/Messages/User/index.tsx +1 -1
  99. package/src/features/{Conversation → ChatList}/Messages/index.tsx +1 -1
  100. package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/Preview.tsx +1 -1
  101. package/src/features/{Conversation → ChatList}/components/SkeletonList.tsx +1 -1
  102. package/src/features/{Conversation → ChatList}/components/VirtualizedList/index.tsx +1 -1
  103. package/src/features/KnowledgeManager/DocumentExplorer/NoteEditorModal.tsx +0 -20
  104. package/src/features/KnowledgeManager/DocumentExplorer/index.tsx +3 -3
  105. package/src/features/KnowledgeManager/FileExplorer/MasonryFileItem/index.tsx +0 -20
  106. package/src/features/KnowledgeManager/Header/AddButton.tsx +0 -1
  107. package/src/features/KnowledgeManager/Header/NewNoteButton.tsx +1 -1
  108. package/src/features/KnowledgeManager/Header/TogglePanelButton.tsx +2 -2
  109. package/src/features/KnowledgeManager/Home/UploadEntries.tsx +2 -2
  110. package/src/features/KnowledgeManager/Home/index.tsx +4 -4
  111. package/src/features/OllamaSetupGuide/index.tsx +1 -1
  112. package/src/features/PluginsUI/Render/MCPType/index.tsx +1 -1
  113. package/src/features/Portal/GroupThread/Body/ThreadChatItem.tsx +1 -1
  114. package/src/features/Portal/GroupThread/Body/ThreadChatList.tsx +1 -1
  115. package/src/features/Portal/Thread/Chat/ChatInput/index.tsx +1 -1
  116. package/src/features/Portal/Thread/Chat/ChatItem.tsx +1 -1
  117. package/src/features/Portal/Thread/Chat/ChatList.tsx +1 -1
  118. package/src/features/Portal/Thread/Chat/index.tsx +1 -1
  119. package/src/features/ShareModal/ShareImage/ChatList/index.tsx +1 -1
  120. package/src/features/User/UserPanel/useMenu.tsx +7 -3
  121. package/src/locales/default/file.ts +11 -13
  122. package/src/services/debug.ts +4 -4
  123. package/src/services/electron/remoteServer.ts +5 -5
  124. package/src/services/electron/settings.ts +6 -6
  125. package/src/services/mcp.ts +18 -18
  126. package/src/services/models.ts +20 -20
  127. package/src/store/chat/agents/__tests__/createAgentExecutors/helpers/testExecutor.ts +1 -4
  128. /package/src/features/{Conversation → ChatList}/Error/AccessCodeForm.tsx +0 -0
  129. /package/src/features/{Conversation → ChatList}/Error/ChatInvalidApiKey.tsx +0 -0
  130. /package/src/features/{Conversation → ChatList}/Error/ClerkLogin/index.tsx +0 -0
  131. /package/src/features/{Conversation → ChatList}/Error/ErrorJsonViewer.tsx +0 -0
  132. /package/src/features/{Conversation → ChatList}/Error/OAuthForm.tsx +0 -0
  133. /package/src/features/{Conversation → ChatList}/Error/OllamaBizError/InvalidOllamaModel.tsx +0 -0
  134. /package/src/features/{Conversation → ChatList}/Error/OllamaBizError/index.tsx +0 -0
  135. /package/src/features/{Conversation → ChatList}/Error/index.tsx +0 -0
  136. /package/src/features/{Conversation → ChatList}/Error/style.tsx +0 -0
  137. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/Render/Icon.tsx +0 -0
  138. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/Render/index.tsx +0 -0
  139. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/index.ts +0 -0
  140. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/rehypePlugin.test.ts +0 -0
  141. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeArtifact/rehypePlugin.ts +0 -0
  142. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeThinking/Render.tsx +0 -0
  143. /package/src/features/{Conversation → ChatList}/MarkdownElements/LobeThinking/index.ts +0 -0
  144. /package/src/features/{Conversation → ChatList}/MarkdownElements/LocalFile/Render/index.tsx +0 -0
  145. /package/src/features/{Conversation → ChatList}/MarkdownElements/LocalFile/index.ts +0 -0
  146. /package/src/features/{Conversation → ChatList}/MarkdownElements/Mention/Render.tsx +0 -0
  147. /package/src/features/{Conversation → ChatList}/MarkdownElements/Mention/index.ts +0 -0
  148. /package/src/features/{Conversation → ChatList}/MarkdownElements/Thinking/Render.tsx +0 -0
  149. /package/src/features/{Conversation → ChatList}/MarkdownElements/Thinking/index.ts +0 -0
  150. /package/src/features/{Conversation → ChatList}/MarkdownElements/index.ts +0 -0
  151. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/__snapshots__/createRemarkSelfClosingTagPlugin.test.ts.snap +0 -0
  152. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkCustomTagPlugin.ts +0 -0
  153. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkCustomTagWithAttributesPlugin.ts +0 -0
  154. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkSelfClosingTagPlugin.test.ts +0 -0
  155. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/createRemarkSelfClosingTagPlugin.ts +0 -0
  156. /package/src/features/{Conversation → ChatList}/MarkdownElements/remarkPlugins/getNodeContent.ts +0 -0
  157. /package/src/features/{Conversation → ChatList}/MarkdownElements/type.ts +0 -0
  158. /package/src/features/{Conversation → ChatList}/MarkdownElements/utils.ts +0 -0
  159. /package/src/features/{Conversation → ChatList}/Messages/Assistant/Actions/Error.tsx +0 -0
  160. /package/src/features/{Conversation → ChatList}/Messages/Assistant/CollapsedMessage.tsx +0 -0
  161. /package/src/features/{Conversation → ChatList}/Messages/Assistant/FileChunks/Item/index.tsx +0 -0
  162. /package/src/features/{Conversation → ChatList}/Messages/Assistant/FileChunks/Item/style.ts +0 -0
  163. /package/src/features/{Conversation → ChatList}/Messages/Assistant/FileChunks/index.tsx +0 -0
  164. /package/src/features/{Conversation → ChatList}/Messages/Assistant/IntentUnderstanding.tsx +0 -0
  165. /package/src/features/{Conversation → ChatList}/Messages/Assistant/Reasoning/index.tsx +0 -0
  166. /package/src/features/{Conversation → ChatList}/Messages/Assistant/SearchGrounding.tsx +0 -0
  167. /package/src/features/{Conversation → ChatList}/Messages/Assistant/index.tsx +0 -0
  168. /package/src/features/{Conversation → ChatList}/Messages/Default.tsx +0 -0
  169. /package/src/features/{Conversation → ChatList}/Messages/Group/Actions/WithoutContentId.tsx +0 -0
  170. /package/src/features/{Conversation → ChatList}/Messages/Group/Actions/index.tsx +0 -0
  171. /package/src/features/{Conversation → ChatList}/Messages/Group/CollapsedMessage.tsx +0 -0
  172. /package/src/features/{Conversation → ChatList}/Messages/Group/EditState.tsx +0 -0
  173. /package/src/features/{Conversation → ChatList}/Messages/Group/GroupContext.ts +0 -0
  174. /package/src/features/{Conversation → ChatList}/Messages/Group/MessageContent.tsx +0 -0
  175. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/BuiltinPluginTitle.tsx +0 -0
  176. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/Debug.tsx +0 -0
  177. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/PluginResult.tsx +0 -0
  178. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/PluginState.tsx +0 -0
  179. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/Settings.tsx +0 -0
  180. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/StatusIndicator.tsx +0 -0
  181. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/ToolTitle.tsx +0 -0
  182. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Inspector/index.tsx +0 -0
  183. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/AbortResponse.tsx +0 -0
  184. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Arguments/ObjectEntity.tsx +0 -0
  185. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Arguments/ValueCell.tsx +0 -0
  186. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Arguments/index.tsx +0 -0
  187. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/CustomRender.tsx +0 -0
  188. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/ErrorResponse.tsx +0 -0
  189. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/Fallback.tsx +0 -0
  190. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/KeyValueEditor.tsx +0 -0
  191. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/ModeSelector.tsx +0 -0
  192. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/Intervention/index.tsx +0 -0
  193. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/LoadingPlaceholder/index.tsx +0 -0
  194. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/PluginSettings.tsx +0 -0
  195. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/Render/RejectedResponse.tsx +0 -0
  196. /package/src/features/{Conversation → ChatList}/Messages/Group/Tool/index.tsx +0 -0
  197. /package/src/features/{Conversation → ChatList}/Messages/Group/Tools.tsx +0 -0
  198. /package/src/features/{Conversation → ChatList}/Messages/Supervisor/TodoList.tsx +0 -0
  199. /package/src/features/{Conversation → ChatList}/Messages/Supervisor/index.tsx +0 -0
  200. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/BuiltinPluginTitle.tsx +0 -0
  201. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/Debug.tsx +0 -0
  202. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/PluginResult.tsx +0 -0
  203. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/PluginState.tsx +0 -0
  204. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/Settings.tsx +0 -0
  205. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/ToolTitle.tsx +0 -0
  206. /package/src/features/{Conversation → ChatList}/Messages/Tool/Inspector/index.tsx +0 -0
  207. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/Arguments/ObjectEntity.tsx +0 -0
  208. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/Arguments/ValueCell.tsx +0 -0
  209. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/Arguments/index.tsx +0 -0
  210. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/CustomRender.tsx +0 -0
  211. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/ErrorResponse.tsx +0 -0
  212. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/KeyValueEditor.tsx +0 -0
  213. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/PluginSettings.tsx +0 -0
  214. /package/src/features/{Conversation → ChatList}/Messages/Tool/Render/index.tsx +0 -0
  215. /package/src/features/{Conversation → ChatList}/Messages/Tool/ToolItem.tsx +0 -0
  216. /package/src/features/{Conversation → ChatList}/Messages/Tool/index.tsx +0 -0
  217. /package/src/features/{Conversation → ChatList}/Messages/User/Actions/ActionsBar.tsx +0 -0
  218. /package/src/features/{Conversation → ChatList}/Messages/User/Actions/MessageBranch.tsx +0 -0
  219. /package/src/features/{Conversation → ChatList}/Messages/User/Actions/index.tsx +0 -0
  220. /package/src/features/{Conversation → ChatList}/Messages/User/BelowMessage.tsx +0 -0
  221. /package/src/features/{Conversation → ChatList}/Messages/User/FileListViewer/Item.tsx +0 -0
  222. /package/src/features/{Conversation → ChatList}/Messages/User/FileListViewer/index.tsx +0 -0
  223. /package/src/features/{Conversation → ChatList}/Messages/User/ImageFileListViewer.tsx +0 -0
  224. /package/src/features/{Conversation → ChatList}/Messages/User/MarkdownRender/ContentPreview.tsx +0 -0
  225. /package/src/features/{Conversation → ChatList}/Messages/User/MarkdownRender/index.tsx +0 -0
  226. /package/src/features/{Conversation → ChatList}/Messages/User/MessageContent.tsx +0 -0
  227. /package/src/features/{Conversation → ChatList}/Messages/User/VideoFileListViewer.tsx +0 -0
  228. /package/src/features/{Conversation → ChatList}/components/AutoScroll.tsx +0 -0
  229. /package/src/features/{Conversation → ChatList}/components/BackBottom/index.tsx +0 -0
  230. /package/src/features/{Conversation → ChatList}/components/BackBottom/style.ts +0 -0
  231. /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/PdfPreview.tsx +0 -0
  232. /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/index.tsx +0 -0
  233. /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/style.ts +0 -0
  234. /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/template.ts +0 -0
  235. /package/src/features/{Conversation → ChatList}/components/ChatItem/ShareMessageModal/SharePdf/usePdfGeneration.ts +0 -0
  236. /package/src/features/{Conversation → ChatList}/components/Extras/ExtraContainer.tsx +0 -0
  237. /package/src/features/{Conversation → ChatList}/components/Extras/TTS/FilePlayer.tsx +0 -0
  238. /package/src/features/{Conversation → ChatList}/components/Extras/TTS/InitPlayer.tsx +0 -0
  239. /package/src/features/{Conversation → ChatList}/components/Extras/TTS/Player.tsx +0 -0
  240. /package/src/features/{Conversation → ChatList}/components/Extras/TTS/index.tsx +0 -0
  241. /package/src/features/{Conversation → ChatList}/components/Extras/Translate.tsx +0 -0
  242. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/AnimatedNumber.tsx +0 -0
  243. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/ModelCard.tsx +0 -0
  244. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/TokenProgress.tsx +0 -0
  245. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/index.tsx +0 -0
  246. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/pricing.ts +0 -0
  247. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/tokens.test.ts +0 -0
  248. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/UsageDetail/tokens.ts +0 -0
  249. /package/src/features/{Conversation → ChatList}/components/Extras/Usage/index.tsx +0 -0
  250. /package/src/features/{Conversation → ChatList}/components/History/HistoryDivider.tsx +0 -0
  251. /package/src/features/{Conversation → ChatList}/components/History/index.tsx +0 -0
  252. /package/src/features/{Conversation → ChatList}/components/OTPInput.tsx +0 -0
  253. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/index.tsx +0 -0
  254. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/style.ts +0 -0
  255. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareImage/type.ts +0 -0
  256. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/Preview.tsx +0 -0
  257. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/index.tsx +0 -0
  258. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/template.test.ts +0 -0
  259. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/template.ts +0 -0
  260. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/ShareText/type.ts +0 -0
  261. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/index.tsx +0 -0
  262. /package/src/features/{Conversation → ChatList}/components/ShareMessageModal/style.ts +0 -0
  263. /package/src/features/{Conversation → ChatList}/components/ThreadDivider/index.tsx +0 -0
  264. /package/src/features/{Conversation → ChatList}/components/VirtualizedList/VirtuosoContext.ts +0 -0
  265. /package/src/features/{Conversation → ChatList}/components/WideScreenContainer/index.tsx +0 -0
  266. /package/src/features/{Conversation → ChatList}/context/InPortalThreadContext.ts +0 -0
  267. /package/src/features/{Conversation → ChatList}/hooks/useChatListActionsBar.tsx +0 -0
  268. /package/src/features/{Conversation → ChatList}/hooks/useDoubleClickEdit.ts +0 -0
  269. /package/src/features/{Conversation → ChatList}/index.ts +0 -0
  270. /package/src/features/{Conversation → ChatList}/types/index.ts +0 -0
  271. /package/src/features/{Conversation → ChatList}/utils/markdown.test.ts +0 -0
  272. /package/src/features/{Conversation → ChatList}/utils/markdown.ts +0 -0
@@ -329,6 +329,13 @@
329
329
  "when": 1763453175961,
330
330
  "tag": "0046_add_parent_id",
331
331
  "breakpoints": true
332
+ },
333
+ {
334
+ "idx": 47,
335
+ "version": "7",
336
+ "when": 1763535087148,
337
+ "tag": "0047_add_slug_document",
338
+ "breakpoints": true
332
339
  }
333
340
  ],
334
341
  "version": "6"
@@ -38,7 +38,7 @@ export class DatabaseManager {
38
38
  private callbacks?: DatabaseLoadingCallbacks;
39
39
  private isLocalDBSchemaSynced = false;
40
40
 
41
- // CDN 配置
41
+ // CDN configuration
42
42
  private static WASM_CDN_URL =
43
43
  'https://registry.npmmirror.com/@electric-sql/pglite/0.2.17/files/dist/postgres.wasm';
44
44
 
@@ -57,7 +57,7 @@ export class DatabaseManager {
57
57
  return DatabaseManager.instance;
58
58
  }
59
59
 
60
- // 加载并编译 WASM 模块
60
+ // Load and compile WASM module
61
61
  private async loadWasmModule(): Promise<WebAssembly.Module> {
62
62
  const start = Date.now();
63
63
  this.callbacks?.onStateChange?.(DatabaseLoadingState.LoadingWasm);
@@ -72,7 +72,7 @@ export class DatabaseManager {
72
72
  let receivedLength = 0;
73
73
  const chunks: Uint8Array[] = [];
74
74
 
75
- // 读取数据流
75
+ // Read data stream
76
76
  // eslint-disable-next-line no-constant-condition
77
77
  while (true) {
78
78
  const { done, value } = await reader.read();
@@ -82,7 +82,7 @@ export class DatabaseManager {
82
82
  chunks.push(value);
83
83
  receivedLength += value.length;
84
84
 
85
- // 计算并报告进度
85
+ // Calculate and report progress
86
86
  const progress = Math.min(Math.round((receivedLength / contentLength) * 100), 100);
87
87
  this.callbacks?.onProgress?.({
88
88
  phase: 'wasm',
@@ -90,7 +90,7 @@ export class DatabaseManager {
90
90
  });
91
91
  }
92
92
 
93
- // 合并数据块
93
+ // Merge data chunks
94
94
  const wasmBytes = new Uint8Array(receivedLength);
95
95
  let position = 0;
96
96
  for (const chunk of chunks) {
@@ -104,7 +104,7 @@ export class DatabaseManager {
104
104
  progress: 100,
105
105
  });
106
106
 
107
- // 编译 WASM 模块
107
+ // Compile WASM module
108
108
  return WebAssembly.compile(wasmBytes);
109
109
  }
110
110
 
@@ -114,7 +114,7 @@ export class DatabaseManager {
114
114
  return await res.blob();
115
115
  };
116
116
 
117
- // 异步加载 PGlite 相关依赖
117
+ // Asynchronously load PGlite related dependencies
118
118
  private async loadDependencies() {
119
119
  const start = Date.now();
120
120
  this.callbacks?.onStateChange?.(DatabaseLoadingState.LoadingDependencies);
@@ -135,7 +135,7 @@ export class DatabaseManager {
135
135
  const result = await importPromise;
136
136
  loaded += 1;
137
137
 
138
- // 计算加载进度
138
+ // Calculate loading progress
139
139
  this.callbacks?.onProgress?.({
140
140
  phase: 'dependencies',
141
141
  progress: Math.min(Math.round((loaded / imports.length) * 100), 100),
@@ -156,7 +156,7 @@ export class DatabaseManager {
156
156
  return { IdbFs, MemoryFS, PGlite, fsBundle, vector };
157
157
  }
158
158
 
159
- // 数据库迁移方法
159
+ // Database migration method
160
160
  private async migrate(skipMultiRun = false): Promise<DrizzleInstance> {
161
161
  if (this.isLocalDBSchemaSynced && skipMultiRun) return this.db;
162
162
 
@@ -169,17 +169,17 @@ export class DatabaseManager {
169
169
  try {
170
170
  const drizzleMigration = new DrizzleMigrationModel(this.db as any);
171
171
 
172
- // 检查数据库中是否存在表
172
+ // Check if tables exist in database
173
173
  const tableCount = await drizzleMigration.getTableCounts();
174
174
 
175
- // 如果表数量大于0,则认为数据库已正确初始化
175
+ // If table count > 0, consider database properly initialized
176
176
  if (tableCount > 0) {
177
177
  this.isLocalDBSchemaSynced = true;
178
178
  return this.db;
179
179
  }
180
180
  } catch (error) {
181
181
  console.warn('Error checking table existence, proceeding with migration', error);
182
- // 如果查询失败,继续执行迁移以确保安全
182
+ // If query fails, continue migration to ensure safety
183
183
  }
184
184
  }
185
185
  }
@@ -778,15 +778,24 @@
778
778
  {
779
779
  "sql": [
780
780
  "ALTER TABLE \"documents\" ALTER COLUMN \"id\" SET DATA TYPE varchar(255);",
781
- "\nALTER TABLE \"documents\" ADD COLUMN \"parent_id\" varchar(255);",
782
- "\nALTER TABLE \"files\" ADD COLUMN \"parent_id\" varchar(255);",
783
- "\nALTER TABLE \"documents\" ADD CONSTRAINT \"documents_parent_id_documents_id_fk\" FOREIGN KEY (\"parent_id\") REFERENCES \"public\".\"documents\"(\"id\") ON DELETE set null ON UPDATE no action;",
784
- "\nALTER TABLE \"files\" ADD CONSTRAINT \"files_parent_id_documents_id_fk\" FOREIGN KEY (\"parent_id\") REFERENCES \"public\".\"documents\"(\"id\") ON DELETE set null ON UPDATE no action;",
785
- "\nCREATE INDEX \"documents_parent_id_idx\" ON \"documents\" USING btree (\"parent_id\");",
786
- "\nCREATE INDEX \"files_parent_id_idx\" ON \"files\" USING btree (\"parent_id\");"
781
+ "\nALTER TABLE \"documents\" ADD COLUMN IF NOT EXISTS \"parent_id\" varchar(255);",
782
+ "\nALTER TABLE \"files\" ADD COLUMN IF NOT EXISTS \"parent_id\" varchar(255);",
783
+ "\nDO $$ BEGIN\n ALTER TABLE \"documents\" ADD CONSTRAINT \"documents_parent_id_documents_id_fk\" FOREIGN KEY (\"parent_id\") REFERENCES \"public\".\"documents\"(\"id\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;",
784
+ "\nDO $$ BEGIN\n ALTER TABLE \"files\" ADD CONSTRAINT \"files_parent_id_documents_id_fk\" FOREIGN KEY (\"parent_id\") REFERENCES \"public\".\"documents\"(\"id\") ON DELETE set null ON UPDATE no action;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;",
785
+ "\nCREATE INDEX IF NOT EXISTS \"documents_parent_id_idx\" ON \"documents\" USING btree (\"parent_id\");",
786
+ "\nCREATE INDEX IF NOT EXISTS \"files_parent_id_idx\" ON \"files\" USING btree (\"parent_id\");"
787
787
  ],
788
788
  "bps": true,
789
789
  "folderMillis": 1763453175961,
790
- "hash": "6cfc00744de6a8f4d60b793673911bb740f9a50661663e28b843e5adae08f94a"
790
+ "hash": "6c2081c8ac22772a8276052c9ae0852a4c03463cbe998df26f85683ab356b914"
791
+ },
792
+ {
793
+ "sql": [
794
+ "ALTER TABLE \"documents\" ADD COLUMN IF NOT EXISTS \"slug\" varchar(255);",
795
+ "\nDO $$ BEGIN\n CREATE UNIQUE INDEX IF NOT EXISTS \"documents_slug_user_id_unique\" ON \"documents\" (\"slug\",\"user_id\") WHERE \"slug\" IS NOT NULL;\nEXCEPTION\n WHEN duplicate_object THEN null;\nEND $$;"
796
+ ],
797
+ "bps": true,
798
+ "folderMillis": 1763535087148,
799
+ "hash": "57a82ce14d96ffa9f140ff63f00af994e91a74703f4d2378286e36be259f117b"
791
800
  }
792
801
  ]
@@ -31,14 +31,14 @@ export class DocumentModel {
31
31
  return this.db.delete(documents).where(eq(documents.userId, this.userId));
32
32
  };
33
33
 
34
- query = async () => {
34
+ query = async (): Promise<DocumentItem[]> => {
35
35
  return this.db.query.documents.findMany({
36
36
  orderBy: [desc(documents.updatedAt)],
37
37
  where: eq(documents.userId, this.userId),
38
38
  });
39
39
  };
40
40
 
41
- findById = async (id: string) => {
41
+ findById = async (id: string): Promise<DocumentItem | undefined> => {
42
42
  return this.db.query.documents.findFirst({
43
43
  where: and(eq(documents.id, id), eq(documents.userId, this.userId)),
44
44
  });
@@ -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
  },
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable sort-keys-fix/sort-keys-fix */
2
+ import { isNotNull } from 'drizzle-orm';
2
3
  import {
3
4
  boolean,
4
5
  index,
@@ -91,6 +92,8 @@ export const documents = pgTable(
91
92
 
92
93
  editorData: jsonb('editor_data').$type<Record<string, any>>(),
93
94
 
95
+ slug: varchar('slug', { length: 255 }),
96
+
94
97
  // Timestamps
95
98
  ...timestamps,
96
99
  },
@@ -100,6 +103,9 @@ export const documents = pgTable(
100
103
  index('documents_file_id_idx').on(table.fileId),
101
104
  index('documents_parent_id_idx').on(table.parentId),
102
105
  uniqueIndex('documents_client_id_user_id_unique').on(table.clientId, table.userId),
106
+ uniqueIndex('documents_slug_user_id_unique')
107
+ .on(table.slug, table.userId)
108
+ .where(isNotNull(table.slug)),
103
109
  ],
104
110
  );
105
111
 
@@ -133,7 +139,7 @@ export const files = pgTable(
133
139
  url: text('url').notNull(),
134
140
  source: text('source').$type<FileSource>(),
135
141
 
136
- // Parent document (for folder hierarchy structure)
142
+ // Parent Folder or Document
137
143
  // @ts-ignore
138
144
  parentId: varchar('parent_id', { length: 255 }).references(() => documents.id, {
139
145
  onDelete: 'set null',
@@ -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
@@ -1499,11 +1499,12 @@ const qwenChatModels: AIChatModelCard[] = [
1499
1499
  },
1500
1500
  {
1501
1501
  abilities: {
1502
- vision: true,
1503
1502
  reasoning: true,
1503
+ vision: true,
1504
1504
  },
1505
1505
  contextWindowTokens: 131_072,
1506
- description: 'Qwen3 VL 32B 思考模式(开源版),针对高难度强推理与长视频理解场景,提供顶尖的视觉+文本推理能力。',
1506
+ description:
1507
+ 'Qwen3 VL 32B 思考模式(开源版),针对高难度强推理与长视频理解场景,提供顶尖的视觉+文本推理能力。',
1507
1508
  displayName: 'Qwen3 VL 32B Thinking',
1508
1509
  id: 'qwen3-vl-32b-thinking',
1509
1510
  maxOutput: 32_768,
@@ -1525,7 +1526,8 @@ const qwenChatModels: AIChatModelCard[] = [
1525
1526
  vision: true,
1526
1527
  },
1527
1528
  contextWindowTokens: 131_072,
1528
- description: 'Qwen3 VL 32B 非思考模式(Instruct),适用于非思考指令场景,保持强大的视觉理解能力。',
1529
+ description:
1530
+ 'Qwen3 VL 32B 非思考模式(Instruct),适用于非思考指令场景,保持强大的视觉理解能力。',
1529
1531
  displayName: 'Qwen3 VL 32B Instruct',
1530
1532
  id: 'qwen3-vl-32b-instruct',
1531
1533
  maxOutput: 32_768,
@@ -138,10 +138,10 @@ export interface OpenAICompatibleFactoryOptions<T extends Record<string, any> =
138
138
  useToolsCalling?: boolean;
139
139
  };
140
140
  models?:
141
- | ((params: { client: OpenAI }) => Promise<ChatModelCard[]>)
142
- | {
143
- transformModel?: (model: OpenAI.Model) => ChatModelCard;
144
- };
141
+ | ((params: { client: OpenAI }) => Promise<ChatModelCard[]>)
142
+ | {
143
+ transformModel?: (model: OpenAI.Model) => ChatModelCard;
144
+ };
145
145
  provider: string;
146
146
  responses?: {
147
147
  handlePayload?: (
@@ -317,9 +317,9 @@ export const createOpenAICompatibleRuntime = <T extends Record<string, any> = an
317
317
  const postPayload = chatCompletion?.handlePayload
318
318
  ? chatCompletion.handlePayload(processedPayload, this._options)
319
319
  : ({
320
- ...processedPayload,
321
- stream: processedPayload.stream ?? true,
322
- } as OpenAI.ChatCompletionCreateParamsStreaming);
320
+ ...processedPayload,
321
+ stream: processedPayload.stream ?? true,
322
+ } as OpenAI.ChatCompletionCreateParamsStreaming);
323
323
 
324
324
  if ((postPayload as any).apiMode === 'responses') {
325
325
  return this.handleResponseAPIMode(processedPayload, options);
@@ -385,13 +385,13 @@ export const createOpenAICompatibleRuntime = <T extends Record<string, any> = an
385
385
  return StreamingResponse(
386
386
  chatCompletion?.handleStream
387
387
  ? chatCompletion.handleStream(prod, {
388
- callbacks: streamOptions.callbacks,
389
- inputStartAt,
390
- })
388
+ callbacks: streamOptions.callbacks,
389
+ inputStartAt,
390
+ })
391
391
  : OpenAIStream(prod, {
392
- ...streamOptions,
393
- inputStartAt,
394
- }),
392
+ ...streamOptions,
393
+ inputStartAt,
394
+ }),
395
395
  {
396
396
  headers: options?.headers,
397
397
  },
@@ -415,9 +415,9 @@ export const createOpenAICompatibleRuntime = <T extends Record<string, any> = an
415
415
  return StreamingResponse(
416
416
  chatCompletion?.handleStream
417
417
  ? chatCompletion.handleStream(stream, {
418
- callbacks: streamOptions.callbacks,
419
- inputStartAt,
420
- })
418
+ callbacks: streamOptions.callbacks,
419
+ inputStartAt,
420
+ })
421
421
  : OpenAIStream(stream, { ...streamOptions, enableStreaming: false, inputStartAt }),
422
422
  {
423
423
  headers: options?.headers,
@@ -839,11 +839,11 @@ export const createOpenAICompatibleRuntime = <T extends Record<string, any> = an
839
839
  ...res,
840
840
  ...(reasoning || reasoning_effort
841
841
  ? {
842
- reasoning: {
843
- ...reasoning,
844
- ...(reasoning_effort && { effort: reasoning_effort }),
845
- },
846
- }
842
+ reasoning: {
843
+ ...reasoning,
844
+ ...(reasoning_effort && { effort: reasoning_effort }),
845
+ },
846
+ }
847
847
  : {}),
848
848
  input,
849
849
  ...(max_tokens && { max_output_tokens: max_tokens }),
@@ -9,12 +9,12 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@opentelemetry/api": "^1.9.0",
12
- "@opentelemetry/auto-instrumentations-node": "^0.66.0",
12
+ "@opentelemetry/auto-instrumentations-node": "^0.67.0",
13
13
  "@opentelemetry/exporter-metrics-otlp-http": "^0.208.0",
14
14
  "@opentelemetry/exporter-trace-otlp-http": "^0.208.0",
15
15
  "@opentelemetry/instrumentation": "^0.208.0",
16
16
  "@opentelemetry/instrumentation-http": "^0.208.0",
17
- "@opentelemetry/instrumentation-pg": "^0.60.0",
17
+ "@opentelemetry/instrumentation-pg": "^0.61.0",
18
18
  "@opentelemetry/resources": "^2.2.0",
19
19
  "@opentelemetry/sdk-metrics": "^2.2.0",
20
20
  "@opentelemetry/sdk-node": "^0.208.0",
@@ -0,0 +1,148 @@
1
+ #!/usr/bin/env tsx
2
+
3
+ import { execSync } from 'node:child_process';
4
+ import { readFileSync } from 'node:fs';
5
+
6
+ interface WhitelistConfig {
7
+ files?: string[];
8
+ patterns?: string[];
9
+ }
10
+
11
+ const WHITELIST_PATH = '.console-log-whitelist.json';
12
+
13
+ /**
14
+ * Load whitelist configuration
15
+ */
16
+ const loadWhitelist = (): WhitelistConfig => {
17
+ try {
18
+ const content = readFileSync(WHITELIST_PATH, 'utf8');
19
+ return JSON.parse(content);
20
+ } catch {
21
+ return { files: [], patterns: [] };
22
+ }
23
+ };
24
+
25
+ /**
26
+ * Check if a file is whitelisted
27
+ */
28
+ const isWhitelisted = (filePath: string, whitelist: WhitelistConfig): boolean => {
29
+ const normalizedPath = filePath.replaceAll('\\', '/');
30
+
31
+ // Check exact file matches
32
+ if (whitelist.files?.some((f) => normalizedPath.includes(f.replaceAll('\\', '/')))) {
33
+ return true;
34
+ }
35
+
36
+ // Check pattern matches (simple glob-like patterns)
37
+ if (whitelist.patterns) {
38
+ for (const pattern of whitelist.patterns) {
39
+ // Escape dots and replace glob patterns
40
+ // Use a placeholder for ** to avoid conflicts with single *
41
+ let regexPattern = pattern
42
+ .replaceAll('.', '\\.')
43
+ .replaceAll('**', '\u0000DOUBLESTAR\u0000')
44
+ .replaceAll('*', '[^/]*')
45
+ .replaceAll('\u0000DOUBLESTAR\u0000', '.*');
46
+
47
+ // If pattern ends with /**, match everything under that directory
48
+ // If pattern ends with **, just match everything from that point
49
+ const regex = new RegExp(`^${regexPattern}`);
50
+ if (regex.test(normalizedPath)) {
51
+ return true;
52
+ }
53
+ }
54
+ }
55
+
56
+ return false;
57
+ };
58
+
59
+ /**
60
+ * Main check function
61
+ */
62
+ const checkConsoleLogs = () => {
63
+ const whitelist = loadWhitelist();
64
+
65
+ console.log('🔍 Checking for console.log statements...\n');
66
+
67
+ try {
68
+ // Search for console.log in TypeScript and JavaScript files
69
+ const output = execSync(
70
+ `git grep -n "console\\.log" -- "*.ts" "*.tsx" "*.js" "*.jsx" "*.mts" "*.cts" || true`,
71
+ { encoding: 'utf8' },
72
+ );
73
+
74
+ if (!output.trim()) {
75
+ console.log('✅ No console.log statements found!');
76
+ return;
77
+ }
78
+
79
+ const lines = output.trim().split('\n');
80
+ const violations: Array<{ content: string, file: string; line: string; }> = [];
81
+
82
+ for (const line of lines) {
83
+ // Parse git grep output: filename:lineNumber:content
84
+ const match = line.match(/^([^:]+):(\d+):(.+)$/);
85
+ if (!match) continue;
86
+
87
+ const [, filePath, lineNumber, content] = match;
88
+
89
+ // Skip if whitelisted
90
+ if (isWhitelisted(filePath, whitelist)) {
91
+ continue;
92
+ }
93
+
94
+ // Skip comments
95
+ const trimmedContent = content.trim();
96
+ if (trimmedContent.startsWith('//') || trimmedContent.startsWith('*')) {
97
+ continue;
98
+ }
99
+
100
+ violations.push({
101
+ content: content.trim(),
102
+ file: filePath,
103
+ line: lineNumber,
104
+ });
105
+ }
106
+
107
+ if (violations.length === 0) {
108
+ console.log('✅ No console.log violations found (all matches are whitelisted or in comments)!');
109
+ return;
110
+ }
111
+
112
+ // Report violations as warnings
113
+ console.log('⚠️ Found console.log statements in the following files:\n');
114
+
115
+ // Use GitHub Actions annotation format for better visibility in CI
116
+ const isCI = process.env.CI === 'true' || process.env.GITHUB_ACTIONS === 'true';
117
+
118
+ for (const violation of violations) {
119
+ if (isCI) {
120
+ // GitHub Actions warning annotation format
121
+ console.log(`::warning file=${violation.file},line=${violation.line}::console.log found: ${violation.content}`);
122
+ } else {
123
+ console.log(` ${violation.file}:${violation.line}`);
124
+ console.log(` ${violation.content}\n`);
125
+ }
126
+ }
127
+
128
+ console.log(`\n💡 Total violations: ${violations.length}`);
129
+ console.log(
130
+ `\n📝 To whitelist files, add them to ${WHITELIST_PATH} in the following format:`,
131
+ );
132
+ console.log(`{
133
+ "files": ["path/to/file.ts"],
134
+ "patterns": ["scripts/**/*.mts", "**/*.test.ts"]
135
+ }\n`);
136
+
137
+ // Exit with 0 to not block CI, but warnings will still be visible
138
+ process.exit(0);
139
+ } catch (error: unknown) {
140
+ if (error instanceof Error && 'status' in error && error.status !== 0) {
141
+ console.error('❌ Error running git grep:', error.message);
142
+ process.exit(1);
143
+ }
144
+ throw error;
145
+ }
146
+ };
147
+
148
+ checkConsoleLogs();
@@ -10,11 +10,11 @@ dotenv.config();
10
10
  /* eslint-disable sort-keys-fix/sort-keys-fix */
11
11
  const partialBuildPages = [
12
12
  // no need for desktop
13
- {
14
- name: 'changelog',
15
- disabled: isDesktop,
16
- paths: ['src/app/[variants]/(main)/changelog'],
17
- },
13
+ // {
14
+ // name: 'changelog',
15
+ // disabled: isDesktop,
16
+ // paths: ['src/app/[variants]/(main)/changelog'],
17
+ // },
18
18
  {
19
19
  name: 'auth',
20
20
  disabled: isDesktop,
@@ -18,7 +18,7 @@ const Page = (props: { isMobile: boolean }) => {
18
18
  const { isMobile } = props;
19
19
  const { hideDocs } = useServerConfigStore(featureFlagsSelectors);
20
20
 
21
- const { data } = useSWR('changelog-index', async () => {
21
+ const { data = [] } = useSWR('changelog-index', async () => {
22
22
  const changelogService = new ChangelogService();
23
23
  return await changelogService.getChangelogIndex();
24
24
  });
@@ -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