@lobehub/chat 1.43.6 → 1.44.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 (298) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/changelog/v1.json +9 -0
  3. package/docs/self-hosting/server-database/docker-compose.mdx +2 -2
  4. package/locales/ar/common.json +1 -0
  5. package/locales/ar/modelProvider.json +176 -0
  6. package/locales/ar/setting.json +1 -0
  7. package/locales/bg-BG/common.json +1 -0
  8. package/locales/bg-BG/modelProvider.json +176 -0
  9. package/locales/bg-BG/setting.json +1 -0
  10. package/locales/de-DE/common.json +1 -0
  11. package/locales/de-DE/modelProvider.json +176 -0
  12. package/locales/de-DE/setting.json +1 -0
  13. package/locales/en-US/common.json +1 -0
  14. package/locales/en-US/modelProvider.json +176 -0
  15. package/locales/en-US/setting.json +1 -0
  16. package/locales/es-ES/common.json +1 -0
  17. package/locales/es-ES/modelProvider.json +176 -0
  18. package/locales/es-ES/setting.json +1 -0
  19. package/locales/fa-IR/common.json +1 -0
  20. package/locales/fa-IR/modelProvider.json +176 -0
  21. package/locales/fa-IR/setting.json +1 -0
  22. package/locales/fr-FR/common.json +1 -0
  23. package/locales/fr-FR/modelProvider.json +176 -0
  24. package/locales/fr-FR/setting.json +1 -0
  25. package/locales/it-IT/common.json +1 -0
  26. package/locales/it-IT/modelProvider.json +176 -0
  27. package/locales/it-IT/setting.json +1 -0
  28. package/locales/ja-JP/common.json +1 -0
  29. package/locales/ja-JP/modelProvider.json +176 -0
  30. package/locales/ja-JP/setting.json +1 -0
  31. package/locales/ko-KR/common.json +1 -0
  32. package/locales/ko-KR/modelProvider.json +176 -0
  33. package/locales/ko-KR/setting.json +1 -0
  34. package/locales/nl-NL/common.json +1 -0
  35. package/locales/nl-NL/modelProvider.json +176 -0
  36. package/locales/nl-NL/setting.json +1 -0
  37. package/locales/pl-PL/common.json +1 -0
  38. package/locales/pl-PL/modelProvider.json +176 -0
  39. package/locales/pl-PL/setting.json +1 -0
  40. package/locales/pt-BR/common.json +1 -0
  41. package/locales/pt-BR/modelProvider.json +176 -0
  42. package/locales/pt-BR/setting.json +1 -0
  43. package/locales/ru-RU/common.json +1 -0
  44. package/locales/ru-RU/modelProvider.json +176 -0
  45. package/locales/ru-RU/setting.json +1 -0
  46. package/locales/tr-TR/common.json +1 -0
  47. package/locales/tr-TR/modelProvider.json +176 -0
  48. package/locales/tr-TR/setting.json +1 -0
  49. package/locales/vi-VN/common.json +1 -0
  50. package/locales/vi-VN/modelProvider.json +176 -0
  51. package/locales/vi-VN/setting.json +1 -0
  52. package/locales/zh-CN/common.json +1 -0
  53. package/locales/zh-CN/modelProvider.json +176 -0
  54. package/locales/zh-CN/setting.json +1 -0
  55. package/locales/zh-TW/common.json +1 -0
  56. package/locales/zh-TW/modelProvider.json +176 -0
  57. package/locales/zh-TW/setting.json +1 -0
  58. package/package.json +4 -4
  59. package/src/app/(main)/(mobile)/me/settings/features/Category.tsx +1 -1
  60. package/src/app/(main)/(mobile)/me/settings/features/useCategory.tsx +12 -5
  61. package/src/app/(main)/changelog/features/VersionTag.tsx +1 -2
  62. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/Thread.tsx +1 -1
  63. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/ThreadItem.tsx +1 -2
  64. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/index.tsx +0 -1
  65. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/AgentsSuggest.tsx +1 -1
  66. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/QuestionSuggest.tsx +1 -1
  67. package/src/app/(main)/chat/(workspace)/@conversation/features/ZenModeToast/Toast.tsx +1 -1
  68. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadItem/index.tsx +0 -2
  69. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/TopicItem/index.tsx +0 -1
  70. package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Tags.tsx +2 -3
  71. package/src/app/(main)/chat/@session/features/SessionListContent/CollapseGroup/index.tsx +1 -1
  72. package/src/app/(main)/chat/features/Migration/Start.tsx +1 -1
  73. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/ConversationExample/TopicList.tsx +4 -3
  74. package/src/app/(main)/discover/(detail)/assistant/[slug]/features/Header.tsx +1 -1
  75. package/src/app/(main)/discover/(detail)/features/ShareButton.tsx +2 -1
  76. package/src/app/(main)/discover/(detail)/model/[...slugs]/features/Header.tsx +1 -1
  77. package/src/app/(main)/discover/(detail)/plugin/[slug]/features/Header.tsx +1 -1
  78. package/src/app/(main)/discover/(detail)/provider/[slug]/features/Header.tsx +1 -1
  79. package/src/app/(main)/discover/(list)/_layout/Desktop/Nav.tsx +0 -1
  80. package/src/app/(main)/discover/(list)/assistants/features/Card.tsx +1 -1
  81. package/src/app/(main)/discover/(list)/models/features/Card.tsx +1 -1
  82. package/src/app/(main)/discover/(list)/plugins/features/Card.tsx +1 -1
  83. package/src/app/(main)/discover/(list)/providers/features/Card.tsx +1 -1
  84. package/src/app/(main)/discover/components/GridLoadingCard.tsx +2 -1
  85. package/src/app/(main)/discover/components/Title.tsx +1 -1
  86. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/EmptyStatus.tsx +1 -1
  87. package/src/app/(main)/files/(content)/@menu/features/KnowledgeBase/Item/index.tsx +0 -1
  88. package/src/app/(main)/files/(content)/@modal/(.)[id]/FullscreenModal.tsx +2 -2
  89. package/src/app/(main)/files/(content)/NotSupportClient.tsx +2 -2
  90. package/src/app/(main)/profile/_layout/Desktop/SideBar.tsx +1 -1
  91. package/src/app/(main)/profile/stats/features/ShareButton/Preview.tsx +5 -5
  92. package/src/app/(main)/repos/[id]/evals/components/Container.tsx +1 -1
  93. package/src/app/(main)/repos/[id]/evals/dataset/DatasetList/Item.tsx +0 -1
  94. package/src/app/(main)/settings/_layout/Desktop/SideBar.tsx +1 -1
  95. package/src/app/(main)/settings/about/features/ItemCard.tsx +3 -3
  96. package/src/app/(main)/settings/about/features/Version.tsx +1 -1
  97. package/src/app/(main)/settings/hooks/useCategory.tsx +22 -9
  98. package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +2 -1
  99. package/src/app/(main)/settings/llm/components/ProviderModelList/ModelFetcher.tsx +0 -1
  100. package/src/app/(main)/settings/provider/(detail)/[id]/index.tsx +19 -0
  101. package/src/app/(main)/settings/provider/(detail)/[id]/page.tsx +95 -0
  102. package/src/app/(main)/settings/provider/(detail)/azure/page.tsx +119 -0
  103. package/src/app/(main)/settings/provider/(detail)/bedrock/page.tsx +91 -0
  104. package/src/app/(main)/settings/provider/(detail)/cloudflare/page.tsx +58 -0
  105. package/src/app/(main)/settings/provider/(detail)/github/page.tsx +67 -0
  106. package/src/app/(main)/settings/provider/(detail)/huggingface/page.tsx +67 -0
  107. package/src/app/(main)/settings/provider/(detail)/ollama/Checker.tsx +73 -0
  108. package/src/app/(main)/settings/provider/(detail)/ollama/page.tsx +34 -0
  109. package/src/app/(main)/settings/provider/(detail)/openai/page.tsx +23 -0
  110. package/src/app/(main)/settings/provider/(detail)/wenxin/page.tsx +61 -0
  111. package/src/app/(main)/settings/provider/(list)/Footer.tsx +36 -0
  112. package/src/app/(main)/settings/provider/(list)/ProviderGrid/Card.tsx +134 -0
  113. package/src/app/(main)/settings/provider/(list)/ProviderGrid/index.tsx +91 -0
  114. package/src/app/(main)/settings/provider/(list)/index.tsx +19 -0
  115. package/src/app/(main)/settings/provider/ProviderMenu/AddNew.tsx +28 -0
  116. package/src/app/(main)/settings/provider/ProviderMenu/All.tsx +29 -0
  117. package/src/app/(main)/settings/provider/ProviderMenu/Item.tsx +69 -0
  118. package/src/app/(main)/settings/provider/ProviderMenu/List.tsx +76 -0
  119. package/src/app/(main)/settings/provider/ProviderMenu/SearchResult.tsx +43 -0
  120. package/src/app/(main)/settings/provider/ProviderMenu/SkeletonList.tsx +60 -0
  121. package/src/app/(main)/settings/provider/ProviderMenu/SortProviderModal/GroupItem.tsx +30 -0
  122. package/src/app/(main)/settings/provider/ProviderMenu/SortProviderModal/index.tsx +91 -0
  123. package/src/app/(main)/settings/provider/ProviderMenu/index.tsx +80 -0
  124. package/src/app/(main)/settings/provider/_layout/Desktop.tsx +37 -0
  125. package/src/app/(main)/settings/provider/_layout/Mobile.tsx +14 -0
  126. package/src/app/(main)/settings/provider/const.ts +20 -0
  127. package/src/app/(main)/settings/provider/features/CreateNewProvider/index.tsx +146 -0
  128. package/src/app/(main)/settings/provider/features/ModelList/CreateNewModelModal/Form.tsx +105 -0
  129. package/src/app/(main)/settings/provider/features/ModelList/CreateNewModelModal/index.tsx +69 -0
  130. package/src/app/(main)/settings/provider/features/ModelList/DisabledModels.tsx +29 -0
  131. package/src/app/(main)/settings/provider/features/ModelList/EmptyModels.tsx +101 -0
  132. package/src/app/(main)/settings/provider/features/ModelList/EnabledModelList/index.tsx +85 -0
  133. package/src/app/(main)/settings/provider/features/ModelList/ModelConfigModal/Form.tsx +109 -0
  134. package/src/app/(main)/settings/provider/features/ModelList/ModelConfigModal/index.tsx +76 -0
  135. package/src/app/(main)/settings/provider/features/ModelList/ModelItem.tsx +346 -0
  136. package/src/app/(main)/settings/provider/features/ModelList/ModelTitle/Search.tsx +37 -0
  137. package/src/app/(main)/settings/provider/features/ModelList/ModelTitle/index.tsx +145 -0
  138. package/src/app/(main)/settings/provider/features/ModelList/SearchResult.tsx +67 -0
  139. package/src/app/(main)/settings/provider/features/ModelList/SkeletonList.tsx +63 -0
  140. package/src/app/(main)/settings/provider/features/ModelList/SortModelModal/ListItem.tsx +20 -0
  141. package/src/app/(main)/settings/provider/features/ModelList/SortModelModal/index.tsx +96 -0
  142. package/src/app/(main)/settings/provider/features/ModelList/index.tsx +59 -0
  143. package/src/app/(main)/settings/provider/features/ProviderConfig/Checker.tsx +120 -0
  144. package/src/app/(main)/settings/provider/features/ProviderConfig/SkeletonInput.tsx +5 -0
  145. package/src/app/(main)/settings/provider/features/ProviderConfig/UpdateProviderInfo/SettingModal.tsx +137 -0
  146. package/src/app/(main)/settings/provider/features/ProviderConfig/UpdateProviderInfo/index.tsx +49 -0
  147. package/src/app/(main)/settings/provider/features/ProviderConfig/index.tsx +343 -0
  148. package/src/app/(main)/settings/provider/layout.tsx +21 -0
  149. package/src/app/(main)/settings/provider/page.tsx +17 -0
  150. package/src/app/(main)/settings/provider/type.ts +5 -0
  151. package/src/app/(main)/settings/sync/features/DeviceInfo/Card.tsx +1 -1
  152. package/src/app/(main)/settings/sync/features/DeviceInfo/index.tsx +1 -1
  153. package/src/app/@modal/(.)changelog/modal/features/ReadDetail.tsx +1 -1
  154. package/src/app/@modal/(.)changelog/modal/features/VersionTag.tsx +1 -2
  155. package/src/app/@modal/(.)changelog/modal/layout.tsx +1 -1
  156. package/src/components/Cell/index.tsx +1 -1
  157. package/src/components/DragUpload/index.tsx +2 -3
  158. package/src/components/FeatureList/index.tsx +1 -1
  159. package/src/components/FileParsingStatus/EmbeddingStatus.tsx +1 -1
  160. package/src/components/FileParsingStatus/index.tsx +1 -1
  161. package/src/components/FunctionModal/style.tsx +2 -2
  162. package/src/components/GoBack/index.tsx +1 -2
  163. package/src/components/HotKeys/index.tsx +1 -1
  164. package/src/components/InstantSwitch/index.tsx +28 -0
  165. package/src/components/Menu/index.tsx +1 -1
  166. package/src/components/ModelSelect/index.tsx +2 -3
  167. package/src/components/Notification/index.tsx +2 -1
  168. package/src/components/StatisticCard/index.tsx +5 -6
  169. package/src/config/aiModels/ai21.ts +38 -0
  170. package/src/config/aiModels/ai360.ts +71 -0
  171. package/src/config/aiModels/anthropic.ts +152 -0
  172. package/src/config/aiModels/azure.ts +86 -0
  173. package/src/config/aiModels/baichuan.ts +107 -0
  174. package/src/config/aiModels/bedrock.ts +315 -0
  175. package/src/config/aiModels/cloudflare.ts +88 -0
  176. package/src/config/aiModels/deepseek.ts +27 -0
  177. package/src/config/aiModels/fireworksai.ts +232 -0
  178. package/src/config/aiModels/giteeai.ts +137 -0
  179. package/src/config/aiModels/github.ts +273 -0
  180. package/src/config/aiModels/google.ts +317 -0
  181. package/src/config/aiModels/groq.ts +202 -0
  182. package/src/config/aiModels/higress.ts +2828 -0
  183. package/src/config/aiModels/huggingface.ts +56 -0
  184. package/src/config/aiModels/hunyuan.ts +151 -0
  185. package/src/config/aiModels/index.ts +98 -0
  186. package/src/config/aiModels/internlm.ts +40 -0
  187. package/src/config/aiModels/minimax.ts +55 -0
  188. package/src/config/aiModels/mistral.ts +172 -0
  189. package/src/config/aiModels/moonshot.ts +44 -0
  190. package/src/config/aiModels/novita.ts +124 -0
  191. package/src/config/aiModels/ollama.ts +412 -0
  192. package/src/config/aiModels/openai.ts +537 -0
  193. package/src/config/aiModels/openrouter.ts +252 -0
  194. package/src/config/aiModels/perplexity.ts +67 -0
  195. package/src/config/aiModels/qwen.ts +302 -0
  196. package/src/config/aiModels/sensenova.ts +114 -0
  197. package/src/config/aiModels/siliconcloud.ts +679 -0
  198. package/src/config/aiModels/spark.ts +68 -0
  199. package/src/config/aiModels/stepfun.ts +153 -0
  200. package/src/config/aiModels/taichu.ts +19 -0
  201. package/src/config/aiModels/togetherai.ts +334 -0
  202. package/src/config/aiModels/upstage.ts +37 -0
  203. package/src/config/aiModels/wenxin.ts +171 -0
  204. package/src/config/aiModels/xai.ts +72 -0
  205. package/src/config/aiModels/zeroone.ts +156 -0
  206. package/src/config/aiModels/zhipu.ts +235 -0
  207. package/src/config/featureFlags/schema.ts +3 -0
  208. package/src/config/modelProviders/anthropic.ts +1 -0
  209. package/src/config/modelProviders/github.ts +0 -1
  210. package/src/config/modelProviders/google.ts +1 -0
  211. package/src/config/modelProviders/stepfun.ts +2 -0
  212. package/src/database/migrations/0013_add_ai_infra.sql +44 -0
  213. package/src/database/migrations/meta/0013_snapshot.json +3598 -0
  214. package/src/database/migrations/meta/_journal.json +7 -0
  215. package/src/database/repositories/aiInfra/index.ts +115 -0
  216. package/src/database/schemas/aiInfra.ts +69 -0
  217. package/src/database/schemas/index.ts +1 -0
  218. package/src/database/server/models/__tests__/aiModel.test.ts +318 -0
  219. package/src/database/server/models/__tests__/aiProvider.test.ts +373 -0
  220. package/src/database/server/models/aiModel.ts +250 -0
  221. package/src/database/server/models/aiProvider.ts +234 -0
  222. package/src/features/AgentSetting/AgentPrompt/index.tsx +2 -2
  223. package/src/features/ChatInput/ActionBar/Token/TokenTag.tsx +2 -1
  224. package/src/features/ChatInput/ActionBar/Tools/index.tsx +2 -3
  225. package/src/features/ChatInput/ActionBar/Upload/ServerMode.tsx +2 -3
  226. package/src/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx +3 -2
  227. package/src/features/ChatInput/Desktop/FilePreview/FileList.tsx +2 -2
  228. package/src/features/ChatInput/Mobile/Files/FileItem/File.tsx +2 -2
  229. package/src/features/ChatInput/Mobile/InputArea/index.tsx +1 -1
  230. package/src/features/ChatInput/STT/common.tsx +1 -1
  231. package/src/features/Conversation/Error/style.tsx +2 -2
  232. package/src/features/Conversation/Messages/Assistant/FileChunks/Item/style.ts +2 -2
  233. package/src/features/Conversation/Messages/Assistant/FileChunks/index.tsx +1 -1
  234. package/src/features/Conversation/Messages/Assistant/ToolCallItem/Inspector/style.ts +2 -3
  235. package/src/features/Conversation/Messages/Assistant/ToolCallItem/style.ts +2 -3
  236. package/src/features/Conversation/Messages/User/FileListViewer/Item.tsx +0 -1
  237. package/src/features/Conversation/components/BackBottom/style.ts +2 -2
  238. package/src/features/Conversation/components/MarkdownElements/LobeArtifact/Render/Icon.tsx +2 -3
  239. package/src/features/Conversation/components/MarkdownElements/LobeArtifact/Render/index.tsx +3 -3
  240. package/src/features/Conversation/components/MarkdownElements/LobeThinking/Render.tsx +1 -1
  241. package/src/features/Conversation/components/OTPInput.tsx +2 -2
  242. package/src/features/DataImporter/Loading.tsx +1 -1
  243. package/src/features/FileManager/FileList/EmptyStatus.tsx +1 -1
  244. package/src/features/FileManager/FileList/index.tsx +1 -1
  245. package/src/features/FileManager/UploadDock/Item.tsx +1 -1
  246. package/src/features/FileManager/UploadDock/index.tsx +4 -4
  247. package/src/features/FileViewer/NotSupport/index.tsx +1 -1
  248. package/src/features/FileViewer/Renderer/MSDoc/index.tsx +0 -1
  249. package/src/features/FileViewer/Renderer/TXT/index.tsx +1 -1
  250. package/src/features/InitClientDB/EnableModal.tsx +1 -1
  251. package/src/features/InitClientDB/ErrorResult.tsx +1 -1
  252. package/src/features/InitClientDB/InitIndicator.tsx +1 -1
  253. package/src/features/KnowledgeBaseModal/AddFilesToKnowledgeBase/SelectForm.tsx +0 -1
  254. package/src/features/ModelSwitchPanel/index.tsx +2 -2
  255. package/src/features/PluginsUI/Render/Loading.tsx +0 -1
  256. package/src/features/Portal/Home/Body/Files/FileList/Item.tsx +1 -1
  257. package/src/features/Portal/Home/Body/Plugins/ArtifactList/Item/style.ts +1 -2
  258. package/src/features/Setting/SettingContainer.tsx +8 -1
  259. package/src/features/ShareModal/ShareImage/style.ts +2 -2
  260. package/src/features/ShareModal/style.ts +2 -2
  261. package/src/features/User/DataStatistics.tsx +1 -1
  262. package/src/hooks/useEnabledChatModels.ts +10 -1
  263. package/src/hooks/useModelSupportToolUse.ts +15 -0
  264. package/src/hooks/useModelSupportVision.ts +15 -0
  265. package/src/layout/AuthProvider/Clerk/useAppearance.ts +3 -3
  266. package/src/layout/GlobalProvider/AppTheme.tsx +1 -1
  267. package/src/layout/GlobalProvider/StoreInitialization.tsx +5 -0
  268. package/src/locales/default/common.ts +1 -0
  269. package/src/locales/default/modelProvider.ts +178 -0
  270. package/src/locales/default/setting.ts +1 -0
  271. package/src/server/modules/KeyVaultsEncrypt/index.ts +1 -1
  272. package/src/server/routers/lambda/aiModel.ts +128 -0
  273. package/src/server/routers/lambda/aiProvider.ts +127 -0
  274. package/src/server/routers/lambda/index.ts +4 -0
  275. package/src/services/__tests__/_auth.test.ts +16 -49
  276. package/src/services/__tests__/chat.test.ts +2 -0
  277. package/src/services/_auth.ts +42 -25
  278. package/src/services/aiModel.ts +52 -0
  279. package/src/services/aiProvider.ts +47 -0
  280. package/src/services/chat.ts +62 -18
  281. package/src/store/aiInfra/index.ts +2 -0
  282. package/src/store/aiInfra/initialState.ts +11 -0
  283. package/src/store/aiInfra/selectors.ts +2 -0
  284. package/src/store/aiInfra/slices/aiModel/action.ts +146 -0
  285. package/src/store/aiInfra/slices/aiModel/index.ts +3 -0
  286. package/src/store/aiInfra/slices/aiModel/initialState.ts +14 -0
  287. package/src/store/aiInfra/slices/aiModel/selectors.ts +63 -0
  288. package/src/store/aiInfra/slices/aiProvider/action.ts +208 -0
  289. package/src/store/aiInfra/slices/aiProvider/index.ts +3 -0
  290. package/src/store/aiInfra/slices/aiProvider/initialState.ts +32 -0
  291. package/src/store/aiInfra/slices/aiProvider/selectors.ts +99 -0
  292. package/src/store/aiInfra/store.ts +25 -0
  293. package/src/store/global/initialState.ts +1 -0
  294. package/src/store/serverConfig/selectors.test.ts +1 -0
  295. package/src/styles/global.ts +1 -1
  296. package/src/types/aiModel.ts +32 -6
  297. package/src/types/aiProvider.ts +11 -4
  298. package/src/utils/fetch/fetchSSE.ts +3 -1
