@lobehub/chat 1.123.4 → 1.124.1

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 (149) hide show
  1. package/.env.example +5 -0
  2. package/CHANGELOG.md +58 -0
  3. package/Dockerfile +2 -0
  4. package/Dockerfile.database +2 -0
  5. package/Dockerfile.pglite +2 -0
  6. package/changelog/v1.json +21 -0
  7. package/docs/self-hosting/environment-variables/model-provider.mdx +18 -0
  8. package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +20 -0
  9. package/locales/ar/chat.json +8 -2
  10. package/locales/ar/editor.json +47 -0
  11. package/locales/bg-BG/chat.json +8 -2
  12. package/locales/bg-BG/editor.json +47 -0
  13. package/locales/de-DE/chat.json +8 -2
  14. package/locales/de-DE/editor.json +47 -0
  15. package/locales/en-US/chat.json +8 -2
  16. package/locales/en-US/editor.json +47 -0
  17. package/locales/es-ES/chat.json +8 -2
  18. package/locales/es-ES/editor.json +47 -0
  19. package/locales/es-ES/models.json +3 -1
  20. package/locales/fa-IR/chat.json +8 -2
  21. package/locales/fa-IR/editor.json +47 -0
  22. package/locales/fr-FR/chat.json +8 -2
  23. package/locales/fr-FR/editor.json +47 -0
  24. package/locales/it-IT/chat.json +8 -2
  25. package/locales/it-IT/editor.json +47 -0
  26. package/locales/ja-JP/chat.json +8 -2
  27. package/locales/ja-JP/editor.json +47 -0
  28. package/locales/ko-KR/chat.json +8 -2
  29. package/locales/ko-KR/editor.json +47 -0
  30. package/locales/ko-KR/models.json +3 -1
  31. package/locales/nl-NL/chat.json +8 -2
  32. package/locales/nl-NL/editor.json +47 -0
  33. package/locales/nl-NL/models.json +3 -1
  34. package/locales/pl-PL/chat.json +8 -2
  35. package/locales/pl-PL/editor.json +47 -0
  36. package/locales/pt-BR/chat.json +8 -2
  37. package/locales/pt-BR/editor.json +47 -0
  38. package/locales/ru-RU/chat.json +8 -2
  39. package/locales/ru-RU/editor.json +47 -0
  40. package/locales/tr-TR/chat.json +8 -2
  41. package/locales/tr-TR/editor.json +47 -0
  42. package/locales/vi-VN/chat.json +8 -2
  43. package/locales/vi-VN/editor.json +47 -0
  44. package/locales/zh-CN/chat.json +8 -2
  45. package/locales/zh-CN/editor.json +47 -0
  46. package/locales/zh-CN/modelProvider.json +1 -1
  47. package/locales/zh-TW/chat.json +8 -2
  48. package/locales/zh-TW/editor.json +47 -0
  49. package/locales/zh-TW/models.json +3 -1
  50. package/next.config.ts +4 -0
  51. package/package.json +4 -2
  52. package/packages/const/src/layoutTokens.ts +1 -0
  53. package/packages/model-bank/src/aiModels/aihubmix.ts +38 -4
  54. package/packages/model-bank/src/aiModels/groq.ts +26 -8
  55. package/packages/model-bank/src/aiModels/hunyuan.ts +3 -3
  56. package/packages/model-bank/src/aiModels/modelscope.ts +13 -2
  57. package/packages/model-bank/src/aiModels/moonshot.ts +25 -5
  58. package/packages/model-bank/src/aiModels/novita.ts +40 -9
  59. package/packages/model-bank/src/aiModels/openrouter.ts +0 -13
  60. package/packages/model-bank/src/aiModels/qwen.ts +62 -1
  61. package/packages/model-bank/src/aiModels/siliconcloud.ts +20 -0
  62. package/packages/model-bank/src/aiModels/volcengine.ts +141 -15
  63. package/packages/model-runtime/src/newapi/index.test.ts +49 -42
  64. package/packages/model-runtime/src/newapi/index.ts +124 -143
  65. package/packages/types/src/index.ts +1 -0
  66. package/packages/utils/src/index.ts +1 -0
  67. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/{Footer/MessageFromUrl.tsx → MessageFromUrl.tsx} +3 -2
  68. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/index.tsx +129 -28
  69. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/index.tsx +44 -66
  70. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/useSend.ts +141 -0
  71. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/Content.tsx +7 -1
  72. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/InboxWelcome/QuestionSuggest.tsx +3 -2
  73. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatList/WelcomeChatItem/OpeningQuestions.tsx +3 -2
  74. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/HeaderAction.tsx +18 -2
  75. package/src/app/[variants]/(main)/settings/provider/(detail)/newapi/page.tsx +1 -1
  76. package/src/config/llm.ts +8 -0
  77. package/src/features/ChatInput/ActionBar/STT/common.tsx +41 -47
  78. package/src/features/ChatInput/{Topic → ActionBar/SaveTopic}/index.tsx +15 -4
  79. package/src/features/ChatInput/ActionBar/Typo/index.tsx +22 -0
  80. package/src/features/ChatInput/ActionBar/components/Action.tsx +4 -0
  81. package/src/features/ChatInput/ActionBar/config.ts +7 -1
  82. package/src/features/ChatInput/ActionBar/index.tsx +40 -51
  83. package/src/features/ChatInput/ChatInputProvider.tsx +54 -0
  84. package/src/features/ChatInput/Desktop/FilePreview/FileItem/index.tsx +20 -11
  85. package/src/features/ChatInput/Desktop/FilePreview/FileList.tsx +16 -15
  86. package/src/features/ChatInput/Desktop/index.tsx +94 -69
  87. package/src/features/ChatInput/InputEditor/index.tsx +134 -0
  88. package/src/{app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files → features/ChatInput/Mobile/FilePreview}/FileItem/File.tsx +1 -2
  89. package/src/features/ChatInput/Mobile/FilePreview/index.tsx +44 -0
  90. package/src/features/ChatInput/Mobile/index.tsx +72 -0
  91. package/src/features/ChatInput/SendArea/ExpandButton.tsx +30 -0
  92. package/src/features/ChatInput/SendArea/SendButton.tsx +29 -0
  93. package/src/features/ChatInput/SendArea/ShortcutHint.tsx +52 -0
  94. package/src/features/ChatInput/SendArea/index.tsx +36 -0
  95. package/src/features/ChatInput/StoreUpdater.tsx +41 -0
  96. package/src/features/ChatInput/TypoBar/index.tsx +139 -0
  97. package/src/features/ChatInput/hooks/useChatInputEditor.ts +36 -0
  98. package/src/features/ChatInput/index.ts +7 -0
  99. package/src/features/ChatInput/store/action.ts +75 -0
  100. package/src/features/ChatInput/store/index.ts +23 -0
  101. package/src/features/ChatInput/store/initialState.ts +54 -0
  102. package/src/features/ChatInput/store/selectors.ts +5 -0
  103. package/src/features/Conversation/components/BackBottom/style.ts +1 -1
  104. package/src/features/Conversation/components/SkeletonList.tsx +10 -3
  105. package/src/features/Conversation/components/VirtualizedList/index.tsx +53 -44
  106. package/src/features/Conversation/components/WideScreenContainer/index.tsx +43 -0
  107. package/src/features/Portal/Thread/Chat/ChatInput/index.tsx +49 -42
  108. package/src/features/Portal/Thread/Chat/ChatInput/useSend.ts +48 -22
  109. package/src/features/Portal/Thread/Chat/index.tsx +2 -2
  110. package/src/features/Portal/Thread/Header/index.tsx +1 -1
  111. package/src/hooks/useHotkeys/chatScope.ts +5 -3
  112. package/src/layout/GlobalProvider/Editor.tsx +27 -0
  113. package/src/layout/GlobalProvider/Locale.tsx +3 -23
  114. package/src/locales/default/chat.ts +8 -2
  115. package/src/locales/default/editor.ts +47 -0
  116. package/src/locales/default/index.ts +2 -0
  117. package/src/locales/default/modelProvider.ts +1 -1
  118. package/src/services/aiChat.ts +8 -2
  119. package/src/store/chat/slices/aiChat/actions/__tests__/cancel-functionality.test.ts +107 -0
  120. package/src/store/chat/slices/aiChat/actions/__tests__/generateAIChatV2.test.ts +394 -40
  121. package/src/store/chat/slices/aiChat/actions/generateAIChatV2.ts +175 -35
  122. package/src/store/chat/slices/aiChat/initialState.ts +19 -0
  123. package/src/store/chat/slices/aiChat/selectors.ts +18 -0
  124. package/src/store/global/action.test.ts +6 -5
  125. package/src/store/global/actions/__tests__/general.test.ts +6 -6
  126. package/src/store/global/actions/workspacePane.ts +6 -0
  127. package/src/store/global/initialState.ts +2 -4
  128. package/src/store/global/selectors/systemStatus.test.ts +1 -2
  129. package/src/store/global/selectors/systemStatus.ts +2 -5
  130. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/SendMore.tsx +0 -104
  131. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/ShortcutHint.tsx +0 -40
  132. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/index.tsx +0 -125
  133. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/TextArea.test.tsx +0 -332
  134. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/TextArea.tsx +0 -29
  135. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files/index.tsx +0 -33
  136. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/InputArea/Container.tsx +0 -41
  137. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/InputArea/index.tsx +0 -156
  138. package/src/app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Send.tsx +0 -33
  139. package/src/features/ChatInput/Desktop/Header/index.tsx +0 -30
  140. package/src/features/ChatInput/Desktop/InputArea/index.tsx +0 -143
  141. package/src/features/ChatInput/Desktop/__tests__/useAutoFocus.test.ts +0 -45
  142. package/src/features/ChatInput/Desktop/useAutoFocus.ts +0 -13
  143. package/src/features/ChatInput/useSend.ts +0 -102
  144. package/src/features/Portal/Thread/Chat/ChatInput/Footer.tsx +0 -90
  145. package/src/features/Portal/Thread/Chat/ChatInput/TextArea.tsx +0 -30
  146. package/src/libs/trpc/client/types.ts +0 -18
  147. /package/src/{app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files → features/ChatInput/Mobile/FilePreview}/FileItem/Image.tsx +0 -0
  148. /package/src/{app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files → features/ChatInput/Mobile/FilePreview}/FileItem/index.tsx +0 -0
  149. /package/src/{app/[variants]/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files → features/ChatInput/Mobile/FilePreview}/FileItem/style.ts +0 -0
