@lobehub/chat 1.33.4 → 1.34.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 (295) hide show
  1. package/.i18nrc.js +8 -2
  2. package/.releaserc.js +10 -1
  3. package/CHANGELOG.md +51 -16624
  4. package/changelog/CHANGELOG.v0.md +16621 -0
  5. package/changelog/v0.json +6064 -0
  6. package/changelog/v1.json +3356 -0
  7. package/docs/changelog/2024-11-25-november-providers.mdx +19 -0
  8. package/docs/changelog/2024-11-25-november-providers.zh-CN.mdx +17 -0
  9. package/docs/changelog/index.json +12 -0
  10. package/docs/changelog/schema.json +70 -0
  11. package/docs/self-hosting/advanced/auth/clerk.mdx +19 -23
  12. package/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx +5 -4
  13. package/docs/self-hosting/advanced/auth/next-auth/authelia.mdx +2 -4
  14. package/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx +3 -5
  15. package/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx +2 -2
  16. package/docs/self-hosting/advanced/auth/next-auth/casdoor.mdx +49 -44
  17. package/docs/self-hosting/advanced/auth/next-auth/casdoor.zh-CN.mdx +42 -41
  18. package/docs/self-hosting/advanced/auth/next-auth/logto.mdx +29 -21
  19. package/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx +2 -1
  20. package/docs/self-hosting/advanced/auth.mdx +10 -10
  21. package/docs/self-hosting/advanced/auth.zh-CN.mdx +10 -10
  22. package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +1 -1
  23. package/docs/self-hosting/advanced/model-list.mdx +1 -1
  24. package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +17 -12
  25. package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +33 -20
  26. package/docs/self-hosting/advanced/s3.mdx +31 -28
  27. package/docs/self-hosting/advanced/s3.zh-CN.mdx +1 -0
  28. package/docs/self-hosting/advanced/webrtc.mdx +1 -0
  29. package/docs/self-hosting/environment-variables/s3.mdx +4 -3
  30. package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +1 -0
  31. package/docs/self-hosting/environment-variables.mdx +6 -9
  32. package/docs/self-hosting/platform/alibaba-cloud.mdx +1 -2
  33. package/docs/self-hosting/platform/alibaba-cloud.zh-CN.mdx +1 -2
  34. package/docs/self-hosting/platform/btpanel.mdx +7 -13
  35. package/docs/self-hosting/platform/btpanel.zh-CN.mdx +8 -13
  36. package/docs/self-hosting/platform/docker.zh-CN.mdx +2 -1
  37. package/docs/self-hosting/platform/netlify.zh-CN.mdx +2 -1
  38. package/docs/self-hosting/server-database/docker.mdx +18 -5
  39. package/docs/self-hosting/server-database/docker.zh-CN.mdx +9 -6
  40. package/docs/self-hosting/server-database/netlify.mdx +0 -1
  41. package/docs/self-hosting/server-database/railway.mdx +0 -1
  42. package/docs/self-hosting/server-database/repocloud.mdx +5 -2
  43. package/docs/self-hosting/server-database/repocloud.zh-CN.mdx +23 -3
  44. package/docs/self-hosting/server-database/sealos.mdx +3 -0
  45. package/docs/self-hosting/server-database/vercel.mdx +35 -32
  46. package/docs/self-hosting/server-database/vercel.zh-CN.mdx +25 -25
  47. package/docs/self-hosting/server-database/zeabur.mdx +2 -2
  48. package/docs/self-hosting/server-database/zeabur.zh-CN.mdx +3 -4
  49. package/docs/self-hosting/server-database.mdx +23 -8
  50. package/docs/self-hosting/start.mdx +8 -2
  51. package/docs/usage/features/database.zh-CN.mdx +1 -1
  52. package/docs/usage/foundation/text2image.mdx +1 -2
  53. package/docs/usage/foundation/text2image.zh-CN.mdx +1 -3
  54. package/docs/usage/providers/ai21.mdx +14 -15
  55. package/docs/usage/providers/ai21.zh-CN.mdx +1 -3
  56. package/docs/usage/providers/ai360.mdx +14 -15
  57. package/docs/usage/providers/ai360.zh-CN.mdx +1 -3
  58. package/docs/usage/providers/cloudflare.mdx +1 -1
  59. package/docs/usage/providers/fireworksai.mdx +19 -19
  60. package/docs/usage/providers/fireworksai.zh-CN.mdx +1 -3
  61. package/docs/usage/providers/github.mdx +22 -21
  62. package/docs/usage/providers/github.zh-CN.mdx +6 -6
  63. package/docs/usage/providers/hunyuan.mdx +17 -18
  64. package/docs/usage/providers/hunyuan.zh-CN.mdx +1 -3
  65. package/docs/usage/providers/siliconcloud.mdx +14 -15
  66. package/docs/usage/providers/siliconcloud.zh-CN.mdx +3 -5
  67. package/docs/usage/providers/spark.mdx +17 -18
  68. package/docs/usage/providers/spark.zh-CN.mdx +1 -3
  69. package/docs/usage/providers/upstage.mdx +14 -15
  70. package/docs/usage/providers/upstage.zh-CN.mdx +1 -3
  71. package/docs/usage/providers/wenxin.mdx +17 -18
  72. package/docs/usage/providers/wenxin.zh-CN.mdx +1 -3
  73. package/docs/usage/providers/zeroone.mdx +2 -2
  74. package/locales/ar/chat.json +7 -0
  75. package/locales/ar/common.json +2 -0
  76. package/locales/ar/models.json +24 -0
  77. package/locales/ar/providers.json +3 -0
  78. package/locales/ar/setting.json +5 -0
  79. package/locales/ar/thread.json +5 -0
  80. package/locales/bg-BG/chat.json +7 -0
  81. package/locales/bg-BG/common.json +2 -0
  82. package/locales/bg-BG/models.json +24 -0
  83. package/locales/bg-BG/providers.json +3 -0
  84. package/locales/bg-BG/setting.json +5 -0
  85. package/locales/bg-BG/thread.json +5 -0
  86. package/locales/de-DE/chat.json +7 -0
  87. package/locales/de-DE/common.json +2 -0
  88. package/locales/de-DE/models.json +24 -0
  89. package/locales/de-DE/providers.json +3 -0
  90. package/locales/de-DE/setting.json +5 -0
  91. package/locales/de-DE/thread.json +5 -0
  92. package/locales/en-US/chat.json +7 -0
  93. package/locales/en-US/common.json +2 -0
  94. package/locales/en-US/models.json +24 -0
  95. package/locales/en-US/providers.json +3 -0
  96. package/locales/en-US/setting.json +5 -0
  97. package/locales/en-US/thread.json +5 -0
  98. package/locales/es-ES/chat.json +7 -0
  99. package/locales/es-ES/common.json +2 -0
  100. package/locales/es-ES/models.json +24 -0
  101. package/locales/es-ES/providers.json +3 -0
  102. package/locales/es-ES/setting.json +5 -0
  103. package/locales/es-ES/thread.json +5 -0
  104. package/locales/fa-IR/chat.json +7 -0
  105. package/locales/fa-IR/common.json +2 -0
  106. package/locales/fa-IR/models.json +24 -0
  107. package/locales/fa-IR/providers.json +3 -0
  108. package/locales/fa-IR/setting.json +5 -0
  109. package/locales/fa-IR/thread.json +5 -0
  110. package/locales/fr-FR/chat.json +7 -0
  111. package/locales/fr-FR/common.json +2 -0
  112. package/locales/fr-FR/models.json +24 -0
  113. package/locales/fr-FR/providers.json +3 -0
  114. package/locales/fr-FR/setting.json +5 -0
  115. package/locales/fr-FR/thread.json +5 -0
  116. package/locales/it-IT/chat.json +7 -0
  117. package/locales/it-IT/common.json +2 -0
  118. package/locales/it-IT/models.json +24 -0
  119. package/locales/it-IT/providers.json +3 -0
  120. package/locales/it-IT/setting.json +5 -0
  121. package/locales/it-IT/thread.json +5 -0
  122. package/locales/ja-JP/chat.json +7 -0
  123. package/locales/ja-JP/common.json +2 -0
  124. package/locales/ja-JP/models.json +24 -0
  125. package/locales/ja-JP/providers.json +3 -0
  126. package/locales/ja-JP/setting.json +5 -0
  127. package/locales/ja-JP/thread.json +5 -0
  128. package/locales/ko-KR/chat.json +7 -0
  129. package/locales/ko-KR/common.json +2 -0
  130. package/locales/ko-KR/models.json +24 -0
  131. package/locales/ko-KR/providers.json +3 -0
  132. package/locales/ko-KR/setting.json +5 -0
  133. package/locales/ko-KR/thread.json +5 -0
  134. package/locales/nl-NL/chat.json +7 -0
  135. package/locales/nl-NL/common.json +2 -0
  136. package/locales/nl-NL/models.json +24 -0
  137. package/locales/nl-NL/providers.json +3 -0
  138. package/locales/nl-NL/setting.json +5 -0
  139. package/locales/nl-NL/thread.json +5 -0
  140. package/locales/pl-PL/chat.json +7 -0
  141. package/locales/pl-PL/common.json +2 -0
  142. package/locales/pl-PL/models.json +24 -0
  143. package/locales/pl-PL/providers.json +3 -0
  144. package/locales/pl-PL/setting.json +5 -0
  145. package/locales/pl-PL/thread.json +5 -0
  146. package/locales/pt-BR/chat.json +7 -0
  147. package/locales/pt-BR/common.json +2 -0
  148. package/locales/pt-BR/models.json +24 -0
  149. package/locales/pt-BR/providers.json +3 -0
  150. package/locales/pt-BR/setting.json +5 -0
  151. package/locales/pt-BR/thread.json +5 -0
  152. package/locales/ru-RU/chat.json +7 -0
  153. package/locales/ru-RU/common.json +2 -0
  154. package/locales/ru-RU/models.json +24 -0
  155. package/locales/ru-RU/providers.json +3 -0
  156. package/locales/ru-RU/setting.json +5 -0
  157. package/locales/ru-RU/thread.json +5 -0
  158. package/locales/tr-TR/chat.json +7 -0
  159. package/locales/tr-TR/common.json +2 -0
  160. package/locales/tr-TR/models.json +24 -0
  161. package/locales/tr-TR/providers.json +3 -0
  162. package/locales/tr-TR/setting.json +5 -0
  163. package/locales/tr-TR/thread.json +5 -0
  164. package/locales/vi-VN/chat.json +7 -0
  165. package/locales/vi-VN/common.json +2 -0
  166. package/locales/vi-VN/models.json +24 -0
  167. package/locales/vi-VN/providers.json +3 -0
  168. package/locales/vi-VN/setting.json +5 -0
  169. package/locales/vi-VN/thread.json +5 -0
  170. package/locales/zh-CN/chat.json +7 -0
  171. package/locales/zh-CN/common.json +2 -0
  172. package/locales/zh-CN/models.json +24 -0
  173. package/locales/zh-CN/providers.json +3 -0
  174. package/locales/zh-CN/setting.json +5 -0
  175. package/locales/zh-CN/thread.json +5 -0
  176. package/locales/zh-TW/chat.json +7 -0
  177. package/locales/zh-TW/common.json +2 -0
  178. package/locales/zh-TW/models.json +24 -0
  179. package/locales/zh-TW/providers.json +3 -0
  180. package/locales/zh-TW/setting.json +5 -0
  181. package/locales/zh-TW/thread.json +5 -0
  182. package/package.json +6 -1
  183. package/scripts/changelogWorkflow/buildStaticChangelog.ts +135 -0
  184. package/scripts/changelogWorkflow/const.ts +11 -0
  185. package/scripts/changelogWorkflow/index.ts +10 -0
  186. package/src/app/(main)/chat/(workspace)/@conversation/default.tsx +2 -0
  187. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatHydration/index.tsx +11 -2
  188. package/src/{features → app/(main)/chat/(workspace)/@conversation/features}/ChatInput/Desktop/Footer/index.tsx +7 -9
  189. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/index.tsx +7 -2
  190. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/Thread.tsx +62 -0
  191. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/ThreadItem.tsx +68 -0
  192. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatList/ChatItem/index.tsx +62 -2
  193. package/src/app/(main)/chat/(workspace)/@conversation/features/ThreadHydration.tsx +47 -0
  194. package/src/app/(main)/chat/(workspace)/@portal/_layout/Desktop.tsx +3 -2
  195. package/src/app/(main)/chat/(workspace)/@portal/_layout/Mobile.tsx +47 -6
  196. package/src/app/(main)/chat/(workspace)/@topic/features/SkeletonList.tsx +3 -2
  197. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ByTimeMode/index.tsx +10 -3
  198. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/FlatMode/index.tsx +1 -1
  199. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadItem/Content.tsx +164 -0
  200. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/ThreadItem/index.tsx +98 -0
  201. package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/{TopicItem.tsx → TopicItem/index.tsx} +33 -22
  202. package/src/app/(main)/chat/(workspace)/_layout/Desktop/Portal.tsx +12 -5
  203. package/src/app/(main)/chat/(workspace)/_layout/Mobile/index.tsx +1 -2
  204. package/src/const/message.ts +2 -0
  205. package/src/const/settings/systemAgent.ts +1 -0
  206. package/src/database/server/migrations/0012_add_thread.sql +39 -0
  207. package/src/database/server/migrations/meta/0012_snapshot.json +3671 -0
  208. package/src/database/server/migrations/meta/_journal.json +7 -0
  209. package/src/database/server/models/_template.ts +2 -2
  210. package/src/database/server/models/message.ts +1 -0
  211. package/src/database/server/models/thread.ts +79 -0
  212. package/src/database/server/schemas/lobechat/message.ts +2 -1
  213. package/src/database/server/schemas/lobechat/relations.ts +13 -1
  214. package/src/database/server/schemas/lobechat/topic.ts +30 -1
  215. package/src/database/server/utils/idGenerator.ts +1 -0
  216. package/src/features/ChatInput/ActionBar/Token/TokenTag.tsx +6 -4
  217. package/src/features/ChatInput/ActionBar/Token/index.tsx +24 -5
  218. package/src/features/ChatInput/ActionBar/config.ts +3 -2
  219. package/src/features/ChatInput/Desktop/index.tsx +15 -7
  220. package/src/features/ChatInput/Mobile/index.tsx +4 -4
  221. package/src/features/Conversation/Actions/Assistant.tsx +24 -5
  222. package/src/features/Conversation/Actions/User.tsx +21 -4
  223. package/src/features/Conversation/Actions/index.ts +1 -66
  224. package/src/features/Conversation/Messages/{Tool → Assistant/ToolCallItem}/Inspector/index.tsx +3 -1
  225. package/src/features/Conversation/Messages/{Tool/index.tsx → Assistant/ToolCallItem/Tool.tsx} +10 -11
  226. package/src/features/Conversation/Messages/Assistant/ToolCallItem/index.tsx +5 -3
  227. package/src/features/Conversation/Messages/Assistant/index.tsx +22 -14
  228. package/src/features/Conversation/Messages/index.ts +0 -2
  229. package/src/features/Conversation/components/AutoScroll.tsx +1 -1
  230. package/src/features/Conversation/components/ChatItem/ActionsBar.tsx +79 -5
  231. package/src/features/Conversation/components/ChatItem/InPortalThreadContext.ts +3 -0
  232. package/src/features/Conversation/components/ChatItem/index.tsx +16 -5
  233. package/src/features/Conversation/components/MarkdownElements/LobeArtifact/Render/index.tsx +9 -1
  234. package/src/features/Conversation/components/ThreadDivider/index.tsx +19 -0
  235. package/src/features/Conversation/hooks/useChatListActionsBar.tsx +19 -4
  236. package/src/features/Portal/Thread/Chat/ChatInput/Footer.tsx +90 -0
  237. package/src/features/Portal/Thread/Chat/ChatInput/TextArea.tsx +30 -0
  238. package/src/features/Portal/Thread/Chat/ChatInput/index.tsx +66 -0
  239. package/src/features/Portal/Thread/Chat/ChatInput/useSend.ts +50 -0
  240. package/src/features/Portal/Thread/Chat/ChatItem.tsx +62 -0
  241. package/src/features/Portal/Thread/Chat/ChatList.tsx +49 -0
  242. package/src/features/Portal/Thread/Chat/ThreadDivider/index.tsx +19 -0
  243. package/src/features/Portal/Thread/Chat/index.tsx +28 -0
  244. package/src/features/Portal/Thread/Header/Active.tsx +35 -0
  245. package/src/features/Portal/Thread/Header/New.tsx +37 -0
  246. package/src/features/Portal/Thread/Header/Title.tsx +18 -0
  247. package/src/features/Portal/Thread/Header/index.tsx +20 -0
  248. package/src/features/Portal/Thread/hook.ts +8 -0
  249. package/src/features/Portal/Thread/index.ts +12 -0
  250. package/src/features/Portal/router.tsx +2 -1
  251. package/src/hooks/useFetchTopics.ts +7 -1
  252. package/src/locales/default/chat.ts +8 -1
  253. package/src/locales/default/common.ts +3 -0
  254. package/src/locales/default/index.ts +2 -0
  255. package/src/locales/default/setting.ts +5 -0
  256. package/src/locales/default/thread.ts +5 -0
  257. package/src/server/routers/lambda/index.ts +2 -0
  258. package/src/server/routers/lambda/thread.ts +83 -0
  259. package/src/services/thread.ts +54 -0
  260. package/src/store/chat/initialState.ts +3 -0
  261. package/src/store/chat/selectors.ts +2 -1
  262. package/src/store/chat/slices/aiChat/actions/__tests__/generateAIChat.test.ts +1 -1
  263. package/src/store/chat/slices/aiChat/actions/__tests__/rag.test.ts +1 -1
  264. package/src/store/chat/slices/aiChat/actions/generateAIChat.ts +31 -8
  265. package/src/store/chat/slices/aiChat/actions/rag.ts +1 -1
  266. package/src/store/chat/slices/message/selectors.test.ts +3 -3
  267. package/src/store/chat/slices/message/selectors.ts +50 -29
  268. package/src/store/chat/slices/plugin/action.ts +26 -8
  269. package/src/store/chat/slices/portal/action.ts +1 -0
  270. package/src/store/chat/slices/portal/initialState.ts +1 -0
  271. package/src/store/chat/slices/portal/selectors/thread.ts +17 -0
  272. package/src/store/chat/slices/portal/selectors.ts +2 -0
  273. package/src/store/chat/slices/thread/action.ts +326 -0
  274. package/src/store/chat/slices/thread/initialState.ts +34 -0
  275. package/src/store/chat/slices/thread/reducer.ts +48 -0
  276. package/src/store/chat/slices/thread/selectors/index.ts +202 -0
  277. package/src/store/chat/slices/thread/selectors/util.ts +22 -0
  278. package/src/store/chat/slices/topic/action.ts +5 -1
  279. package/src/store/chat/store.ts +5 -2
  280. package/src/store/global/initialState.ts +4 -0
  281. package/src/store/global/selectors.ts +4 -0
  282. package/src/store/user/slices/settings/selectors/systemAgent.ts +2 -0
  283. package/src/types/message/index.ts +17 -1
  284. package/src/types/topic/index.ts +1 -0
  285. package/src/types/topic/thread.ts +42 -0
  286. package/src/types/user/settings/systemAgent.ts +1 -0
  287. package/src/app/(main)/chat/(workspace)/@portal/features/Header.tsx +0 -11
  288. package/src/app/(main)/chat/(workspace)/_layout/Mobile/PortalModal.tsx +0 -35
  289. /package/src/{features → app/(main)/chat/(workspace)/@conversation/features}/ChatInput/Desktop/Footer/SendMore.tsx +0 -0
  290. /package/src/{features → app/(main)/chat/(workspace)/@conversation/features}/ChatInput/Desktop/Footer/ShortcutHint.tsx +0 -0
  291. /package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/{DefaultContent.tsx → TopicItem/DefaultContent.tsx} +0 -0
  292. /package/src/app/(main)/chat/(workspace)/@topic/features/TopicListContent/{TopicContent.tsx → TopicItem/TopicContent.tsx} +0 -0
  293. /package/src/features/Conversation/Messages/{Tool → Assistant/ToolCallItem}/Inspector/PluginResultJSON.tsx +0 -0
  294. /package/src/features/Conversation/Messages/{Tool → Assistant/ToolCallItem}/Inspector/Settings.tsx +0 -0
  295. /package/src/features/Conversation/Messages/{Tool → Assistant/ToolCallItem}/Inspector/style.ts +0 -0

There are too many changes on this page to be displayed.


The amount of changes on this page would crash your brower.

You can still verify the content by downloading the package file manually.