@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.
- package/CHANGELOG.md +50 -0
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/locales/ar/error.json +5 -1
- package/locales/ar/setting.json +1 -0
- package/locales/bg-BG/error.json +4 -0
- package/locales/bg-BG/setting.json +1 -0
- package/locales/de-DE/error.json +4 -0
- package/locales/de-DE/setting.json +1 -0
- package/locales/en-US/error.json +4 -0
- package/locales/en-US/setting.json +1 -0
- package/locales/es-ES/error.json +4 -0
- package/locales/es-ES/setting.json +1 -0
- package/locales/fr-FR/error.json +4 -0
- package/locales/fr-FR/setting.json +1 -0
- package/locales/it-IT/error.json +4 -0
- package/locales/it-IT/setting.json +1 -0
- package/locales/ja-JP/error.json +4 -0
- package/locales/ja-JP/setting.json +1 -0
- package/locales/ko-KR/error.json +4 -0
- package/locales/ko-KR/setting.json +1 -0
- package/locales/nl-NL/error.json +4 -0
- package/locales/nl-NL/setting.json +1 -0
- package/locales/pl-PL/error.json +4 -0
- package/locales/pl-PL/setting.json +1 -0
- package/locales/pt-BR/error.json +4 -0
- package/locales/pt-BR/setting.json +1 -0
- package/locales/ru-RU/error.json +4 -0
- package/locales/ru-RU/setting.json +1 -0
- package/locales/tr-TR/error.json +4 -0
- package/locales/tr-TR/setting.json +1 -0
- package/locales/vi-VN/error.json +4 -0
- package/locales/vi-VN/setting.json +1 -0
- package/locales/zh-CN/error.json +4 -0
- package/locales/zh-CN/setting.json +1 -0
- package/locales/zh-TW/error.json +5 -1
- package/locales/zh-TW/setting.json +1 -0
- package/package.json +1 -1
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/LocalFiles.tsx +1 -1
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/SendMore.tsx +6 -1
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/index.tsx +6 -3
- package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Mobile/Files.tsx +1 -1
- package/src/components/FileList/EditableFileList.tsx +17 -5
- package/src/components/FileList/FileListViewer.tsx +19 -0
- package/src/components/FileList/index.ts +2 -0
- package/src/components/FileList/type.tsx +7 -0
- package/src/components/ImageItem/index.tsx +75 -0
- package/src/features/ChatInput/ActionBar/History.tsx +13 -7
- package/src/features/ChatInput/ActionBar/Temperature.tsx +8 -6
- package/src/features/ChatInput/STT/common.tsx +17 -3
- package/src/features/Conversation/Messages/User.tsx +2 -2
- package/src/features/FileList/EditableFileList.tsx +31 -0
- package/src/features/FileList/FileListPreviewer.tsx +17 -0
- package/src/features/FileList/index.tsx +2 -0
- package/src/libs/swr/index.ts +33 -2
- package/src/locales/default/error.ts +1 -0
- package/src/locales/default/setting.ts +1 -0
- package/src/services/__tests__/chat.test.ts +4 -1
- package/src/services/file/client.test.ts +2 -0
- package/src/services/file/client.ts +2 -0
- package/src/store/agent/slices/chat/action.ts +3 -4
- package/src/store/file/slices/images/action.test.ts +10 -5
- package/src/store/file/slices/images/action.ts +87 -22
- package/src/store/file/slices/images/initialState.ts +2 -0
- package/src/store/file/{selectors.test.ts → slices/images/selectors.test.ts} +4 -1
- package/src/store/file/slices/images/selectors.ts +7 -1
- package/src/store/global/action.ts +2 -2
- package/src/store/user/slices/common/action.ts +2 -2
- package/src/tools/dalle/Render/Item/Image.tsx +1 -1
- package/src/{components/FileList → tools/dalle/Render/Item}/ImageFileItem.tsx +1 -1
- package/src/types/files.ts +1 -0
- package/src/components/FileList/index.tsx +0 -22
- /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
|
+
[](#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
|
+
[](#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
|
|
266
|
-
|
|
|
267
|
-
| [
|
|
268
|
-
| [
|
|
269
|
-
| [
|
|
270
|
-
| [
|
|
271
|
-
|
|
272
|
-
> 📊 Total agents: [<kbd>**
|
|
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
|
-
| [
|
|
256
|
-
| [
|
|
257
|
-
| [
|
|
258
|
-
| [
|
|
259
|
-
|
|
260
|
-
> 📊 Total agents: [<kbd>**
|
|
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
|
|
package/locales/ar/error.json
CHANGED
package/locales/ar/setting.json
CHANGED
package/locales/bg-BG/error.json
CHANGED
|
@@ -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/locales/de-DE/error.json
CHANGED
|
@@ -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
|
},
|
package/locales/en-US/error.json
CHANGED
|
@@ -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
|
},
|
package/locales/es-ES/error.json
CHANGED
|
@@ -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
|
},
|
package/locales/fr-FR/error.json
CHANGED
|
@@ -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
|
},
|
package/locales/it-IT/error.json
CHANGED
|
@@ -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
|
},
|
package/locales/ja-JP/error.json
CHANGED
package/locales/ko-KR/error.json
CHANGED
package/locales/nl-NL/error.json
CHANGED
|
@@ -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
|
},
|
package/locales/pl-PL/error.json
CHANGED
|
@@ -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
|
},
|
package/locales/pt-BR/error.json
CHANGED
|
@@ -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
|
},
|
package/locales/ru-RU/error.json
CHANGED
|
@@ -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/locales/tr-TR/error.json
CHANGED
|
@@ -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
|
},
|
package/locales/vi-VN/error.json
CHANGED
|
@@ -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
|
},
|
package/locales/zh-CN/error.json
CHANGED
package/locales/zh-TW/error.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.162.
|
|
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",
|
package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/SendMore.tsx
CHANGED
|
@@ -27,7 +27,11 @@ const useStyles = createStyles(({ css, prefixCls }) => {
|
|
|
27
27
|
|
|
28
28
|
const isMac = isMacOS();
|
|
29
29
|
|
|
30
|
-
|
|
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
|
{
|
package/src/app/(main)/chat/(workspace)/@conversation/features/ChatInput/Desktop/Footer/index.tsx
CHANGED
|
@@ -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 [
|
|
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
|
-
{
|
|
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 '@/
|
|
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
|
|
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:
|
|
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
|
-
<
|
|
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>
|