@@ -0,0 +1,47 @@
1
+ {
2
+ "actions": {
3
+ "expand": {
4
+ "off": "Daralt",
5
+ "on": "Genişlet"
6
+ },
7
+ "typobar": {
8
+ "off": "Biçim araç çubuğunu gizle",
9
+ "on": "Biçim araç çubuğunu göster"
10
+ }
11
+ },
12
+ "file": {
13
+ "error": "Hata: {{message}}",
14
+ "uploading": "Dosya yükleniyor..."
15
+ },
16
+ "image": {
17
+ "broken": "Resim bozuk"
18
+ },
19
+ "link": {
20
+ "edit": "Bağlantıyı düzenle",
21
+ "open": "Bağlantıyı aç",
22
+ "placeholder": "Bağlantı URL'si girin",
23
+ "unlink": "Bağlantıyı kaldır"
24
+ },
25
+ "table": {
26
+ "delete": "Tabloyu sil",
27
+ "deleteColumn": "Sütunu sil",
28
+ "deleteRow": "Satırı sil",
29
+ "insertColumnLeft": "Sol tarafa {{count}} sütun ekle",
30
+ "insertColumnRight": "Sağ tarafa {{count}} sütun ekle",
31
+ "insertRowAbove": "Üst tarafa {{count}} satır ekle",
32
+ "insertRowBelow": "Alt tarafa {{count}} satır ekle"
33
+ },
34
+ "typobar": {
35
+ "blockquote": "Alıntı",
36
+ "bold": "Kalın",
37
+ "bulletList": "Sırasız liste",
38
+ "code": "Satır içi kod",
39
+ "codeblock": "Kod bloğu",
40
+ "italic": "İtalik",
41
+ "link": "Bağlantı",
42
+ "numberList": "Numaralı liste",
43
+ "strikethrough": "Üstü çizili",
44
+ "table": "Tablo ekle",
45
+ "underline": "Altı çizili"
46
+ }
47
+ }
@@ -70,10 +70,12 @@
70
70
  "input": {
71
71
  "addAi": "Thêm một tin nhắn AI",
72
72
  "addUser": "Thêm một tin nhắn người dùng",
73
+ "disclaimer": "AI cũng có thể mắc lỗi, vui lòng kiểm tra kỹ thông tin quan trọng",
74
+ "errorMsg": "Gửi tin nhắn thất bại, vui lòng kiểm tra mạng và thử lại: {{errorMsg}}",
73
75
  "more": "Thêm",
74
76
  "send": "Gửi",
75
- "sendWithCmdEnter": "Nhấn {{meta}} + Enter để gửi",
76
- "sendWithEnter": "Nhấn Enter để gửi",
77
+ "sendWithCmdEnter": "Nhấn <key/> để gửi",
78
+ "sendWithEnter": "Nhấn <key/> để gửi",
77
79
  "stop": "Dừng",
78
80
  "warp": "Xuống dòng"
79
81
  },
