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 ( - + + { + 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 ( <> - +