@@ -0,0 +1,234 @@
1
+ import { and, asc, desc, eq } from 'drizzle-orm/expressions';
2
+
3
+ import { LobeChatDatabase } from '@/database/type';
4
+ import { ModelProvider } from '@/libs/agent-runtime';
5
+ import {
6
+ AiProviderDetailItem,
7
+ AiProviderListItem,
8
+ AiProviderRuntimeConfig,
9
+ CreateAiProviderParams,
10
+ UpdateAiProviderConfigParams,
11
+ } from '@/types/aiProvider';
12
+
13
+ import { AiProviderSelectItem, aiModels, aiProviders } from '../../schemas';
14
+
15
+ type DecryptUserKeyVaults = (encryptKeyVaultsStr: string | null) => Promise<any>;
16
+
17
+ type EncryptUserKeyVaults = (keyVaults: string) => Promise<string>;
18
+
19
+ export class AiProviderModel {
20
+ private userId: string;
21
+ private db: LobeChatDatabase;
22
+
23
+ constructor(db: LobeChatDatabase, userId: string) {
24
+ this.userId = userId;
25
+ this.db = db;
26
+ }
27
+
28
+ create = async (
29
+ { keyVaults: userKey, ...params }: CreateAiProviderParams,
30
+ encryptor?: EncryptUserKeyVaults,
31
+ ) => {
32
+ // eslint-disable-next-line unicorn/consistent-function-scoping
33
+ const defaultSerialize = (s: string) => s;
34
+ const encrypt = encryptor ?? defaultSerialize;
35
+ const keyVaults = await encrypt(JSON.stringify(userKey));
36
+
37
+ const [result] = await this.db
38
+ .insert(aiProviders)
39
+ .values({
40
+ ...params,
41
+ // each new ai provider we will set it to enabled by default
42
+ enabled: true,
43
+ keyVaults,
44
+ userId: this.userId,
45
+ })
46
+ .returning();
47
+
48
+ return result;
49
+ };
50
+
51
+ delete = async (id: string) => {
52
+ return this.db.transaction(async (trx) => {
53
+ // 1. delete all models of the provider
54
+ await trx
55
+ .delete(aiModels)
56
+ .where(and(eq(aiModels.providerId, id), eq(aiModels.userId, this.userId)));
57
+
58
+ // 2. delete the provider
59
+ await trx
60
+ .delete(aiProviders)
61
+ .where(and(eq(aiProviders.id, id), eq(aiProviders.userId, this.userId)));
62
+ });
63
+ };
64
+
65
+ deleteAll = async () => {
66
+ return this.db.delete(aiProviders).where(eq(aiProviders.userId, this.userId));
67
+ };
68
+
69
+ query = async () => {
70
+ return this.db.query.aiProviders.findMany({
71
+ orderBy: [desc(aiProviders.updatedAt)],
72
+ where: eq(aiProviders.userId, this.userId),
73
+ });
74
+ };
75
+
76
+ getAiProviderList = async (): Promise<AiProviderListItem[]> => {
77
+ const result = await this.db
78
+ .select({
79
+ description: aiProviders.description,
80
+ enabled: aiProviders.enabled,
81
+ id: aiProviders.id,
82
+ logo: aiProviders.logo,
83
+ name: aiProviders.name,
84
+ sort: aiProviders.sort,
85
+ source: aiProviders.source,
86
+ })
87
+ .from(aiProviders)
88
+ .where(eq(aiProviders.userId, this.userId))
89
+ .orderBy(asc(aiProviders.sort), desc(aiProviders.updatedAt));
90
+
91
+ return result as AiProviderListItem[];
92
+ };
93
+
94
+ findById = async (id: string) => {
95
+ return this.db.query.aiProviders.findFirst({
96
+ where: and(eq(aiProviders.id, id), eq(aiProviders.userId, this.userId)),
97
+ });
98
+ };
99
+
100
+ update = async (id: string, value: Partial<AiProviderSelectItem>) => {
101
+ return this.db
102
+ .update(aiProviders)
103
+ .set({ ...value, updatedAt: new Date() })
104
+ .where(and(eq(aiProviders.id, id), eq(aiProviders.userId, this.userId)));
105
+ };
106
+
107
+ updateConfig = async (
108
+ id: string,
109
+ value: UpdateAiProviderConfigParams,
110
+ encryptor?: EncryptUserKeyVaults,
111
+ ) => {
112
+ // eslint-disable-next-line unicorn/consistent-function-scoping
113
+ const defaultSerialize = (s: string) => s;
114
+ const encrypt = encryptor ?? defaultSerialize;
115
+ const keyVaults = await encrypt(JSON.stringify(value.keyVaults));
116
+
117
+ return this.db
118
+ .update(aiProviders)
119
+ .set({ ...value, keyVaults, updatedAt: new Date() })
120
+ .where(and(eq(aiProviders.id, id), eq(aiProviders.userId, this.userId)));
121
+ };
122
+
123
+ toggleProviderEnabled = async (id: string, enabled: boolean) => {
124
+ const isBuiltin = Object.values(ModelProvider).includes(id as any);
125
+
126
+ return this.db
127
+ .insert(aiProviders)
128
+ .values({
129
+ enabled,
130
+ id,
131
+ source: isBuiltin ? 'builtin' : 'custom',
132
+ updatedAt: new Date(),
133
+ userId: this.userId,
134
+ })
135
+ .onConflictDoUpdate({
136
+ set: { enabled },
137
+ target: [aiProviders.id, aiProviders.userId],
138
+ });
139
+ };
140
+
141
+ updateOrder = async (sortMap: { id: string; sort: number }[]) => {
142
+ await this.db.transaction(async (tx) => {
143
+ const updates = sortMap.map(({ id, sort }) => {
144
+ const isBuiltin = Object.values(ModelProvider).includes(id as any);
145
+
146
+ return tx
147
+ .insert(aiProviders)
148
+ .values({
149
+ enabled: true,
150
+ id,
151
+ sort,
152
+ source: isBuiltin ? 'builtin' : 'custom',
153
+ updatedAt: new Date(),
154
+ userId: this.userId,
155
+ })
156
+ .onConflictDoUpdate({
157
+ set: { sort, updatedAt: new Date() },
158
+ target: [aiProviders.id, aiProviders.userId],
159
+ });
160
+ });
161
+
162
+ await Promise.all(updates);
163
+ });
164
+ };
165
+
166
+ getAiProviderById = async (
167
+ id: string,
168
+ decryptor: DecryptUserKeyVaults,
169
+ ): Promise<AiProviderDetailItem | undefined> => {
170
+ const query = this.db
171
+ .select({
172
+ checkModel: aiProviders.checkModel,
173
+ enabled: aiProviders.enabled,
174
+ fetchOnClient: aiProviders.fetchOnClient,
175
+ id: aiProviders.id,
176
+ keyVaults: aiProviders.keyVaults,
177
+ logo: aiProviders.logo,
178
+ name: aiProviders.name,
179
+ settings: aiProviders.settings,
180
+ source: aiProviders.source,
181
+ })
182
+ .from(aiProviders)
183
+ .where(and(eq(aiProviders.id, id), eq(aiProviders.userId, this.userId)))
184
+ .limit(1);
185
+
186
+ const [result] = await query;
187
+
188
+ if (!result) {
189
+ // if the provider is builtin but not init, we will insert it to the db
190
+ if (this.isBuiltInProvider(id)) {
191
+ await this.db.insert(aiProviders).values({ id, source: 'builtin', userId: this.userId });
192
+
193
+ const resultAgain = await query;
194
+
195
+ return { ...resultAgain[0] } as unknown as AiProviderDetailItem;
196
+ }
197
+
198
+ return;
199
+ }
200
+
201
+ const decrypt = decryptor ?? JSON.parse;
202
+
203
+ const keyVaults = !!result.keyVaults ? await decrypt(result.keyVaults) : {};
204
+
205
+ return { ...result, keyVaults } as AiProviderDetailItem;
206
+ };
207
+
208
+ getAiProviderRuntimeConfig = async (decryptor: DecryptUserKeyVaults) => {
209
+ const result = await this.db
210
+ .select({
211
+ fetchOnClient: aiProviders.fetchOnClient,
212
+ id: aiProviders.id,
213
+ keyVaults: aiProviders.keyVaults,
214
+ settings: aiProviders.settings,
215
+ })
216
+ .from(aiProviders)
217
+ .where(and(eq(aiProviders.userId, this.userId)));
218
+
219
+ const decrypt = decryptor ?? JSON.parse;
220
+ let runtimeConfig: Record<string, AiProviderRuntimeConfig> = {};
221
+
222
+ for (const item of result) {
223
+ runtimeConfig[item.id] = {
224
+ fetchOnClient: typeof item.fetchOnClient === 'boolean' ? item.fetchOnClient : undefined,
225
+ keyVaults: !!item.keyVaults ? await decrypt(item.keyVaults) : {},
226
+ settings: item.settings || {},
227
+ };
228
+ }
229
+
230
+ return runtimeConfig;
231
+ };
232
+
233
+ private isBuiltInProvider = (id: string) => Object.values(ModelProvider).includes(id as any);
234
+ }
@@ -15,14 +15,14 @@ export const useStyles = createStyles(({ css, token, responsive }) => ({
15
15
  container: css`
16
16
  position: relative;
17
17
  width: 100%;
18
- background: ${token.colorFillSecondary};
19
18
  border-radius: ${token.borderRadiusLG}px;
19
+ background: ${token.colorFillSecondary};
20
20
  `,
21
21
  content: css`
22
22
  z-index: 2;
23
23
  padding: 8px;
24
- background: ${token.colorBgContainer};
25
24
  border-radius: ${token.borderRadiusLG - 1}px;
25
+ background: ${token.colorBgContainer};
26
26
  `,
27
27
  markdown: css`
28
28
  border: unset;
@@ -6,6 +6,7 @@ import { memo } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
  import { Center, Flexbox } from 'react-layout-kit';
8
8
 
9
+ import { useModelSupportToolUse } from '@/hooks/useModelSupportToolUse';
9
10
  import { useTokenCount } from '@/hooks/useTokenCount';
10
11
  import { useAgentStore } from '@/store/agent';
11
12
  import { agentSelectors } from '@/store/agent/selectors';
@@ -45,7 +46,7 @@ const Token = memo<TokenTagProps>(({ total: messageString }) => {
45
46
  const maxTokens = useUserStore(modelProviderSelectors.modelMaxToken(model));
46
47
 
47
48
  // Tool usage token
48
- const canUseTool = useUserStore(modelProviderSelectors.isModelEnabledFunctionCall(model));
49
+ const canUseTool = useModelSupportToolUse(model);
49
50
  const plugins = useAgentStore(agentSelectors.currentAgentPlugins);
50
51
  const toolsString = useToolStore((s) => {
51
52
  const pluginSystemRoles = toolSelectors.enabledSystemRoles(plugins)(s);
@@ -3,11 +3,10 @@ import { Blocks, LucideLoader2 } from 'lucide-react';
3
3
  import { Suspense, memo } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
5
 
6
+ import { useModelSupportToolUse } from '@/hooks/useModelSupportToolUse';
6
7
  import { useAgentStore } from '@/store/agent';
7
8
  import { agentSelectors } from '@/store/agent/selectors';
8
9
  import { featureFlagsSelectors, useServerConfigStore } from '@/store/serverConfig';
9
- import { useUserStore } from '@/store/user';
10
- import { modelProviderSelectors } from '@/store/user/selectors';
11
10
 
12
11
  import DropdownMenu from './Dropdown';
13
12
 
@@ -16,7 +15,7 @@ const Tools = memo(() => {
16
15
  const { enablePlugins } = useServerConfigStore(featureFlagsSelectors);
17
16
 
18
17
  const model = useAgentStore(agentSelectors.currentAgentModel);
19
- const enableFC = useUserStore(modelProviderSelectors.isModelEnabledFunctionCall(model));
18
+ const enableFC = useModelSupportToolUse(model);
20
19
 
21
20
  return (
22
21
  enablePlugins && (
@@ -5,11 +5,10 @@ import { FileUp, FolderUp, ImageUp, Paperclip } from 'lucide-react';
5
5
  import { memo } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
7
 
8
+ import { useModelSupportVision } from '@/hooks/useModelSupportVision';
8
9
  import { useAgentStore } from '@/store/agent';
9
10
  import { agentSelectors } from '@/store/agent/slices/chat';
10
11
  import { useFileStore } from '@/store/file';
11
- import { useUserStore } from '@/store/user';
12
- import { modelProviderSelectors } from '@/store/user/selectors';
13
12
 
14
13
  const hotArea = css`
15
14
  &::before {
@@ -27,7 +26,7 @@ const FileUpload = memo(() => {
27
26
 
28
27
  const model = useAgentStore(agentSelectors.currentAgentModel);
29
28
 
30
- const canUploadImage = useUserStore(modelProviderSelectors.isModelEnabledVision(model));
29
+ const canUploadImage = useModelSupportVision(model);
31
30
 
32
31
  const items: MenuProps['items'] = [
33
32
  {
@@ -20,8 +20,9 @@ const useStyles = createStyles(({ css, token }) => ({
20
20
  inset-block-start: -4px;
21
21
  inset-inline-end: -4px;
22
22
 
23
- background: ${token.colorBgElevated};
24
23
  border-radius: 5px;
24
+
25
+ background: ${token.colorBgElevated};
25
26
  box-shadow:
26
27
  0 0 0 0.5px ${token.colorFillSecondary} inset,
27
28
  ${token.boxShadowTertiary};
@@ -32,9 +33,9 @@ const useStyles = createStyles(({ css, token }) => ({
32
33
  width: ${FILE_ITEM_SIZE}px;
33
34
  min-width: ${FILE_ITEM_SIZE}px;
34
35
  height: ${FILE_ITEM_SIZE}px;
36
+ border-radius: 8px;
35
37
 
36
38
  background: ${token.colorBgContainer};
37
- border-radius: 8px;
38
39
  `,
39
40
  image: css`
40
41
  margin-block: 0 !important;
@@ -12,10 +12,10 @@ const useStyles = createStyles(({ css, token }) => ({
12
12
  overflow-x: scroll;
13
13
 
14
14
  width: 100%;
15
-
16
- background: ${lighten(0.01, token.colorBgLayout)};
17
15
  border-start-start-radius: 8px;
18
16
  border-start-end-radius: 8px;
17
+
18
+ background: ${lighten(0.01, token.colorBgLayout)};
19
19
  `,
20
20
  }));
21
21
 
@@ -22,10 +22,10 @@ const useStyles = createStyles(({ css, token }) => ({
22
22
  height: 64px;
23
23
  padding-block: 4px;
24
24
  padding-inline: 8px 24px;
25
-
26
- background: ${token.colorFillTertiary};
27
25
  border: 1px solid ${token.colorBorder};
28
26
  border-radius: 8px;
27
+
28
+ background: ${token.colorFillTertiary};
29
29
  `,
30
30
  deleteButton: css`
31
31
  position: absolute;
@@ -15,8 +15,8 @@ const useStyles = createStyles(({ css, token }) => {
15
15
  container: css`
16
16
  flex: none;
17
17
  padding-block: 12px 12px;
18
- background: ${token.colorFillQuaternary};
19
18
  border-block-start: 1px solid ${rgba(token.colorBorder, 0.25)};
19
+ background: ${token.colorFillQuaternary};
20
20
  `,
21
21
  expand: css`
22
22
  position: absolute;
@@ -12,8 +12,8 @@ const useStyles = createStyles(({ css, token }) => ({
12
12
  recording: css`
13
13
  width: 8px;
14
14
  height: 8px;
15
- background: ${token.colorError};
16
15
  border-radius: 50%;
16
+ background: ${token.colorError};
17
17
  `,
18
18
  }));
19
19
 
@@ -5,10 +5,10 @@ import { Center, CenterProps, Flexbox } from 'react-layout-kit';
5
5
 
6
6
  export const useStyles = createStyles(({ css, token }) => ({
7
7
  container: css`
8
- color: ${token.colorText};
9
- background: ${token.colorBgContainer};
10
8
  border: 1px solid ${token.colorSplit};
11
9
  border-radius: 8px;
10
+ color: ${token.colorText};
11
+ background: ${token.colorBgContainer};
12
12
  `,
13
13
  desc: css`
14
14
  color: ${token.colorTextTertiary};
@@ -5,13 +5,13 @@ export const useStyles = createStyles(({ css, token, isDarkMode }) => ({
5
5
  badge: css`
6
6
  padding-block: 4px;
7
7
  padding-inline: 6px;
8
+ border-radius: 2222px;
8
9
 
9
10
  font-size: 12px;
10
11
  line-height: 12px;
11
12
  color: ${token.colorTextSecondary};
12
13
 
13
14
  background: ${token.colorFillSecondary};
14
- border-radius: 2222px;
15
15
  `,
16
16
 
17
17
  container: css`
@@ -21,11 +21,11 @@ export const useStyles = createStyles(({ css, token, isDarkMode }) => ({
21
21
  padding-block: 6px;
22
22
  padding-inline: 8px;
23
23
  padding-inline-end: 12px;
24
+ border-radius: 8px;
24
25
 
25
26
  color: ${token.colorText};
26
27
 
27
28
  background: ${lighten(0.1, token.colorBgElevated)};
28
- border-radius: 8px;
29
29
  box-shadow: ${token.boxShadowTertiary};
30
30
 
31
31
  transition: all 0.2s;
@@ -16,11 +16,11 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
16
16
  padding-block: 8px;
17
17
  padding-inline: 12px;
18
18
  padding-inline-end: 12px;
19
+ border-radius: 8px;
19
20
 
20
21
  color: ${token.colorText};
21
22
 
22
23
  background: ${token.colorFillTertiary};
23
- border-radius: 8px;
24
24
 
25
25
  &:hover {
26
26
  background: ${isDarkMode ? '' : token.colorFillSecondary};
@@ -17,12 +17,11 @@ export const useStyles = createStyles(({ css, token }) => ({
17
17
  padding-block: 6px;
18
18
  padding-inline: 8px;
19
19
  padding-inline-end: 12px;
20
-
21
- color: ${token.colorText};
22
-
23
20
  border: 1px solid ${token.colorBorder};
24
21
  border-radius: 8px;
25
22
 
23
+ color: ${token.colorText};
24
+
26
25
  &:hover {
27
26
  background: ${token.colorFillTertiary};
28
27
  }
@@ -17,12 +17,11 @@ export const useStyles = createStyles(({ css, token }) => ({
17
17
  padding-block: 6px;
18
18
  padding-inline: 8px;
19
19
  padding-inline-end: 12px;
20
-
21
- color: ${token.colorText};
22
-
23
20
  border: 1px solid ${token.colorBorder};
24
21
  border-radius: 8px;
25
22
 
23
+ color: ${token.colorText};
24
+
26
25
  &:hover {
27
26
  background: ${token.colorFillTertiary};
28
27
  }
@@ -17,7 +17,6 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
17
17
  max-width: 420px;
18
18
  padding-block: 8px;
19
19
  padding-inline: 12px 32px;
20
-
21
20
  border: 1px solid ${isDarkMode ? token.colorBorder : token.colorSplit};
22
21
  border-radius: 8px;
23
22
 
@@ -14,11 +14,11 @@ export const useStyles = createStyles(({ token, css, stylish, cx, responsive })
14
14
  transform: translateY(16px);
15
15
 
16
16
  padding-inline: 12px !important;
17
+ border-color: ${token.colorFillTertiary} !important;
18
+ border-radius: 16px !important;
17
19
 
18
20
  opacity: 0;
19
21
  background: ${rgba(token.colorBgContainer, 0.5)};
20
- border-color: ${token.colorFillTertiary} !important;
21
- border-radius: 16px !important;
22
22
 
23
23
  ${responsive.mobile} {
24
24
  inset-inline-end: 0;
@@ -9,12 +9,11 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
9
9
  cursor: pointer;
10
10
 
11
11
  margin-block-start: 12px;
12
-
13
- color: ${token.colorText};
14
-
15
12
  border: 1px solid ${token.colorBorder};
16
13
  border-radius: 8px;
17
14
 
15
+ color: ${token.colorText};
16
+
18
17
  &:hover {
19
18
  background: ${isDarkMode ? '' : token.colorFillSecondary};
20
19
  }
@@ -16,18 +16,18 @@ import ArtifactIcon from './Icon';
16
16
 
17
17
  const useStyles = createStyles(({ css, token, isDarkMode }) => ({
18
18
  avatar: css`
19
- background: ${token.colorFillQuaternary};
20
19
  border-inline-end: 1px solid ${token.colorSplit};
20
+ background: ${token.colorFillQuaternary};
21
21
  `,
22
22
  container: css`
23
23
  cursor: pointer;
24
24
 
25
25
  margin-block-start: 12px;
26
+ border: 1px solid ${token.colorBorder};
27
+ border-radius: 8px;
26
28
 
27
29
  color: ${token.colorText};
28
30
 
29
- border: 1px solid ${token.colorBorder};
30
- border-radius: 8px;
31
31
  box-shadow: ${isDarkMode ? token.boxShadowSecondary : token.boxShadowTertiary};
32
32
 
33
33
  &:hover {
@@ -29,11 +29,11 @@ const useStyles = createStyles(({ css, token }) => ({
29
29
  padding-block: 8px;
30
30
  padding-inline: 12px;
31
31
  padding-inline-end: 12px;
32
+ border-radius: 8px;
32
33
 
33
34
  color: ${token.colorText};
34
35
 
35
36
  background: ${token.colorFillQuaternary};
36
- border-radius: 8px;
37
37
  `,
38
38
  title: css`
39
39
  overflow: hidden;
@@ -7,14 +7,14 @@ const useStyles = createStyles(
7
7
  ({ css, token }) => css`
8
8
  width: ${token.controlHeight}px;
9
9
  height: ${token.controlHeight}px;
10
+ border: 1px solid ${token.colorBorder};
11
+ border-radius: 8px;
10
12
 
11
13
  font-size: 16px;
12
14
  color: ${token.colorText};
13
15
  text-align: center;
14
16
 
15
17
  background: ${token.colorBgContainer};
16
- border: 1px solid ${token.colorBorder};
17
- border-radius: 8px;
18
18
 
19
19
  &:focus,
20
20
  &:focus-visible {
@@ -13,10 +13,10 @@ const useStyles = createStyles(({ css, token }) => {
13
13
 
14
14
  aspect-ratio: 1;
15
15
  width: 6px;
16
+ border-radius: 50%;
16
17
 
17
18
  color: ${token.colorPrimary};
18
19
 
19
- border-radius: 50%;
20
20
  box-shadow:
21
21
  ${size}px -${size}px 0 0,
22
22
  ${size * 2}px -${size}px 0 0,
@@ -25,12 +25,12 @@ const useStyles = createStyles(({ css, token }) => ({
25
25
 
26
26
  width: 200px;
27
27
  height: 140px;
28
+ border-radius: ${token.borderRadiusLG}px;
28
29
 
29
30
  font-weight: 500;
30
31
  text-align: center;
31
32
 
32
33
  background: ${token.colorFillTertiary};
33
- border-radius: ${token.borderRadiusLG}px;
34
34
  box-shadow: 0 0 0 1px ${token.colorFillTertiary} inset;
35
35
 
36
36
  transition: background 0.3s ease-in-out;
@@ -22,8 +22,8 @@ const useStyles = createStyles(({ css, token, isDarkMode }) => ({
22
22
  header: css`
23
23
  height: 40px;
24
24
  min-height: 40px;
25
- color: ${token.colorTextDescription};
26
25
  border-block-end: 1px solid ${isDarkMode ? token.colorSplit : rgba(token.colorSplit, 0.06)};
26
+ color: ${token.colorTextDescription};
27
27
  `,
28
28
  headerItem: css`
29
29
  padding-block: 0;
@@ -16,9 +16,9 @@ const useStyles = createStyles(({ css, token }) => {
16
16
  inset-inline: 0 1%;
17
17
 
18
18
  height: 100%;
19
+ border-block-end: 3px solid ${token.geekblue};
19
20
 
20
21
  background: ${token.colorFillTertiary};
21
- border-block-end: 3px solid ${token.geekblue};
22
22
  `,
23
23
  title: css`
24
24
  overflow: hidden;
@@ -18,8 +18,8 @@ const useStyles = createStyles(({ css, token }) => {
18
18
  return {
19
19
  body: css`
20
20
  height: 400px;
21
- background: ${lighten(0.05, token.colorBgLayout)};
22
21
  border-radius: 8px;
22
+ background: ${lighten(0.05, token.colorBgLayout)};
23
23
  `,
24
24
  container: css`
25
25
  position: fixed;
@@ -30,9 +30,9 @@ const useStyles = createStyles(({ css, token }) => {
30
30
  overflow: hidden;
31
31
 
32
32
  width: 360px;
33
-
34
33
  border: 1px solid ${token.colorSplit};
35
34
  border-radius: 8px;
35
+
36
36
  box-shadow: ${token.boxShadow};
37
37
  `,
38
38
  header: css`
@@ -40,9 +40,9 @@ const useStyles = createStyles(({ css, token }) => {
40
40
 
41
41
  padding-block: 8px;
42
42
  padding-inline: 24px 12px;
43
+ border-radius: 8px;
43
44
 
44
45
  background: ${token.colorBgContainer};
45
- border-radius: 8px;
46
46
 
47
47
  transition: all 0.3s ease-in-out;
48
48
 
@@ -58,9 +58,9 @@ const useStyles = createStyles(({ css, token }) => {
58
58
  inset-inline: 0 1%;
59
59
 
60
60
  height: 100%;
61
+ border-block-end: 3px solid ${token.geekblue};
61
62
 
62
63
  background: ${token.colorFillTertiary};
63
- border-block-end: 3px solid ${token.geekblue};
64
64
  `,
65
65
  title: css`
66
66
  height: 36px;
@@ -15,9 +15,9 @@ const useStyles = createStyles(({ css, token }) => ({
15
15
  width: 100%;
16
16
  margin: 12px;
17
17
  padding: 24px;
18
+ border-radius: 4px;
18
19
 
19
20
  background: ${token.colorBgContainer};
20
- border-radius: 4px;
21
21
  box-shadow: ${token.boxShadowTertiary};
22
22
  `,
23
23
  }));