@@ -232,6 +234,10 @@
232
234
  "threadMessageCount": "{{messageCount}} tin nhắn",
233
235
  "title": "Chủ đề con"
234
236
  },
237
+ "toggleWideScreen": {
238
+ "off": "Tắt chế độ màn hình rộng",
239
+ "on": "Bật chế độ màn hình rộng"
240
+ },
235
241
  "tokenDetails": {
236
242
  "chats": "Tin nhắn trò chuyện",
237
243
  "historySummary": "Tóm tắt lịch sử",
@@ -0,0 +1,47 @@
1
+ {
2
+ "actions": {
3
+ "expand": {
4
+ "off": "Thu gọn",
5
+ "on": "Mở rộng"
6
+ },
7
+ "typobar": {
8
+ "off": "Ẩn thanh công cụ định dạng",
9
+ "on": "Hiển thị thanh công cụ định dạng"
10
+ }
11
+ },
12
+ "file": {
13
+ "error": "Lỗi: {{message}}",
14
+ "uploading": "Đang tải tệp lên..."
15
+ },
16
+ "image": {
17
+ "broken": "Hình ảnh bị hỏng"
18
+ },
19
+ "link": {
20
+ "edit": "Chỉnh sửa liên kết",
21
+ "open": "Mở liên kết",
22
+ "placeholder": "Nhập URL liên kết",
23
+ "unlink": "Gỡ liên kết"
24
+ },
25
+ "table": {
26
+ "delete": "Xóa bảng",
27
+ "deleteColumn": "Xóa cột",
28
+ "deleteRow": "Xóa hàng",
29
+ "insertColumnLeft": "Chèn {{count}} cột vào bên trái",
30
+ "insertColumnRight": "Chèn {{count}} cột vào bên phải",
31
+ "insertRowAbove": "Chèn {{count}} hàng vào phía trên",
32
+ "insertRowBelow": "Chèn {{count}} hàng vào phía dưới"
33
+ },
34
+ "typobar": {
35
+ "blockquote": "Trích dẫn",
36
+ "bold": "Đậm",
37
+ "bulletList": "Danh sách gạch đầu dòng",
38
+ "code": "Mã nội tuyến",
39
+ "codeblock": "Khối mã",
40
+ "italic": "Nghiêng",
41
+ "link": "Liên kết",
42
+ "numberList": "Danh sách có thứ tự",
43
+ "strikethrough": "Gạch ngang",
44
+ "table": "Chèn bảng",
45
+ "underline": "Gạch chân"
46
+ }
47
+ }
@@ -70,10 +70,12 @@
70
70
  "input": {
71
71
  "addAi": "添加一条 AI 消息",
72
72
  "addUser": "添加一条用户消息",
73
+ "disclaimer": "AI 也可能会犯错,请检查重要信息",
74
+ "errorMsg": "消息发送失败,请检查网络后重试: {{errorMsg}}",
73
75
  "more": "更多",
74
76
  "send": "发送",
75
- "sendWithCmdEnter": "按 {{meta}} + Enter 键发送",
76
- "sendWithEnter": "按 Enter 键发送",
77
+ "sendWithCmdEnter": "按 <key/> 键发送",
78
+ "sendWithEnter": "按 <key/> 键发送",
77
79
  "stop": "停止",
78
80
  "warp": "换行"
79
81
  },
@@ -232,6 +234,10 @@
232
234
  "threadMessageCount": "{{messageCount}} 条消息",
233
235
  "title": "子话题"
234
236
  },
