@lobehub/chat 0.162.6 → 0.162.8

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 (73) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/README.md +8 -8
  3. package/README.zh-CN.md +8 -8
  4. package/locales/ar/error.json +5 -1
  5. package/locales/ar/setting.json +1 -0
  6. package/locales/bg-BG/error.json +4 -0
  7. package/locales/bg-BG/setting.json +1 -0
  8. package/locales/de-DE/error.json +4 -0
  9. package/locales/de-DE/setting.json +1 -0
  10. package/locales/en-US/error.json +4 -0
  11. package/locales/en-US/setting.json +1 -0
  12. package/locales/es-ES/error.json +4 -0
  13. package/locales/es-ES/setting.json +1 -0
  14. package/locales/fr-FR/error.json +4 -0
  15. package/locales/fr-FR/setting.json +1 -0
  16. package/locales/it-IT/error.json +4 -0
  17. package/locales/it-IT/setting.json +1 -0
  18. package/locales/ja-JP/error.json +4 -0
  19. package/locales/ja-JP/setting.json +1 -0
  20. package/locales/ko-KR/error.json +4 -0
  21. package/locales/ko-KR/setting.json +1 -0
  22. package/locales/nl-NL/error.json +4 -0
  23. package/locales/nl-NL/setting.json +1 -0
  24. package/locales/pl-PL/error.json +4 -0
  25. package/locales/pl-PL/setting.json +1 -0
  26. package/locales/pt-BR/error.json +4 -0
  27. package/locales/pt-BR/setting.json +1 -0
  28. package/locales/ru-RU/error.json +4 -0
  29. package/locales/ru-RU/setting.json +1 -0
  30. package/locales/tr-TR/error.json +4 -0
  31. package/locales/tr-TR/setting.json +1 -0
  32. package/locales/vi-VN/error.json +4 -0
  33. package/locales/vi-VN/setting.json +1 -0
  34. package/locales/zh-CN/error.json +4 -0
  35. package/locales/zh-CN/setting.json +1 -0
  36. package/locales/zh-TW/error.json +5 -1
  37. package/locales/zh-TW/setting.json +1 -0
  38. package/package.json +1 -1
  39. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/LocalFiles.tsx +1 -1
  40. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/SendMore.tsx +6 -1
  41. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/index.tsx +6 -3
  42. package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files.tsx +1 -1
  43. package/src/components/FileList/EditableFileList.tsx +17 -5
  44. package/src/components/FileList/FileListViewer.tsx +19 -0
  45. package/src/components/FileList/index.ts +2 -0
  46. package/src/components/FileList/type.tsx +7 -0
  47. package/src/components/ImageItem/index.tsx +75 -0
  48. package/src/features/ChatInput/ActionBar/History.tsx +13 -7
  49. package/src/features/ChatInput/ActionBar/Temperature.tsx +8 -6
  50. package/src/features/ChatInput/STT/common.tsx +17 -3
  51. package/src/features/Conversation/Messages/User.tsx +2 -2
  52. package/src/features/FileList/EditableFileList.tsx +31 -0
  53. package/src/features/FileList/FileListPreviewer.tsx +17 -0
  54. package/src/features/FileList/index.tsx +2 -0
  55. package/src/libs/swr/index.ts +33 -2
  56. package/src/locales/default/error.ts +1 -0
  57. package/src/locales/default/setting.ts +1 -0
  58. package/src/services/__tests__/chat.test.ts +4 -1
  59. package/src/services/file/client.test.ts +2 -0
  60. package/src/services/file/client.ts +2 -0
  61. package/src/store/agent/slices/chat/action.ts +3 -4
  62. package/src/store/file/slices/images/action.test.ts +10 -5
  63. package/src/store/file/slices/images/action.ts +87 -22
  64. package/src/store/file/slices/images/initialState.ts +2 -0
  65. package/src/store/file/{selectors.test.ts → slices/images/selectors.test.ts} +4 -1
  66. package/src/store/file/slices/images/selectors.ts +7 -1
  67. package/src/store/global/action.ts +2 -2
  68. package/src/store/user/slices/common/action.ts +2 -2
  69. package/src/tools/dalle/Render/Item/Image.tsx +1 -1
  70. package/src/{components/FileList → tools/dalle/Render/Item}/ImageFileItem.tsx +1 -1
  71. package/src/types/files.ts +1 -0
  72. package/src/components/FileList/index.tsx +0 -22
  73. /package/src/components/{FileList → ImageItem}/style.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 0.162.8](https://github.com/lobehub/lobe-chat/compare/v0.162.7...v0.162.8)
6
+
7
+ <sup>Released on **2024-05-28**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Add optimistic loading for image uploading.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Add optimistic loading for image uploading, closes [#2700](https://github.com/lobehub/lobe-chat/issues/2700) ([f99c9ce](https://github.com/lobehub/lobe-chat/commit/f99c9ce))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
30
+ ### [Version 0.162.7](https://github.com/lobehub/lobe-chat/compare/v0.162.6...v0.162.7)
31
+
32
+ <sup>Released on **2024-05-28**</sup>
33
+
34
+ #### 💄 Styles
35
+
36
+ - **misc**: Improve display of `set limited history messages`, `randomness` and `voice input`.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Styles
44
+
45
+ - **misc**: Improve display of `set limited history messages`, `randomness` and `voice input`, closes [#2586](https://github.com/lobehub/lobe-chat/issues/2586) ([22c9b9c](https://github.com/lobehub/lobe-chat/commit/22c9b9c))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 0.162.6](https://github.com/lobehub/lobe-chat/compare/v0.162.5...v0.162.6)
6
56
 
7
57
  <sup>Released on **2024-05-28**</sup>
package/README.md CHANGED
@@ -262,14 +262,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
262
262
 
263
263
  <!-- AGENT LIST -->
264
264
 
265
- | Recent Submits | Description |
266
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
267
- | [Node.js Optimizer](https://chat-preview.lobehub.com/market?agent=node-js-devoloper)<br/><sup>By **[chrisuhg](https://github.com/chrisuhg)** on **2024-05-28**</sup> | Specializes in Node.js code review, performance optimization, asynchronous programming, error handling, code refactoring, dependency management, security enhancement, test coverage, and documentation writing.<br/>`node-js` `code-optimization` `performance-optimization` `asynchronous-programming` `error-handling` |
268
- | [Foreign Colleague Evaluation Assistant](https://chat-preview.lobehub.com/market?agent=praise-assistant)<br/><sup>By **[johnnyqian](https://github.com/johnnyqian)** on **2024-05-27**</sup> | Give positive feedback to your colleagues<br/>`foreign-company` `evaluate` `review` `software-engineer` `praise` |
269
- | [SEO Optimization Expert](https://chat-preview.lobehub.com/market?agent=seo-helper)<br/><sup>By **[tutorial0](https://github.com/tutorial0)** on **2024-05-27**</sup> | Proficient in SEO terminology and optimization strategies, providing comprehensive SEO solutions and practical advice.<br/>`seo` `search-engine-optimization` `consulting` |
270
- | [Chinese Text Refinement Master](https://chat-preview.lobehub.com/market?agent=chinese-touch-ups)<br/><sup>By **[S45618](https://github.com/S45618)** on **2024-05-24**</sup> | Proficient in Chinese proofreading and rhetoric, aiming to enhance the fluency and elegance of the text.<br/>`proofreading` `text-refinement` `rhetorical-improvement` `classical-literature` `language-editing` |
271
-
272
- > 📊 Total agents: [<kbd>**276**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
265
+ | Recent Submits | Description |
266
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
267
+ | [Dart/Flutter Dev](https://chat-preview.lobehub.com/market?agent=dart-flutter)<br/><sup>By **[rezmeplxrf](https://github.com/rezmeplxrf)** on **2024-05-28**</sup> | Dart/Flutter Expert. Never nest more than 3 levels deep. Use riverpod, flutter_riverpod, riverpod_hook, flutter_hook for state management.<br/>`dart` `flutter` `development` `state-management` `riverpod` |
268
+ | [C# .NET Technology Expert](https://chat-preview.lobehub.com/market?agent=dotnet-expert)<br/><sup>By **[johnnyqian](https://github.com/johnnyqian)** on **2024-05-28**</sup> | C# .NET Technology Expert<br/>`net` `developer` `net-core` `azure` `c` `microsoft` `sql-server` `entity-framework` `ef` `ef-core` |
269
+ | [Daily Assistant](https://chat-preview.lobehub.com/market?agent=junior-helper)<br/><sup>By **[Qinks6](https://github.com/Qinks6)** on **2024-05-28**</sup> | A cute little helper that can search and draw<br/>`assistant` `search` `drawing` `information-retrieval` `user-interaction` |
270
+ | [Node.js Optimizer](https://chat-preview.lobehub.com/market?agent=node-js-devoloper)<br/><sup>By **[chrisuhg](https://github.com/chrisuhg)** on **2024-05-28**</sup> | Specializes in Node.js code review, performance optimization, asynchronous programming, error handling, code refactoring, dependency management, security enhancement, test coverage, and documentation writing.<br/>`node-js` `code-optimization` `performance-optimization` `asynchronous-programming` `error-handling` |
271
+
272
+ > 📊 Total agents: [<kbd>**279**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
273
273
 
274
274
  <!-- AGENT LIST -->
275
275
 
package/README.zh-CN.md CHANGED
@@ -250,14 +250,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
250
250
 
251
251
  <!-- AGENT LIST -->
252
252
 
253
- | 最近新增 | 助手说明 |
254
- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
255
- | [Node.js 优化师](https://chat-preview.lobehub.com/market?agent=node-js-devoloper)<br/><sup>By **[chrisuhg](https://github.com/chrisuhg)** on **2024-05-28**</sup> | 擅长 Node.js 代码审查、性能优化、异步编程、错误处理、代码重构、依赖管理、安全增强、测试覆盖率和文档编写。<br/>`node-js` `代码优化` `性能优化` `异步编程` `错误处理` |
256
- | [外企同事评价助手](https://chat-preview.lobehub.com/market?agent=praise-assistant)<br/><sup>By **[johnnyqian](https://github.com/johnnyqian)** on **2024-05-27**</sup> | 给你的同事好评<br/>`foreign-company` `evaluate` `review` `software-engineer` `praise` |
257
- | [SEO 优化专家](https://chat-preview.lobehub.com/market?agent=seo-helper)<br/><sup>By **[tutorial0](https://github.com/tutorial0)** on **2024-05-27**</sup> | 精通 SEO 术语和优化策略,提供全面 SEO 解决方案和实用建议。<br/>`seo` `搜索引擎优化` `咨询` |
258
- | [中文润色大师](https://chat-preview.lobehub.com/market?agent=chinese-touch-ups)<br/><sup>By **[S45618](https://github.com/S45618)** on **2024-05-24**</sup> | 精通中文校对与修辞,旨在提升文本之流畅与雅致<br/>`校对` `文字润色` `修辞改进` `古典文学` `语言编辑` |
259
-
260
- > 📊 Total agents: [<kbd>**276**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
253
+ | 最近新增 | 助手说明 |
254
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
255
+ | [Dart/Flutter Dev](https://chat-preview.lobehub.com/market?agent=dart-flutter)<br/><sup>By **[rezmeplxrf](https://github.com/rezmeplxrf)** on **2024-05-28**</sup> | Dart/Flutter 전문가. 3단계 이상 중첩하지 않음. 상태 관리에 riverpod, flutter_riverpod, riverpod_hook, flutter_hook 사용.<br/>`dart` `flutter` `개발` `상태-관리` `riverpod` |
256
+ | [C# .NET 技术专家](https://chat-preview.lobehub.com/market?agent=dotnet-expert)<br/><sup>By **[johnnyqian](https://github.com/johnnyqian)** on **2024-05-28**</sup> | C# .NET 技术专家<br/>`net` `developer` `net-core` `azure` `c` `microsoft` `sql-server` `entity-framework` `ef` `ef-core` |
257
+ | [日常小助手](https://chat-preview.lobehub.com/market?agent=junior-helper)<br/><sup>By **[Qinks6](https://github.com/Qinks6)** on **2024-05-28**</sup> | 一个能搜索、能画图的小可爱<br/>`助手` `搜索` `绘图` `信息查询` `用户交互` |
258
+ | [Node.js 优化师](https://chat-preview.lobehub.com/market?agent=node-js-devoloper)<br/><sup>By **[chrisuhg](https://github.com/chrisuhg)** on **2024-05-28**</sup> | 擅长 Node.js 代码审查、性能优化、异步编程、错误处理、代码重构、依赖管理、安全增强、测试覆盖率和文档编写。<br/>`node-js` `代码优化` `性能优化` `异步编程` `错误处理` |
259
+
260
+ > 📊 Total agents: [<kbd>**279**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
261
261
 
262
262
  <!-- AGENT LIST -->
263
263
 
@@ -136,5 +136,9 @@
136
136
  "apiKey": "مفتاح واجهة برمجة التطبيقات المخصص",
137
137
  "password": "كلمة المرور"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "التفاصيل: {{detail}}",
142
+ "title": "فشل تحميل الملف، يرجى التحقق من الاتصال بالشبكة أو المحاولة لاحقًا"
139
143
  }
140
- }
144
+ }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "غير محدود",
184
184
  "limited": "يحتوي فقط على {{number}} رسالة محادثة",
185
+ "setlimited": "تعيين عدد الرسائل التاريخية",
185
186
  "title": "تحديد عدد الرسائل التاريخية",
186
187
  "unlimited": "غير محدود"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Персонализиран API ключ",
137
137
  "password": "Парола"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Подробности: {{detail}}",
142
+ "title": "Неуспешно качване на файл, моля проверете интернет връзката или опитайте по-късно"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Неограничен",
184
184
  "limited": "Включете само {{number}} съобщения от разговора",
185
+ "setlimited": "Задайте ограничение за използване на брой исторически съобщения",
185
186
  "title": "Ограничаване на броя на съобщенията в историята",
186
187
  "unlimited": "Неограничен брой съобщения в историята"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Benutzerdefinierter API-Schlüssel",
137
137
  "password": "Passwort"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Details: {{detail}}",
142
+ "title": "Dateiupload fehlgeschlagen. Bitte überprüfen Sie Ihre Netzwerkverbindung und versuchen Sie es später erneut."
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Unbegrenzt",
184
184
  "limited": "Enthält nur {{number}} Gesprächsnachrichten",
185
+ "setlimited": "Setzen Sie die begrenzte Anzahl von Nachrichten",
185
186
  "title": "Historiennachrichten begrenzen",
186
187
  "unlimited": "Unbegrenzte Historiennachrichten"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Custom API Key",
137
137
  "password": "Password"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Details: {{detail}}",
142
+ "title": "File upload failed. Please check your network connection or try again later"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Unlimited",
184
184
  "limited": "Include only {{number}} conversation messages",
185
+ "setlimited": "Set limited history messages",
185
186
  "title": "Limit History Message Count",
186
187
  "unlimited": "Unlimited history message count"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Clave de API personalizada",
137
137
  "password": "Contraseña"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Detalles: {{detail}}",
142
+ "title": "Error al subir el archivo, por favor verifica la conexión a internet o inténtalo de nuevo más tarde"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Sin límite",
184
184
  "limited": "Incluye solo {{number}} mensajes de conversación",
185
+ "setlimited": "Establecer cantidad de mensajes históricos",
185
186
  "title": "Limitar número de mensajes históricos",
186
187
  "unlimited": "Sin límite de mensajes históricos"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Clé API personnalisée",
137
137
  "password": "Mot de passe"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Détails : {{detail}}",
142
+ "title": "Échec de l'envoi du fichier, veuillez vérifier votre connexion réseau ou réessayer plus tard"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Illimité",
184
184
  "limited": "Inclure uniquement {{number}} messages de conversation",
185
+ "setlimited": "Définir le nombre de messages d'historique",
185
186
  "title": "Limite du nombre de messages historiques",
186
187
  "unlimited": "Aucune limite sur le nombre de messages historiques"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Chiave API personalizzata",
137
137
  "password": "Password"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Dettagli: {{detail}}",
142
+ "title": "Caricamento del file fallito, controlla la connessione di rete o riprova più tardi"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Illimitato",
184
184
  "limited": "Include solo {{number}} messaggi di conversazione",
185
+ "setlimited": "Imposta il numero di messaggi storici da utilizzare",
185
186
  "title": "Limita il numero di messaggi storici",
186
187
  "unlimited": "Numero illimitato di messaggi storici"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "カスタムAPIキー",
137
137
  "password": "パスワード"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "詳細: {{detail}}",
142
+ "title": "ファイルのアップロードに失敗しました。ネットワーク接続を確認するか、後でもう一度お試しください"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "制限なし",
184
184
  "limited": "{{number}}件の会話メッセージのみ含む",
185
+ "setlimited": "使用履歴メッセージ数",
185
186
  "title": "過去メッセージ数を制限する",
186
187
  "unlimited": "過去メッセージ数を制限しない"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "사용자 정의 API Key",
137
137
  "password": "비밀번호"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "상세 내용: {{detail}}",
142
+ "title": "파일 업로드 실패, 네트워크 연결을 확인하거나 나중에 다시 시도해주세요"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "제한 없음",
184
184
  "limited": "{{number}}개의 대화 메시지만 포함",
185
+ "setlimited": "사용할 메시지 수 설정",
185
186
  "title": "이전 메시지 수 제한",
186
187
  "unlimited": "이전 메시지 수 제한 없음"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Custom API Key",
137
137
  "password": "Password"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Details: {{detail}}",
142
+ "title": "Bestand uploaden mislukt, controleer uw internetverbinding of probeer het later opnieuw"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Onbeperkt",
184
184
  "limited": "Bevat alleen {{number}} berichten",
185
+ "setlimited": "Stel berichtengeschiedenis in",
185
186
  "title": "Berichtgeschiedenis beperken",
186
187
  "unlimited": "Onbeperkt aantal berichten in de geschiedenis"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Niestandardowy klucz API",
137
137
  "password": "Hasło"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Szczegóły: {{detail}}",
142
+ "title": "Nie udało się przesłać pliku. Sprawdź połączenie sieciowe lub spróbuj ponownie później"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Bez limitu",
184
184
  "limited": "Zawiera tylko {{number}} wiadomości",
185
+ "setlimited": "Ustaw limit wiadomości historycznych",
185
186
  "title": "Ograniczenie liczby wiadomości w historii",
186
187
  "unlimited": "Bez limitu wiadomości w historii"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Chave de API personalizada",
137
137
  "password": "Senha"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Detalhes: {{detail}}",
142
+ "title": "Falha ao enviar o arquivo, verifique a conexão de rede ou tente novamente mais tarde"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Sem limite",
184
184
  "limited": "Incluir apenas {{number}} mensagens de conversa",
185
+ "setlimited": "Definir número de mensagens de histórico",
185
186
  "title": "Limitar número de mensagens de histórico",
186
187
  "unlimited": "Sem limite de mensagens de histórico"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Пользовательский ключ API",
137
137
  "password": "Пароль"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Подробности: {{detail}}",
142
+ "title": "Ошибка загрузки файла. Проверьте подключение к сети или попробуйте позже"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Без ограничений",
184
184
  "limited": "Содержит только {{number}} сообщений",
185
+ "setlimited": "Установить ограничение на количество использованных сообщений",
185
186
  "title": "Ограничение истории сообщений",
186
187
  "unlimited": "Без ограничения истории сообщений"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Özel API Anahtarı",
137
137
  "password": "Şifre"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Detay: {{detail}}",
142
+ "title": "Dosya yükleme başarısız, lütfen ağ bağlantınızı kontrol edin veya daha sonra tekrar deneyin"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Sınırsız",
184
184
  "limited": "Yalnızca {{number}} konuşma mesajını içerir",
185
+ "setlimited": "Kullanılan mesaj sayısı",
185
186
  "title": "Geçmiş Mesaj Sayısı Sınırlama",
186
187
  "unlimited": "Sınırsız geçmiş mesaj sayısı"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "Khóa API tùy chỉnh",
137
137
  "password": "Mật khẩu"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "Chi tiết: {{detail}}",
142
+ "title": "Tải lên tệp thất bại, vui lòng kiểm tra kết nối mạng hoặc thử lại sau"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "Không giới hạn",
184
184
  "limited": "Chỉ chứa {{number}} tin nhắn trò chuyện",
185
+ "setlimited": "Thiết lập số lượng tin nhắn lịch sử",
185
186
  "title": "Giới hạn số lượng tin nhắn lịch sử",
186
187
  "unlimited": "Không giới hạn số lượng tin nhắn lịch sử"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "自定义 API Key",
137
137
  "password": "密码"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "详情: {{detail}}",
142
+ "title": "文件上传失败,请检查网络连接或稍后再试"
139
143
  }
140
144
  }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "不限制",
184
184
  "limited": "只包含 {{number}} 条会话消息",
185
+ "setlimited": "使用历史消息数",
185
186
  "title": "限制历史消息数",
186
187
  "unlimited": "不限历史消息数"
187
188
  },
@@ -136,5 +136,9 @@
136
136
  "apiKey": "自定義 API Key",
137
137
  "password": "密碼"
138
138
  }
139
+ },
140
+ "upload": {
141
+ "desc": "詳情: {{detail}}",
142
+ "title": "檔案上傳失敗,請檢查網路連線或稍後再試"
139
143
  }
140
- }
144
+ }
@@ -182,6 +182,7 @@
182
182
  "enableHistoryCount": {
183
183
  "alias": "不限制",
184
184
  "limited": "只包含 {{number}} 條對話訊息",
185
+ "setlimited": "設置限制",
185
186
  "title": "限制歷史訊息數",
186
187
  "unlimited": "不限歷史訊息數"
187
188
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "0.162.6",
3
+ "version": "0.162.8",
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",
@@ -1,6 +1,6 @@
1
1
  import { memo } from 'react';
2
2
 
3
- import EditableFileList from '@/components/FileList/EditableFileList';
3
+ import { EditableFileList } from '@/features/FileList';
4
4
  import { useFileStore } from '@/store/file';
5
5
 
6
6
  export const LocalFiles = memo(() => {
@@ -27,7 +27,11 @@ const useStyles = createStyles(({ css, prefixCls }) => {
27
27
 
28
28
  const isMac = isMacOS();
29
29
 
30
- const SendMore = memo(() => {
30
+ interface SendMoreProps {
31
+ disabled?: boolean;
32
+ }
33
+
34
+ const SendMore = memo<SendMoreProps>(({ disabled }) => {
31
35
  const { t } = useTranslation('chat');
32
36
 
33
37
  const { styles } = useStyles();
@@ -55,6 +59,7 @@ const SendMore = memo(() => {
55
59
 
56
60
  return (
57
61
  <Dropdown
62
+ disabled={disabled}
58
63
  menu={{
59
64
  items: [
60
65
  {
@@ -14,6 +14,7 @@ import { useAgentStore } from '@/store/agent';
14
14
  import { agentSelectors } from '@/store/agent/slices/chat';
15
15
  import { useChatStore } from '@/store/chat';
16
16
  import { chatSelectors } from '@/store/chat/selectors';
17
+ import { filesSelectors, useFileStore } from '@/store/file';
17
18
  import { useUserStore } from '@/store/user';
18
19
  import { modelProviderSelectors, preferenceSelectors } from '@/store/user/selectors';
19
20
  import { isMacOS } from '@/utils/platform';
@@ -60,10 +61,11 @@ const Footer = memo<FooterProps>(({ setExpand }) => {
60
61
 
61
62
  const { theme, styles } = useStyles();
62
63
 
63
- const [loading, stopGenerateMessage] = useChatStore((s) => [
64
+ const [isAIGenerating, stopGenerateMessage] = useChatStore((s) => [
64
65
  chatSelectors.isAIGenerating(s),
65
66
  s.stopGenerateMessage,
66
67
  ]);
68
+ const isImageUploading = useFileStore(filesSelectors.isImageUploading);
67
69
 
68
70
  const model = useAgentStore(agentSelectors.currentAgentModel);
69
71
 
@@ -123,7 +125,7 @@ const Footer = memo<FooterProps>(({ setExpand }) => {
123
125
  </Flexbox>
124
126
  <SaveTopic />
125
127
  <Flexbox style={{ minWidth: 92 }}>
126
- {loading ? (
128
+ {isAIGenerating ? (
127
129
  <Button
128
130
  className={styles.loadingButton}
129
131
  icon={<StopLoadingIcon />}
@@ -134,6 +136,7 @@ const Footer = memo<FooterProps>(({ setExpand }) => {
134
136
  ) : (
135
137
  <Space.Compact>
136
138
  <Button
139
+ disabled={isImageUploading}
137
140
  onClick={() => {
138
141
  sendMessage();
139
142
  setExpand?.(false);
@@ -142,7 +145,7 @@ const Footer = memo<FooterProps>(({ setExpand }) => {
142
145
  >
143
146
  {t('input.send')}
144
147
  </Button>
145
- <SendMore />
148
+ <SendMore disabled={isImageUploading} />
146
149
  </Space.Compact>
147
150
  )}
148
151
  </Flexbox>
@@ -1,7 +1,7 @@
1
1
  import { memo } from 'react';
2
2
  import { Flexbox } from 'react-layout-kit';
3
3
 
4
- import EditableFileList from '@/components/FileList/EditableFileList';
4
+ import { EditableFileList } from '@/features/FileList';
5
5
  import { useFileStore } from '@/store/file';
6
6
 
7
7
  const Files = memo(() => {
@@ -3,18 +3,22 @@ import { useResponsive } from 'antd-style';
3
3
  import { memo } from 'react';
4
4
  import { Flexbox } from 'react-layout-kit';
5
5
 
6
- import ImageFileItem from './ImageFileItem';
6
+ import ImageItem from '@/components/ImageItem';
7
+
8
+ import { ImageFileItem } from './type';
7
9
 
8
10
  interface EditableFileListProps {
9
11
  alwaysShowClose?: boolean;
10
12
  editable?: boolean;
11
- items: string[];
13
+ items: ImageFileItem[];
14
+ onRemove?: (id: string) => void;
12
15
  padding?: number | string;
13
16
  }
14
17
 
15
- const EditableFileList = memo<EditableFileListProps>(
16
- ({ items, editable = true, alwaysShowClose, padding = 12 }) => {
18
+ export const EditableFileList = memo<EditableFileListProps>(
19
+ ({ items, editable = true, alwaysShowClose, onRemove, padding = 12 }) => {
17
20
  const { mobile } = useResponsive();
21
+
18
22
  return (
19
23
  <Flexbox
20
24
  gap={mobile ? 4 : 6}
@@ -24,7 +28,15 @@ const EditableFileList = memo<EditableFileListProps>(
24
28
  >
25
29
  <ImageGallery>
26
30
  {items.map((i) => (
27
- <ImageFileItem alwaysShowClose={alwaysShowClose} editable={editable} id={i} key={i} />
31
+ <ImageItem
32
+ alt={i.alt}
33
+ alwaysShowClose={alwaysShowClose}
34
+ editable={editable}
35
+ key={i.id}
36
+ loading={i.loading}
37
+ onRemove={() => onRemove?.(i.id)}
38
+ url={i.url}
39
+ />
28
40
  ))}
29
41
  </ImageGallery>
30
42
  </Flexbox>