diff --git a/locales/ar/plugin.json b/locales/ar/plugin.json
index 6d83e66fc3d7..abb5e849e477 100644
--- a/locales/ar/plugin.json
+++ b/locales/ar/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "بعد ضبط عنوان سوق الإضافات، يمكن استخدام سوق الإضافات المخصص",
"title": "ضبط سوق الإضافات"
},
- "showInPortal": "يرجى الاطلاع على التفاصيل في النافذة المنبثقة",
+ "showInPortal": "يرجى الاطلاع على التفاصيل في مساحة العمل",
"store": {
"actions": {
"confirmUninstall": "سيتم إلغاء تثبيت الإضافة، وسيتم مسح تكوين الإضافة، يرجى تأكيد العملية",
diff --git a/locales/ar/portal.json b/locales/ar/portal.json
index 7b15631ece32..905d776ad0df 100644
--- a/locales/ar/portal.json
+++ b/locales/ar/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "تلخيص من قبل المساعد",
+ "Artifacts": "القطع الأثرية",
+ "actions": {
+ "genAiMessage": "إنشاء رسالة مساعد ذكاء اصطناعي",
+ "summary": "ملخص",
+ "summaryTooltip": "ملخص للمحتوى الحالي"
+ },
+ "emptyArtifactList": "قائمة القطع الأثرية الحالية فارغة، يرجى استخدام الإضافات في الجلسة ومن ثم التحقق مرة أخرى",
"title": "نافذة موسعة"
}
diff --git a/locales/bg-BG/plugin.json b/locales/bg-BG/plugin.json
index 11e4f2bdfdf7..69857a0ec12d 100644
--- a/locales/bg-BG/plugin.json
+++ b/locales/bg-BG/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "След като конфигурирате адреса на пазара на плъгини, можете да използвате персонализиран пазар на плъгини",
"title": "Конфигуриране на пазара на плъгини"
},
- "showInPortal": "Моля, вижте подробностите в разширеното прозорец",
+ "showInPortal": "Моля, вижте подробностите в работното пространство",
"store": {
"actions": {
"confirmUninstall": "Плъгинът е на път да бъде деинсталиран. След деинсталирането конфигурацията на плъгина ще бъде изчистена. Моля, потвърдете операцията си.",
diff --git a/locales/bg-BG/portal.json b/locales/bg-BG/portal.json
index 04c0d156998c..2a266ad53612 100644
--- a/locales/bg-BG/portal.json
+++ b/locales/bg-BG/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Сумиране от помощник",
+ "Artifacts": "Артефакти",
+ "actions": {
+ "genAiMessage": "Създаване на съобщение на помощника",
+ "summary": "Обобщение",
+ "summaryTooltip": "Обобщение на текущото съдържание"
+ },
+ "emptyArtifactList": "Списъкът с текущите артефакти е празен. Моля, използвайте добавки в разговора и след това проверете отново.",
"title": "Разширено прозорец"
}
diff --git a/locales/de-DE/plugin.json b/locales/de-DE/plugin.json
index c14c0906704d..1a7d21f22269 100644
--- a/locales/de-DE/plugin.json
+++ b/locales/de-DE/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "Nachdem Sie die Adresse des Plugin-Marktes konfiguriert haben, können Sie den benutzerdefinierten Plugin-Markt verwenden.",
"title": "Plugin-Markteinstellungen"
},
- "showInPortal": "Bitte überprüfen Sie die Details im Erweiterungsfenster",
+ "showInPortal": "Bitte überprüfen Sie die Details im Portal",
"store": {
"actions": {
"confirmUninstall": "Das Plugin wird deinstalliert und alle Konfigurationen werden gelöscht. Bitte bestätigen Sie Ihre Aktion.",
diff --git a/locales/de-DE/portal.json b/locales/de-DE/portal.json
index db196397ae4d..b41dd9a076a4 100644
--- a/locales/de-DE/portal.json
+++ b/locales/de-DE/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Lassen Sie den Assistenten zusammenfassen",
+ "Artifacts": "Artefakte",
+ "actions": {
+ "genAiMessage": "Assistenten-Nachricht erstellen",
+ "summary": "Zusammenfassung",
+ "summaryTooltip": "Zusammenfassung des aktuellen Inhalts"
+ },
+ "emptyArtifactList": "Die Liste der Artefakte ist derzeit leer. Bitte verwenden Sie Plugins in der Sitzung und überprüfen Sie sie erneut.",
"title": "Erweiterungsfenster"
}
diff --git a/locales/en-US/plugin.json b/locales/en-US/plugin.json
index 4016b29cfca4..0693a7349e79 100644
--- a/locales/en-US/plugin.json
+++ b/locales/en-US/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "After configuring the address of the plugin marketplace, you can use a custom plugin marketplace",
"title": "Configure Plugin Marketplace"
},
- "showInPortal": "Please view details in the extension window",
+ "showInPortal": "Please check the details in the Portal view",
"store": {
"actions": {
"confirmUninstall": "The plugin is about to be uninstalled. After uninstalling, the plugin configuration will be cleared. Please confirm your operation.",
diff --git a/locales/en-US/portal.json b/locales/en-US/portal.json
index 74bfd31eda4c..bde53650ef41 100644
--- a/locales/en-US/portal.json
+++ b/locales/en-US/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Let the assistant summarize",
- "title": "Expand Window"
+ "Artifacts": "Artifacts",
+ "actions": {
+ "genAiMessage": "Generate Assistant Message",
+ "summary": "Summary",
+ "summaryTooltip": "Summarize current content"
+ },
+ "emptyArtifactList": "The current Artifacts list is empty. Please use plugins in the session as needed before viewing.",
+ "title": "Portal View"
}
diff --git a/locales/es-ES/plugin.json b/locales/es-ES/plugin.json
index b4d50ac3fdca..76acaa001ba8 100644
--- a/locales/es-ES/plugin.json
+++ b/locales/es-ES/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "Después de configurar la dirección del mercado de complementos, puede utilizar un mercado personalizado de complementos.",
"title": "Configuración del mercado de complementos"
},
- "showInPortal": "Por favor, consulta los detalles en la ventana de expansión",
+ "showInPortal": "Por favor, consulta los detalles en el portal de trabajo",
"store": {
"actions": {
"confirmUninstall": "Está a punto de desinstalar este complemento. Se eliminará la configuración del complemento. Confirme su acción.",
diff --git a/locales/es-ES/portal.json b/locales/es-ES/portal.json
index bfdeae5e973d..3494eef39e01 100644
--- a/locales/es-ES/portal.json
+++ b/locales/es-ES/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Resumen del asistente",
+ "Artifacts": "Artefactos",
+ "actions": {
+ "genAiMessage": "Crear mensaje de IA",
+ "summary": "Resumen",
+ "summaryTooltip": "Resumir el contenido actual"
+ },
+ "emptyArtifactList": "La lista de Artefactos actual está vacía. Por favor, utilice los complementos en la conversación y vuelva a intentarlo.",
"title": "Ventana de expansión"
}
diff --git a/locales/fr-FR/plugin.json b/locales/fr-FR/plugin.json
index 1caf01ab7e2b..4b5e837b1ee2 100644
--- a/locales/fr-FR/plugin.json
+++ b/locales/fr-FR/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "Une fois l'adresse du marché des plugins configurée, vous pourrez utiliser un marché de plugins personnalisé.",
"title": "Paramètres du marché des plugins"
},
- "showInPortal": "Veuillez consulter les détails dans la fenêtre d'extension",
+ "showInPortal": "Veuillez consulter les détails dans l'espace de travail",
"store": {
"actions": {
"confirmUninstall": "Vous êtes sur le point de désinstaller ce plugin. Une fois désinstallé, sa configuration sera effacée. Veuillez confirmer votre action.",
diff --git a/locales/fr-FR/portal.json b/locales/fr-FR/portal.json
index d7d8ba4a0e8b..7051729ca336 100644
--- a/locales/fr-FR/portal.json
+++ b/locales/fr-FR/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Faire un résumé avec l'assistant",
+ "Artifacts": "Artifacts",
+ "actions": {
+ "genAiMessage": "Créer un message d'assistant",
+ "summary": "Résumé",
+ "summaryTooltip": "Résumé du contenu actuel"
+ },
+ "emptyArtifactList": "La liste des Artifacts est actuellement vide. Veuillez utiliser les plugins dans la conversation avant de consulter à nouveau.",
"title": "Fenêtre d'extension"
}
diff --git a/locales/it-IT/plugin.json b/locales/it-IT/plugin.json
index 91ee0b5da7ab..14c334e65312 100644
--- a/locales/it-IT/plugin.json
+++ b/locales/it-IT/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "Dopo aver configurato l'indirizzo del mercato dei plugin, è possibile utilizzare un mercato dei plugin personalizzato",
"title": "Impostazioni del mercato dei plugin"
},
- "showInPortal": "Si prega di visualizzare i dettagli nella finestra di estensione",
+ "showInPortal": "Si prega di visualizzare i dettagli nell'area di lavoro",
"store": {
"actions": {
"confirmUninstall": "Stai per disinstallare questo plugin. La disinstallazione cancellerà la configurazione del plugin. Conferma l'operazione",
diff --git a/locales/it-IT/portal.json b/locales/it-IT/portal.json
index 1611c553509f..334c534d4a15 100644
--- a/locales/it-IT/portal.json
+++ b/locales/it-IT/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Riepilogo assistente",
+ "Artifacts": "Artefatti",
+ "actions": {
+ "genAiMessage": "Genera messaggio AI",
+ "summary": "Sommario",
+ "summaryTooltip": "Sommario del contenuto attuale"
+ },
+ "emptyArtifactList": "La lista degli Artefatti attuale è vuota, si prega di utilizzare i plugin necessari durante la sessione e poi controllare di nuovo",
"title": "Finestra di espansione"
}
diff --git a/locales/ja-JP/plugin.json b/locales/ja-JP/plugin.json
index c0f79b26c3a9..d7160881b41e 100644
--- a/locales/ja-JP/plugin.json
+++ b/locales/ja-JP/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "プラグインマーケットのアドレスを設定すると、カスタムのプラグインマーケットを使用できます",
"title": "プラグインマーケットの設定"
},
- "showInPortal": "詳細は拡張ウィンドウで表示してください",
+ "showInPortal": "詳細はワークスペースで表示してください",
"store": {
"actions": {
"confirmUninstall": "このプラグインをアンインストールします。アンインストール後、プラグインの設定がクリアされます。操作を確認してください。",
diff --git a/locales/ja-JP/portal.json b/locales/ja-JP/portal.json
index 7b526ccce839..e9ed72c5ef2d 100644
--- a/locales/ja-JP/portal.json
+++ b/locales/ja-JP/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "アシスタントに要約させる",
+ "Artifacts": "アーティファクト",
+ "actions": {
+ "genAiMessage": "AIメッセージを生成",
+ "summary": "サマリー",
+ "summaryTooltip": "現在の内容を要約"
+ },
+ "emptyArtifactList": "現在、アーティファクトリストは空です。プラグインを使用してセッション中に追加してください。",
"title": "拡張ウィンドウ"
}
diff --git a/locales/ko-KR/plugin.json b/locales/ko-KR/plugin.json
index 458cb451ec50..5dc59a57a866 100644
--- a/locales/ko-KR/plugin.json
+++ b/locales/ko-KR/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "플러그인 마켓의 주소를 구성하면 사용자 정의 플러그인 마켓을 사용할 수 있습니다.",
"title": "플러그인 마켓 설정"
},
- "showInPortal": "확장 창에서 자세히 보기",
+ "showInPortal": "작업 영역에서 자세히 확인하세요",
"store": {
"actions": {
"confirmUninstall": "이 플러그인을 제거하려고 합니다. 제거하면 플러그인 구성이 지워지므로 작업을 확인하세요.",
diff --git a/locales/ko-KR/portal.json b/locales/ko-KR/portal.json
index c068a5c0160d..59eb5a55f28e 100644
--- a/locales/ko-KR/portal.json
+++ b/locales/ko-KR/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "어시스턴트 요약",
+ "Artifacts": "아티팩트",
+ "actions": {
+ "genAiMessage": "AI 메시지 생성",
+ "summary": "요약",
+ "summaryTooltip": "현재 콘텐츠를 요약합니다"
+ },
+ "emptyArtifactList": "현재 아티팩트 목록이 비어 있습니다. 플러그인을 사용한 후에 다시 확인해주세요.",
"title": "확장 창"
}
diff --git a/locales/nl-NL/plugin.json b/locales/nl-NL/plugin.json
index 2b64379a285c..82e7944980b5 100644
--- a/locales/nl-NL/plugin.json
+++ b/locales/nl-NL/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "Na het instellen van de marktlocatie voor plugins, kunt u een aangepaste pluginmarkt gebruiken.",
"title": "Instellingen voor pluginmarkt"
},
- "showInPortal": "Gelieve de details te bekijken in het uitbreidingsvenster",
+ "showInPortal": "Gelieve de details in het portaal te bekijken",
"store": {
"actions": {
"confirmUninstall": "Deze plugin wordt binnenkort verwijderd. Na verwijdering worden de configuraties gewist. Weet u zeker dat u door wilt gaan?",
diff --git a/locales/nl-NL/portal.json b/locales/nl-NL/portal.json
index dc162c634593..8f25d7c67e5c 100644
--- a/locales/nl-NL/portal.json
+++ b/locales/nl-NL/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Laat de assistent samenvatten",
+ "Artifacts": "Artifacts",
+ "actions": {
+ "genAiMessage": "Creëer assistentbericht",
+ "summary": "Samenvatting",
+ "summaryTooltip": "Samenvatting van de huidige inhoud"
+ },
+ "emptyArtifactList": "De huidige lijst met Artifacts is leeg. Gebruik plugins in de sessie en bekijk deze later opnieuw.",
"title": "Uitbreidingsvenster"
}
diff --git a/locales/pl-PL/plugin.json b/locales/pl-PL/plugin.json
index 1e72d29056f4..10fd2c9b1aa6 100644
--- a/locales/pl-PL/plugin.json
+++ b/locales/pl-PL/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "Po skonfigurowaniu adresu sklepu wtyczek możesz korzystać z niestandardowego sklepu wtyczek",
"title": "Skonfiguruj sklep wtyczek"
},
- "showInPortal": "Proszę sprawdzić szczegóły w oknie rozszerzenia",
+ "showInPortal": "Proszę sprawdzić szczegóły w obszarze roboczym",
"store": {
"actions": {
"confirmUninstall": "Wtyczka zostanie odinstalowana. Po odinstalowaniu konfiguracja wtyczki zostanie wyczyszczona. Potwierdź swoje działanie.",
diff --git a/locales/pl-PL/portal.json b/locales/pl-PL/portal.json
index 4e4d83c816b0..e0b06f058999 100644
--- a/locales/pl-PL/portal.json
+++ b/locales/pl-PL/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Podsumowanie przez asystenta",
+ "Artifacts": "Artefakty",
+ "actions": {
+ "genAiMessage": "Tworzenie wiadomości AI",
+ "summary": "Podsumowanie",
+ "summaryTooltip": "Podsumowanie bieżącej zawartości"
+ },
+ "emptyArtifactList": "Obecna lista Artefaktów jest pusta. Proszę użyć wtyczek w trakcie sesji, a następnie sprawdzić ponownie.",
"title": "Okno rozszerzenia"
}
diff --git a/locales/pt-BR/plugin.json b/locales/pt-BR/plugin.json
index 2ba6201115fd..1ef05b4d1da3 100644
--- a/locales/pt-BR/plugin.json
+++ b/locales/pt-BR/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "Após configurar o endereço do mercado de plugins, você poderá usar um mercado personalizado de plugins.",
"title": "Configurações do Mercado de Plugins"
},
- "showInPortal": "Por favor, veja os detalhes na janela de extensão",
+ "showInPortal": "Por favor, veja os detalhes na área de trabalho",
"store": {
"actions": {
"confirmUninstall": "Você está prestes a desinstalar este plugin. A desinstalação irá limpar a configuração do plugin. Confirme a operação.",
diff --git a/locales/pt-BR/portal.json b/locales/pt-BR/portal.json
index 8f87a03abe89..fa2d3cc87d45 100644
--- a/locales/pt-BR/portal.json
+++ b/locales/pt-BR/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Permita que o assistente resuma",
+ "Artifacts": "Artefatos",
+ "actions": {
+ "genAiMessage": "Gerar mensagem de IA",
+ "summary": "Resumo",
+ "summaryTooltip": "Resumir o conteúdo atual"
+ },
+ "emptyArtifactList": "A lista de Artefatos atual está vazia. Por favor, use os plugins conforme necessário durante a sessão e depois verifique novamente.",
"title": "Janela de Expansão"
}
diff --git a/locales/ru-RU/plugin.json b/locales/ru-RU/plugin.json
index 2c42a22f5e65..080442e89d2a 100644
--- a/locales/ru-RU/plugin.json
+++ b/locales/ru-RU/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "После настройки адреса магазина плагинов можно использовать пользовательский магазин",
"title": "Настройки магазина плагинов"
},
- "showInPortal": "Просмотрите подробности во всплывающем окне",
+ "showInPortal": "Просмотрите подробности в рабочей области",
"store": {
"actions": {
"confirmUninstall": "Вы собираетесь удалить этот плагин. После удаления его настройки будут утрачены. Вы уверены, что хотите продолжить?",
diff --git a/locales/ru-RU/portal.json b/locales/ru-RU/portal.json
index 56487a9cbb25..f658536dc8af 100644
--- a/locales/ru-RU/portal.json
+++ b/locales/ru-RU/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Попросите помощника сделать сводку",
+ "Artifacts": "Артефакты",
+ "actions": {
+ "genAiMessage": "Создать сообщение помощника",
+ "summary": "Сводка",
+ "summaryTooltip": "Сводка текущего содержимого"
+ },
+ "emptyArtifactList": "Список текущих артефактов пуст. Пожалуйста, используйте плагины во время сеанса и затем просмотрите.",
"title": "Расширенное окно"
}
diff --git a/locales/tr-TR/plugin.json b/locales/tr-TR/plugin.json
index 4f9dff97991a..2f113c8f0a69 100644
--- a/locales/tr-TR/plugin.json
+++ b/locales/tr-TR/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "Eklenti pazarı adresini yapılandırdıktan sonra, özel bir eklenti pazarı kullanabilirsiniz.",
"title": "Eklenti Pazarı Ayarla"
},
- "showInPortal": "Detayları genişletme penceresinde görüntüleyin",
+ "showInPortal": "Detayları çalışma alanında görüntüleyin",
"store": {
"actions": {
"confirmUninstall": "Bu eklentiyi kaldırmak üzeresiniz, kaldırdıktan sonra eklenti yapılandırması temizlenecektir, işleminizi onaylayın",
diff --git a/locales/tr-TR/portal.json b/locales/tr-TR/portal.json
index a97e6e2e2498..7b0a38b31e94 100644
--- a/locales/tr-TR/portal.json
+++ b/locales/tr-TR/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Asistanın özetlemesine izin ver",
+ "Artifacts": "Artefaktlar",
+ "actions": {
+ "genAiMessage": "Yapay Zeka Mesajı Oluştur",
+ "summary": "Özet",
+ "summaryTooltip": "Mevcut içeriği özetle"
+ },
+ "emptyArtifactList": "Mevcut Artefakt listesi boş, lütfen eklentileri kullanarak oturumda gerektiğinde göz atın",
"title": "Genişletme Penceresi"
}
diff --git a/locales/vi-VN/plugin.json b/locales/vi-VN/plugin.json
index fffb33a9892c..a11a993334d4 100644
--- a/locales/vi-VN/plugin.json
+++ b/locales/vi-VN/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "Sau khi cấu hình địa chỉ thị trường plugin, bạn có thể sử dụng thị trường plugin tùy chỉnh",
"title": "Cài đặt thị trường plugin"
},
- "showInPortal": "Vui lòng xem chi tiết trong cửa sổ mở rộng",
+ "showInPortal": "Vui lòng xem chi tiết trong khu vực làm việc",
"store": {
"actions": {
"confirmUninstall": "Sắp gỡ bỏ plugin này, sau khi gỡ bỏ sẽ xóa cấu hình của plugin này, vui lòng xác nhận hành động của bạn",
diff --git a/locales/vi-VN/portal.json b/locales/vi-VN/portal.json
index 5a30f2d606c8..49f66d0431c3 100644
--- a/locales/vi-VN/portal.json
+++ b/locales/vi-VN/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "Tóm tắt bởi trợ lý",
+ "Artifacts": "Tác Phẩm",
+ "actions": {
+ "genAiMessage": "Tạo tin nhắn trợ giúp",
+ "summary": "Tóm tắt",
+ "summaryTooltip": "Tóm tắt nội dung hiện tại"
+ },
+ "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",
"title": "Cửa sổ mở rộng"
}
diff --git a/locales/zh-CN/plugin.json b/locales/zh-CN/plugin.json
index e3597860fb42..4b8939ca18de 100644
--- a/locales/zh-CN/plugin.json
+++ b/locales/zh-CN/plugin.json
@@ -139,7 +139,7 @@
"modalDesc": "配置插件市场的地址后,可以使用自定义的插件市场",
"title": "设置插件市场"
},
- "showInPortal": "请在扩展窗中查看详情",
+ "showInPortal": "请在工作区中查看详情",
"store": {
"actions": {
"confirmUninstall": "即将卸载该插件,卸载后将清除该插件配置,请确认你的操作",
diff --git a/locales/zh-CN/portal.json b/locales/zh-CN/portal.json
index 6fec7009762e..f9d791266bbf 100644
--- a/locales/zh-CN/portal.json
+++ b/locales/zh-CN/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "让助手总结",
- "title": "扩展窗"
+ "Artifacts": "Artifacts",
+ "actions": {
+ "genAiMessage": "创建助手消息",
+ "summary": "总结",
+ "summaryTooltip": "总结当前内容"
+ },
+ "emptyArtifactList": "当前 Artifacts 列表为空,请在会话中按需使用插件后再查看",
+ "title": "工作区"
}
diff --git a/locales/zh-TW/portal.json b/locales/zh-TW/portal.json
index 0eb72cbc1b3b..de238426cae6 100644
--- a/locales/zh-TW/portal.json
+++ b/locales/zh-TW/portal.json
@@ -1,4 +1,10 @@
{
- "aiSummary": "讓助手總結",
+ "Artifacts": "文物",
+ "actions": {
+ "genAiMessage": "生成助手訊息",
+ "summary": "摘要",
+ "summaryTooltip": "總結目前內容"
+ },
+ "emptyArtifactList": "當前文物列表為空,請在會話中按需使用插件後再查看",
"title": "擴展視窗"
}
diff --git a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolUI/Footer.tsx b/src/app/(main)/chat/(workspace)/@portal/features/ArtifactUI/Footer.tsx
similarity index 50%
rename from src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolUI/Footer.tsx
rename to src/app/(main)/chat/(workspace)/@portal/features/ArtifactUI/Footer.tsx
index 176888802d92..218a7efba90b 100644
--- a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolUI/Footer.tsx
+++ b/src/app/(main)/chat/(workspace)/@portal/features/ArtifactUI/Footer.tsx
@@ -1,6 +1,6 @@
-import { Icon } from '@lobehub/ui';
+import { ActionIcon, Icon } from '@lobehub/ui';
import { Button } from 'antd';
-import { LucideBotMessageSquare } from 'lucide-react';
+import { LucideBotMessageSquare, LucideNotepadText } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { Flexbox } from 'react-layout-kit';
@@ -8,15 +8,16 @@ import { useChatStore } from '@/store/chat';
import { chatPortalSelectors, chatSelectors } from '@/store/chat/selectors';
const Footer = () => {
- const [messageId, triggerAIMessage, isAIGenerating] = useChatStore((s) => [
- chatPortalSelectors.toolUIMessageId(s),
- s.triggerAIMessage,
+ const [messageId, isAIGenerating, triggerAIMessage, summaryPluginContent] = useChatStore((s) => [
+ chatPortalSelectors.artifactMessageId(s),
chatSelectors.isAIGenerating(s),
+ s.triggerAIMessage,
+ s.summaryPluginContent,
]);
const { t } = useTranslation('portal');
return (
-
+
}
loading={isAIGenerating}
@@ -24,8 +25,18 @@ const Footer = () => {
triggerAIMessage({ parentId: messageId });
}}
>
- {t('aiSummary')}
+ {t('actions.genAiMessage')}
+ {
+ if (!messageId) return;
+
+ summaryPluginContent(messageId);
+ }}
+ title={'actions.summaryTooltip'}
+ />
);
};
diff --git a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolUI/ToolRender.tsx b/src/app/(main)/chat/(workspace)/@portal/features/ArtifactUI/ToolRender.tsx
similarity index 89%
rename from src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolUI/ToolRender.tsx
rename to src/app/(main)/chat/(workspace)/@portal/features/ArtifactUI/ToolRender.tsx
index 4985b3524ebd..68abb1b944ee 100644
--- a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolUI/ToolRender.tsx
+++ b/src/app/(main)/chat/(workspace)/@portal/features/ArtifactUI/ToolRender.tsx
@@ -1,4 +1,5 @@
import isEqual from 'fast-deep-equal';
+import { memo } from 'react';
import PluginRender from '@/features/PluginsUI/Render';
import { useChatStore } from '@/store/chat';
@@ -6,8 +7,8 @@ import { chatPortalSelectors, chatSelectors } from '@/store/chat/selectors';
import { BuiltinToolsPortals } from '@/tools/portals';
import { safeParseJSON } from '@/utils/safeParseJSON';
-const ToolRender = () => {
- const messageId = useChatStore(chatPortalSelectors.toolUIMessageId);
+const ToolRender = memo(() => {
+ const messageId = useChatStore(chatPortalSelectors.artifactMessageId);
const message = useChatStore(chatSelectors.getMessageById(messageId || ''), isEqual);
// make sure the message and id is valid
@@ -45,6 +46,6 @@ const ToolRender = () => {
state={pluginState}
/>
);
-};
+});
export default ToolRender;
diff --git a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolUI/index.tsx b/src/app/(main)/chat/(workspace)/@portal/features/ArtifactUI/index.tsx
similarity index 86%
rename from src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolUI/index.tsx
rename to src/app/(main)/chat/(workspace)/@portal/features/ArtifactUI/index.tsx
index 9453983aa1ef..c9f5410d6ff1 100644
--- a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolUI/index.tsx
+++ b/src/app/(main)/chat/(workspace)/@portal/features/ArtifactUI/index.tsx
@@ -9,7 +9,7 @@ import Footer from './Footer';
import ToolRender from './ToolRender';
const ToolUI = () => {
- const messageId = useChatStore(chatPortalSelectors.toolUIMessageId);
+ const messageId = useChatStore(chatPortalSelectors.artifactMessageId);
const message = useChatStore(chatSelectors.getMessageById(messageId || ''), isEqual);
// make sure the message and id is valid
@@ -26,7 +26,7 @@ const ToolUI = () => {
return (
<>
-
+
diff --git a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolList/Item/index.tsx b/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/ArtifactList/Item/index.tsx
similarity index 93%
rename from src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolList/Item/index.tsx
rename to src/app/(main)/chat/(workspace)/@portal/features/Artifacts/ArtifactList/Item/index.tsx
index 5543c8ef10e6..afe0e86cda73 100644
--- a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolList/Item/index.tsx
+++ b/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/ArtifactList/Item/index.tsx
@@ -15,13 +15,13 @@ import { ChatPluginPayload } from '@/types/message';
import { useStyles } from './style';
-export interface InspectorProps {
+export interface ArtifactItemProps {
identifier?: string;
messageId: string;
payload?: ChatPluginPayload;
}
-const Inspector = memo(({ payload, messageId, identifier = 'unknown' }) => {
+const ArtifactItem = memo(({ payload, messageId, identifier = 'unknown' }) => {
const { t } = useTranslation('plugin');
const { styles, cx } = useStyles();
@@ -71,4 +71,4 @@ const Inspector = memo(({ payload, messageId, identifier = 'unkn
);
});
-export default Inspector;
+export default ArtifactItem;
diff --git a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolList/Item/style.ts b/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/ArtifactList/Item/style.ts
similarity index 95%
rename from src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolList/Item/style.ts
rename to src/app/(main)/chat/(workspace)/@portal/features/Artifacts/ArtifactList/Item/style.ts
index 7f0ce37a8458..702a5b59de18 100644
--- a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolList/Item/style.ts
+++ b/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/ArtifactList/Item/style.ts
@@ -11,7 +11,7 @@ export const useStyles = createStyles(({ css, token }) => ({
color: ${token.colorText};
- background: ${token.colorBgContainer};
+ background: ${token.colorBgElevated};
border-radius: 8px;
&:hover {
diff --git a/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/ArtifactList/index.tsx b/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/ArtifactList/index.tsx
new file mode 100644
index 000000000000..e0abea04090f
--- /dev/null
+++ b/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/ArtifactList/index.tsx
@@ -0,0 +1,61 @@
+import { Avatar, Icon } from '@lobehub/ui';
+import { Skeleton, Typography } from 'antd';
+import { useTheme } from 'antd-style';
+import isEqual from 'fast-deep-equal';
+import { Origami } from 'lucide-react';
+import { useTranslation } from 'react-i18next';
+import { Center, Flexbox } from 'react-layout-kit';
+import Balancer from 'react-wrap-balancer';
+
+import { useChatStore } from '@/store/chat';
+import { chatSelectors } from '@/store/chat/selectors';
+
+import ArtifactItem from './Item';
+
+const ArtifactList = () => {
+ const { t } = useTranslation('portal');
+ const messages = useChatStore(chatSelectors.currentToolMessages, isEqual);
+ const isCurrentChatLoaded = useChatStore(chatSelectors.isCurrentChatLoaded);
+
+ const theme = useTheme();
+ return !isCurrentChatLoaded ? (
+
+ {[1, 1, 1, 1, 1, 1].map((key, index) => (
+
+ ))}
+
+ ) : messages.length === 0 ? (
+
+ }
+ background={theme.colorFillTertiary}
+ size={48}
+ />
+
+ {t('emptyArtifactList')}
+
+
+ ) : (
+
+ {messages.map((m) => (
+
+ ))}
+
+ );
+};
+
+export default ArtifactList;
diff --git a/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/index.tsx b/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/index.tsx
new file mode 100644
index 000000000000..2fdf43c47469
--- /dev/null
+++ b/src/app/(main)/chat/(workspace)/@portal/features/Artifacts/index.tsx
@@ -0,0 +1,21 @@
+import { Typography } from 'antd';
+import { memo } from 'react';
+import { useTranslation } from 'react-i18next';
+import { Flexbox } from 'react-layout-kit';
+
+import ToolList from './ArtifactList';
+
+export const Artifacts = memo(() => {
+ const { t } = useTranslation('portal');
+
+ return (
+
+
+ {t('Artifacts')}
+
+
+
+ );
+});
+
+export default Artifacts;
diff --git a/src/app/(main)/chat/(workspace)/@portal/features/Header.tsx b/src/app/(main)/chat/(workspace)/@portal/features/Header.tsx
index 5f7a39cfe92e..381e6478315d 100644
--- a/src/app/(main)/chat/(workspace)/@portal/features/Header.tsx
+++ b/src/app/(main)/chat/(workspace)/@portal/features/Header.tsx
@@ -17,7 +17,7 @@ import { toolSelectors } from '@/store/tool/selectors';
const Header = memo(() => {
const [showToolUI, toggleInspector, closeToolUI, toolUIIdentifier = ''] = useChatStore((s) => [
- chatPortalSelectors.showToolUI(s),
+ chatPortalSelectors.showArtifactUI(s),
s.toggleDock,
s.closeToolUI,
chatPortalSelectors.toolUIIdentifier(s),
diff --git a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolList/index.tsx b/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolList/index.tsx
deleted file mode 100644
index b824148b5082..000000000000
--- a/src/app/(main)/chat/(workspace)/@portal/features/Tools/ToolList/index.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import { Skeleton } from 'antd';
-import isEqual from 'fast-deep-equal';
-import { Flexbox } from 'react-layout-kit';
-
-import { useChatStore } from '@/store/chat';
-import { chatSelectors } from '@/store/chat/selectors';
-
-import ToolItem from './Item';
-
-const ToolList = () => {
- const messages = useChatStore(chatSelectors.currentToolMessages, isEqual);
- const isCurrentChatLoaded = useChatStore(chatSelectors.isCurrentChatLoaded);
-
- return !isCurrentChatLoaded ? (
-
- {[1, 1, 1, 1, 1, 1].map((key, index) => (
-
- ))}
-
- ) : (
-
- {messages.map((m) => (
-
- ))}
-
- );
-};
-
-export default ToolList;
diff --git a/src/app/(main)/chat/(workspace)/@portal/index.tsx b/src/app/(main)/chat/(workspace)/@portal/index.tsx
index 19d9b2fee1b8..e8dd9619c1b3 100644
--- a/src/app/(main)/chat/(workspace)/@portal/index.tsx
+++ b/src/app/(main)/chat/(workspace)/@portal/index.tsx
@@ -6,13 +6,19 @@ import { Flexbox } from 'react-layout-kit';
import { useChatStore } from '@/store/chat';
import { chatPortalSelectors } from '@/store/chat/selectors';
-import ToolList from './features/Tools/ToolList';
-import ToolUI from './features/Tools/ToolUI';
+import ToolUI from './features/ArtifactUI';
+import Artifacts from './features/Artifacts';
-const Inspector = memo(() => {
- const showToolUI = useChatStore(chatPortalSelectors.showToolUI);
+const PortalView = memo(() => {
+ const showToolUI = useChatStore(chatPortalSelectors.showArtifactUI);
- return {showToolUI ? : };
+ if (showToolUI) return ;
+
+ return (
+
+
+
+ );
});
-export default Inspector;
+export default PortalView;
diff --git a/src/app/(main)/chat/(workspace)/_layout/Desktop/Portal.tsx b/src/app/(main)/chat/(workspace)/_layout/Desktop/Portal.tsx
index 3e875fe246be..8e337d10bafc 100644
--- a/src/app/(main)/chat/(workspace)/_layout/Desktop/Portal.tsx
+++ b/src/app/(main)/chat/(workspace)/_layout/Desktop/Portal.tsx
@@ -2,6 +2,7 @@
import { DraggablePanel, DraggablePanelContainer } from '@lobehub/ui';
import { createStyles, useResponsive } from 'antd-style';
+import { rgba } from 'polished';
import { PropsWithChildren, memo } from 'react';
import { Flexbox } from 'react-layout-kit';
@@ -10,7 +11,7 @@ import { CHAT_DOCK_TOOL_UI_WIDTH, CHAT_DOCK_WIDTH, MAX_WIDTH } from '@/const/lay
import { useChatStore } from '@/store/chat';
import { chatPortalSelectors } from '@/store/chat/slices/portal/selectors';
-const useStyles = createStyles(({ css, token }) => ({
+const useStyles = createStyles(({ css, token, isDarkMode }) => ({
content: css`
display: flex;
flex-direction: column;
@@ -27,10 +28,9 @@ const useStyles = createStyles(({ css, token }) => ({
overflow: hidden;
height: 100%;
- margin: 12px;
+ margin: 4px;
- background: ${token.colorBgContainer};
- border: 1px solid ${token.colorPrimaryActive};
+ background: ${isDarkMode ? rgba(token.colorBgElevated, 0.8) : token.colorBgElevated};
border-radius: 8px;
`,
}));
@@ -40,8 +40,8 @@ const PortalPanel = memo(({ children }: PropsWithChildren) => {
const { md = true } = useResponsive();
const [showInspector, showToolUI] = useChatStore((s) => [
- chatPortalSelectors.showDock(s),
- chatPortalSelectors.showToolUI(s),
+ chatPortalSelectors.showPortal(s),
+ chatPortalSelectors.showArtifactUI(s),
]);
return (
diff --git a/src/app/(main)/chat/(workspace)/_layout/Desktop/TopicPanel.tsx b/src/app/(main)/chat/(workspace)/_layout/Desktop/TopicPanel.tsx
index 6e4ce683f075..6a93a371fdc1 100644
--- a/src/app/(main)/chat/(workspace)/_layout/Desktop/TopicPanel.tsx
+++ b/src/app/(main)/chat/(workspace)/_layout/Desktop/TopicPanel.tsx
@@ -34,7 +34,7 @@ const TopicPanel = memo(({ children }: PropsWithChildren) => {
systemStatusSelectors.showChatSideBar(s),
s.toggleChatSideBar,
]);
- const showInspector = useChatStore(chatPortalSelectors.showDock);
+ const showPortal = useChatStore(chatPortalSelectors.showPortal);
const [cacheExpand, setCacheExpand] = useState(Boolean(showAgentSettings));
@@ -50,7 +50,7 @@ const TopicPanel = memo(({ children }: PropsWithChildren) => {
}, [lg, cacheExpand]);
return (
- !showInspector && (
+ !showPortal && (
{
@@ -24,7 +24,7 @@ const Layout = ({ children, topic, conversation, portal }: LayoutProps) => {
{conversation}
{children}
- {portal}
+ {portal}
{topic}
diff --git a/src/features/Conversation/Messages/Tool/Inspector/index.tsx b/src/features/Conversation/Messages/Tool/Inspector/index.tsx
index 315865c15bc9..f9fff026c2e7 100644
--- a/src/features/Conversation/Messages/Tool/Inspector/index.tsx
+++ b/src/features/Conversation/Messages/Tool/Inspector/index.tsx
@@ -47,11 +47,11 @@ const Inspector = memo(
identifier = 'unknown',
id,
}) => {
- const { t } = useTranslation('plugin');
+ const { t } = useTranslation(['plugin', 'portal']);
const { styles } = useStyles();
const [open, setOpen] = useState(false);
const [isMessageToolUIOpen, openToolUI, toggleInspector] = useChatStore((s) => [
- chatPortalSelectors.isMessageToolUIOpen(id)(s),
+ chatPortalSelectors.isArtifactMessageUIOpen(id)(s),
s.openToolUI,
s.toggleDock,
]);
@@ -105,7 +105,7 @@ const Inspector = memo(
- {showRightAction && false && (
+ {showRightAction && (
{
@@ -115,7 +115,7 @@ const Inspector = memo(
}
}}
size={DESKTOP_HEADER_ICON_SIZE}
- title={'inspector'}
+ title={t('title', { ns: 'portal' })}
/>
)}
(({ id, content, pluginState, plugin }) => {
const [loading, isMessageToolUIOpen] = useChatStore((s) => [
chatSelectors.isPluginApiInvoking(id)(s),
- chatPortalSelectors.isMessageToolUIOpen(id)(s),
+ chatPortalSelectors.isArtifactMessageUIOpen(id)(s),
]);
const { direction } = useContext(ConfigProvider.ConfigContext);
const { t } = useTranslation('plugin');
diff --git a/src/locales/default/plugin.ts b/src/locales/default/plugin.ts
index e8fc0db5d27c..df5844b007e6 100644
--- a/src/locales/default/plugin.ts
+++ b/src/locales/default/plugin.ts
@@ -140,7 +140,7 @@ export default {
modalDesc: '配置插件市场的地址后,可以使用自定义的插件市场',
title: '设置插件市场',
},
- showInPortal: '请在扩展窗中查看详情',
+ showInPortal: '请在工作区中查看详情',
store: {
actions: {
confirmUninstall: '即将卸载该插件,卸载后将清除该插件配置,请确认你的操作',
diff --git a/src/locales/default/portal.ts b/src/locales/default/portal.ts
index 2484384f915d..9b2ea36b9921 100644
--- a/src/locales/default/portal.ts
+++ b/src/locales/default/portal.ts
@@ -1,4 +1,10 @@
export default {
- aiSummary: '让助手总结',
- title: '扩展窗',
+ Artifacts: 'Artifacts',
+ actions: {
+ genAiMessage: '创建助手消息',
+ summary: '总结',
+ summaryTooltip: '总结当前内容',
+ },
+ emptyArtifactList: '当前 Artifacts 列表为空,请在会话中按需使用插件后再查看',
+ title: '工作区',
};
diff --git a/src/store/chat/slices/plugin/action.ts b/src/store/chat/slices/plugin/action.ts
index 2f4c30350d58..4620555652d7 100644
--- a/src/store/chat/slices/plugin/action.ts
+++ b/src/store/chat/slices/plugin/action.ts
@@ -12,7 +12,7 @@ import { CreateMessageParams, messageService } from '@/services/message';
import { ChatStore } from '@/store/chat/store';
import { useToolStore } from '@/store/tool';
import { pluginSelectors } from '@/store/tool/selectors';
-import { ChatToolPayload, MessageToolCall } from '@/types/message';
+import { ChatMessage, ChatToolPayload, MessageToolCall } from '@/types/message';
import { merge } from '@/utils/merge';
import { safeParseJSON } from '@/utils/safeParseJSON';
import { setNamespace } from '@/utils/storeDebug';
@@ -37,6 +37,7 @@ export interface ChatPluginAction {
reInvokeToolMessage: (id: string) => Promise;
triggerAIMessage: (params: { parentId?: string; traceId?: string }) => Promise;
+ summaryPluginContent: (id: string) => Promise;
triggerToolCalls: (id: string) => Promise;
updatePluginState: (id: string, value: any) => Promise;
@@ -167,6 +168,29 @@ export const chatPlugin: StateCreator<
const chats = chatSelectors.currentChats(get());
await internal_coreProcessMessage(chats, parentId ?? chats.at(-1)!.id, { traceId });
},
+
+ summaryPluginContent: async (id) => {
+ const message = chatSelectors.getMessageById(id)(get());
+ if (!message || message.role !== 'tool') return;
+
+ await get().internal_coreProcessMessage(
+ [
+ {
+ role: 'assistant',
+ content: '作为一名总结专家,请结合以上系统提示词,将以下内容进行总结:',
+ },
+ {
+ ...message,
+ content: message.content,
+ role: 'assistant',
+ name: undefined,
+ tool_call_id: undefined,
+ },
+ ] as ChatMessage[],
+ message.id,
+ );
+ },
+
triggerToolCalls: async (assistantId) => {
const message = chatSelectors.getMessageById(assistantId)(get());
if (!message || !message.tools) return;
diff --git a/src/store/chat/slices/portal/action.test.ts b/src/store/chat/slices/portal/action.test.ts
index e508dbd348c6..8bbf7ab8aaf4 100644
--- a/src/store/chat/slices/portal/action.test.ts
+++ b/src/store/chat/slices/portal/action.test.ts
@@ -14,7 +14,7 @@ describe('chatDockSlice', () => {
result.current.openToolUI('test-id', 'test-identifier');
});
- expect(result.current.dockToolMessage).toEqual({
+ expect(result.current.portalToolMessage).toEqual({
id: 'test-id',
identifier: 'test-identifier',
});
@@ -23,7 +23,7 @@ describe('chatDockSlice', () => {
result.current.closeToolUI();
});
- expect(result.current.dockToolMessage).toBeUndefined();
+ expect(result.current.portalToolMessage).toBeUndefined();
});
});
@@ -31,17 +31,17 @@ describe('chatDockSlice', () => {
it('should set dockToolMessage and open dock if it is closed', () => {
const { result } = renderHook(() => useChatStore());
- expect(result.current.showDock).toBe(false);
+ expect(result.current.showPortal).toBe(false);
act(() => {
result.current.openToolUI('test-id', 'test-identifier');
});
- expect(result.current.dockToolMessage).toEqual({
+ expect(result.current.portalToolMessage).toEqual({
id: 'test-id',
identifier: 'test-identifier',
});
- expect(result.current.showDock).toBe(true);
+ expect(result.current.showPortal).toBe(true);
});
it('should not change dock state if it is already open', () => {
@@ -51,17 +51,17 @@ describe('chatDockSlice', () => {
result.current.toggleDock(true);
});
- expect(result.current.showDock).toBe(true);
+ expect(result.current.showPortal).toBe(true);
act(() => {
result.current.openToolUI('test-id', 'test-identifier');
});
- expect(result.current.dockToolMessage).toEqual({
+ expect(result.current.portalToolMessage).toEqual({
id: 'test-id',
identifier: 'test-identifier',
});
- expect(result.current.showDock).toBe(true);
+ expect(result.current.showPortal).toBe(true);
});
});
@@ -69,19 +69,19 @@ describe('chatDockSlice', () => {
it('should toggle dock state when no argument is provided', () => {
const { result } = renderHook(() => useChatStore());
- expect(result.current.showDock).toBe(false);
+ expect(result.current.showPortal).toBe(false);
act(() => {
result.current.toggleDock();
});
- expect(result.current.showDock).toBe(true);
+ expect(result.current.showPortal).toBe(true);
act(() => {
result.current.toggleDock();
});
- expect(result.current.showDock).toBe(false);
+ expect(result.current.showPortal).toBe(false);
});
it('should set dock state to the provided value', () => {
@@ -91,19 +91,19 @@ describe('chatDockSlice', () => {
result.current.toggleDock(true);
});
- expect(result.current.showDock).toBe(true);
+ expect(result.current.showPortal).toBe(true);
act(() => {
result.current.toggleDock(false);
});
- expect(result.current.showDock).toBe(false);
+ expect(result.current.showPortal).toBe(false);
act(() => {
result.current.toggleDock(true);
});
- expect(result.current.showDock).toBe(true);
+ expect(result.current.showPortal).toBe(true);
});
});
});
diff --git a/src/store/chat/slices/portal/action.ts b/src/store/chat/slices/portal/action.ts
index 99d7f6132b9e..10cbf9868875 100644
--- a/src/store/chat/slices/portal/action.ts
+++ b/src/store/chat/slices/portal/action.ts
@@ -15,17 +15,17 @@ export const chatPortalSlice: StateCreator<
ChatPortalAction
> = (set, get) => ({
closeToolUI: () => {
- set({ dockToolMessage: undefined }, false, 'openToolUI');
+ set({ portalToolMessage: undefined }, false, 'openToolUI');
},
openToolUI: (id, identifier) => {
- if (!get().showDock) {
+ if (!get().showPortal) {
get().toggleDock(true);
}
- set({ dockToolMessage: { id, identifier } }, false, 'openToolUI');
+ set({ portalToolMessage: { id, identifier } }, false, 'openToolUI');
},
toggleDock: (open) => {
- const showInspector = open === undefined ? !get().showDock : open;
- set({ showDock: showInspector }, false, 'toggleInspector');
+ const showInspector = open === undefined ? !get().showPortal : open;
+ set({ showPortal: showInspector }, false, 'toggleInspector');
},
});
diff --git a/src/store/chat/slices/portal/initialState.ts b/src/store/chat/slices/portal/initialState.ts
index 561498664ca0..747f7947c99e 100644
--- a/src/store/chat/slices/portal/initialState.ts
+++ b/src/store/chat/slices/portal/initialState.ts
@@ -1,8 +1,8 @@
export interface ChatPortalState {
- dockToolMessage?: { id: string; identifier: string };
- showDock: boolean;
+ portalToolMessage?: { id: string; identifier: string };
+ showPortal: boolean;
}
export const initialChatPortalState: ChatPortalState = {
- showDock: false,
+ showPortal: false,
};
diff --git a/src/store/chat/slices/portal/selectors.test.ts b/src/store/chat/slices/portal/selectors.test.ts
index 3c372de3623e..754c8fe13b19 100644
--- a/src/store/chat/slices/portal/selectors.test.ts
+++ b/src/store/chat/slices/portal/selectors.test.ts
@@ -7,56 +7,56 @@ import { chatPortalSelectors } from './selectors';
describe('chatDockSelectors', () => {
const createState = (overrides?: Partial) =>
({
- showDock: false,
- dockToolMessage: undefined,
+ showPortal: false,
+ portalToolMessage: undefined,
...overrides,
}) as ChatStoreState;
describe('showDock', () => {
it('should return the showDock state', () => {
- expect(chatPortalSelectors.showDock(createState({ showDock: true }))).toBe(true);
- expect(chatPortalSelectors.showDock(createState({ showDock: false }))).toBe(false);
+ expect(chatPortalSelectors.showPortal(createState({ showPortal: true }))).toBe(true);
+ expect(chatPortalSelectors.showPortal(createState({ showPortal: false }))).toBe(false);
});
});
describe('toolUIMessageId', () => {
it('should return undefined when dockToolMessage is not set', () => {
- expect(chatPortalSelectors.toolUIMessageId(createState())).toBeUndefined();
+ expect(chatPortalSelectors.artifactMessageId(createState())).toBeUndefined();
});
it('should return the id when dockToolMessage is set', () => {
- const state = createState({ dockToolMessage: { id: 'test-id', identifier: 'test' } });
- expect(chatPortalSelectors.toolUIMessageId(state)).toBe('test-id');
+ const state = createState({ portalToolMessage: { id: 'test-id', identifier: 'test' } });
+ expect(chatPortalSelectors.artifactMessageId(state)).toBe('test-id');
});
});
describe('isMessageToolUIOpen', () => {
it('should return false when id does not match or showDock is false', () => {
const state = createState({
- dockToolMessage: { id: 'test-id', identifier: 'test' },
- showDock: false,
+ portalToolMessage: { id: 'test-id', identifier: 'test' },
+ showPortal: false,
});
- expect(chatPortalSelectors.isMessageToolUIOpen('test-id')(state)).toBe(false);
- expect(chatPortalSelectors.isMessageToolUIOpen('other-id')(state)).toBe(false);
+ expect(chatPortalSelectors.isArtifactMessageUIOpen('test-id')(state)).toBe(false);
+ expect(chatPortalSelectors.isArtifactMessageUIOpen('other-id')(state)).toBe(false);
});
it('should return true when id matches and showDock is true', () => {
const state = createState({
- dockToolMessage: { id: 'test-id', identifier: 'test' },
- showDock: true,
+ portalToolMessage: { id: 'test-id', identifier: 'test' },
+ showPortal: true,
});
- expect(chatPortalSelectors.isMessageToolUIOpen('test-id')(state)).toBe(true);
+ expect(chatPortalSelectors.isArtifactMessageUIOpen('test-id')(state)).toBe(true);
});
});
describe('showToolUI', () => {
it('should return false when dockToolMessage is not set', () => {
- expect(chatPortalSelectors.showToolUI(createState())).toBe(false);
+ expect(chatPortalSelectors.showArtifactUI(createState())).toBe(false);
});
it('should return true when dockToolMessage is set', () => {
- const state = createState({ dockToolMessage: { id: 'test-id', identifier: 'test' } });
- expect(chatPortalSelectors.showToolUI(state)).toBe(true);
+ const state = createState({ portalToolMessage: { id: 'test-id', identifier: 'test' } });
+ expect(chatPortalSelectors.showArtifactUI(state)).toBe(true);
});
});
@@ -66,7 +66,7 @@ describe('chatDockSelectors', () => {
});
it('should return the identifier when dockToolMessage is set', () => {
- const state = createState({ dockToolMessage: { id: 'test-id', identifier: 'test' } });
+ const state = createState({ portalToolMessage: { id: 'test-id', identifier: 'test' } });
expect(chatPortalSelectors.toolUIIdentifier(state)).toBe('test');
});
});
diff --git a/src/store/chat/slices/portal/selectors.ts b/src/store/chat/slices/portal/selectors.ts
index f990e83bfa60..fa4f1b74ac3c 100644
--- a/src/store/chat/slices/portal/selectors.ts
+++ b/src/store/chat/slices/portal/selectors.ts
@@ -1,15 +1,15 @@
import type { ChatStoreState } from '@/store/chat';
-const toolUIMessageId = (s: ChatStoreState) => s.dockToolMessage?.id;
-const showDock = (s: ChatStoreState) => s.showDock;
+const artifactMessageId = (s: ChatStoreState) => s.portalToolMessage?.id;
+const showPortal = (s: ChatStoreState) => s.showPortal;
-const isMessageToolUIOpen = (id: string) => (s: ChatStoreState) =>
- toolUIMessageId(s) === id && showDock(s);
+const isArtifactMessageUIOpen = (id: string) => (s: ChatStoreState) =>
+ artifactMessageId(s) === id && showPortal(s);
export const chatPortalSelectors = {
- isMessageToolUIOpen,
- showDock,
- showToolUI: (state: ChatStoreState) => !!state.dockToolMessage,
- toolUIIdentifier: (state: ChatStoreState) => state.dockToolMessage?.identifier,
- toolUIMessageId,
+ artifactMessageId,
+ isArtifactMessageUIOpen,
+ showArtifactUI: (state: ChatStoreState) => !!state.portalToolMessage,
+ showPortal,
+ toolUIIdentifier: (state: ChatStoreState) => state.portalToolMessage?.identifier,
};