237
+ "toggleWideScreen": {
238
+ "off": "关闭宽屏模式",
239
+ "on": "开启宽屏模式"
240
+ },
235
241
  "tokenDetails": {
236
242
  "chats": "会话消息",
237
243
  "historySummary": "历史总结",
@@ -0,0 +1,47 @@
1
+ {
2
+ "actions": {
3
+ "expand": {
4
+ "off": "收起",
5
+ "on": "展开"
6
+ },
7
+ "typobar": {
8
+ "off": "隐藏格式工具栏",
9
+ "on": "显示格式工具栏"
10
+ }
11
+ },
12
+ "file": {
13
+ "error": "错误:{{message}}",
14
+ "uploading": "正在上传文件..."
15
+ },
16
+ "image": {
17
+ "broken": "图片损坏"
18
+ },
19
+ "link": {
20
+ "edit": "编辑链接",
21
+ "open": "打开链接",
22
+ "placeholder": "输入链接 URL",
23
+ "unlink": "取消链接"
24
+ },
25
+ "table": {
26
+ "delete": "删除表格",
27
+ "deleteColumn": "删除列",
28
+ "deleteRow": "删除行",
29
+ "insertColumnLeft": "在左侧插入 {{count}} 列",
30
+ "insertColumnRight": "在右侧插入 {{count}} 列",
31
+ "insertRowAbove": "在上方插入 {{count}} 行",
32
+ "insertRowBelow": "在下方插入 {{count}} 行"
33
+ },
34
+ "typobar": {
35
+ "blockquote": "引用",
36
+ "bold": "加粗",
37
+ "bulletList": "无序列表",
38
+ "code": "行内代码",
39
+ "codeblock": "代码块",
40
+ "italic": "斜体",
41
+ "link": "链接",
42
+ "numberList": "有序列表",
43
+ "strikethrough": "删除线",
44
+ "table": "插入表格",
45
+ "underline": "下划线"
46
+ }
47
+ }
@@ -161,7 +161,7 @@
161
161
  "title": "API 密钥"
162
162
  },
163
163
  "apiUrl": {
164
- "desc": "New API 服务的 API 地址,大部分时候需要带 /v1",
164
+ "desc": "New API 服务的 API 地址,大部分时候不要带 /v1",
165
165
  "title": "API 地址"
166
166
  },
