@lobehub/chat 1.83.7 → 1.84.0

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 (669) hide show
  1. package/.github/workflows/desktop-pr-build.yml +1 -1
  2. package/CHANGELOG.md +50 -0
  3. package/apps/desktop/src/main/controllers/RemoteServerSyncCtr.ts +2 -6
  4. package/apps/desktop/src/main/core/App.ts +8 -0
  5. package/apps/desktop/src/main/menus/impls/macOS.ts +6 -0
  6. package/apps/desktop/src/main/utils/logger.ts +2 -1
  7. package/changelog/v1.json +18 -0
  8. package/locales/ar/color.json +22 -0
  9. package/locales/ar/file.json +3 -0
  10. package/locales/ar/models.json +15 -0
  11. package/locales/ar/setting.json +13 -0
  12. package/locales/ar/tool.json +10 -1
  13. package/locales/bg-BG/color.json +22 -0
  14. package/locales/bg-BG/file.json +3 -0
  15. package/locales/bg-BG/models.json +15 -0
  16. package/locales/bg-BG/setting.json +13 -0
  17. package/locales/bg-BG/tool.json +10 -1
  18. package/locales/de-DE/color.json +22 -0
  19. package/locales/de-DE/file.json +3 -0
  20. package/locales/de-DE/models.json +15 -0
  21. package/locales/de-DE/setting.json +13 -0
  22. package/locales/de-DE/tool.json +10 -1
  23. package/locales/en-US/color.json +22 -0
  24. package/locales/en-US/file.json +3 -0
  25. package/locales/en-US/models.json +15 -0
  26. package/locales/en-US/setting.json +13 -0
  27. package/locales/en-US/tool.json +10 -1
  28. package/locales/es-ES/color.json +22 -0
  29. package/locales/es-ES/file.json +3 -0
  30. package/locales/es-ES/models.json +15 -0
  31. package/locales/es-ES/setting.json +13 -0
  32. package/locales/es-ES/tool.json +10 -1
  33. package/locales/fa-IR/color.json +22 -0
  34. package/locales/fa-IR/file.json +3 -0
  35. package/locales/fa-IR/models.json +15 -0
  36. package/locales/fa-IR/setting.json +13 -0
  37. package/locales/fa-IR/tool.json +10 -1
  38. package/locales/fr-FR/color.json +22 -0
  39. package/locales/fr-FR/file.json +3 -0
  40. package/locales/fr-FR/models.json +15 -0
  41. package/locales/fr-FR/setting.json +13 -0
  42. package/locales/fr-FR/tool.json +10 -1
  43. package/locales/it-IT/color.json +22 -0
  44. package/locales/it-IT/file.json +3 -0
  45. package/locales/it-IT/models.json +15 -0
  46. package/locales/it-IT/setting.json +13 -0
  47. package/locales/it-IT/tool.json +10 -1
  48. package/locales/ja-JP/color.json +22 -0
  49. package/locales/ja-JP/file.json +3 -0
  50. package/locales/ja-JP/models.json +15 -0
  51. package/locales/ja-JP/setting.json +13 -0
  52. package/locales/ja-JP/tool.json +10 -1
  53. package/locales/ko-KR/color.json +22 -0
  54. package/locales/ko-KR/file.json +3 -0
  55. package/locales/ko-KR/models.json +15 -0
  56. package/locales/ko-KR/setting.json +13 -0
  57. package/locales/ko-KR/tool.json +10 -1
  58. package/locales/nl-NL/color.json +22 -0
  59. package/locales/nl-NL/file.json +3 -0
  60. package/locales/nl-NL/models.json +15 -0
  61. package/locales/nl-NL/setting.json +13 -0
  62. package/locales/nl-NL/tool.json +10 -1
  63. package/locales/pl-PL/color.json +22 -0
  64. package/locales/pl-PL/file.json +3 -0
  65. package/locales/pl-PL/models.json +15 -0
  66. package/locales/pl-PL/setting.json +13 -0
  67. package/locales/pl-PL/tool.json +10 -1
  68. package/locales/pt-BR/color.json +22 -0
  69. package/locales/pt-BR/file.json +3 -0
  70. package/locales/pt-BR/models.json +15 -0
  71. package/locales/pt-BR/setting.json +13 -0
  72. package/locales/pt-BR/tool.json +10 -1
  73. package/locales/ru-RU/color.json +22 -0
  74. package/locales/ru-RU/file.json +3 -0
  75. package/locales/ru-RU/models.json +15 -0
  76. package/locales/ru-RU/setting.json +13 -0
  77. package/locales/ru-RU/tool.json +10 -1
  78. package/locales/tr-TR/color.json +22 -0
  79. package/locales/tr-TR/file.json +3 -0
  80. package/locales/tr-TR/models.json +15 -0
  81. package/locales/tr-TR/setting.json +13 -0
  82. package/locales/tr-TR/tool.json +10 -1
  83. package/locales/vi-VN/color.json +22 -0
  84. package/locales/vi-VN/file.json +3 -0
  85. package/locales/vi-VN/models.json +15 -0
  86. package/locales/vi-VN/setting.json +13 -0
  87. package/locales/vi-VN/tool.json +10 -1
  88. package/locales/zh-CN/color.json +22 -0
  89. package/locales/zh-CN/common.json +2 -2
  90. package/locales/zh-CN/file.json +3 -0
  91. package/locales/zh-CN/models.json +15 -0
  92. package/locales/zh-CN/setting.json +15 -2
  93. package/locales/zh-TW/color.json +22 -0
  94. package/locales/zh-TW/file.json +3 -0
  95. package/locales/zh-TW/models.json +15 -0
  96. package/locales/zh-TW/setting.json +13 -0
  97. package/locales/zh-TW/tool.json +10 -1
  98. package/package.json +5 -5
  99. package/src/app/[variants]/(auth)/next-auth/signin/AuthSignInBox.tsx +2 -1
  100. package/src/app/[variants]/(main)/(mobile)/me/(home)/features/Header.tsx +2 -2
  101. package/src/app/[variants]/(main)/(mobile)/me/data/features/Header.tsx +3 -3
  102. package/src/app/[variants]/(main)/(mobile)/me/profile/features/Header.tsx +3 -3
  103. package/src/app/[variants]/(main)/(mobile)/me/settings/features/Header.tsx +3 -3
  104. package/src/app/[variants]/(main)/(mobile)/me/settings/features/useCategory.tsx +1 -1
  105. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/BottomActions.tsx +19 -3
  106. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/PinList/index.tsx +33 -17
  107. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/TopActions.tsx +20 -10
  108. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/index.tsx +8 -16
  109. package/src/app/[variants]/(main)/_layout/Mobile/NavBar.tsx +12 -4
  110. package/src/app/[variants]/(main)/changelog/_layout/Desktop/Container.tsx +35 -0
  111. package/src/app/[variants]/(main)/changelog/_layout/Desktop/index.tsx +19 -0
  112. package/src/app/[variants]/(main)/changelog/_layout/Mobile/Header.tsx +3 -3
  113. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/SendMore.tsx +2 -3
  114. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/ShortcutHint.tsx +2 -2
  115. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/index.tsx +4 -3
  116. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files/index.tsx +3 -3
  117. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/InputArea/index.tsx +5 -4
  118. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Send.tsx +3 -4
  119. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/AgentsSuggest.tsx +8 -14
  120. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/QuestionSuggest.tsx +6 -10
  121. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/OpeningQuestions.tsx +10 -14
  122. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/WelcomeMessage.tsx +2 -2
  123. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ZenModeToast/Toast.tsx +4 -3
  124. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/Header.tsx +2 -2
  125. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/SystemRole/SystemRoleContent.tsx +38 -44
  126. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/SystemRole/style.ts +1 -21
  127. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/ByTimeMode/GroupItem.tsx +2 -2
  128. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadItem/Content.tsx +3 -7
  129. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem/TopicContent.tsx +3 -7
  130. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicListContent/index.tsx +7 -7
  131. package/src/app/[variants]/(main)/chat/(workspace)/@topic/features/TopicSearchBar/index.tsx +1 -1
  132. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/HeaderAction.tsx +2 -2
  133. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +10 -32
  134. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Tags/KnowledgeTag.tsx +1 -2
  135. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Tags/index.tsx +2 -2
  136. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/index.tsx +3 -11
  137. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/Portal.tsx +11 -17
  138. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/TopicPanel.tsx +3 -4
  139. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/ChatHeaderTitle.tsx +3 -3
  140. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Mobile/ChatHeader/index.tsx +2 -2
  141. package/src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/index.tsx +39 -61
  142. package/src/app/[variants]/(main)/chat/(workspace)/features/TelemetryNotification.tsx +1 -2
  143. package/src/app/[variants]/(main)/chat/@session/_layout/Desktop/PanelBody.tsx +6 -2
  144. package/src/app/[variants]/(main)/chat/@session/_layout/Desktop/SessionHeader.tsx +26 -13
  145. package/src/app/[variants]/(main)/chat/@session/_layout/Mobile/SessionHeader.tsx +2 -2
  146. package/src/app/[variants]/(main)/chat/@session/features/SessionListContent/CollapseGroup/Actions.tsx +3 -3
  147. package/src/app/[variants]/(main)/chat/@session/features/SessionListContent/CollapseGroup/index.tsx +1 -1
  148. package/src/app/[variants]/(main)/chat/@session/features/SessionListContent/Inbox/index.tsx +10 -0
  149. package/src/app/[variants]/(main)/chat/@session/features/SessionListContent/List/AddButton.tsx +14 -5
  150. package/src/app/[variants]/(main)/chat/@session/features/SessionListContent/List/Item/Actions.tsx +3 -3
  151. package/src/app/[variants]/(main)/chat/@session/features/SessionListContent/List/Item/index.tsx +10 -0
  152. package/src/app/[variants]/(main)/chat/@session/features/SessionListContent/ListItem/index.tsx +2 -2
  153. package/src/app/[variants]/(main)/chat/@session/features/SessionListContent/Modals/ConfigGroupModal/GroupItem.tsx +1 -5
  154. package/src/app/[variants]/(main)/chat/@session/features/SessionListContent/Modals/ConfigGroupModal/index.tsx +2 -3
  155. package/src/app/[variants]/(main)/chat/@session/features/SessionSearchBar.tsx +1 -1
  156. package/src/app/[variants]/(main)/chat/_layout/Desktop/SessionPanel.tsx +14 -1
  157. package/src/app/[variants]/(main)/chat/_layout/Desktop/Workspace.tsx +23 -0
  158. package/src/app/[variants]/(main)/chat/_layout/Desktop/index.tsx +2 -3
  159. package/src/app/[variants]/(main)/chat/features/Migration/ExportConfigButton.tsx +1 -1
  160. package/src/app/[variants]/(main)/chat/features/Migration/Failed.tsx +3 -3
  161. package/src/app/[variants]/(main)/chat/features/Migration/Modal.tsx +2 -2
  162. package/src/app/[variants]/(main)/chat/features/Migration/Start.tsx +1 -1
  163. package/src/app/[variants]/(main)/chat/features/Migration/UpgradeButton.tsx +2 -2
  164. package/src/app/[variants]/(main)/chat/features/TogglePanelButton.tsx +42 -0
  165. package/src/app/[variants]/(main)/chat/settings/_layout/Mobile/Header.tsx +3 -3
  166. package/src/app/[variants]/(main)/chat/settings/features/HeaderContent.tsx +2 -3
  167. package/src/app/[variants]/(main)/chat/settings/features/SubmitAgentButton/SubmitAgentModal.tsx +2 -2
  168. package/src/app/[variants]/(main)/chat/settings/features/SubmitAgentButton/index.tsx +2 -3
  169. package/src/app/[variants]/(main)/chat/settings/page.tsx +13 -20
  170. package/src/app/[variants]/(main)/discover/(detail)/_layout/Mobile/Header.tsx +2 -2
  171. package/src/app/[variants]/(main)/discover/(detail)/assistant/[slug]/features/ConversationExample/index.tsx +8 -3
  172. package/src/app/[variants]/(main)/discover/(detail)/assistant/[slug]/features/Header.tsx +2 -5
  173. package/src/app/[variants]/(main)/discover/(detail)/features/Block.tsx +1 -2
  174. package/src/app/[variants]/(main)/discover/(detail)/features/HighlightBlock.tsx +1 -1
  175. package/src/app/[variants]/(main)/discover/(detail)/features/ShareButton.tsx +16 -14
  176. package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/features/Actions.tsx +2 -8
  177. package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/features/ChatWithModel.tsx +2 -2
  178. package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/features/Header.tsx +3 -7
  179. package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/features/InfoSidebar/SuggestionItem.tsx +3 -4
  180. package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/features/ParameterList/index.tsx +2 -2
  181. package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/features/ProviderList/ProviderItem.tsx +6 -19
  182. package/src/app/[variants]/(main)/discover/(detail)/plugin/[slug]/features/Header.tsx +8 -3
  183. package/src/app/[variants]/(main)/discover/(detail)/plugin/[slug]/features/InstallPlugin.tsx +2 -1
  184. package/src/app/[variants]/(main)/discover/(detail)/plugin/[slug]/features/ParameterList.tsx +3 -3
  185. package/src/app/[variants]/(main)/discover/(detail)/provider/[slug]/features/Header.tsx +1 -1
  186. package/src/app/[variants]/(main)/discover/(detail)/provider/[slug]/features/ModelList/ModelItem.tsx +3 -3
  187. package/src/app/[variants]/(main)/discover/(detail)/provider/[slug]/features/ModelList/index.tsx +3 -3
  188. package/src/app/[variants]/(main)/discover/(detail)/provider/[slug]/features/ProviderConfig.tsx +4 -4
  189. package/src/app/[variants]/(main)/discover/(list)/(home)/features/AssistantList.tsx +1 -1
  190. package/src/app/[variants]/(main)/discover/(list)/(home)/features/PluginList.tsx +1 -1
  191. package/src/app/[variants]/(main)/discover/(list)/_layout/Desktop/Nav.tsx +44 -68
  192. package/src/app/[variants]/(main)/discover/(list)/_layout/Mobile/Header.tsx +3 -3
  193. package/src/app/[variants]/(main)/discover/(list)/_layout/Mobile/Nav.tsx +2 -2
  194. package/src/app/[variants]/(main)/discover/(list)/assistants/features/Card.tsx +10 -11
  195. package/src/app/[variants]/(main)/discover/(list)/assistants/features/List.tsx +2 -2
  196. package/src/app/[variants]/(main)/discover/(list)/assistants/features/useCategory.tsx +1 -1
  197. package/src/app/[variants]/(main)/discover/(list)/models/features/Card.tsx +3 -9
  198. package/src/app/[variants]/(main)/discover/(list)/plugins/features/Card.tsx +7 -10
  199. package/src/app/[variants]/(main)/discover/(list)/plugins/features/List.tsx +2 -2
  200. package/src/app/[variants]/(main)/discover/(list)/plugins/features/useCategory.tsx +1 -1
  201. package/src/app/[variants]/(main)/discover/_layout/Desktop/Container.tsx +25 -0
  202. package/src/app/[variants]/(main)/discover/_layout/Desktop/index.tsx +3 -3
  203. package/src/app/[variants]/(main)/discover/components/CategoryContainer.tsx +1 -1
  204. package/src/app/[variants]/(main)/discover/components/CategoryMenu.tsx +1 -1
  205. package/src/app/[variants]/(main)/discover/components/Title.tsx +2 -5
  206. package/src/app/[variants]/(main)/discover/features/CreateButton/Inner.tsx +3 -3
  207. package/src/app/[variants]/(main)/discover/features/CreateButton/index.tsx +3 -3
  208. package/src/app/[variants]/(main)/discover/features/LikeButton.tsx +5 -4
  209. package/src/app/[variants]/(main)/discover/features/StoreSearchBar.tsx +1 -1
  210. package/src/app/[variants]/(main)/discover/features/useNav.tsx +7 -6
  211. package/src/app/[variants]/(main)/discover/search/_layout/Mobile/Header.tsx +3 -3
  212. package/src/app/[variants]/(main)/discover/search/_layout/Mobile/Nav.tsx +3 -3
  213. package/src/app/[variants]/(main)/files/(content)/@menu/features/FileMenu/index.tsx +1 -1
  214. package/src/app/[variants]/(main)/files/(content)/@menu/features/KnowledgeBase/Item/Content.tsx +6 -4
  215. package/src/app/[variants]/(main)/files/(content)/NotSupportClient.tsx +4 -4
  216. package/src/app/[variants]/(main)/files/(content)/_layout/Desktop/Container.tsx +24 -0
  217. package/src/app/[variants]/(main)/files/(content)/_layout/Desktop/RegisterHotkeys.tsx +10 -0
  218. package/src/app/[variants]/(main)/files/(content)/_layout/Desktop/index.tsx +5 -4
  219. package/src/app/[variants]/(main)/files/[id]/Header.tsx +3 -3
  220. package/src/app/[variants]/(main)/files/features/FileDetail.tsx +2 -2
  221. package/src/app/[variants]/(main)/profile/(home)/Client.tsx +32 -11
  222. package/src/app/[variants]/(main)/profile/(home)/features/SSOProvidersList/index.tsx +3 -4
  223. package/src/app/[variants]/(main)/profile/@category/features/CategoryContent.tsx +1 -1
  224. package/src/app/[variants]/(main)/profile/_layout/Desktop/Header.tsx +4 -3
  225. package/src/app/[variants]/(main)/profile/_layout/Desktop/SideBar.tsx +2 -2
  226. package/src/app/[variants]/(main)/profile/_layout/Mobile/Header.tsx +3 -3
  227. package/src/app/[variants]/(main)/profile/features/ClerkProfile.tsx +0 -1
  228. package/src/app/[variants]/(main)/profile/stats/Client.tsx +1 -1
  229. package/src/app/[variants]/(main)/profile/stats/features/AiHeatmaps.tsx +2 -3
  230. package/src/app/[variants]/(main)/profile/stats/features/AssistantsRank.tsx +2 -2
  231. package/src/app/[variants]/(main)/profile/stats/features/ModelsRank.tsx +2 -2
  232. package/src/app/[variants]/(main)/profile/stats/features/ShareButton/ShareModal.tsx +2 -2
  233. package/src/app/[variants]/(main)/profile/stats/features/TopicsRank.tsx +3 -5
  234. package/src/app/[variants]/(main)/repos/[id]/@menu/Menu/index.tsx +1 -1
  235. package/src/app/[variants]/(main)/repos/[id]/evals/components/Tabs.tsx +1 -1
  236. package/src/app/[variants]/(main)/repos/[id]/evals/dataset/CreateDataset/CreateForm.tsx +23 -36
  237. package/src/app/[variants]/(main)/repos/[id]/evals/dataset/CreateDataset/index.tsx +1 -1
  238. package/src/app/[variants]/(main)/repos/[id]/evals/dataset/DatasetDetail/index.tsx +2 -2
  239. package/src/app/[variants]/(main)/repos/[id]/evals/dataset/EmptyGuide/index.tsx +1 -1
  240. package/src/app/[variants]/(main)/repos/[id]/evals/evaluation/CreateEvaluation/CreateForm.tsx +45 -49
  241. package/src/app/[variants]/(main)/repos/[id]/evals/evaluation/CreateEvaluation/index.tsx +1 -1
  242. package/src/app/[variants]/(main)/repos/[id]/evals/evaluation/CreateEvaluation/useModal.tsx +1 -1
  243. package/src/app/[variants]/(main)/repos/[id]/evals/evaluation/EvaluationList/index.tsx +2 -2
  244. package/src/app/[variants]/(main)/settings/@category/features/CategoryContent.tsx +1 -1
  245. package/src/app/[variants]/(main)/settings/@category/features/UpgradeAlert.tsx +1 -2
  246. package/src/app/[variants]/(main)/settings/_layout/Desktop/Header.tsx +4 -3
  247. package/src/app/[variants]/(main)/settings/_layout/Desktop/SideBar.tsx +2 -2
  248. package/src/app/[variants]/(main)/settings/_layout/Desktop/index.tsx +10 -4
  249. package/src/app/[variants]/(main)/settings/_layout/Mobile/Header.tsx +4 -4
  250. package/src/app/[variants]/(main)/settings/about/features/Analytics.tsx +3 -5
  251. package/src/app/[variants]/(main)/settings/about/features/ItemCard.tsx +6 -26
  252. package/src/app/[variants]/(main)/settings/about/features/ItemLink.tsx +1 -5
  253. package/src/app/[variants]/(main)/settings/about/features/Version.tsx +15 -19
  254. package/src/app/[variants]/(main)/settings/about/index.tsx +1 -1
  255. package/src/app/[variants]/(main)/settings/agent/AgentMenu/index.tsx +49 -0
  256. package/src/app/[variants]/(main)/settings/agent/_layout/Desktop.tsx +20 -0
  257. package/src/app/[variants]/(main)/settings/agent/_layout/Mobile.tsx +14 -0
  258. package/src/app/[variants]/(main)/settings/agent/index.tsx +7 -0
  259. package/src/app/[variants]/(main)/settings/agent/layout.tsx +23 -0
  260. package/src/app/[variants]/(main)/settings/common/features/Common.tsx +6 -8
  261. package/src/app/[variants]/(main)/settings/common/features/Theme/ThemeSwatches/ThemeSwatchesNeutral.tsx +33 -11
  262. package/src/app/[variants]/(main)/settings/common/features/Theme/ThemeSwatches/ThemeSwatchesPrimary.tsx +60 -11
  263. package/src/app/[variants]/(main)/settings/common/features/Theme/index.tsx +5 -7
  264. package/src/app/[variants]/(main)/settings/features/UpgradeAlert.tsx +1 -2
  265. package/src/app/[variants]/(main)/settings/hooks/useCategory.tsx +1 -2
  266. package/src/app/[variants]/(main)/settings/hotkey/features/HotkeySetting.tsx +4 -6
  267. package/src/app/[variants]/(main)/settings/llm/ProviderList/Azure/index.tsx +2 -6
  268. package/src/app/[variants]/(main)/settings/llm/ProviderList/Bedrock/index.tsx +4 -4
  269. package/src/app/[variants]/(main)/settings/llm/ProviderList/Cloudflare/index.tsx +2 -2
  270. package/src/app/[variants]/(main)/settings/llm/ProviderList/Github/index.tsx +2 -3
  271. package/src/app/[variants]/(main)/settings/llm/ProviderList/HuggingFace/index.tsx +2 -3
  272. package/src/app/[variants]/(main)/settings/llm/components/Checker.tsx +2 -3
  273. package/src/app/[variants]/(main)/settings/llm/components/ProviderConfig/index.tsx +12 -4
  274. package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/ModelConfigModal/Form.tsx +2 -1
  275. package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/ModelConfigModal/index.tsx +2 -3
  276. package/src/app/[variants]/(main)/settings/llm/components/ProviderModelList/index.tsx +2 -3
  277. package/src/app/[variants]/(main)/settings/provider/(detail)/azure/page.tsx +1 -2
  278. package/src/app/[variants]/(main)/settings/provider/(detail)/bedrock/page.tsx +1 -1
  279. package/src/app/[variants]/(main)/settings/provider/(detail)/doubao/page.tsx +6 -7
  280. package/src/app/[variants]/(main)/settings/provider/(detail)/ollama/OllamaModelDownloader/index.tsx +0 -0
  281. package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/Card.tsx +10 -2
  282. package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/EnableSwitch.tsx +1 -1
  283. package/src/app/[variants]/(main)/settings/provider/(list)/ProviderGrid/index.tsx +16 -42
  284. package/src/app/[variants]/(main)/settings/provider/ProviderMenu/AddNew.tsx +10 -7
  285. package/src/app/[variants]/(main)/settings/provider/ProviderMenu/All.tsx +1 -1
  286. package/src/app/[variants]/(main)/settings/provider/ProviderMenu/List.tsx +3 -3
  287. package/src/app/[variants]/(main)/settings/provider/ProviderMenu/SortProviderModal/index.tsx +2 -2
  288. package/src/app/[variants]/(main)/settings/provider/ProviderMenu/index.tsx +16 -4
  289. package/src/app/[variants]/(main)/settings/provider/_layout/Desktop/Container.tsx +13 -0
  290. package/src/app/[variants]/(main)/settings/provider/_layout/Desktop/index.tsx +20 -0
  291. package/src/app/[variants]/(main)/settings/provider/features/CreateNewProvider/index.tsx +14 -7
  292. package/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/Form.tsx +2 -1
  293. package/src/app/[variants]/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx +2 -2
  294. package/src/app/[variants]/(main)/settings/provider/features/ModelList/DisabledModels.tsx +3 -5
  295. package/src/app/[variants]/(main)/settings/provider/features/ModelList/EmptyModels.tsx +2 -3
  296. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelConfigModal/index.tsx +2 -3
  297. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsx +1 -1
  298. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelTitle/Search.tsx +5 -17
  299. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelTitle/index.tsx +6 -6
  300. package/src/app/[variants]/(main)/settings/provider/features/ModelList/SortModelModal/index.tsx +2 -2
  301. package/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/Checker.tsx +5 -6
  302. package/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/UpdateProviderInfo/SettingModal.tsx +3 -4
  303. package/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/UpdateProviderInfo/index.tsx +3 -5
  304. package/src/app/[variants]/(main)/settings/provider/features/ProviderConfig/index.tsx +10 -3
  305. package/src/app/[variants]/(main)/settings/storage/Advanced.tsx +5 -5
  306. package/src/app/[variants]/(main)/settings/sync/features/DeviceInfo/DeviceName.tsx +4 -4
  307. package/src/app/[variants]/(main)/settings/sync/features/WebRTC/ChannelNameInput.tsx +1 -2
  308. package/src/app/[variants]/(main)/settings/sync/features/WebRTC/SyncSwitch/index.css +2 -1
  309. package/src/app/[variants]/(main)/settings/sync/features/WebRTC/index.tsx +5 -7
  310. package/src/app/[variants]/(main)/settings/system-agent/features/createForm.tsx +4 -7
  311. package/src/app/[variants]/(main)/settings/tts/features/OpenAI.tsx +4 -6
  312. package/src/app/[variants]/(main)/settings/tts/features/STT.tsx +5 -6
  313. package/src/app/[variants]/(main)/settings/tts/features/const.tsx +1 -1
  314. package/src/app/[variants]/@modal/(.)changelog/modal/features/ReadDetail.tsx +8 -30
  315. package/src/app/[variants]/loading/Client/Error.tsx +1 -1
  316. package/src/app/[variants]/oauth/consent/[uid]/Consent.tsx +3 -2
  317. package/src/app/[variants]/oauth/consent/[uid]/Login.tsx +2 -2
  318. package/src/app/[variants]/oauth/consent/[uid]/failed/page.tsx +2 -2
  319. package/src/app/desktop/devtools/page.tsx +5 -4
  320. package/src/components/404/index.tsx +1 -2
  321. package/src/components/Cell/index.tsx +2 -2
  322. package/src/components/DragUpload/index.tsx +4 -4
  323. package/src/components/Error/index.tsx +1 -2
  324. package/src/components/FeatureList/index.tsx +1 -1
  325. package/src/components/FileIcon/index.tsx +1 -1
  326. package/src/components/FileParsingStatus/EmbeddingStatus.tsx +1 -2
  327. package/src/components/FileParsingStatus/index.tsx +2 -2
  328. package/src/components/FormInput/FormInput.tsx +2 -2
  329. package/src/components/FormInput/FormPassword.tsx +3 -3
  330. package/src/components/FunctionModal/style.tsx +5 -1
  331. package/src/components/GroupIcon/index.tsx +1 -1
  332. package/src/components/IndexCard/index.tsx +2 -2
  333. package/src/components/MaxTokenSlider.tsx +3 -3
  334. package/src/components/Menu/index.tsx +5 -6
  335. package/src/components/ModelSelect/index.tsx +34 -56
  336. package/src/components/NextAuth/AuthIcons.tsx +3 -3
  337. package/src/components/Notification/index.tsx +2 -1
  338. package/src/components/OllamaSetupGuide/index.tsx +2 -2
  339. package/src/components/RepoIcon/index.tsx +1 -8
  340. package/src/components/SafeSpacing/index.tsx +3 -3
  341. package/src/components/SidebarHeader/index.tsx +6 -6
  342. package/src/components/StatisticCard/TitleWithPercentage.tsx +2 -1
  343. package/src/components/StatisticCard/index.tsx +4 -4
  344. package/src/components/TextArea/index.tsx +3 -3
  345. package/src/components/mdx/Image.tsx +1 -2
  346. package/src/config/aiModels/ai21.ts +2 -4
  347. package/src/config/aiModels/ai360.ts +4 -8
  348. package/src/config/aiModels/azure.ts +1 -2
  349. package/src/config/aiModels/azureai.ts +1 -2
  350. package/src/config/aiModels/cohere.ts +33 -35
  351. package/src/config/aiModels/doubao.ts +56 -56
  352. package/src/config/aiModels/fireworksai.ts +3 -5
  353. package/src/config/aiModels/giteeai.ts +1 -1
  354. package/src/config/aiModels/groq.ts +8 -4
  355. package/src/config/aiModels/hunyuan.ts +7 -5
  356. package/src/config/aiModels/minimax.ts +4 -2
  357. package/src/config/aiModels/mistral.ts +2 -1
  358. package/src/config/aiModels/moonshot.ts +2 -2
  359. package/src/config/aiModels/novita.ts +3 -3
  360. package/src/config/aiModels/nvidia.ts +22 -20
  361. package/src/config/aiModels/openai.ts +2 -4
  362. package/src/config/aiModels/openrouter.ts +5 -10
  363. package/src/config/aiModels/perplexity.ts +1 -2
  364. package/src/config/aiModels/ppio.ts +210 -193
  365. package/src/config/aiModels/qwen.ts +8 -4
  366. package/src/config/aiModels/sambanova.ts +39 -34
  367. package/src/config/aiModels/siliconcloud.ts +50 -50
  368. package/src/config/aiModels/stepfun.ts +6 -4
  369. package/src/config/aiModels/taichu.ts +12 -6
  370. package/src/config/aiModels/tencentcloud.ts +2 -2
  371. package/src/config/aiModels/togetherai.ts +10 -5
  372. package/src/config/aiModels/vllm.ts +11 -14
  373. package/src/config/aiModels/volcengine.ts +1 -2
  374. package/src/config/aiModels/wenxin.ts +8 -16
  375. package/src/config/aiModels/xai.ts +9 -4
  376. package/src/config/aiModels/xinference.ts +20 -25
  377. package/src/config/aiModels/zhipu.ts +3 -2
  378. package/src/config/modelProviders/ai360.ts +3 -6
  379. package/src/config/modelProviders/cohere.ts +2 -1
  380. package/src/config/modelProviders/deepseek.ts +2 -1
  381. package/src/config/modelProviders/doubao.ts +2 -1
  382. package/src/config/modelProviders/fireworksai.ts +2 -4
  383. package/src/config/modelProviders/giteeai.ts +1 -1
  384. package/src/config/modelProviders/index.ts +1 -1
  385. package/src/config/modelProviders/jina.ts +3 -2
  386. package/src/config/modelProviders/nvidia.ts +3 -2
  387. package/src/config/modelProviders/ppio.ts +249 -230
  388. package/src/config/modelProviders/siliconcloud.ts +38 -37
  389. package/src/config/modelProviders/stepfun.ts +1 -1
  390. package/src/config/modelProviders/vllm.ts +1 -1
  391. package/src/config/modelProviders/wenxin.ts +2 -4
  392. package/src/config/modelProviders/xinference.ts +2 -1
  393. package/src/config/modelProviders/zhipu.ts +1 -1
  394. package/src/const/hotkeys.ts +1 -1
  395. package/src/const/layoutTokens.test.ts +2 -2
  396. package/src/const/layoutTokens.ts +3 -3
  397. package/src/const/message.ts +1 -2
  398. package/src/features/AgentSetting/AgentCategory/index.tsx +29 -0
  399. package/src/{app/[variants]/(main)/chat/(workspace)/features/AgentSettings/CategoryContent → features/AgentSetting/AgentCategory}/useCategory.tsx +8 -6
  400. package/src/features/AgentSetting/AgentChat/index.tsx +32 -31
  401. package/src/features/AgentSetting/AgentMeta/AutoGenerateAvatar.tsx +26 -17
  402. package/src/features/AgentSetting/AgentMeta/AutoGenerateInput.tsx +2 -8
  403. package/src/features/AgentSetting/AgentMeta/AutoGenerateSelect.tsx +6 -8
  404. package/src/features/AgentSetting/AgentMeta/BackgroundSwatches.tsx +73 -13
  405. package/src/features/AgentSetting/AgentMeta/index.tsx +42 -45
  406. package/src/features/AgentSetting/AgentModal/index.tsx +39 -20
  407. package/src/features/AgentSetting/AgentOpening/OpeningMessage.tsx +3 -3
  408. package/src/features/AgentSetting/AgentOpening/OpeningQuestions.tsx +43 -41
  409. package/src/features/AgentSetting/AgentOpening/index.tsx +1 -1
  410. package/src/features/AgentSetting/AgentPlugin/AddPluginButton.tsx +2 -3
  411. package/src/features/AgentSetting/AgentPlugin/index.tsx +12 -11
  412. package/src/features/AgentSetting/AgentPrompt/TokenTag.tsx +12 -29
  413. package/src/features/AgentSetting/AgentPrompt/index.tsx +48 -147
  414. package/src/features/AgentSetting/AgentSettings.tsx +22 -18
  415. package/src/features/AgentSetting/AgentSettingsContent.tsx +39 -0
  416. package/src/features/AgentSetting/AgentTTS/SelectWithTTSPreview.tsx +8 -5
  417. package/src/features/AgentSetting/AgentTTS/index.tsx +27 -28
  418. package/src/features/AgentSetting/AgentTTS/options.tsx +1 -1
  419. package/src/features/AgentSetting/index.tsx +2 -1
  420. package/src/features/AgentSetting/store/action.ts +24 -24
  421. package/src/features/AgentSetting/store/index.ts +2 -0
  422. package/src/features/AgentSetting/store/initialState.ts +6 -7
  423. package/src/features/AgentSetting/store/selectors.ts +19 -1
  424. package/src/features/AlertBanner/CloudBanner.tsx +1 -2
  425. package/src/features/ChatInput/ActionBar/Clear.tsx +7 -5
  426. package/src/features/ChatInput/ActionBar/History.tsx +37 -35
  427. package/src/features/ChatInput/ActionBar/Knowledge/Dropdown.tsx +30 -60
  428. package/src/features/ChatInput/ActionBar/Knowledge/index.tsx +17 -13
  429. package/src/features/ChatInput/ActionBar/Model/ControlsForm.tsx +2 -1
  430. package/src/features/ChatInput/ActionBar/Model/ReasoningTokenSlider.tsx +3 -3
  431. package/src/features/ChatInput/ActionBar/Model/index.tsx +12 -38
  432. package/src/features/ChatInput/ActionBar/Params/ParamsControls.tsx +3 -17
  433. package/src/features/ChatInput/ActionBar/Params/index.tsx +10 -28
  434. package/src/features/ChatInput/ActionBar/Search/FCSearchModel.tsx +15 -4
  435. package/src/features/ChatInput/ActionBar/Search/FunctionCallingModelSelect/index.tsx +4 -3
  436. package/src/features/ChatInput/ActionBar/Search/ModelBuiltinSearch.tsx +5 -7
  437. package/src/features/ChatInput/ActionBar/Search/SwitchPanel.tsx +49 -60
  438. package/src/features/ChatInput/ActionBar/Search/index.tsx +25 -36
  439. package/src/features/ChatInput/ActionBar/Token/TokenTag.tsx +7 -6
  440. package/src/features/ChatInput/ActionBar/Tools/Dropdown.tsx +75 -77
  441. package/src/features/ChatInput/ActionBar/Tools/ToolItem.tsx +4 -30
  442. package/src/features/ChatInput/ActionBar/Tools/index.tsx +5 -3
  443. package/src/features/ChatInput/ActionBar/Upload/ClientMode.tsx +6 -4
  444. package/src/features/ChatInput/ActionBar/Upload/ServerMode.tsx +16 -8
  445. package/src/features/ChatInput/ActionBar/index.tsx +2 -2
  446. package/src/features/ChatInput/ActionBar/styles.ts +14 -0
  447. package/src/features/ChatInput/Desktop/InputArea/index.tsx +2 -2
  448. package/src/features/ChatInput/Desktop/index.tsx +1 -1
  449. package/src/features/ChatInput/STT/common.tsx +10 -5
  450. package/src/features/ChatInput/Topic/index.tsx +3 -8
  451. package/src/features/ChatInput/components/ActionDropdown.tsx +62 -0
  452. package/src/features/ChatInput/components/ActionPopover.tsx +84 -0
  453. package/src/features/ChatInput/components/UploadDetail/UploadStatus.tsx +1 -1
  454. package/src/features/Conversation/Actions/Assistant.tsx +5 -14
  455. package/src/features/Conversation/Actions/Error.tsx +3 -3
  456. package/src/features/Conversation/Actions/Fallback.tsx +8 -2
  457. package/src/features/Conversation/Actions/Tool.tsx +0 -1
  458. package/src/features/Conversation/Actions/User.tsx +6 -4
  459. package/src/features/Conversation/Actions/customAction.ts +3 -3
  460. package/src/features/Conversation/Error/APIKeyForm/Bedrock.tsx +8 -9
  461. package/src/features/Conversation/Error/APIKeyForm/ProviderApiKeyForm.tsx +1 -2
  462. package/src/features/Conversation/Error/APIKeyForm/index.tsx +1 -1
  463. package/src/features/Conversation/Error/AccessCodeForm.tsx +3 -3
  464. package/src/features/Conversation/Error/ClerkLogin/index.tsx +1 -1
  465. package/src/features/Conversation/Error/ErrorJsonViewer.tsx +1 -1
  466. package/src/features/Conversation/Error/InvalidAccessCode.tsx +2 -2
  467. package/src/features/Conversation/Error/OAuthForm.tsx +2 -2
  468. package/src/features/Conversation/Error/OllamaBizError/InvalidOllamaModel.tsx +1 -1
  469. package/src/features/Conversation/Error/OllamaDesktopSetupGuide/index.tsx +1 -1
  470. package/src/features/Conversation/Extras/TTS/Player.tsx +2 -3
  471. package/src/features/Conversation/Extras/Usage/UsageDetail/ModelCard.tsx +1 -2
  472. package/src/features/Conversation/Extras/Usage/UsageDetail/TokenProgress.tsx +0 -1
  473. package/src/features/Conversation/Messages/Assistant/FileChunks/Item/index.tsx +1 -1
  474. package/src/features/Conversation/Messages/Assistant/Tool/Inspector/ToolTitle.tsx +1 -1
  475. package/src/features/Conversation/Messages/Assistant/Tool/Render/ErrorResponse.tsx +1 -1
  476. package/src/features/Conversation/Messages/Assistant/Tool/Render/KeyValueEditor.tsx +2 -2
  477. package/src/features/Conversation/Messages/Assistant/Tool/Render/PluginSettings.tsx +2 -2
  478. package/src/features/Conversation/Messages/User/ImageFileListViewer.tsx +3 -3
  479. package/src/features/Conversation/Messages/User/MarkdownRender/ContentPreview.tsx +4 -29
  480. package/src/features/Conversation/components/BackBottom/index.tsx +1 -2
  481. package/src/features/Conversation/components/ChatItem/ActionsBar.tsx +5 -4
  482. package/src/features/Conversation/components/ChatItem/index.tsx +2 -2
  483. package/src/features/Conversation/components/History/index.tsx +1 -5
  484. package/src/features/Conversation/components/MarkdownElements/LobeArtifact/Render/Icon.tsx +5 -30
  485. package/src/features/Conversation/components/MarkdownElements/LocalFile/Render/LocalFile.tsx +1 -1
  486. package/src/features/Conversation/components/VirtualizedList/index.tsx +1 -6
  487. package/src/features/Conversation/hooks/useChatListActionsBar.tsx +7 -7
  488. package/src/features/Conversation/types/index.tsx +3 -3
  489. package/src/features/DataImporter/Error.tsx +3 -3
  490. package/src/features/DataImporter/ImportDetail.tsx +2 -2
  491. package/src/features/DataImporter/SuccessResult.tsx +2 -2
  492. package/src/features/DevPanel/FeatureFlagViewer/Form.tsx +1 -1
  493. package/src/features/DevPanel/MetadataViewer/Ld.tsx +1 -1
  494. package/src/features/DevPanel/MetadataViewer/MetaData.tsx +3 -4
  495. package/src/features/DevPanel/MetadataViewer/Og.tsx +3 -4
  496. package/src/features/DevPanel/MetadataViewer/index.tsx +3 -3
  497. package/src/features/DevPanel/PostgresViewer/SchemaSidebar/Columns.tsx +1 -1
  498. package/src/features/DevPanel/SystemInspector/index.tsx +3 -3
  499. package/src/features/DevPanel/features/FloatPanel.tsx +5 -4
  500. package/src/features/DevPanel/features/Header.tsx +1 -5
  501. package/src/features/DevPanel/features/Table/TooltipContent.tsx +1 -1
  502. package/src/features/ElectronTitlebar/Connection/ConnectionMode.tsx +1 -2
  503. package/src/features/ElectronTitlebar/Connection/RemoteStatus.tsx +8 -9
  504. package/src/features/ElectronTitlebar/Connection/Waiting.tsx +3 -3
  505. package/src/features/ElectronTitlebar/UpdateModal.tsx +2 -1
  506. package/src/features/ElectronTitlebar/UpdateNotification.tsx +2 -2
  507. package/src/features/FileManager/ChunkDrawer/Content.tsx +1 -0
  508. package/src/features/FileManager/ChunkDrawer/SimilaritySearchList/Item.tsx +1 -1
  509. package/src/features/FileManager/FileList/FileListItem/DropdownMenu.tsx +2 -2
  510. package/src/features/FileManager/FileList/FileListItem/index.tsx +5 -3
  511. package/src/features/FileManager/FileList/FileSkeleton.tsx +1 -1
  512. package/src/features/FileManager/FileList/ToolBar/Config.tsx +3 -2
  513. package/src/features/FileManager/FileList/ToolBar/MultiSelectActions.tsx +11 -3
  514. package/src/features/FileManager/FileList/index.tsx +1 -1
  515. package/src/features/FileManager/Header/FilesSearchBar.tsx +3 -8
  516. package/src/features/FileManager/Header/TogglePanelButton.tsx +42 -0
  517. package/src/features/FileManager/Header/UploadFileButton.tsx +4 -4
  518. package/src/features/FileManager/Header/index.tsx +14 -26
  519. package/src/features/FileManager/index.tsx +0 -1
  520. package/src/features/FileSidePanel/index.tsx +1 -1
  521. package/src/features/FileViewer/NotSupport/index.tsx +1 -2
  522. package/src/features/FileViewer/Renderer/TXT/index.tsx +6 -1
  523. package/src/features/HotkeyHelperPanel/index.tsx +3 -3
  524. package/src/features/InitClientDB/EnableModal.tsx +2 -3
  525. package/src/features/InitClientDB/ErrorResult.tsx +4 -4
  526. package/src/features/InitClientDB/features/DatabaseRepair/Backup.tsx +3 -3
  527. package/src/features/InitClientDB/features/DatabaseRepair/Diagnosis.tsx +2 -2
  528. package/src/features/InitClientDB/features/DatabaseRepair/Repair.tsx +2 -2
  529. package/src/features/InitClientDB/features/DatabaseRepair/index.tsx +12 -6
  530. package/src/features/KnowledgeBaseModal/AddFilesToKnowledgeBase/SelectForm.tsx +45 -62
  531. package/src/features/KnowledgeBaseModal/AddFilesToKnowledgeBase/index.tsx +1 -1
  532. package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/Item/Action.tsx +1 -2
  533. package/src/features/KnowledgeBaseModal/AssignKnowledgeBase/List.tsx +1 -1
  534. package/src/features/KnowledgeBaseModal/CreateNew/CreateForm.tsx +28 -38
  535. package/src/features/KnowledgeBaseModal/CreateNew/index.tsx +1 -1
  536. package/src/features/MobileSwitchLoading/index.tsx +1 -1
  537. package/src/features/MobileTabBar/index.tsx +5 -4
  538. package/src/features/ModelParamsControl/Temperature.tsx +1 -1
  539. package/src/features/ModelSelect/index.tsx +14 -4
  540. package/src/features/ModelSwitchPanel/index.tsx +4 -13
  541. package/src/features/OllamaModelDownloader/index.tsx +2 -2
  542. package/src/features/PluginDetailModal/Meta.tsx +13 -41
  543. package/src/features/PluginDetailModal/index.tsx +34 -30
  544. package/src/features/PluginDevModal/LocalForm.tsx +1 -0
  545. package/src/features/PluginDevModal/MCPManifestForm/ArgsInput.tsx +1 -1
  546. package/src/features/PluginDevModal/MCPManifestForm/MCPTypeSelect.tsx +3 -3
  547. package/src/features/PluginDevModal/MCPManifestForm/index.tsx +24 -24
  548. package/src/features/PluginDevModal/PluginPreview.tsx +14 -17
  549. package/src/features/PluginDevModal/UrlManifestForm.tsx +1 -1
  550. package/src/features/PluginDevModal/index.tsx +3 -2
  551. package/src/features/PluginSettings/PluginSettingRender.tsx +11 -43
  552. package/src/features/PluginSettings/index.tsx +38 -25
  553. package/src/features/PluginStore/AddPluginButton.tsx +2 -3
  554. package/src/features/PluginStore/InstalledPluginList.tsx +1 -3
  555. package/src/features/PluginStore/OnlineList.tsx +2 -4
  556. package/src/features/PluginStore/PluginItem/Action.tsx +2 -2
  557. package/src/features/PluginStore/PluginItem/PluginAvatar.tsx +8 -2
  558. package/src/features/PluginStore/PluginItem/PluginTag.tsx +2 -31
  559. package/src/features/PluginStore/index.tsx +2 -2
  560. package/src/features/PluginTag/PluginStatus.tsx +2 -2
  561. package/src/features/PluginTag/index.tsx +1 -3
  562. package/src/features/PluginsUI/Render/DefaultType/SystemJsRender/utils.ts +0 -1
  563. package/src/features/Portal/Artifacts/Body/Renderer/SVG.tsx +4 -4
  564. package/src/features/Portal/Artifacts/Body/Renderer/index.tsx +1 -1
  565. package/src/features/Portal/Artifacts/Body/index.tsx +6 -3
  566. package/src/features/Portal/Artifacts/Header.tsx +11 -6
  567. package/src/features/Portal/FilePreview/Body/index.tsx +20 -7
  568. package/src/features/Portal/Plugins/Header.tsx +1 -1
  569. package/src/features/Portal/Thread/Chat/ChatInput/Footer.tsx +2 -2
  570. package/src/features/Portal/Thread/Header/Active.tsx +12 -6
  571. package/src/features/Portal/Thread/Header/New.tsx +13 -12
  572. package/src/features/Portal/Thread/Header/index.tsx +10 -3
  573. package/src/features/Setting/SettingContainer.tsx +12 -19
  574. package/src/features/ShareModal/ShareImage/Preview.tsx +2 -1
  575. package/src/features/ShareModal/ShareImage/index.tsx +8 -11
  576. package/src/features/ShareModal/ShareJSON/Preview.tsx +1 -1
  577. package/src/features/ShareModal/ShareJSON/index.tsx +6 -5
  578. package/src/features/ShareModal/ShareText/index.tsx +8 -5
  579. package/src/features/ShareModal/index.tsx +2 -3
  580. package/src/features/SyncStatusInspector/DisableSync.tsx +2 -2
  581. package/src/features/SyncStatusInspector/EnableSync.tsx +3 -3
  582. package/src/features/SyncStatusInspector/EnableTag.tsx +2 -2
  583. package/src/features/User/PlanTag.tsx +1 -2
  584. package/src/features/User/UserAvatar.tsx +1 -1
  585. package/src/features/User/UserLoginOrSignup/Community.tsx +1 -1
  586. package/src/features/User/UserPanel/LangButton.tsx +1 -1
  587. package/src/features/User/UserPanel/ThemeButton.tsx +1 -1
  588. package/src/features/User/UserPanel/useMenu.tsx +2 -1
  589. package/src/hooks/useHotkeys/filesScope.ts +37 -0
  590. package/src/hooks/useHotkeys/index.ts +1 -0
  591. package/src/hooks/useScreenshot.ts +1 -1
  592. package/src/layout/GlobalProvider/Locale.tsx +41 -1
  593. package/src/layout/GlobalProvider/index.tsx +12 -12
  594. package/src/libs/agent-runtime/ai360/index.ts +24 -31
  595. package/src/libs/agent-runtime/baichuan/index.ts +20 -20
  596. package/src/libs/agent-runtime/cohere/index.ts +10 -11
  597. package/src/libs/agent-runtime/deepseek/index.ts +25 -17
  598. package/src/libs/agent-runtime/fireworksai/index.ts +11 -14
  599. package/src/libs/agent-runtime/giteeai/index.ts +19 -25
  600. package/src/libs/agent-runtime/groq/index.ts +14 -16
  601. package/src/libs/agent-runtime/higress/index.ts +17 -17
  602. package/src/libs/agent-runtime/huggingface/index.ts +19 -23
  603. package/src/libs/agent-runtime/hunyuan/index.test.ts +40 -40
  604. package/src/libs/agent-runtime/hunyuan/index.ts +16 -21
  605. package/src/libs/agent-runtime/internlm/index.ts +9 -13
  606. package/src/libs/agent-runtime/jina/index.ts +12 -16
  607. package/src/libs/agent-runtime/lmstudio/index.ts +9 -13
  608. package/src/libs/agent-runtime/minimax/index.ts +3 -3
  609. package/src/libs/agent-runtime/moonshot/index.ts +26 -30
  610. package/src/libs/agent-runtime/novita/index.ts +17 -17
  611. package/src/libs/agent-runtime/nvidia/index.ts +9 -13
  612. package/src/libs/agent-runtime/ppio/fixtures/models.json +4 -10
  613. package/src/libs/agent-runtime/ppio/index.ts +19 -14
  614. package/src/libs/agent-runtime/siliconcloud/index.ts +19 -19
  615. package/src/libs/agent-runtime/spark/index.ts +1 -2
  616. package/src/libs/agent-runtime/stepfun/index.ts +29 -36
  617. package/src/libs/agent-runtime/tencentcloud/index.ts +12 -16
  618. package/src/libs/agent-runtime/utils/cloudflareHelpers.ts +1 -6
  619. package/src/libs/agent-runtime/utils/streams/openai.test.ts +0 -1
  620. package/src/libs/agent-runtime/vllm/index.ts +9 -13
  621. package/src/libs/agent-runtime/wenxin/index.test.ts +26 -18
  622. package/src/libs/agent-runtime/wenxin/index.ts +1 -1
  623. package/src/libs/agent-runtime/xai/index.ts +11 -13
  624. package/src/libs/agent-runtime/xinference/index.ts +15 -13
  625. package/src/libs/agent-runtime/zeroone/index.ts +9 -13
  626. package/src/libs/agent-runtime/zhipu/index.ts +33 -30
  627. package/src/libs/langchain/loaders/epub/index.ts +3 -2
  628. package/src/libs/langchain/loaders/index.ts +1 -1
  629. package/src/libs/swr/index.ts +8 -1
  630. package/src/locales/default/color.ts +22 -0
  631. package/src/locales/default/common.ts +2 -2
  632. package/src/locales/default/file.ts +3 -0
  633. package/src/locales/default/index.ts +2 -0
  634. package/src/locales/default/setting.ts +15 -2
  635. package/src/server/modules/ContentChunk/rules.test.ts +1 -0
  636. package/src/server/utils/tempFileManager.ts +1 -1
  637. package/src/services/message/type.ts +2 -1
  638. package/src/services/plugin/client.test.ts +3 -1
  639. package/src/store/agent/selectors.ts +1 -1
  640. package/src/store/aiInfra/index.ts +1 -1
  641. package/src/store/chat/slices/builtinTool/actions/dalle.ts +0 -2
  642. package/src/store/chat/slices/portal/initialState.ts +7 -2
  643. package/src/store/electron/actions/sync.ts +4 -7
  644. package/src/store/session/index.ts +1 -1
  645. package/src/tools/dalle/Render/Item/EditMode.tsx +3 -3
  646. package/src/tools/dalle/Render/Item/Error.tsx +3 -4
  647. package/src/tools/dalle/Render/Item/index.tsx +1 -1
  648. package/src/tools/dalle/Render/ToolBar.tsx +2 -1
  649. package/src/tools/dalle/Render/index.tsx +4 -3
  650. package/src/tools/local-files/Render/ListFiles/index.tsx +1 -1
  651. package/src/tools/local-files/Render/ReadLocalFile/ReadFileView.tsx +1 -1
  652. package/src/tools/local-files/Render/SearchFiles/SearchQuery/index.tsx +5 -6
  653. package/src/tools/local-files/components/FileItem.tsx +1 -1
  654. package/src/tools/web-browsing/Portal/PageContent/index.tsx +14 -8
  655. package/src/tools/web-browsing/Portal/Search/Footer.tsx +2 -3
  656. package/src/tools/web-browsing/Portal/Search/ResultList/SearchItem/TitleExtra.tsx +2 -2
  657. package/src/tools/web-browsing/Render/Search/ConfigForm/Form.tsx +2 -3
  658. package/src/tools/web-browsing/Render/Search/ConfigForm/index.tsx +1 -1
  659. package/src/tools/web-browsing/Render/Search/SearchResult/index.tsx +3 -3
  660. package/src/tools/web-browsing/Render/Search/index.tsx +1 -1
  661. package/src/tools/web-browsing/components/SearchBar.tsx +3 -8
  662. package/src/types/hotkey.ts +1 -0
  663. package/apps/desktop/README.md +0 -6
  664. package/src/app/[variants]/(main)/changelog/_layout/Desktop.tsx +0 -25
  665. package/src/app/[variants]/(main)/chat/(workspace)/features/AgentSettings/CategoryContent/index.tsx +0 -37
  666. package/src/app/[variants]/(main)/discover/features/ModelFeatureTags.tsx +0 -86
  667. package/src/app/[variants]/(main)/settings/provider/_layout/Desktop.tsx +0 -37
  668. package/src/features/AgentSetting/useSyncAgemtSettings.ts +0 -14
  669. package/src/features/ChatInput/ActionBar/Search/ExaIcon.tsx +0 -15
