@lobehub/chat 1.34.1 → 1.34.3
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/changelog/v1.json +18 -0
- package/locales/ar/thread.json +6 -1
- package/locales/bg-BG/thread.json +6 -1
- package/locales/de-DE/thread.json +6 -1
- package/locales/en-US/thread.json +6 -1
- package/locales/es-ES/thread.json +6 -1
- package/locales/fa-IR/thread.json +6 -1
- package/locales/fr-FR/thread.json +6 -1
- package/locales/it-IT/thread.json +6 -1
- package/locales/ja-JP/thread.json +6 -1
- package/locales/ko-KR/thread.json +6 -1
- package/locales/nl-NL/thread.json +6 -1
- package/locales/pl-PL/thread.json +6 -1
- package/locales/pt-BR/thread.json +6 -1
- package/locales/ru-RU/thread.json +6 -1
- package/locales/tr-TR/thread.json +6 -1
- package/locales/vi-VN/thread.json +6 -1
- package/locales/zh-CN/thread.json +6 -1
- package/locales/zh-TW/thread.json +6 -1
- package/package.json +1 -1
- package/src/features/Portal/Thread/Chat/ChatInput/index.tsx +3 -2
- package/src/features/Portal/Thread/Header/New.tsx +4 -2
- package/src/locales/default/thread.ts +2 -0
- package/src/server/modules/AgentRuntime/index.test.ts +22 -0
- package/src/server/modules/AgentRuntime/index.ts +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,56 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.34.3](https://github.com/lobehub/lobe-chat/compare/v1.34.2...v1.34.3)
|
6
|
+
|
7
|
+
<sup>Released on **2024-11-27**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix fallback behavior of default mode in AgentRuntime.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Fix fallback behavior of default mode in AgentRuntime, closes [#4813](https://github.com/lobehub/lobe-chat/issues/4813) ([e7cb62e](https://github.com/lobehub/lobe-chat/commit/e7cb62e))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
30
|
+
### [Version 1.34.2](https://github.com/lobehub/lobe-chat/compare/v1.34.1...v1.34.2)
|
31
|
+
|
32
|
+
<sup>Released on **2024-11-27**</sup>
|
33
|
+
|
34
|
+
#### 💄 Styles
|
35
|
+
|
36
|
+
- **misc**: Improve thread i18n locale.
|
37
|
+
|
38
|
+
<br/>
|
39
|
+
|
40
|
+
<details>
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
42
|
+
|
43
|
+
#### Styles
|
44
|
+
|
45
|
+
- **misc**: Improve thread i18n locale, closes [#4807](https://github.com/lobehub/lobe-chat/issues/4807) ([3da1704](https://github.com/lobehub/lobe-chat/commit/3da1704))
|
46
|
+
|
47
|
+
</details>
|
48
|
+
|
49
|
+
<div align="right">
|
50
|
+
|
51
|
+
[](#readme-top)
|
52
|
+
|
53
|
+
</div>
|
54
|
+
|
5
55
|
### [Version 1.34.1](https://github.com/lobehub/lobe-chat/compare/v1.34.0...v1.34.1)
|
6
56
|
|
7
57
|
<sup>Released on **2024-11-26**</sup>
|
package/README.md
CHANGED
@@ -285,14 +285,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
|
285
285
|
|
286
286
|
<!-- AGENT LIST -->
|
287
287
|
|
288
|
-
| Recent Submits
|
289
|
-
|
|
290
|
-
| [
|
291
|
-
| [
|
292
|
-
| [
|
293
|
-
| [
|
294
|
-
|
295
|
-
> 📊 Total agents: [<kbd>**
|
288
|
+
| Recent Submits | Description |
|
289
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
290
|
+
| [Backend Development Assistant](https://chat-preview.lobehub.com/market?agent=backend-assistant)<br/><sup>By **[zeno980](https://github.com/zeno980)** on **2024-11-26**</sup> | Skilled in backend development tasks<br/>`backend-development` `ai-technology` `web-applications` `spring` `sql` |
|
291
|
+
| [Bilingual Dictionary Expert](https://chat-preview.lobehub.com/market?agent=english-chinese-dictionary-expert)<br/><sup>By **[swarfte](https://github.com/swarfte)** on **2024-11-26**</sup> | Expert in bilingual English-Chinese vocabulary translation and analysis<br/>`translation` `language-learning` `vocabulary` `dictionary` |
|
292
|
+
| [SSC Incremental](https://chat-preview.lobehub.com/market?agent=great-for-analysis-coding-and-rubber-ducking)<br/><sup>By **[Base03](https://github.com/Base03)** on **2024-11-26**</sup> | Claude minus the Reddit<br/>`technology` `analysis` `software` `ai` `research` |
|
293
|
+
| [Interviewer's Assistant](https://chat-preview.lobehub.com/market?agent=interviewer-assistant)<br/><sup>By **[xandertang](https://github.com/Dr-T)** on **2024-11-26**</sup> | Proficient in designing and evaluating interview questions for product managers, generating interview questions based on resume interpretation results.<br/>`interview` `resume` `recruitment` `efficiency` |
|
294
|
+
|
295
|
+
> 📊 Total agents: [<kbd>**446**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
296
296
|
|
297
297
|
<!-- AGENT LIST -->
|
298
298
|
|
package/README.zh-CN.md
CHANGED
@@ -274,14 +274,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
274
274
|
|
275
275
|
<!-- AGENT LIST -->
|
276
276
|
|
277
|
-
| 最近新增
|
278
|
-
|
|
279
|
-
| [
|
280
|
-
| [
|
281
|
-
| [
|
282
|
-
| [
|
283
|
-
|
284
|
-
> 📊 Total agents: [<kbd>**
|
277
|
+
| 最近新增 | 助手说明 |
|
278
|
+
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
279
|
+
| [后端开发助手](https://chat-preview.lobehub.com/market?agent=backend-assistant)<br/><sup>By **[zeno980](https://github.com/zeno980)** on **2024-11-26**</sup> | 擅长后端开发任务<br/>`后端开发` `ai技术` `web应用` `spring` `sql` |
|
280
|
+
| [双语词典专家](https://chat-preview.lobehub.com/market?agent=english-chinese-dictionary-expert)<br/><sup>By **[swarfte](https://github.com/swarfte)** on **2024-11-26**</sup> | 双语英语 - 中文词汇翻译和分析专家<br/>`翻译` `语言学习` `词汇` `词典` |
|
281
|
+
| [SSC 增量](https://chat-preview.lobehub.com/market?agent=great-for-analysis-coding-and-rubber-ducking)<br/><sup>By **[Base03](https://github.com/Base03)** on **2024-11-26**</sup> | Claude 减去 Reddit<br/>`技术` `分析` `软件` `人工智能` `研究` |
|
282
|
+
| [面试官助手](https://chat-preview.lobehub.com/market?agent=interviewer-assistant)<br/><sup>By **[xandertang](https://github.com/Dr-T)** on **2024-11-26**</sup> | Proficient in designing and evaluating interview questions for product managers, generating interview questions based on resume interpretation results.<br/>`面试` `简历` `招聘` `效率` |
|
283
|
+
|
284
|
+
> 📊 Total agents: [<kbd>**446**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
|
285
285
|
|
286
286
|
<!-- AGENT LIST -->
|
287
287
|
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {
|
4
|
+
"fixes": [
|
5
|
+
"Fix fallback behavior of default mode in AgentRuntime."
|
6
|
+
]
|
7
|
+
},
|
8
|
+
"date": "2024-11-27",
|
9
|
+
"version": "1.34.3"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"children": {
|
13
|
+
"improvements": [
|
14
|
+
"Improve thread i18n locale."
|
15
|
+
]
|
16
|
+
},
|
17
|
+
"date": "2024-11-27",
|
18
|
+
"version": "1.34.2"
|
19
|
+
},
|
2
20
|
{
|
3
21
|
"children": {
|
4
22
|
"fixes": [
|
package/locales/ar/thread.json
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "سيتم حذف هذا الموضوع الفرعي، ولن يمكن استعادته بعد الحذف، يرجى توخي الحذر."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "تضمين سياق الموضوع",
|
7
|
+
"title": "فتح موضوع فرعي جديد"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "الموضوعات الفرعية لا تدعم حاليًا تحميل الملفات/الصور، إذا كان لديك أي طلب، لا تتردد في ترك رسالة: <1>💬 قسم النقاش</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "Ще изтриете тази подтема. След изтриването ѝ няма да може да бъде възстановена, моля, бъдете внимателни."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Включи контекста на темата",
|
7
|
+
"title": "Създаване на нова подтема"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Подтемите в момента не поддържат качване на файлове/снимки. Ако имате нужда, моля, оставете съобщение: <1>💬 Дискусионен форум</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "Sie sind dabei, dieses Unterthema zu löschen. Nach dem Löschen kann es nicht wiederhergestellt werden. Bitte seien Sie vorsichtig."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Themenkontext einbeziehen",
|
7
|
+
"title": "Neues Unterthema eröffnen"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Unterthemen unterstützen derzeit keinen Datei-/Bilderupload. Bei Bedarf freuen wir uns über Nachrichten: <1>💬 Diskussionsbereich</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "You are about to delete this subtopic. Once deleted, it cannot be recovered. Please proceed with caution."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Include topic context",
|
7
|
+
"title": "Start a new subtopic"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Subtopics do not currently support file/image uploads. If you have any requests, feel free to leave a message: <1>💬 Discussion Area</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "Está a punto de eliminar este subtema. Una vez eliminado, no se podrá recuperar. Por favor, actúe con precaución."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Incluir contexto del tema",
|
7
|
+
"title": "Iniciar un nuevo subtema"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Los subtemas no admiten la carga de archivos/imágenes por el momento. Si tienes alguna necesidad, no dudes en dejar un comentario: <1>💬 Foro de discusión</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "شما در حال حذف این زیرموضوع هستید. پس از حذف، امکان بازیابی آن وجود نخواهد داشت. لطفاً با احتیاط عمل کنید."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "شامل زمینه موضوع",
|
7
|
+
"title": "باز کردن زیرموضوع جدید"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "زیرموضوعها فعلاً از بارگذاری فایل/عکس پشتیبانی نمیکنند، در صورت نیاز، خوشحال میشویم که پیام بگذارید: <1>💬 بحثخانه</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "Vous allez supprimer ce sous-sujet. Une fois supprimé, il ne pourra pas être récupéré. Veuillez agir avec prudence."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Inclure le contexte du sujet",
|
7
|
+
"title": "Ouvrir un nouveau sous-sujet"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Les sous-sujets ne prennent pas encore en charge le téléchargement de fichiers/images. Si besoin, n'hésitez pas à laisser un message : <1>💬 Forum de discussion</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "Stai per eliminare questo sottoargomento. Una volta eliminato, non potrà essere ripristinato. Ti preghiamo di procedere con cautela."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Includi il contesto della discussione",
|
7
|
+
"title": "Avvia un nuovo sottoargomento"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Attualmente i sottoargomenti non supportano il caricamento di file/immagini. Se hai bisogno, sentiti libero di lasciare un messaggio: <1>💬 Discussione</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "このスレッドを削除しようとしています。削除後は復元できませんので、慎重に操作してください。"
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "トピックのコンテキストを含める",
|
7
|
+
"title": "新しいサブトピックを開始する"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "サブトピックではファイルや画像のアップロードはサポートされていません。必要があれば、コメントを残してください:<1>💬 ディスカッションエリア</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "이 하위 주제를 삭제하려고 합니다. 삭제 후에는 복구할 수 없으니 신중하게 진행해 주시기 바랍니다."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "주제 맥락 포함",
|
7
|
+
"title": "새로운 하위 주제 시작하기"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "하위 주제는 현재 파일/이미지 업로드를 지원하지 않습니다. 필요하신 경우 댓글로 남겨주세요: <1>💬 토론 구역</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "U staat op het punt dit subonderwerp te verwijderen. Na verwijdering kan het niet worden hersteld, dus wees voorzichtig."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Inclusief onderwerpcontext",
|
7
|
+
"title": "Een nieuw subonderwerp starten"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Subonderwerpen ondersteunen momenteel geen bestand/afbeelding uploads. Als u behoefte heeft, laat dan gerust een bericht achter: <1>💬 Discussieforum</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "Zaraz usuniesz ten wątek, po usunięciu nie będzie można go przywrócić, proszę postępować ostrożnie."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Zawiera kontekst tematu",
|
7
|
+
"title": "Rozpocznij nowy podtemat"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Podtematy obecnie nie obsługują przesyłania plików/zdjęć. W przypadku potrzeby, zapraszamy do pozostawienia wiadomości: <1>💬 Dyskusja</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "Você está prestes a remover este subtópico. Após a exclusão, não será possível recuperá-lo. Por favor, proceda com cautela."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Incluir contexto do tópico",
|
7
|
+
"title": "Iniciar um novo subtópico"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Subtópicos atualmente não suportam upload de arquivos/imagens. Se houver necessidade, sinta-se à vontade para deixar uma mensagem: <1>💬 Área de Discussão</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "Вы собираетесь удалить эту под-тему. После удаления восстановить её будет невозможно, пожалуйста, действуйте осторожно."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Включить контекст темы",
|
7
|
+
"title": "Открыть новую подтему"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Подтемы в настоящее время не поддерживают загрузку файлов/изображений. Если у вас есть потребность, пожалуйста, оставьте сообщение: <1>💬 Обсуждение</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "Bu alt konuyu silmek üzeresiniz. Silindikten sonra geri alınamaz, lütfen dikkatli olun."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Konu bağlamını dahil et",
|
7
|
+
"title": "Yeni alt konu aç"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Alt konular şu anda dosya/görüntü yüklemeyi desteklemiyor, ihtiyaç duyarsanız lütfen mesaj bırakın: <1>💬 Tartışma Alanı</1>"
|
5
10
|
}
|
@@ -1,5 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"actions": {
|
3
3
|
"confirmRemoveThread": "Bạn sắp xóa chủ đề con này, sau khi xóa sẽ không thể khôi phục, xin hãy cẩn thận khi thực hiện."
|
4
|
-
}
|
4
|
+
},
|
5
|
+
"newPortalThread": {
|
6
|
+
"includeContext": "Bao gồm ngữ cảnh chủ đề",
|
7
|
+
"title": "Mở chủ đề con mới"
|
8
|
+
},
|
9
|
+
"notSupportMultiModals": "Chủ đề con hiện không hỗ trợ tải lên tệp/hình ảnh, nếu có nhu cầu, xin vui lòng để lại tin nhắn: <1>💬 Diễn đàn thảo luận</1>"
|
5
10
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.34.
|
3
|
+
"version": "1.34.3",
|
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",
|
@@ -3,6 +3,7 @@
|
|
3
3
|
import { Alert } from '@lobehub/ui';
|
4
4
|
import Link from 'next/link';
|
5
5
|
import { memo } from 'react';
|
6
|
+
import { Trans } from 'react-i18next';
|
6
7
|
|
7
8
|
import { ActionKeys } from '@/features/ChatInput/ActionBar/config';
|
8
9
|
import DesktopChatInput, { FooterRender } from '@/features/ChatInput/Desktop';
|
@@ -33,7 +34,7 @@ const Desktop = memo(() => {
|
|
33
34
|
banner
|
34
35
|
closable
|
35
36
|
message={
|
36
|
-
<
|
37
|
+
<Trans i18nKey={'notSupportMultiModals'} ns={'thread'}>
|
37
38
|
子话题暂不支持文件/图片上传,如有需求,欢迎留言:
|
38
39
|
<Link
|
39
40
|
href={'https://github.com/lobehub/lobe-chat/discussions/4717'}
|
@@ -41,7 +42,7 @@ const Desktop = memo(() => {
|
|
41
42
|
>
|
42
43
|
💬 讨论
|
43
44
|
</Link>
|
44
|
-
</
|
45
|
+
</Trans>
|
45
46
|
}
|
46
47
|
onClose={() => {
|
47
48
|
updateSystemStatus({ hideThreadLimitAlert: true });
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Icon } from '@lobehub/ui';
|
2
2
|
import { Checkbox, Typography } from 'antd';
|
3
3
|
import { GitBranch } from 'lucide-react';
|
4
|
+
import { useTranslation } from 'react-i18next';
|
4
5
|
import { Flexbox } from 'react-layout-kit';
|
5
6
|
|
6
7
|
import { useChatStore } from '@/store/chat';
|
@@ -9,6 +10,7 @@ import { oneLineEllipsis } from '@/styles';
|
|
9
10
|
import { ThreadType } from '@/types/topic';
|
10
11
|
|
11
12
|
const NewThreadHeader = () => {
|
13
|
+
const { t } = useTranslation('thread');
|
12
14
|
const [newThreadMode] = useChatStore((s) => [portalThreadSelectors.newThreadMode(s)]);
|
13
15
|
|
14
16
|
return (
|
@@ -16,7 +18,7 @@ const NewThreadHeader = () => {
|
|
16
18
|
<Flexbox align={'center'} gap={8} horizontal style={{ marginInlineStart: 8 }}>
|
17
19
|
<Icon icon={GitBranch} size={{ fontSize: 20 }} />
|
18
20
|
<Typography.Text className={oneLineEllipsis} style={{ fontSize: 16, fontWeight: 'bold' }}>
|
19
|
-
|
21
|
+
{t('newPortalThread.title')}
|
20
22
|
</Typography.Text>
|
21
23
|
<Checkbox
|
22
24
|
checked={newThreadMode === ThreadType.Continuation}
|
@@ -27,7 +29,7 @@ const NewThreadHeader = () => {
|
|
27
29
|
}}
|
28
30
|
style={{ marginInlineStart: 12 }}
|
29
31
|
>
|
30
|
-
|
32
|
+
{t('newPortalThread.includeContext')}
|
31
33
|
</Checkbox>
|
32
34
|
</Flexbox>
|
33
35
|
</Flexbox>
|
@@ -370,6 +370,28 @@ describe('initAgentRuntimeWithUserPayload method', () => {
|
|
370
370
|
expect(runtime['_runtime']).toBeInstanceOf(LobeWenxinAI);
|
371
371
|
});
|
372
372
|
|
373
|
+
it('OpenAI provider: without apikey with OPENAI_PROXY_URL', async () => {
|
374
|
+
process.env.OPENAI_PROXY_URL = 'https://proxy.example.com/v1';
|
375
|
+
|
376
|
+
const jwtPayload: JWTPayload = {};
|
377
|
+
const runtime = await initAgentRuntimeWithUserPayload(ModelProvider.OpenAI, jwtPayload);
|
378
|
+
expect(runtime['_runtime']).toBeInstanceOf(LobeOpenAI);
|
379
|
+
// 应返回 OPENAI_PROXY_URL
|
380
|
+
expect(runtime['_runtime'].baseURL).toBe('https://proxy.example.com/v1');
|
381
|
+
});
|
382
|
+
|
383
|
+
it('Qwen AI provider: without apiKey and endpoint with OPENAI_PROXY_URL', async () => {
|
384
|
+
process.env.OPENAI_PROXY_URL = 'https://proxy.example.com/v1';
|
385
|
+
|
386
|
+
const jwtPayload: JWTPayload = {};
|
387
|
+
const runtime = await initAgentRuntimeWithUserPayload(ModelProvider.Qwen, jwtPayload);
|
388
|
+
|
389
|
+
// 假设 LobeQwenAI 是 Qwen 提供者的实现类
|
390
|
+
expect(runtime['_runtime']).toBeInstanceOf(LobeQwenAI);
|
391
|
+
// endpoint 不存在,应返回 DEFAULT_BASE_URL
|
392
|
+
expect(runtime['_runtime'].baseURL).toBe('https://dashscope.aliyuncs.com/compatible-mode/v1');
|
393
|
+
});
|
394
|
+
|
373
395
|
it('Unknown Provider', async () => {
|
374
396
|
const jwtPayload = {};
|
375
397
|
const runtime = await initAgentRuntimeWithUserPayload('unknown', jwtPayload);
|
@@ -33,7 +33,7 @@ const getLlmOptionsFromPayload = (provider: string, payload: JWTPayload) => {
|
|
33
33
|
default: {
|
34
34
|
let upperProvider = provider.toUpperCase();
|
35
35
|
|
36
|
-
if (!
|
36
|
+
if (!( `${upperProvider}_API_KEY` in llmConfig)) {
|
37
37
|
upperProvider = ModelProvider.OpenAI.toUpperCase(); // Use OpenAI options as default
|
38
38
|
}
|
39
39
|
|