167
167
  "enabled": {
@@ -70,10 +70,12 @@
70
70
  "input": {
71
71
  "addAi": "新增一條 AI 訊息",
72
72
  "addUser": "新增一條使用者訊息",
73
+ "disclaimer": "AI 也可能會犯錯,請檢查重要資訊",
74
+ "errorMsg": "訊息發送失敗,請檢查網路後重試:{{errorMsg}}",
73
75
  "more": "更多",
74
76
  "send": "發送",
75
- "sendWithCmdEnter": "按 {{meta}} + Enter 鍵發送",
76
- "sendWithEnter": "按 Enter 鍵發送",
77
+ "sendWithCmdEnter": "按 <key/> 鍵發送",
78
+ "sendWithEnter": "按 <key/> 鍵發送",
77
79
  "stop": "停止",
78
80
  "warp": "換行"
79
81
  },
@@ -232,6 +234,10 @@
232
234
  "threadMessageCount": "{{messageCount}} 條消息",
233
235
  "title": "子話題"
234
236
  },
237
+ "toggleWideScreen": {
238
+ "off": "關閉寬螢幕模式",
239
+ "on": "開啟寬螢幕模式"
240
+ },
235
241
  "tokenDetails": {
236
242
  "chats": "聊天訊息",
237
243
  "historySummary": "歷史總結",
@@ -0,0 +1,47 @@
1
+ {
2
+ "actions": {
3
+ "expand": {
4
+ "off": "收合",
5
+ "on": "展開"
6
+ },
7
+ "typobar": {
8
+ "off": "隱藏格式工具列",
9
+ "on": "顯示格式工具列"
10
+ }
11
+ },
12
+ "file": {
13
+ "error": "錯誤:{{message}}",
14
+ "uploading": "正在上傳檔案..."
15
+ },
16
+ "image": {
17
+ "broken": "圖片損毀"
18
+ },
19
+ "link": {
20
+ "edit": "編輯連結",
21
+ "open": "開啟連結",
22
+ "placeholder": "輸入連結 URL",
23
+ "unlink": "取消連結"
24
+ },
25
+ "table": {
26
+ "delete": "刪除表格",
27
+ "deleteColumn": "刪除列",
28
+ "deleteRow": "刪除行",
29
+ "insertColumnLeft": "在左側插入 {{count}} 列",
30
+ "insertColumnRight": "在右側插入 {{count}} 列",
31
+ "insertRowAbove": "在上方插入 {{count}} 行",
32
+ "insertRowBelow": "在下方插入 {{count}} 行"
33
+ },
34
+ "typobar": {
35
+ "blockquote": "引用",
36
+ "bold": "粗體",
37
+ "bulletList": "無序清單",
38
+ "code": "行內程式碼",
39
+ "codeblock": "程式碼區塊",
40
+ "italic": "斜體",
41
+ "link": "連結",
42
+ "numberList": "有序清單",
43
+ "strikethrough": "刪除線",
44
+ "table": "插入表格",
45
+ "underline": "底線"
46
+ }
47
+ }
@@ -1505,7 +1505,9 @@
1505
1505
  "gpt-4.1-nano": {
1506
1506
  "description": "GPT-4.1 mini 提供了智能、速度和成本之間的平衡,使其成為許多用例中具吸引力的模型。"
1507
1507
  },
1508
- "gpt-4.5-preview": "GPT-4.5-preview 是最新的通用模型,具備深厚的世界知識並能更好地理解使用者意圖,擅長創意任務與代理規劃。此模型的知識截至 2023 年 10 月。",
1508
+ "gpt-4.5-preview": {
1509
+ "description": "GPT-4.5-preview 是最新的通用模型,擁有深厚的世界知識和對使用者意圖的更佳理解,擅長創意任務與代理規劃。該模型的知識截止至2023年10月。"
1510
+ },
1509
1511
  "gpt-4o": {
1510
1512
  "description": "ChatGPT-4o是一款動態模型,實時更新以保持當前最新版本。它結合了強大的語言理解與生成能力,適合於大規模應用場景,包括客戶服務、教育和技術支持。"
1511
1513
  },
package/next.config.ts CHANGED
@@ -22,6 +22,9 @@ const standaloneConfig: NextConfig = {
22
22
 
23
23
  const nextConfig: NextConfig = {
24
24
  ...(isStandaloneMode ? standaloneConfig : {}),
25
+ compiler: {
26
+ emotion: true,
27
+ },
25
28
  compress: isProd,
26
29
  experimental: {
27
30
  optimizePackageImports: [
@@ -30,6 +33,7 @@ const nextConfig: NextConfig = {
30
33
  '@emoji-mart/data',
31
34
  '@icons-pack/react-simple-icons',
32
35
  '@lobehub/ui',
36
+ '@lobehub/icons',
33
37
  'gpt-tokenizer',
34
38
  ],
35
39
  // oidc provider depend on constructor.name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.123.4",
3
+ "version": "1.124.1",
4
4
  "description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
5
5
  "keywords": [
6
6
  "framework",
@@ -134,6 +134,7 @@
134
134
  "@codesandbox/sandpack-react": "^2.20.0",
135
135
  "@cyntler/react-doc-viewer": "^1.17.0",
136
136
  "@electric-sql/pglite": "0.2.17",
137
+ "@emotion/react": "^11.14.0",
137
138
  "@fal-ai/client": "^1.6.1",
138
139
  "@formkit/auto-animate": "^0.8.2",
139
140
  "@google/genai": "^1.13.0",
@@ -154,10 +155,11 @@
154
155
  "@lobehub/charts": "^2.0.0",
155
156
  "@lobehub/chat-plugin-sdk": "^1.32.4",
156
157
  "@lobehub/chat-plugins-gateway": "^1.9.0",
158
+ "@lobehub/editor": "^1.4.4",
157
159
  "@lobehub/icons": "^2.31.0",
158
160
  "@lobehub/market-sdk": "^0.22.7",
159
161
  "@lobehub/tts": "^2.0.1",
160
- "@lobehub/ui": "^2.8.3",
162
+ "@lobehub/ui": "^2.11.9",
161
163
  "@modelcontextprotocol/sdk": "^1.17.1",
162
164
  "@neondatabase/serverless": "^1.0.1",
163
165
  "@next/third-parties": "^15.4.6",
@@ -7,6 +7,7 @@ export const CHAT_TEXTAREA_MAX_HEIGHT = 800;
7
7
  export const CHAT_TEXTAREA_HEIGHT = 160;
8
8
  export const CHAT_TEXTAREA_HEIGHT_MOBILE = 108;
9
9
  export const CHAT_SIDEBAR_WIDTH = 280;
10
+ export const CONVERSATION_MIN_WIDTH = 850;
10
11
 
11
12
  export const CHAT_PORTAL_WIDTH = 400;
12
13
  export const CHAT_PORTAL_MAX_WIDTH = 1280;
@@ -552,13 +552,11 @@ const aihubmixModels: AIChatModelCard[] = [
552
552
  {
553
553
  abilities: {
554
554
  functionCall: true,
555
- reasoning: true,
556
555
  },
557
556
  contextWindowTokens: 131_072,
558
557
  description:
559
- 'DeepSeek-V3.1 是深度求索全新推出的混合推理模型,支持思考与非思考2种推理模式,较 DeepSeek-R1-0528 思考效率更高。经 Post-Training 优化,Agent 工具使用与智能体任务表现大幅提升。',
560
- displayName: 'DeepSeek V3.1',
561
- enabled: true,
558
+ 'DeepSeek-V3.1-非思考模式;DeepSeek-V3.1 是深度求索全新推出的混合推理模型,支持思考与非思考2种推理模式,较 DeepSeek-R1-0528 思考效率更高。经 Post-Training 优化,Agent 工具使用与智能体任务表现大幅提升。',
559
+ displayName: 'DeepSeek V3.1 (non-Think)',
562
560
  id: 'DeepSeek-V3.1',
563
561
  pricing: {
564
562
  units: [
@@ -568,6 +566,42 @@ const aihubmixModels: AIChatModelCard[] = [
568
566
  },
569
567
  type: 'chat',
570
568
  },
569
+ {
570
+ abilities: {
571
+ functionCall: true,
572
+ reasoning: true,
573
+ },
574
+ contextWindowTokens: 131_072,
575
+ description:
576
+ 'DeepSeek-V3.1-思考模式;DeepSeek-V3.1 是深度求索全新推出的混合推理模型,支持思考与非思考2种推理模式,较 DeepSeek-R1-0528 思考效率更高。经 Post-Training 优化,Agent 工具使用与智能体任务表现大幅提升。',
577
+ displayName: 'DeepSeek V3.1 (Think)',
578
+ id: 'DeepSeek-V3.1-Think',
579
+ pricing: {
580
+ units: [
581
+ { name: 'textInput', rate: 0.56, strategy: 'fixed', unit: 'millionTokens' },
582
+ { name: 'textOutput', rate: 1.68, strategy: 'fixed', unit: 'millionTokens' },
583
+ ],
584
+ },
585
+ type: 'chat',
586
+ },
587
+ {
588
+ abilities: {
589
+ functionCall: true,
590
+ reasoning: true,
591
+ },
592
+ contextWindowTokens: 131_072,
593
+ description:
594
+ 'DeepSeek V3.1 Fast 是 DeepSeek V3.1版本的高TPS极速版。 混合思考模式:通过更改聊天模板,一个模型可以同时支持思考模式和非思考模式。 更智能的工具调用:通过后训练优化,模型在工具使用和代理任务中的表现显著提升。',
595
+ displayName: 'DeepSeek V3.1 (Fast)',
596
+ id: 'DeepSeek-V3.1-Fast',
597
+ pricing: {
598
+ units: [
599
+ { name: 'textInput', rate: 1.096, strategy: 'fixed', unit: 'millionTokens' },
600
+ { name: 'textOutput', rate: 3.288, strategy: 'fixed', unit: 'millionTokens' },
601
+ ],
602
+ },
603
+ type: 'chat',
604
+ },
571
605
  {
572
606
  abilities: {
573
607
  functionCall: true,
@@ -7,19 +7,19 @@ const groqChatModels: AIChatModelCard[] = [
7
7
  {
8
8
  contextWindowTokens: 131_072,
9
9
  description:
10
- 'Compound-beta 是一个复合 AI 系统,由 GroqCloud 中已经支持的多个开放可用的模型提供支持,可以智能地、有选择地使用工具来回答用户查询。',
11
- displayName: 'Compound Beta',
10
+ 'Compound 是一个复合 AI 系统,由 GroqCloud 中已经支持的多个开放可用的模型提供支持,可以智能地、有选择地使用工具来回答用户查询。',
11
+ displayName: 'Compound',
12
12
  enabled: true,
13
- id: 'compound-beta',
13
+ id: 'groq/compound',
14
14
  maxOutput: 8192,
15
15
  type: 'chat',
16
16
  },
17
17
  {
18
18
  contextWindowTokens: 131_072,
19
19
  description:
20
- 'Compound-beta-mini 是一个复合 AI 系统,由 GroqCloud 中已经支持的公开可用模型提供支持,可以智能地、有选择地使用工具来回答用户查询。',
21
- displayName: 'Compound Beta Mini',
22
- id: 'compound-beta-mini',
20
+ 'Compound-mini 是一个复合 AI 系统,由 GroqCloud 中已经支持的公开可用模型提供支持,可以智能地、有选择地使用工具来回答用户查询。',
21
+ displayName: 'Compound Mini',
22
+ id: 'groq/compound-mini',
23
23
  maxOutput: 8192,
24
24
  type: 'chat',
25
25
  },
@@ -63,6 +63,25 @@ const groqChatModels: AIChatModelCard[] = [
63
63
  releasedAt: '2025-08-06',
64
64
  type: 'chat',
65
65
  },
66
+ {
67
+ abilities: {
68
+ functionCall: true,
69
+ },
70
+ contextWindowTokens: 262_144,
71
+ description:
72
+ 'kimi-k2-0905-preview 模型上下文长度为 256k,具备更强的 Agentic Coding 能力、更突出的前端代码的美观度和实用性、以及更好的上下文理解能力。',
73
+ displayName: 'Kimi K2 0905',
74
+ enabled: true,
75
+ id: 'moonshotai/kimi-k2-instruct-0905',
76
+ pricing: {
77
+ units: [
78
+ { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
79
+ { name: 'textOutput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
80
+ ],
81
+ },
82
+ releasedAt: '2025-09-05',
83
+ type: 'chat',
84
+ },
66
85
  {
67
86
  abilities: {
68
87
  functionCall: true,
@@ -70,8 +89,7 @@ const groqChatModels: AIChatModelCard[] = [
70
89
  contextWindowTokens: 131_072,
71
90
  description:
72
91
  'kimi-k2 是一款具备超强代码和 Agent 能力的 MoE 架构基础模型,总参数 1T,激活参数 32B。在通用知识推理、编程、数学、Agent 等主要类别的基准性能测试中,K2 模型的性能超过其他主流开源模型。',
73
- displayName: 'Kimi K2 Instruct',
74
- enabled: true,
92
+ displayName: 'Kimi K2 0711',
75
93
  id: 'moonshotai/kimi-k2-instruct',
76
94
  maxOutput: 16_384,
77
95
  pricing: {
@@ -26,9 +26,9 @@ const hunyuanChatModels: AIChatModelCard[] = [
26
26
  reasoning: true,
27
27
  search: true,
28
28
  },
29
- contextWindowTokens: 92_000,
29
+ contextWindowTokens: 96_000,
30
30
  description:
31
- '业内首个超大规模 Hybrid-Transformer-Mamba 推理模型,扩展推理能力,超强解码速度,进一步对齐人类偏好。',
31
+ '大幅提升主模型慢思考模型的高难数学、复杂推理、高难代码、指令遵循、文本创作质量等能力。',
32
32
  displayName: 'Hunyuan T1',
33
33
  enabled: true,
34
34
  id: 'hunyuan-t1-latest',
@@ -40,7 +40,7 @@ const hunyuanChatModels: AIChatModelCard[] = [
40
40
  { name: 'textOutput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
41
41
  ],
42
42
  },
43
- releasedAt: '2025-05-21',
43
+ releasedAt: '2025-08-22',
44
44
  settings: {
45
45
  searchImpl: 'params',
46
46
  },
@@ -1,6 +1,19 @@
1
1
  import { AIChatModelCard } from '../types/aiModel';
2
2
 
3
3
  const modelscopeChatModels: AIChatModelCard[] = [
4
+ {
5
+ abilities: {
6
+ functionCall: true,
7
+ },
8
+ contextWindowTokens: 262_144,
9
+ description:
10
+ 'kimi-k2-0905-preview 模型上下文长度为 256k,具备更强的 Agentic Coding 能力、更突出的前端代码的美观度和实用性、以及更好的上下文理解能力。',
11
+ displayName: 'Kimi K2 0905',
12
+ enabled: true,
13
+ id: 'moonshotai/Kimi-K2-Instruct-0905',
14
+ releasedAt: '2025-09-05',
15
+ type: 'chat',
16
+ },
4
17
  {
5
18
  abilities: {
6
19
  functionCall: true,
@@ -53,7 +66,6 @@ const modelscopeChatModels: AIChatModelCard[] = [
53
66
  contextWindowTokens: 131_072,
54
67
  description: 'Qwen3-235B-A22B是通义千问3代超大规模模型,提供顶级的AI能力。',
55
68
  displayName: 'Qwen3-235B-A22B',
56
- enabled: true,
57
69
  id: 'Qwen/Qwen3-235B-A22B',
58
70
  type: 'chat',
59
71
  },
@@ -64,7 +76,6 @@ const modelscopeChatModels: AIChatModelCard[] = [
64
76
  contextWindowTokens: 131_072,
65
77
  description: 'Qwen3-32B是通义千问3代模型,具有强大的推理和对话能力。',
66
78
  displayName: 'Qwen3-32B',
67
- enabled: true,
68
79
  id: 'Qwen/Qwen3-32B',
69
80
  type: 'chat',
70
81
  },
@@ -2,6 +2,27 @@ import { AIChatModelCard } from '../types/aiModel';
2
2
 
3
3
  // https://platform.moonshot.cn/docs/pricing/chat
4
4
  const moonshotChatModels: AIChatModelCard[] = [
5
+ {
6
+ abilities: {
7
+ functionCall: true,
8
+ },
9
+ contextWindowTokens: 262_144,
10
+ description:
11
+ 'kimi-k2-0905-preview 模型上下文长度为 256k,具备更强的 Agentic Coding 能力、更突出的前端代码的美观度和实用性、以及更好的上下文理解能力。',
12
+ displayName: 'Kimi K2 0905',
13
+ enabled: true,
14
+ id: 'kimi-k2-0905-preview',
15
+ pricing: {
16
+ currency: 'CNY',
17
+ units: [
18
+ { name: 'textInput_cacheRead', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
19
+ { name: 'textInput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
20
+ { name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
21
+ ],
22
+ },
23
+ releasedAt: '2025-09-05',
24
+ type: 'chat',
25
+ },
5
26
  {
6
27
  abilities: {
7
28
  functionCall: true,
@@ -9,8 +30,7 @@ const moonshotChatModels: AIChatModelCard[] = [
9
30
  contextWindowTokens: 131_072,
10
31
  description:
11
32
  'kimi-k2 是一款具备超强代码和 Agent 能力的 MoE 架构基础模型,总参数 1T,激活参数 32B。在通用知识推理、编程、数学、Agent 等主要类别的基准性能测试中,K2 模型的性能超过其他主流开源模型。',
12
- displayName: 'Kimi K2',
13
- enabled: true,
33
+ displayName: 'Kimi K2 0711',
14
34
  id: 'kimi-k2-0711-preview',
15
35
  pricing: {
16
36
  currency: 'CNY',
@@ -27,10 +47,10 @@ const moonshotChatModels: AIChatModelCard[] = [
27
47
  abilities: {
28
48
  functionCall: true,
29
49
  },
30
- contextWindowTokens: 131_072,
50
+ contextWindowTokens: 262_144,
31
51
  description:
32
52
  'kimi-k2 是一款具备超强代码和 Agent 能力的 MoE 架构基础模型,总参数 1T,激活参数 32B。在通用知识推理、编程、数学、Agent 等主要类别的基准性能测试中,K2 模型的性能超过其他主流开源模型。',
33
- displayName: 'Kimi K2 Turbo',
53
+ displayName: 'Kimi K2 0905 Turbo',
34
54
  id: 'kimi-k2-turbo-preview',
35
55
  pricing: {
36
56
  currency: 'CNY',
@@ -40,7 +60,7 @@ const moonshotChatModels: AIChatModelCard[] = [
40
60
  { name: 'textOutput', rate: 64, strategy: 'fixed', unit: 'millionTokens' },
41
61
  ],
42
62
  },
43
- releasedAt: '2025-07-11',
63
+ releasedAt: '2025-09-05',
44
64
  type: 'chat',
45
65
  },
46
66
  {