🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
✨ feat(chat-input): put the sandboxes in a submenu and flatten the execution environment menu (#23262)
Rdmclin2f47981e6db0b
diff --git a/locales/ar/chat.json b/locales/ar/chat.jsonindex 0fc82818e2b..dab319b8c32 100644--- a/locales/ar/chat.json+++ b/locales/ar/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "تلقائي","heteroAgent.executionTarget.autoDesc": "استخدام جهاز متصل تلقائيًا، واختيار واحد عند توفر عدة أجهزة","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} متصل · {{total}} إجمالًا",- "heteroAgent.executionTarget.devicesGroup": "الأجهزة","heteroAgent.executionTarget.downloadDesktop": "احصل على تطبيق سطح المكتب","heteroAgent.executionTarget.downloadDesktopDesc": "قم بتشغيل الوكلاء مع الوصول إلى جهاز الكمبيوتر الخاص بك","heteroAgent.executionTarget.downloadDesktopTitle": "احصل على تطبيق سطح المكتب",@@ -1548,6 +1547,7 @@"heteroAgent.executionTarget.sandbox": "بيئة سحابية مؤقتة","heteroAgent.executionTarget.sandboxDesc": "تشغيل في بيئة سحابية مؤقتة","heteroAgent.executionTarget.sandboxGroup": "بيئات الحماية",+ "heteroAgent.executionTarget.sandboxGroupDesc": "تشغيل في بيئة معزولة","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} يعمل حاليًا فقط على جهاز محلي أو متصل","heteroAgent.executionTarget.switchProjectTopic.content": "سيتم تشغيل هذا الموضوع في دليل المشروع \"{{directory}}\" على {{device}}. تبدأ دورته التالية بجلسة جديدة هناك.","heteroAgent.executionTarget.switchTopic.content": "تم تشغيل هذا الموضوع على {{name}}، حيث يتم الاحتفاظ بدليل العمل وجلسة الوكيل. بعد التبديل، يبدأ دوره التالي جلسة جديدة في البيئة الجديدة. ستستخدم المواضيع الجديدة هذا الاختيار أيضًا.",diff --git a/locales/bg-BG/chat.json b/locales/bg-BG/chat.jsonindex 1d2f3ba8456..a9002aeae0c 100644--- a/locales/bg-BG/chat.json+++ b/locales/bg-BG/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "Автоматично","heteroAgent.executionTarget.autoDesc": "Автоматично използване на онлайн устройство, избирайки едно, когато има няколко налични","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} онлайн · общо {{total}}",- "heteroAgent.executionTarget.devicesGroup": "Устройства","heteroAgent.executionTarget.downloadDesktop": "Изтеглете десктоп приложението","heteroAgent.executionTarget.downloadDesktopDesc": "Стартирайте агенти с достъп до вашия компютър","heteroAgent.executionTarget.downloadDesktopTitle": "Изтеглете десктоп приложението",@@ -1550,6 +1549,7 @@"heteroAgent.executionTarget.sandbox": "Облачен пясъчник","heteroAgent.executionTarget.sandboxDesc": "Изпълнява се в временен облачен пясъчник","heteroAgent.executionTarget.sandboxGroup": "Пясъчници",+ "heteroAgent.executionTarget.sandboxGroupDesc": "Изпълнение в изолирана среда","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} в момента работи само на локално или свързано устройство","heteroAgent.executionTarget.switchProjectTopic.content": "Тази тема ще се изпълнява в директорията на проекта \"{{directory}}\" на {{device}}. Следващият й ход започва нова сесия там.","heteroAgent.executionTarget.switchTopic.content": "Тази тема се изпълнява на {{name}}, където се съхраняват нейната работна директория и сесията на агента. След превключване, следващият ѝ ход започва нова сесия в новата среда. Новите теми също ще използват този избор.",diff --git a/locales/de-DE/chat.json b/locales/de-DE/chat.jsonindex 83996469619..7b40c32cc98 100644--- a/locales/de-DE/chat.json+++ b/locales/de-DE/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "Automatisch","heteroAgent.executionTarget.autoDesc": "Automatisch ein Online-Gerät verwenden, wobei eines ausgewählt wird, wenn mehrere verfügbar sind","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} online · {{total}} insgesamt",- "heteroAgent.executionTarget.devicesGroup": "Geräte","heteroAgent.executionTarget.downloadDesktop": "Desktop-App herunterladen","heteroAgent.executionTarget.downloadDesktopDesc": "Führen Sie Agenten mit Zugriff auf Ihren Computer aus","heteroAgent.executionTarget.downloadDesktopTitle": "Desktop-App herunterladen",@@ -1548,6 +1547,7 @@"heteroAgent.executionTarget.sandbox": "Cloud-Sandbox","heteroAgent.executionTarget.sandboxDesc": "In einer temporären Cloud-Sandbox ausführen","heteroAgent.executionTarget.sandboxGroup": "Sandboxes",+ "heteroAgent.executionTarget.sandboxGroupDesc": "In einer isolierten Umgebung ausführen","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} läuft derzeit nur auf einem lokalen oder verbundenen Gerät","heteroAgent.executionTarget.switchProjectTopic.content": "Dieses Thema wird im Projektverzeichnis \"{{directory}}\" auf {{device}} ausgeführt. Der nächste Durchlauf startet dort eine neue Sitzung.","heteroAgent.executionTarget.switchTopic.content": "Dieses Thema wurde auf {{name}} ausgeführt, wo sein Arbeitsverzeichnis und die Agentensitzung gespeichert sind. Nach dem Wechsel beginnt der nächste Zug eine neue Sitzung in der neuen Umgebung. Neue Themen verwenden ebenfalls diese Wahl.",diff --git a/locales/en-US/chat.json b/locales/en-US/chat.jsonindex f240d65fc52..4d7b5e5d67d 100644--- a/locales/en-US/chat.json+++ b/locales/en-US/chat.json@@ -1554,9 +1554,7 @@"heteroAgent.codexQuota.totalEarned_other": "{{count}} earned in total","heteroAgent.executionTarget.auto": "Auto","heteroAgent.executionTarget.autoDesc": "Use an online device automatically, picking one when several are available",- "heteroAgent.executionTarget.builtinGroup": "Built-in","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} online · {{total}} total",- "heteroAgent.executionTarget.devicesGroup": "Devices","heteroAgent.executionTarget.downloadDesktop": "Get Desktop App","heteroAgent.executionTarget.downloadDesktopDesc": "Run agents with access to your computer","heteroAgent.executionTarget.downloadDesktopTitle": "Get the desktop app",@@ -1593,6 +1591,7 @@"heteroAgent.executionTarget.sandbox": "Cloud Sandbox","heteroAgent.executionTarget.sandboxDesc": "Runs in the cloud, no machine needed","heteroAgent.executionTarget.sandboxGroup": "Sandboxes",+ "heteroAgent.executionTarget.sandboxGroupDesc": "Run in an isolated environment","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} currently runs only on a local or connected device","heteroAgent.executionTarget.switchProjectTopic.content": "This topic will run in the project directory \"{{directory}}\" on {{device}}. Its next turn starts a fresh session there.","heteroAgent.executionTarget.switchTopic.content": "This topic has been running on {{name}}, where its working directory and agent session are kept. After switching, its next turn starts a fresh session in the new environment. New topics will use this choice too.",diff --git a/locales/es-ES/chat.json b/locales/es-ES/chat.jsonindex b3ada9e996c..682ca73bd73 100644--- a/locales/es-ES/chat.json+++ b/locales/es-ES/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "Automático","heteroAgent.executionTarget.autoDesc": "Usar un dispositivo en línea automáticamente, eligiendo uno cuando haya varios disponibles","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} en línea · {{total}} en total",- "heteroAgent.executionTarget.devicesGroup": "Dispositivos","heteroAgent.executionTarget.downloadDesktop": "Obtener la aplicación de escritorio","heteroAgent.executionTarget.downloadDesktopDesc": "Ejecuta agentes con acceso a tu computadora","heteroAgent.executionTarget.downloadDesktopTitle": "Obtener la aplicación de escritorio",@@ -1548,6 +1547,7 @@"heteroAgent.executionTarget.sandbox": "Sandbox en la nube","heteroAgent.executionTarget.sandboxDesc": "Ejecutar en un sandbox efímero en la nube","heteroAgent.executionTarget.sandboxGroup": "Sandboxes",+ "heteroAgent.executionTarget.sandboxGroupDesc": "Ejecutar en un entorno aislado","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} actualmente solo se ejecuta en un dispositivo local o conectado","heteroAgent.executionTarget.switchProjectTopic.content": "Este tema se ejecutará en el directorio del proyecto \"{{directory}}\" en {{device}}. Su próximo turno comenzará una nueva sesión allí.","heteroAgent.executionTarget.switchTopic.content": "Este tema se ha estado ejecutando en {{name}}, donde se mantienen su directorio de trabajo y sesión del agente. Después de cambiar, su próximo turno comienza una nueva sesión en el nuevo entorno. Los nuevos temas también usarán esta elección.",diff --git a/locales/fa-IR/chat.json b/locales/fa-IR/chat.jsonindex a5d49fadf4a..7094f55fb9b 100644--- a/locales/fa-IR/chat.json+++ b/locales/fa-IR/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "خودکار","heteroAgent.executionTarget.autoDesc": "به طور خودکار از یک دستگاه آنلاین استفاده کنید و یکی را در صورت موجود بودن چندین دستگاه انتخاب کنید","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} آنلاین · {{total}} در مجموع",- "heteroAgent.executionTarget.devicesGroup": "دستگاهها","heteroAgent.executionTarget.downloadDesktop": "دریافت اپلیکیشن دسکتاپ","heteroAgent.executionTarget.downloadDesktopDesc": "اجرای عوامل با دسترسی به کامپیوتر شما","heteroAgent.executionTarget.downloadDesktopTitle": "دریافت اپلیکیشن دسکتاپ",@@ -1550,6 +1549,7 @@"heteroAgent.executionTarget.sandbox": "محیط آزمایشی ابری","heteroAgent.executionTarget.sandboxDesc": "در یک محیط آزمایشی ابری موقت اجرا شود","heteroAgent.executionTarget.sandboxGroup": "سندباکسها",+ "heteroAgent.executionTarget.sandboxGroupDesc": "اجرا در یک محیط ایزوله","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} در حال حاضر فقط روی یک دستگاه محلی یا متصل اجرا میشود","heteroAgent.executionTarget.switchProjectTopic.content": "این موضوع در دایرکتوری پروژه \"{{directory}}\" روی {{device}} اجرا خواهد شد. نوبت بعدی آن یک جلسه جدید را در آنجا آغاز میکند.","heteroAgent.executionTarget.switchTopic.content": "این موضوع در حال اجرا روی {{name}} است، جایی که دایرکتوری کاری و جلسه اجنت آن نگهداری میشود. پس از تغییر، نوبت بعدی آن یک جلسه جدید در محیط جدید شروع میکند. موضوعات جدید نیز از این انتخاب استفاده خواهند کرد.",diff --git a/locales/fr-FR/chat.json b/locales/fr-FR/chat.jsonindex aff1768cb15..f55c854ec1c 100644--- a/locales/fr-FR/chat.json+++ b/locales/fr-FR/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "Auto","heteroAgent.executionTarget.autoDesc": "Utiliser automatiquement un appareil en ligne, en choisissant un lorsqu'il y en a plusieurs disponibles","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} en ligne · {{total}} au total",- "heteroAgent.executionTarget.devicesGroup": "Appareils","heteroAgent.executionTarget.downloadDesktop": "Obtenir l'application de bureau","heteroAgent.executionTarget.downloadDesktopDesc": "Exécutez des agents avec accès à votre ordinateur","heteroAgent.executionTarget.downloadDesktopTitle": "Obtenir l'application de bureau",@@ -1550,6 +1549,7 @@"heteroAgent.executionTarget.sandbox": "Bac à sable cloud","heteroAgent.executionTarget.sandboxDesc": "Exécuter dans un bac à sable cloud éphémère","heteroAgent.executionTarget.sandboxGroup": "Bacs à sable",+ "heteroAgent.executionTarget.sandboxGroupDesc": "Exécuter dans un environnement isolé","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} fonctionne actuellement uniquement sur un appareil local ou connecté","heteroAgent.executionTarget.switchProjectTopic.content": "Ce sujet s'exécutera dans le répertoire du projet \"{{directory}}\" sur {{device}}. Son prochain tour commencera une nouvelle session là-bas.","heteroAgent.executionTarget.switchTopic.content": "Ce sujet s'exécute sur {{name}}, où son répertoire de travail et sa session d'agent sont conservés. Après le changement, son prochain tour démarre une nouvelle session dans le nouvel environnement. Les nouveaux sujets utiliseront également ce choix.",diff --git a/locales/it-IT/chat.json b/locales/it-IT/chat.jsonindex c6e1039df3f..183fda132c3 100644--- a/locales/it-IT/chat.json+++ b/locales/it-IT/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "Automatico","heteroAgent.executionTarget.autoDesc": "Usa automaticamente un dispositivo online, scegliendone uno quando ce ne sono diversi disponibili","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} online · {{total}} in totale",- "heteroAgent.executionTarget.devicesGroup": "Dispositivi","heteroAgent.executionTarget.downloadDesktop": "Scarica l'App Desktop","heteroAgent.executionTarget.downloadDesktopDesc": "Esegui agenti con accesso al tuo computer","heteroAgent.executionTarget.downloadDesktopTitle": "Scarica l'app desktop",@@ -1550,6 +1549,7 @@"heteroAgent.executionTarget.sandbox": "Sandbox cloud","heteroAgent.executionTarget.sandboxDesc": "Esegui in un sandbox cloud temporaneo","heteroAgent.executionTarget.sandboxGroup": "Sandbox",+ "heteroAgent.executionTarget.sandboxGroupDesc": "Esegui in un ambiente isolato","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} attualmente funziona solo su un dispositivo locale o connesso","heteroAgent.executionTarget.switchProjectTopic.content": "Questo argomento verrà eseguito nella directory del progetto \"{{directory}}\" su {{device}}. Il prossimo turno inizierà una nuova sessione lì.","heteroAgent.executionTarget.switchTopic.content": "Questo argomento è stato eseguito su {{name}}, dove sono conservati la directory di lavoro e la sessione dell'agente. Dopo il cambio, il prossimo turno inizierà una nuova sessione nel nuovo ambiente. Anche i nuovi argomenti utilizzeranno questa scelta.",diff --git a/locales/ja-JP/chat.json b/locales/ja-JP/chat.jsonindex b8f6f8ed1c8..3e5a446633a 100644--- a/locales/ja-JP/chat.json+++ b/locales/ja-JP/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "自動","heteroAgent.executionTarget.autoDesc": "複数のオンラインデバイスが利用可能な場合、自動的に選択して使用","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} 台オンライン · 全 {{total}} 台",- "heteroAgent.executionTarget.devicesGroup": "デバイス","heteroAgent.executionTarget.downloadDesktop": "デスクトップアプリを取得","heteroAgent.executionTarget.downloadDesktopDesc": "コンピュータにアクセスできるエージェントを実行","heteroAgent.executionTarget.downloadDesktopTitle": "デスクトップアプリを取得",@@ -1550,6 +1549,7 @@"heteroAgent.executionTarget.sandbox": "クラウドサンドボックス","heteroAgent.executionTarget.sandboxDesc": "一時的なクラウドサンドボックスで実行","heteroAgent.executionTarget.sandboxGroup": "サンドボックス",+ "heteroAgent.executionTarget.sandboxGroupDesc": "隔離された環境で実行","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} は現在、ローカルまたは接続されたデバイスでのみ動作します","heteroAgent.executionTarget.switchProjectTopic.content": "このトピックはプロジェクトディレクトリ「{{directory}}」で{{device}}上で実行されます。次のターンではそこで新しいセッションが開始されます。","heteroAgent.executionTarget.switchTopic.content": "このトピックは {{name}} で実行されており、その作業ディレクトリとエージェントセッションが保持されています。切り替え後、次のターンは新しい環境で新しいセッションを開始します。新しいトピックもこの選択を使用します。",diff --git a/locales/ko-KR/chat.json b/locales/ko-KR/chat.jsonindex e42faefad63..95bceed9a08 100644--- a/locales/ko-KR/chat.json+++ b/locales/ko-KR/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "자동","heteroAgent.executionTarget.autoDesc": "온라인 장치를 자동으로 사용하며, 여러 장치가 있을 경우 하나를 선택합니다","heteroAgent.executionTarget.deviceGroupSummary": "{{online}}대 온라인 · 총 {{total}}대",- "heteroAgent.executionTarget.devicesGroup": "기기","heteroAgent.executionTarget.downloadDesktop": "데스크톱 앱 받기","heteroAgent.executionTarget.downloadDesktopDesc": "컴퓨터에 액세스할 수 있는 에이전트를 실행하세요","heteroAgent.executionTarget.downloadDesktopTitle": "데스크톱 앱 받기",@@ -1548,6 +1547,7 @@"heteroAgent.executionTarget.sandbox": "클라우드 샌드박스","heteroAgent.executionTarget.sandboxDesc": "임시 클라우드 샌드박스에서 실행","heteroAgent.executionTarget.sandboxGroup": "샌드박스",+ "heteroAgent.executionTarget.sandboxGroupDesc": "격리된 환경에서 실행","heteroAgent.executionTarget.sandboxUnsupported": "{{name}}은 현재 로컬 또는 연결된 장치에서만 실행됩니다.","heteroAgent.executionTarget.switchProjectTopic.content": "이 주제는 {{device}}의 프로젝트 디렉토리 \"{{directory}}\"에서 실행됩니다. 다음 턴은 그곳에서 새 세션을 시작합니다.","heteroAgent.executionTarget.switchTopic.content": "이 주제는 {{name}}에서 실행 중이며, 해당 작업 디렉토리와 에이전트 세션이 유지됩니다. 전환 후, 다음 턴은 새 환경에서 새 세션을 시작합니다. 새 주제도 이 선택을 사용합니다.",diff --git a/locales/nl-NL/chat.json b/locales/nl-NL/chat.jsonindex 25def744fa2..574035bbefa 100644--- a/locales/nl-NL/chat.json+++ b/locales/nl-NL/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "Auto","heteroAgent.executionTarget.autoDesc": "Gebruik automatisch een online apparaat, waarbij er één wordt gekozen als er meerdere beschikbaar zijn","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} online · {{total}} in totaal",- "heteroAgent.executionTarget.devicesGroup": "Apparaten","heteroAgent.executionTarget.downloadDesktop": "Download Desktop App","heteroAgent.executionTarget.downloadDesktopDesc": "Voer agents uit met toegang tot uw computer","heteroAgent.executionTarget.downloadDesktopTitle": "Download de desktop-app",@@ -1550,6 +1549,7 @@"heteroAgent.executionTarget.sandbox": "Cloud-sandbox","heteroAgent.executionTarget.sandboxDesc": "Voer uit in een tijdelijke cloud-sandbox","heteroAgent.executionTarget.sandboxGroup": "Sandboxes",+ "heteroAgent.executionTarget.sandboxGroupDesc": "Uitvoeren in een geïsoleerde omgeving","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} werkt momenteel alleen op een lokaal of verbonden apparaat","heteroAgent.executionTarget.switchProjectTopic.content": "Dit onderwerp wordt uitgevoerd in de projectmap \"{{directory}}\" op {{device}}. De volgende beurt start daar een nieuwe sessie.","heteroAgent.executionTarget.switchTopic.content": "Dit onderwerp is uitgevoerd op {{name}}, waar zijn werkmap en agentsessie worden bewaard. Na overschakelen start de volgende beurt een nieuwe sessie in de nieuwe omgeving. Nieuwe onderwerpen zullen ook deze keuze gebruiken.",diff --git a/locales/pl-PL/chat.json b/locales/pl-PL/chat.jsonindex f1121673c83..a8eff635640 100644--- a/locales/pl-PL/chat.json+++ b/locales/pl-PL/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "Automatycznie","heteroAgent.executionTarget.autoDesc": "Automatycznie użyj urządzenia online, wybierając jedno, gdy dostępnych jest kilka","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} online · łącznie {{total}}",- "heteroAgent.executionTarget.devicesGroup": "Urządzenia","heteroAgent.executionTarget.downloadDesktop": "Pobierz aplikację na komputer","heteroAgent.executionTarget.downloadDesktopDesc": "Uruchamiaj agentów z dostępem do swojego komputera","heteroAgent.executionTarget.downloadDesktopTitle": "Pobierz aplikację na komputer",@@ -1548,6 +1547,7 @@"heteroAgent.executionTarget.sandbox": "Chmurowa piaskownica","heteroAgent.executionTarget.sandboxDesc": "Uruchom w efemerycznej chmurowej piaskownicy","heteroAgent.executionTarget.sandboxGroup": "Piaskownice",+ "heteroAgent.executionTarget.sandboxGroupDesc": "Uruchamiaj w odizolowanym środowisku","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} działa obecnie tylko na urządzeniu lokalnym lub podłączonym","heteroAgent.executionTarget.switchProjectTopic.content": "Ten temat będzie działał w katalogu projektu \"{{directory}}\" na {{device}}. Jego następna tura rozpocznie nową sesję tam.","heteroAgent.executionTarget.switchTopic.content": "Ten temat działa na {{name}}, gdzie przechowywany jest jego katalog roboczy i sesja agenta. Po przełączeniu jego następna tura rozpocznie nową sesję w nowym środowisku. Nowe tematy również będą korzystać z tego wyboru.",diff --git a/locales/pt-BR/chat.json b/locales/pt-BR/chat.jsonindex a288f3c1eab..c2f12b5fa12 100644--- a/locales/pt-BR/chat.json+++ b/locales/pt-BR/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "Automático","heteroAgent.executionTarget.autoDesc": "Use um dispositivo online automaticamente, escolhendo um quando vários estiverem disponíveis","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} online · {{total}} no total",- "heteroAgent.executionTarget.devicesGroup": "Dispositivos","heteroAgent.executionTarget.downloadDesktop": "Obter Aplicativo para Desktop","heteroAgent.executionTarget.downloadDesktopDesc": "Execute agentes com acesso ao seu computador","heteroAgent.executionTarget.downloadDesktopTitle": "Obter o aplicativo para desktop",@@ -1548,6 +1547,7 @@"heteroAgent.executionTarget.sandbox": "Sandbox na nuvem","heteroAgent.executionTarget.sandboxDesc": "Executar em um sandbox efêmero na nuvem","heteroAgent.executionTarget.sandboxGroup": "Sandboxes",+ "heteroAgent.executionTarget.sandboxGroupDesc": "Executar em um ambiente isolado","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} atualmente funciona apenas em um dispositivo local ou conectado","heteroAgent.executionTarget.switchProjectTopic.content": "Este tópico será executado no diretório do projeto \"{{directory}}\" em {{device}}. Sua próxima execução iniciará uma nova sessão lá.","heteroAgent.executionTarget.switchTopic.content": "Este tópico está sendo executado em {{name}}, onde seu diretório de trabalho e sessão do agente são mantidos. Após a troca, sua próxima etapa iniciará uma nova sessão no novo ambiente. Novos tópicos também usarão esta escolha.",diff --git a/locales/ru-RU/chat.json b/locales/ru-RU/chat.jsonindex 45e53fbe5be..9138b4f54ad 100644--- a/locales/ru-RU/chat.json+++ b/locales/ru-RU/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "Авто","heteroAgent.executionTarget.autoDesc": "Автоматически использовать онлайн-устройство, выбирая одно из нескольких доступных","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} в сети · всего {{total}}",- "heteroAgent.executionTarget.devicesGroup": "Устройства","heteroAgent.executionTarget.downloadDesktop": "Скачать приложение для компьютера","heteroAgent.executionTarget.downloadDesktopDesc": "Запускайте агентов с доступом к вашему компьютеру","heteroAgent.executionTarget.downloadDesktopTitle": "Скачать приложение для компьютера",@@ -1548,6 +1547,7 @@"heteroAgent.executionTarget.sandbox": "Облачная песочница","heteroAgent.executionTarget.sandboxDesc": "Запуск в временной облачной песочнице","heteroAgent.executionTarget.sandboxGroup": "Песочницы",+ "heteroAgent.executionTarget.sandboxGroupDesc": "Запуск в изолированной среде","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} в настоящее время работает только на локальном или подключенном устройстве","heteroAgent.executionTarget.switchProjectTopic.content": "Эта тема будет выполняться в директории проекта \"{{directory}}\" на {{device}}. Следующий ход начнет новую сессию там.","heteroAgent.executionTarget.switchTopic.content": "Эта тема выполняется на {{name}}, где сохраняются ее рабочая директория и сессия агента. После переключения следующий ход начнет новую сессию в новой среде. Новые темы также будут использовать этот выбор.",diff --git a/locales/tr-TR/chat.json b/locales/tr-TR/chat.jsonindex be91f5c58d3..0d97ad9c3d9 100644--- a/locales/tr-TR/chat.json+++ b/locales/tr-TR/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "Otomatik","heteroAgent.executionTarget.autoDesc": "Birden fazla cihaz mevcut olduğunda, otomatik olarak bir çevrimiçi cihaz seçin","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} çevrimiçi · toplam {{total}}",- "heteroAgent.executionTarget.devicesGroup": "Cihazlar","heteroAgent.executionTarget.downloadDesktop": "Masaüstü Uygulamasını Edinin","heteroAgent.executionTarget.downloadDesktopDesc": "Bilgisayarınıza erişimi olan ajanları çalıştırın","heteroAgent.executionTarget.downloadDesktopTitle": "Masaüstü uygulamasını edinin",@@ -1550,6 +1549,7 @@"heteroAgent.executionTarget.sandbox": "Bulut sandbox","heteroAgent.executionTarget.sandboxDesc": "Geçici bir bulut sandbox'ında çalıştır","heteroAgent.executionTarget.sandboxGroup": "Sandbox'lar",+ "heteroAgent.executionTarget.sandboxGroupDesc": "Yalıtılmış bir ortamda çalıştır","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} şu anda yalnızca yerel veya bağlı bir cihazda çalışıyor","heteroAgent.executionTarget.switchProjectTopic.content": "Bu konu, \"{{directory}}\" proje dizininde {{device}} üzerinde çalışacak. Bir sonraki adımda orada yeni bir oturum başlatılacak.","heteroAgent.executionTarget.switchTopic.content": "Bu konu {{name}} üzerinde çalışıyor, burada çalışma dizini ve ajan oturumu tutuluyor. Geçişten sonra, bir sonraki tur yeni ortamda yeni bir oturum başlatır. Yeni konular da bu seçimi kullanır.",diff --git a/locales/vi-VN/chat.json b/locales/vi-VN/chat.jsonindex 4302772026c..deecb61c596 100644--- a/locales/vi-VN/chat.json+++ b/locales/vi-VN/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "Tự động","heteroAgent.executionTarget.autoDesc": "Tự động sử dụng một thiết bị trực tuyến, chọn một thiết bị khi có nhiều thiết bị khả dụng","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} trực tuyến · tổng {{total}}",- "heteroAgent.executionTarget.devicesGroup": "Thiết bị","heteroAgent.executionTarget.downloadDesktop": "Tải ứng dụng máy tính","heteroAgent.executionTarget.downloadDesktopDesc": "Chạy các tác nhân với quyền truy cập vào máy tính của bạn","heteroAgent.executionTarget.downloadDesktopTitle": "Tải ứng dụng máy tính",@@ -1548,6 +1547,7 @@"heteroAgent.executionTarget.sandbox": "Hộp cát đám mây","heteroAgent.executionTarget.sandboxDesc": "Chạy trong hộp cát đám mây tạm thời","heteroAgent.executionTarget.sandboxGroup": "Hộp cát",+ "heteroAgent.executionTarget.sandboxGroupDesc": "Chạy trong môi trường cô lập","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} hiện chỉ chạy trên thiết bị cục bộ hoặc được kết nối","heteroAgent.executionTarget.switchProjectTopic.content": "Chủ đề này sẽ chạy trong thư mục dự án \"{{directory}}\" trên {{device}}. Lần tiếp theo sẽ bắt đầu một phiên mới tại đó.","heteroAgent.executionTarget.switchTopic.content": "Chủ đề này đang chạy trên {{name}}, nơi thư mục làm việc và phiên agent của nó được giữ. Sau khi chuyển đổi, lượt tiếp theo của nó sẽ bắt đầu một phiên mới trong môi trường mới. Các chủ đề mới cũng sẽ sử dụng lựa chọn này.",diff --git a/locales/zh-CN/chat.json b/locales/zh-CN/chat.jsonindex 849560f6d33..7d3a2683e4c 100644--- a/locales/zh-CN/chat.json+++ b/locales/zh-CN/chat.json@@ -1554,9 +1554,7 @@"heteroAgent.codexQuota.totalEarned_other": "累计获得 {{count}} 次","heteroAgent.executionTarget.auto": "自动","heteroAgent.executionTarget.autoDesc": "自动使用在线设备,有多台时择一使用",- "heteroAgent.executionTarget.builtinGroup": "内置","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} 台在线 · 共 {{total}} 台",- "heteroAgent.executionTarget.devicesGroup": "设备","heteroAgent.executionTarget.downloadDesktop": "下载桌面端","heteroAgent.executionTarget.downloadDesktopDesc": "让 Agent 直接连接你的电脑","heteroAgent.executionTarget.downloadDesktopTitle": "下载桌面端",@@ -1593,6 +1591,7 @@"heteroAgent.executionTarget.sandbox": "云端沙箱","heteroAgent.executionTarget.sandboxDesc": "云端运行,不占用机器","heteroAgent.executionTarget.sandboxGroup": "沙箱",+ "heteroAgent.executionTarget.sandboxGroupDesc": "在隔离环境中运行","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} 目前仅支持在本地设备或已连接设备上运行","heteroAgent.executionTarget.switchProjectTopic.content": "本话题将改到「{{device}}」上的项目目录「{{directory}}」运行,下一轮会在那里开启新会话。","heteroAgent.executionTarget.switchTopic.content": "本话题一直在「{{name}}」上运行,工作目录和会话都保存在那里。切换后,下一轮会在新环境中开启新会话;之后的新话题也会使用这个选择。",diff --git a/locales/zh-TW/chat.json b/locales/zh-TW/chat.jsonindex 579d2c987fa..49300ddb650 100644--- a/locales/zh-TW/chat.json+++ b/locales/zh-TW/chat.json@@ -1517,7 +1517,6 @@"heteroAgent.executionTarget.auto": "自動","heteroAgent.executionTarget.autoDesc": "自動使用在線設備,當有多個可用時選擇一個","heteroAgent.executionTarget.deviceGroupSummary": "{{online}} 台在線 · 共 {{total}} 台",- "heteroAgent.executionTarget.devicesGroup": "裝置","heteroAgent.executionTarget.downloadDesktop": "下載桌面應用程式","heteroAgent.executionTarget.downloadDesktopDesc": "運行可訪問您電腦的代理","heteroAgent.executionTarget.downloadDesktopTitle": "下載桌面應用程式",@@ -1550,6 +1549,7 @@"heteroAgent.executionTarget.sandbox": "雲端沙盒","heteroAgent.executionTarget.sandboxDesc": "在臨時雲端沙盒中運行","heteroAgent.executionTarget.sandboxGroup": "沙盒",+ "heteroAgent.executionTarget.sandboxGroupDesc": "在隔離環境中執行","heteroAgent.executionTarget.sandboxUnsupported": "{{name}} 目前僅能在本地或連接的設備上運行","heteroAgent.executionTarget.switchProjectTopic.content": "此主題將在 {{device}} 的專案目錄 \"{{directory}}\" 中運行。其下一回合將在那裡開始一個新的會話。","heteroAgent.executionTarget.switchTopic.content": "此主題已在 {{name}} 上運行,其工作目錄和代理會話已保留。切換後,其下一回合將在新環境中啟動一個新會話。新主題也將使用此選擇。",diff --git a/packages/locales/src/default/chat.ts b/packages/locales/src/default/chat.tsindex 2845efad1ae..adc50a35807 100644--- a/packages/locales/src/default/chat.ts+++ b/packages/locales/src/default/chat.ts@@ -932,7 +932,6 @@ export default {'heteroAgent.executionTarget.sandboxUnsupported':'{{name}} currently runs only on a local or connected device','heteroAgent.executionTarget.auto': 'Auto',- 'heteroAgent.executionTarget.builtinGroup': 'Built-in','heteroAgent.executionTarget.autoDesc':'Use an online device automatically, picking one when several are available','heteroAgent.executionTarget.fixedTip':@@ -983,9 +982,9 @@ export default {'Discarded after use, for coding and one-off data processing','heteroAgent.executionTarget.workspaceGroup': 'Workspace Devices','heteroAgent.executionTarget.deviceGroupSummary': '{{online}} online · {{total}} total',- 'heteroAgent.executionTarget.devicesGroup': 'Devices','heteroAgent.executionTarget.myDevicesGroup': 'My devices','heteroAgent.executionTarget.sandboxGroup': 'Sandboxes',+ 'heteroAgent.executionTarget.sandboxGroupDesc': 'Run in an isolated environment','heteroAgent.executionTarget.downloadDesktop': 'Get Desktop App','heteroAgent.executionTarget.downloadDesktopDesc': 'Run agents with access to your computer','heteroAgent.executionTarget.downloadDesktopTitle': 'Get the desktop app',diff --git a/src/features/ChatInput/ControlBar/DeviceGroupSubmenu.tsx b/src/features/ChatInput/ControlBar/DeviceGroupSubmenu.tsxindex c52246e9543..0cc159f9d7f 100644--- a/src/features/ChatInput/ControlBar/DeviceGroupSubmenu.tsx+++ b/src/features/ChatInput/ControlBar/DeviceGroupSubmenu.tsx@@ -1,32 +1,13 @@'use client';import type { DeviceListItem } from '@lobechat/types';-import { Flexbox, Icon, Popover } from '@lobehub/ui';-import * as stylex from '@stylexjs/stylex';+import { Icon } from '@lobehub/ui';import { Building2Icon, LockKeyholeIcon, MonitorSmartphoneIcon } from 'lucide-react';import { memo, type ReactNode } from 'react';import { useTranslation } from 'react-i18next';import { summarizeDeviceGroup } from './deviceGroupSummary';-import OptionRow from './OptionRow';-import SubmenuHeader from './SubmenuHeader';--const styles = stylex.create({- list: {- overflowY: 'auto',- maxHeight: '360px',- },-});--/**- * The list can grow after the submenu opens (a reconnect, a fresh device list),- * so the positioner is left to size itself again rather than keep its first- * measurement — same as the work-location submenus.- */-const SUBMENU_STYLES = {- content: { padding: 4 },- root: { height: 'auto', width: 'auto' },-};+import GroupSubmenu from './GroupSubmenu';/** Which pool the group is: a workspace's private or shared devices, or the caller's own. */export type DeviceGroupKind = 'devices' | 'private' | 'workspace';@@ -47,11 +28,10 @@ interface DeviceGroupSubmenuProps {}/**- * One device group in the execution environment menu, as a second level: the- * first level keeps a single row per group — how many machines are online, and- * the current pick by name — and the machines themselves open beside it. A- * growing fleet then lengthens the submenu, not the menu the built-in- * environments live in.+ * One device group in the execution environment menu: the first level keeps a+ * single row per group — how many machines are online, and the current pick by+ * name — and the machines themselves open beside it. A growing fleet then+ * lengthens the submenu, not the menu the other environments live in.*/const DeviceGroupSubmenu = memo<DeviceGroupSubmenuProps>(({ activeDeviceId, devices, kind, label, renderDevice }) => {@@ -62,37 +42,22 @@ const DeviceGroupSubmenu = memo<DeviceGroupSubmenuProps>();return (- <Popover- arrow={false}- closeDelay={150}- placement={'rightBottom'}- styles={SUBMENU_STYLES}- trigger={['hover', 'click']}- content={- <Flexbox gap={2} style={{ maxWidth: 320, minWidth: 280 }}>- <SubmenuHeader title={label} />- <div {...stylex.props(styles.list)}>{devices.map((d) => renderDevice(d))}</div>- </Flexbox>+ <GroupSubmenu+ active={!!activeDevice}+ hint={activeDevice ? activeDevice.friendlyName || activeDevice.hostname : undefined}+ icon={<Icon icon={GROUP_ICONS[kind]} size={14} />}+ label={label}+ testId={`device-group-${kind}`}+ desc={+ // Until presence is confirmed the count would read "0 online";+ // say it is still checking, as the device rows themselves do.+ presenceUnknown+ ? t('heteroAgent.executionTarget.presenceChecking')+ : t('heteroAgent.executionTarget.deviceGroupSummary', { online, total })}>- <div data-testid={`device-group-${kind}`}>- <OptionRow- arrow- active={!!activeDevice}- hint={activeDevice ? activeDevice.friendlyName || activeDevice.hostname : undefined}- icon={<Icon icon={GROUP_ICONS[kind]} size={14} />}- label={label}- desc={- // Until presence is confirmed the count would read "0 online";- // say it is still checking, as the device rows themselves do.- presenceUnknown- ? t('heteroAgent.executionTarget.presenceChecking')- : t('heteroAgent.executionTarget.deviceGroupSummary', { online, total })- }- onClick={() => {}}- />- </div>- </Popover>+ {devices.map((d) => renderDevice(d))}+ </GroupSubmenu>);},);diff --git a/src/features/ChatInput/ControlBar/GroupSubmenu.tsx b/src/features/ChatInput/ControlBar/GroupSubmenu.tsxnew file mode 100644index 00000000000..0f343194e40--- /dev/null+++ b/src/features/ChatInput/ControlBar/GroupSubmenu.tsx@@ -0,0 +1,79 @@+'use client';++import { Flexbox, Popover } from '@lobehub/ui';+import * as stylex from '@stylexjs/stylex';+import { memo, type ReactNode } from 'react';++import OptionRow from './OptionRow';+import SubmenuHeader from './SubmenuHeader';++const styles = stylex.create({+ list: {+ overflowY: 'auto',+ maxHeight: '360px',+ },+});++/**+ * The list can grow after the submenu opens (a reconnect, a fresh device list),+ * so the positioner is left to size itself again rather than keep its first+ * measurement — same as the work-location submenus.+ */+const SUBMENU_STYLES = {+ content: { padding: 4 },+ root: { height: 'auto', width: 'auto' },+};++interface GroupSubmenuProps {+ /** One of the group's choices is the current one. */+ active?: boolean;+ /** The submenu's rows. */+ children: ReactNode;+ /** A status line under the label, such as how many machines are online. */+ desc?: ReactNode;+ /** The current pick by name, beside the label. */+ hint?: ReactNode;+ icon: ReactNode;+ label: string;+ testId?: string;+}++/**+ * One group in the execution environment menu, as a second level: the first+ * level keeps a single row per group, and the group's choices open beside it.+ * Hover opens it with a pointer and a click opens it on touch, so the second+ * level never depends on hover alone.+ */+const GroupSubmenu = memo<GroupSubmenuProps>(+ ({ active, children, desc, hint, icon, label, testId }) => (+ <Popover+ arrow={false}+ closeDelay={150}+ placement={'rightBottom'}+ styles={SUBMENU_STYLES}+ trigger={['hover', 'click']}+ content={+ <Flexbox gap={2} style={{ maxWidth: 320, minWidth: 280 }}>+ <SubmenuHeader title={label} />+ <div {...stylex.props(styles.list)}>{children}</div>+ </Flexbox>+ }+ >+ <div data-testid={testId}>+ <OptionRow+ arrow+ active={active}+ desc={desc}+ hint={hint}+ icon={icon}+ label={label}+ onClick={() => {}}+ />+ </div>+ </Popover>+ ),+);++GroupSubmenu.displayName = 'GroupSubmenu';++export default GroupSubmenu;diff --git a/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsx b/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsxindex 79f0acf16ef..810670fcb16 100644--- a/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsx+++ b/src/features/ChatInput/ControlBar/HeteroDeviceSwitcher.tsx@@ -8,6 +8,7 @@ import { Button, Flexbox, Icon, Popover, Tag, toast, Tooltip } from '@lobehub/uiimport { cssVar } from '@lobehub/ui/stylex/cssVar.stylex';import * as stylex from '@stylexjs/stylex';import {+ BoxesIcon,ChevronDownIcon,ExternalLinkIcon,HardDriveIcon,@@ -55,6 +56,7 @@ import { formatLockedControlTooltip } from '../utils/lockedControlTooltip';import DeviceGroupSubmenu from './DeviceGroupSubmenu';import DeviceOptionRow from './DeviceOptionRow';import { getDevicePoolStatus } from './devicePoolStatus';+import GroupSubmenu from './GroupSubmenu';import OptionRow from './OptionRow';import { reconnectDevice } from './reconnectDevice';import { isThisComputerDevice, splitThisComputerDevices } from './thisComputerDevices';@@ -185,13 +187,6 @@ const styles = stylex.create({backgroundImage: 'none',transition: 'color 0.2s',},- groupLabel: {- paddingBlock: '4px',- paddingInline: '8px',- fontSize: '11px',- fontWeight: 500,- color: cssVar.colorTextQuaternary,- },});interface HeteroDeviceSwitcherProps {@@ -656,11 +651,20 @@ const HeteroDeviceSwitcher = memo<HeteroDeviceSwitcherProps>(({ agentId }) => {return executionTarget === target;};+ // The sandboxes share one first-level row, which names the one in use.+ const isLocalSandboxActive = executionTarget === 'local' && localSandboxEnabled;+ const isPersistentSandboxActive = isActive('sandbox') && sandboxMode.persistent;+ const isTemporarySandboxActive = isActive('sandbox') && !sandboxMode.persistent;+ const activeSandboxLabel = isLocalSandboxActive+ ? t('heteroAgent.executionTarget.localSandbox')+ : isPersistentSandboxActive+ ? t('heteroAgent.executionTarget.persistentSandbox')+ : isTemporarySandboxActive+ ? sandboxLabel+ : undefined;+const showLocalRow = isDesktop && (!ownWorkspaceDevice || isActive('local'));const activeDeviceId = executionTarget === 'device' ? boundDeviceId : undefined;- const hasDeviceSection =- privateDevices.length + workspaceDevices.length + personalOnlyDevices.length > 0;- const showSectionLabels = isDesktop || hasDeviceSection;const renderDeviceRow = (d: DeviceListItem,{@@ -741,17 +745,11 @@ const HeteroDeviceSwitcher = memo<HeteroDeviceSwitcherProps>(({ agentId }) => {`local` is still the pick) it keeps its machine name, so two rowsnever both read "This computer". */}{thisComputerDevices.map((d) => renderDeviceRow(d, { thisComputer: !showLocalRow }))}- {/* Built-in keeps the two choices that pick no sandbox (no device, auto);- the sandboxes get a section of their own below. Desktop always labels- the sections, as This computer sits above them. On web they are- labelled once a Devices section follows, so the device directories- don't read as one more sandbox. A heterogeneous agent has neither- built-in row, so only the Sandboxes label is left. */}- {showSectionLabels && !isHetero ? (- <div {...stylex.props(styles.groupLabel)}>- {t('heteroAgent.executionTarget.builtinGroup')}- </div>- ) : null}+ {/* The first level is one plain list with no section labels: the choices+ that run nowhere in particular (no device, auto), then a row per group+ — sandboxes, then devices — whose choices open beside it. Every row+ keeps a one-line description, so the list reads evenly. A+ heterogeneous agent has neither of the first two rows. */}{isHetero ? null : (<OptionRowactive={isActive('none')}@@ -770,118 +768,115 @@ const HeteroDeviceSwitcher = memo<HeteroDeviceSwitcherProps>(({ agentId }) => {onClick={() => void handleSelect('auto')}/>)}- {showSectionLabels ? (- <div {...stylex.props(styles.groupLabel)}>- {t('heteroAgent.executionTarget.sandboxGroup')}- </div>- ) : null}- {/* This machine, fenced: writes confined to the working- directory, network denied unless the switch opens the registry- allowlist. Shown even when the host can't provide a sandbox — disabled,- carrying the real reason, because "unavailable" here usually means- "not installed yet" and silently hiding the feature would strand the- user with no way to find out why. */}- {isDesktop ? (- <OptionRow- active={executionTarget === 'local' && localSandboxEnabled}- disabled={!canUseLocalSandbox}- icon={<Icon icon={ShieldCheckIcon} size={14} />}- label={t('heteroAgent.executionTarget.localSandbox')}- tags={tagsFor(executionTarget === 'local' && localSandboxEnabled)}- desc={- canUseLocalSandbox- ? t(- localSandboxNetwork- ? 'heteroAgent.executionTarget.localSandboxDescNetwork'- : 'heteroAgent.executionTarget.localSandboxDesc',- )- : // Prefer the actionable instruction (Linux's "install this- // package") over the backend's raw diagnostic when we have one.- (sandboxCapability?.instructions ??- t('heteroAgent.executionTarget.localSandboxUnavailable', {- reason: sandboxCapability?.reason ?? '',- }))- }- extra={- canUseLocalSandbox ? (- <>- <InstantSwitch- enabled={localSandboxNetwork}- size={'small'}- onChange={handleToggleSandboxNetwork}- />- <Tooltip title={t('heteroAgent.executionTarget.localSandboxNetworkTip')}>- <span {...stylex.props(styles.extraInfo)}>- <Icon icon={InfoIcon} size={12} />- </span>- </Tooltip>- </>- ) : sandboxCapability?.canInstall ? (- // The backend is missing but we can provision it — a dead-end row- // would leave the user to discover a CLI incantation on their own.- <Button loading={isInstallingSandbox} size={'small'} onClick={handleInstallSandbox}>- {t('heteroAgent.executionTarget.localSandboxSetUp')}- </Button>- ) : undefined- }- onClick={() => void handleSelect('local', undefined, true)}- />- ) : null}- {/* Two sandboxes on one `sandbox` target, the persistent one first: it is- where everyday work belongs, keeping its results and the work behind- them on the drive. The temporary one is discarded after use, which- suits coding and one-off data processing — a repository's- dependencies and build output would only fill the drive. A plan- without a drive sees the persistent row in the same place, tagged,- as the way to one; with no drive at all only the temporary row is- left, described as it always was. */}- {offersPersistentSandbox ? (- <OptionRow- active={isActive('sandbox') && sandboxMode.persistent}- desc={t('heteroAgent.executionTarget.persistentSandboxDesc')}- icon={<Icon icon={HardDriveIcon} size={14} />}- label={t('heteroAgent.executionTarget.persistentSandbox')}- badge={- sandboxMode.driveStatus === 'upgrade' ? (- <Tag color={'gold'} size={'small'} style={{ borderRadius: 999, paddingInline: 8 }}>- {t('pro', { ns: 'common' })}- </Tag>- ) : undefined- }- onClick={() => {- if (sandboxMode.driveStatus === 'upgrade') {- setOpen(false);- openSandboxStorageUpsell();- return;+ <GroupSubmenu+ active={!!activeSandboxLabel}+ desc={t('heteroAgent.executionTarget.sandboxGroupDesc')}+ hint={activeSandboxLabel}+ icon={<Icon icon={BoxesIcon} size={14} />}+ label={t('heteroAgent.executionTarget.sandboxGroup')}+ testId={'sandbox-group'}+ >+ {/* This machine, fenced: writes confined to the working+ directory, network denied unless the switch opens the registry+ allowlist. Shown even when the host can't provide a sandbox — disabled,+ carrying the real reason, because "unavailable" here usually means+ "not installed yet" and silently hiding the feature would strand the+ user with no way to find out why. */}+ {isDesktop ? (+ <OptionRow+ active={isLocalSandboxActive}+ disabled={!canUseLocalSandbox}+ icon={<Icon icon={ShieldCheckIcon} size={14} />}+ label={t('heteroAgent.executionTarget.localSandbox')}+ tags={tagsFor(isLocalSandboxActive)}+ desc={+ canUseLocalSandbox+ ? t(+ localSandboxNetwork+ ? 'heteroAgent.executionTarget.localSandboxDescNetwork'+ : 'heteroAgent.executionTarget.localSandboxDesc',+ )+ : // Prefer the actionable instruction (Linux's "install this+ // package") over the backend's raw diagnostic when we have one.+ (sandboxCapability?.instructions ??+ t('heteroAgent.executionTarget.localSandboxUnavailable', {+ reason: sandboxCapability?.reason ?? '',+ }))+ }+ extra={+ canUseLocalSandbox ? (+ <>+ <InstantSwitch+ enabled={localSandboxNetwork}+ size={'small'}+ onChange={handleToggleSandboxNetwork}+ />+ <Tooltip title={t('heteroAgent.executionTarget.localSandboxNetworkTip')}>+ <span {...stylex.props(styles.extraInfo)}>+ <Icon icon={InfoIcon} size={12} />+ </span>+ </Tooltip>+ </>+ ) : sandboxCapability?.canInstall ? (+ // The backend is missing but we can provision it — a dead-end row+ // would leave the user to discover a CLI incantation on their own.+ <Button loading={isInstallingSandbox} size={'small'} onClick={handleInstallSandbox}>+ {t('heteroAgent.executionTarget.localSandboxSetUp')}+ </Button>+ ) : undefined}- void selectSandbox(true);- }}+ onClick={() => void handleSelect('local', undefined, true)}+ />+ ) : null}+ {/* Two sandboxes on one `sandbox` target, the persistent one first: it is+ where everyday work belongs, keeping its results and the work behind+ them on the drive. The temporary one is discarded after use, which+ suits coding and one-off data processing — a repository's+ dependencies and build output would only fill the drive. A plan+ without a drive sees the persistent row in the same place, tagged,+ as the way to one; with no drive at all only the temporary row is+ left, described as it always was. */}+ {offersPersistentSandbox ? (+ <OptionRow+ active={isPersistentSandboxActive}+ desc={t('heteroAgent.executionTarget.persistentSandboxDesc')}+ icon={<Icon icon={HardDriveIcon} size={14} />}+ label={t('heteroAgent.executionTarget.persistentSandbox')}+ badge={+ sandboxMode.driveStatus === 'upgrade' ? (+ <Tag color={'gold'} size={'small'} style={{ borderRadius: 999, paddingInline: 8 }}>+ {t('pro', { ns: 'common' })}+ </Tag>+ ) : undefined+ }+ onClick={() => {+ if (sandboxMode.driveStatus === 'upgrade') {+ setOpen(false);+ openSandboxStorageUpsell();+ return;+ }+ void selectSandbox(true);+ }}+ />+ ) : null}+ <OptionRow+ active={isTemporarySandboxActive}+ disabled={!supportsSandbox}+ icon={<ExecutionTargetIcon target={'sandbox'} />}+ label={sandboxLabel}+ desc={t(+ !supportsSandbox+ ? 'heteroAgent.executionTarget.sandboxUnsupported'+ : offersPersistentSandbox+ ? 'heteroAgent.executionTarget.temporarySandboxDesc'+ : 'heteroAgent.executionTarget.sandboxDesc',+ { name: heteroType ? HETEROGENEOUS_TYPE_LABELS[heteroType] : undefined },+ )}+ onClick={() => void selectSandbox(false)}/>- ) : null}- <OptionRow- active={isActive('sandbox') && !sandboxMode.persistent}- disabled={!supportsSandbox}- icon={<ExecutionTargetIcon target={'sandbox'} />}- label={sandboxLabel}- desc={t(- !supportsSandbox- ? 'heteroAgent.executionTarget.sandboxUnsupported'- : offersPersistentSandbox- ? 'heteroAgent.executionTarget.temporarySandboxDesc'- : 'heteroAgent.executionTarget.sandboxDesc',- { name: heteroType ? HETEROGENEOUS_TYPE_LABELS[heteroType] : undefined },- )}- onClick={() => void selectSandbox(false)}- />- {/* Devices sit one level down, a row per group: the list keeps growing,- and the built-in environments above should not scroll away with it.- The section gets its own label, as Built-in has, so the group rows- don't read as more built-in environments. */}- {hasDeviceSection ? (- <div {...stylex.props(styles.groupLabel)}>- {t('heteroAgent.executionTarget.devicesGroup')}- </div>- ) : null}+ </GroupSubmenu>+ {/* Devices sit one level down too, a row per group: the list keeps+ growing, and the environments above should not scroll away with it. */}{showDeviceGroups && privateDevices.length > 0 ? (<DeviceGroupSubmenuactiveDeviceId={activeDeviceId}diff --git a/src/features/ChatInput/ControlBar/__tests__/GroupSubmenu.test.tsx b/src/features/ChatInput/ControlBar/__tests__/GroupSubmenu.test.tsxnew file mode 100644index 00000000000..de1c8bdbe1d--- /dev/null+++ b/src/features/ChatInput/ControlBar/__tests__/GroupSubmenu.test.tsx@@ -0,0 +1,34 @@+import { render, screen } from '@testing-library/react';+import type { ReactNode } from 'react';+import { describe, expect, it, vi } from 'vitest';++import GroupSubmenu from '../GroupSubmenu';++vi.mock('@lobehub/ui', async (importOriginal) => ({+ ...(await importOriginal<Record<string, unknown>>()),+ Popover: ({ children, content }: { children: ReactNode; content: ReactNode }) => (+ <div>+ {children}+ <div data-testid={'submenu'}>{content}</div>+ </div>+ ),+}));++describe('GroupSubmenu', () => {+ it('keeps one first-level row and hands its choices to the submenu', () => {+ render(+ <GroupSubmenu hint={'Persistent'} icon={null} label={'Sandboxes'} testId={'group'}>+ <div>choice:temporary</div>+ </GroupSubmenu>,+ );++ const row = screen.getByTestId('group');+ expect(row.textContent).toContain('Sandboxes');+ expect(row.textContent).toContain('Persistent');+ expect(row.textContent).not.toContain('choice:');++ const submenu = screen.getByTestId('submenu');+ expect(submenu.textContent).toContain('Sandboxes');+ expect(submenu.textContent).toContain('choice:temporary');+ });+});diff --git a/src/features/ChatInput/ControlBar/__tests__/HeteroDeviceSwitcher.sandboxMode.test.tsx b/src/features/ChatInput/ControlBar/__tests__/HeteroDeviceSwitcher.sandboxMode.test.tsxindex 6b1f91141eb..4177302fabf 100644--- a/src/features/ChatInput/ControlBar/__tests__/HeteroDeviceSwitcher.sandboxMode.test.tsx+++ b/src/features/ChatInput/ControlBar/__tests__/HeteroDeviceSwitcher.sandboxMode.test.tsx@@ -18,7 +18,8 @@ vi.mock('react-i18next', () => ({useTranslation: () => ({ t: (key: string) => key }),}));-// The menu, open: which rows it offers and what they do is the question.+// The menu, open: which rows it offers and what they do is the question. The+// sandbox submenu is a popover too, so the first `chip` is the composer's.vi.mock('@lobehub/ui', async (importOriginal) => ({...(await importOriginal<object>()),Popover: ({ children, content }: { children: ReactNode; content: ReactNode }) => (@@ -134,7 +135,7 @@ describe('HeteroDeviceSwitcher — persistent sandbox', () => {it('names the plain sandbox temporary next to the persistent one', () => {render(<HeteroDeviceSwitcher agentId="agent-1" />);- expect(screen.getByTestId('chip').textContent).toContain(TEMPORARY);+ expect(screen.getAllByTestId('chip')[0].textContent).toContain(TEMPORARY);expect(screen.queryByText(SANDBOX)).toBeNull();});@@ -166,7 +167,7 @@ describe('HeteroDeviceSwitcher — persistent sandbox', () => {state.persistent = true;render(<HeteroDeviceSwitcher agentId="agent-1" />);- expect(screen.getByTestId('chip').textContent).toContain(PERSISTENT);+ expect(screen.getAllByTestId('chip')[0].textContent).toContain(PERSISTENT);});it('switches to the sandbox and onto the drive when the persistent row is picked', async () => {@@ -209,15 +210,13 @@ describe('HeteroDeviceSwitcher — persistent sandbox', () => {});});-// The sandboxes are a section of their own, apart from the built-in choices-// that run nowhere in particular (no device, auto).-describe('HeteroDeviceSwitcher — sections', () => {- const BUILTIN = 'heteroAgent.executionTarget.builtinGroup';- const SANDBOXES = 'heteroAgent.executionTarget.sandboxGroup';+// T-14345: the first level is a plain list of titles, without section labels+// or descriptions; the sandboxes sit one level down, as the device groups do.+describe('HeteroDeviceSwitcher — first level', () => {const follows = (a: Element, b: Element) =>!!(a.compareDocumentPosition(b) & Node.DOCUMENT_POSITION_FOLLOWING);- it('puts the sandboxes under their own label, after no device and auto', () => {+ beforeEach(() => {state.devices = [{channels: [],@@ -228,22 +227,45 @@ describe('HeteroDeviceSwitcher — sections', () => {scope: 'personal',},];+ });++ it('has no section labels', () => {render(<HeteroDeviceSwitcher agentId="agent-1" />);- const builtin = screen.getByText(BUILTIN);- const auto = screen.getByText('heteroAgent.executionTarget.autoDesc');- const sandboxes = screen.getByText(SANDBOXES);- const persistent = screen.getByText('heteroAgent.executionTarget.persistentSandboxDesc');+ expect(screen.queryByText('heteroAgent.executionTarget.builtinGroup')).toBeNull();+ expect(screen.queryByText('heteroAgent.executionTarget.devicesGroup')).toBeNull();+ });- expect(follows(builtin, auto)).toBe(true);- expect(follows(auto, sandboxes)).toBe(true);- expect(follows(sandboxes, persistent)).toBe(true);+ it('keeps a description line under no device, auto and the sandbox group', () => {+ render(<HeteroDeviceSwitcher agentId="agent-1" />);++ expect(screen.getByText('heteroAgent.executionTarget.noneDesc')).toBeTruthy();+ expect(screen.getByText('heteroAgent.executionTarget.autoDesc')).toBeTruthy();+ expect(screen.getByTestId('sandbox-group').textContent).toContain(+ 'heteroAgent.executionTarget.sandboxGroupDesc',+ );});- it('leaves the sections unlabelled on web without devices', () => {+ it('puts the sandboxes in a submenu after auto and before the device groups', () => {+ render(<HeteroDeviceSwitcher agentId="agent-1" />);++ const group = screen.getByTestId('sandbox-group');+ expect(group.textContent).toContain('heteroAgent.executionTarget.sandboxGroup');+ // The row itself lists no sandbox; they are the submenu's.+ expect(group.textContent).not.toContain('persistentSandboxDesc');++ const auto = screen.getByText('heteroAgent.executionTarget.auto');+ const persistent = screen.getByText('heteroAgent.executionTarget.persistentSandboxDesc');+ const devices = screen.getByText('heteroAgent.executionTarget.myDevicesGroup');+ expect(follows(auto, group)).toBe(true);+ expect(follows(group, persistent)).toBe(true);+ expect(follows(persistent, devices)).toBe(true);+ });++ it('names the sandbox in use on the group row', () => {+ state.persistent = true;render(<HeteroDeviceSwitcher agentId="agent-1" />);- expect(screen.queryByText(BUILTIN)).toBeNull();- expect(screen.queryByText(SANDBOXES)).toBeNull();+ expect(screen.getByTestId('sandbox-group').textContent).toContain(PERSISTENT);});});