@lobehub/chat 1.14.6 → 1.14.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 +58 -0
- package/locales/ar/portal.json +7 -0
- package/locales/bg-BG/portal.json +7 -0
- package/locales/de-DE/portal.json +7 -0
- package/locales/en-US/components.json +10 -10
- package/locales/en-US/file.json +5 -5
- package/locales/en-US/portal.json +7 -0
- package/locales/en-US/tool.json +1 -1
- package/locales/es-ES/portal.json +7 -0
- package/locales/fr-FR/portal.json +7 -0
- package/locales/it-IT/portal.json +7 -0
- package/locales/ja-JP/portal.json +7 -0
- package/locales/ko-KR/portal.json +7 -0
- package/locales/nl-NL/portal.json +7 -0
- package/locales/pl-PL/portal.json +7 -0
- package/locales/pt-BR/portal.json +7 -0
- package/locales/ru-RU/portal.json +7 -0
- package/locales/tr-TR/portal.json +7 -0
- package/locales/vi-VN/portal.json +7 -0
- package/locales/zh-CN/portal.json +7 -0
- package/locales/zh-TW/portal.json +7 -0
- package/package.json +1 -1
- package/src/app/(main)/chat/(workspace)/@portal/Artifacts/{index.tsx → Body/index.tsx} +1 -1
- package/src/app/(main)/chat/(workspace)/@portal/Artifacts/Header.tsx +35 -0
- package/src/app/(main)/chat/(workspace)/@portal/Artifacts/index.ts +9 -0
- package/src/app/(main)/chat/(workspace)/@portal/Artifacts/useEnable.ts +6 -0
- package/src/app/(main)/chat/(workspace)/@portal/FilePreview/Body/index.tsx +57 -0
- package/src/app/(main)/chat/(workspace)/@portal/FilePreview/Header.tsx +36 -0
- package/src/app/(main)/chat/(workspace)/@portal/FilePreview/index.ts +9 -0
- package/src/app/(main)/chat/(workspace)/@portal/FilePreview/useEnable.ts +6 -0
- package/src/app/(main)/chat/(workspace)/@portal/Home/{Files → Body/Files}/FileList/Item.tsx +7 -7
- package/src/app/(main)/chat/(workspace)/@portal/Home/{Files → Body/Files}/FileList/index.tsx +2 -2
- package/src/app/(main)/chat/(workspace)/@portal/Home/Header.tsx +17 -0
- package/src/app/(main)/chat/(workspace)/@portal/Home/index.ts +2 -0
- package/src/app/(main)/chat/(workspace)/@portal/_layout/Desktop.tsx +1 -1
- package/src/app/(main)/chat/(workspace)/@portal/default.tsx +2 -2
- package/src/app/(main)/chat/(workspace)/@portal/features/Header.tsx +6 -35
- package/src/app/(main)/chat/(workspace)/@portal/router.tsx +36 -12
- package/src/app/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/KnowledgeTag.tsx +5 -3
- package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +3 -1
- package/src/app/(main)/settings/tts/features/const.tsx +1 -1
- package/src/components/FileParsingStatus/EmbeddingStatus.tsx +117 -0
- package/src/components/FileParsingStatus/index.tsx +54 -112
- package/src/config/modelProviders/openai.ts +0 -1
- package/src/database/server/models/message.ts +8 -2
- package/src/features/Conversation/Messages/Assistant/FileChunks/Item/index.tsx +10 -7
- package/src/features/Conversation/Messages/Assistant/FileChunks/Item/style.ts +13 -0
- package/src/features/Conversation/Messages/User/FileListViewer/Item.tsx +1 -1
- package/src/features/FileManager/FileList/FileListItem/ChunkTag.tsx +14 -7
- package/src/layout/GlobalProvider/Locale.tsx +19 -17
- package/src/locales/default/portal.ts +7 -0
- package/src/server/routers/lambda/agent.ts +3 -1
- package/src/server/routers/lambda/file.ts +19 -0
- package/src/services/file/server.ts +4 -0
- package/src/services/rag.ts +1 -0
- package/src/store/chat/slices/portal/action.ts +9 -4
- package/src/store/chat/slices/portal/initialState.ts +7 -3
- package/src/store/chat/slices/portal/selectors.ts +2 -0
- package/src/store/file/slices/fileManager/action.ts +18 -0
- package/src/styles/index.ts +2 -0
- package/src/styles/text.ts +10 -0
- package/src/types/message/index.ts +2 -0
- package/src/app/(main)/chat/(workspace)/@portal/FilePreview/index.tsx +0 -26
- /package/src/app/(main)/chat/(workspace)/@portal/Artifacts/{ToolRender.tsx → Body/ToolRender.tsx} +0 -0
- /package/src/app/(main)/chat/(workspace)/@portal/Home/{Artifacts → Body/Artifacts}/ArtifactList/Item/index.tsx +0 -0
- /package/src/app/(main)/chat/(workspace)/@portal/Home/{Artifacts → Body/Artifacts}/ArtifactList/Item/style.ts +0 -0
- /package/src/app/(main)/chat/(workspace)/@portal/Home/{Artifacts → Body/Artifacts}/ArtifactList/index.tsx +0 -0
- /package/src/app/(main)/chat/(workspace)/@portal/Home/{Artifacts → Body/Artifacts}/index.tsx +0 -0
- /package/src/app/(main)/chat/(workspace)/@portal/Home/{Files → Body/Files}/index.tsx +0 -0
- /package/src/app/(main)/chat/(workspace)/@portal/Home/{index.tsx → Body/index.tsx} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 1.14.8](https://github.com/lobehub/lobe-chat/compare/v1.14.7...v1.14.8)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2024-08-29**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **misc**: Fix whisper-1 typo.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **misc**: Fix whisper-1 typo, closes [#3665](https://github.com/lobehub/lobe-chat/issues/3665) ([084c971](https://github.com/lobehub/lobe-chat/commit/084c971))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 1.14.7](https://github.com/lobehub/lobe-chat/compare/v1.14.6...v1.14.7)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2024-08-28**</sup>
|
|
33
|
+
|
|
34
|
+
#### 🐛 Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Disable ChatGPT-4o Tools Calling.
|
|
37
|
+
|
|
38
|
+
#### 💄 Styles
|
|
39
|
+
|
|
40
|
+
- **misc**: Improve chunk and file preview.
|
|
41
|
+
|
|
42
|
+
<br/>
|
|
43
|
+
|
|
44
|
+
<details>
|
|
45
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
46
|
+
|
|
47
|
+
#### What's fixed
|
|
48
|
+
|
|
49
|
+
- **misc**: Disable ChatGPT-4o Tools Calling, closes [#3659](https://github.com/lobehub/lobe-chat/issues/3659) ([c94077d](https://github.com/lobehub/lobe-chat/commit/c94077d))
|
|
50
|
+
|
|
51
|
+
#### Styles
|
|
52
|
+
|
|
53
|
+
- **misc**: Improve chunk and file preview, closes [#3658](https://github.com/lobehub/lobe-chat/issues/3658) ([4c9155c](https://github.com/lobehub/lobe-chat/commit/4c9155c))
|
|
54
|
+
|
|
55
|
+
</details>
|
|
56
|
+
|
|
57
|
+
<div align="right">
|
|
58
|
+
|
|
59
|
+
[](#readme-top)
|
|
60
|
+
|
|
61
|
+
</div>
|
|
62
|
+
|
|
5
63
|
### [Version 1.14.6](https://github.com/lobehub/lobe-chat/compare/v1.14.5...v1.14.6)
|
|
6
64
|
|
|
7
65
|
<sup>Released on **2024-08-28**</sup>
|
package/locales/ar/portal.json
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "القطع الأثرية",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "جزء",
|
|
6
|
+
"file": "ملف"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "إنشاء رسالة مساعد ذكاء اصطناعي",
|
|
5
11
|
"summary": "ملخص",
|
|
6
12
|
"summaryTooltip": "ملخص للمحتوى الحالي"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "قائمة القطع الأثرية الحالية فارغة، يرجى استخدام الإضافات في الجلسة ومن ثم التحقق مرة أخرى",
|
|
15
|
+
"emptyKnowledgeList": "قائمة المعرفة الحالية فارغة، يرجى فتح قاعدة المعرفة حسب الحاجة في المحادثة قبل العرض",
|
|
9
16
|
"files": "ملفات",
|
|
10
17
|
"title": "نافذة موسعة"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Артефакти",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Част",
|
|
6
|
+
"file": "Файл"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Създаване на съобщение на помощника",
|
|
5
11
|
"summary": "Обобщение",
|
|
6
12
|
"summaryTooltip": "Обобщение на текущото съдържание"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "Списъкът с текущите артефакти е празен. Моля, използвайте добавки в разговора и след това проверете отново.",
|
|
15
|
+
"emptyKnowledgeList": "Текущият списък с познания е празен. Моля, активирайте базата данни на познанията по време на сесията, за да я прегледате.",
|
|
9
16
|
"files": "файлове",
|
|
10
17
|
"title": "Разширено прозорец"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Artefakte",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Chunk",
|
|
6
|
+
"file": "Datei"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Assistenten-Nachricht erstellen",
|
|
5
11
|
"summary": "Zusammenfassung",
|
|
6
12
|
"summaryTooltip": "Zusammenfassung des aktuellen Inhalts"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "Die Liste der Artefakte ist derzeit leer. Bitte verwenden Sie Plugins in der Sitzung und überprüfen Sie sie erneut.",
|
|
15
|
+
"emptyKnowledgeList": "Die aktuelle Wissensliste ist leer. Bitte aktivieren Sie die Wissensdatenbank nach Bedarf in der Sitzung, um sie anzuzeigen.",
|
|
9
16
|
"files": "Dateien",
|
|
10
17
|
"title": "Erweiterungsfenster"
|
|
11
18
|
}
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"addToOtherKnowledgeBase": "Add to Other Knowledge Base",
|
|
12
12
|
"batchChunking": "Batch Chunking",
|
|
13
13
|
"chunking": "Chunking",
|
|
14
|
-
"chunkingTooltip": "Split the file into multiple text chunks and
|
|
14
|
+
"chunkingTooltip": "Split the file into multiple text chunks and embedding them for semantic search and file dialogue.",
|
|
15
15
|
"confirmDelete": "You are about to delete this file. Once deleted, it cannot be recovered. Please confirm your action.",
|
|
16
16
|
"confirmDeleteMultiFiles": "You are about to delete the selected {{count}} files. Once deleted, they cannot be recovered. Please confirm your action.",
|
|
17
17
|
"confirmRemoveFromKnowledgeBase": "You are about to remove the selected {{count}} files from the knowledge base. They will still be viewable in all files. Please confirm your action.",
|
|
18
18
|
"copyUrl": "Copy Link",
|
|
19
|
-
"copyUrlSuccess": "File
|
|
19
|
+
"copyUrlSuccess": "File url copied successfully.",
|
|
20
20
|
"createChunkingTask": "Preparing...",
|
|
21
21
|
"deleteSuccess": "File deleted successfully.",
|
|
22
22
|
"downloading": "Downloading file...",
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
"FileParsingStatus": {
|
|
50
50
|
"chunks": {
|
|
51
51
|
"embeddingStatus": {
|
|
52
|
-
"empty": "Text chunks have not been fully
|
|
53
|
-
"error": "
|
|
54
|
-
"errorResult": "Vectorization failed, please check and try again.
|
|
55
|
-
"processing": "Text chunks are being
|
|
56
|
-
"success": "All current text chunks have been
|
|
52
|
+
"empty": "Text chunks have not been fully embedded, which will render the semantic search feature unavailable. To improve search quality, please embedding the text chunks.",
|
|
53
|
+
"error": "Embedding failed",
|
|
54
|
+
"errorResult": "Vectorization failed, please check and try again. Error detail:",
|
|
55
|
+
"processing": "Text chunks are being embedded, please be patient.",
|
|
56
|
+
"success": "All current text chunks have been embedded"
|
|
57
57
|
},
|
|
58
|
-
"embeddings": "
|
|
58
|
+
"embeddings": "Embedding",
|
|
59
59
|
"status": {
|
|
60
|
-
"error": "Chunking failed
|
|
61
|
-
"errorResult": "Chunking failed, please check and try again.
|
|
60
|
+
"error": "Chunking failed",
|
|
61
|
+
"errorResult": "Chunking failed, please check and try again. Error detail:",
|
|
62
62
|
"processing": "Chunking in progress.",
|
|
63
63
|
"processingTip": "The server is splitting text chunks; closing the page will not affect the chunking progress."
|
|
64
64
|
}
|
package/locales/en-US/file.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"desc": "Manage
|
|
2
|
+
"desc": "Manage files and knowledge base",
|
|
3
3
|
"detail": {
|
|
4
4
|
"basic": {
|
|
5
5
|
"createdAt": "Creation Time",
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
"updatedAt": "Update Time"
|
|
11
11
|
},
|
|
12
12
|
"data": {
|
|
13
|
-
"chunkCount": "
|
|
13
|
+
"chunkCount": "Chunks",
|
|
14
14
|
"embedding": {
|
|
15
|
-
"default": "Not
|
|
15
|
+
"default": "Not embedding",
|
|
16
16
|
"error": "Failed",
|
|
17
17
|
"pending": "Pending start",
|
|
18
18
|
"processing": "In progress",
|
|
19
19
|
"success": "Completed"
|
|
20
20
|
},
|
|
21
|
-
"embeddingStatus": "
|
|
21
|
+
"embeddingStatus": "embedding"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"header": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"knowledgeBase": {
|
|
33
33
|
"list": {
|
|
34
34
|
"confirmRemoveKnowledgeBase": "You are about to delete this knowledge base. The files within will not be deleted and will be moved to All Files. Once deleted, the knowledge base cannot be recovered. Please proceed with caution.",
|
|
35
|
-
"empty": "Click <1>+</1> to
|
|
35
|
+
"empty": "Click <1>+</1> to add a knowledge base"
|
|
36
36
|
},
|
|
37
37
|
"new": "New Knowledge Base",
|
|
38
38
|
"title": "Knowledge Base"
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Artifacts",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Chunk",
|
|
6
|
+
"file": "File"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Generate Assistant Message",
|
|
5
11
|
"summary": "Summary",
|
|
6
12
|
"summaryTooltip": "Summarize current content"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "The current Artifacts list is empty. Please use plugins in the session as needed before viewing.",
|
|
15
|
+
"emptyKnowledgeList": "The current knowledge list is empty. Please enable the knowledge base as needed during the conversation before viewing.",
|
|
9
16
|
"files": "Files",
|
|
10
17
|
"title": "Portal View"
|
|
11
18
|
}
|
package/locales/en-US/tool.json
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Artefactos",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Fragmento",
|
|
6
|
+
"file": "Archivo"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Crear mensaje de IA",
|
|
5
11
|
"summary": "Resumen",
|
|
6
12
|
"summaryTooltip": "Resumir el contenido actual"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "La lista de Artefactos actual está vacía. Por favor, utilice los complementos en la conversación y vuelva a intentarlo.",
|
|
15
|
+
"emptyKnowledgeList": "La lista de conocimientos actual está vacía. Por favor, activa la base de conocimientos según sea necesario en la conversación antes de volver a revisar.",
|
|
9
16
|
"files": "archivos",
|
|
10
17
|
"title": "Ventana de expansión"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Artifacts",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Fragment",
|
|
6
|
+
"file": "Fichier"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Créer un message d'assistant",
|
|
5
11
|
"summary": "Résumé",
|
|
6
12
|
"summaryTooltip": "Résumé du contenu actuel"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "La liste des Artifacts est actuellement vide. Veuillez utiliser les plugins dans la conversation avant de consulter à nouveau.",
|
|
15
|
+
"emptyKnowledgeList": "La liste des connaissances est actuellement vide. Veuillez activer la base de connaissances selon vos besoins dans la conversation avant de consulter.",
|
|
9
16
|
"files": "Fichiers",
|
|
10
17
|
"title": "Fenêtre d'extension"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Artefatti",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Blocco",
|
|
6
|
+
"file": "File"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Genera messaggio AI",
|
|
5
11
|
"summary": "Sommario",
|
|
6
12
|
"summaryTooltip": "Sommario del contenuto attuale"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "La lista degli Artefatti attuale è vuota, si prega di utilizzare i plugin necessari durante la sessione e poi controllare di nuovo",
|
|
15
|
+
"emptyKnowledgeList": "L'elenco delle conoscenze attuale è vuoto. Si prega di attivare il database delle conoscenze durante la conversazione per visualizzarlo.",
|
|
9
16
|
"files": "File",
|
|
10
17
|
"title": "Finestra di espansione"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "アーティファクト",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "チャンク",
|
|
6
|
+
"file": "ファイル"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "AIメッセージを生成",
|
|
5
11
|
"summary": "サマリー",
|
|
6
12
|
"summaryTooltip": "現在の内容を要約"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "現在、アーティファクトリストは空です。プラグインを使用してセッション中に追加してください。",
|
|
15
|
+
"emptyKnowledgeList": "現在の知識リストは空です。会話中に必要に応じて知識ベースを開いてからご覧ください。",
|
|
9
16
|
"files": "ファイル",
|
|
10
17
|
"title": "拡張ウィンドウ"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "아티팩트",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "청크",
|
|
6
|
+
"file": "파일"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "AI 메시지 생성",
|
|
5
11
|
"summary": "요약",
|
|
6
12
|
"summaryTooltip": "현재 콘텐츠를 요약합니다"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "현재 아티팩트 목록이 비어 있습니다. 플러그인을 사용한 후에 다시 확인해주세요.",
|
|
15
|
+
"emptyKnowledgeList": "현재 지식 목록이 비어 있습니다. 대화 중에 필요에 따라 지식 베이스를 활성화한 후 다시 확인해 주세요.",
|
|
9
16
|
"files": "파일",
|
|
10
17
|
"title": "확장 창"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Artifacts",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Chunk",
|
|
6
|
+
"file": "Bestand"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Creëer assistentbericht",
|
|
5
11
|
"summary": "Samenvatting",
|
|
6
12
|
"summaryTooltip": "Samenvatting van de huidige inhoud"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "De huidige lijst met Artifacts is leeg. Gebruik plugins in de sessie en bekijk deze later opnieuw.",
|
|
15
|
+
"emptyKnowledgeList": "De huidige kennislijst is leeg. Gelieve de kennisbank in de sessie te openen voordat u deze bekijkt.",
|
|
9
16
|
"files": "Bestanden",
|
|
10
17
|
"title": "Uitbreidingsvenster"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Artefakty",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Część",
|
|
6
|
+
"file": "Plik"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Tworzenie wiadomości AI",
|
|
5
11
|
"summary": "Podsumowanie",
|
|
6
12
|
"summaryTooltip": "Podsumowanie bieżącej zawartości"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "Obecna lista Artefaktów jest pusta. Proszę użyć wtyczek w trakcie sesji, a następnie sprawdzić ponownie.",
|
|
15
|
+
"emptyKnowledgeList": "Aktualna lista wiedzy jest pusta. Proszę otworzyć bazę wiedzy w trakcie rozmowy, aby ją przeglądać.",
|
|
9
16
|
"files": "Pliki",
|
|
10
17
|
"title": "Okno rozszerzenia"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Artefatos",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Parte",
|
|
6
|
+
"file": "Arquivo"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Gerar mensagem de IA",
|
|
5
11
|
"summary": "Resumo",
|
|
6
12
|
"summaryTooltip": "Resumir o conteúdo atual"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "A lista de Artefatos atual está vazia. Por favor, use os plugins conforme necessário durante a sessão e depois verifique novamente.",
|
|
15
|
+
"emptyKnowledgeList": "A lista de conhecimentos atual está vazia. Por favor, ative o repositório de conhecimentos conforme necessário durante a conversa antes de visualizar.",
|
|
9
16
|
"files": "Arquivos",
|
|
10
17
|
"title": "Janela de Expansão"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Артефакты",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Часть",
|
|
6
|
+
"file": "Файл"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Создать сообщение помощника",
|
|
5
11
|
"summary": "Сводка",
|
|
6
12
|
"summaryTooltip": "Сводка текущего содержимого"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "Список текущих артефактов пуст. Пожалуйста, используйте плагины во время сеанса и затем просмотрите.",
|
|
15
|
+
"emptyKnowledgeList": "Текущий список знаний пуст. Пожалуйста, откройте базу знаний по мере необходимости в разговоре, прежде чем просматривать.",
|
|
9
16
|
"files": "файлы",
|
|
10
17
|
"title": "Расширенное окно"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Artefaktlar",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Parça",
|
|
6
|
+
"file": "Dosya"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Yapay Zeka Mesajı Oluştur",
|
|
5
11
|
"summary": "Özet",
|
|
6
12
|
"summaryTooltip": "Mevcut içeriği özetle"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "Mevcut Artefakt listesi boş, lütfen eklentileri kullanarak oturumda gerektiğinde göz atın",
|
|
15
|
+
"emptyKnowledgeList": "Mevcut bilgi listesi boş. Lütfen sohbet sırasında ihtiyaç duyduğunuz bilgi havuzunu açtıktan sonra tekrar kontrol edin.",
|
|
9
16
|
"files": "Dosyalar",
|
|
10
17
|
"title": "Genişletme Penceresi"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Tác Phẩm",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "Phân đoạn",
|
|
6
|
+
"file": "Tập tin"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "Tạo tin nhắn trợ giúp",
|
|
5
11
|
"summary": "Tóm tắt",
|
|
6
12
|
"summaryTooltip": "Tóm tắt nội dung hiện tại"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "Danh sách Tác Phẩm hiện tại đang trống, vui lòng sử dụng các plugin trong cuộc trò chuyện trước khi xem lại",
|
|
15
|
+
"emptyKnowledgeList": "Danh sách kiến thức hiện tại trống, vui lòng mở kho kiến thức khi cần trong cuộc trò chuyện trước khi xem",
|
|
9
16
|
"files": "Tập tin",
|
|
10
17
|
"title": "Cửa sổ mở rộng"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "Artifacts",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "分块",
|
|
6
|
+
"file": "文件"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "创建助手消息",
|
|
5
11
|
"summary": "总结",
|
|
6
12
|
"summaryTooltip": "总结当前内容"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "当前 Artifacts 列表为空,请在会话中按需使用插件后再查看",
|
|
15
|
+
"emptyKnowledgeList": "当前知识列表为空,请在会话中按需开启知识库后再查看",
|
|
9
16
|
"files": "文件",
|
|
10
17
|
"title": "工作区"
|
|
11
18
|
}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"Artifacts": "文物",
|
|
3
|
+
"FilePreview": {
|
|
4
|
+
"tabs": {
|
|
5
|
+
"chunk": "分塊",
|
|
6
|
+
"file": "檔案"
|
|
7
|
+
}
|
|
8
|
+
},
|
|
3
9
|
"actions": {
|
|
4
10
|
"genAiMessage": "生成助手訊息",
|
|
5
11
|
"summary": "摘要",
|
|
6
12
|
"summaryTooltip": "總結目前內容"
|
|
7
13
|
},
|
|
8
14
|
"emptyArtifactList": "當前文物列表為空,請在會話中按需使用插件後再查看",
|
|
15
|
+
"emptyKnowledgeList": "當前知識列表為空,請在會話中按需開啟知識庫後再查看",
|
|
9
16
|
"files": "檔案",
|
|
10
17
|
"title": "擴展視窗"
|
|
11
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/chat",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.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",
|
|
@@ -5,7 +5,7 @@ import { useChatStore } from '@/store/chat';
|
|
|
5
5
|
import { chatPortalSelectors, chatSelectors } from '@/store/chat/selectors';
|
|
6
6
|
import { safeParseJSON } from '@/utils/safeParseJSON';
|
|
7
7
|
|
|
8
|
-
import Footer from '
|
|
8
|
+
import Footer from '../Footer';
|
|
9
9
|
import ToolRender from './ToolRender';
|
|
10
10
|
|
|
11
11
|
const ToolUI = () => {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ActionIcon } from '@lobehub/ui';
|
|
2
|
+
import { Typography } from 'antd';
|
|
3
|
+
import isEqual from 'fast-deep-equal';
|
|
4
|
+
import { ArrowLeft } from 'lucide-react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { Flexbox } from 'react-layout-kit';
|
|
7
|
+
|
|
8
|
+
import PluginAvatar from '@/features/PluginAvatar';
|
|
9
|
+
import { useChatStore } from '@/store/chat';
|
|
10
|
+
import { chatPortalSelectors } from '@/store/chat/selectors';
|
|
11
|
+
import { pluginHelpers, useToolStore } from '@/store/tool';
|
|
12
|
+
import { toolSelectors } from '@/store/tool/selectors';
|
|
13
|
+
|
|
14
|
+
const Header = () => {
|
|
15
|
+
const [closeToolUI, toolUIIdentifier = ''] = useChatStore((s) => [
|
|
16
|
+
s.closeToolUI,
|
|
17
|
+
chatPortalSelectors.toolUIIdentifier(s),
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
const { t } = useTranslation('plugin');
|
|
21
|
+
const pluginMeta = useToolStore(toolSelectors.getMetaById(toolUIIdentifier), isEqual);
|
|
22
|
+
const pluginTitle = pluginHelpers.getPluginTitle(pluginMeta) ?? t('unknownPlugin');
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Flexbox align={'center'} gap={4} horizontal>
|
|
26
|
+
<ActionIcon icon={ArrowLeft} onClick={() => closeToolUI()} />
|
|
27
|
+
<PluginAvatar identifier={toolUIIdentifier} size={28} />
|
|
28
|
+
<Typography.Text style={{ fontSize: 16 }} type={'secondary'}>
|
|
29
|
+
{pluginTitle}
|
|
30
|
+
</Typography.Text>
|
|
31
|
+
</Flexbox>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default Header;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Icon, Markdown } from '@lobehub/ui';
|
|
2
|
+
import { Segmented } from 'antd';
|
|
3
|
+
import { BoltIcon, FileIcon } from 'lucide-react';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { Flexbox } from 'react-layout-kit';
|
|
7
|
+
|
|
8
|
+
import Loading from '@/components/CircleLoading';
|
|
9
|
+
import FileViewer from '@/features/FileViewer';
|
|
10
|
+
import { useChatStore } from '@/store/chat';
|
|
11
|
+
import { chatPortalSelectors } from '@/store/chat/selectors';
|
|
12
|
+
import { useFileStore } from '@/store/file';
|
|
13
|
+
|
|
14
|
+
const FilePreview = () => {
|
|
15
|
+
const previewFileId = useChatStore(chatPortalSelectors.previewFileId);
|
|
16
|
+
const chunkText = useChatStore(chatPortalSelectors.chunkText);
|
|
17
|
+
const useFetchFileItem = useFileStore((s) => s.useFetchFileItem);
|
|
18
|
+
const { t } = useTranslation('portal');
|
|
19
|
+
|
|
20
|
+
const [tab, setTab] = useState('chunk');
|
|
21
|
+
const { data, isLoading } = useFetchFileItem(previewFileId);
|
|
22
|
+
|
|
23
|
+
if (isLoading) return <Loading />;
|
|
24
|
+
if (!data) return;
|
|
25
|
+
|
|
26
|
+
const showChunk = tab === 'chunk' && !!chunkText;
|
|
27
|
+
return (
|
|
28
|
+
<Flexbox
|
|
29
|
+
height={'100%'}
|
|
30
|
+
paddingBlock={'0 4px'}
|
|
31
|
+
paddingInline={4}
|
|
32
|
+
style={{ borderRadius: 4, overflow: 'hidden' }}
|
|
33
|
+
>
|
|
34
|
+
{chunkText && (
|
|
35
|
+
<Segmented
|
|
36
|
+
block
|
|
37
|
+
onChange={setTab}
|
|
38
|
+
options={[
|
|
39
|
+
{ icon: <Icon icon={BoltIcon} />, label: t('FilePreview.tabs.chunk'), value: 'chunk' },
|
|
40
|
+
{ icon: <Icon icon={FileIcon} />, label: t('FilePreview.tabs.file'), value: 'file' },
|
|
41
|
+
]}
|
|
42
|
+
value={tab}
|
|
43
|
+
/>
|
|
44
|
+
)}
|
|
45
|
+
|
|
46
|
+
{showChunk ? (
|
|
47
|
+
<Markdown style={{ overflow: 'scroll', paddingInline: 8 }}>{chunkText}</Markdown>
|
|
48
|
+
) : (
|
|
49
|
+
<Flexbox flex={1} paddingBlock={8} style={{ overflow: 'scroll' }}>
|
|
50
|
+
<FileViewer {...data} />
|
|
51
|
+
</Flexbox>
|
|
52
|
+
)}
|
|
53
|
+
</Flexbox>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export default FilePreview;
|