@@ -9,12 +9,12 @@ import { LangChainLoaderType } from '@/libs/langchain/types';
9
9
  import { CodeLoader } from './code';
10
10
  import { CsVLoader } from './csv';
11
11
  import { DocxLoader } from './docx';
12
+ import { EPubLoader } from './epub';
12
13
  import { LatexLoader } from './latex';
13
14
  import { MarkdownLoader } from './markdown';
14
15
  import { PdfLoader } from './pdf';
15
16
  import { PPTXLoader } from './pptx';
16
17
  import { TextLoader } from './txt';
17
- import { EPubLoader } from './epub';
18
18
 
19
19
  class LangChainError extends Error {
20
20
  constructor(message: string) {
@@ -1,5 +1,7 @@
1
1
  import useSWR, { SWRHook } from 'swr';
2
2
 
3
+ import { isDesktop } from '@/const/version';
4
+
3
5
  /**
4
6
  * This type of request method is relatively flexible data, which will be triggered on the first time
5
7
  *
@@ -25,7 +27,12 @@ export const useClientDataSWR: SWRHook = (key, fetch, config) =>
25
27
  // Cause issue like this: https://github.com/lobehub/lobe-chat/issues/532
26
28
  // we need to set it to 0.
27
29
  dedupingInterval: 0,
28
- focusThrottleInterval: 5 * 60 * 1000,
30
+ focusThrottleInterval:
31
+ // desktop 1.5s
32
+ isDesktop
33
+ ? 1500
34
+ : // web 300s
35
+ 5 * 60 * 1000,
29
36
  refreshWhenOffline: false,
30
37
  revalidateOnFocus: true,
31
38
  revalidateOnReconnect: true,
@@ -0,0 +1,22 @@
1
+ export default {
2
+ blue: '拂晓蓝',
3
+ custom: '自定义',
4
+ cyan: '明青',
5
+ default: '默认',
6
+ geekblue: '极客蓝',
7
+ gold: '金盏花',
8
+ green: '极光绿',
9
+ lime: '青柠',
10
+ magenta: '法式洋红',
11
+ mauve: '藤萝紫',
12
+ olive: '橄榄绿',
13
+ orange: '日暮',
14
+ presets: '预设',
15
+ purple: '酱紫',
16
+ red: '薄暮',
17
+ sage: '鼠尾草绿',
18
+ sand: '沙滩',
19
+ slate: '石板灰',
20
+ volcano: '火山',
21
+ yellow: '日出',
22
+ };
@@ -26,8 +26,8 @@ export default {
26
26
  showDetail: '查看详情',
27
27
  },
28
28
  autoGenerate: '自动补全',
29
- autoGenerateTooltip: '基于提示词自动补全助手描述',
30
- autoGenerateTooltipDisabled: '请填写提示词后使用自动补全功能',
29
+ autoGenerateTooltip: '基于角色设定自动补全助手描述',
30
+ autoGenerateTooltipDisabled: '请填写角色设定后使用自动补全功能',
31
31
  back: '返回',
32
32
  batchDelete: '批量删除',
33
33
  blog: '产品博客',
@@ -72,6 +72,9 @@ export default {
72
72
  websites: '网页',
73
73
  },
74
74
  title: '文件',
75
+ toggleLeftPanel: {
76
+ title: '显示/隐藏左侧面板',
77
+ },
75
78
  uploadDock: {
76
79
  body: {
77
80
  collapse: '收起',
@@ -2,6 +2,7 @@ import auth from './auth';
2
2
  import changelog from './changelog';
3
3
  import chat from './chat';
4
4
  import clerk from './clerk';
5
+ import color from './color';
5
6
  import common from './common';
6
7
  import components from './components';
7
8
  import discover from './discover';
@@ -30,6 +31,7 @@ const resources = {
30
31
  changelog,
31
32
  chat,
32
33
  clerk,
34
+ color,
33
35
  common,
34
36
  components,
35
37
  discover,
@@ -146,12 +146,13 @@ export default {
146
146
  },
147
147
  settingAgent: {
148
148
  avatar: {
149
- title: '头像',
149
+ title: '助手头像',
150
150
  },
151
151
  backgroundColor: {
152
- title: '背景色',
152
+ title: '头像背景色',
153
153
  },
154
154
  description: {
155
+ desc: '简单介绍你的助手,不作为角色设定',
155
156
  placeholder: '请输入助手描述',
156
157
  title: '助手描述',
157
158
  },
@@ -163,7 +164,9 @@ export default {
163
164
  placeholder: '请输入角色 Prompt 提示词',
164
165
  title: '角色设定',
165
166
  },
167
+ submit: '更新助手信息',
166
168
  tag: {
169
+ desc: '助手标签将在助手市场中展示',
167
170
  placeholder: '请输入标签',
168
171
  title: '标签',
169
172
  },
@@ -208,6 +211,7 @@ export default {
208
211
  placeholder: '预处理模版 {{text}} 将替换为实时输入信息',
209
212
  title: '用户输入预处理',
210
213
  },
214
+ submit: '更新聊天偏好',
211
215
  title: '聊天设置',
212
216
  },
213
217
  settingModel: {
@@ -245,6 +249,7 @@ export default {
245
249
  },
246
250
  title: '推理强度',
247
251
  },
252
+ submit: '更新模型设置',
248
253
  temperature: {
249
254
  desc: '数值越大,回答越有创意和想象力;数值越小,回答越严谨',
250
255
  title: '创意活跃度',
@@ -321,6 +326,7 @@ export default {
321
326
  desc: '其中 browser 为浏览器原生的语音识别服务',
322
327
  title: '语音识别服务',
323
328
  },
329
+ submit: '更新语音服务',
324
330
  title: '语音服务',
325
331
  tts: '语音合成设置',
326
332
  ttsService: {
@@ -398,6 +404,12 @@ export default {
398
404
  placeholder: '请输入助手的标识符,需要是唯一的,比如 web-development',
399
405
  tooltips: '分享到助手市场',
400
406
  },
407
+ submitFooter: {
408
+ reset: '重置',
409
+ submit: '保存',
410
+ unSaved: '未保存更改',
411
+ unSavedWarning: '当前有未保存的更改',
412
+ },
401
413
  sync: {
402
414
  device: {
403
415
  deviceName: {
@@ -449,6 +461,7 @@ export default {
449
461
  placeholder: '请输入自定义提示词',
450
462
  title: '自定义提示词',
451
463
  },
464
+ helpInfo: '当创建新助手时,将以默认助手设置作为预设值。',
452
465
  historyCompress: {
453
466
  label: '会话历史模型',
454
467
  modelDesc: '指定用于压缩会话历史的模型',
@@ -1,4 +1,5 @@
1
1
  import { describe, expect, it } from 'vitest';
2
+
2
3
  import { ChunkingRuleParser } from './rules';
3
4
 
4
5
  describe('ChunkingRuleParser', () => {
@@ -1,4 +1,4 @@
1
- import { mkdtempSync, rmSync , writeFileSync, existsSync } from 'node:fs';
1
+ import { existsSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';
2
2
  import { tmpdir } from 'node:os';
3
3
  import { join } from 'node:path';
4
4
  import { v4 as uuidv4 } from 'uuid';
@@ -8,7 +8,8 @@ import {
8
8
  ChatTranslate,
9
9
  CreateMessageParams,
10
10
  MessageItem,
11
- ModelRankItem, UpdateMessageParams,
11
+ ModelRankItem,
12
+ UpdateMessageParams,
12
13
  } from '@/types/message';
13
14
 
14
15
  /* eslint-disable typescript-sort-keys/interface */
@@ -159,7 +159,9 @@ describe('PluginService', () => {
159
159
  // Arrange
160
160
  const id = 'plugin-id';
161
161
  const settings = { color: 'blue' };
162
- await clientDB.insert(userInstalledPlugins).values([{ identifier: id, type: 'plugin', userId }]);
162
+ await clientDB
163
+ .insert(userInstalledPlugins)
164
+ .values([{ identifier: id, type: 'plugin', userId }]);
163
165
 
164
166
  // Act
165
167
  await pluginService.updatePluginSettings(id, settings);
@@ -1 +1 @@
1
- export { agentChatConfigSelectors,agentSelectors } from './slices/chat/selectors';
1
+ export { agentChatConfigSelectors, agentSelectors } from './slices/chat/selectors';
@@ -1,2 +1,2 @@
1
1
  export * from './selectors';
2
- export { getAiInfraStoreState,useAiInfraStore } from './store';
2
+ export { getAiInfraStoreState, useAiInfraStore } from './store';
@@ -11,8 +11,6 @@ import { chatSelectors } from '@/store/chat/selectors';
11
11
  import { ChatStore } from '@/store/chat/store';
12
12
  import { useFileStore } from '@/store/file';
13
13
  import { DallEImageItem } from '@/types/tool/dalle';
14
-
15
-
16
14
  import { setNamespace } from '@/utils/storeDebug';
17
15
 
18
16
  const n = setNamespace('tool');
@@ -1,5 +1,10 @@
1
1
  import { PortalArtifact } from '@/types/artifact';
2
2
 
3
+ export enum ArtifactDisplayMode {
4
+ Code = 'code',
5
+ Preview = 'preview',
6
+ }
7
+
3
8
  export interface PortalFile {
4
9
  chunkId?: string;
5
10
  chunkText?: string;
@@ -8,7 +13,7 @@ export interface PortalFile {
8
13
 
9
14
  export interface ChatPortalState {
10
15
  portalArtifact?: PortalArtifact;
11
- portalArtifactDisplayMode?: 'code' | 'preview';
16
+ portalArtifactDisplayMode?: ArtifactDisplayMode;
12
17
  portalFile?: PortalFile;
13
18
  portalMessageDetail?: string;
14
19
  portalThreadId?: string;
@@ -17,6 +22,6 @@ export interface ChatPortalState {
17
22
  }
18
23
 
19
24
  export const initialChatPortalState: ChatPortalState = {
20
- portalArtifactDisplayMode: 'preview',
25
+ portalArtifactDisplayMode: ArtifactDisplayMode.Preview,
21
26
  showPortal: false,
22
27
  };
@@ -17,7 +17,6 @@ export interface ElectronRemoteServerAction {
17
17
  refreshServerConfig: () => Promise<void>;
18
18
  refreshUserData: () => Promise<void>;
19
19
  useDataSyncConfig: () => SWRResponse;
20
- useRefreshDataWhenActive: (active?: boolean) => SWRResponse;
21
20
  }
22
21
 
23
22
  const REMOTE_SERVER_CONFIG_KEY = 'electron:getRemoteServerConfig';
@@ -109,14 +108,12 @@ export const remoteSyncSlice: StateCreator<
109
108
  },
110
109
  {
111
110
  onSuccess: (data) => {
111
+ if (!isEqual(data, get().dataSyncConfig)) {
112
+ get().refreshUserData();
113
+ }
114
+
112
115
  set({ dataSyncConfig: data, isInitRemoteServerConfig: true });
113
116
  },
114
117
  },
115
118
  ),
116
- useRefreshDataWhenActive: (active) =>
117
- useSWR(['refreshDataWhenActive', active], async () => {
118
- if (!active) return;
119
-
120
- await get().refreshUserData();
121
- }),
122
119
  });
@@ -1,2 +1,2 @@
1
1
  export type { SessionStore } from './store';
2
- export { getSessionStoreState,useSessionStore } from './store';
2
+ export { getSessionStoreState, useSessionStore } from './store';
@@ -1,5 +1,5 @@
1
- import { TextArea } from '@lobehub/ui';
2
- import { Button, Radio, Select } from 'antd';
1
+ import { Button, Select, TextArea } from '@lobehub/ui';
2
+ import { Radio } from 'antd';
3
3
  import { memo } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { Flexbox } from 'react-layout-kit';
@@ -15,7 +15,7 @@ const EditMode = memo<EditModeProps>(({ prompt, setEdit, style, size, quality })
15
15
 
16
16
  return (
17
17
  <Flexbox gap={16}>
18
- <TextArea style={{ minHeight: 120 }} type={'block'} value={prompt} />
18
+ <TextArea style={{ minHeight: 120 }} value={prompt} variant={'filled'} />
19
19
  <Flexbox horizontal justify={'space-between'}>
20
20
  风格
21
21
  <Radio.Group
@@ -1,5 +1,4 @@
1
- import { Alert, Highlighter, Icon } from '@lobehub/ui';
2
- import { Button } from 'antd';
1
+ import { Alert, Button, Highlighter } from '@lobehub/ui';
3
2
  import { LucideRefreshCw } from 'lucide-react';
4
3
  import { memo } from 'react';
5
4
  import { useTranslation } from 'react-i18next';
@@ -27,7 +26,7 @@ const Error = memo<ErrorProps>(({ messageId, index }) => {
27
26
  <Flexbox gap={12}>
28
27
  <Alert
29
28
  extra={
30
- <Highlighter copyButtonSize={'small'} language={'json'}>
29
+ <Highlighter actionIconSize={'small'} language={'json'}>
31
30
  {JSON.stringify(error?.body || error, null, 2)}
32
31
  </Highlighter>
33
32
  }
@@ -36,7 +35,7 @@ const Error = memo<ErrorProps>(({ messageId, index }) => {
36
35
  type={'error'}
37
36
  />
38
37
  <Button
39
- icon={<Icon icon={LucideRefreshCw} />}
38
+ icon={LucideRefreshCw}
40
39
  onClick={() => reInvokeToolMessage(messageId)}
41
40
  type={'primary'}
42
41
  >
@@ -68,7 +68,7 @@ const ImageItem = memo<DallEImageItem & { index: number; messageId: string }>(
68
68
  <Flexbox gap={12}>
69
69
  <Flexbox>
70
70
  <Highlighter
71
- copyButtonSize={'small'}
71
+ actionIconSize={'small'}
72
72
  fileName={t('dalle.prompt')}
73
73
  fullFeatured
74
74
  language={'prompt'}
@@ -1,4 +1,5 @@
1
- import { Button, Checkbox } from 'antd';
1
+ import { Button } from '@lobehub/ui';
2
+ import { Checkbox } from 'antd';
2
3
  import { memo } from 'react';
3
4
  import { useTranslation } from 'react-i18next';
4
5
  import { Flexbox } from 'react-layout-kit';
@@ -1,4 +1,4 @@
1
- import { ActionIcon, ImageGallery } from '@lobehub/ui';
1
+ import { ActionIcon, PreviewGroup } from '@lobehub/ui';
2
2
  import { Download } from 'lucide-react';
3
3
  import { memo, useRef } from 'react';
4
4
  import { Flexbox } from 'react-layout-kit';
@@ -29,13 +29,14 @@ const DallE = memo<BuiltinRenderProps<DallEImageItem[]>>(({ content, messageId }
29
29
  <Flexbox gap={16}>
30
30
  {/* 没想好工具条的作用 */}
31
31
  {/*<ToolBar content={content} messageId={messageId} />*/}
32
- <ImageGallery
32
+ <PreviewGroup
33
33
  preview={{
34
34
  // 切换图片时设置
35
35
  onChange: (current: number) => {
36
36
  currentRef.current = current;
37
37
  },
38
38
  // 点击预览显示时设置
39
+
39
40
  onVisibleChange: (visible: boolean, _prevVisible: boolean, current: number) => {
40
41
  currentRef.current = current;
41
42
  },
@@ -43,7 +44,7 @@ const DallE = memo<BuiltinRenderProps<DallEImageItem[]>>(({ content, messageId }
43
44
  }}
44
45
  >
45
46
  <GalleyGrid items={content.map((c) => ({ ...c, messageId }))} renderItem={ImageItem} />
46
- </ImageGallery>
47
+ </PreviewGroup>
47
48
  </Flexbox>
48
49
  );
49
50
  });
@@ -56,7 +56,7 @@ const ListFiles = memo<ListFilesProps>(({ messageId, pluginError, args, pluginSt
56
56
  localFileService.openLocalFolder({ isDirectory: true, path: args.path });
57
57
  }}
58
58
  >
59
- <FileIcon fileName={args.path} isDirectory size={22} variant={'pure'} />
59
+ <FileIcon fileName={args.path} isDirectory size={22} variant={'raw'} />
60
60
  <Typography.Text className={styles.path} ellipsis>
61
61
  {args.path}
62
62
  </Typography.Text>
@@ -116,7 +116,7 @@ const ReadFileView = memo<ReadFileViewProps>(
116
116
  onClick={handleToggleExpand}
117
117
  >
118
118
  <Flexbox align={'center'} flex={1} gap={0} horizontal style={{ overflow: 'hidden' }}>
119
- <FileIcon fileName={filename} fileType={fileType} size={24} variant={'pure'} />
119
+ <FileIcon fileName={filename} fileType={fileType} size={24} variant={'raw'} />
120
120
  <Flexbox horizontal>
121
121
  <Typography.Text className={styles.fileName} ellipsis>
122
122
  {filename}
@@ -1,6 +1,5 @@
1
1
  import { LocalSearchFilesParams } from '@lobechat/electron-client-ipc';
2
- import { ActionIcon, Icon } from '@lobehub/ui';
3
- import { Button, Input, Space } from 'antd';
2
+ import { ActionIcon, Button, Icon, SearchBar } from '@lobehub/ui';
4
3
  import { SearchIcon, XIcon } from 'lucide-react';
5
4
  import { memo, useState } from 'react';
6
5
  import { useTranslation } from 'react-i18next';
@@ -36,13 +35,13 @@ const SearchQueryView = memo<SearchQueryViewProps>(({ messageId, args, pluginSta
36
35
 
37
36
  return editing ? (
38
37
  <Flexbox align={'center'} flex={1} gap={8} height={32} horizontal>
39
- <Space.Compact style={{ width: '100%' }}>
40
- <Input
38
+ <Flexbox gap={8}>
39
+ <SearchBar
41
40
  autoFocus
42
41
  onChange={(e) => {
43
42
  setQuery(e.target.value);
44
43
  }}
45
- onPressEnter={updateAndSearch}
44
+ onSearch={updateAndSearch}
46
45
  placeholder={t('search.searchBar.placeholder')}
47
46
  style={{ minWidth: 400 }}
48
47
  value={query}
@@ -56,7 +55,7 @@ const SearchQueryView = memo<SearchQueryViewProps>(({ messageId, args, pluginSta
56
55
  >
57
56
  {t('search.searchBar.button')}
58
57
  </Button>
59
- </Space.Compact>
58
+ </Flexbox>
60
59
  <ActionIcon icon={XIcon} onClick={() => setEditing(false)} />
61
60
  </Flexbox>
62
61
  ) : (
@@ -76,7 +76,7 @@ const FileItem = memo<FileItemProps>(
76
76
  fileType={type}
77
77
  isDirectory={isDirectory}
78
78
  size={16}
79
- variant={'pure'}
79
+ variant={'raw'}
80
80
  />
81
81
  <Flexbox
82
82
  align={'baseline'}
@@ -1,5 +1,5 @@
1
- import { Alert, CopyButton, Highlighter, Icon, Markdown } from '@lobehub/ui';
2
- import { Descriptions, Segmented, Typography } from 'antd';
1
+ import { Alert, CopyButton, Highlighter, Icon, Markdown, Segmented } from '@lobehub/ui';
2
+ import { Descriptions, Typography } from 'antd';
3
3
  import { createStyles } from 'antd-style';
4
4
  import { ExternalLink } from 'lucide-react';
5
5
  import Link from 'next/link';
@@ -80,6 +80,11 @@ const useStyles = createStyles(({ token, css }) => {
80
80
  };
81
81
  });
82
82
 
83
+ enum DisplayType {
84
+ Raw = 'raw',
85
+ Render = 'render',
86
+ }
87
+
83
88
  interface PageContentProps {
84
89
  messageId: string;
85
90
  result?: CrawlResult;
@@ -88,7 +93,7 @@ interface PageContentProps {
88
93
  const PageContent = memo<PageContentProps>(({ result }) => {
89
94
  const { t } = useTranslation('plugin');
90
95
  const { styles } = useStyles();
91
- const [display, setDisplay] = useState('render');
96
+ const [display, setDisplay] = useState<DisplayType>(DisplayType.Render);
92
97
 
93
98
  if (!result || !result.data) return undefined;
94
99
 
@@ -189,12 +194,13 @@ const PageContent = memo<PageContentProps>(({ result }) => {
189
194
  <Flexbox gap={12} paddingBlock={'0 12px'}>
190
195
  <Flexbox horizontal justify={'space-between'}>
191
196
  <Segmented
192
- onChange={(value) => setDisplay(value)}
197
+ onChange={(value) => setDisplay(value as DisplayType)}
193
198
  options={[
194
- { label: t('search.crawPages.detail.preview'), value: 'render' },
195
- { label: t('search.crawPages.detail.raw'), value: 'raw' },
199
+ { label: t('search.crawPages.detail.preview'), value: DisplayType.Render },
200
+ { label: t('search.crawPages.detail.raw'), value: DisplayType.Raw },
196
201
  ]}
197
202
  value={display}
203
+ variant={'filled'}
198
204
  />
199
205
  <CopyButton content={content} />
200
206
  </Flexbox>
@@ -203,10 +209,10 @@ const PageContent = memo<PageContentProps>(({ result }) => {
203
209
  message={t('search.crawPages.detail.tooLong', {
204
210
  characters: CRAWL_CONTENT_LIMITED_COUNT,
205
211
  })}
206
- variant={'pure'}
212
+ variant={'borderless'}
207
213
  />
208
214
  )}
209
- {display === 'render' ? (
215
+ {display === DisplayType.Render ? (
210
216
  <Markdown variant={'chat'}>{content}</Markdown>
211
217
  ) : (
212
218
  <div style={{ paddingBlock: '0 12px' }}>
@@ -1,5 +1,4 @@
1
- import { ActionIcon, Icon } from '@lobehub/ui';
2
- import { Button } from 'antd';
1
+ import { ActionIcon, Button } from '@lobehub/ui';
3
2
  import { LucideNotepadText, PlusSquareIcon } from 'lucide-react';
4
3
  import { useTranslation } from 'react-i18next';
5
4
  import { Flexbox } from 'react-layout-kit';
@@ -20,7 +19,7 @@ const Footer = () => {
20
19
  return (
21
20
  <Flexbox gap={8} horizontal paddingBlock={12} paddingInline={12}>
22
21
  <Button
23
- icon={<Icon icon={LucideNotepadText} />}
22
+ icon={LucideNotepadText}
24
23
  loading={isAIGenerating}
25
24
  onClick={() => {
26
25
  if (!messageId) return;
@@ -1,5 +1,5 @@
1
- import { Tooltip } from '@lobehub/ui';
2
- import { Tag, Typography } from 'antd';
1
+ import { Tag, Tooltip } from '@lobehub/ui';
2
+ import { Typography } from 'antd';
3
3
  import { memo } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { Flexbox } from 'react-layout-kit';
@@ -1,5 +1,4 @@
1
- import { Icon } from '@lobehub/ui';
2
- import { Button } from 'antd';
1
+ import { Button, Icon } from '@lobehub/ui';
3
2
  import { KeyRoundIcon, Loader2Icon } from 'lucide-react';
4
3
  import { memo, useMemo, useState } from 'react';
5
4
  import { useTranslation } from 'react-i18next';
@@ -69,7 +68,7 @@ const Form = memo<ProviderApiKeyFormProps>(({ provider, id }) => {
69
68
  ) : (
70
69
  <Button
71
70
  block
72
- icon={<Icon icon={KeyRoundIcon} />}
71
+ icon={KeyRoundIcon}
73
72
  onClick={() => {
74
73
  setShow(true);
75
74
  }}
@@ -1,4 +1,4 @@
1
- import { Button } from 'antd';
1
+ import { Button } from '@lobehub/ui';
2
2
  import { memo, useMemo, useState } from 'react';
3
3
  import { useTranslation } from 'react-i18next';
4
4
  import { Center, Flexbox } from 'react-layout-kit';
@@ -1,5 +1,5 @@
1
- import { Icon } from '@lobehub/ui';
2
- import { Button, Empty, Skeleton } from 'antd';
1
+ import { Button } from '@lobehub/ui';
2
+ import { Empty, Skeleton } from 'antd';
3
3
  import { uniq } from 'lodash-es';
4
4
  import { Edit2Icon } from 'lucide-react';
5
5
  import { memo } from 'react';
@@ -58,7 +58,7 @@ const SearchResult = memo<SearchResultProps>(
58
58
  {!editing && (
59
59
  <div>
60
60
  <Button
61
- icon={<Icon icon={Edit2Icon} />}
61
+ icon={Edit2Icon}
62
62
  onClick={() => {
63
63
  setEditing(true);
64
64
  }}
@@ -28,7 +28,7 @@ const Search = memo<SearchProps>(({ messageId, searchQuery, searchResponse, plug
28
28
  <Alert
29
29
  extra={
30
30
  <Flexbox>
31
- <Highlighter copyButtonSize={'small'} language={'json'} type={'pure'}>
31
+ <Highlighter actionIconSize={'small'} language={'json'} variant={'borderless'}>
32
32
  {JSON.stringify(pluginError.body?.data || pluginError.body, null, 2)}
33
33
  </Highlighter>
34
34
  </Flexbox>
@@ -1,5 +1,5 @@
1
- import { Icon, Tooltip } from '@lobehub/ui';
2
- import { Button, Checkbox, Input, Radio, Select, Space, Typography } from 'antd';
1
+ import { Button, Input, Select, Tooltip } from '@lobehub/ui';
2
+ import { Checkbox, Radio, Space, Typography } from 'antd';
3
3
  import { SearchIcon } from 'lucide-react';
4
4
  import { ReactNode, memo, useState } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
@@ -59,12 +59,7 @@ const SearchBar = memo<SearchBarProps>(
59
59
  };
60
60
 
61
61
  const searchButton = (
62
- <Button
63
- icon={<Icon icon={SearchIcon} />}
64
- loading={loading}
65
- onClick={updateAndSearch}
66
- type={'primary'}
67
- >
62
+ <Button icon={SearchIcon} loading={loading} onClick={updateAndSearch} type={'primary'}>
68
63
  {isMobile ? undefined : t('search.searchBar.button')}
69
64
  </Button>
70
65
  );
@@ -79,6 +79,7 @@ export const HotkeyGroupEnum = {
79
79
 
80
80
  export const HotkeyScopeEnum = {
81
81
  Chat: 'chat',
82
+ Files: 'files',
82
83
  // 默认全局注册的快捷键 scope
83
84
  // https://react-hotkeys-hook.vercel.app/docs/documentation/hotkeys-provider
84
85
  Global: 'global',
@@ -1,6 +0,0 @@
1
- # LobeHub Desktop
2
-
3
- 构建路径:
4
-
5
- - dist: 构建产物路径
6
- - release: 发布产物路径
@@ -1,25 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { Flexbox } from 'react-layout-kit';
3
-
4
- import Hero from '../features/Hero';
5
-
6
- type Props = { children: ReactNode };
7
-
8
- const Layout = ({ children }: Props) => {
9
- return (
10
- <Flexbox
11
- align={'center'}
12
- style={{ height: '100%', overflowX: 'hidden', overflowY: 'auto' }}
13
- width={'100%'}
14
- >
15
- <Flexbox gap={24} paddingBlock={24} paddingInline={16} style={{ width: 'min(100%, 1024px)' }}>
16
- <Hero />
17
- {children}
18
- </Flexbox>
19
- </Flexbox>
20
- );
21
- };
22
-
23
- Layout.displayName = 'DesktopChangelogLayout';
24
-
25
- export default Layout;