@lobehub/chat 0.119.3 → 0.119.5
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 +70 -0
- package/README.md +3 -3
- package/README.zh-CN.md +3 -3
- package/locales/de-DE/chat.json +4 -0
- package/locales/en-US/chat.json +4 -0
- package/locales/es-ES/chat.json +4 -0
- package/locales/fr-FR/chat.json +4 -0
- package/locales/it-IT/chat.json +4 -0
- package/locales/ja-JP/chat.json +4 -0
- package/locales/ko-KR/chat.json +4 -0
- package/locales/nl-NL/chat.json +4 -0
- package/locales/pl-PL/chat.json +4 -0
- package/locales/pt-BR/chat.json +4 -0
- package/locales/ru-RU/chat.json +4 -0
- package/locales/tr-TR/chat.json +4 -0
- package/locales/vi-VN/chat.json +4 -0
- package/locales/zh-CN/chat.json +5 -1
- package/locales/zh-TW/chat.json +4 -0
- package/package.json +2 -1
- package/src/app/chat/features/TopicListContent/Topic/SkeletonList.tsx +46 -12
- package/src/app/chat/features/TopicListContent/Topic/index.tsx +67 -33
- package/src/app/chat/features/TopicListContent/index.tsx +2 -1
- package/src/app/settings/llm/LLM/index.tsx +7 -1
- package/src/features/Conversation/components/AutoScroll.tsx +25 -0
- package/src/features/Conversation/components/BackBottom/index.tsx +31 -0
- package/src/features/Conversation/components/BackBottom/style.ts +36 -0
- package/src/features/Conversation/components/ChatItem/index.tsx +63 -42
- package/src/features/Conversation/components/ChatList/index.tsx +6 -29
- package/src/features/Conversation/components/SkeletonList.tsx +5 -2
- package/src/features/Conversation/components/VirtualizedList/index.tsx +78 -0
- package/src/features/Conversation/index.tsx +8 -18
- package/src/locales/create.ts +1 -1
- package/src/locales/default/chat.ts +5 -1
- package/src/locales/default/index.ts +0 -2
- package/src/store/chat/slices/message/selectors.ts +6 -0
- package/vercel.json +1 -1
- package/locales/de-DE/empty.json +0 -6
- package/locales/en-US/empty.json +0 -6
- package/locales/es-ES/empty.json +0 -6
- package/locales/fr-FR/empty.json +0 -6
- package/locales/it-IT/empty.json +0 -6
- package/locales/ja-JP/empty.json +0 -6
- package/locales/ko-KR/empty.json +0 -6
- package/locales/nl-NL/empty.json +0 -6
- package/locales/pl-PL/empty.json +0 -6
- package/locales/pt-BR/empty.json +0 -6
- package/locales/ru-RU/empty.json +0 -6
- package/locales/tr-TR/empty.json +0 -6
- package/locales/vi-VN/empty.json +0 -6
- package/locales/zh-CN/empty.json +0 -6
- package/locales/zh-TW/empty.json +0 -6
- package/src/features/Conversation/components/ChatList/style.ts +0 -10
- package/src/features/Conversation/components/ScrollAnchor/index.tsx +0 -29
- package/src/features/Conversation/components/ScrollAnchor/useAtBottom.ts +0 -20
- package/src/locales/default/empty.ts +0 -6
- /package/src/features/Conversation/components/{ChatList → ChatItem}/HistoryDivider.tsx +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,76 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 0.119.5](https://github.com/lobehub/lobe-chat/compare/v0.119.4...v0.119.5)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-01-06**</sup>
|
|
8
|
+
|
|
9
|
+
#### 💄 Styles
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix topic i18n.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Styles
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix topic i18n, closes [#961](https://github.com/lobehub/lobe-chat/issues/961) ([4e9ebe2](https://github.com/lobehub/lobe-chat/commit/4e9ebe2))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 0.119.4](https://github.com/lobehub/lobe-chat/compare/v0.119.3...v0.119.4)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-01-06**</sup>
|
|
33
|
+
|
|
34
|
+
#### ♻ Code Refactoring
|
|
35
|
+
|
|
36
|
+
- **misc**: Refactor to virtual list with react-virtuoso.
|
|
37
|
+
|
|
38
|
+
#### 🐛 Bug Fixes
|
|
39
|
+
|
|
40
|
+
- **misc**: Fix auto scroll error and BackBottom error.
|
|
41
|
+
|
|
42
|
+
#### 💄 Styles
|
|
43
|
+
|
|
44
|
+
- **misc**: Fix BackBottom zIndex, improve chat list on mobile, improve chat list scrolling to bottom at initial render, improve custom model input, improve topic scroll.
|
|
45
|
+
|
|
46
|
+
<br/>
|
|
47
|
+
|
|
48
|
+
<details>
|
|
49
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
50
|
+
|
|
51
|
+
#### Code refactoring
|
|
52
|
+
|
|
53
|
+
- **misc**: Refactor to virtual list with react-virtuoso ([d6d63b2](https://github.com/lobehub/lobe-chat/commit/d6d63b2))
|
|
54
|
+
|
|
55
|
+
#### What's fixed
|
|
56
|
+
|
|
57
|
+
- **misc**: Fix auto scroll error and BackBottom error ([6100970](https://github.com/lobehub/lobe-chat/commit/6100970))
|
|
58
|
+
|
|
59
|
+
#### Styles
|
|
60
|
+
|
|
61
|
+
- **misc**: Fix BackBottom zIndex ([254cc54](https://github.com/lobehub/lobe-chat/commit/254cc54))
|
|
62
|
+
- **misc**: Improve chat list on mobile ([a894fc5](https://github.com/lobehub/lobe-chat/commit/a894fc5))
|
|
63
|
+
- **misc**: Improve chat list scrolling to bottom at initial render ([476304b](https://github.com/lobehub/lobe-chat/commit/476304b))
|
|
64
|
+
- **misc**: Improve custom model input ([1c4722f](https://github.com/lobehub/lobe-chat/commit/1c4722f))
|
|
65
|
+
- **misc**: Improve topic scroll ([8daf3ac](https://github.com/lobehub/lobe-chat/commit/8daf3ac))
|
|
66
|
+
|
|
67
|
+
</details>
|
|
68
|
+
|
|
69
|
+
<div align="right">
|
|
70
|
+
|
|
71
|
+
[](#readme-top)
|
|
72
|
+
|
|
73
|
+
</div>
|
|
74
|
+
|
|
5
75
|
### [Version 0.119.3](https://github.com/lobehub/lobe-chat/compare/v0.119.2...v0.119.3)
|
|
6
76
|
|
|
7
77
|
<sup>Released on **2024-01-06**</sup>
|
package/README.md
CHANGED
|
@@ -210,12 +210,12 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
|
210
210
|
|
|
211
211
|
| Recent Submits | Description |
|
|
212
212
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
213
|
+
| [Performance Evaluation Superhero](https://chat-preview.lobehub.com/market?agent=kpi-hero)<br/><sup>By **[canisminor1990](https://github.com/canisminor1990)** on **2024-01-05**</sup> | Specializes in writing performance evaluation reports and year-end summaries<br/>`performance-evaluation` `report-writing` `data-analysis` `professional-insights` `okr` `kpi` |
|
|
213
214
|
| [SVG Flowchart Explanation Assistant](https://chat-preview.lobehub.com/market?agent=svg-flowchart-explanation-assistant)<br/><sup>By **[Justin3go](https://github.com/Justin3go)** on **2024-01-05**</sup> | Explain SVG flowcharts by inputting SVG source code and interpreting the flowchart.<br/>`flowchart-explanation` `technical-documentation-writing` `business-knowledge` |
|
|
215
|
+
| [Weekly Report Assistant](https://chat-preview.lobehub.com/market?agent=write-report-assistant-development)<br/><sup>By **[CaoYunzhou](https://github.com/CaoYunzhou)** on **2024-01-05**</sup> | Weekly report generation assistant<br/>`weekly-report` `daily-report` `writing` `summary` |
|
|
214
216
|
| [3D Animation Engineer](https://chat-preview.lobehub.com/market?agent=react-three-3-d-expert)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2024-01-03**</sup> | Proficient in React, Three.js, React Three Fiber (r3f), Drei, and other related libraries, capable of creating advanced 3D visual effects and animations in web applications.<br/>`3-d-animation` `react` `three-js` `web-design` `animation` |
|
|
215
|
-
| [Amazon Title Assistant](https://chat-preview.lobehub.com/market?agent=amazon)<br/><sup>By **[cm2457618290](https://github.com/cm2457618290)** on **2024-01-02**</sup> | Provide product keywords or product links to automatically write titles and product introductions<br/>`assistant` |
|
|
216
|
-
| [Exam Assistant](https://chat-preview.lobehub.com/market?agent=generador-examenes)<br/><sup>By **[aitorroma](https://github.com/aitorroma)** on **2024-01-02**</sup> | I am a skills summary assistant and cannot conduct interactive exams. However, I can help you summarize your skills and knowledge in a clear and concise format.<br/>`exam` `learning` `statistics` |
|
|
217
217
|
|
|
218
|
-
> 📊 Total agents: [<kbd>**
|
|
218
|
+
> 📊 Total agents: [<kbd>**91**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
219
219
|
|
|
220
220
|
<!-- AGENT LIST -->
|
|
221
221
|
|
package/README.zh-CN.md
CHANGED
|
@@ -186,12 +186,12 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
186
186
|
|
|
187
187
|
| 最近新增 | 助手说明 |
|
|
188
188
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
189
|
+
| [绩效评估超人](https://chat-preview.lobehub.com/market?agent=kpi-hero)<br/><sup>By **[canisminor1990](https://github.com/canisminor1990)** on **2024-01-05**</sup> | 擅长写绩效评估报告与年终总结<br/>`绩效评估` `报告撰写` `数据分析` `专业见解` `okr` `kpi` |
|
|
189
190
|
| [SVG 流程图解释助手](https://chat-preview.lobehub.com/market?agent=svg-flowchart-explanation-assistant)<br/><sup>By **[Justin3go](https://github.com/Justin3go)** on **2024-01-05**</sup> | SVG 流程图解释,输入 SVG 源代码,解释该流程图<br/>`流程图解释` `技术文档编写` `业务知识` |
|
|
191
|
+
| [周报助手](https://chat-preview.lobehub.com/market?agent=write-report-assistant-development)<br/><sup>By **[CaoYunzhou](https://github.com/CaoYunzhou)** on **2024-01-05**</sup> | 周报生成助手<br/>`周报` `日报` `写作` `总结` |
|
|
190
192
|
| [三维动画工程师](https://chat-preview.lobehub.com/market?agent=react-three-3-d-expert)<br/><sup>By **[arvinxx](https://github.com/arvinxx)** on **2024-01-03**</sup> | 擅长 React、Three.js、React Three Fiber(r3f)、Drei 等库,能够在网页应用中创造高级别的三维视觉效果和动画。<br/>`3-d动画` `react` `three-js` `网页设计` `动画` |
|
|
191
|
-
| [Amazon Title Assistant](https://chat-preview.lobehub.com/market?agent=amazon)<br/><sup>By **[cm2457618290](https://github.com/cm2457618290)** on **2024-01-02**</sup> | Provide product keywords or product links to automatically write titles and product introductions<br/>`assistant` |
|
|
192
|
-
| [考试助手](https://chat-preview.lobehub.com/market?agent=generador-examenes)<br/><sup>By **[aitorroma](https://github.com/aitorroma)** on **2024-01-02**</sup> | 我是一个技能总结助手,无法进行互动式考试。但我可以帮助你以清晰简洁的格式总结你的技能和知识。<br/>`考试` `学习` `统计` |
|
|
193
193
|
|
|
194
|
-
> 📊 Total agents: [<kbd>**
|
|
194
|
+
> 📊 Total agents: [<kbd>**91**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
|
195
195
|
|
|
196
196
|
<!-- AGENT LIST -->
|
|
197
197
|
|
package/locales/de-DE/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "Möchtest du dieses Thema wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.",
|
|
63
63
|
"confirmRemoveUnstarred": "Möchtest du die nicht markierten Themen wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.",
|
|
64
64
|
"defaultTitle": "Standardthema",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "Klicken Sie auf die Schaltfläche links, um das aktuelle Gespräch als historisches Thema zu speichern und eine neue Gesprächsrunde zu starten",
|
|
67
|
+
"title": "Themenliste"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "Neues Thema öffnen",
|
|
66
70
|
"removeAll": "Alle Themen löschen",
|
|
67
71
|
"removeUnstarred": "Nicht markierte Themen löschen",
|
package/locales/en-US/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "You are about to delete this topic. Once deleted, it cannot be recovered. Please proceed with caution.",
|
|
63
63
|
"confirmRemoveUnstarred": "You are about to delete unstarred topics. Once deleted, they cannot be recovered. Please proceed with caution.",
|
|
64
64
|
"defaultTitle": "Default Topic",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "Click the button on the left to save the current session as a historical topic and start a new session.",
|
|
67
|
+
"title": "Topic List"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "Open New Topic",
|
|
66
70
|
"removeAll": "Remove All Topics",
|
|
67
71
|
"removeUnstarred": "Remove Unstarred Topics",
|
package/locales/es-ES/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "Estás a punto de eliminar este tema. Una vez eliminado, no se podrá recuperar. Por favor, procede con precaución.",
|
|
63
63
|
"confirmRemoveUnstarred": "Estás a punto de eliminar los temas no marcados como favoritos. Una vez eliminados, no se podrán recuperar. Por favor, procede con precaución.",
|
|
64
64
|
"defaultTitle": "Tema predeterminado",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "Haz clic en el botón izquierdo para guardar la conversación actual como un tema histórico y comenzar una nueva sesión",
|
|
67
|
+
"title": "Lista de temas"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "Abrir nuevo tema",
|
|
66
70
|
"removeAll": "Eliminar todos los temas",
|
|
67
71
|
"removeUnstarred": "Eliminar temas no marcados como favoritos",
|
package/locales/fr-FR/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "Vous êtes sur le point de supprimer ce sujet. Cette action est irréversible. Veuillez confirmer.",
|
|
63
63
|
"confirmRemoveUnstarred": "Vous êtes sur le point de supprimer les sujets non favoris. Cette action est irréversible. Veuillez confirmer.",
|
|
64
64
|
"defaultTitle": "Sujet par défaut",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "Cliquez sur le bouton à gauche pour enregistrer la conversation actuelle comme un sujet historique et démarrer une nouvelle session.",
|
|
67
|
+
"title": "Liste des sujets"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "Ouvrir un nouveau sujet",
|
|
66
70
|
"removeAll": "Supprimer tous les sujets",
|
|
67
71
|
"removeUnstarred": "Supprimer les sujets non favoris",
|
package/locales/it-IT/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "Stai per rimuovere questo argomento, l'operazione non potrà essere annullata. Procedere con cautela.",
|
|
63
63
|
"confirmRemoveUnstarred": "Stai per rimuovere gli argomenti non contrassegnati, questa operazione non potrà essere annullata. Procedere con cautela.",
|
|
64
64
|
"defaultTitle": "Argomento predefinito",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "Fare clic sul pulsante a sinistra per salvare l'attuale sessione come argomento storico e avviare una nuova sessione",
|
|
67
|
+
"title": "Elenco argomenti"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "Apri nuovo argomento",
|
|
66
70
|
"removeAll": "Rimuovi tutti gli argomenti",
|
|
67
71
|
"removeUnstarred": "Rimuovi argomenti non contrassegnati",
|
package/locales/ja-JP/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "このトピックを削除します。削除した後は元に戻すことはできません。注意して操作してください。",
|
|
63
63
|
"confirmRemoveUnstarred": "スターをつけていないトピックを削除します。削除した後は元に戻すことはできません。注意して操作してください。",
|
|
64
64
|
"defaultTitle": "デフォルトトピック",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "左側のボタンをクリックして、現在の会話を保存し、新しい会話を開始できます",
|
|
67
|
+
"title": "トピックリスト"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "新しいトピックを開く",
|
|
66
70
|
"removeAll": "すべてのトピックを削除",
|
|
67
71
|
"removeUnstarred": "スターをつけていないトピックを削除",
|
package/locales/ko-KR/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "이 주제를 삭제하시면 되돌릴 수 없습니다. 신중하게 작업하시겠습니까?",
|
|
63
63
|
"confirmRemoveUnstarred": "별표가 없는 주제를 삭제하시면 되돌릴 수 없습니다. 신중하게 작업하시겠습니까?",
|
|
64
64
|
"defaultTitle": "기본 주제",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "현재 대화를 히스토리 토픽으로 저장하고 새 대화를 시작하려면 왼쪽 버튼을 클릭하세요.",
|
|
67
|
+
"title": "토픽 목록"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "새 주제 열기",
|
|
66
70
|
"removeAll": "모든 주제 삭제",
|
|
67
71
|
"removeUnstarred": "별표가 없는 주제 삭제",
|
package/locales/nl-NL/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "Dit onderwerp wordt verwijderd en kan niet worden hersteld. Wees voorzichtig.",
|
|
63
63
|
"confirmRemoveUnstarred": "Niet-gefavoriseerde onderwerpen worden verwijderd en kunnen niet worden hersteld. Wees voorzichtig.",
|
|
64
64
|
"defaultTitle": "Standaard onderwerp",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "Klik op de knop aan de linkerkant om het huidige gesprek op te slaan als een historisch onderwerp en een nieuw gesprek te starten",
|
|
67
|
+
"title": "Onderwerplijst"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "Nieuw onderwerp openen",
|
|
66
70
|
"removeAll": "Alle onderwerpen verwijderen",
|
|
67
71
|
"removeUnstarred": "Niet-gefavoriseerde onderwerpen verwijderen",
|
package/locales/pl-PL/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "Czy na pewno chcesz usunąć ten temat? Tej operacji nie można cofnąć. Proszę potwierdź swoją decyzję.",
|
|
63
63
|
"confirmRemoveUnstarred": "Czy na pewno chcesz usunąć nieoznaczone tematy? Tej operacji nie można cofnąć. Proszę potwierdź swoją decyzję.",
|
|
64
64
|
"defaultTitle": "Domyślne tematy",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "Kliknij przycisk po lewej stronie, aby zapisać bieżącą rozmowę jako historię tematu i rozpocząć nową rundę rozmowy",
|
|
67
|
+
"title": "Lista tematów"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "Otwórz nowy temat",
|
|
66
70
|
"removeAll": "Usuń wszystkie tematy",
|
|
67
71
|
"removeUnstarred": "Usuń nieoznaczone tematy",
|
package/locales/pt-BR/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "Você está prestes a remover este tópico. Depois de remover, não será possível recuperá-lo. Por favor, confirme sua ação.",
|
|
63
63
|
"confirmRemoveUnstarred": "Você está prestes a remover os tópicos não favoritados. Depois de remover, não será possível recuperá-los. Por favor, confirme sua ação.",
|
|
64
64
|
"defaultTitle": "Tópico Padrão",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "Clique em enviar no botão esquerdo para salvar a conversa atual como um tópico histórico e iniciar uma nova rodada de conversa",
|
|
67
|
+
"title": "Lista de Tópicos"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "Abrir Novo Tópico",
|
|
66
70
|
"removeAll": "Remover Todos os Tópicos",
|
|
67
71
|
"removeUnstarred": "Remover Tópicos Não Favoritados",
|
package/locales/ru-RU/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "Вы уверены, что хотите удалить эту тему? После этого ее нельзя будет восстановить.",
|
|
63
63
|
"confirmRemoveUnstarred": "Вы уверены, что хотите удалить неотмеченные темы? После этого их нельзя будет восстановить.",
|
|
64
64
|
"defaultTitle": "Стандартная тема",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "Нажмите на кнопку слева, чтобы сохранить текущий разговор в качестве исторической темы и начать новый разговор",
|
|
67
|
+
"title": "Список тем"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "Создать новую тему",
|
|
66
70
|
"removeAll": "Удалить все темы",
|
|
67
71
|
"removeUnstarred": "Удалить неотмеченные темы",
|
package/locales/tr-TR/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "Bu konuyu silmek üzeresiniz. Bir kere silindiğinde, geri alınamaz. Lütfen dikkatli bir şekilde devam edin.",
|
|
63
63
|
"confirmRemoveUnstarred": "Yıldızlanmamış konuları silmek üzeresiniz. Bir kere silindiğinde, geri alınamazlar. Lütfen dikkatli bir şekilde devam edin.",
|
|
64
64
|
"defaultTitle": "Konu",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "Mevcut oturumu geçmiş konu olarak kaydetmek ve yeni bir oturum başlatmak için sol taraftaki düğmeye tıklayın",
|
|
67
|
+
"title": "Konu Listesi"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "Yeni Konu",
|
|
66
70
|
"removeAll": "Tüm Konuları Sil",
|
|
67
71
|
"removeUnstarred": "Tüm Yıldızlanmamış Konuları Sil",
|
package/locales/vi-VN/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "Bạn sắp xóa chủ đề này. Hành động này không thể hoàn tác, vui lòng xác nhận.",
|
|
63
63
|
"confirmRemoveUnstarred": "Bạn sắp xóa các chủ đề chưa được đánh dấu. Hành động này không thể hoàn tác, vui lòng xác nhận.",
|
|
64
64
|
"defaultTitle": "Chủ đề mặc định",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "Nhấn vào nút bên trái để lưu cuộc trò chuyện hiện tại như một chủ đề lịch sử và bắt đầu một cuộc trò chuyện mới",
|
|
67
|
+
"title": "Danh sách chủ đề"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "Mở chủ đề mới",
|
|
66
70
|
"removeAll": "Xóa tất cả chủ đề",
|
|
67
71
|
"removeUnstarred": "Xóa chủ đề chưa được đánh dấu",
|
package/locales/zh-CN/chat.json
CHANGED
|
@@ -62,12 +62,16 @@
|
|
|
62
62
|
"confirmRemoveTopic": "即将删除该话题,删除后将不可恢复,请谨慎操作。",
|
|
63
63
|
"confirmRemoveUnstarred": "即将删除未收藏话题,删除后将不可恢复,请谨慎操作。",
|
|
64
64
|
"defaultTitle": "默认话题",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "点击发送左侧按钮可将当前会话保存为历史话题,并开启新一轮会话",
|
|
67
|
+
"title": "话题列表"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "开启新话题",
|
|
66
70
|
"removeAll": "删除全部话题",
|
|
67
71
|
"removeUnstarred": "删除未收藏话题",
|
|
68
72
|
"saveCurrentMessages": "将当前会话保存为话题",
|
|
69
73
|
"searchPlaceholder": "搜索话题...",
|
|
70
|
-
"title": "
|
|
74
|
+
"title": "话题"
|
|
71
75
|
},
|
|
72
76
|
"translate": {
|
|
73
77
|
"action": "翻译",
|
package/locales/zh-TW/chat.json
CHANGED
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"confirmRemoveTopic": "即將刪除該話題,刪除後將不可恢復,請謹慎操作。",
|
|
63
63
|
"confirmRemoveUnstarred": "即將刪除未收藏話題,刪除後將不可恢復,請謹慎操作。",
|
|
64
64
|
"defaultTitle": "默認話題",
|
|
65
|
+
"guide": {
|
|
66
|
+
"desc": "點擊發送左側按鈕可將當前對話保存為歷史話題,並開啟新一輪對話",
|
|
67
|
+
"title": "話題列表"
|
|
68
|
+
},
|
|
65
69
|
"openNewTopic": "開啟新話題",
|
|
66
70
|
"removeAll": "刪除全部話題",
|
|
67
71
|
"removeUnstarred": "刪除未收藏話題",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "0.119.
|
|
3
|
+
"version": "0.119.5",
|
|
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",
|
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
"react-intersection-observer": "^9",
|
|
113
113
|
"react-layout-kit": "^1",
|
|
114
114
|
"react-lazy-load": "^4",
|
|
115
|
+
"react-virtuoso": "^4.6.2",
|
|
115
116
|
"react-wrap-balancer": "^1",
|
|
116
117
|
"remark": "^14",
|
|
117
118
|
"remark-gfm": "^3",
|
|
@@ -1,21 +1,55 @@
|
|
|
1
1
|
import { Skeleton } from 'antd';
|
|
2
|
+
import { createStyles } from 'antd-style';
|
|
2
3
|
import { memo } from 'react';
|
|
3
4
|
import { Flexbox } from 'react-layout-kit';
|
|
4
5
|
|
|
5
|
-
const
|
|
6
|
+
const useStyles = createStyles(({ css, prefixCls }) => ({
|
|
7
|
+
container: css`
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
|
|
12
|
+
height: 44px;
|
|
13
|
+
padding: 8px;
|
|
14
|
+
|
|
15
|
+
.${prefixCls}-skeleton-content {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
}
|
|
19
|
+
`,
|
|
20
|
+
|
|
21
|
+
paragraph: css`
|
|
22
|
+
> li {
|
|
23
|
+
height: 24px !important;
|
|
24
|
+
}
|
|
25
|
+
`,
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
export const Placeholder = memo(() => {
|
|
29
|
+
const { styles } = useStyles();
|
|
30
|
+
|
|
6
31
|
return (
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
32
|
+
<Skeleton
|
|
33
|
+
active
|
|
34
|
+
avatar={false}
|
|
35
|
+
className={styles.container}
|
|
36
|
+
paragraph={{
|
|
37
|
+
className: styles.paragraph,
|
|
38
|
+
rows: 1,
|
|
39
|
+
style: { marginBottom: 0 },
|
|
40
|
+
width: '100%',
|
|
41
|
+
}}
|
|
42
|
+
title={false}
|
|
43
|
+
/>
|
|
18
44
|
);
|
|
19
45
|
});
|
|
20
46
|
|
|
47
|
+
export const SkeletonList = memo(() => (
|
|
48
|
+
<Flexbox>
|
|
49
|
+
{Array.from({ length: 8 }).map((_, i) => (
|
|
50
|
+
<Placeholder key={i} />
|
|
51
|
+
))}
|
|
52
|
+
</Flexbox>
|
|
53
|
+
));
|
|
54
|
+
|
|
21
55
|
export default SkeletonList;
|
|
@@ -1,58 +1,92 @@
|
|
|
1
1
|
import { EmptyCard } from '@lobehub/ui';
|
|
2
2
|
import { useThemeMode } from 'antd-style';
|
|
3
3
|
import isEqual from 'fast-deep-equal';
|
|
4
|
+
import React, { memo, useCallback, useRef } from 'react';
|
|
4
5
|
import { useTranslation } from 'react-i18next';
|
|
5
6
|
import { Flexbox } from 'react-layout-kit';
|
|
7
|
+
import { Virtuoso, VirtuosoHandle } from 'react-virtuoso';
|
|
6
8
|
|
|
7
9
|
import { useChatStore } from '@/store/chat';
|
|
8
10
|
import { topicSelectors } from '@/store/chat/selectors';
|
|
9
11
|
import { useGlobalStore } from '@/store/global';
|
|
12
|
+
import { ChatTopic } from '@/types/topic';
|
|
10
13
|
|
|
11
|
-
import SkeletonList from './SkeletonList';
|
|
14
|
+
import { Placeholder, SkeletonList } from './SkeletonList';
|
|
12
15
|
import TopicItem from './TopicItem';
|
|
13
16
|
|
|
14
|
-
export const Topic = () => {
|
|
17
|
+
export const Topic = memo(() => {
|
|
18
|
+
const { t } = useTranslation('chat');
|
|
19
|
+
const virtuosoRef = useRef<VirtuosoHandle>(null);
|
|
15
20
|
const { isDarkMode } = useThemeMode();
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const { t } = useTranslation('empty');
|
|
21
|
+
const [topicsInit, activeTopicId, topicLength] = useChatStore((s) => [
|
|
22
|
+
s.topicsInit,
|
|
23
|
+
s.activeTopicId,
|
|
24
|
+
topicSelectors.currentTopicLength(s),
|
|
25
|
+
]);
|
|
22
26
|
const [visible, updateGuideState] = useGlobalStore((s) => [
|
|
23
27
|
s.preference.guide?.topic,
|
|
24
28
|
s.updateGuideState,
|
|
25
29
|
]);
|
|
26
30
|
|
|
31
|
+
const topics = useChatStore(
|
|
32
|
+
(s) => [
|
|
33
|
+
{
|
|
34
|
+
favorite: false,
|
|
35
|
+
id: 'default',
|
|
36
|
+
title: t('topic.defaultTitle'),
|
|
37
|
+
} as ChatTopic,
|
|
38
|
+
...topicSelectors.displayTopics(s),
|
|
39
|
+
],
|
|
40
|
+
isEqual,
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const itemContent = useCallback(
|
|
44
|
+
(index: number, { id, favorite, title }: ChatTopic) =>
|
|
45
|
+
index === 0 ? (
|
|
46
|
+
<TopicItem active={!activeTopicId} fav={favorite} title={title} />
|
|
47
|
+
) : (
|
|
48
|
+
<TopicItem active={activeTopicId === id} fav={favorite} id={id} key={id} title={title} />
|
|
49
|
+
),
|
|
50
|
+
[activeTopicId],
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
const activeIndex = topics.findIndex((topic) => topic.id === activeTopicId);
|
|
54
|
+
|
|
27
55
|
return !topicsInit ? (
|
|
28
56
|
<SkeletonList />
|
|
29
57
|
) : (
|
|
30
|
-
<Flexbox gap={2} style={{ marginBottom: 12 }}>
|
|
31
|
-
{
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
58
|
+
<Flexbox gap={2} height={'100%'} style={{ marginBottom: 12 }}>
|
|
59
|
+
{topicLength === 0 && (
|
|
60
|
+
<Flexbox flex={1}>
|
|
61
|
+
<EmptyCard
|
|
62
|
+
alt={t('topic.guide.desc')}
|
|
63
|
+
cover={`/images/empty_topic_${isDarkMode ? 'dark' : 'light'}.webp`}
|
|
64
|
+
desc={t('topic.guide.desc')}
|
|
65
|
+
height={120}
|
|
66
|
+
onVisibleChange={(visible) => {
|
|
67
|
+
updateGuideState({ topic: visible });
|
|
68
|
+
}}
|
|
69
|
+
style={{ marginBottom: 6 }}
|
|
70
|
+
title={t('topic.guide.title')}
|
|
71
|
+
visible={visible}
|
|
72
|
+
width={200}
|
|
73
|
+
/>
|
|
74
|
+
</Flexbox>
|
|
45
75
|
)}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
76
|
+
<Virtuoso
|
|
77
|
+
components={{ ScrollSeekPlaceholder: Placeholder }}
|
|
78
|
+
computeItemKey={(_, item) => item.id}
|
|
79
|
+
data={topics}
|
|
80
|
+
fixedItemHeight={44}
|
|
81
|
+
initialTopMostItemIndex={Math.max(activeIndex, 0)}
|
|
82
|
+
itemContent={itemContent}
|
|
83
|
+
overscan={44 * 10}
|
|
84
|
+
ref={virtuosoRef}
|
|
85
|
+
scrollSeekConfiguration={{
|
|
86
|
+
enter: (velocity) => Math.abs(velocity) > 350,
|
|
87
|
+
exit: (velocity) => Math.abs(velocity) < 10,
|
|
88
|
+
}}
|
|
51
89
|
/>
|
|
52
|
-
|
|
53
|
-
{topics.map(({ id, favorite, title }) => (
|
|
54
|
-
<TopicItem active={activeTopicId === id} fav={favorite} id={id} key={id} title={title} />
|
|
55
|
-
))}
|
|
56
90
|
</Flexbox>
|
|
57
91
|
);
|
|
58
|
-
};
|
|
92
|
+
});
|
|
@@ -11,8 +11,9 @@ const TopicListContent = memo<{ mobile?: boolean }>(({ mobile }) => {
|
|
|
11
11
|
{mobile ? <TopicSearchBar /> : <Header />}
|
|
12
12
|
<Flexbox
|
|
13
13
|
gap={16}
|
|
14
|
+
height={'100%'}
|
|
14
15
|
paddingInline={mobile ? 0 : 8}
|
|
15
|
-
style={{
|
|
16
|
+
style={{ paddingTop: 6, position: 'relative' }}
|
|
16
17
|
>
|
|
17
18
|
<Topic />
|
|
18
19
|
</Flexbox>
|
|
@@ -75,7 +75,13 @@ const LLM = memo(() => {
|
|
|
75
75
|
name: [configKey, 'openAI', 'endpoint'],
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
|
-
children:
|
|
78
|
+
children: (
|
|
79
|
+
<Input.TextArea
|
|
80
|
+
allowClear
|
|
81
|
+
placeholder={t('llm.OpenAI.customModelName.placeholder')}
|
|
82
|
+
style={{ height: 100 }}
|
|
83
|
+
/>
|
|
84
|
+
),
|
|
79
85
|
desc: t('llm.OpenAI.customModelName.desc'),
|
|
80
86
|
label: t('llm.OpenAI.customModelName.title'),
|
|
81
87
|
name: [configKey, 'openAI', 'customModelName'],
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { memo, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
import { useChatStore } from '@/store/chat';
|
|
4
|
+
import { chatSelectors } from '@/store/chat/selectors';
|
|
5
|
+
|
|
6
|
+
import BackBottom from './BackBottom';
|
|
7
|
+
|
|
8
|
+
interface AutoScrollProps {
|
|
9
|
+
atBottom: boolean;
|
|
10
|
+
onScrollToBottom: (type: 'auto' | 'click') => void;
|
|
11
|
+
}
|
|
12
|
+
const AutoScroll = memo<AutoScrollProps>(({ atBottom, onScrollToBottom }) => {
|
|
13
|
+
const trackVisibility = useChatStore((s) => !!s.chatLoadingId);
|
|
14
|
+
const str = useChatStore(chatSelectors.chatsMessageString);
|
|
15
|
+
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (atBottom && trackVisibility) {
|
|
18
|
+
onScrollToBottom?.('auto');
|
|
19
|
+
}
|
|
20
|
+
}, [atBottom, trackVisibility, str]);
|
|
21
|
+
|
|
22
|
+
return <BackBottom onScrollToBottom={() => onScrollToBottom('click')} visible={!atBottom} />;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export default AutoScroll;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Icon } from '@lobehub/ui';
|
|
2
|
+
import { Button } from 'antd';
|
|
3
|
+
import { ListEnd } from 'lucide-react';
|
|
4
|
+
import { memo } from 'react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
|
|
7
|
+
import { useStyles } from './style';
|
|
8
|
+
|
|
9
|
+
export interface BackBottomProps {
|
|
10
|
+
onScrollToBottom: () => void;
|
|
11
|
+
visible: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const BackBottom = memo<BackBottomProps>(({ visible, onScrollToBottom }) => {
|
|
15
|
+
const { styles, cx } = useStyles();
|
|
16
|
+
|
|
17
|
+
const { t } = useTranslation('chat');
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<Button
|
|
21
|
+
className={cx(styles.container, visible && styles.visible)}
|
|
22
|
+
icon={<Icon icon={ListEnd} />}
|
|
23
|
+
onClick={onScrollToBottom}
|
|
24
|
+
size={'small'}
|
|
25
|
+
>
|
|
26
|
+
{t('backToBottom', { defaultValue: 'Back to bottom' })}
|
|
27
|
+
</Button>
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export default BackBottom;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createStyles } from 'antd-style';
|
|
2
|
+
import { rgba } from 'polished';
|
|
3
|
+
|
|
4
|
+
export const useStyles = createStyles(({ token, css, stylish, cx, responsive }) => ({
|
|
5
|
+
container: cx(
|
|
6
|
+
stylish.blur,
|
|
7
|
+
css`
|
|
8
|
+
pointer-events: none;
|
|
9
|
+
|
|
10
|
+
position: absolute;
|
|
11
|
+
z-index: 1000;
|
|
12
|
+
right: 16px;
|
|
13
|
+
bottom: 16px;
|
|
14
|
+
transform: translateY(16px);
|
|
15
|
+
|
|
16
|
+
padding-inline: 12px !important;
|
|
17
|
+
|
|
18
|
+
opacity: 0;
|
|
19
|
+
background: ${rgba(token.colorBgContainer, 0.5)};
|
|
20
|
+
border-color: ${token.colorFillTertiary} !important;
|
|
21
|
+
border-radius: 16px !important;
|
|
22
|
+
|
|
23
|
+
${responsive.mobile} {
|
|
24
|
+
right: 0;
|
|
25
|
+
border-right: none;
|
|
26
|
+
border-top-right-radius: 0 !important;
|
|
27
|
+
border-bottom-right-radius: 0 !important;
|
|
28
|
+
}
|
|
29
|
+
`,
|
|
30
|
+
),
|
|
31
|
+
visible: css`
|
|
32
|
+
pointer-events: all;
|
|
33
|
+
transform: translateY(0);
|
|
34
|
+
opacity: 1;
|
|
35
|
+
`,
|
|
36
|
+
}));
|