SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.
Preferences: group Shortcuts and use cards for Assistant and Plugins (#9883) (#10765)
Nathan Dane908fe48c0bed
diff --git a/assets/locales/ar.json b/assets/locales/ar.jsonindex caf4bd0543..0cb174368c 100644--- a/assets/locales/ar.json+++ b/assets/locales/ar.json@@ -739,34 +739,34 @@"a picked edge's body is gone": "جسم الحافة المحددة لم يعد موجودًا","add a key for a joint first": "أضف أولًا مفتاحًا لمفصل","ai.connected_toast": "أصبح SolidCraft متاحًا في {clients}. أعد تشغيلها لاستخدامه (التفضيلات > المساعد).",- "ai.prefs.allow_control": "السماح لوكلاء الذكاء الاصطناعي بالاتصال (قناة التحكم / MCP)",- "ai.prefs.allow_control_note": "يفتح قناة تحكم على هذا الحاسوب فقط (127.0.0.1، المنفذ 27878 أو أول منفذ متاح بعده). على البرنامج الذي يتصل أن يقدّم أيضًا رمزًا سريًا لا يقرؤه إلا حساب المستخدم الخاص بك، ويُنشأ من جديد عند كل تشغيل. يُطبّق في المرة القادمة التي يبدأ فيها SolidCraft. عند الإيقاف: لا شيء يستمع ما لم تشغّل SolidCraft مع --control.",- "ai.prefs.availability": "عناصر تحكم المساعد",- "ai.prefs.background_commands": "تشغيل أوامر الوكيل في الخلفية",- "ai.prefs.connect_apps": "إتاحة SolidCraft لتطبيقات الذكاء الاصطناعي على هذا الحاسوب",- "ai.prefs.connect_apps_note": "عند بدء تشغيل SolidCraft، يُضاف كخادم MCP إلى تطبيقات الذكاء الاصطناعي الموجودة على هذا الحاسوب (OpenCode وClaude Desktop وClaude Code وCursor وCodex وGemini CLI وCopilot CLI وWindsurf وZed وVS Code)، ليتمكن الوكيل من استخدامه دون أي إعداد. لا يُضاف إلا مُدخل solidcraft أو يُحدَّث مساره؛ ويُترك المُدخل الذي غيّرته كما هو، ويُنسخ الملف احتياطيًا أولًا. عند الإيقاف تُزال المُدخلات التي أضافها. الأمر «المساعدة > ربط مساعدي الذكاء الاصطناعي…» يفعل ذلك يدويًا.",- "ai.prefs.connect_at_start": "الاتصال بآخر وكيل مستخدم عند بدء SolidCraft",+ "ai.prefs.allow_control": "السماح لوكلاء الذكاء الاصطناعي بالاتصال",+ "ai.prefs.allow_control_note": "قناة محلية (MCP). لا شيء يغادر هذا الحاسوب.\n\nيفتح قناة تحكم على هذا الحاسوب فقط (127.0.0.1، المنفذ 27878 أو أول منفذ متاح بعده). على البرنامج الذي يتصل أن يقدّم أيضًا رمزًا سريًا لا يقرؤه إلا حساب المستخدم الخاص بك، ويُنشأ من جديد عند كل تشغيل. يُطبّق في المرة القادمة التي يبدأ فيها SolidCraft. عند الإيقاف: لا شيء يستمع ما لم تشغّل SolidCraft مع --control.",+ "ai.prefs.availability": "التوفر",+ "ai.prefs.background_commands": "تشغيل الأوامر البطيئة في الخلفية",+ "ai.prefs.connect_apps": "إضافة SolidCraft إلى تطبيقات الذكاء الاصطناعي",+ "ai.prefs.connect_apps_note": "إيقافه يزيل الإدخالات مجدداً.\n\nعند بدء تشغيل SolidCraft، يُضاف كخادم MCP إلى تطبيقات الذكاء الاصطناعي الموجودة على هذا الحاسوب (OpenCode وClaude Desktop وClaude Code وCursor وCodex وGemini CLI وCopilot CLI وWindsurf وZed وVS Code)، ليتمكن الوكيل من استخدامه دون أي إعداد. لا يُضاف إلا مُدخل solidcraft أو يُحدَّث مساره؛ ويُترك المُدخل الذي غيّرته كما هو، ويُنسخ الملف احتياطيًا أولًا. عند الإيقاف تُزال المُدخلات التي أضافها. الأمر «المساعدة > ربط مساعدي الذكاء الاصطناعي…» يفعل ذلك يدويًا.",+ "ai.prefs.connect_at_start": "توصيل آخر وكيل عند البدء","ai.prefs.connect_at_start_note": "يبدأ في الخلفية الوكيل الذي اتصلت به آخر مرة (أو الوكيل الافتراضي) في كل مرة يبدأ فيها SolidCraft، ليكون جاهزًا للمحادثة. لا يحدث ذلك عند بدء SolidCraft مع --control. إذا تعذّر الاتصال، يعرض المساعد «فشل الاتصال» وزر «إعادة المحاولة».",- "ai.prefs.follow_camera": "توجيه الكاميرا نحو الرسومات",+ "ai.prefs.follow_camera": "اتباع الكاميرا","ai.prefs.follow_camera_off": "تتبّع الكاميرا التلقائي متوقف.","ai.prefs.follow_camera_on": "تتجه الكاميرا نحو الرسومات التي ينشئها الوكيل.",- "ai.prefs.intro": "الوكلاء والأذونات وطريقة ظهور عملهم.",- "ai.prefs.make_default": "الاستخدام افتراضيًا",+ "ai.prefs.intro": "وكلاء الذكاء الاصطناعي في SolidCraft.",+ "ai.prefs.make_default": "تعيين كافتراضي","ai.prefs.no_agents": "لا يوجد وكلاء بعد. أضف وكيلًا أو حدّث القائمة للعثور على الوكلاء المثبّتين.","ai.prefs.no_saved_approvals": "لا توجد موافقات محفوظة.",- "ai.prefs.open_at_start": "فتح لوحة المساعد عند بدء SolidCraft",+ "ai.prefs.open_at_start": "فتح المحادثة عند البدء","ai.prefs.open_at_start_note": "يعرض لوحة المساعد (أو نافذتها المستقلة) في كل مرة يبدأ فيها SolidCraft. لا يحدث ذلك عند بدء SolidCraft مع --control.","ai.prefs.override_all_warning": "قد يحفظ هذا الوكيل التصميم أو يكتب فوقه أو يصدّره أو يستبدله دون أن يسأل.",- "ai.prefs.permission_all": "السماح بكل شيء",- "ai.prefs.permission_all_summary": "تعمل أدوات SolidCraft المتاحة دون سؤال.",- "ai.prefs.permission_ask": "السؤال قبل التغييرات",- "ai.prefs.permission_ask_summary": "الموافقة على كل تغيير في التصميم وكل إجراء على الملفات.",- "ai.prefs.permission_edits": "السماح بتعديلات النموذج",- "ai.prefs.permission_edits_summary": "تُنفَّذ تعديلات النموذج، وتبقى إجراءات الملفات والإجراءات المدمّرة تتطلب السؤال.",+ "ai.prefs.permission_all": "فعل كل شيء",+ "ai.prefs.permission_all_summary": "لا يسأل أبداً",+ "ai.prefs.permission_ask": "السؤال أولاً",+ "ai.prefs.permission_ask_summary": "يسأل عن كل تغيير",+ "ai.prefs.permission_edits": "إجراء تعديلات",+ "ai.prefs.permission_edits_summary": "يعدّل بحرية ويسأل عن الباقي","ai.prefs.permission_scope": "لأدوات SolidCraft فقط. أوامر الطرفية وتعديلات الملفات لدى الوكيل تتبع أذوناته الخاصة.","ai.prefs.pointer_preview_hidden": "المؤشر مخفي","ai.prefs.pointer_preview_speed": "مؤشر الوكيل · {speed}",- "ai.prefs.pointer_speed": "سرعة الحركة",+ "ai.prefs.pointer_speed": "السرعة","ai.prefs.privacy_note": "لا يستلم المحادثة إلا الوكيل أو نقطة الاتصال التي تختارها. تُخزَّن مفاتيح نقاط الاتصال في سلسلة مفاتيح النظام.","ai.prefs.show_pointer": "إظهار مؤشر الوكيل","ai.prefs.turn_limit_hint": "الحد الأقصى لاستدعاءات الأدوات التي تغيّر التصميم في الرسالة الواحدة.",@@ -4417,7 +4417,7 @@"ui.agent_chat_send_now_tip": "إيقاف خطوة الوكيل الحالية وإرسال هذه بعدها (Ctrl+Enter)","ui.agent_chat_setup_body": "يتواصل SolidCraft مع وكيل برمجة مثبّت على هذا الحاسوب. اختر واحدًا من التفضيلات › الوكيل.","ui.agent_chat_setup_title": "إعداد مساعد",- "ui.agent_chat_side": "جانب محادثة الوكيل",+ "ui.agent_chat_side": "إرساء المحادثة","ui.agent_chat_signed_in": "سجّل الدخول","ui.agent_chat_state_auth": "يلزم تسجيل الدخول","ui.agent_chat_state_busy": "جارٍ العمل…",@@ -4482,14 +4482,14 @@"ui.ai_key_note": "يُخزّن في سلسلة مفاتيح النظام، وليس في إعدادات SolidCraft أبدًا. اتركه فارغًا لخادم محلي.","ui.ai_keychain_error": "رفضت سلسلة مفاتيح النظام: {error}","ui.ai_kind": "النوع",- "ui.ai_mode_all": "السماح بكل شيء",+ "ui.ai_mode_all": "فعل كل شيء","ui.ai_mode_all_note": "لا شيء يسأل أولًا. تبقى تقارير الأعطال محظورة وتظل حدود المجلدات سارية.","ui.ai_mode_all_warning": "يمكن للوكيل حفظ تصميمك والكتابة فوقه وتصديره واستبداله دون سؤال. استخدم هذا فقط مع وكيل تثق به، وعلى تصاميم حفظتها.",- "ui.ai_mode_ask": "السؤال في كل مرة",+ "ui.ai_mode_ask": "السؤال أولاً","ui.ai_mode_ask_note": "كل تغيير في التصميم وكل إجراء على الملفات ينتظر سماحك.",- "ui.ai_mode_edits": "السماح تلقائيًا بتعديلات النموذج",+ "ui.ai_mode_edits": "إجراء تعديلات","ui.ai_mode_edits_note": "أوامر النمذجة تعمل دون سؤال؛ أما الحفظ والفتح والتصدير وإجراءات الملفات أو الإجراءات الهدّامة الأخرى فتسأل.",- "ui.ai_mode_global": "كما هو مضبوط أعلاه",+ "ui.ai_mode_global": "كما في الأعلى","ui.ai_model": "النموذج","ui.ai_model_hint": "qwen3:14b","ui.ai_modes_scope": "هذه الإعدادات تغطي أدوات SolidCraft. أدوات الوكيل الخاصة (الصدفة وتعديل الملفات) تتبع وضع الوكيل الخاص، الذي تختاره في رأس لوحة المحادثة عندما تكون للوكيل أوضاع.",@@ -4515,7 +4515,7 @@"ui.ai_save": "حفظ","ui.ai_settings": "إعدادات الذكاء الاصطناعي…","ui.ai_show_features": "إظهار ميزات الذكاء الاصطناعي",- "ui.ai_show_features_note": "محادثة الوكيل: لوحة يعمل فيها وكيل برمجي تستخدمه أصلًا، أو نقطة نهاية نموذج تختارها، على التصميم المفتوح. عند الإيقاف: لا زر ولا اختصار ولا عنصر قائمة ولا لوحة للذكاء الاصطناعي، ولا يُبحث عن شيء أو يُشغّل.",+ "ui.ai_show_features_note": "إيقافه يخفي المساعد في كل مكان ولا يبدأ أي شيء. تصبح كل الخيارات أدناه باهتة.\n\nمحادثة الوكيل: لوحة يعمل فيها وكيل برمجي تستخدمه أصلًا، أو نقطة نهاية نموذج تختارها، على التصميم المفتوح. عند الإيقاف: لا زر ولا اختصار ولا عنصر قائمة ولا لوحة للذكاء الاصطناعي، ولا يُبحث عن شيء أو يُشغّل.","ui.ai_switch_tip": "تغيير الوكيل لهذه المحادثة","ui.ai_test": "اختبار","ui.ai_test_acp_ok": "يجيب: {agent}",@@ -4549,7 +4549,7 @@"ui.ai_tool_sum_then": "{first}، ثم {next}","ui.ai_tool_unfold": "انقر لعرض ما أعاده","ui.ai_tool_waiting": "بالانتظار",- "ui.ai_toolbar_button": "إظهار الزر في شريط الأدوات",+ "ui.ai_toolbar_button": "زر المساعد في شريط التطبيق","ui.ai_toolbar_button_note": "زر الذكاء الاصطناعي في الطرف الأيمن من شريط الأدوات. يظل Ctrl+Shift+A وقائمة العرض يفتحان اللوحة.","ui.ai_undo_tip": "التراجع عن كل ما غيّره الوكيل لهذه الرسالة، بخطوة واحدة","ui.ai_url_hint": "https://example.com/v1",diff --git a/assets/locales/de.json b/assets/locales/de.jsonindex 871604ac15..92f8231b62 100644--- a/assets/locales/de.json+++ b/assets/locales/de.json@@ -739,36 +739,36 @@"a picked edge's body is gone": "der Körper einer gewählten Kante existiert nicht mehr","add a key for a joint first": "zuerst einen Schlüssel für ein Gelenk hinzufügen","ai.connected_toast": "SolidCraft ist jetzt in {clients} verfügbar. Starten Sie diese neu, um es zu nutzen (Einstellungen > Assistent).",- "ai.prefs.allow_control": "Verbindungen von KI-Agenten zulassen (Steuerkanal / MCP)",- "ai.prefs.allow_control_note": "Öffnet einen Steuerkanal nur auf diesem Computer (127.0.0.1, Port 27878 oder der nächste freie). Ein verbindendes Programm muss zusätzlich ein geheimes Token vorweisen, das nur Ihr Benutzerkonto lesen kann und bei jedem Start neu erzeugt wird. Wirkt ab dem nächsten Start von SolidCraft. Aus: Es wartet nichts auf Verbindungen, außer Sie starten SolidCraft mit --control.",- "ai.prefs.availability": "Assistenten-Steuerung",- "ai.prefs.background_commands": "Agentenbefehle im Hintergrund ausführen",- "ai.prefs.connect_apps": "SolidCraft für KI-Apps auf diesem Computer verfügbar machen",- "ai.prefs.connect_apps_note": "Trägt SolidCraft beim Start als MCP-Server in die auf diesem Computer gefundenen KI-Apps ein (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), damit ein Agent es ohne Einrichtung nutzen kann. Nur der Eintrag „solidcraft“ wird hinzugefügt oder sein Pfad aktualisiert; ein von Ihnen geänderter Eintrag bleibt unberührt, und die Datei wird vorher gesichert. Aus: Die hinzugefügten Einträge werden entfernt. Hilfe > KI-Assistenten verbinden… erledigt das von Hand.",- "ai.prefs.connect_at_start": "Zuletzt verwendeten Agenten beim Start von SolidCraft verbinden",+ "ai.prefs.allow_control": "KI-Agenten verbinden lassen",+ "ai.prefs.allow_control_note": "Ein lokaler Kanal (MCP). Nichts verlässt diesen Computer.\n\nÖffnet einen Steuerkanal nur auf diesem Computer (127.0.0.1, Port 27878 oder der nächste freie). Ein verbindendes Programm muss zusätzlich ein geheimes Token vorweisen, das nur Ihr Benutzerkonto lesen kann und bei jedem Start neu erzeugt wird. Wirkt ab dem nächsten Start von SolidCraft. Aus: Es wartet nichts auf Verbindungen, außer Sie starten SolidCraft mit --control.",+ "ai.prefs.availability": "Verfügbarkeit",+ "ai.prefs.background_commands": "Langsame Befehle im Hintergrund ausführen",+ "ai.prefs.connect_apps": "SolidCraft zu KI-Apps hinzufügen",+ "ai.prefs.connect_apps_note": "Aus entfernt die Einträge wieder.\n\nTrägt SolidCraft beim Start als MCP-Server in die auf diesem Computer gefundenen KI-Apps ein (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), damit ein Agent es ohne Einrichtung nutzen kann. Nur der Eintrag „solidcraft“ wird hinzugefügt oder sein Pfad aktualisiert; ein von Ihnen geänderter Eintrag bleibt unberührt, und die Datei wird vorher gesichert. Aus: Die hinzugefügten Einträge werden entfernt. Hilfe > KI-Assistenten verbinden… erledigt das von Hand.",+ "ai.prefs.connect_at_start": "Letzten Agenten beim Start verbinden","ai.prefs.connect_at_start_note": "Verbindet beim Start von SolidCraft automatisch den zuletzt verwendeten Agenten (oder den Standardagenten) im Hintergrund, damit er für den Chat bereitsteht. Diese Funktion ist deaktiviert, wenn SolidCraft mit --control gestartet wird. Kann keine Verbindung hergestellt werden, zeigt der Assistent „Verbindung fehlgeschlagen“ und eine Schaltfläche zum erneuten Verbindungsversuch an.",- "ai.prefs.follow_camera": "Kamera zu Skizzen drehen",+ "ai.prefs.follow_camera": "Der Kamera folgen","ai.prefs.follow_camera_off": "Die automatische Kameraführung ist aus.","ai.prefs.follow_camera_on": "Die Kamera dreht sich zu Skizzen, die der Agent erstellt.",- "ai.prefs.intro": "Agenten, Berechtigungen und wie ihre Arbeit angezeigt wird.",- "ai.prefs.make_default": "Standardmäßig verwenden",+ "ai.prefs.intro": "KI-Agenten in SolidCraft.",+ "ai.prefs.make_default": "Als Standard festlegen","ai.prefs.no_agents": "Noch keine Agenten. Fügen Sie einen Agenten hinzu oder aktualisieren Sie, um installierte Agenten zu finden.","ai.prefs.no_saved_approvals": "Keine gespeicherten Freigaben.",- "ai.prefs.open_at_start": "Assistentenbereich beim Start von SolidCraft öffnen",+ "ai.prefs.open_at_start": "Chat beim Start öffnen","ai.prefs.open_at_start_note": "Öffnet beim Start von SolidCraft automatisch den Assistentenbereich oder dessen separates Fenster. Diese Funktion ist deaktiviert, wenn SolidCraft mit --control gestartet wird.","ai.prefs.override_all_warning": "Dieser Agent darf das Design ohne Rückfrage speichern, überschreiben, exportieren oder ersetzen.",- "ai.prefs.permission_all": "Alles erlauben",- "ai.prefs.permission_all_summary": "Verfügbare SolidCraft-Werkzeuge werden ohne Rückfrage ausgeführt.",- "ai.prefs.permission_ask": "Vor Änderungen fragen",- "ai.prefs.permission_ask_summary": "Jede Designänderung und Dateiaktion bestätigen.",- "ai.prefs.permission_edits": "Modelländerungen erlauben",- "ai.prefs.permission_edits_summary": "Modelländerungen werden ohne Rückfrage ausgeführt; Datei- und destruktive Aktionen fragen weiterhin nach.",+ "ai.prefs.permission_all": "Alles ausführen",+ "ai.prefs.permission_all_summary": "Fragt nie nach",+ "ai.prefs.permission_ask": "Zuerst fragen",+ "ai.prefs.permission_ask_summary": "Fragt bei jeder Änderung",+ "ai.prefs.permission_edits": "Änderungen vornehmen",+ "ai.prefs.permission_edits_summary": "Ändert frei, fragt beim Rest","ai.prefs.permission_scope": "Gilt nur für SolidCraft-Werkzeuge. Shell und Dateiänderungen des Agenten unterliegen dessen eigenen Berechtigungen.","ai.prefs.pointer_preview_hidden": "Zeiger ausgeblendet","ai.prefs.pointer_preview_speed": "Agentenzeiger · {speed}",- "ai.prefs.pointer_speed": "Bewegungsgeschwindigkeit",+ "ai.prefs.pointer_speed": "Geschwindigkeit","ai.prefs.privacy_note": "Die Unterhaltung geht nur an den von Ihnen gewählten Agenten oder API-Endpunkt. API-Schlüssel werden im Schlüsselbund des Systems gespeichert.",- "ai.prefs.show_pointer": "Agentenzeiger anzeigen",+ "ai.prefs.show_pointer": "Zeiger des Agenten anzeigen","ai.prefs.turn_limit_hint": "Höchstzahl designändernder Werkzeugaufrufe, die der Assistent für eine Nachricht ausführen darf.","angle, height": "Winkel, Höhe","appearance.dielectric_ior": "Brechungsindex des Dielektrikums",@@ -4394,7 +4394,7 @@"ui.agent_chat_send_now_tip": "Den aktuellen Schritt des Agenten stoppen und dies als Nächstes senden (Strg+Eingabe)","ui.agent_chat_setup_body": "SolidCraft kommuniziert mit einem auf diesem Computer installierten Programmieragenten. Wählen Sie einen unter Einstellungen › KI aus.","ui.agent_chat_setup_title": "Assistenten einrichten",- "ui.agent_chat_side": "Seite des Agenten-Chats",+ "ui.agent_chat_side": "Chat andocken","ui.agent_chat_signed_in": "angemeldet","ui.agent_chat_state_auth": "Anmeldung nötig","ui.agent_chat_state_busy": "Arbeitet…",@@ -4413,7 +4413,7 @@"ui.agent_chat_undone": "(rückgängig gemacht)","ui.agent_chat_view_attached": "Ansicht angehängt","ui.agent_chat_waiting": "Wartet auf Sie",- "ui.agent_cursor": "Agent-Cursor",+ "ui.agent_cursor": "Agentenzeiger","ui.agent_cursor_speed": "Agent-Cursor-Geschwindigkeit","ui.agent_off_thread": "Fenster bedienbar halten, während Agenten Befehle ausführen","ui.agent_off_thread_note": "Langsame Befehle eines Agenten (aus dem Assistentenbereich oder von einem MCP-Client) werden neben dem Fenster berechnet: Sie können die Ansicht weiter drehen und prüfen und einen Befehl über den Chip in der Ansicht stoppen. Aus: Jeder läuft im Thread des Fensters, und das Fenster wartet darauf.",@@ -4459,14 +4459,14 @@"ui.ai_key_note": "Im Schlüsselbund des Systems gespeichert, nie in den Einstellungen von SolidCraft. Für einen lokalen Server leer lassen.","ui.ai_keychain_error": "Der Schlüsselbund des Systems hat abgelehnt: {error}","ui.ai_kind": "Art",- "ui.ai_mode_all": "Alles erlauben",+ "ui.ai_mode_all": "Alles ausführen","ui.ai_mode_all_note": "Nichts fragt vorher. Absturzberichte bleiben tabu, und die Ordnergrenzen gelten weiter.","ui.ai_mode_all_warning": "Der Agent kann Ihr Design ohne Nachfrage speichern, überschreiben, exportieren und ersetzen. Nutzen Sie das nur mit einem Agenten, dem Sie vertrauen, und mit gespeicherten Designs.",- "ui.ai_mode_ask": "Jedes Mal fragen",+ "ui.ai_mode_ask": "Zuerst fragen","ui.ai_mode_ask_note": "Jede Änderung am Design und jede Dateiaktion wartet auf Ihr Erlauben.",- "ui.ai_mode_edits": "Modelländerungen automatisch erlauben",+ "ui.ai_mode_edits": "Änderungen vornehmen","ui.ai_mode_edits_note": "Modellierbefehle laufen ohne Nachfrage; Speichern, Öffnen, Exportieren und andere Datei- oder destruktive Aktionen fragen weiterhin.",- "ui.ai_mode_global": "Wie oben eingestellt",+ "ui.ai_mode_global": "Wie oben","ui.ai_model": "Modell","ui.ai_model_hint": "qwen3:14b","ui.ai_modes_scope": "Diese Einstellungen gelten für die Werkzeuge von SolidCraft. Die eigenen Werkzeuge eines Agenten (seine Shell, seine Dateiänderungen) folgen seinem eigenen Modus, den Sie im Kopf des Chat-Panels wählen, wenn der Agent Modi hat.",@@ -4492,7 +4492,7 @@"ui.ai_save": "Speichern","ui.ai_settings": "KI-Einstellungen…","ui.ai_show_features": "KI-Funktionen anzeigen",- "ui.ai_show_features_note": "Der Agenten-Chat: ein Panel, in dem ein Coding-Agent, den Sie schon nutzen, oder ein Modell-Endpunkt Ihrer Wahl am geöffneten Design arbeitet. Aus: keine KI-Schaltfläche, kein Kürzel, kein Menüeintrag, kein Panel, und nichts wird gesucht oder gestartet.",+ "ui.ai_show_features_note": "Aus blendet den Assistenten überall aus und startet nichts. Alles darunter wird gedimmt.\n\nDer Agenten-Chat: ein Panel, in dem ein Coding-Agent, den Sie schon nutzen, oder ein Modell-Endpunkt Ihrer Wahl am geöffneten Design arbeitet. Aus: keine KI-Schaltfläche, kein Kürzel, kein Menüeintrag, kein Panel, und nichts wird gesucht oder gestartet.","ui.ai_switch_tip": "Den Agenten für dieses Gespräch wechseln","ui.ai_test": "Testen","ui.ai_test_acp_ok": "Antwortet: {agent}",@@ -4526,7 +4526,7 @@"ui.ai_tool_sum_then": "{first}, dann {next}","ui.ai_tool_unfold": "Klicken, um das Ergebnis zu zeigen","ui.ai_tool_waiting": "wartet",- "ui.ai_toolbar_button": "Schaltfläche in der Werkzeugleiste anzeigen",+ "ui.ai_toolbar_button": "Assistent-Schaltfläche in der Anwendungsleiste","ui.ai_toolbar_button_note": "Die KI-Schaltfläche am rechten Ende der Werkzeugleiste. Strg+Umschalt+A und das Ansicht-Menü öffnen das Panel weiterhin.","ui.ai_undo_tip": "Alles, was der Agent für diese Nachricht geändert hat, in einem Schritt rückgängig machen","ui.ai_url_hint": "https://example.com/v1",diff --git a/assets/locales/en.json b/assets/locales/en.jsonindex fbcc96c0cc..fec732adb3 100644--- a/assets/locales/en.json+++ b/assets/locales/en.json@@ -739,36 +739,36 @@"a picked edge's body is gone": "a picked edge's body is gone","add a key for a joint first": "add a key for a joint first","ai.connected_toast": "SolidCraft is now available in {clients}. Restart them to use it (Preferences > Assistant).",- "ai.prefs.allow_control": "Let AI agents connect (control channel / MCP)",- "ai.prefs.allow_control_note": "Opens a control channel on this computer only (127.0.0.1, port 27878 or the next free one). A program that connects must also show a secret token that only your user account can read, made fresh at every start. Takes effect the next time SolidCraft starts. Off: nothing listens unless you start SolidCraft with --control.",- "ai.prefs.availability": "Assistant controls",- "ai.prefs.background_commands": "Run agent commands in the background",- "ai.prefs.connect_apps": "Make SolidCraft available to AI apps on this computer",- "ai.prefs.connect_apps_note": "When SolidCraft starts, adds it as an MCP server to the AI apps found on this computer (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), so an agent can use it without any setup. Only the solidcraft entry is added or its path refreshed; an entry you changed is left alone, and the file is backed up first. Off: the entries it added are removed. Help > Connect AI assistants… does this by hand.",- "ai.prefs.connect_at_start": "Connect the last-used agent when SolidCraft starts",+ "ai.prefs.allow_control": "Let AI agents connect",+ "ai.prefs.allow_control_note": "A local channel (MCP). Nothing leaves this computer.\n\nOpens a control channel on this computer only (127.0.0.1, port 27878 or the next free one). A program that connects must also show a secret token that only your user account can read, made fresh at every start. Takes effect the next time SolidCraft starts. Off: nothing listens unless you start SolidCraft with --control.",+ "ai.prefs.availability": "Availability",+ "ai.prefs.background_commands": "Run slow commands in the background",+ "ai.prefs.connect_apps": "Add SolidCraft to AI apps",+ "ai.prefs.connect_apps_note": "Off takes the entries out again.\n\nWhen SolidCraft starts, adds it as an MCP server to the AI apps found on this computer (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), so an agent can use it without any setup. Only the solidcraft entry is added or its path refreshed; an entry you changed is left alone, and the file is backed up first. Off: the entries it added are removed. Help > Connect AI assistants… does this by hand.",+ "ai.prefs.connect_at_start": "Connect the last agent at start","ai.prefs.connect_at_start_note": "Starts the agent you connected last (or the default one) in the background each time SolidCraft starts, so it is ready for chatting. Not when SolidCraft is started with --control. If it cannot connect, the Assistant shows Connection failed and a Retry button.",- "ai.prefs.follow_camera": "Turn the camera to sketches",+ "ai.prefs.follow_camera": "Follow the camera","ai.prefs.follow_camera_off": "Automatic camera following is off.","ai.prefs.follow_camera_on": "The camera turns to face sketches the agent creates.",- "ai.prefs.intro": "Agents, permissions and how their work appears.",- "ai.prefs.make_default": "Use by default",+ "ai.prefs.intro": "AI agents in SolidCraft.",+ "ai.prefs.make_default": "Make default","ai.prefs.no_agents": "No agents yet. Add an agent or refresh to find installed agents.","ai.prefs.no_saved_approvals": "No saved approvals.",- "ai.prefs.open_at_start": "Open the Assistant panel when SolidCraft starts",+ "ai.prefs.open_at_start": "Open the chat at start","ai.prefs.open_at_start_note": "Shows the Assistant panel (or its own window) each time SolidCraft starts. Not when SolidCraft is started with --control.","ai.prefs.override_all_warning": "This agent may save, overwrite, export or replace the design without asking.",- "ai.prefs.permission_all": "Allow everything",- "ai.prefs.permission_all_summary": "Available SolidCraft tools run without asking.",- "ai.prefs.permission_ask": "Ask before changes",- "ai.prefs.permission_ask_summary": "Approve every design change and file action.",- "ai.prefs.permission_edits": "Allow model edits",- "ai.prefs.permission_edits_summary": "Model edits run; file and destructive actions still ask.",+ "ai.prefs.permission_all": "Do everything",+ "ai.prefs.permission_all_summary": "Never asks",+ "ai.prefs.permission_ask": "Ask first",+ "ai.prefs.permission_ask_summary": "Asks for every change",+ "ai.prefs.permission_edits": "Make edits",+ "ai.prefs.permission_edits_summary": "Edits freely, asks for the rest","ai.prefs.permission_scope": "For SolidCraft tools only. The agent’s shell and file edits use its own permissions.","ai.prefs.pointer_preview_hidden": "Pointer hidden","ai.prefs.pointer_preview_speed": "Agent pointer · {speed}",- "ai.prefs.pointer_speed": "Motion speed",+ "ai.prefs.pointer_speed": "Speed","ai.prefs.privacy_note": "Only your chosen agent or endpoint receives the conversation. Endpoint keys are stored in your system keychain.",- "ai.prefs.show_pointer": "Show agent pointer",+ "ai.prefs.show_pointer": "Show the agent's pointer","ai.prefs.turn_limit_hint": "Maximum design-changing tool calls the Assistant may make for one message.","angle, height": "angle, height","appearance.dielectric_ior": "Dielectric IOR",@@ -4417,7 +4417,7 @@"ui.agent_chat_send_now_tip": "Stop the agent's current step and send this next (Ctrl+Enter)","ui.agent_chat_setup_body": "SolidCraft talks to a coding agent installed on this computer. Pick one in Preferences › AI.","ui.agent_chat_setup_title": "Set up an assistant",- "ui.agent_chat_side": "Agent chat side",+ "ui.agent_chat_side": "Dock the chat","ui.agent_chat_signed_in": "signed in","ui.agent_chat_state_auth": "Sign-in needed","ui.agent_chat_state_busy": "Working…",@@ -4436,7 +4436,7 @@"ui.agent_chat_undone": "(undone)","ui.agent_chat_view_attached": "View attached","ui.agent_chat_waiting": "Waiting for you",- "ui.agent_cursor": "Agent cursor",+ "ui.agent_cursor": "Agent pointer","ui.agent_cursor_speed": "Agent cursor speed","ui.agent_off_thread": "Keep the window responsive while agents run commands","ui.agent_off_thread_note": "An agent's slow commands (from the AI panel or an MCP client) compute beside the window: you can keep turning and inspecting the view, and stop one from the chip in the view. Off: each runs on the window's thread and the window waits for it.",@@ -4482,14 +4482,14 @@"ui.ai_key_note": "Stored in the system keychain, never in SolidCraft's settings. Leave it empty for a local server.","ui.ai_keychain_error": "The system keychain refused: {error}","ui.ai_kind": "Kind",- "ui.ai_mode_all": "Allow everything",+ "ui.ai_mode_all": "Do everything","ui.ai_mode_all_note": "Nothing asks first. Crash reports stay off limits and the folder limits still apply.","ui.ai_mode_all_warning": "The agent can save, overwrite, export and replace your design without asking. Use this only with an agent you trust, on designs you have saved.",- "ui.ai_mode_ask": "Ask every time",+ "ui.ai_mode_ask": "Ask first","ui.ai_mode_ask_note": "Every change to the design, and every file action, waits for your Allow.",- "ui.ai_mode_edits": "Auto-allow model edits",+ "ui.ai_mode_edits": "Make edits","ui.ai_mode_edits_note": "Modeling commands run without asking; saving, opening, exporting and other file or destructive actions still ask.",- "ui.ai_mode_global": "As set above",+ "ui.ai_mode_global": "Same as above","ui.ai_model": "Model","ui.ai_model_hint": "qwen3:14b","ui.ai_modes_scope": "These settings cover SolidCraft's tools. An agent's own tools (its shell, its file edits) follow the agent's own mode, which you pick in the chat panel's header when the agent has modes.",@@ -4515,7 +4515,7 @@"ui.ai_save": "Save","ui.ai_settings": "AI settings…","ui.ai_show_features": "Show AI features",- "ui.ai_show_features_note": "The agent chat: a panel where a coding agent you already use, or a model endpoint you choose, works on the open design. Off: no AI button, shortcut, menu entry or panel, and nothing is looked for or started.",+ "ui.ai_show_features_note": "Off hides the Assistant everywhere and starts nothing. Everything below dims.\n\nThe agent chat: a panel where a coding agent you already use, or a model endpoint you choose, works on the open design. Off: no AI button, shortcut, menu entry or panel, and nothing is looked for or started.","ui.ai_switch_tip": "Change the agent for this conversation","ui.ai_test": "Test","ui.ai_test_acp_ok": "Answers: {agent}",@@ -4549,7 +4549,7 @@"ui.ai_tool_sum_then": "{first}, then {next}","ui.ai_tool_unfold": "Click to show what it returned","ui.ai_tool_waiting": "waiting",- "ui.ai_toolbar_button": "Show Assistant button in application bar",+ "ui.ai_toolbar_button": "Assistant button in the application bar","ui.ai_toolbar_button_note": "The Assistant button in the application bar. Ctrl+Shift+A and the View menu still open the panel.","ui.ai_undo_tip": "Undo everything the agent changed for this message, as one step","ui.ai_url_hint": "https://example.com/v1",diff --git a/assets/locales/he.json b/assets/locales/he.jsonindex f1628e5924..af1bdf4b28 100644--- a/assets/locales/he.json+++ b/assets/locales/he.json@@ -739,36 +739,36 @@"a picked edge's body is gone": "הגוף של המקצוע שנבחר כבר לא קיים","add a key for a joint first": "יש להוסיף תחילה מפתח למפרק","ai.connected_toast": "SolidCraft זמין עכשיו ב־{clients}. יש להפעיל אותם מחדש כדי להשתמש בו (הגדרות > עוזר).",- "ai.prefs.allow_control": "התרת חיבור לסוכני בינה מלאכותית (ערוץ בקרה / MCP)",- "ai.prefs.allow_control_note": "פותח ערוץ בקרה במחשב זה בלבד (127.0.0.1, פורט 27878 או הפנוי הבא). תוכנה שמתחברת צריכה גם להציג אסימון סודי שרק חשבון המשתמש שלך יכול לקרוא, ונוצר מחדש בכל הפעלה. ייכנס לתוקף בהפעלה הבאה של SolidCraft. כבוי: שום דבר אינו מאזין, אלא אם SolidCraft מופעל עם --control.",- "ai.prefs.availability": "פקדי העוזר",- "ai.prefs.background_commands": "הרצת פקודות הסוכן ברקע",- "ai.prefs.connect_apps": "הנגשת SolidCraft ליישומי בינה מלאכותית במחשב זה",- "ai.prefs.connect_apps_note": "בהפעלת SolidCraft הוא מתווסף כשרת MCP ליישומי הבינה המלאכותית שנמצאו במחשב זה (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), כך שסוכן יכול להשתמש בו בלי שום הגדרה. רק הרשומה solidcraft נוספת או שהנתיב שלה מתעדכן; רשומה ששינית נשארת כפי שהיא, ולפני כן נשמר גיבוי של הקובץ. כבוי: הרשומות שנוספו מוסרות. הפקודה עזרה > חיבור עוזרי בינה מלאכותית… עושה זאת ידנית.",- "ai.prefs.connect_at_start": "התחברות לסוכן האחרון שבו השתמשת בהפעלת SolidCraft",+ "ai.prefs.allow_control": "לאפשר לסוכני AI להתחבר",+ "ai.prefs.allow_control_note": "ערוץ מקומי (MCP). שום דבר לא יוצא מהמחשב הזה.\n\nפותח ערוץ בקרה במחשב זה בלבד (127.0.0.1, פורט 27878 או הפנוי הבא). תוכנה שמתחברת צריכה גם להציג אסימון סודי שרק חשבון המשתמש שלך יכול לקרוא, ונוצר מחדש בכל הפעלה. ייכנס לתוקף בהפעלה הבאה של SolidCraft. כבוי: שום דבר אינו מאזין, אלא אם SolidCraft מופעל עם --control.",+ "ai.prefs.availability": "זמינות",+ "ai.prefs.background_commands": "להפעיל פקודות איטיות ברקע",+ "ai.prefs.connect_apps": "להוסיף את SolidCraft ליישומי AI",+ "ai.prefs.connect_apps_note": "כיבוי מסיר שוב את הרשומות.\n\nבהפעלת SolidCraft הוא מתווסף כשרת MCP ליישומי הבינה המלאכותית שנמצאו במחשב זה (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code), כך שסוכן יכול להשתמש בו בלי שום הגדרה. רק הרשומה solidcraft נוספת או שהנתיב שלה מתעדכן; רשומה ששינית נשארת כפי שהיא, ולפני כן נשמר גיבוי של הקובץ. כבוי: הרשומות שנוספו מוסרות. הפקודה עזרה > חיבור עוזרי בינה מלאכותית… עושה זאת ידנית.",+ "ai.prefs.connect_at_start": "לחבר את הסוכן האחרון בהפעלה","ai.prefs.connect_at_start_note": "מפעיל ברקע את הסוכן שאליו התחברת לאחרונה (או את סוכן ברירת המחדל) בכל הפעלה של SolidCraft, כך שהוא מוכן לשיחה. לא כש-SolidCraft מופעל עם --control. אם ההתחברות נכשלת, העוזר מציג „ההתחברות נכשלה” ולחצן „ניסיון חוזר”.",- "ai.prefs.follow_camera": "הפניית המצלמה אל סקיצות",+ "ai.prefs.follow_camera": "לעקוב אחר המצלמה","ai.prefs.follow_camera_off": "מעקב המצלמה האוטומטי כבוי.","ai.prefs.follow_camera_on": "המצלמה פונה אל הסקיצות שהסוכן יוצר.",- "ai.prefs.intro": "סוכנים, הרשאות ואופן הצגת העבודה שלהם.",- "ai.prefs.make_default": "שימוש כברירת מחדל",+ "ai.prefs.intro": "סוכני AI ב־SolidCraft.",+ "ai.prefs.make_default": "לקבוע כברירת מחדל","ai.prefs.no_agents": "אין עדיין סוכנים. אפשר להוסיף סוכן או לרענן כדי למצוא סוכנים מותקנים.","ai.prefs.no_saved_approvals": "אין אישורים שמורים.",- "ai.prefs.open_at_start": "פתיחת חלונית העוזר בהפעלת SolidCraft",+ "ai.prefs.open_at_start": "לפתוח את הצ'אט בהפעלה","ai.prefs.open_at_start_note": "מציג את חלונית העוזר (או את החלון הנפרד שלה) בכל הפעלה של SolidCraft. לא כש-SolidCraft מופעל עם --control.","ai.prefs.override_all_warning": "הסוכן הזה עשוי לשמור, לדרוס, לייצא או להחליף את התכן בלי לשאול.",- "ai.prefs.permission_all": "התרת הכול",- "ai.prefs.permission_all_summary": "כלי SolidCraft הזמינים פועלים בלי לשאול.",- "ai.prefs.permission_ask": "שאלה לפני שינויים",- "ai.prefs.permission_ask_summary": "אישור כל שינוי בתכן וכל פעולה על קבצים.",- "ai.prefs.permission_edits": "התרת עריכות מודל",- "ai.prefs.permission_edits_summary": "עריכות מודל מתבצעות; פעולות קבצים ופעולות הרסניות עדיין דורשות אישור.",+ "ai.prefs.permission_all": "לעשות הכול",+ "ai.prefs.permission_all_summary": "אף פעם לא שואל",+ "ai.prefs.permission_ask": "לשאול קודם",+ "ai.prefs.permission_ask_summary": "שואל על כל שינוי",+ "ai.prefs.permission_edits": "לבצע עריכות",+ "ai.prefs.permission_edits_summary": "עורך בחופשיות, שואל על השאר","ai.prefs.permission_scope": "לכלי SolidCraft בלבד. פקודות המעטפת ועריכות הקבצים של הסוכן כפופות להרשאות שלו.","ai.prefs.pointer_preview_hidden": "הסמן מוסתר","ai.prefs.pointer_preview_speed": "סמן הסוכן · {speed}",- "ai.prefs.pointer_speed": "מהירות התנועה",+ "ai.prefs.pointer_speed": "מהירות","ai.prefs.privacy_note": "רק הסוכן או נקודת הקצה שבחרת מקבלים את השיחה. מפתחות נקודות הקצה נשמרים במחזיק המפתחות של המערכת.",- "ai.prefs.show_pointer": "הצגת סמן הסוכן",+ "ai.prefs.show_pointer": "להציג את מצביע הסוכן","ai.prefs.turn_limit_hint": "מספר מרבי של קריאות לכלים שמשנים את התכן שהעוזר רשאי לבצע להודעה אחת.","angle, height": "זווית, גובה","appearance.dielectric_ior": "מקדם שבירה דיאלקטרי",@@ -4417,7 +4417,7 @@"ui.agent_chat_send_now_tip": "עצירת הצעד הנוכחי של הסוכן ושליחת הודעה זו כבאה בתור (Ctrl+Enter)","ui.agent_chat_setup_body": "SolidCraft מדבר עם סוכן קוד שמותקן במחשב הזה. אפשר לבחור אחד בהעדפות › AI.","ui.agent_chat_setup_title": "הגדרת עוזר",- "ui.agent_chat_side": "צד הצ'אט עם הסוכן",+ "ui.agent_chat_side": "לעגן את הצ'אט","ui.agent_chat_signed_in": "מחובר","ui.agent_chat_state_auth": "נדרשת התחברות","ui.agent_chat_state_busy": "עובד…",@@ -4436,7 +4436,7 @@"ui.agent_chat_undone": "(בוטל)","ui.agent_chat_view_attached": "התצוגה צורפה","ui.agent_chat_waiting": "ממתין לך",- "ui.agent_cursor": "סמן הסוכן",+ "ui.agent_cursor": "מצביע הסוכן","ui.agent_cursor_speed": "מהירות סמן הסוכן","ui.agent_off_thread": "שמירה על תגובתיות החלון בזמן שסוכנים מריצים פקודות","ui.agent_off_thread_note": "פקודות איטיות של סוכן (מחלונית ה־AI או מלקוח MCP) מחושבות לצד החלון: אפשר להמשיך לסובב ולבחון את התצוגה, ולעצור פקודה מהתג שבתצוגה. כבוי: כל פקודה רצה בתהליכון של החלון, והחלון ממתין לה.",@@ -4482,14 +4482,14 @@"ui.ai_key_note": "נשמר במחזיק המפתחות של המערכת, לעולם לא בהגדרות של SolidCraft. יש להשאיר ריק עבור שרת מקומי.","ui.ai_keychain_error": "מחזיק המפתחות של המערכת סירב: {error}","ui.ai_kind": "סוג",- "ui.ai_mode_all": "התרת הכול",+ "ui.ai_mode_all": "לעשות הכול","ui.ai_mode_all_note": "שום דבר לא שואל קודם. דוחות קריסה נשארים חסומים ומגבלות התיקיות עדיין חלות.","ui.ai_mode_all_warning": "הסוכן יכול לשמור, לדרוס, לייצא ולהחליף את התכן בלי לשאול. יש להשתמש בזה רק עם סוכן אמין, ועל תכנים שנשמרו.",- "ui.ai_mode_ask": "שאלה בכל פעם",+ "ui.ai_mode_ask": "לשאול קודם","ui.ai_mode_ask_note": "כל שינוי בתכן, וכל פעולת קובץ, ממתינים לאישור התרה.",- "ui.ai_mode_edits": "התרה אוטומטית של עריכות מודל",+ "ui.ai_mode_edits": "לבצע עריכות","ui.ai_mode_edits_note": "פקודות מידול רצות בלי לשאול; שמירה, פתיחה, ייצוא ופעולות קובץ או פעולות הרסניות אחרות עדיין שואלות.",- "ui.ai_mode_global": "כפי שהוגדר למעלה",+ "ui.ai_mode_global": "כמו למעלה","ui.ai_model": "מודל","ui.ai_model_hint": "qwen3:14b","ui.ai_modes_scope": "ההגדרות האלה חלות על הכלים של SolidCraft. הכלים של הסוכן עצמו (המעטפת שלו, עריכת הקבצים שלו) כפופים למצב של הסוכן, שנבחר בכותרת חלונית הצ'אט כשלסוכן יש מצבים.",@@ -4515,7 +4515,7 @@"ui.ai_save": "שמירה","ui.ai_settings": "הגדרות AI…","ui.ai_show_features": "הצגת תכונות AI",- "ui.ai_show_features_note": "הצ'אט עם הסוכן: חלונית שבה סוכן קוד שכבר נמצא בשימוש, או נקודת קצה של מודל לבחירתך, עובדים על התכן הפתוח. כבוי: אין לחצן AI, קיצור דרך, פריט תפריט או חלונית, ושום דבר לא מחופש או מופעל.",+ "ui.ai_show_features_note": "כיבוי מסתיר את העוזר בכל מקום ולא מפעיל דבר. כל מה שמתחת מעומעם.\n\nהצ'אט עם הסוכן: חלונית שבה סוכן קוד שכבר נמצא בשימוש, או נקודת קצה של מודל לבחירתך, עובדים על התכן הפתוח. כבוי: אין לחצן AI, קיצור דרך, פריט תפריט או חלונית, ושום דבר לא מחופש או מופעל.","ui.ai_switch_tip": "החלפת הסוכן לשיחה הזו","ui.ai_test": "בדיקה","ui.ai_test_acp_ok": "עונה: {agent}",@@ -4549,7 +4549,7 @@"ui.ai_tool_sum_then": "{first}, ואז {next}","ui.ai_tool_unfold": "יש ללחוץ כדי להציג מה הוחזר","ui.ai_tool_waiting": "ממתין",- "ui.ai_toolbar_button": "הצגת לחצן העוזר בסרגל היישום",+ "ui.ai_toolbar_button": "כפתור העוזר בסרגל היישום","ui.ai_toolbar_button_note": "לחצן העוזר בסרגל היישום. Ctrl+Shift+A ותפריט התצוגה עדיין פותחים את החלונית.","ui.ai_undo_tip": "ביטול כל מה שהסוכן שינה בהודעה הזו, כצעד אחד","ui.ai_url_hint": "https://example.com/v1",diff --git a/assets/locales/ja.json b/assets/locales/ja.jsonindex e4f8d8260b..8f9f68d975 100644--- a/assets/locales/ja.json+++ b/assets/locales/ja.json@@ -739,34 +739,34 @@"a picked edge's body is gone": "選択したエッジのボディが存在しなくなりました","add a key for a joint first": "先にジョイントのキーを追加してください","ai.connected_toast": "SolidCraft が {clients} で使えるようになりました。使うには再起動してください(設定 > アシスタント)。",- "ai.prefs.allow_control": "AI エージェントの接続を許可(コントロールチャンネル / MCP)",- "ai.prefs.allow_control_note": "このコンピューター内だけのコントロールチャンネル(127.0.0.1、ポート 27878 または次に空いているポート)を開きます。接続するプログラムは、起動のたびに作られ、あなたのユーザーアカウントだけが読める秘密のトークンも提示する必要があります。次に SolidCraft を起動したときから有効です。オフ:--control を付けて起動しない限り、何も待ち受けません。",- "ai.prefs.availability": "アシスタントの操作",- "ai.prefs.background_commands": "エージェントのコマンドをバックグラウンドで実行",- "ai.prefs.connect_apps": "このコンピューターの AI アプリで SolidCraft を使えるようにする",- "ai.prefs.connect_apps_note": "SolidCraft の起動時に、このコンピューターで見つかった AI アプリ(OpenCode、Claude Desktop、Claude Code、Cursor、Codex、Gemini CLI、Copilot CLI、Windsurf、Zed、VS Code)へ MCP サーバーとして追加します。追加または更新するのは solidcraft のエントリのみで、変更済みのエントリには触れず、ファイルは先にバックアップされます。オフにすると追加したエントリを削除します。",- "ai.prefs.connect_at_start": "SolidCraft の起動時に前回使用したエージェントに接続",+ "ai.prefs.allow_control": "AIエージェントの接続を許可",+ "ai.prefs.allow_control_note": "ローカルチャネル(MCP)です。このコンピューターから外には何も送信しません。\n\nこのコンピューター内だけのコントロールチャンネル(127.0.0.1、ポート 27878 または次に空いているポート)を開きます。接続するプログラムは、起動のたびに作られ、あなたのユーザーアカウントだけが読める秘密のトークンも提示する必要があります。次に SolidCraft を起動したときから有効です。オフ:--control を付けて起動しない限り、何も待ち受けません。",+ "ai.prefs.availability": "利用設定",+ "ai.prefs.background_commands": "時間のかかるコマンドをバックグラウンドで実行",+ "ai.prefs.connect_apps": "SolidCraftをAIアプリに追加",+ "ai.prefs.connect_apps_note": "オフにすると追加した項目を削除します。\n\nSolidCraft の起動時に、このコンピューターで見つかった AI アプリ(OpenCode、Claude Desktop、Claude Code、Cursor、Codex、Gemini CLI、Copilot CLI、Windsurf、Zed、VS Code)へ MCP サーバーとして追加します。追加または更新するのは solidcraft のエントリのみで、変更済みのエントリには触れず、ファイルは先にバックアップされます。オフにすると追加したエントリを削除します。",+ "ai.prefs.connect_at_start": "起動時に前回のエージェントに接続","ai.prefs.connect_at_start_note": "SolidCraft を起動するたびに、前回接続したエージェント (またはデフォルトのエージェント) をバックグラウンドで起動し、すぐにチャットできるようにします。--control を付けて起動した場合は行いません。接続できない場合、アシスタントに「接続に失敗しました」と「再試行」ボタンが表示されます。",- "ai.prefs.follow_camera": "カメラをスケッチに向ける",+ "ai.prefs.follow_camera": "カメラを追従","ai.prefs.follow_camera_off": "カメラの自動追従はオフです。","ai.prefs.follow_camera_on": "エージェントが作成するスケッチにカメラを向けます。",- "ai.prefs.intro": "エージェント、権限、作業の表示方法を設定します。",+ "ai.prefs.intro": "SolidCraftのAIエージェント。","ai.prefs.make_default": "既定にする","ai.prefs.no_agents": "エージェントはまだありません。追加するか、更新してインストール済みのエージェントを検索してください。","ai.prefs.no_saved_approvals": "保存された許可はありません。",- "ai.prefs.open_at_start": "SolidCraft の起動時にアシスタントパネルを開く",+ "ai.prefs.open_at_start": "起動時にチャットを開く","ai.prefs.open_at_start_note": "SolidCraft を起動するたびにアシスタントパネル (または独立したウィンドウ) を表示します。--control を付けて起動した場合は行いません。","ai.prefs.override_all_warning": "このエージェントは確認せずに設計を保存、上書き、書き出し、置換できます。",- "ai.prefs.permission_all": "すべて許可",- "ai.prefs.permission_all_summary": "利用可能なSolidCraftツールを確認せず実行します。",- "ai.prefs.permission_ask": "変更前に確認",- "ai.prefs.permission_ask_summary": "設計の変更とファイル操作を毎回確認します。",- "ai.prefs.permission_edits": "モデル編集を許可",- "ai.prefs.permission_edits_summary": "モデル編集は自動実行。ファイル操作や破壊的な操作は確認します。",+ "ai.prefs.permission_all": "すべて実行",+ "ai.prefs.permission_all_summary": "確認しない",+ "ai.prefs.permission_ask": "先に確認",+ "ai.prefs.permission_ask_summary": "変更ごとに確認",+ "ai.prefs.permission_edits": "編集を許可",+ "ai.prefs.permission_edits_summary": "自由に編集し、その他は確認","ai.prefs.permission_scope": "SolidCraftツールのみに適用されます。エージェントのシェルやファイル編集には、そのエージェント自身の権限設定が適用されます。","ai.prefs.pointer_preview_hidden": "ポインターは非表示","ai.prefs.pointer_preview_speed": "エージェントのポインター · {speed}",- "ai.prefs.pointer_speed": "移動速度",+ "ai.prefs.pointer_speed": "速度","ai.prefs.privacy_note": "会話は選択したエージェントまたはエンドポイントにのみ送信されます。エンドポイントのキーはシステムのキーチェーンに保存されます。","ai.prefs.show_pointer": "エージェントのポインターを表示","ai.prefs.turn_limit_hint": "アシスタントが1件のメッセージで行える、設計を変更するツール呼び出しの上限です。",@@ -4417,7 +4417,7 @@"ui.agent_chat_send_now_tip": "エージェントの現在のステップを止めて、これを次に送信します(Ctrl+Enter)","ui.agent_chat_setup_body": "SolidCraft は、このコンピューターにインストールされたコーディングエージェントと連携します。「環境設定 › AI」で選択してください。","ui.agent_chat_setup_title": "アシスタントを設定",- "ui.agent_chat_side": "エージェントチャットの位置",+ "ui.agent_chat_side": "チャットをドッキング","ui.agent_chat_signed_in": "サインイン済み","ui.agent_chat_state_auth": "サインインが必要","ui.agent_chat_state_busy": "作業中…",@@ -4436,7 +4436,7 @@"ui.agent_chat_undone": "(元に戻しました)","ui.agent_chat_view_attached": "ビューを添付済み","ui.agent_chat_waiting": "確認待ち",- "ui.agent_cursor": "エージェントカーソル",+ "ui.agent_cursor": "エージェントのポインター","ui.agent_cursor_speed": "エージェントカーソル速度","ui.agent_off_thread": "エージェントのコマンド実行中もウィンドウを操作可能にする","ui.agent_off_thread_note": "エージェント(AI パネルまたは MCP クライアント)の時間のかかるコマンドをウィンドウとは別に計算します。実行中もビューの回転や確認ができ、ビュー内の表示から停止できます。オフ:各コマンドはウィンドウのスレッドで実行され、終わるまでウィンドウは待ちます。",@@ -4482,14 +4482,14 @@"ui.ai_key_note": "システムのキーチェーンに保存され、SolidCraft の設定には保存されません。ローカルサーバーの場合は空欄のままにします。","ui.ai_keychain_error": "システムのキーチェーンが拒否しました: {error}","ui.ai_kind": "種類",- "ui.ai_mode_all": "すべて許可",+ "ui.ai_mode_all": "すべて実行","ui.ai_mode_all_note": "確認なしで実行します。クラッシュレポートは引き続き対象外で、フォルダー制限も有効です。","ui.ai_mode_all_warning": "エージェントは確認なしでデザインの保存・上書き・エクスポート・置き換えができます。信頼できるエージェントで、保存済みのデザインに対してのみ使ってください。",- "ui.ai_mode_ask": "毎回確認",+ "ui.ai_mode_ask": "先に確認","ui.ai_mode_ask_note": "デザインへのすべての変更とファイル操作が、あなたの許可を待ちます。",- "ui.ai_mode_edits": "モデル編集を自動許可",+ "ui.ai_mode_edits": "編集を許可","ui.ai_mode_edits_note": "モデリングコマンドは確認なしで実行されます。保存・開く・エクスポートなどのファイル操作や破壊的な操作は引き続き確認します。",- "ui.ai_mode_global": "上の設定に従う",+ "ui.ai_mode_global": "上の設定と同じ","ui.ai_model": "モデル","ui.ai_model_hint": "qwen3:14b","ui.ai_modes_scope": "これらの設定は SolidCraft のツールに適用されます。エージェント自身のツール(シェル、ファイル編集)は、エージェントにモードがある場合にチャットパネルのヘッダーで選ぶエージェント自身のモードに従います。",@@ -4515,7 +4515,7 @@"ui.ai_save": "保存","ui.ai_settings": "AI 設定…","ui.ai_show_features": "AI 機能を表示",- "ui.ai_show_features_note": "エージェントチャット: 普段使っているコーディングエージェント、または選んだモデルのエンドポイントが、開いているデザインを操作するパネルです。オフ: AI ボタン、ショートカット、メニュー項目、パネルは表示されず、検索も起動も行いません。",+ "ui.ai_show_features_note": "オフにするとアシスタントをすべて非表示にし、何も起動しません。以下の項目はすべて無効表示になります。\n\nエージェントチャット: 普段使っているコーディングエージェント、または選んだモデルのエンドポイントが、開いているデザインを操作するパネルです。オフ: AI ボタン、ショートカット、メニュー項目、パネルは表示されず、検索も起動も行いません。","ui.ai_switch_tip": "この会話のエージェントを切り替え","ui.ai_test": "テスト","ui.ai_test_acp_ok": "応答あり: {agent}",@@ -4549,7 +4549,7 @@"ui.ai_tool_sum_then": "{first}、続いて {next}","ui.ai_tool_unfold": "クリックして結果を表示","ui.ai_tool_waiting": "待機中",- "ui.ai_toolbar_button": "アプリケーションバーにアシスタントボタンを表示",+ "ui.ai_toolbar_button": "アプリケーションバーのアシスタントボタン","ui.ai_toolbar_button_note": "アプリケーションバーのアシスタントボタン。Ctrl+Shift+A と表示メニューからもパネルを開けます。","ui.ai_undo_tip": "このメッセージでエージェントが行った変更を、1回でまとめて元に戻します","ui.ai_url_hint": "https://example.com/v1",diff --git a/assets/locales/ko.json b/assets/locales/ko.jsonindex 004162af5f..436ae9ce13 100644--- a/assets/locales/ko.json+++ b/assets/locales/ko.json@@ -641,26 +641,26 @@"a picked edge is gone": "선택한 모서리가 더 이상 없습니다","a picked edge's body is gone": "선택한 모서리의 바디가 더 이상 없습니다","add a key for a joint first": "먼저 관절의 키를 추가하세요",- "ai.prefs.availability": "어시스턴트 제어",- "ai.prefs.background_commands": "에이전트 명령을 백그라운드에서 실행",- "ai.prefs.follow_camera": "카메라를 스케치로 돌리기",+ "ai.prefs.availability": "사용 설정",+ "ai.prefs.background_commands": "느린 명령을 백그라운드에서 실행",+ "ai.prefs.follow_camera": "카메라 따라가기","ai.prefs.follow_camera_off": "카메라 자동 따라가기가 꺼져 있습니다.","ai.prefs.follow_camera_on": "에이전트가 만드는 스케치를 향해 카메라가 회전합니다.",- "ai.prefs.intro": "에이전트, 권한, 그리고 작업이 표시되는 방식.",- "ai.prefs.make_default": "기본값으로 사용",+ "ai.prefs.intro": "SolidCraft의 AI 에이전트.",+ "ai.prefs.make_default": "기본값으로 설정","ai.prefs.no_agents": "아직 에이전트가 없습니다. 에이전트를 추가하거나 새로 고쳐서 설치된 에이전트를 찾으세요.","ai.prefs.no_saved_approvals": "저장된 승인이 없습니다.","ai.prefs.override_all_warning": "이 에이전트는 묻지 않고 설계를 저장, 덮어쓰기, 내보내기 또는 교체할 수 있습니다.",- "ai.prefs.permission_all": "모두 허용",- "ai.prefs.permission_all_summary": "사용 가능한 SolidCraft 도구가 묻지 않고 실행됩니다.",- "ai.prefs.permission_ask": "변경 전에 묻기",- "ai.prefs.permission_ask_summary": "모든 설계 변경과 파일 작업을 승인합니다.",- "ai.prefs.permission_edits": "모델 편집 허용",- "ai.prefs.permission_edits_summary": "모델 편집은 실행되고, 파일 및 파괴적인 작업은 계속 묻습니다.",+ "ai.prefs.permission_all": "모두 실행",+ "ai.prefs.permission_all_summary": "묻지 않음",+ "ai.prefs.permission_ask": "먼저 묻기",+ "ai.prefs.permission_ask_summary": "모든 변경 전에 확인",+ "ai.prefs.permission_edits": "편집 허용",+ "ai.prefs.permission_edits_summary": "자유롭게 편집하고 나머지는 확인","ai.prefs.permission_scope": "SolidCraft 도구에만 적용됩니다. 에이전트의 셸과 파일 편집은 자체 권한을 사용합니다.","ai.prefs.pointer_preview_hidden": "포인터 숨김","ai.prefs.pointer_preview_speed": "에이전트 포인터 · {speed}",- "ai.prefs.pointer_speed": "동작 속도",+ "ai.prefs.pointer_speed": "속도","ai.prefs.privacy_note": "선택한 에이전트 또는 엔드포인트만 대화를 받습니다. 엔드포인트 키는 시스템 키체인에 저장됩니다.","ai.prefs.show_pointer": "에이전트 포인터 표시","ai.prefs.turn_limit_hint": "메시지 하나에 어시스턴트가 수행할 수 있는 설계 변경 도구 호출의 최대 횟수입니다.",@@ -3216,7 +3216,7 @@"ui.agent_chat_send_now_tip": "에이전트의 현재 단계를 중지하고 이것을 다음으로 보냅니다 (Ctrl+Enter)","ui.agent_chat_setup_body": "SolidCraft는 이 컴퓨터에 설치된 코딩 에이전트와 통신합니다. 환경 설정 › AI에서 에이전트를 선택하세요.","ui.agent_chat_setup_title": "어시스턴트 설정",- "ui.agent_chat_side": "에이전트 채팅 위치",+ "ui.agent_chat_side": "채팅 도킹","ui.agent_chat_signed_in": "로그인됨","ui.agent_chat_state_auth": "로그인 필요","ui.agent_chat_state_busy": "작업 중…",@@ -3233,7 +3233,7 @@"ui.agent_chat_undone": "(취소됨)","ui.agent_chat_view_attached": "뷰 첨부됨","ui.agent_chat_waiting": "확인 대기 중",- "ui.agent_cursor": "에이전트 커서",+ "ui.agent_cursor": "에이전트 포인터","ui.agent_cursor_speed": "에이전트 커서 속도","ui.agent_off_thread": "에이전트가 명령을 실행하는 동안 창 반응성 유지","ui.agent_off_thread_note": "에이전트의 느린 명령(AI 패널 또는 MCP 클라이언트에서 실행)은 창과 별도로 계산됩니다. 뷰를 계속 회전하며 살펴볼 수 있고, 뷰의 칩에서 하나씩 중지할 수 있습니다. 끄면 각 명령이 창의 스레드에서 실행되며, 창은 명령이 끝날 때까지 기다립니다.",@@ -3276,14 +3276,14 @@"ui.ai_key_needs_https": "키는 HTTPS를 통해서만, 또는 이 컴퓨터로만 전송됩니다.","ui.ai_key_note": "SolidCraft 설정이 아닌 시스템 키체인에 저장됩니다. 로컬 서버라면 비워 두세요.","ui.ai_keychain_error": "시스템 키체인이 거부했습니다: {error}",- "ui.ai_mode_all": "모두 허용",+ "ui.ai_mode_all": "모두 실행","ui.ai_mode_all_note": "묻지 않고 실행합니다. 충돌 보고서는 계속 제외되고 폴더 제한도 그대로 적용됩니다.","ui.ai_mode_all_warning": "에이전트가 묻지 않고 디자인을 저장, 덮어쓰기, 내보내기, 교체할 수 있습니다. 신뢰하는 에이전트와 저장된 디자인에서만 사용하세요.",- "ui.ai_mode_ask": "매번 묻기",+ "ui.ai_mode_ask": "먼저 묻기","ui.ai_mode_ask_note": "디자인의 모든 변경과 파일 작업이 사용자의 허용을 기다립니다.",- "ui.ai_mode_edits": "모델 편집 자동 허용",+ "ui.ai_mode_edits": "편집 허용","ui.ai_mode_edits_note": "모델링 명령은 묻지 않고 실행되며, 저장·열기·내보내기 등 파일 작업이나 파괴적인 작업은 계속 묻습니다.",- "ui.ai_mode_global": "위 설정 따름",+ "ui.ai_mode_global": "위와 동일","ui.ai_model": "모델","ui.ai_model_hint": "qwen3:14b","ui.ai_modes_scope": "이 설정은 SolidCraft 도구에 적용됩니다. 에이전트 자체 도구(셸, 파일 편집)는 에이전트에 모드가 있을 때 채팅 패널 머리글에서 고르는 에이전트 자체 모드를 따릅니다.",@@ -3302,7 +3302,7 @@"ui.ai_save": "저장","ui.ai_settings": "AI 설정…","ui.ai_show_features": "AI 기능 표시",- "ui.ai_show_features_note": "에이전트 채팅: 이미 사용 중인 코딩 에이전트나 선택한 모델 엔드포인트가 열린 디자인을 다루는 패널입니다. 끄면 AI 버튼, 단축키, 메뉴 항목, 패널이 없고 아무것도 찾거나 시작하지 않습니다.",+ "ui.ai_show_features_note": "끄면 모든 곳에서 어시스턴트를 숨기고 아무것도 시작하지 않습니다. 아래 항목이 모두 흐려집니다.\n\n에이전트 채팅: 이미 사용 중인 코딩 에이전트나 선택한 모델 엔드포인트가 열린 디자인을 다루는 패널입니다. 끄면 AI 버튼, 단축키, 메뉴 항목, 패널이 없고 아무것도 찾거나 시작하지 않습니다.","ui.ai_switch_tip": "이 대화의 에이전트 변경","ui.ai_test": "테스트","ui.ai_test_acp_ok": "응답: {agent}",@@ -3316,7 +3316,7 @@"ui.ai_tool_running": "실행 중","ui.ai_tool_unfold": "클릭하면 결과를 표시","ui.ai_tool_waiting": "대기 중",- "ui.ai_toolbar_button": "도구 모음에 버튼 표시",+ "ui.ai_toolbar_button": "애플리케이션 바의 어시스턴트 버튼","ui.ai_toolbar_button_note": "도구 모음 오른쪽 끝의 AI 버튼. Ctrl+Shift+A와 보기 메뉴로도 패널을 열 수 있습니다.","ui.ai_undo_tip": "이 메시지에서 에이전트가 바꾼 모든 것을 한 번에 실행 취소","ui.ai_url_hint": "https://example.com/v1",diff --git a/assets/locales/pending/preferences-extend-shortcuts.json b/assets/locales/pending/preferences-extend-shortcuts.jsonnew file mode 100644index 0000000000..98da29d5a6--- /dev/null+++ b/assets/locales/pending/preferences-extend-shortcuts.json@@ -0,0 +1,152 @@+{+ "ar": {+ "prefs.assistant_connecting": "الاتصال",+ "prefs.assistant_follow_help": "تحرّك عروض Look At للرسم المنظور مع المؤشر.",+ "prefs.assistant_limit": "الحد",+ "prefs.assistant_limited": "محدود",+ "prefs.assistant_pointer_speed": "سرعة المؤشر",+ "prefs.assistant_seconds": "ثوانٍ",+ "prefs.assistant_seconds_aria": "الثواني",+ "prefs.assistant_use_care": "استخدم بحذر",+ "prefs.plugins_enabled": "مفعّل",+ "prefs.plugins_installed": "المثبّتة",+ "prefs.plugins_intro": "إضافات معزولة.",+ "prefs.plugins_show_folder": "إظهار مجلد الإضافات",+ "prefs.shortcuts_import": "استيراد",+ "prefs.shortcuts_intro": "مفاتيح كل أمر.",+ "prefs.shortcuts_not_assigned": "غير معيّن",+ "prefs.shortcuts_press": "اضغط مفتاحاً..."+ },+ "de": {+ "prefs.assistant_connecting": "Verbindung",+ "prefs.assistant_follow_help": "Look At bei Skizzen bewegt die Ansicht mit dem Zeiger.",+ "prefs.assistant_limit": "Limit",+ "prefs.assistant_limited": "Begrenzt",+ "prefs.assistant_pointer_speed": "Zeigergeschwindigkeit",+ "prefs.assistant_seconds": "Sekunden",+ "prefs.assistant_seconds_aria": "Sekunden",+ "prefs.assistant_use_care": "Mit Vorsicht verwenden",+ "prefs.plugins_enabled": "Aktiviert",+ "prefs.plugins_installed": "Installiert",+ "prefs.plugins_intro": "Isolierte Erweiterungen.",+ "prefs.plugins_show_folder": "Plugin-Ordner anzeigen",+ "prefs.shortcuts_import": "Importieren",+ "prefs.shortcuts_intro": "Tasten für jeden Befehl.",+ "prefs.shortcuts_not_assigned": "Nicht zugewiesen",+ "prefs.shortcuts_press": "Taste drücken..."+ },+ "en": {+ "prefs.assistant_connecting": "Connecting",+ "prefs.assistant_follow_help": "Look At sketches move the view with the pointer.",+ "prefs.assistant_limit": "Limit",+ "prefs.assistant_limited": "Limited",+ "prefs.assistant_pointer_speed": "Pointer speed",+ "prefs.assistant_seconds": "seconds",+ "prefs.assistant_seconds_aria": "Seconds",+ "prefs.assistant_use_care": "Use with care",+ "prefs.plugins_enabled": "Enabled",+ "prefs.plugins_installed": "Installed",+ "prefs.plugins_intro": "Sandboxed add-ons.",+ "prefs.plugins_show_folder": "Show plugins folder",+ "prefs.shortcuts_import": "Import",+ "prefs.shortcuts_intro": "Keys for each command.",+ "prefs.shortcuts_not_assigned": "Not assigned",+ "prefs.shortcuts_press": "Press a key..."+ },+ "he": {+ "prefs.assistant_connecting": "חיבור",+ "prefs.assistant_follow_help": "פעולות Look At בסקיצות מזיזות את התצוגה עם המצביע.",+ "prefs.assistant_limit": "מגבלה",+ "prefs.assistant_limited": "מוגבל",+ "prefs.assistant_pointer_speed": "מהירות המצביע",+ "prefs.assistant_seconds": "שניות",+ "prefs.assistant_seconds_aria": "שניות",+ "prefs.assistant_use_care": "להשתמש בזהירות",+ "prefs.plugins_enabled": "מופעל",+ "prefs.plugins_installed": "מותקנים",+ "prefs.plugins_intro": "תוספים מבודדים.",+ "prefs.plugins_show_folder": "להציג את תיקיית התוספים",+ "prefs.shortcuts_import": "ייבוא",+ "prefs.shortcuts_intro": "מקשים לכל פקודה.",+ "prefs.shortcuts_not_assigned": "לא הוקצה",+ "prefs.shortcuts_press": "יש ללחוץ על מקש..."+ },+ "ja": {+ "prefs.assistant_connecting": "接続",+ "prefs.assistant_follow_help": "スケッチのLook At操作で、ポインターに合わせてビューが移動します。",+ "prefs.assistant_limit": "上限",+ "prefs.assistant_limited": "制限あり",+ "prefs.assistant_pointer_speed": "ポインターの速度",+ "prefs.assistant_seconds": "秒",+ "prefs.assistant_seconds_aria": "秒",+ "prefs.assistant_use_care": "注意して使用",+ "prefs.plugins_enabled": "有効",+ "prefs.plugins_installed": "インストール済み",+ "prefs.plugins_intro": "サンドボックス化されたアドオン。",+ "prefs.plugins_show_folder": "プラグインフォルダーを表示",+ "prefs.shortcuts_import": "インポート",+ "prefs.shortcuts_intro": "各コマンドのキー。",+ "prefs.shortcuts_not_assigned": "未割り当て",+ "prefs.shortcuts_press": "キーを押してください..."+ },+ "ko": {+ "ai.prefs.allow_control": "AI 에이전트 연결 허용",+ "ai.prefs.allow_control_note": "로컬 채널(MCP)입니다. 이 컴퓨터 밖으로 아무것도 나가지 않습니다.\n\n이 컴퓨터에서만 제어 채널을 엽니다(127.0.0.1, 포트 27878 또는 다음 빈 포트). 연결하는 프로그램은 시작할 때마다 새로 생성되며 현재 사용자 계정만 읽을 수 있는 비밀 토큰을 제시해야 합니다. SolidCraft를 다음에 시작할 때 적용됩니다. 끄면 --control로 실행하지 않는 한 아무것도 수신하지 않습니다.",+ "ai.prefs.connect_apps": "AI 앱에 SolidCraft 추가",+ "ai.prefs.connect_apps_note": "끄면 추가한 항목이 다시 제거됩니다.\n\nSolidCraft 시작 시 이 컴퓨터에서 찾은 AI 앱(OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code)에 MCP 서버로 추가합니다. solidcraft 항목만 추가하거나 경로를 갱신하며, 사용자가 변경한 항목은 그대로 두고 파일을 먼저 백업합니다. 끄면 추가했던 항목을 제거합니다. 도움말 > AI 어시스턴트 연결…에서 수동으로 실행할 수도 있습니다.",+ "ai.prefs.connect_at_start": "시작할 때 마지막 에이전트 연결",+ "ai.prefs.open_at_start": "시작할 때 채팅 열기",+ "prefs.assistant_connecting": "연결",+ "prefs.assistant_follow_help": "스케치의 Look At 동작이 포인터와 함께 보기를 이동합니다.",+ "prefs.assistant_limit": "제한",+ "prefs.assistant_limited": "제한됨",+ "prefs.assistant_pointer_speed": "포인터 속도",+ "prefs.assistant_seconds": "초",+ "prefs.assistant_seconds_aria": "초",+ "prefs.assistant_use_care": "주의해서 사용",+ "prefs.plugins_enabled": "사용",+ "prefs.plugins_installed": "설치됨",+ "prefs.plugins_intro": "샌드박스 추가 기능.",+ "prefs.plugins_show_folder": "플러그인 폴더 표시",+ "prefs.shortcuts_import": "가져오기",+ "prefs.shortcuts_intro": "각 명령의 키.",+ "prefs.shortcuts_not_assigned": "할당되지 않음",+ "prefs.shortcuts_press": "키를 누르세요..."+ },+ "vi": {+ "prefs.assistant_connecting": "Kết nối",+ "prefs.assistant_follow_help": "Thao tác Look At trên bản phác di chuyển góc nhìn theo con trỏ.",+ "prefs.assistant_limit": "Giới hạn",+ "prefs.assistant_limited": "Có giới hạn",+ "prefs.assistant_pointer_speed": "Tốc độ con trỏ",+ "prefs.assistant_seconds": "giây",+ "prefs.assistant_seconds_aria": "Giây",+ "prefs.assistant_use_care": "Sử dụng thận trọng",+ "prefs.plugins_enabled": "Đã bật",+ "prefs.plugins_installed": "Đã cài đặt",+ "prefs.plugins_intro": "Tiện ích bổ sung trong vùng cách ly.",+ "prefs.plugins_show_folder": "Hiện thư mục plugin",+ "prefs.shortcuts_import": "Nhập",+ "prefs.shortcuts_intro": "Phím cho từng lệnh.",+ "prefs.shortcuts_not_assigned": "Chưa gán",+ "prefs.shortcuts_press": "Nhấn một phím..."+ },+ "zh": {+ "prefs.assistant_connecting": "连接",+ "prefs.assistant_follow_help": "草图的Look At操作会使视图随指针移动。",+ "prefs.assistant_limit": "上限",+ "prefs.assistant_limited": "有限制",+ "prefs.assistant_pointer_speed": "指针速度",+ "prefs.assistant_seconds": "秒",+ "prefs.assistant_seconds_aria": "秒",+ "prefs.assistant_use_care": "谨慎使用",+ "prefs.plugins_enabled": "已启用",+ "prefs.plugins_installed": "已安装",+ "prefs.plugins_intro": "沙箱化扩展。",+ "prefs.plugins_show_folder": "显示插件文件夹",+ "prefs.shortcuts_import": "导入",+ "prefs.shortcuts_intro": "每个命令的按键。",+ "prefs.shortcuts_not_assigned": "未分配",+ "prefs.shortcuts_press": "请按键..."+ }+}diff --git a/assets/locales/vi.json b/assets/locales/vi.jsonindex 80f048fdbb..1c6b64cd37 100644--- a/assets/locales/vi.json+++ b/assets/locales/vi.json@@ -739,36 +739,36 @@"a picked edge's body is gone": "thân của một cạnh đã chọn không còn nữa","add a key for a joint first": "hãy thêm một khóa cho khớp trước","ai.connected_toast": "SolidCraft hiện đã sẵn sàng trong {clients}. Khởi động lại ứng dụng để sử dụng (Cài đặt > Trợ lý ảo).",- "ai.prefs.allow_control": "Cho phép AI agent kết nối (kênh điều khiển / MCP)",- "ai.prefs.allow_control_note": "Mở kênh điều khiển chỉ trên máy tính này (127.0.0.1, cổng 27878 hoặc cổng trống tiếp theo). Chương trình kết nối phải xuất trình mã token bảo mật chỉ tài khoản người dùng của bạn đọc được, được tạo mới mỗi lần khởi động. Có hiệu lực vào lần khởi động tiếp theo của SolidCraft. Khi tắt: không lắng nghe trừ khi bạn bật.",- "ai.prefs.availability": "Điều khiển trợ lý",- "ai.prefs.background_commands": "Chạy các lệnh của agent dưới nền",- "ai.prefs.connect_apps": "Cho phép các ứng dụng AI trên máy tính này kết nối với SolidCraft",- "ai.prefs.connect_apps_note": "Khi SolidCraft khởi động, tự động thêm phần mềm dưới dạng MCP server vào các ứng dụng AI tìm thấy trên máy tính này (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code) để AI agent có thể sử dụng ngay mà không cần cấu hình thủ công. Chỉ mục cấu hình solidcraft sẽ được thêm mới hoặc làm mới đường dẫn; các mục bạn tự tùy chỉnh sẽ được giữ nguyên và file được sao lưu .bak trước khi sửa. Tắt: các mục đã thêm sẽ được gỡ bỏ. Trợ giúp > Kết nối trợ lý ảo AI… để thực hiện thủ công.",- "ai.prefs.connect_at_start": "Kết nối tác tử dùng gần nhất khi SolidCraft khởi động",+ "ai.prefs.allow_control": "Cho phép tác nhân AI kết nối",+ "ai.prefs.allow_control_note": "Kênh cục bộ (MCP). Không có gì rời khỏi máy tính này.\n\nMở kênh điều khiển chỉ trên máy tính này (127.0.0.1, cổng 27878 hoặc cổng trống tiếp theo). Chương trình kết nối phải xuất trình mã token bảo mật chỉ tài khoản người dùng của bạn đọc được, được tạo mới mỗi lần khởi động. Có hiệu lực vào lần khởi động tiếp theo của SolidCraft. Khi tắt: không lắng nghe trừ khi bạn bật.",+ "ai.prefs.availability": "Khả dụng",+ "ai.prefs.background_commands": "Chạy lệnh chậm trong nền",+ "ai.prefs.connect_apps": "Thêm SolidCraft vào ứng dụng AI",+ "ai.prefs.connect_apps_note": "Tắt sẽ xóa các mục đã thêm.\n\nKhi SolidCraft khởi động, tự động thêm phần mềm dưới dạng MCP server vào các ứng dụng AI tìm thấy trên máy tính này (OpenCode, Claude Desktop, Claude Code, Cursor, Codex, Gemini CLI, Copilot CLI, Windsurf, Zed, VS Code) để AI agent có thể sử dụng ngay mà không cần cấu hình thủ công. Chỉ mục cấu hình solidcraft sẽ được thêm mới hoặc làm mới đường dẫn; các mục bạn tự tùy chỉnh sẽ được giữ nguyên và file được sao lưu .bak trước khi sửa. Tắt: các mục đã thêm sẽ được gỡ bỏ. Trợ giúp > Kết nối trợ lý ảo AI… để thực hiện thủ công.",+ "ai.prefs.connect_at_start": "Kết nối tác nhân gần nhất khi khởi động","ai.prefs.connect_at_start_note": "Mỗi lần SolidCraft khởi động, chạy ngầm tác tử bạn kết nối gần nhất (hoặc tác tử mặc định) để sẵn sàng trò chuyện. Không áp dụng khi SolidCraft được khởi động với --control. Nếu không kết nối được, Trợ lý hiển thị “Kết nối thất bại” và nút “Thử lại”.",- "ai.prefs.follow_camera": "Xoay camera theo phác thảo",+ "ai.prefs.follow_camera": "Theo camera","ai.prefs.follow_camera_off": "Tự động xoay camera theo phác thảo đang tắt.","ai.prefs.follow_camera_on": "Camera sẽ tự động xoay vuông góc với phác thảo do agent tạo.",- "ai.prefs.intro": "Thiết lập agent, quyền hạn và cách hiển thị kết quả.",+ "ai.prefs.intro": "Tác nhân AI trong SolidCraft.","ai.prefs.make_default": "Đặt làm mặc định","ai.prefs.no_agents": "Chưa có agent nào. Thêm một agent hoặc làm mới để tìm các agent đã cài đặt.","ai.prefs.no_saved_approvals": "Chưa có phê duyệt nào được lưu.",- "ai.prefs.open_at_start": "Mở bảng Trợ lý khi SolidCraft khởi động",+ "ai.prefs.open_at_start": "Mở trò chuyện khi khởi động","ai.prefs.open_at_start_note": "Hiển thị bảng Trợ lý (hoặc cửa sổ riêng của nó) mỗi lần SolidCraft khởi động. Không áp dụng khi SolidCraft được khởi động với --control.","ai.prefs.override_all_warning": "Agent này có thể lưu, ghi đè, xuất hoặc thay thế thiết kế mà không cần hỏi trước.",- "ai.prefs.permission_all": "Cho phép tất cả",- "ai.prefs.permission_all_summary": "Các công cụ SolidCraft khả dụng sẽ chạy mà không cần hỏi trước.",- "ai.prefs.permission_ask": "Hỏi trước khi thay đổi",- "ai.prefs.permission_ask_summary": "Phê duyệt từng thay đổi thiết kế và thao tác với tệp.",- "ai.prefs.permission_edits": "Cho phép chỉnh sửa mô hình",- "ai.prefs.permission_edits_summary": "Các thao tác chỉnh sửa mô hình tự động chạy; thao tác với tệp và tác vụ phá hủy vẫn cần hỏi.",+ "ai.prefs.permission_all": "Làm mọi việc",+ "ai.prefs.permission_all_summary": "Không bao giờ hỏi",+ "ai.prefs.permission_ask": "Hỏi trước",+ "ai.prefs.permission_ask_summary": "Hỏi trước mọi thay đổi",+ "ai.prefs.permission_edits": "Cho phép chỉnh sửa",+ "ai.prefs.permission_edits_summary": "Tự do chỉnh sửa, hỏi về việc còn lại","ai.prefs.permission_scope": "Chỉ áp dụng cho các công cụ SolidCraft. Thao tác dòng lệnh và tệp của agent sử dụng quyền riêng của nó.","ai.prefs.pointer_preview_hidden": "Con trỏ đang ẩn","ai.prefs.pointer_preview_speed": "Con trỏ agent • {speed}",- "ai.prefs.pointer_speed": "Tốc độ di chuyển",+ "ai.prefs.pointer_speed": "Tốc độ","ai.prefs.privacy_note": "Chỉ agent hoặc endpoint bạn đã chọn mới nhận được nội dung trò chuyện. Khóa API endpoint được lưu trong chuỗi khóa (keychain) hệ thống.",- "ai.prefs.show_pointer": "Hiển thị con trỏ agent",+ "ai.prefs.show_pointer": "Hiện con trỏ của tác nhân","ai.prefs.turn_limit_hint": "Số lượt gọi công cụ thay đổi thiết kế tối đa mà Trợ lý có thể thực hiện cho một tin nhắn.","angle, height": "góc, chiều cao","appearance.dielectric_ior": "Chỉ số khúc xạ điện môi (IOR)",@@ -4417,7 +4417,7 @@"ui.agent_chat_send_now_tip": "Dừng bước hiện tại của tác tử và gửi tin nhắn này ngay (Ctrl+Enter)","ui.agent_chat_setup_body": "SolidCraft giao tiếp với một tác nhân lập trình được cài đặt trên máy tính này. Chọn một tác nhân trong Tùy chọn cài đặt › AI.","ui.agent_chat_setup_title": "Thiết lập trợ lý",- "ui.agent_chat_side": "Vị trí bảng trò chuyện AI",+ "ui.agent_chat_side": "Gắn khung trò chuyện","ui.agent_chat_signed_in": "đã đăng nhập","ui.agent_chat_state_auth": "Cần đăng nhập","ui.agent_chat_state_busy": "Đang xử lý…",@@ -4436,7 +4436,7 @@"ui.agent_chat_undone": "(hoàn tácne)","ui.agent_chat_view_attached": "Đã đính kèm góc nhìn","ui.agent_chat_waiting": "Đang chờ bạn",- "ui.agent_cursor": "Con trỏ AI",+ "ui.agent_cursor": "Con trỏ tác nhân","ui.agent_cursor_speed": "Tốc độ con trỏ AI","ui.agent_off_thread": "Giữ giao diện phản hồi mượt mà khi agent AI thực thi lệnh","ui.agent_off_thread_note": "Các lệnh tốn thời gian của agent (từ bảng AI hoặc MCP client) được tính toán song song ngoài luồng cửa sổ: bạn vẫn có thể xoay và kiểm tra vùng nhìn, và có thể dừng lệnh bất cứ lúc nào từ thẻ trạng thái trong khung nhìn. Khi tắt: mỗi lệnh sẽ chạy trên luồng cửa sổ và cửa sổ sẽ phải chờ cho đến khi hoàn thành.",@@ -4482,14 +4482,14 @@"ui.ai_key_note": "Được lưu an toàn trong Keychain hệ thống, không lưu trong cài đặt của SolidCraft. Để trống nếu dùng máy chủ cục bộ.","ui.ai_keychain_error": "Chuỗi khóa hệ thống từ chối: {error}","ui.ai_kind": "Loại",- "ui.ai_mode_all": "Cho phép tất cả",+ "ui.ai_mode_all": "Làm mọi việc","ui.ai_mode_all_note": "Không yêu cầu xác nhận trước. Báo cáo sự cố và các thư mục giới hạn vẫn được bảo vệ.","ui.ai_mode_all_warning": "Tác tử có thể lưu, ghi đè, xuất tệp và thay thế thiết kế của bạn mà không cần hỏi. Chỉ sử dụng chế độ này với tác tử bạn tin tưởng và trên các thiết kế đã được lưu.",- "ui.ai_mode_ask": "Hỏi mỗi lần",+ "ui.ai_mode_ask": "Hỏi trước","ui.ai_mode_ask_note": "Mọi thay đổi đối với thiết kế và mọi thao tác tệp đều cần bạn xác nhận Cho phép.",- "ui.ai_mode_edits": "Tự động cho phép chỉnh sửa mô hình",+ "ui.ai_mode_edits": "Cho phép chỉnh sửa","ui.ai_mode_edits_note": "Các lệnh tạo mô hình sẽ chạy mà không cần hỏi; các hành động lưu, mở, xuất và các thao tác tệp hoặc hủy hoại khác vẫn sẽ hỏi ý kiến bạn.",- "ui.ai_mode_global": "Theo cài đặt bên trên",+ "ui.ai_mode_global": "Giống bên trên","ui.ai_model": "Mô hình AI","ui.ai_model_hint": "qwen3:14b","ui.ai_modes_scope": "Các cài đặt này áp dụng cho các công cụ của SolidCraft. Công cụ riêng của tác tử (shell hệ thống, chỉnh sửa tệp) tuân theo chế độ riêng của tác tử, được chọn trên thanh tiêu đề bảng điều khiển trò chuyện.",@@ -4515,7 +4515,7 @@"ui.ai_save": "Lưu","ui.ai_settings": "AI cài đặt…","ui.ai_show_features": "Hiển thị các tính năng AI",- "ui.ai_show_features_note": "Trò chuyện với tác tử: bảng điều khiển nơi tác tử lập trình hoặc điểm cuối mô hình thao tác trên thiết kế đang mở. Tắt: ẩn nút AI, phím tắt, menu và bảng điều khiển, không tìm kiếm hay khởi chạy tác tử.",+ "ui.ai_show_features_note": "Tắt sẽ ẩn Trợ lý ở mọi nơi và không khởi chạy gì. Mọi mục bên dưới đều mờ đi.\n\nTrò chuyện với tác tử: bảng điều khiển nơi tác tử lập trình hoặc điểm cuối mô hình thao tác trên thiết kế đang mở. Tắt: ẩn nút AI, phím tắt, menu và bảng điều khiển, không tìm kiếm hay khởi chạy tác tử.","ui.ai_switch_tip": "Chuyển đổi AI Agent cho cuộc hội thoại này","ui.ai_test": "Kiểm tra","ui.ai_test_acp_ok": "Phản hồi: {agent}",@@ -4549,7 +4549,7 @@"ui.ai_tool_sum_then": "{first}, sau đó {next}","ui.ai_tool_unfold": "Nhấp để xem nội dung trả về","ui.ai_tool_waiting": "đang chờ",- "ui.ai_toolbar_button": "Hiển thị nút trên thanh công cụ",+ "ui.ai_toolbar_button": "Nút Trợ lý trên thanh ứng dụng","ui.ai_toolbar_button_note": "Nút AI ở góc phải thanh công cụ. Phím tắt Ctrl+Shift+A và menu Khung nhìn vẫn có thể mở bảng điều khiển.","ui.ai_undo_tip": "Hoàn tác mọi thay đổi do tác tử thực hiện cho tin nhắn này, như một bước duy nhất","ui.ai_url_hint": "https://example.com/v1",diff --git a/assets/locales/zh.json b/assets/locales/zh.jsonindex 07a06f57d0..56ce514a9b 100644--- a/assets/locales/zh.json+++ b/assets/locales/zh.json@@ -739,34 +739,34 @@"a picked edge's body is gone": "所选边所属的实体已不存在","add a key for a joint first": "请先为接头添加关键帧","ai.connected_toast": "SolidCraft 现已可在 {clients} 中使用。请重启它们(设置 > 助手)。",- "ai.prefs.allow_control": "允许 AI 代理连接(控制通道 / MCP)",- "ai.prefs.allow_control_note": "仅在本机开放控制通道(127.0.0.1,端口 27878 或下一个空闲端口)。连接的程序还必须出示一个每次启动时新生成、只有你的用户账户能读取的秘密令牌。下次启动 SolidCraft 时生效。关闭:除非用 --control 启动,否则不监听任何端口。",- "ai.prefs.availability": "助手控制",- "ai.prefs.background_commands": "在后台执行代理命令",- "ai.prefs.connect_apps": "让此电脑上的 AI 应用可以使用 SolidCraft",- "ai.prefs.connect_apps_note": "SolidCraft 启动时,会把自己作为 MCP 服务器添加到此电脑上找到的 AI 应用(OpenCode、Claude Desktop、Claude Code、Cursor、Codex、Gemini CLI、Copilot CLI、Windsurf、Zed、VS Code)。只添加或更新 solidcraft 条目;你修改过的条目不会被改动,文件会先备份。关闭后,会删除它添加的条目。",- "ai.prefs.connect_at_start": "SolidCraft 启动时连接上次使用的智能体",+ "ai.prefs.allow_control": "允许AI代理连接",+ "ai.prefs.allow_control_note": "本地通道(MCP)。任何内容都不会离开此计算机。\n\n仅在本机开放控制通道(127.0.0.1,端口 27878 或下一个空闲端口)。连接的程序还必须出示一个每次启动时新生成、只有你的用户账户能读取的秘密令牌。下次启动 SolidCraft 时生效。关闭:除非用 --control 启动,否则不监听任何端口。",+ "ai.prefs.availability": "可用性",+ "ai.prefs.background_commands": "在后台运行耗时命令",+ "ai.prefs.connect_apps": "将SolidCraft添加到AI应用",+ "ai.prefs.connect_apps_note": "关闭后会移除已添加的条目。\n\nSolidCraft 启动时,会把自己作为 MCP 服务器添加到此电脑上找到的 AI 应用(OpenCode、Claude Desktop、Claude Code、Cursor、Codex、Gemini CLI、Copilot CLI、Windsurf、Zed、VS Code)。只添加或更新 solidcraft 条目;你修改过的条目不会被改动,文件会先备份。关闭后,会删除它添加的条目。",+ "ai.prefs.connect_at_start": "启动时连接上次使用的代理","ai.prefs.connect_at_start_note": "每次启动 SolidCraft 时,在后台启动上次连接的智能体(或默认智能体),以便随时开始聊天。使用 --control 启动 SolidCraft 时不会这样做。如果无法连接,助手会显示“连接失败”和“重试”按钮。",- "ai.prefs.follow_camera": "将相机转向草图",+ "ai.prefs.follow_camera": "跟随相机","ai.prefs.follow_camera_off": "相机自动跟随已关闭。","ai.prefs.follow_camera_on": "相机将转向代理创建的草图。",- "ai.prefs.intro": "设置代理、权限及其工作方式。",+ "ai.prefs.intro": "SolidCraft中的AI代理。","ai.prefs.make_default": "设为默认","ai.prefs.no_agents": "尚无代理。添加代理或刷新以查找已安装的代理。","ai.prefs.no_saved_approvals": "没有已保存的批准。",- "ai.prefs.open_at_start": "SolidCraft 启动时打开助手面板",+ "ai.prefs.open_at_start": "启动时打开聊天","ai.prefs.open_at_start_note": "每次启动 SolidCraft 时显示助手面板(或其独立窗口)。使用 --control 启动 SolidCraft 时不会这样做。","ai.prefs.override_all_warning": "此代理可在不询问的情况下保存、覆盖、导出或替换设计。",- "ai.prefs.permission_all": "全部允许",- "ai.prefs.permission_all_summary": "可用的 SolidCraft 工具无需询问即可运行。",- "ai.prefs.permission_ask": "更改前询问",- "ai.prefs.permission_ask_summary": "每次设计更改和文件操作均需批准。",- "ai.prefs.permission_edits": "允许模型编辑",- "ai.prefs.permission_edits_summary": "模型编辑自动执行;文件及破坏性操作仍需询问。",+ "ai.prefs.permission_all": "执行所有操作",+ "ai.prefs.permission_all_summary": "从不询问",+ "ai.prefs.permission_ask": "先询问",+ "ai.prefs.permission_ask_summary": "每次更改前询问",+ "ai.prefs.permission_edits": "允许编辑",+ "ai.prefs.permission_edits_summary": "自由编辑,其余操作先询问","ai.prefs.permission_scope": "仅适用于 SolidCraft 工具。代理的终端和文件编辑使用其自身权限。","ai.prefs.pointer_preview_hidden": "指针已隐藏","ai.prefs.pointer_preview_speed": "代理指针 · {speed}",- "ai.prefs.pointer_speed": "移动速度",+ "ai.prefs.pointer_speed": "速度","ai.prefs.privacy_note": "对话仅发送给所选代理或端点。端点密钥保存在系统钥匙串中。","ai.prefs.show_pointer": "显示代理指针","ai.prefs.turn_limit_hint": "助手针对一条消息可调用的设计更改工具次数上限。",@@ -4417,7 +4417,7 @@"ui.agent_chat_send_now_tip": "停止智能体当前的步骤,并接着发送这条消息(Ctrl+Enter)","ui.agent_chat_setup_body": "SolidCraft 会与安装在此计算机上的编程代理通信。请在“首选项 › AI”中选择一个。","ui.agent_chat_setup_title": "设置助手",- "ui.agent_chat_side": "智能体聊天位置",+ "ui.agent_chat_side": "停靠聊天","ui.agent_chat_signed_in": "已登录","ui.agent_chat_state_auth": "需要登录","ui.agent_chat_state_busy": "工作中…",@@ -4436,7 +4436,7 @@"ui.agent_chat_undone": "(已撤销)","ui.agent_chat_view_attached": "已附加视图","ui.agent_chat_waiting": "等待您的回复",- "ui.agent_cursor": "代理光标",+ "ui.agent_cursor": "代理指针","ui.agent_cursor_speed": "代理光标速度","ui.agent_off_thread": "代理运行命令时保持窗口响应","ui.agent_off_thread_note": "代理(来自 AI 面板或 MCP 客户端)的耗时命令在窗口之外计算:运行时仍可旋转和查看视图,并可在视图中的提示上停止它。关闭:每条命令在窗口线程上运行,窗口会等待其完成。",@@ -4482,14 +4482,14 @@"ui.ai_key_note": "保存在系统钥匙串中,绝不保存在 SolidCraft 的设置里。本地服务器可留空。","ui.ai_keychain_error": "系统钥匙串拒绝:{error}","ui.ai_kind": "类型",- "ui.ai_mode_all": "全部允许",+ "ui.ai_mode_all": "执行所有操作","ui.ai_mode_all_note": "不再询问。崩溃报告仍不可访问,文件夹限制仍然有效。","ui.ai_mode_all_warning": "智能体可以不经询问保存、覆盖、导出和替换你的设计。只在你信任的智能体和已保存的设计上使用。",- "ui.ai_mode_ask": "每次询问",+ "ui.ai_mode_ask": "先询问","ui.ai_mode_ask_note": "对设计的每项更改和每个文件操作都要等待你的允许。",- "ui.ai_mode_edits": "自动允许模型编辑",+ "ui.ai_mode_edits": "允许编辑","ui.ai_mode_edits_note": "建模命令无需询问即可运行;保存、打开、导出等文件操作或破坏性操作仍会询问。",- "ui.ai_mode_global": "按上方设置",+ "ui.ai_mode_global": "与上方相同","ui.ai_model": "模型","ui.ai_model_hint": "qwen3:14b","ui.ai_modes_scope": "这些设置适用于 SolidCraft 的工具。智能体自己的工具(它的 shell、文件编辑)遵循智能体自己的模式;如果智能体提供模式,可在聊天面板标题栏中选择。",@@ -4515,7 +4515,7 @@"ui.ai_save": "保存","ui.ai_settings": "AI 设置…","ui.ai_show_features": "显示 AI 功能",- "ui.ai_show_features_note": "智能体聊天:一个面板,由你已在使用的编程智能体或你选择的模型端点处理打开的设计。关闭后:没有 AI 按钮、快捷键、菜单项或面板,也不会查找或启动任何程序。",+ "ui.ai_show_features_note": "关闭后将隐藏所有助手功能,且不会启动任何内容。下方所有选项都会变灰。\n\n智能体聊天:一个面板,由你已在使用的编程智能体或你选择的模型端点处理打开的设计。关闭后:没有 AI 按钮、快捷键、菜单项或面板,也不会查找或启动任何程序。","ui.ai_switch_tip": "更改此对话的智能体","ui.ai_test": "测试","ui.ai_test_acp_ok": "已响应:{agent}",@@ -4549,7 +4549,7 @@"ui.ai_tool_sum_then": "{first},然后 {next}","ui.ai_tool_unfold": "点击显示返回内容","ui.ai_tool_waiting": "等待中",- "ui.ai_toolbar_button": "在工具栏显示按钮",+ "ui.ai_toolbar_button": "应用栏中的助手按钮","ui.ai_toolbar_button_note": "工具栏右端的 AI 按钮。Ctrl+Shift+A 和视图菜单仍可打开面板。","ui.ai_undo_tip": "将智能体为此消息所做的全部更改一步撤销","ui.ai_url_hint": "https://example.com/v1",diff --git a/crates/ui-egui/src/agent_chat/settings.rs b/crates/ui-egui/src/agent_chat/settings.rsindex 07f584e70b..26da3b9387 100644--- a/crates/ui-egui/src/agent_chat/settings.rs+++ b/crates/ui-egui/src/agent_chat/settings.rs@@ -404,17 +404,24 @@ fn start_test(app: &SolveApp, e: &agents::Entry, key: Option<String>) -> Test {/// An endpoint's request timeout field: seconds, 30 s to an hour.fn timeout_field(ui: &mut egui::Ui, secs: &mut u64, handle: &str) -> bool {- let r = ui_kit::number_field(ui, secs, agents::MIN_REQUEST_TIMEOUT_S..=agents::MAX_REQUEST_TIMEOUT_S, 5.0, " s")+ let r = ui_kit::number_field(ui, secs, agents::MIN_REQUEST_TIMEOUT_S..=agents::MAX_REQUEST_TIMEOUT_S, 5.0, "").on_hover_text(tr("ui.ai_request_timeout_hint"));+ r.widget_info(|| {+ let mut info = egui::WidgetInfo::drag_value(ui.is_enabled(), *secs as f64);+ info.label = Some(tr("prefs.assistant_seconds_aria").to_owned());+ info+ });+ ui.label(tr("prefs.assistant_seconds"));crate::scenario::publish_target(handle, r.rect);r.changed()}/// The free-text reasoning effort field with its hover hint; true when the text changed.-fn effort_field(ui: &mut egui::Ui, effort: &mut String) -> bool {- ui_kit::cell_editor(ui, ui.id().with("ai_reasoning_effort"), effort, tr("ui.ai_reasoning_effort_field_hint"), false)- .on_hover_text(tr("ui.ai_reasoning_effort_hint"))- .changed()+fn effort_field(ui: &mut egui::Ui, effort: &mut String, handle: &str) -> bool {+ let response = ui_kit::cell_editor(ui, ui.id().with("ai_reasoning_effort"), effort, tr("ui.ai_reasoning_effort_field_hint"), false)+ .on_hover_text(tr("ui.ai_reasoning_effort_hint"));+ crate::scenario::publish_target(handle, response.rect);+ response.changed()}fn test_line(ui: &mut egui::Ui, test: &Option<&Test>) {@@ -435,73 +442,84 @@ fn test_line(ui: &mut egui::Ui, test: &Option<&Test>) {/// The Assistant page of Settings. Copy stays close to its control; full security details/// remain accessible on hover, and high-risk permissions always retain a visible warning.pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) {- ui_kit::settings_heading(ui, tr("prefs.assistant"), tr("ai.prefs.intro"));- ui_kit::settings_section(ui, "assistant_availability", tr("ai.prefs.availability"), |ui| {- let response =- ui_kit::checkbox(ui, tr("ui.ai_show_features"), &mut app.preferences.ai_features).on_hover_text(tr("ui.ai_show_features_note"));- crate::scenario::publish_handle("prefs:ai_features", response.rect.center());- if !cfg!(target_arch = "wasm32") {- if app.preferences.ai_features {+ ui_kit::settings_page(ui, |ui| {+ ui_kit::settings_heading(ui, tr("prefs.assistant"), tr("ai.prefs.intro"));+ ui_kit::settings_section(ui, "assistant_availability", tr("ai.prefs.availability"), |ui| {+ ui.horizontal(|ui| {+ let response =+ ui_kit::checkbox(ui, tr("ui.ai_show_features"), &mut app.preferences.ai_features).on_hover_text(tr("ui.ai_show_features_note"));+ crate::scenario::publish_handle("prefs:ai_features", response.rect.center());+ ui_kit::help_icon(ui, tr("ui.ai_show_features_note"));+ });+ ui.add_enabled_ui(app.preferences.ai_features && !cfg!(target_arch = "wasm32"), |ui| {let response = ui_kit::checkbox(ui, tr("ui.ai_toolbar_button"), &mut app.preferences.ai_toolbar_button).on_hover_text(tr("ui.ai_toolbar_button_note"));crate::scenario::publish_handle("prefs:ai_toolbar_button", response.rect.center());- let response = ui_kit::checkbox(ui, tr("ai.prefs.connect_at_start"), &mut app.preferences.agent_connect_at_start)- .on_hover_text(tr("ai.prefs.connect_at_start_note"));- crate::scenario::publish_handle("prefs:agent_connect_at_start", response.rect.center());- let response = ui_kit::checkbox(ui, tr("ai.prefs.open_at_start"), &mut app.preferences.agent_chat_open_at_start)- .on_hover_text(tr("ai.prefs.open_at_start_note"));- crate::scenario::publish_handle("prefs:agent_chat_open_at_start", response.rect.center());+ });+ if cfg!(target_arch = "wasm32") {+ ui_kit::text(ui, tr("ui.agent_chat_desktop_only"), ui_kit::Text::Hint("desktop"));}- let response = ui_kit::checkbox(ui, tr("ai.prefs.background_commands"), &mut app.preferences.agent_off_thread)- .on_hover_text(tr("ui.agent_off_thread_note"));- crate::scenario::publish_handle("prefs:agent_off_thread", response.rect.center());- let response = ui_kit::checkbox(ui, tr("ai.prefs.allow_control"), &mut app.preferences.agent_control)- .on_hover_text(tr("ai.prefs.allow_control_note"));- crate::scenario::publish_handle("prefs:agent_control", response.rect.center());- let response = ui_kit::checkbox(ui, tr("ai.prefs.connect_apps"), &mut app.preferences.connect_ai_apps)- .on_hover_text(tr("ai.prefs.connect_apps_note"));- crate::scenario::publish_handle("prefs:connect_ai_apps", response.rect.center());- }- if cfg!(target_arch = "wasm32") {- ui_kit::text(ui, tr("ui.agent_chat_desktop_only"), ui_kit::Text::Hint("desktop"));- }- });- if !cfg!(target_arch = "wasm32") && app.preferences.ai_features {- #[cfg(not(target_arch = "wasm32"))]- {- let browsing = !crate::prefs_search::querying(ui) || app.prefs_window.section == crate::prefs::PAGE_ASSISTANT;- if browsing && app.agent_chat.detection.is_none() && app.agent_chat.detecting.is_none() {- refresh(app, &ui.ctx().clone());+ });+ ui.add_enabled_ui(app.preferences.ai_features && !cfg!(target_arch = "wasm32"), |ui| {+ permissions_section(app, ui);+ #[cfg(not(target_arch = "wasm32"))]+ {+ let browsing = !crate::prefs_search::querying(ui) || app.prefs_window.section == crate::prefs::PAGE_ASSISTANT;+ if app.preferences.ai_features && browsing && app.agent_chat.detection.is_none() && app.agent_chat.detecting.is_none() {+ refresh(app, &ui.ctx().clone());+ }+ agents_section(app, ui);}- agents_section(app, ui);+ panel_section(app, ui);+ connecting_section(app, ui);+ });+ ui.add_enabled_ui(app.preferences.ai_features, |ui| pointer_section(app, ui));+ });+}++fn connecting_section(app: &mut SolveApp, ui: &mut egui::Ui) {+ ui_kit::settings_section(ui, "assistant_connecting", tr("prefs.assistant_connecting"), |ui| {+ for (label, help, handle, value) in [+ ("ai.prefs.allow_control", "ai.prefs.allow_control_note", "agent_control", &mut app.preferences.agent_control),+ ("ai.prefs.connect_apps", "ai.prefs.connect_apps_note", "connect_ai_apps", &mut app.preferences.connect_ai_apps),+ ("ai.prefs.background_commands", "ui.agent_off_thread_note", "agent_off_thread", &mut app.preferences.agent_off_thread),+ ("ai.prefs.connect_at_start", "ai.prefs.connect_at_start_note", "agent_connect_at_start", &mut app.preferences.agent_connect_at_start),+ ("ai.prefs.open_at_start", "ai.prefs.open_at_start_note", "agent_chat_open_at_start", &mut app.preferences.agent_chat_open_at_start),+ ] {+ ui.horizontal(|ui| {+ let response = ui_kit::checkbox(ui, tr(label), value).on_hover_text(tr(help));+ crate::scenario::publish_handle(&format!("prefs:{handle}"), response.rect.center());+ ui_kit::help_icon(ui, tr(help));+ });}- permissions_section(app, ui);- panel_section(app, ui);- }- pointer_section(app, ui);+ });}fn permissions_section(app: &mut SolveApp, ui: &mut egui::Ui) {ui_kit::settings_section(ui, "permissions", tr("ui.ai_permissions"), |ui| {let mut selected = Mode::ALL.iter().position(|mode| *mode == app.preferences.ai_permissions).unwrap_or(0);+ let all_help = format!("{}\n\n{}", tr("prefs.assistant_use_care"), tr("ui.ai_mode_all_note"));let choices = [ui_kit::SettingsChoice {+ icon: None,key: "prefs:ai_mode:ask",title: tr("ai.prefs.permission_ask"),summary: tr("ai.prefs.permission_ask_summary"),detail: tr("ui.ai_mode_ask_note"),},ui_kit::SettingsChoice {+ icon: None,key: "prefs:ai_mode:edits",title: tr("ai.prefs.permission_edits"),summary: tr("ai.prefs.permission_edits_summary"),detail: tr("ui.ai_mode_edits_note"),},ui_kit::SettingsChoice {+ icon: Some("warning"),key: "prefs:ai_mode:all",title: tr("ai.prefs.permission_all"),summary: tr("ai.prefs.permission_all_summary"),- detail: tr("ui.ai_mode_all_note"),+ detail: &all_help,},];if ui_kit::settings_choices(ui, &choices, &mut selected)@@ -512,7 +530,7 @@ fn permissions_section(app: &mut SolveApp, ui: &mut egui::Ui) {if app.preferences.ai_permissions == Mode::All {ui_kit::text(ui, tr("ui.ai_mode_all_warning"), ui_kit::Text::Report("permissions_warning", true));}- ui_kit::text(ui, tr("ai.prefs.permission_scope"), ui_kit::Text::Hint("scope")).on_hover_text(tr("ui.ai_modes_scope"));+ ui_kit::text(ui, tr("ui.ai_modes_scope"), ui_kit::Text::Hint("permissions_scope"));let remembered: Vec<_> = app.preferences.agent_always_allow@@ -529,7 +547,9 @@ fn permissions_section(app: &mut SolveApp, ui: &mut egui::Ui) {let t = crate::theme::Tokens::get();ui_kit::settings_block(ui, names.get(&agent).unwrap_or(&agent), t.space_24 * 6.0 + t.space_6, |ui| {ui.horizontal(|ui| {- if ui_kit::button(ui, tr("ui.ai_reset"), ui_kit::Button::Small).clicked() {+ let reset = ui_kit::button(ui, tr("ui.ai_reset"), ui_kit::Button::Small);+ crate::scenario::publish_target(&format!("prefs:ai_approvals_reset:{agent}"), reset.rect);+ if reset.clicked() {app.preferences.agent_always_allow.remove(&agent);}ui_kit::settings_short_note(ui, &tools.join(", "));@@ -543,7 +563,11 @@ fn permissions_section(app: &mut SolveApp, ui: &mut egui::Ui) {fn panel_section(app: &mut SolveApp, ui: &mut egui::Ui) {let t = crate::theme::Tokens::get();ui_kit::settings_section(ui, "panel", tr("ui.ai_panel"), |ui| {- ui_kit::settings_form(ui, t.space_24 * 6.0 + t.space_6, |ui| {+ let label_width = [tr("ui.agent_chat_side"), tr("ui.agent_chat_turn_limit")]+ .iter()+ .map(|label| ui_kit::ContentWidth::label(ui, label) + t.space_4)+ .fold(0.0, f32::max);+ ui_kit::settings_form(ui, label_width, |ui| {ui_kit::row(ui, tr("ui.agent_chat_side"), |ui| {let p = &mut app.preferences;let mut selected = if p.agent_chat_popped { 2 } else { usize::from(p.agent_chat_side != "left") };@@ -557,16 +581,41 @@ fn panel_section(app: &mut SolveApp, ui: &mut egui::Ui) {});ui_kit::row(ui, tr("ui.agent_chat_turn_limit"), |ui| {let p = &mut app.preferences;- let mut unlimited = p.agent_chat_turn_limit == 0;- if ui_kit::checkbox(ui, tr("ui.agent_chat_turn_unlimited"), &mut unlimited).changed() {- p.agent_chat_turn_limit = if unlimited { 0 } else { gate::SEEDED_TURN_LIMIT };+ let previous = usize::from(p.agent_chat_turn_limit != 0);+ let mut limit = previous;+ let options = [tr("ui.agent_chat_turn_unlimited"), tr("prefs.assistant_limited")];+ crate::prefs_search::note_current(ui, &options.join(" "));+ let dropdown_width = ui_kit::ContentWidth::dropdown(ui, &options);+ let response =+ ui_kit::settings_control_width(ui, dropdown_width, |ui| ui_kit::dropdown(ui, "assistant_turn_limit", &mut limit, &options));+ let query = crate::prefs_search::query(ui);+ if let Some(option) = options+ .iter()+ .find(|option| option.to_lowercase() == query)+ .or_else(|| options.iter().find(|option| crate::prefs_search::texts_hit(ui, &[*option])))+ {+ crate::prefs_search::remember(ui, option, response.rect);+ }+ for option in options {+ crate::prefs_search::follow(ui, option, response.rect);}- if !unlimited {- ui_kit::settings_number(ui, &mut p.agent_chat_turn_limit, 1..=200, 1.0).on_hover_text(tr("ai.prefs.turn_limit_hint"));+ crate::scenario::publish_target("prefs:agent_chat_turn_limit:mode", response.rect);+ if limit != previous {+ p.agent_chat_turn_limit = if limit == 0 { 0 } else { gate::SEEDED_TURN_LIMIT };+ }+ if limit != 0 {+ let response =+ ui_kit::settings_number(ui, &mut p.agent_chat_turn_limit, 1..=200, 1.0).on_hover_text(tr("ai.prefs.turn_limit_hint"));+ response.widget_info(|| {+ let mut info = egui::WidgetInfo::drag_value(ui.is_enabled(), f64::from(p.agent_chat_turn_limit));+ info.label = Some(tr("prefs.assistant_limit").to_owned());+ info+ });+ crate::scenario::publish_target("prefs:agent_chat_turn_limit:value", response.rect);}});});- ui_kit::text(ui, tr("ai.prefs.privacy_note"), ui_kit::Text::Hint("privacy"));+ ui_kit::text(ui, tr("ai.prefs.privacy_note"), ui_kit::Text::Hint("privacy_note"));});}@@ -575,15 +624,39 @@ fn pointer_section(app: &mut SolveApp, ui: &mut egui::Ui) {ui_kit::settings_pair(ui,|ui| {- ui_kit::checkbox(ui, tr("ai.prefs.show_pointer"), &mut app.ui.agent_cursor.show)+ let response = ui_kit::checkbox(ui, tr("ai.prefs.show_pointer"), &mut app.ui.agent_cursor.show).on_hover_text(crate::i18n::tr_label("Show the pointer an AI agent moves (#35)"));+ crate::scenario::publish_target("prefs:agent_pointer_show", response.rect);ui.add_enabled_ui(app.ui.agent_cursor.show, |ui| {let speed_label_width = ui_kit::ContentWidth::label(ui, tr("ai.prefs.pointer_speed")) + crate::theme::Tokens::get().space_4;- ui_kit::settings_block(ui, tr("ai.prefs.pointer_speed"), speed_label_width, |ui| {- crate::agent_cursor::speed_slider(ui, &mut app.ui.agent_cursor.speed);+ ui_kit::settings_form(ui, speed_label_width, |ui| {+ ui_kit::row(ui, tr("ai.prefs.pointer_speed"), |ui| {+ let name = tr("prefs.assistant_pointer_speed");+ crate::prefs_search::note_current(ui, name);+ let response =+ ui_kit::named_control(ui, name, |ui| crate::agent_cursor::speed_slider(ui, &mut app.ui.agent_cursor.speed));+ crate::scenario::publish_target("prefs:agent_pointer_speed", response.rect);+ let value = match app.ui.agent_cursor.speed {+ crate::agent_cursor::Speed::Times(value) => value,+ crate::agent_cursor::Speed::Instant => 5.5,+ };+ response.widget_info(|| egui::WidgetInfo::slider(ui.is_enabled(), value, name));+ // The visible row owns Speed and its legacy Motion speed alias. The+ // native editor's name owns queries that only match Pointer speed.+ if !crate::prefs_search::texts_hit(ui, &[tr("ai.prefs.pointer_speed")]) {+ crate::prefs_search::remember(ui, name, response.rect);+ }+ for label in [tr("ai.prefs.pointer_speed"), name] {+ crate::prefs_search::follow(ui, label, response.rect);+ }+ });+ });+ ui.horizontal(|ui| {+ let response = ui_kit::checkbox(ui, tr("ai.prefs.follow_camera"), &mut app.ui.agent_cursor.follow_camera)+ .on_hover_text(tr("prefs.assistant_follow_help"));+ crate::scenario::publish_target("prefs:agent_pointer_follow", response.rect);+ ui_kit::help_icon(ui, tr("prefs.assistant_follow_help"));});- ui_kit::checkbox(ui, tr("ai.prefs.follow_camera"), &mut app.ui.agent_cursor.follow_camera)- .on_hover_text(crate::i18n::tr_label("Follow the camera (Look At sketches)"));});(app.ui.agent_cursor.show, app.ui.agent_cursor.speed.label(), app.ui.agent_cursor.follow_camera)},@@ -605,7 +678,7 @@ fn agents_section(app: &mut SolveApp, ui: &mut egui::Ui) {let mut reeffort: Option<(String, String)> = None;let mut picked_model: Option<(String, ui_kit::Picked)> = None;let t = crate::theme::Tokens::get();- ui_kit::settings_section(ui, "agents", tr("ui.ai_agents"), |ui| {+ ui_kit::settings_section_count(ui, "agents", tr("ui.ai_agents"), Some(&all.len().to_string()), |ui| {if app.agent_chat.detecting.is_some() {ui_kit::text(ui, tr("ui.agent_chat_detecting"), ui_kit::Text::Hint("detecting"));} else if all.is_empty() {@@ -615,84 +688,140 @@ fn agents_section(app: &mut SolveApp, ui: &mut egui::Ui) {ui_kit::empty_box(ui, "assistant_agents", tr("ai.prefs.no_agents"));}}- for (index, entry) in all.iter().enumerate() {+ for entry in &all {ui.push_id(&entry.id, |ui| {- if index > 0 {- ui_kit::divider(ui, "agent_divider");- }- ui_kit::settings_block(ui, &entry.name, t.space_24 * 6.0 + t.space_6, |ui| {- ui.horizontal_wrapped(|ui| {- let is_default = default.as_deref() == Some(entry.id.as_str());- let choice = ui_kit::button(- ui,- tr(if is_default { "ui.ai_default" } else { "ai.prefs.make_default" }),- if is_default { ui_kit::Button::SmallSelected } else { ui_kit::Button::Small },- );- crate::scenario::publish_target(&format!("dialog:list:{}", entry.id), choice.rect);- if choice.clicked() {- app.preferences.agent_default = entry.id.clone();- }- let test_button = ui_kit::button(ui, tr("ui.ai_test"), ui_kit::Button::Small);- crate::scenario::publish_handle(&format!("prefs:ai_test:{}", entry.id), test_button.rect.center());- let tip = match entry.kind {- Kind::Acp => "ui.ai_test_acp_tip",- Kind::Api => "ui.ai_test_api_tip",- Kind::Anthropic => "ui.ai_test_anthropic_tip",- };- if test_button.on_hover_text(tr(tip)).clicked() {- test = Some(entry.clone());- }- if !entry.found {- let edit_button = ui_kit::button(ui, tr("ui.ai_edit"), ui_kit::Button::Small);- crate::scenario::publish_handle(&format!("prefs:ai_edit:{}", entry.id), edit_button.rect.center());- if edit_button.on_hover_text(tr("ui.ai_edit_tip")).clicked() {- edit = Some(entry.id.clone());- }- }- if !entry.found && ui_kit::button(ui, tr("ui.ai_remove"), ui_kit::Button::Ghost).clicked() {- remove = Some(entry.id.clone());- }- match entry.login {- "login_found" => ui_kit::settings_badge(ui, tr("ui.agent_chat_login_found"), false),- "signed_in" => ui_kit::settings_badge(ui, tr("ui.agent_chat_signed_in"), false),- "key" => ui_kit::settings_badge(ui, tr("ui.agent_chat_key_in_env"), false),- "signed_out" => ui_kit::settings_badge(ui, tr("ui.agent_chat_not_signed_in"), true),- _ => {}- }- if !entry.found {- ui_kit::settings_badge(ui, tr("ui.ai_added"), false);- }- });- ui_kit::settings_short_note(ui, &entry.detail());- // Wide enough for an endpoint's "Request timeout" or "Reasoning effort" too,- // so all rows line up.- let label_w = (t.form_label_width + t.space_16)- .max(ui_kit::ContentWidth::label(ui, tr("ui.ai_request_timeout")) + t.space_16)- .max(ui_kit::ContentWidth::label(ui, tr("ui.ai_reasoning_effort")) + t.space_16);- ui_kit::settings_form(ui, label_w, |ui| {- ui_kit::row(ui, tr("ui.ai_permissions"), |ui| {- let current = app.preferences.agent_permissions.get(&entry.id).copied();- let shown = current.map_or_else(|| tr("ui.ai_mode_global").to_owned(), |mode| mode.label().to_owned());- let mut pick: Option<Option<Mode>> = None;- ui_kit::dropdown_menu(ui, ("sc_ai_mode", &entry.id), &shown, |ui| {- if ui_kit::list_picker(ui, "global", tr("ui.ai_mode_global"), current.is_none()).clicked() {- pick = Some(None);- }- for mode in Mode::ALL {- if ui_kit::list_picker(ui, mode.id(), mode.label(), current == Some(mode)).clicked() {- pick = Some(Some(mode));+ let detail = entry.detail();+ let gate = crate::prefs_search::block_gate(ui, &entry.name, Some(&format!("{} {detail}", entry.id)));+ let before = crate::prefs_search::hits(ui);+ let mut paint = |ui: &mut egui::Ui| {+ let card = ui_kit::settings_card(ui, |ui| {+ ui.with_layout(egui::Layout::top_down(egui::Align::Min), |ui| {+ crate::prefs_search::visible(ui, &[&entry.name, &entry.id, &detail]);+ ui.label(egui::RichText::new(&entry.name).strong().size(t.font_label).color(t.form_ink));+ ui.allocate_ui_with_layout(+ egui::vec2(ui.available_width(), t.control_height),+ egui::Layout::left_to_right(egui::Align::Center).with_main_wrap(true),+ |ui| {+ let is_default = default.as_deref() == Some(entry.id.as_str());+ let choice = ui_kit::button(+ ui,+ tr(if is_default { "ui.ai_default" } else { "ai.prefs.make_default" }),+ if is_default { ui_kit::Button::SmallSelected } else { ui_kit::Button::Small },+ );+ crate::scenario::publish_target(&format!("dialog:list:{}", entry.id), choice.rect);+ if choice.clicked() {+ app.preferences.agent_default = entry.id.clone();}- }+ let test_button = ui_kit::button(ui, tr("ui.ai_test"), ui_kit::Button::Small);+ crate::scenario::publish_handle(&format!("prefs:ai_test:{}", entry.id), test_button.rect.center());+ let tip = match entry.kind {+ Kind::Acp => "ui.ai_test_acp_tip",+ Kind::Api => "ui.ai_test_api_tip",+ Kind::Anthropic => "ui.ai_test_anthropic_tip",+ };+ if test_button.on_hover_text(tr(tip)).clicked() {+ test = Some(entry.clone());+ }+ if !entry.found {+ let edit_button = ui_kit::button(ui, tr("ui.ai_edit"), ui_kit::Button::Small);+ crate::scenario::publish_handle(&format!("prefs:ai_edit:{}", entry.id), edit_button.rect.center());+ if edit_button.on_hover_text(tr("ui.ai_edit_tip")).clicked() {+ edit = Some(entry.id.clone());+ }+ }+ if !entry.found {+ let button = ui_kit::button(ui, tr("ui.ai_remove"), ui_kit::Button::Ghost);+ crate::scenario::publish_target(&format!("prefs:ai_remove:{}", entry.id), button.rect);+ if button.clicked() {+ remove = Some(entry.id.clone());+ }+ }+ match entry.login {+ "login_found" => ui_kit::settings_badge(ui, tr("ui.agent_chat_login_found"), false),+ "signed_in" => ui_kit::settings_badge(ui, tr("ui.agent_chat_signed_in"), false),+ "key" => ui_kit::settings_badge(ui, tr("ui.agent_chat_key_in_env"), false),+ "signed_out" => ui_kit::settings_badge(ui, tr("ui.agent_chat_not_signed_in"), true),+ _ => {}+ }+ if !entry.found {+ ui_kit::settings_badge(ui, tr("ui.ai_added"), false);+ }+ },+ );+ ui_kit::settings_short_note(ui, &detail).on_hover_text(&entry.id);+ // Wide enough for an endpoint's "Request timeout" or "Reasoning effort" too,+ // so all rows line up.+ let label_w = [tr("ui.ai_permissions"), tr("ui.ai_request_timeout"), tr("ui.ai_reasoning_effort")]+ .iter()+ .map(|label| ui_kit::ContentWidth::label(ui, label) + t.space_4)+ .fold(0.0, f32::max);+ ui_kit::settings_form(ui, label_w, |ui| {+ ui_kit::row(ui, tr("ui.ai_permissions"), |ui| {+ let current = app.preferences.agent_permissions.get(&entry.id).copied();+ let shown = current.map_or_else(|| tr("ui.ai_mode_global").to_owned(), |mode| mode.label().to_owned());+ let mut pick: Option<Option<Mode>> = None;+ let options: Vec<_> = std::iter::once(tr("ui.ai_mode_global")).chain(Mode::ALL.map(Mode::label)).collect();+ crate::prefs_search::note_current(ui, &options.join(" "));+ let response = ui_kit::settings_control_width(ui, t.space_24 * 9.0 + t.space_4, |ui| {+ ui_kit::dropdown_menu(ui, ("sc_ai_mode", &entry.id), &shown, |ui| {+ if ui_kit::list_picker(ui, "global", tr("ui.ai_mode_global"), current.is_none()).clicked() {+ pick = Some(None);+ }+ for mode in Mode::ALL {+ if ui_kit::list_picker(ui, mode.id(), mode.label(), current == Some(mode)).clicked() {+ pick = Some(Some(mode));+ }+ }+ })+ });+ let query = crate::prefs_search::query(ui);+ if let Some(option) = options+ .iter()+ .find(|option| option.to_lowercase() == query)+ .or_else(|| options.iter().find(|option| crate::prefs_search::texts_hit(ui, &[*option])))+ {+ crate::prefs_search::remember(ui, option, response.rect);+ }+ for option in options {+ crate::prefs_search::follow(ui, option, response.rect);+ }+ match pick {+ Some(Some(mode)) => {+ app.preferences.agent_permissions.insert(entry.id.clone(), mode);+ }+ Some(None) => {+ app.preferences.agent_permissions.remove(&entry.id);+ }+ None => {}+ }+ });});- match pick {- Some(Some(mode)) => {- app.preferences.agent_permissions.insert(entry.id.clone(), mode);- }- Some(None) => {- app.preferences.agent_permissions.remove(&entry.id);- }- None => {}+ if entry.kind == Kind::Api+ && let Some(c) = app.preferences.agents.iter_mut().find(|c| c.id == entry.id)+ {+ ui_kit::settings_form(ui, label_w, |ui| {+ ui_kit::row(ui, tr("ui.ai_request_timeout"), |ui| {+ let mut secs = entry.request_timeout_s;+ if timeout_field(ui, &mut secs, &format!("prefs:ai_timeout:{}", entry.id)) {+ c.request_timeout_s = secs;+ retimed = Some((entry.id.clone(), secs));+ }+ });+ ui_kit::row(ui, tr("ui.ai_reasoning_effort"), |ui| {+ let mut effort = c.reasoning_effort.clone();+ if effort_field(ui, &mut effort, &format!("prefs:ai_reasoning:{}", entry.id)) {+ let effort = agents::reasoning_effort(&effort);+ c.reasoning_effort = effort.clone();+ reeffort = Some((entry.id.clone(), effort));+ }+ });+ });}+ if app.preferences.agent_permissions.get(&entry.id) == Some(&Mode::All) {+ ui_kit::text(ui, tr("ai.prefs.override_all_warning"), ui_kit::Text::Report("agent_permissions_warning", true))+ .on_hover_text(tr("ui.ai_mode_all_warning"));+ }+ test_line(ui, &app.agent_chat.settings.tests.get(&entry.id));});if let Some(protocol) = entry.kind.protocol() {ui_kit::row(ui, tr("ui.ai_model"), |ui| {@@ -744,33 +873,26 @@ fn agents_section(app: &mut SolveApp, ui: &mut egui::Ui) {});}});- if entry.kind == Kind::Api- && let Some(c) = app.preferences.agents.iter_mut().find(|c| c.id == entry.id)- {- ui_kit::settings_form(ui, label_w, |ui| {- ui_kit::row(ui, tr("ui.ai_request_timeout"), |ui| {- let mut secs = entry.request_timeout_s;- if timeout_field(ui, &mut secs, &format!("prefs:ai_timeout:{}", entry.id)) {- c.request_timeout_s = secs;- retimed = Some((entry.id.clone(), secs));- }- });- ui_kit::row(ui, tr("ui.ai_reasoning_effort"), |ui| {- let mut effort = c.reasoning_effort.clone();- if effort_field(ui, &mut effort) {- let effort = agents::reasoning_effort(&effort);- c.reasoning_effort = effort.clone();- reeffort = Some((entry.id.clone(), effort));- }- });- });+ crate::scenario::publish_rect(&format!("prefs:ai_card:{}", entry.id), card.response.rect);+ let metadata = [&entry.name, &entry.id, &detail];+ if let Some(text) = metadata.iter().find(|text| crate::prefs_search::texts_hit(ui, &[*text])) {+ crate::prefs_search::remember(ui, text, card.response.rect);}- if app.preferences.agent_permissions.get(&entry.id) == Some(&Mode::All) {- ui_kit::text(ui, tr("ai.prefs.override_all_warning"), ui_kit::Text::Report("agent_permissions_warning", true))- .on_hover_text(tr("ui.ai_mode_all_warning"));+ for text in metadata {+ crate::prefs_search::follow(ui, text, card.response.rect);}- test_line(ui, &app.agent_chat.settings.tests.get(&entry.id));- });+ };+ let show = gate.as_ref().is_none_or(|gate| gate.show);+ if show {+ paint(ui);+ } else {+ crate::prefs_search::run_hidden(ui, &entry.id, |ui| {+ paint(ui);+ });+ }+ if let Some(gate) = gate {+ crate::prefs_search::block_finish(ui, &gate, show, before);+ }});}ui.horizontal_wrapped(|ui| {@@ -998,7 +1120,7 @@ pub fn dialog(app: &mut SolveApp, ctx: &egui::Context) {timeout_field(ui, &mut s.request_timeout_s, "ai_add:request_timeout");});ui_kit::row(ui, tr("ui.ai_reasoning_effort"), |ui| {- effort_field(ui, &mut s.reasoning_effort);+ effort_field(ui, &mut s.reasoning_effort, "ai_add:reasoning_effort");});ui_kit::row(ui, tr("ui.ai_key"), |ui| {ui.add_enabled_ui(has_keychain, |ui| {@@ -1172,6 +1294,337 @@ mod card_tests {use crate::scenario::{self, Harness};use serde_json::json;+ /// The fixed Preferences window scrolls even on a tall desktop. Use actual wheel input+ /// before clicking a card action whose published geometry may be outside the viewport.+ fn reveal_card_action(h: &mut Harness, handle: &str) -> Result<(), String> {+ for _ in 0..32 {+ let at = scenario::handle_at(handle).ok_or_else(|| format!("{handle}: the real card action is not published"))?;+ let body = scenario::rect_of("prefs:page_body").ok_or("Preferences has no scroll viewport")?;+ if body.contains(at) {+ return Ok(());+ }+ h.call("ui.scroll", json!({"x":body.center().x,"y":body.center().y,"delta":if at.y < body.top() {100} else {-100}}));+ h.frames(30);+ }+ Err(format!("{handle} could not be scrolled into the Preferences viewport"))+ }++ #[test]+ fn assistant_production_heading_and_sections_use_page_metrics() {+ for theme in ["light", "dark"] {+ let mut h = Harness::new();+ h.app.home.open = false;+ h.app.preferences.ai_features = false;+ h.app.agent_chat.detection = Some(Default::default());+ h.call("ui.resize", json!({"width":1600,"height":4000}));+ h.call("ui.prefs", json!({"open":"Assistant","theme":theme}));+ h.frames(4);+ let warning = scenario::rect_of("prefs:ai_mode:all:icon").unwrap();+ assert!(scenario::rect_of("prefs:ai_mode:all").unwrap().contains_rect(warning));+ let heading = scenario::rect_of("prefs:page_heading").unwrap();+ let body = scenario::rect_of("prefs:page_body").unwrap();+ assert!(body.contains_rect(heading));+ let mut page_font = false;+ let mut scope_visible = false;+ let mut privacy_visible = false;+ for _ in 0..24 {+ for shape in &h.shapes {+ crate::test_support::each_shape(&shape.shape, &mut |shape| {+ if let egui::Shape::Text(text) = shape {+ scope_visible |= text.galley.job.text == tr("ui.ai_modes_scope");+ privacy_visible |= text.galley.job.text == tr("ai.prefs.privacy_note");+ page_font |= text.galley.job.text == "Assistant"+ && text+ .galley+ .job+ .sections+ .iter()+ .all(|section| section.format.font_id.size == crate::theme::Tokens::get().font_page_heading);+ }+ });+ }+ if scope_visible && privacy_visible {+ break;+ }+ h.call("ui.scroll", json!({"x":body.center().x,"y":body.center().y,"delta":-160}));+ h.frames(30);+ }+ assert!(page_font, "the production heading uses the page font");+ assert!(scope_visible, "the full localized permission scope remains visible without hovering, including with AI off");+ assert!(privacy_visible, "the localized privacy note remains visible without hovering, including with AI off");+ let mut previous: Option<f32> = None;+ for key in ["assistant_availability", "permissions", "agents", "panel", "assistant_connecting", "agent_pointer"] {+ let section = scenario::rect_of(&format!("prefs:section:{key}")).unwrap();+ assert!((section.left() - body.left()).abs() <= 1.0 && (section.right() - body.right()).abs() <= 1.0);+ assert!((section.height() - (crate::theme::Tokens::get().control_height + crate::theme::Tokens::get().space_2)).abs() <= 1.0);+ if let Some(bottom) = previous {+ assert!((section.top() - bottom - 38.0).abs() <= 1.0, "{theme}: {key} retains the page section rhythm");+ }+ previous = Some(scenario::rect_of(&format!("prefs:section:{key}:body")).unwrap().bottom());+ }+ }+ }++ #[test]+ fn pointer_speed_search_reveals_one_real_slider_in_all_enablement_states() {+ use crate::prefs_search::{nav, set_cursor};+ for theme in ["light", "dark"] {+ for (ai, show) in [(true, true), (true, false), (false, true), (false, false)] {+ let mut h = Harness::new();+ h.app.home.open = false;+ h.app.agent_chat.detection = Some(Default::default());+ h.app.preferences.ai_features = ai;+ h.app.ui.agent_cursor.show = show;+ h.app.ui.agent_cursor.speed = crate::agent_cursor::Speed::Times(3.5);+ h.call("ui.resize", json!({"width":1600,"height":1400}));+ h.call("ui.prefs", json!({"open":"General","theme":theme}));+ for query in ["Speed", "Pointer speed", "Motion speed"] {+ h.app.prefs_window.filter = query.into();+ h.frames(6);+ let (_, _, hits) = nav(&h.ctx);+ let matches: Vec<_> = hits.iter().enumerate().filter(|(_, hit)| hit.page == crate::prefs::PAGE_ASSISTANT).collect();+ assert_eq!(matches.len(), 1, "{theme} AI={ai} show={show}: {query} owns one editor");+ set_cursor(&h.ctx, matches[0].0);+ h.frames(2);+ h.step(&json!({"key":"Enter"})).unwrap();+ h.frames(30);+ assert_eq!(h.app.prefs_window.section, crate::prefs::PAGE_ASSISTANT);+ assert!(h.app.prefs_window.filter.is_empty());+ let slider = scenario::rect_of("prefs:agent_pointer_speed").unwrap();+ assert_eq!(slider, scenario::rect_of("dialog:slider:Pointer speed").unwrap());+ let body = scenario::rect_of("dialog:page_body").unwrap();+ assert!(body.contains_rect(slider), "{query} reveals the editor inside the page");+ assert!(scenario::handle_at("prefs:revealed").unwrap().distance(slider.center()) <= 1.0, "{query} reveals the slider itself");+ let tree = h.output.accesskit_update.as_ref().unwrap();+ let sliders: Vec<_> = tree+ .nodes+ .iter()+ .filter(|(_, node)| node.role() == egui::accesskit::Role::Slider && node.label() == Some("Pointer speed"))+ .collect();+ assert_eq!(sliders.len(), 1);+ assert_eq!(sliders[0].1.is_disabled(), !(ai && show));+ assert_eq!(h.app.ui.agent_cursor.speed, crate::agent_cursor::Speed::Times(3.5));+ assert_eq!((h.app.preferences.ai_features, h.app.ui.agent_cursor.show), (ai, show));+ }+ }+ }+ }++ #[test]+ fn overlapping_agent_metadata_has_one_card_target_and_keeps_fields_indexed() {+ use crate::prefs_search::{nav, set_cursor};+ use std::sync::{+ Arc,+ atomic::{AtomicUsize, Ordering},+ };+ for theme in ["light", "dark"] {+ let mut h = Harness::new();+ h.app.home.open = false;+ h.app.agent_chat.detection = Some(Default::default());+ h.app.preferences.agent_connect_at_start = false;+ h.app.preferences.agents = vec![+ AgentConfig {+ id: "acp-current".into(),+ name: "Current fixture".into(),+ command: "solidcraft-fixture-agent --acp".into(),+ ..Default::default()+ },+ AgentConfig {+ id: "api-public".into(),+ name: "Public endpoint".into(),+ kind: Kind::Api,+ base_url: "https://example.com/v1".into(),+ model: "public-model".into(),+ reasoning_effort: "high".into(),+ ..Default::default()+ },+ ];+ h.app.preferences.agent_default = "acp-current".into();+ h.app.agent_chat.agent_id = Some("acp-current".into());+ let calls = Arc::new(AtomicUsize::new(0));+ let seen = calls.clone();+ h.app.services.agent_http = Some(Arc::new(move |_| {+ seen.fetch_add(1, Ordering::SeqCst);+ Err("fixture must not be queried".into())+ }));+ h.call("ui.resize", json!({"width":1600,"height":1800}));+ h.call("ui.prefs", json!({"open":"General","theme":theme}));+ for query in ["public", "api-public", "public-model"] {+ h.app.prefs_window.filter = query.into();+ h.frames(6);+ let (_, _, hits) = nav(&h.ctx);+ let matches: Vec<_> = hits.iter().enumerate().filter(|(_, hit)| hit.page == crate::prefs::PAGE_ASSISTANT).collect();+ assert_eq!(matches.len(), 1, "{query}: overlapping name/id/detail own one card stop");+ set_cursor(&h.ctx, matches[0].0);+ h.frames(2);+ h.step(&json!({"key":"Enter"})).unwrap();+ h.frames(30);+ assert_eq!(h.app.prefs_window.section, crate::prefs::PAGE_ASSISTANT);+ assert!(h.app.prefs_window.filter.is_empty());+ let card = scenario::rect_of("prefs:ai_card:api-public").unwrap();+ assert!(scenario::rect_of("dialog:page_body").unwrap().contains_rect(card));+ assert!(scenario::handle_at("prefs:revealed").unwrap().distance(card.center()) <= 1.0, "{query} reveals the same complete card");+ }+ for (query, handle) in [("Request timeout", "prefs:ai_timeout:api-public"), ("Reasoning effort", "prefs:ai_reasoning:api-public")] {+ h.app.prefs_window.filter = query.into();+ h.frames(6);+ let (_, _, hits) = nav(&h.ctx);+ let matches: Vec<_> =+ hits.iter().enumerate().filter(|(_, hit)| hit.page == crate::prefs::PAGE_ASSISTANT && hit.label == query).collect();+ assert_eq!(matches.len(), 1, "{query} keeps its independent setting target");+ set_cursor(&h.ctx, matches[0].0);+ h.frames(2);+ h.step(&json!({"key":"Enter"})).unwrap();+ h.frames(30);+ assert!(h.app.prefs_window.filter.is_empty());+ assert!(scenario::rect_of("dialog:page_body").unwrap().contains_rect(scenario::rect_of(handle).unwrap()));+ }+ h.app.prefs_window.filter = "Permissions".into();+ h.frames(6);+ let (_, _, hits) = nav(&h.ctx);+ assert!(+ hits.iter().filter(|hit| hit.page == crate::prefs::PAGE_ASSISTANT && hit.label == "Permissions").count() >= 2,+ "real per-agent Permissions remain independently indexed"+ );+ assert_eq!(calls.load(Ordering::SeqCst), 0, "ACP-current/API-noncurrent search never probes or tests an endpoint");+ }+ }++ #[test]+ fn assistant_off_keeps_dependent_controls_disabled_and_cancel_restores_the_pointer() {+ let mut h = Harness::new();+ h.app.home.open = false;+ h.app.agent_chat.detection = Some(Default::default());+ h.app.ui.agent_cursor.speed = crate::agent_cursor::Speed::Times(3.5);+ h.call("ui.resize", json!({"width":1600,"height":1800}));+ h.call("ui.prefs", json!({"open":"Assistant"}));+ h.app.preferences.ai_features = false;+ h.app.ui.agent_cursor.speed = crate::agent_cursor::Speed::Instant;+ h.frames(4);+ let tree = h.output.accesskit_update.as_ref().unwrap();+ for label in [+ tr("ui.ai_toolbar_button"),+ tr("ai.prefs.allow_control"),+ tr("ai.prefs.connect_apps"),+ tr("ai.prefs.background_commands"),+ tr("ai.prefs.connect_at_start"),+ tr("ai.prefs.open_at_start"),+ tr("ai.prefs.show_pointer"),+ tr("ai.prefs.follow_camera"),+ ] {+ let nodes: Vec<_> =+ tree.nodes.iter().filter(|(_, node)| node.role() == egui::accesskit::Role::CheckBox && node.label() == Some(label)).collect();+ assert_eq!(nodes.len(), 1, "{label} is retained exactly once");+ assert!(nodes[0].1.is_disabled(), "{label} dims when AI is off");+ }+ assert!(tree.nodes.iter().any(|(_, node)| node.label() == Some(tr("ui.ai_show_features")) && !node.is_disabled()));+ assert!(h.app.agent_chat.detecting.is_none() && h.app.agent_chat.backend.is_none());+ h.step(&json!({"click":{"handle":"prefs:cancel"}})).unwrap();+ assert!(h.app.preferences.ai_features);+ assert_eq!(h.app.ui.agent_cursor.speed, crate::agent_cursor::Speed::Times(3.5));+ }++ #[test]+ fn assistant_limit_dropdown_preserves_values_and_seeds_only_on_transition() {+ let mut h = Harness::new();+ h.app.home.open = false;+ h.app.agent_chat.detection = Some(Default::default());+ h.app.preferences.agent_chat_turn_limit = 37;+ h.call("ui.resize", json!({"width":1600,"height":1400}));+ h.call("ui.prefs", json!({"open":"Assistant"}));+ h.app.prefs_window.filter = tr("ui.agent_chat_turn_limit").into();+ h.frames(4);+ for limit in [1, 37, 199, 200] {+ h.app.preferences.agent_chat_turn_limit = limit;+ h.frames(3);+ assert_eq!(h.app.preferences.agent_chat_turn_limit, limit, "rendering preserves every supported value");+ }+ h.step(&json!({"click":{"handle":"prefs:agent_chat_turn_limit:mode"}})).unwrap();+ h.step(&json!({"click":{"handle":format!("dialog:{}:{}", tr("ui.agent_chat_turn_limit"), tr("ui.agent_chat_turn_unlimited"))}})).unwrap();+ assert_eq!(h.app.preferences.agent_chat_turn_limit, 0);+ h.step(&json!({"click":{"handle":"prefs:agent_chat_turn_limit:mode"}})).unwrap();+ h.step(&json!({"click":{"handle":format!("dialog:{}:{}", tr("ui.agent_chat_turn_limit"), tr("prefs.assistant_limited"))}})).unwrap();+ assert_eq!(h.app.preferences.agent_chat_turn_limit, gate::SEEDED_TURN_LIMIT);+ h.step(&json!({"click":{"handle":"prefs:cancel"}})).unwrap();+ assert_eq!(h.app.preferences.agent_chat_turn_limit, 37);+ }++ #[test]+ fn agent_card_reads_the_key_only_for_test_and_removal_clears_remembered_state() {+ use std::sync::{+ Arc,+ atomic::{AtomicUsize, Ordering},+ };+ #[derive(Default)]+ struct Keys {+ values: MemoryKeys,+ reads: AtomicUsize,+ }+ impl Secrets for Keys {+ fn get(&self, id: &str) -> Result<Option<String>, String> {+ self.reads.fetch_add(1, Ordering::SeqCst);+ self.values.get(id)+ }+ fn set(&self, id: &str, secret: &str) -> Result<(), String> {+ self.values.set(id, secret)+ }+ fn delete(&self, id: &str) -> Result<(), String> {+ self.values.delete(id)+ }+ }+ let mut h = Harness::new();+ h.app.home.open = false;+ h.app.agent_chat.detection = Some(Default::default());+ let keys = Arc::new(Keys::default());+ keys.set("api-public", "render-fixture-key").unwrap();+ h.app.services.secrets = Some(keys.clone());+ let (tx, rx) = std::sync::mpsc::channel();+ h.app.services.agent_http = Some(Arc::new(move |_| {+ let _ = tx.send(());+ Ok((200, br#"{"data":[{"id":"public-model"}]}"#.to_vec()))+ }));+ // An ACP default keeps the API fixture noncurrent; baseline capability polling is unchanged.+ h.app.preferences.agents = vec![+ AgentConfig {+ id: "acp-public".into(),+ name: "Public ACP".into(),+ command: "solidcraft-fixture-agent --acp".into(),+ ..Default::default()+ },+ AgentConfig {+ id: "api-public".into(),+ name: "Public endpoint".into(),+ kind: Kind::Api,+ base_url: "https://example.com/v1".into(),+ model: "public-model".into(),+ key: true,+ ..Default::default()+ },+ ];+ h.app.preferences.agent_default = "acp-public".into();+ h.app.preferences.agent_last = "api-public".into();+ h.app.preferences.agent_permissions.insert("api-public".into(), Mode::Ask);+ h.app.preferences.agent_always_allow.insert("api-public".into(), vec!["view.fit".into()]);+ h.call("ui.resize", json!({"width":1600,"height":1400}));+ h.call("ui.prefs", json!({"open":"Assistant"}));+ h.app.prefs_window.filter = "Public endpoint".into();+ h.frames(4);+ assert_eq!(keys.reads.load(Ordering::SeqCst), 0, "rendering never retrieves a stored key");+ assert!(rx.try_recv().is_err(), "a noncurrent card does not probe or test its endpoint");+ assert!(h.widget("render-fixture-key").is_none());+ h.step(&json!({"click":{"handle":"prefs:ai_test:api-public"}})).unwrap();+ rx.recv_timeout(std::time::Duration::from_secs(2)).unwrap();+ assert_eq!(keys.reads.load(Ordering::SeqCst), 1, "only the explicit Test action retrieves the key");+ h.step(&json!({"click":{"handle":"prefs:ai_remove:api-public"}})).unwrap();+ assert!(!h.app.preferences.agents.iter().any(|agent| agent.id == "api-public"));+ assert!(!h.app.preferences.agent_permissions.contains_key("api-public"));+ assert!(!h.app.preferences.agent_always_allow.contains_key("api-public"));+ assert!(!h.app.agent_chat.settings.tests.contains_key("api-public"));+ assert!(!h.app.agent_chat.login_results.contains_key("api-public"));+ assert!(h.app.preferences.agent_last.is_empty());+ assert_eq!(keys.values.get("api-public").unwrap(), None);+ }+#[test]fn cached_model_warning_follows_endpoint_model_and_agent_selection() {let mut h = Harness::new();@@ -1305,6 +1758,7 @@ mod card_tests {h.app.preferences.agent_always_allow.insert("custom-1".into(), vec!["read".into()]);h.call("ui.prefs", json!({"open": "AI"}));h.frames(4);+ reveal_card_action(&mut h, "prefs:ai_edit:custom-1").unwrap();let edit = scenario::handle_at("prefs:ai_edit:custom-1").expect("an added agent has Edit");h.call("ui.click", json!({"x": edit.x, "y": edit.y}));h.frames(4);@@ -1663,6 +2117,7 @@ mod card_tests {});h.step(&json!({"call":"ui.prefs","params":{"open":"AI"}})).unwrap();h.frames(4);+ reveal_card_action(&mut h, "prefs:ai_model:api-1").unwrap();assert!(scenario::handle_at("prefs:ai_model:api-1").is_some());assert!(seen.lock().unwrap().is_empty(), "looking at the page asks nobody");diff --git a/crates/ui-egui/src/agent_chat/tests.rs b/crates/ui-egui/src/agent_chat/tests.rsindex 082d01f31a..d1068ea56e 100644--- a/crates/ui-egui/src/agent_chat/tests.rs+++ b/crates/ui-egui/src/agent_chat/tests.rs@@ -2013,6 +2013,17 @@ fn the_card_of_a_running_endpoint_changes_the_chats_model() {script.report(models_reply("fast"));h.step(&json!({"call": "ui.prefs", "params": {"open": "AI"}})).unwrap();h.frames(4);+ // The permission cards put endpoint controls below the fixed page's viewport.+ for _ in 0..32 {+ let at = handle_at("prefs:ai_model:api-1").unwrap();+ let body = crate::scenario::rect_of("prefs:page_body").unwrap();+ if body.contains(at) {+ break;+ }+ h.call("ui.scroll", json!({"x":body.center().x,"y":body.center().y,"delta":if at.y < body.top() {100} else {-100}}));+ h.frames(30);+ }+ assert!(crate::scenario::rect_of("prefs:page_body").unwrap().contains(handle_at("prefs:ai_model:api-1").unwrap()));h.step(&json!({"click": {"handle": "prefs:ai_model:api-1"}})).unwrap();h.frames(3);assert!(handle_at("prefs:ai_model:api-1:smart").is_some());diff --git a/crates/ui-egui/src/agent_cursor.rs b/crates/ui-egui/src/agent_cursor.rsindex 09590e21ff..44f700b03d 100644--- a/crates/ui-egui/src/agent_cursor.rs+++ b/crates/ui-egui/src/agent_cursor.rs@@ -109,7 +109,7 @@ pub fn speed_slider(ui: &mut egui::Ui, speed: &mut Speed) -> egui::Response {1.0..=5.5,crate::ui_kit::Slider {step: Some(0.5),- format: |v| if v > 5.25 { crate::i18n::tr_label("Instant").into() } else { Speed::Times(v).label() },+ format: |v| if v > 5.25 { crate::i18n::tr_label("Instant").into() } else { format!("{v:.2}x") },..Default::default()},);diff --git a/crates/ui-egui/src/bidi.rs b/crates/ui-egui/src/bidi.rsindex 442d592ec3..fd27783e2c 100644--- a/crates/ui-egui/src/bidi.rs+++ b/crates/ui-egui/src/bidi.rs@@ -89,6 +89,10 @@ pub fn visual_template(text: &str) -> Cow<'_, str> {}fn visual_line(line: &str, output: &mut String) {+ // Empty paragraphs have no bidi levels. Their separators are kept by screen_order.+ if line.is_empty() {+ return;+ }let info = unicode_bidi::ParagraphBidiInfo::new(line, None);let (levels, runs) = info.visual_runs(0..line.len());for run in runs {@@ -169,6 +173,9 @@ mod tests {#[test]fn each_line_is_its_own_paragraph() {assert_eq!(visual("שלום עולם\nworld"), "עולם שלום\nworld");+ assert_eq!(visual("\nשלום עולם\n\nworld\n"), "\nעולם שלום\n\nworld\n");+ assert_eq!(visual_template("שלום\n\n{count}"), "שלום\n\n{count}");+ assert_eq!(screen_order("\n\n"), "\n\n");}#[test]diff --git a/crates/ui-egui/src/keymap.rs b/crates/ui-egui/src/keymap.rsindex 63706840fa..82ecc6be71 100644--- a/crates/ui-egui/src/keymap.rs+++ b/crates/ui-egui/src/keymap.rs@@ -613,59 +613,69 @@ pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) {let mut action: Option<(String, &str)> = None;ui_kit::scope(ui, |ui| {if !filtering {- let actions = [- ui_kit::SearchAction { label: app.tr_label("Reset All"), icon: None, visible: !app.keymap.read_only, tooltip: None },- ui_kit::SearchAction { label: app.tr_label("Import…"), icon: Some("import_tray"), visible: !app.keymap.read_only, tooltip: None },- ui_kit::SearchAction {- label: app.tr_label("Export…"),- icon: Some("export_tray"),- visible: true,- tooltip: Some(app.tr_label("Keys, S box favorites and the toolbar, as a file")),- },- ];- let (filter, toolbar_action) = ui_kit::search_actions_row(- ui,- egui::Id::new("sc_keymap_filter"),- &mut app.keymap.filter,- crate::i18n::tr_label("Filter commands or keys"),- &actions,- );- crate::scenario::publish_target("keymap:filter", filter.rect);- crate::scenario::publish_handle("shortcut:filter", filter.rect.center());- if filter.clicked() {- action = Some((String::new(), "cancel"));- }- if let Some(index) = toolbar_action {- action = Some((- String::new(),- match index {- 0 => "reset_all",- 1 => "import",- _ => "export",- },- ));+ let t = crate::theme::Tokens::get();+ let edit_label = if app.keymap.read_only { app.tr_label("Edit shortcuts") } else { app.tr("install.done") };+ let actions_width = ui_kit::ContentWidth::button(ui, edit_label)+ + ui_kit::icon_label_width(ui, app.tr("prefs.profile_export"), Some("export_tray"), false)+ + if app.keymap.read_only {+ 0.0+ } else {+ ui_kit::icon_label_width(ui, app.tr("prefs.shortcuts_import"), Some("import_tray"), false) + t.space_8+ }+ + t.space_8 * 2.0;+ ui.horizontal_wrapped(|ui| {+ ui.spacing_mut().item_spacing.x = t.space_8;+ let width = (ui.available_width() - actions_width).max(t.form_label_width).min(ui.available_width());+ let filter = ui+ .allocate_ui_with_layout(egui::vec2(width, t.control_height), egui::Layout::left_to_right(egui::Align::Center), |ui| {+ ui_kit::search_field(+ ui,+ egui::Id::new("sc_keymap_filter"),+ &mut app.keymap.filter,+ crate::i18n::tr_label("Filter commands or keys"),+ )+ })+ .inner;+ crate::scenario::publish_target("keymap:filter", filter.rect);+ crate::scenario::publish_handle("shortcut:filter", filter.rect.center());+ if filter.clicked() {+ action = Some((String::new(), "cancel"));+ }+ if app.keymap.read_only {+ let edit = ui_kit::button(ui, app.tr_label("Edit shortcuts"), ui_kit::Button::Normal);+ crate::scenario::publish_target("keymap:edit", edit.rect);+ if edit.clicked() {+ app.keymap.read_only = false;+ }+ } else {+ let done = ui_kit::button(ui, app.tr("install.done"), ui_kit::Button::Primary);+ crate::scenario::publish_target("keymap:done", done.rect);+ if done.clicked() {+ action = Some((String::new(), "done"));+ }+ }+ let export = ui_kit::icon_label_button(ui, app.tr("prefs.profile_export"), "export_tray", true, false)+ .on_hover_text(app.tr_label("Keys, S box favorites and the toolbar, as a file"));+ crate::scenario::publish_target("keymap:export", export.rect);+ if export.clicked() {+ action = Some((String::new(), "export"));+ }+ if !app.keymap.read_only {+ let import = ui_kit::icon_label_button(ui, app.tr("prefs.shortcuts_import"), "import_tray", true, false);+ crate::scenario::publish_target("keymap:import", import.rect);+ if import.clicked() {+ action = Some((String::new(), "import"));+ }+ }+ });+ if app.keymap.read_only {+ ui_kit::text(ui, app.tr_label("Read-only list: shortcuts can't be changed here."), ui_kit::Text::Note("shortcut_read_only"));}+ ui_kit::checkbox(ui, app.tr("ui.sketch_keys_only"), &mut app.preferences.sketch_keys_only)+ .on_hover_text(app.tr("ui.sketch_keys_only_tip"));if let Some(chosen) = outcome(app, ui) {action = Some((String::new(), chosen));}- ui_kit::text(ui, app.tr_label("Select Other: hold the left button still on the model (or right-click › Select Other…) to list everything under the cursor; click again on the same spot to select the next thing there. Double-click the middle button to go Home (Preferences › Navigation)."), ui_kit::Text::Note("navigation"));- ui_kit::checkbox(ui, app.tr("ui.sketch_keys_only"), &mut app.preferences.sketch_keys_only)- .on_hover_text(app.tr("ui.sketch_keys_only_tip"));- }- // The list Help and Home open looks like the Shortcuts page of Preferences: say it can't- // be changed here, and lead to the page where it can (#7409).- if !filtering && app.keymap.read_only {- ui.horizontal_wrapped(|ui| {- ui_kit::text(ui, app.tr_label("Read-only list: shortcuts can't be changed here."), ui_kit::Text::Note("shortcut_read_only"));- let edit = ui_kit::button(ui, app.tr_label("Edit shortcuts"), ui_kit::Button::Normal);- crate::scenario::publish_target("keymap:edit", edit.rect);- if edit.clicked() {- app.keymap.read_only = false;- }- });- }- if !filtering && !app.keymap.read_only {- ui_kit::text(ui, app.tr("ui.shortcut_capture_hint"), ui_kit::Text::Note("shortcut_capture_help"));if app.keymap.capturing.is_some() {let hint = ctx.input(|input| app.keymap.recorder.hint(input));ui_kit::text(ui, app.tr(hint), ui_kit::Text::Hint("shortcut_capture_state"));@@ -676,41 +686,47 @@ pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) {.into_iter().filter_map(|c| {let keys = keys_for_spec(app, c);+ let displayed: Vec<_> = keys.iter().map(|key| display(key)).collect();let label = app.tr_label(c.label);+ let group = shortcut_group(c);let hit = if filtering {- crate::prefs_search::matches_text(&q, &[c.label, c.id, label].into_iter().chain(keys.iter().copied()).collect::<Vec<_>>())+ crate::prefs_search::shows_all(ui)+ || crate::prefs_search::matches_text(+ &q,+ &[c.label, c.id, label, &group]+ .into_iter()+ .chain(keys.iter().copied())+ .chain(displayed.iter().map(String::as_str))+ .collect::<Vec<_>>(),+ )} else {- q.is_empty() || [c.label, c.id, label].iter().chain(&keys).any(|s| s.to_lowercase().contains(&q))+ q.is_empty()+ || [c.label, c.id, label, &group]+ .iter()+ .chain(&keys)+ .copied()+ .chain(displayed.iter().map(String::as_str))+ .any(|s| s.to_lowercase().contains(&q))};- hit.then_some((c, keys, label))+ hit.then_some((c, keys, label, group))}).collect();if filtering && commands.is_empty() {return;}let count = commands.len();- let shortcut_title = app.tr("prefs.shortcuts").to_string();- let paint = |ui: &mut egui::Ui| {- let t = crate::theme::Tokens::get();- let spacing = ui.spacing().item_spacing.x;- let key_width = commands- .iter()- .map(|(_, keys, _)| keys.iter().map(|key| ui_kit::ContentWidth::button(ui, &display(key)) + spacing).sum::<f32>() + t.control_height)- .chain(app.keymap.recorder.preview().filter(|_| app.keymap.capturing.is_some()).map(|text| ui_kit::ContentWidth::button(ui, &text)))- .fold(ui_kit::ContentWidth::button(ui, app.tr_label("press a key…")), f32::max)- .max(ui_kit::ContentWidth::label(ui, app.tr_label("Keyboard Shortcuts")) + t.space_8);- let action_width = if app.keymap.read_only {- t.control_height+ // Keep registry order within each real registry group; no command is lost because it+ // has no ribbon placement. Such commands use their registry id's namespace.+ let mut groups: Vec<(String, Vec<_>)> = Vec::new();+ for (c, keys, label, group) in commands {+ if let Some((_, rows)) = groups.iter_mut().find(|(name, _)| name == &group) {+ rows.push((c, keys, label));} else {- ui_kit::ContentWidth::button(ui, app.tr_label("Clear")) + ui_kit::ContentWidth::button(ui, app.tr_label("Reset")) + t.space_4- };- let columns = [- ui_kit::Column::new("Command", 1.5).flex().min_content_width(t.form_label_width),- ui_kit::Column::new(crate::i18n::tr("keymap.command_id"), 1.8).flex().min_content_width(t.form_label_width),- ui_kit::Column::new("Keyboard Shortcuts", 1.0).flex().min_content_width(key_width),- ui_kit::Column::new("", 0.0).icon_only().min_content_width(action_width),- ];- // A search shows a recording's outcome and its next step above the shortcuts it found.+ groups.push((group, vec![(c, keys, label)]));+ }+ }+ let shortcut_title = app.tr("prefs.shortcuts").to_string();+ let mut paint = |ui: &mut egui::Ui| {if filtering {if let Some(chosen) = outcome(app, ui) {action = Some((String::new(), chosen));@@ -720,76 +736,37 @@ pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) {ui_kit::text(ui, app.tr(hint), ui_kit::Text::Hint("shortcut_capture_state"));}}- ui_kit::table(ui, "keymap", &columns, crate::i18n::tr("keymap.empty"), |ui, table| {- for (c, keys, translated_label) in commands {- table.row_visible(ui, c.id, app.keymap.capturing.as_deref() == Some(c.id), false, |row| {- row.cell(|ui| {- ui_kit::text(ui, translated_label, ui_kit::Text::Cell);- });- row.cell(|ui| {- ui_kit::text(ui, c.id, ui_kit::Text::Cell);- });- let capturing = app.keymap.capturing.as_deref() == Some(c.id);- let changed = app.keymap.custom.contains_key(c.id);- row.cell(|ui| {- if app.keymap.read_only {- let text = if keys.is_empty() {- "—".to_string()- } else {- keys.iter().map(|key| display(key)).collect::<Vec<_>>().join(", ")- };- ui_kit::text(ui, &text, ui_kit::Text::Cell);- return;- }- let tip = app.tr_label("Click, then press the new key");- ui.horizontal(|ui| {- // Each key replaces itself when clicked; the last slot adds one.- for slot in 0..=keys.len() {- let capture = if capturing && app.keymap.slot == slot {- let text = app.keymap.recorder.preview().unwrap_or_else(|| app.tr_label("press a key…").to_string());- ui_kit::button(ui, &text, ui_kit::Button::Normal).on_hover_text(tip)- } else if let Some(key) = keys.get(slot) {- ui_kit::button(ui, display(key), ui_kit::Button::Normal).on_hover_text(tip)- } else {- let (rect, _) = ui.allocate_exact_size(egui::vec2(t.control_height, t.control_height), egui::Sense::hover());- ui_kit::quiet_icon_button_at(ui, rect, "plus", tip)- };- let name = if slot == 0 { c.id.to_string() } else { format!("{}:{slot}", c.id) };- crate::scenario::publish_target(&format!("keymap:capture:{name}"), capture.rect);- if ui.is_rect_visible(capture.rect) {- crate::scenario::publish_handle(&format!("shortcut:{name}"), capture.rect.center());- }- if capture.clicked() {- capture.surrender_focus();- action = Some((format!("{}\n{slot}", c.id), "capture"));- }- }- });- });- row.cell(|ui| {- if !app.keymap.read_only {- ui.horizontal(|ui| {- let clear = ui_kit::button(ui, app.tr_label("Clear"), ui_kit::Button::Enabled(!keys.is_empty()));- crate::scenario::publish_target(&format!("keymap:clear:{}", c.id), clear.rect);- if clear.clicked() {- action = Some((c.id.to_string(), "clear"));- }- let reset = ui_kit::button(ui, app.tr_label("Reset"), ui_kit::Button::Enabled(changed));- crate::scenario::publish_target(&format!("keymap:reset:{}", c.id), reset.rect);- if reset.clicked() {- action = Some((c.id.to_string(), "reset"));- }- });- }- });- });+ if count == 0 {+ ui_kit::text(ui, app.tr("keymap.empty"), ui_kit::Text::Hint("shortcuts_empty"));+ }+ for (group, rows) in &groups {+ ui_kit::section_heading(ui, group);+ let heading = crate::scenario::rect_of(&format!("dialog:heading:{group}"));+ if let Some(rect) = heading {+ crate::prefs_search::remember(ui, group, rect);+ crate::prefs_search::follow(ui, group, rect);}- });+ for (command, keys, label) in rows {+ if let Some(chosen) = shortcut_row(app, ui, command, keys, label, filtering) {+ action = Some(chosen);+ }+ }+ }};if filtering {- ui_kit::search_fold(ui, &shortcut_title, count, paint);+ let open = ui_kit::search_fold(ui, &shortcut_title, count, paint).is_some();+ if !open && let Some(rect) = crate::scenario::rect_of("prefs:search:shortcuts") {+ // Collapsed matches still participate in Up/Down and Enter. Enter lands on+ // the real group or command, where follow() reveals its complete row.+ for (group, rows) in &groups {+ crate::prefs_search::remember(ui, group, rect);+ for (command, keys, label) in rows {+ crate::prefs_search::remember(ui, &shortcut_search_label(command, label, keys), rect);+ }+ }+ }} else {- ui_kit::settings_scroll(ui, "sc_keymap_scroll", paint);+ ui_kit::settings_scroll(ui, "sc_keymap_scroll", &mut paint);}});crate::scenario::publish_count("shortcut_recording", f64::from(app.keymap.capturing.is_some()));@@ -808,7 +785,7 @@ pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) {}Some((id, "clear")) => drop(bind(app, &id, "", false)),Some((id, "reset")) => reset(app, Some(&id)),- Some((_, "reset_all")) => reset(app, None),+ Some((_, "done")) => stop_capture(app),Some((_, "export")) => {let text = crate::toolbar_custom::export(app).to_string();app.pick_save("SolidCraft shortcuts.json", &["json"], move |app, path| {@@ -844,6 +821,174 @@ pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) {}}+/// A global search result must be visible even after the page's own filter was used.+pub(crate) fn reveal(app: &mut SolveApp) {+ app.keymap.filter.clear();+}++fn shortcut_group(command: &CommandSpec) -> String {+ let group = if command.tab.is_empty() { command.id.split('.').next().unwrap_or(command.id) } else { command.tab };+ crate::workspace::tab_name(&group.to_uppercase())+}++fn shortcut_search_label(command: &CommandSpec, label: &str, keys: &[&str]) -> String {+ let displayed: Vec<_> = keys.iter().map(|key| display(key)).collect();+ format!("{label} / {} ({}) · {} · {}", command.label, command.id, keys.join(", "), displayed.join(", "))+}++/// Keep every binding and recorder slot, while skipping the construction of off-screen rows.+fn shortcut_row(+ app: &SolveApp,+ ui: &mut egui::Ui,+ command: &CommandSpec,+ keys: &[&str],+ label: &str,+ filtering: bool,+) -> Option<(String, &'static str)> {+ let t = crate::theme::Tokens::get();+ let editing = !app.keymap.read_only;+ let capturing = app.keymap.capturing.as_deref() == Some(command.id);+ let mut slots: Vec<(usize, String, bool)> = keys.iter().enumerate().map(|(slot, key)| (slot, display(key), true)).collect();+ if slots.is_empty() || (editing && slots.len() < MAX_KEYS) {+ slots.push((slots.len(), String::new(), false));+ }+ for (slot, text, _) in &mut slots {+ if capturing && *slot == app.keymap.slot {+ *text = app.keymap.recorder.preview().unwrap_or_else(|| app.tr("prefs.shortcuts_press").to_owned());+ }+ }+ let widths: Vec<f32> = slots+ .iter()+ .map(|(slot, text, assigned)| {+ if capturing && *slot == app.keymap.slot {+ ui_kit::ContentWidth::button(ui, text)+ } else if *assigned {+ ui_kit::shortcut_binding_width(ui, text)+ } else if keys.is_empty() {+ ui_kit::shortcut_binding_width(ui, "")+ } else {+ t.control_height+ }+ })+ .collect();+ let width = ui.available_width().max(0.0);+ let actions_width = if editing { t.control_height * 2.0 + t.space_4 } else { 0.0 };+ let name_width = ui_kit::ContentWidth::label(ui, label).min(width * 0.45);+ let widest = widths.iter().copied().fold(0.0, f32::max);+ let beside = width - name_width - t.space_14 - actions_width - t.space_8 >= widest;+ let controls_width = (width - actions_width - t.space_8 - if beside { name_width + t.space_14 } else { 0.0 }).max(0.0);+ let mut lines = 1usize;+ let mut line_width = 0.0;+ for next in &widths {+ if line_width > 0.0 && line_width + t.space_8 + next > controls_width.max(widest) {+ lines += 1;+ line_width = 0.0;+ }+ line_width += if line_width > 0.0 { t.space_8 + next } else { *next };+ }+ let label_galley = ui.painter().layout(+ label.to_owned(),+ egui::FontId::proportional(t.font_label),+ t.form_ink,+ if beside { name_width.max(1.0) } else { width.max(1.0) },+ );+ let label_height = label_galley.size().y.max(t.control_height);+ let control_height = lines as f32 * t.control_height + lines.saturating_sub(1) as f32 * t.space_4;+ let height = if beside { label_height.max(control_height) } else { label_height + control_height + t.space_4 } + t.space_8;+ let (rect, _) = ui.allocate_exact_size(egui::vec2(width, height), egui::Sense::hover());+ let search_label = shortcut_search_label(command, label, keys);+ crate::prefs_search::follow(ui, &search_label, rect);+ if !filtering && !capturing && !ui.is_rect_visible(rect) {+ return None;+ }+ if filtering {+ crate::prefs_search::reveal(ui);+ crate::prefs_search::push_force(ui);+ }+ let mut action = None;+ ui.push_id(command.id, |ui| {+ let name =+ egui::Rect::from_min_size(rect.min + egui::vec2(0.0, t.space_4), egui::vec2(if beside { name_width } else { width }, label_height));+ ui.painter().galley(egui::pos2(name.left(), name.center().y - label_galley.size().y / 2.0), label_galley, t.form_ink);+ let response = ui.interact(name, ui.id().with("command"), egui::Sense::hover()).on_hover_text(command.id);+ response.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Label, ui.is_enabled(), format!("{label} ({})", command.id)));+ let top = if beside { name.top() } else { name.bottom() + t.space_4 };+ let total = widths.iter().sum::<f32>() + widths.len().saturating_sub(1) as f32 * t.space_8;+ let left = if beside { rect.right() - actions_width - t.space_8 - total.min(controls_width) } else { rect.left() };+ let used_width = total.min(controls_width);+ let controls = egui::Rect::from_min_size(egui::pos2(left, top), egui::vec2(used_width, control_height));+ crate::scenario::publish_rect(&format!("keymap:bindings:{}", command.id), controls);+ let mut draw = |ui: &mut egui::Ui| {+ ui.allocate_ui_with_layout(+ egui::vec2(used_width.max(widest), t.control_height),+ egui::Layout::left_to_right(egui::Align::Center).with_main_wrap(true),+ |ui| {+ ui.spacing_mut().item_spacing = egui::vec2(t.space_8, t.space_4);+ for (slot, text, assigned) in &slots {+ let active = capturing && *slot == app.keymap.slot;+ let capture = if active {+ ui_kit::button(ui, text, ui_kit::Button::Primary)+ } else if *assigned {+ ui_kit::shortcut_binding(ui, text, editing)+ } else if keys.is_empty() {+ ui_kit::shortcut_binding(ui, "", editing)+ } else {+ let (r, _) = ui.allocate_exact_size(egui::vec2(t.control_height, t.control_height), egui::Sense::hover());+ ui_kit::quiet_icon_button_at(ui, r, "plus", app.tr_label("Click, then press the new key"))+ };+ if editing {+ let capture = capture.on_hover_text(app.tr_label("Click, then press the new key"));+ let name = if *slot == 0 { command.id.to_owned() } else { format!("{}:{slot}", command.id) };+ crate::scenario::publish_target(&format!("keymap:capture:{name}"), capture.rect);+ if ui.is_rect_visible(capture.rect) {+ crate::scenario::publish_handle(&format!("shortcut:{name}"), capture.rect.center());+ }+ if capture.clicked() {+ capture.surrender_focus();+ action = Some((format!("{}\n{slot}", command.id), "capture"));+ }+ }+ }+ },+ );+ };+ ui.scope_builder(egui::UiBuilder::new().max_rect(controls).layout(egui::Layout::top_down(egui::Align::Min)), |ui| {+ if widest > controls_width {+ egui::ScrollArea::horizontal().id_salt("binding_scroll").auto_shrink([false, true]).show(ui, &mut draw);+ } else {+ draw(ui);+ }+ });+ if editing {+ let actions = egui::Rect::from_min_size(egui::pos2(rect.right() - actions_width, top), egui::vec2(actions_width, t.control_height));+ ui.scope_builder(egui::UiBuilder::new().max_rect(actions).layout(egui::Layout::left_to_right(egui::Align::Center)), |ui| {+ ui.spacing_mut().item_spacing.x = t.space_4;+ for (kind, icon, enabled, label) in [+ ("reset", "undo", app.keymap.custom.contains_key(command.id), app.tr_label("Reset")),+ ("clear", "close", !keys.is_empty(), app.tr_label("Clear")),+ ] {+ let button = ui+ .add_enabled_ui(enabled, |ui| {+ let (r, _) = ui.allocate_exact_size(egui::vec2(t.control_height, t.control_height), egui::Sense::hover());+ ui_kit::quiet_icon_button_at(ui, r, icon, label)+ })+ .inner;+ crate::scenario::publish_target(&format!("keymap:{kind}:{}", command.id), button.rect);+ if button.clicked() {+ action = Some((command.id.to_owned(), kind));+ }+ }+ });+ }+ });+ crate::prefs_search::remember(ui, &search_label, rect);+ t.secondary_hline(ui.painter(), rect.x_range(), rect.bottom(), t.dialog_rule);+ if filtering {+ crate::prefs_search::pop_force(ui);+ }+ action+}+/// A recording's outcome: its message, and for a key another command uses, Replace and Cancel/// (the one chosen).fn outcome(app: &SolveApp, ui: &mut egui::Ui) -> Option<&'static str> {@@ -1085,7 +1230,7 @@ mod tests {#[test]fn recorder_waits_for_late_modifiers_instead_of_binding_the_first_key_down() {let mut a = app();- let ctx = egui::Context::default();+ let ctx = crate::fonts::test_context();a.keymap.capturing = Some("solid.chamfer".into());recorder_frame(&mut a,@@ -1121,9 +1266,9 @@ mod tests {#[test]fn recorder_previews_each_modifier_and_explains_the_next_step() {let mut h = crate::scenario::Harness::new();+ h.app.home.open = false;+ h.app.keymap.filter = "solid.chamfer".into();h.call("ui.prefs", json!({"open":"Keyboard Shortcuts"}));- h.step(&json!({"click":{"handle":"shortcut:filter"}})).unwrap();- h.call("ui.text", json!({"text":"solid.chamfer"}));h.step(&json!({"click":{"handle":"shortcut:solid.chamfer"}})).unwrap();h.call("ui.key", json!({"key":"ShiftLeft","pressed":true,"shift":true}));assert!(h.widget("Shift+…").is_some(), "show Shift immediately, before any ordinary key");@@ -1134,7 +1279,7 @@ mod tests {h.call("ui.key", json!({"key":"SuperLeft","pressed":false,"shift":true}));assert!(h.widget("Shift+…").is_some(), "remove released modifiers before an ordinary key");h.call("ui.key", json!({"key":"ShiftLeft","pressed":false}));- assert!(h.widget("press a key…").is_some());+ assert!(h.widget(h.app.tr("prefs.shortcuts_press")).is_some(), "the empty recorder explains the next step");assert_eq!(effective(&h.app, "solid.chamfer"), None);h.call("ui.key", json!({"key":"ShiftRight","pressed":true,"shift":true}));h.call("ui.key", json!({"key":"C","pressed":true,"shift":true}));@@ -1163,7 +1308,7 @@ mod tests {(Key::SuperLeft, egui::Modifiers::MAC_CMD | egui::Modifiers::COMMAND, "Ctrl+C"),(Key::SuperRight, egui::Modifiers::MAC_CMD | egui::Modifiers::COMMAND, "Ctrl+C"),] {- let ctx = egui::Context::default();+ let ctx = crate::fonts::test_context();let mut recorder = Recorder::default();for (time, events, complete) in [(0.0, vec![egui::Event::ModifiersChanged(mods), event(key, true, mods)], false),@@ -1193,7 +1338,7 @@ mod tests {#[test]fn recorder_accumulates_late_modifiers_and_settles_for_one_second() {let mut a = app();- let ctx = egui::Context::default();+ let ctx = crate::fonts::test_context();a.keymap.capturing = Some("sketch.mirror".into());recorder_frame(&mut a, &ctx, 0.0, vec![event(egui::Key::M, true, egui::Modifiers::NONE)]);recorder_frame(&mut a, &ctx, 0.4, vec![egui::Event::ModifiersChanged(egui::Modifiers::SHIFT)]);@@ -1214,7 +1359,7 @@ mod tests {#[test]fn recorder_waits_indefinitely_for_modifier_only_input_and_for_release() {let mut a = app();- let ctx = egui::Context::default();+ let ctx = crate::fonts::test_context();a.keymap.capturing = Some("sketch.mirror".into());let mods = egui::Modifiers { shift: true, ctrl: true, alt: true, mac_cmd: true, command: true };recorder_frame(&mut a, &ctx, 0.0, vec![egui::Event::ModifiersChanged(mods)]);@@ -1238,7 +1383,7 @@ mod tests {fn recorder_rejects_two_ordinary_keys_and_escape_preserves_the_old_binding() {for second in [egui::Key::N, egui::Key::Escape] {let mut a = app();- let ctx = egui::Context::default();+ let ctx = crate::fonts::test_context();a.keymap.capturing = Some("solid.extrude".into());recorder_frame(&mut a, &ctx, 0.0, vec![event(egui::Key::M, true, egui::Modifiers::SHIFT)]);recorder_frame(&mut a, &ctx, 0.5, vec![event(second, true, egui::Modifiers::SHIFT)]);@@ -1251,7 +1396,7 @@ mod tests {#[test]fn recorder_conflicts_only_after_settling_and_plain_keys_still_work() {let mut a = app();- let ctx = egui::Context::default();+ let ctx = crate::fonts::test_context();a.keymap.capturing = Some("solid.chamfer".into());recorder_frame(&mut a, &ctx, 0.0, vec![event(egui::Key::M, true, egui::Modifiers::NONE), event(egui::Key::M, false, egui::Modifiers::NONE)]);assert!(a.keymap.conflict.is_none());@@ -1269,7 +1414,7 @@ mod tests {#[test]fn recorder_cancels_on_focus_loss_and_dialog_close() {let mut a = app();- let ctx = egui::Context::default();+ let ctx = crate::fonts::test_context();a.keymap.capturing = Some("solid.extrude".into());recorder_frame(&mut a, &ctx, 0.0, vec![event(egui::Key::K, true, egui::Modifiers::SHIFT)]);let raw = egui::RawInput { time: Some(0.5), focused: false, events: vec![egui::Event::WindowFocused(false)], ..Default::default() };@@ -1352,7 +1497,7 @@ mod tests {#[test]fn a_background_control_channel_recording_waits_for_an_actual_focus_loss() {let mut a = app();- let ctx = egui::Context::default();+ let ctx = crate::fonts::test_context();a.keymap.capturing = Some("sketch.mirror".into());let raw =egui::RawInput { time: Some(0.0), focused: false, events: vec![event(egui::Key::M, true, egui::Modifiers::SHIFT)], ..Default::default() };@@ -1366,9 +1511,9 @@ mod tests {fn enter_and_space_are_recorded_without_reactivating_the_focused_button() {for key in ["Enter", "Space"] {let mut h = crate::scenario::Harness::new();+ h.app.home.open = false;+ h.app.keymap.filter = "sketch.mirror".into();h.call("ui.prefs", json!({"open": "Keyboard Shortcuts"}));- h.step(&json!({"click":{"handle":"shortcut:filter"}})).unwrap();- h.call("ui.text", json!({"text":"sketch.mirror"}));h.step(&json!({"click":{"handle":"shortcut:sketch.mirror"}})).unwrap();h.call("ui.key", json!({"key":key}));assert!(h.app.keymap.capturing.is_some(), "{key} should still be pending");@@ -1403,6 +1548,14 @@ mod tests {h.call("ui.resize", json!({"width": 1200, "height": 600}));h.call("ui.prefs", json!({"open": "Keyboard Shortcuts"}));h.frames(3);+ let filter = crate::scenario::rect_of("keymap:filter").unwrap();+ let mut previous = filter;+ for handle in ["keymap:done", "keymap:export", "keymap:import"] {+ let action = crate::scenario::rect_of(handle).unwrap();+ assert!((action.center().y - filter.center().y).abs() <= 1.0, "{handle}: shares the search row");+ assert!(action.left() >= previous.right(), "{handle}: no overlap");+ previous = action;+ }let commands = command_specs();let first = commands.first().unwrap().id;let last = commands.last().unwrap().id;@@ -1487,9 +1640,8 @@ mod tests {fn the_shortcuts_page_adds_a_second_key() {let mut h = crate::scenario::Harness::new();h.app.home.open = false;+ h.app.keymap.filter = "solid.extrude".into();h.call("ui.prefs", json!({"open":"Keyboard Shortcuts"}));- h.step(&json!({"click":{"handle":"shortcut:filter"}})).unwrap();- h.call("ui.text", json!({"text":"solid.extrude"}));h.frames(2);h.step(&json!({"click":{"handle":"shortcut:solid.extrude:1"}})).unwrap();assert_eq!(h.app.keymap.capturing.as_deref(), Some("solid.extrude"));@@ -1652,6 +1804,118 @@ mod card_tests {use super::*;use crate::scenario::{self, Harness};+ #[test]+ fn preferences_shortcuts_uses_the_page_heading_and_right_aligned_profile_tag() {+ for theme in ["light", "dark"] {+ let mut h = Harness::new();+ h.app.home.open = false;+ h.call("ui.resize", json!({"width":1600,"height":1000}));+ h.call("ui.prefs", json!({"open":"Shortcuts","theme":theme}));+ h.frames(4);+ assert!(!h.app.keymap.read_only, "fresh Preferences retains its editable default");+ let heading = scenario::rect_of("prefs:page_heading").unwrap();+ let body = scenario::rect_of("prefs:page_body").unwrap();+ let tag = scenario::rect_of("prefs:in_profile").unwrap();+ assert!(body.contains_rect(heading));+ assert!((heading.right() - tag.right()).abs() <= 1.0, "the profile tag uses the production page's far-right alignment");+ let mut page_font = false;+ for shape in &h.shapes {+ crate::test_support::each_shape(&shape.shape, &mut |shape| {+ if let egui::Shape::Text(text) = shape {+ page_font |= text.galley.job.text == "Shortcuts"+ && text+ .galley+ .job+ .sections+ .iter()+ .all(|section| section.format.font_id.size == crate::theme::Tokens::get().font_page_heading);+ }+ });+ }+ assert!(page_font, "the actual Preferences title uses the page-heading font");+ }+ }++ #[test]+ fn done_keeps_editing_and_all_bindings_and_cancel_restores_the_bundle() {+ let mut h = Harness::new();+ h.app.home.open = false;+ bind_at(&mut h.app, "solid.extrude", Some(1), "Shift+J", false).unwrap();+ let original = crate::toolbar_custom::export(&h.app);+ h.app.keymap.filter = "solid.extrude".into();+ h.call("ui.prefs", json!({"open":"Shortcuts"}));+ h.step(&json!({"click":{"handle":"keymap:capture:solid.extrude:1"}})).unwrap();+ assert_eq!(h.app.keymap.capturing.as_deref(), Some("solid.extrude"));+ h.step(&json!({"click":{"handle":"keymap:done"}})).unwrap();+ assert!(h.app.keymap.capturing.is_none());+ assert!(!h.app.keymap.read_only, "Done stops capture without changing the independent edit state");+ assert_eq!(keys(&h.app, "solid.extrude"), ["E", "Shift+J"]);+ h.step(&json!({"click":{"handle":"keymap:clear:solid.extrude"}})).unwrap();+ assert!(keys(&h.app, "solid.extrude").is_empty());+ assert!(h.app.keymap.custom.contains_key("solid.extrude"), "Clear stores a disabled override");+ h.step(&json!({"click":{"handle":"keymap:reset:solid.extrude"}})).unwrap();+ assert_eq!(keys(&h.app, "solid.extrude"), ["E"]);+ assert!(!h.app.keymap.custom.contains_key("solid.extrude"), "Reset restores the registry default");+ h.step(&json!({"click":{"handle":"prefs:cancel"}})).unwrap();+ assert_eq!(crate::toolbar_custom::export(&h.app), original, "Cancel restores the complete customization bundle");+ }++ #[test]+ fn shared_page_defaults_stops_recording_without_resetting_favorites_or_toolbar() {+ let mut h = Harness::new();+ h.app.home.open = false;+ h.app.preferences.ai_features = false;+ bind_at(&mut h.app, "solid.extrude", Some(0), "Shift+J", false).unwrap();+ h.app.sbox.pinned = vec!["solid.box".into(), "solid.extrude".into()];+ h.app.toolbar_custom.panels.insert("DESIGN/MODEL/CREATE".into(), vec!["solid.extrude".into(), "solid.box".into()]);+ let favorites = h.app.sbox.pinned.clone();+ let toolbar = h.app.toolbar_custom.prefs();+ h.app.keymap.filter = "solid.extrude".into();+ h.call("ui.prefs", json!({"open":"Shortcuts"}));+ assert!(!h.app.keymap.custom.is_empty(), "the changed binding enables page defaults");+ h.step(&json!({"click":{"handle":"keymap:capture:solid.extrude"}})).unwrap();+ assert_eq!(h.app.keymap.capturing.as_deref(), Some("solid.extrude"));+ h.step(&json!({"key":"ShiftLeft","shift":true,"pressed":true})).unwrap();+ assert!(h.app.keymap.recorder.modifiers.shift, "the active recorder holds modifier state");+ h.step(&json!({"click":{"handle":"prefs:defaults"}})).unwrap();+ assert!(h.app.prefs_window.open && h.app.keymap.capturing.is_none());+ assert!(h.app.keymap.recorder.key.is_none());+ assert_eq!(h.app.keymap.recorder.modifiers, egui::Modifiers::NONE);+ assert!(h.app.keymap.custom.is_empty());+ assert_eq!(keys(&h.app, "solid.extrude"), ["E"]);+ assert_eq!(h.app.sbox.pinned, favorites);+ assert_eq!(h.app.toolbar_custom.prefs(), toolbar);+ h.step(&json!({"key":"ShiftLeft","pressed":false})).unwrap();+ h.step(&json!({"key":"K","pressed":true})).unwrap();+ h.step(&json!({"key":"K","pressed":false})).unwrap();+ h.frames(65);+ assert!(h.app.keymap.capturing.is_none() && h.app.keymap.custom.is_empty(), "the next chord cannot recreate an override after defaults");+ assert_eq!(keys(&h.app, "solid.extrude"), ["E"]);+ assert_eq!(h.app.sbox.pinned, favorites);+ assert_eq!(h.app.toolbar_custom.prefs(), toolbar);+ }++ #[test]+ fn every_saved_binding_keeps_its_own_recorder_slot() {+ let mut h = Harness::new();+ h.app.home.open = false;+ let bindings = ["E", "Shift+J", "Shift+K", "Shift+L", "Alt+J", "Alt+K", "Alt+L", "Ctrl+Alt+Shift+J"];+ for (slot, key) in bindings.iter().enumerate() {+ bind_at(&mut h.app, "solid.extrude", Some(slot), key, true).unwrap();+ }+ h.app.keymap.filter = "solid.extrude".into();+ h.call("ui.prefs", json!({"open":"Shortcuts"}));+ for slot in 1..MAX_KEYS {+ let handle = format!("keymap:capture:solid.extrude:{slot}");+ assert!(scenario::handle_at(&handle).is_some(), "binding {slot} remains reachable");+ }+ h.step(&json!({"click":{"handle":"keymap:capture:solid.extrude:7"}})).unwrap();+ assert_eq!(h.app.keymap.slot, 7);+ h.step(&json!({"key":"Escape"})).unwrap();+ assert!(h.app.prefs_window.open && h.app.keymap.capturing.is_none());+ assert_eq!(keys(&h.app, "solid.extrude"), bindings);+ }+#[test]fn live_chord_column_fits_all_modifiers() {let mut h = Harness::new();@@ -1661,7 +1925,7 @@ mod card_tests {h.step(&json!({"click":{"handle":"keymap:capture:sketch.mirror"}})).unwrap();h.step(&json!({"key":"M","pressed":true,"shift":true,"cmd":true,"ctrl":true,"alt":true})).unwrap();let preview = h.app.keymap.recorder.preview().unwrap();- let cell = scenario::rect_of("dialog:table:keymap:sketch.mirror:cell:Keyboard Shortcuts").unwrap();+ let cell = scenario::rect_of("keymap:bindings:sketch.mirror").unwrap();let ctx = crate::fonts::test_context();let mut needed = 0.0;let mut out = ctx.run_ui(Default::default(), |ui| {@@ -1711,7 +1975,7 @@ mod card_tests {let answer = path.to_string_lossy().to_string();h.app.services.pick_save = Some(Box::new(move |_, _| Box::pin(std::future::ready(Some(answer.clone())))));vfs::scoped(Some(vfs::PathScope::new([root.clone()])), || {- h.step(&json!({"widget":"Export…"})).unwrap();+ h.step(&json!({"click":{"handle":"keymap:export"}})).unwrap();h.frames(4);});let message = h.app.keymap.message.clone();@@ -1733,6 +1997,7 @@ mod card_tests {h.app.keymap.filter = "solid.extrude".into();h.call("ui.help", json!({"item":"shortcuts"}));assert!(h.app.keymap.read_only);+ assert!(scenario::rect_of("prefs:page_heading").is_none(), "Help retains its external read-only presentation");assert!(scenario::handle_at("keymap:filter").is_some());for action in ["capture", "clear", "reset"] {assert!(scenario::handle_at(&format!("keymap:{action}:solid.extrude")).is_none());@@ -1762,7 +2027,7 @@ mod card_tests {let answer = path.to_string_lossy().to_string();h.app.services.pick_open = Some(Box::new(move |_| Box::pin(std::future::ready(Some(answer.clone())))));vfs::scoped(Some(vfs::PathScope::new([root.clone()])), || {- h.step(&json!({"widget":"Import…"})).unwrap();+ h.step(&json!({"click":{"handle":"keymap:import"}})).unwrap();h.frames(4);});let message = h.app.keymap.message.clone();@@ -1778,7 +2043,7 @@ mod card_tests {/// #7409: the read-only list (Home › Keyboard shortcuts, Help › Keyboard Shortcuts) looked/// like the editable page with Import… missing. It says it is read-only, and Edit shortcuts- /// turns the same page into the editable one: Import…, Reset All and recording are there.+ /// turns the same page into the editable one: Import, page defaults and recording are there.#[test]fn read_only_shortcuts_say_so_and_edit_shortcuts_unlocks_them() {for open in ["home", "help"] {@@ -1793,15 +2058,17 @@ mod card_tests {}h.frames(4);assert!(h.app.keymap.read_only, "{open}");+ assert!(scenario::rect_of("prefs:page_heading").is_none(), "{open}: external read-only style is retained");assert!(h.widget("Read-only list: shortcuts can't be changed here.").is_some(), "{open}");assert!(h.widget("Import…").is_none(), "{open}: no Import… while read-only");assert!(scenario::handle_at("keymap:capture:solid.extrude").is_none());h.step(&json!({"widget":"Edit shortcuts"})).unwrap();h.frames(4);assert!(!h.app.keymap.read_only, "{open}: editable after Edit shortcuts");+ assert!(scenario::rect_of("prefs:page_heading").is_some(), "{open}: Edit shortcuts enters the Preferences composition");assert!(h.widget("Read-only list: shortcuts can't be changed here.").is_none(), "{open}");assert!(h.widget("Edit shortcuts").is_none(), "{open}");- assert!(h.widget("Import…").is_some() && h.widget("Reset All").is_some(), "{open}");+ assert!(scenario::handle_at("keymap:import").is_some() && h.widget("Restore page defaults").is_some(), "{open}");assert!(scenario::handle_at("keymap:capture:solid.extrude").is_some(), "{open}: a binding can be recorded");}}diff --git a/crates/ui-egui/src/plugins.rs b/crates/ui-egui/src/plugins.rsindex f017a35f4d..66e239ce08 100644--- a/crates/ui-egui/src/plugins.rs+++ b/crates/ui-egui/src/plugins.rs@@ -143,100 +143,333 @@ fn matches_query(plugin: &Plugin, query: &str) -> bool {/// The Plugins page. Desktop only: the browser build has no per-user plugin folder.pub fn page(app: &mut SolveApp, ui: &mut egui::Ui) {- let t = crate::theme::Tokens::get();- if cfg!(target_arch = "wasm32") {- ui.label(crate::i18n::tr("ui.plugins_desktop"));- return;- }- let Some(dir) = plugins_dir() else {- ui.label(crate::i18n::tr("ui.plugins_desktop"));- return;- };- let path = dir.display().to_string();- let searching = crate::prefs_search::querying(ui);- // The page's own box is for browsing Plugins. The dialog search is the filter while it is active.- if !searching {- crate::ui_kit::search_field(ui, ui.id().with("plugins_search"), &mut app.prefs_window.plugin_query, crate::i18n::tr("ui.plugins_search"));- ui.add_space(8.0);- }- if searching {- crate::prefs_search::begin_section(ui, crate::i18n::tr("ui.plugins"));- } else {- ui.add(- egui::Label::new(RichText::new(crate::i18n::format("ui.plugins_note", &[("path", &path)])).size(t.font_small).color(t.text_dim)).wrap(),- );- }- ui.add_space(8.0);- if !searching && crate::ui_kit::button(ui, crate::i18n::tr_label("Show in folder"), crate::ui_kit::Button::Normal).clicked() {- // `show_in_folder` opens the parent of the path it is given, so the argument is a name- // inside the plugins directory (it need not exist).- if let Err(e) = std::fs::create_dir_all(&dir) {- app.set_status(format!("Could not create the plugins folder: {e}"), true);- } else if let Some(show) = &app.services.show_in_folder {- show(&dir.join("plugin.json").display().to_string());- }- }- ui.add_space(8.0);- let (plugins, skipped) = scan(&dir);- let query = app.prefs_window.plugin_query.clone();- if plugins.is_empty() && !searching {- ui.label(crate::i18n::tr("ui.plugins_empty"));- }- let mut shown = 0usize;- for plugin in plugins.iter().filter(|plugin| searching || matches_query(plugin, &query)) {- if searching && !crate::prefs_search::texts_hit(ui, &[&plugin.name, &plugin.id, &plugin.description, &plugin.version]) {- continue;- }- shown += 1;- if searching {- crate::prefs_search::reveal(ui);- crate::prefs_search::push_force(ui);+ let dir = if cfg!(target_arch = "wasm32") { None } else { plugins_dir() };+ page_in_dir(app, ui, dir.as_deref());+}++fn page_in_dir(app: &mut SolveApp, ui: &mut egui::Ui, dir: Option<&Path>) {+ crate::ui_kit::settings_page(ui, |ui| {+ crate::ui_kit::settings_heading(ui, crate::i18n::tr("ui.plugins"), crate::i18n::tr("prefs.plugins_intro"));+ let Some(dir) = dir else {+ ui.label(crate::i18n::tr("ui.plugins_desktop"));+ return;+ };+ let t = crate::theme::Tokens::get();+ let path = dir.display().to_string();+ let searching = crate::prefs_search::querying(ui);+ // The page's own box is for browsing Plugins. The dialog search is the filter while it is active.+ if !searching {+ crate::ui_kit::search_field(ui, ui.id().with("plugins_search"), &mut app.prefs_window.plugin_query, crate::i18n::tr("ui.plugins_search"));+ ui.add_space(8.0);}- let mut on = enabled(app, &plugin.id);- ui.horizontal(|ui| {- let check = crate::ui_kit::checkbox(ui, "", &mut on);- crate::scenario::publish_handle(&format!("prefs:plugin:{}", plugin.id), check.rect.center());- if check.changed() {- if on {- app.preferences.disabled_plugins.remove(&plugin.id);- } else if app.preferences.disabled_plugins.len() < MAX_DISABLED {- app.preferences.disabled_plugins.insert(plugin.id.clone());+ let (plugins, skipped) = scan(dir);+ let query = app.prefs_window.plugin_query.clone();+ crate::ui_kit::settings_list_section(+ ui,+ "plugins_installed",+ crate::i18n::tr("prefs.plugins_installed"),+ Some(&plugins.len().to_string()),+ |ui| {+ if plugins.is_empty() && (!searching || crate::prefs_search::shows_all(ui)) {+ crate::ui_kit::text(ui, crate::i18n::tr("ui.plugins_empty"), crate::ui_kit::Text::Hint("plugins_empty"));+ }+ ui.spacing_mut().item_spacing.y = t.space_8;+ let mut shown = 0usize;+ for plugin in plugins.iter().filter(|plugin| searching || matches_query(plugin, &query)) {+ if searching+ && !crate::prefs_search::shows_all(ui)+ && !crate::prefs_search::texts_hit(ui, &[&plugin.name, &plugin.id, &plugin.description, &plugin.version])+ {+ continue;+ }+ shown += 1;+ if searching {+ crate::prefs_search::reveal(ui);+ crate::prefs_search::push_force(ui);+ }+ plugin_card(app, ui, dir, plugin);+ if searching {+ crate::prefs_search::pop_force(ui);+ }}+ if !searching && !plugins.is_empty() && shown == 0 {+ ui.label(crate::i18n::tr("ui.plugins_none"));+ }+ },+ );+ if !searching && query.trim().is_empty() && !skipped.is_empty() {+ ui.add_space(6.0);+ ui.label(+ RichText::new(crate::i18n::format("ui.plugins_skipped", &[("count", &skipped.len().to_string())]))+ .size(t.font_small)+ .color(t.text_dim),+ );+ for skip in skipped.iter().take(8) {+ let who = if skip.folder.is_empty() { "folder" } else { skip.folder.as_str() };+ ui.label(RichText::new(format!("{who}: {}", skip.reason)).size(t.font_small).color(t.text_dim));}- ui.vertical(|ui| {- ui.label(RichText::new(&plugin.name).strong());- ui.label(- RichText::new(crate::i18n::format("ui.plugins_version", &[("version", &plugin.version)])).size(t.font_small).color(t.text_dim),- );- if !plugin.description.is_empty() {- ui.label(RichText::new(&plugin.description).size(t.font_small).color(t.text_dim));+ }+ if !searching {+ ui.horizontal(|ui| {+ let button = crate::ui_kit::icon_label_button(ui, crate::i18n::tr("prefs.plugins_show_folder"), "folder", true, false)+ .on_hover_text(crate::i18n::format("ui.plugins_note", &[("path", &path)]));+ crate::scenario::publish_target("prefs:plugins:folder", button.rect);+ if button.clicked() {+ if let Err(e) = std::fs::create_dir_all(dir) {+ app.set_status(format!("Could not create the plugins folder: {e}"), true);+ } else if let Some(show) = &app.services.show_in_folder {+ // The service opens the parent of the supplied file, even if it is absent.+ show(&dir.join("plugin.json").display().to_string());+ }}});- });- ui.separator();- if searching {- crate::prefs_search::pop_force(ui);}+ });+}++fn plugin_card(app: &mut SolveApp, ui: &mut egui::Ui, dir: &Path, plugin: &Plugin) {+ use crate::ui_kit;+ let mut on = enabled(app, &plugin.id);+ let was_on = on;+ let card =+ ui.push_id(&plugin.id, |ui| ui_kit::settings_plugin_card(ui, &plugin.id, &plugin.name, &plugin.version, &plugin.description, &mut on)).inner;+ let response = card.response;+ let (folder, check) = card.inner;+ crate::scenario::publish_target(&format!("prefs:plugin:{}:folder", plugin.id), folder.rect);+ crate::scenario::publish_target(&format!("prefs:plugin:{}", plugin.id), check.rect);+ if folder.clicked()+ && let Some(show) = &app.services.show_in_folder+ {+ show(&dir.join(&plugin.id).join("plugin.json").display().to_string());}- if !searching && !plugins.is_empty() && shown == 0 {- ui.label(crate::i18n::tr("ui.plugins_none"));- }- if !searching && query.trim().is_empty() && !skipped.is_empty() {- ui.add_space(6.0);- ui.label(- RichText::new(crate::i18n::format("ui.plugins_skipped", &[("count", &skipped.len().to_string())])).size(t.font_small).color(t.text_dim),- );- for skip in skipped.iter().take(8) {- let who = if skip.folder.is_empty() { "folder" } else { skip.folder.as_str() };- ui.label(RichText::new(format!("{who}: {}", skip.reason)).size(t.font_small).color(t.text_dim));+ if was_on != on {+ if on {+ app.preferences.disabled_plugins.remove(&plugin.id);+ } else if app.preferences.disabled_plugins.len() < MAX_DISABLED {+ app.preferences.disabled_plugins.insert(plugin.id.clone());}}+ crate::scenario::publish_rect(&format!("prefs:plugin:{}:card", plugin.id), response.rect);+ let texts = [&plugin.name, &plugin.id, &plugin.description, &plugin.version];+ if let Some(text) = texts.iter().find(|text| crate::prefs_search::texts_hit(ui, &[*text])) {+ crate::prefs_search::remember(ui, text, response.rect);+ }+ for text in texts {+ crate::prefs_search::follow(ui, text, response.rect);+ }}#[cfg(test)]mod tests {use super::*;+ fn page_frame(app: &mut SolveApp, ctx: &egui::Context, dir: &Path, events: Vec<egui::Event>) {+ crate::scenario::clear_handles();+ let mut output = crate::test_support::frame(+ ctx,+ egui::RawInput {+ screen_rect: Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(700.0, 800.0))),+ events,+ focused: true,+ ..Default::default()+ },+ |ui| crate::ui_kit::scope(ui, |ui| page_in_dir(app, ui, Some(dir))),+ );+ output.textures_delta.clear();+ }++ fn click_page(app: &mut SolveApp, ctx: &egui::Context, dir: &Path, handle: &str) {+ let at = crate::scenario::handle_at(handle).unwrap();+ page_frame(app, ctx, dir, crate::test_support::pointer(at, true));+ page_frame(app, ctx, dir, crate::test_support::pointer(at, false));+ }++ #[test]+ fn plugins_production_composition_publishes_page_heading_and_section_geometry() {+ let previous = crate::theme::is_dark();+ for dark in [false, true] {+ crate::theme::set_dark(dark);+ let mut h = crate::scenario::Harness::new();+ let dir = h.dir.join("page-geometry");+ let ctx = crate::fonts::test_context();+ for _ in 0..3 {+ page_frame(&mut h.app, &ctx, &dir, vec![]);+ }+ // The injected path goes through the production composition, including its+ // heading and settings_page scope; the fixture adds only the window's form style.+ let heading = crate::scenario::rect_of("prefs:page_heading").unwrap();+ let section = crate::scenario::rect_of("prefs:section:plugins_installed").unwrap();+ let body = crate::scenario::rect_of("prefs:section:plugins_installed:body").unwrap();+ let t = crate::theme::Tokens::get();+ assert!(heading.height() >= t.space_24 && heading.bottom() < section.top());+ assert!((section.left() - heading.left()).abs() <= 1.0 && (section.right() - heading.right()).abs() <= 1.0);+ assert!((section.height() - (t.control_height + t.space_2)).abs() <= 1.0);+ assert!((body.top() - section.bottom() - t.space_10).abs() <= 1.0);+ assert!(!dir.exists(), "production layout does not create the plugin folder");+ }+ crate::theme::set_dark(previous);+ }++ #[test]+ fn plugin_card_actions_share_a_row_at_normal_width_and_stay_inside_narrow_cards() {+ let previous = crate::theme::is_dark();+ for dark in [false, true] {+ crate::theme::set_dark(dark);+ for language in ["en", "de"] {+ let _language = crate::i18n::scope(language);+ for width in [646.0, 200.0] {+ let mut h = crate::scenario::Harness::new();+ let dir = h.dir.join("plugin-action-layout");+ write(&dir, "public-one", r#"{"id":"public-one","name":"Public one","version":"1.2.3","description":"Public fixture."}"#);+ let ctx = crate::fonts::test_context();+ let mut clip = egui::Rect::NOTHING;+ let mut painted = Vec::new();+ for _ in 0..3 {+ crate::scenario::clear_handles();+ let mut output = crate::test_support::frame(+ &ctx,+ egui::RawInput {+ screen_rect: Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(width + 16.0, 800.0))),+ ..Default::default()+ },+ |ui| {+ ui.set_width(width);+ clip = ui.clip_rect();+ crate::ui_kit::scope(ui, |ui| page_in_dir(&mut h.app, ui, Some(&dir)));+ },+ );+ output.textures_delta.clear();+ painted = output.shapes;+ }+ let card = crate::scenario::rect_of("prefs:plugin:public-one:card").unwrap();+ let folder = crate::scenario::rect_of("prefs:plugin:public-one:folder").unwrap();+ let checkbox = crate::scenario::rect_of("prefs:plugin:public-one").unwrap();+ assert!(card.width() <= width + 1.0, "{language}, {width}: card stays within the page");+ for action in [folder, checkbox] {+ assert!(card.expand(1.0).contains_rect(action), "{language}, {width}: action stays inside its card");+ assert!(clip.contains_rect(action), "{language}, {width}: action is not clipped");+ }+ if width == 646.0 {+ assert!((folder.center().y - checkbox.center().y).abs() <= 1.0, "{language}: normal-width actions share one row");+ assert!(folder.right() <= checkbox.left(), "actions do not overlap");+ assert!((card.height() - 62.0).abs() <= 1.0, "36 pt content plus 12 pt padding and 1 pt border on each side");+ assert_eq!(folder.height(), 24.0);+ assert_eq!(checkbox.size(), egui::vec2(16.0, 16.0));+ let t = crate::theme::Tokens::get();+ let icon = crate::scenario::rect_of("prefs:plugin:public-one:icon").unwrap();+ assert_eq!(icon.size(), egui::vec2(36.0, 36.0));+ assert!((icon.left() - card.left() - 13.0).abs() <= 1.0, "12 pt padding inside the border");+ for control in [icon, folder, checkbox] {+ assert!((control.center().y - card.center().y).abs() <= 1.0, "all card content is vertically centred");+ }+ assert!((checkbox.right() - card.right() + 13.0).abs() <= 1.0, "right padding matches left");+ let mut quiet = true;+ let mut semibold_title = false;+ for shape in &painted {+ crate::test_support::each_shape(&shape.shape, &mut |shape| match shape {+ egui::Shape::Rect(rect) if rect.rect == folder && rect.fill != egui::Color32::TRANSPARENT => quiet = false,+ egui::Shape::Text(text) if text.galley.job.text == "Public one" => {+ semibold_title = text+ .galley+ .job+ .sections+ .iter()+ .all(|section| section.format.font_id == crate::fonts::semibold(t.font_button));+ }+ _ => {}+ });+ }+ assert!(quiet, "Show in folder has no button background");+ assert!(semibold_title, "the title uses the actual 13 pt semibold face");+ }+ assert!(enabled(&h.app, "public-one"), "layout does not change plugin state");+ }+ }+ }+ crate::theme::set_dark(previous);+ }++ #[test]+ fn plugin_cards_open_their_own_folder_and_cancel_restores_enabled_state() {+ use std::{cell::RefCell, rc::Rc};+ let previous = crate::theme::is_dark();+ for dark in [false, true] {+ crate::theme::set_dark(dark);+ let mut h = crate::scenario::Harness::new();+ let dir = h.dir.join("public-plugins");+ write(&dir, "public-one", r#"{"id":"public-one","name":"Public one","version":"1.2.3","description":"Public fixture."}"#);+ write(&dir, "public-two", r#"{"id":"public-two","name":"Public two","version":"2","description":"Another fixture."}"#);+ let opened = Rc::new(RefCell::new(Vec::new()));+ let seen = opened.clone();+ h.app.services.show_in_folder = Some(Box::new(move |path| seen.borrow_mut().push(PathBuf::from(path))));+ crate::prefs::control(&mut h.app, &serde_json::json!({"open":"Plugins"})).unwrap();+ let ctx = crate::fonts::test_context();+ for _ in 0..3 {+ page_frame(&mut h.app, &ctx, &dir, vec![]);+ }+ assert!(opened.borrow().is_empty(), "rendering never opens a folder");+ click_page(&mut h.app, &ctx, &dir, "prefs:plugin:public-two:folder");+ assert_eq!(*opened.borrow(), [dir.join("public-two/plugin.json")]);+ click_page(&mut h.app, &ctx, &dir, "prefs:plugin:public-one");+ assert!(!enabled(&h.app, "public-one") && enabled(&h.app, "public-two"));+ crate::prefs::control(&mut h.app, &serde_json::json!({"button":"defaults"})).unwrap();+ assert!(enabled(&h.app, "public-one"));+ page_frame(&mut h.app, &ctx, &dir, vec![]);+ click_page(&mut h.app, &ctx, &dir, "prefs:plugin:public-one");+ crate::prefs::control(&mut h.app, &serde_json::json!({"button":"cancel"})).unwrap();+ assert!(enabled(&h.app, "public-one") && enabled(&h.app, "public-two"));+ }+ crate::theme::set_dark(previous);+ }++ #[test]+ fn show_plugins_folder_creates_only_the_requested_fixture_root() {+ use std::{cell::RefCell, rc::Rc};+ let mut h = crate::scenario::Harness::new();+ let dir = h.dir.join("not-created-yet");+ let opened = Rc::new(RefCell::new(Vec::new()));+ let seen = opened.clone();+ h.app.services.show_in_folder = Some(Box::new(move |path| seen.borrow_mut().push(PathBuf::from(path))));+ let ctx = crate::fonts::test_context();+ for _ in 0..3 {+ page_frame(&mut h.app, &ctx, &dir, vec![]);+ }+ assert!(!dir.exists() && opened.borrow().is_empty());+ click_page(&mut h.app, &ctx, &dir, "prefs:plugins:folder");+ assert!(dir.is_dir());+ assert_eq!(*opened.borrow(), [dir.join("plugin.json")]);+ assert!(!dir.join("plugin.json").exists(), "the reveal service needs only a sentinel path");+ }++ #[test]+ fn plugin_metadata_search_owns_one_navigation_target_and_reveals_the_real_card() {+ let mut h = crate::scenario::Harness::new();+ let dir = h.dir.join("public-plugin-search");+ write(&dir, "public-one", r#"{"id":"public-one","name":"Public one","version":"1.2.3","description":"Unique description."}"#);+ let ctx = crate::fonts::test_context();+ for query in ["Public one", "public-one", "1.2.3", "Unique description"] {+ for _ in 0..3 {+ crate::scenario::clear_handles();+ let mut output = crate::test_support::frame(&ctx, egui::RawInput::default(), |ui| {+ ui.set_width(646.0);+ let _search = crate::prefs_search::begin(ui, query);+ crate::prefs_search::begin_page(ui, crate::prefs::PAGE_PLUGINS, "Extend > Plugins");+ crate::ui_kit::scope(ui, |ui| page_in_dir(&mut h.app, ui, Some(&dir)));+ crate::prefs_search::store_nav(ui);+ });+ output.textures_delta.clear();+ }+ let (_, _, hits) = crate::prefs_search::nav(&ctx);+ assert_eq!(hits.len(), 1, "{query}: one real plugin result");+ assert_eq!(hits[0].page, crate::prefs::PAGE_PLUGINS);+ crate::prefs_search::set_reveal(&ctx, Some(crate::prefs_search::reveal_for(hits[0].page, &hits[0].label)));+ page_frame(&mut h.app, &ctx, &dir, vec![]);+ let card = crate::scenario::rect_of("prefs:plugin:public-one:card").unwrap();+ assert!(crate::scenario::handle_at("prefs:revealed").unwrap().distance(card.center()) <= 1.0);+ assert!(enabled(&h.app, "public-one"), "searching and revealing do not toggle the plugin");+ }+ }+fn write(dir: &Path, folder: &str, body: &str) {let d = dir.join(folder);std::fs::create_dir_all(&d).unwrap();diff --git a/crates/ui-egui/src/prefs.rs b/crates/ui-egui/src/prefs.rsindex 6e433bbe54..c82344dffa 100644--- a/crates/ui-egui/src/prefs.rs+++ b/crates/ui-egui/src/prefs.rs@@ -537,6 +537,12 @@ fn place_search_cursor(ctx: &egui::Context, id: egui::Id, chars: usize) {}fn open_result(app: &mut SolveApp, page: usize, label: &str) {+ if page == PAGE_SHORTCUTS {+ crate::keymap::reveal(app);+ }+ if page == PAGE_PLUGINS {+ app.prefs_window.plugin_query.clear();+ }app.prefs_window.filter.clear();app.prefs_window.search_from = None;app.prefs_window.section = page;@@ -2212,7 +2218,10 @@ fn defaults(app: &mut SolveApp, page: usize) {PAGE_ASSISTANT => app.ui.agent_cursor = Default::default(),PAGE_TOOLS => app.ui.tool_cursor = false,PAGE_DESIGN => {}- PAGE_SHORTCUTS => crate::keymap::reset(app, None),+ PAGE_SHORTCUTS => {+ crate::keymap::stop_capture(app);+ crate::keymap::reset(app, None);+ }PAGE_GRAPHICS => {app.ui.visual_style = 0;app.ui.show_grid = true;@@ -2830,8 +2839,21 @@ fn page(app: &mut SolveApp, ui: &mut egui::Ui, t: &Tokens) {fn draw_page(app: &mut SolveApp, ui: &mut egui::Ui, index: usize, t: &Tokens) {match index {PAGE_SHORTCUTS => {- ui_kit::settings_heading_with_tag(ui, app.tr("prefs.shortcuts"), "", Some(crate::settings_profiles::tag));- crate::keymap::page(app, ui);+ let read_only = app.keymap.read_only;+ let mut show = |ui: &mut egui::Ui| {+ ui_kit::settings_heading_with_tag(+ ui,+ app.tr("prefs.shortcuts"),+ app.tr("prefs.shortcuts_intro"),+ Some(crate::settings_profiles::tag),+ );+ crate::keymap::page(app, ui);+ };+ if read_only {+ show(ui);+ } else {+ ui_kit::settings_page(ui, show);+ }}PAGE_ASSISTANT => crate::agent_chat::settings::page(app, ui),PAGE_PLUGINS => crate::plugins::page(app, ui),diff --git a/crates/ui-egui/src/prefs_search.rs b/crates/ui-egui/src/prefs_search.rsindex a666c3673b..f0e03c79c8 100644--- a/crates/ui-egui/src/prefs_search.rs+++ b/crates/ui-egui/src/prefs_search.rs@@ -564,6 +564,22 @@ pub(crate) fn matches_text(query: &str, texts: &[&str]) -> bool {fn keywords(text: &str) -> &'static [&'static str] {match fold(text).as_str() {"theme" => &["dark", "light", "appearance"],+ "availability" => &["assistant controls"],+ "let ai agents connect" => &["let ai agents connect (control channel / mcp)"],+ "add solidcraft to ai apps" => &["make solidcraft available to ai apps on this computer"],+ "run slow commands in the background" => &["run agent commands in the background"],+ "connect the last agent at start" => &["connect the last-used agent when solidcraft starts"],+ "open the chat at start" => &["open the assistant panel when solidcraft starts"],+ "ask first" => &["ask before changes", "ask every time"],+ "make edits" => &["allow model edits", "auto-allow model edits"],+ "do everything" => &["allow everything"],+ "dock the chat" => &["agent chat side"],+ "show the agent's pointer" => &["show agent pointer"],+ "follow the camera" => &["turn the camera to sketches"],+ "speed" => &["motion speed"],+ "agent pointer" => &["agent cursor"],+ "assistant button in the application bar" => &["show assistant button in application bar"],+ "same as above" => &["as set above"],"anti-aliasing" | "antialiasing" => &["antialiasing", "msaa"],"curved surfaces" => &["display quality"],"perspective" => &["perspective view"],@@ -1201,4 +1217,76 @@ mod tests {assert!(h.widget(query).is_some());}}++ #[test]+ fn collapsed_shortcut_results_enter_reveals_the_command_despite_an_old_page_filter() {+ use serde_json::json;+ for theme in ["light", "dark"] {+ let mut h = crate::scenario::Harness::new();+ h.app.home.open = false;+ h.app.preferences.ai_features = false;+ h.call("ui.resize", json!({"width":1600,"height":1000}));+ h.call("ui.prefs", json!({"open":"Shortcuts","theme":theme}));+ h.step(&json!({"click":{"handle":"keymap:filter"}})).unwrap();+ h.step(&json!({"text":"solid.extrude"})).unwrap();+ let command = solidcraft_engine::command_specs().last().unwrap().id;+ let original = crate::toolbar_custom::export(&h.app);+ h.app.prefs_window.filter = command.into();+ h.frames(4);+ let (_, _, hits) = nav(&h.ctx);+ let matches: Vec<_> =+ hits.iter().enumerate().filter(|(_, hit)| hit.page == crate::prefs::PAGE_SHORTCUTS && hit.label.contains(command)).collect();+ assert_eq!(matches.len(), 1, "a collapsed result owns one real keyboard target");+ set_cursor(&h.ctx, matches[0].0);+ h.frames(2);+ h.step(&json!({"key":"Enter"})).unwrap();+ h.frames(30);+ assert!(h.app.prefs_window.filter.is_empty());+ assert_eq!(h.app.prefs_window.section, crate::prefs::PAGE_SHORTCUTS);+ let target = crate::scenario::rect_of(&format!("keymap:capture:{command}")).unwrap();+ let body = crate::scenario::rect_of("dialog:page_body").unwrap();+ assert!(body.contains_rect(target), "Enter reveals the actual off-screen command, clearing the old local filter");+ assert!(crate::scenario::handle_at("prefs:revealed").is_some());+ assert_eq!(crate::toolbar_custom::export(&h.app), original);+ }+ }++ #[test]+ fn assistant_permission_options_and_limited_value_have_real_enter_targets_while_ai_is_off() {+ use serde_json::json;+ for theme in ["light", "dark"] {+ let mut h = crate::scenario::Harness::new();+ h.app.home.open = false;+ h.app.preferences.ai_features = false;+ h.call("ui.resize", json!({"width":1600,"height":1200}));+ h.call("ui.prefs", json!({"open":"General","theme":theme}));+ let original = (h.app.preferences.ai_permissions, h.app.preferences.agent_chat_turn_limit);+ for (query, target) in [+ ("Ask first", "prefs:ai_mode:ask"),+ ("Make edits", "prefs:ai_mode:edits"),+ ("Do everything", "prefs:ai_mode:all"),+ ("Limited", "prefs:agent_chat_turn_limit:mode"),+ ] {+ h.app.prefs_window.filter = query.into();+ h.frames(5);+ let (_, _, hits) = nav(&h.ctx);+ let matches: Vec<_> =+ hits.iter().enumerate().filter(|(_, hit)| hit.page == crate::prefs::PAGE_ASSISTANT && hit.label == query).collect();+ assert_eq!(matches.len(), 1, "{query} owns a single real setting target");+ set_cursor(&h.ctx, matches[0].0);+ h.frames(2);+ h.step(&json!({"key":"Enter"})).unwrap();+ h.frames(30);+ assert_eq!(h.app.prefs_window.section, crate::prefs::PAGE_ASSISTANT);+ let rect = crate::scenario::rect_of(target).unwrap();+ let revealed = crate::scenario::handle_at("prefs:revealed").unwrap();+ assert!(revealed.distance(rect.center()) <= 1.0, "{query} reveals its real control");+ assert_eq!(+ (h.app.preferences.ai_permissions, h.app.preferences.agent_chat_turn_limit),+ original,+ "navigation never selects an option"+ );+ }+ }+ }}diff --git a/crates/ui-egui/src/render_workspace_output.rs b/crates/ui-egui/src/render_workspace_output.rsindex 22decf66f5..cc68203275 100644--- a/crates/ui-egui/src/render_workspace_output.rs+++ b/crates/ui-egui/src/render_workspace_output.rs@@ -930,6 +930,7 @@ pub(super) fn size_presets(app: &mut SolveApp, ui: &mut egui::Ui) {ui_kit::settings_choice_row(ui,&ui_kit::SettingsChoice {+ icon: None,key: &format!("render:preset:{key}"),title: app.tr(label),summary: &summary,diff --git a/crates/ui-egui/src/ui_kit/actions.rs b/crates/ui-egui/src/ui_kit/actions.rsindex 662bad908c..30a646ff62 100644--- a/crates/ui-egui/src/ui_kit/actions.rs+++ b/crates/ui-egui/src/ui_kit/actions.rs@@ -703,7 +703,7 @@ pub(crate) fn icon_action(ui: &mut Ui, label: &str, icon: &str, enabled: bool, d}/// Compact stage actions share the icon-label button's frame, typography and hit target.-pub(super) fn icon_label_width(ui: &Ui, label: &str, icon: Option<&str>, primary: bool) -> f32 {+pub(crate) fn icon_label_width(ui: &Ui, label: &str, icon: Option<&str>, primary: bool) -> f32 {let t = Tokens::get();let font = if primary { crate::fonts::semibold(t.font_button) } else { egui::FontId::proportional(t.font_label) };ui.painter().layout_no_wrap(label.into(), font, t.form_ink).size().x.ceil()diff --git a/crates/ui-egui/src/ui_kit/checks.rs b/crates/ui-egui/src/ui_kit/checks.rsindex 7883bcb7a3..ce13b0c902 100644--- a/crates/ui-egui/src/ui_kit/checks.rs+++ b/crates/ui-egui/src/ui_kit/checks.rs@@ -94,3 +94,15 @@ pub(crate) fn checkbox_indeterminate(ui: &mut Ui, label: &str, value: &mut bool,#[cfg(test)]#[path = "checks_tests.rs"]pub(super) mod tests;++/// A checkbox at an explicit square, for vertically centred settings-card actions.+pub(crate) fn checkbox_at(ui: &mut Ui, rect: Rect, label: &str, value: &mut bool) -> Response {+ let mut response = ui.interact(rect, ui.make_persistent_id(("checkbox", label)), egui::Sense::click());+ if response.clicked() {+ *value = !*value;+ response.mark_changed();+ }+ paint_box(ui, rect, &response, *value, false);+ response.widget_info(|| egui::WidgetInfo::selected(egui::WidgetType::Checkbox, ui.is_enabled(), *value, label));+ response.on_hover_text(label)+}diff --git a/crates/ui-egui/src/ui_kit/choice_tests.rs b/crates/ui-egui/src/ui_kit/choice_tests.rsindex 8103303f2b..16e7c48a4f 100644--- a/crates/ui-egui/src/ui_kit/choice_tests.rs+++ b/crates/ui-egui/src/ui_kit/choice_tests.rs@@ -366,6 +366,7 @@ fn output_radio_rows_keep_titles_summaries_and_disabled_choices_in_both_themes()settings_choice_row(ui,&SettingsChoice {+ icon: None,key: "test:output:radio",title: locale.text("render.size_full_hd"),summary: "1920 × 1080",@@ -395,7 +396,7 @@ fn output_radio_rows_keep_titles_summaries_and_disabled_choices_in_both_themes()ui.add_enabled_ui(enabled, |ui| {clicked |= settings_choice_row(ui,- &SettingsChoice { key: "test:output:radio", title: "4K", summary: "3840 × 2160", detail: "Over budget" },+ &SettingsChoice { icon: None, key: "test:output:radio", title: "4K", summary: "3840 × 2160", detail: "Over budget" },false,).clicked();diff --git a/crates/ui-egui/src/ui_kit/fields.rs b/crates/ui-egui/src/ui_kit/fields.rsindex f353d27181..a990a1c795 100644--- a/crates/ui-egui/src/ui_kit/fields.rs+++ b/crates/ui-egui/src/ui_kit/fields.rs@@ -1124,23 +1124,35 @@ pub fn wide_cell_editor(ui: &mut Ui, id: egui::Id, value: &mut String, hint: &st/// Search input with native accessibility and a stable caller ID. Tokens: cell_editor tokens.pub(crate) fn search_field(ui: &mut Ui, id: egui::Id, value: &mut String, hint: &str) -> Response {- if !super::layout::in_catalog(ui) {- return cell_editor(ui, id, value, hint, false);- }let t = Tokens::get();+ let catalog = super::layout::in_catalog(ui);+ let height = if catalog { t.space_16 + t.space_2 } else { t.control_height };+ let limit = if catalog { 128 } else { usize::MAX };let editor = text_input(egui::TextEdit::singleline(value)).id(id)- .char_limit(128)+ .char_limit(limit).hint_text(hint)- .min_size(vec2(0.0, t.space_16 + t.space_2))+ .min_size(vec2(0.0, height)).margin(egui::Margin { left: t.space_24 as i8, right: t.space_8 as i8, top: 0, bottom: 0 }).font(egui::FontId::proportional(t.font_small))+ .background_color(t.input_fill())+ .clip_text(true).text_color(t.form_ink);- let mut response = ui.add_sized(vec2(dimension(ui.available_width()), t.space_16 + t.space_2), editor);- super::text_menu::menu(ui, &mut response, value, super::text_menu::Field::LINE.limited(128));+ let mut response = ui.add_sized(vec2(dimension(ui.available_width()), height), editor);+ super::text_menu::menu(ui, &mut response, value, super::text_menu::Field::LINE.limited(limit));let icon = egui::Rect::from_center_size(egui::pos2(response.rect.left() + t.space_12, response.rect.center().y), vec2(t.space_12, t.space_12));crate::icons::paint_ink(ui.painter(), icon, "zoom", t.form_dim);super::layout::publish_geometry(ui, &response);+ response.widget_info(|| {+ let mut info = egui::WidgetInfo::labeled(egui::WidgetType::TextEdit, ui.is_enabled(), hint);+ info.current_text_value = Some(value.clone());+ info+ });+ if response.has_focus() {+ crate::prefs_search::note_key_sink(ui.ctx());+ }+ crate::theme::TabAccent::number_focus(ui, &response);+ t.input_bevel(ui, &response);response}diff --git a/crates/ui-egui/src/ui_kit/fields_tests.rs b/crates/ui-egui/src/ui_kit/fields_tests.rsindex 505c9c415e..6a27f9a216 100644--- a/crates/ui-egui/src/ui_kit/fields_tests.rs+++ b/crates/ui-egui/src/ui_kit/fields_tests.rs@@ -6,7 +6,7 @@ use egui::Ui;#[test]fn every_text_input_centres_its_galley_for_mono_and_proportional_fonts() {- for case in ["expression", "plain", "cell", "invalid", "library", "placement", "password", "multiline", "area", "message"] {+ for case in ["expression", "plain", "cell", "invalid", "library", "placement", "password", "multiline", "area", "message", "search"] {let ctx = crate::fonts::test_context();let mut value = "Centred".to_owned();let mut rect = egui::Rect::NOTHING;@@ -16,6 +16,7 @@ fn every_text_input_centres_its_galley_for_mono_and_proportional_fonts() {let id = ui.id().with(case);rect = match case {"expression" | "plain" => super::editor(ui, &mut value, "", case == "expression").2.rect,+ "search" => search_field(ui, id, &mut value, "Search").rect,"cell" | "invalid" => cell_editor(ui, id, &mut value, "", case == "invalid").rect,"library" => library_cell(ui, id, &mut value, "", |_| {}).rect,"placement" => placement_field(ui, id, &mut value, "").rect,@@ -37,6 +38,9 @@ fn every_text_input_centres_its_galley_for_mono_and_proportional_fonts() {.unwrap_or_else(|| panic!("{case}: missing text"));let center = galley.pos.y + galley.galley.rect.center().y;assert!((center - rect.center().y).abs() < 0.01, "{case}: galley centre {center} differs from field {rect:?}");+ if case == "search" {+ assert!(galley.pos.x >= rect.left() + crate::theme::Tokens::get().space_24, "search text leaves room for its icon");+ }if case == "placement" {let font = egui::FontId::proportional(crate::theme::Tokens::get().font_body);let native = ctx.fonts_mut(|fonts| fonts.row_height(&font))diff --git a/crates/ui-egui/src/ui_kit/gallery.rs b/crates/ui-egui/src/ui_kit/gallery.rsindex b477e99712..a4e6ce7a90 100644--- a/crates/ui-egui/src/ui_kit/gallery.rs+++ b/crates/ui-egui/src/ui_kit/gallery.rs@@ -220,6 +220,14 @@ const ELEMENTS: &[Element] = &[element!("section_heading", |ui, _| {section_heading(ui, "Edit");}),+ element!("checkbox_at", |ui, sample| {+ let side = Tokens::get().space_16;+ let (rect, _) = ui.allocate_exact_size(vec2(side, side), egui::Sense::hover());+ checkbox_at(ui, rect, "Enabled", &mut sample.checked);+ }),+ element!("settings_plugin_card", |ui, sample| {+ settings_plugin_card(ui, "sample", "Gear generator", "1.2.0", "Adds a parametric gear feature.", &mut sample.checked);+ }),element!("text_button", |ui, _| {text_button(ui, "Reset", true);}),@@ -237,7 +245,11 @@ const ELEMENTS: &[Element] = &[progress_action(ui, "Rendering · 62%", 0.62, "Cancel");}),element!("settings_choice_row", |ui, _| {- settings_choice_row(ui, &SettingsChoice { key: "gallery:radio_row", title: "Preview", summary: "1280 × 720", detail: "Preview size" }, true);+ settings_choice_row(+ ui,+ &SettingsChoice { icon: None, key: "gallery:radio_row", title: "Preview", summary: "1280 × 720", detail: "Preview size" },+ true,+ );}),element!("icon_label_action", |ui, _| {icon_label_action(ui, "Render Image", Some("play"), true, true);@@ -517,18 +529,21 @@ const ELEMENTS: &[Element] = &[ui,&[SettingsChoice {+ icon: None,key: "gallery:ask",title: "Ask first",summary: "Confirm changes before they run.",detail: "Full permission details",},SettingsChoice {+ icon: None,key: "gallery:edits",title: "Allow edits",summary: "Ask before running other tools.",detail: "Full permission details",},SettingsChoice {+ icon: Some("warning"),key: "gallery:all",title: "Allow all",summary: "Run supported tools without asking.",@@ -1220,7 +1235,8 @@ const ELEMENTS: &[Element] = &[});}),element!("add_prompt", "dialog:table:add_prompt:add", Some("dialog:table:add_prompt:add"), |ui, _| {- table(ui, "add_prompt", &[Column::new("Name", 1.0).flex()], "Empty", |ui, table| {+ table_custom(ui, "add_prompt", &[Column::new("Name", 1.0).flex()], "Empty", |ui, table| {+ table.headers(ui, |_, _| false);table.add_prompt(ui, "Add configuration", "Add configuration");});}),@@ -1262,12 +1278,13 @@ const ELEMENTS: &[Element] = &[text(ui, "Invalid expression", Text::Error("gallery"));}),element!("table_flex", |ui, s| {- table(+ table_custom(ui,"flex",&[Column::new("Name", 1.0).flex(), Column::new("Expression", 1.5).flex(), Column::new("Actions", 0.0).icon_only()],"Empty",|ui, table| {+ table.headers(ui, |_, _| false);table.row(ui, "row", false, |row| {row.cell(|ui| {text(ui, "Width", Text::Cell);@@ -1364,7 +1381,8 @@ const ELEMENTS: &[Element] = &[});}),element!("table", "dialog:table:gallery:row", None, |ui, s| {- table(ui, "gallery", &[Column::new("Name", 1.0), Column::new("Expression", 1.5)], "No rows", |ui, table| {+ table_custom(ui, "gallery", &[Column::new("Name", 1.0), Column::new("Expression", 1.5)], "No rows", |ui, table| {+ table.headers(ui, |_, _| false);table.row(ui, "row", true, |row| {row.cell(|ui| {text(ui, "Width", Text::Cell);@@ -1808,6 +1826,14 @@ const ELEMENTS: &[Element] = &[let (rect, _) = ui.allocate_exact_size(vec2(row_height(), row_height()), egui::Sense::hover());quiet_icon_button_at(ui, rect, "plus", "Add shortcut");}),+ element!("shortcut_binding", |ui, _| {+ ui.horizontal(|ui| {+ shortcut_binding(ui, "Ctrl+Shift+PageDown", true);+ shortcut_binding(ui, "Option+Enter", false);+ shortcut_binding(ui, "Ctrl++", true);+ });+ shortcut_binding(ui, "", true);+ }),element!("keyboard", |ui, _| {assert_eq!(keyboard(ui.ctx(), true), Action::None);ui.allocate_space(vec2(row_height(), row_height()));@@ -2154,25 +2180,32 @@ fn table_cells_keep_alignment_fixed_rows_editing_and_action_targets() {let mut removed = false;let mut draw = |ui: &mut Ui| {scope(ui, |ui| {- table(ui, "cells", &[Column::new("Name", 1.0), Column::new("Expression", 1.5), Column::new("Actions", 0.7)], "Empty", |ui, table| {- for (name, value) in [("Width", &mut first), ("Height", &mut second)] {- table.row(ui, name, name == "Height", |row| {- row.cell(|ui| {- text(ui, name, Text::Cell);- });- row.cell(|ui| {- let response = cell_editor(ui, ui.id().with("expression"), value, "Expression", false);- scenario::publish_handle(&format!("gallery:cell:{name}"), response.rect.center());- scenario::publish_rect(&format!("gallery:cell:{name}"), response.rect);- });- row.cell(|ui| {- if button(ui, "Delete", Button::Small).clicked() {- removed = true;- }+ table_custom(+ ui,+ "cells",+ &[Column::new("Name", 1.0), Column::new("Expression", 1.5), Column::new("Actions", 0.7)],+ "Empty",+ |ui, table| {+ table.headers(ui, |_, _| false);+ for (name, value) in [("Width", &mut first), ("Height", &mut second)] {+ table.row(ui, name, name == "Height", |row| {+ row.cell(|ui| {+ text(ui, name, Text::Cell);+ });+ row.cell(|ui| {+ let response = cell_editor(ui, ui.id().with("expression"), value, "Expression", false);+ scenario::publish_handle(&format!("gallery:cell:{name}"), response.rect.center());+ scenario::publish_rect(&format!("gallery:cell:{name}"), response.rect);+ });+ row.cell(|ui| {+ if button(ui, "Delete", Button::Small).clicked() {+ removed = true;+ }+ });});- });- }- });+ }+ },+ );});};for _ in 0..3 {@@ -2293,7 +2326,7 @@ fn gallery_covers_every_inline_element() {{let name = item.sig.ident.to_string();// Inherited labels, state keys and size measurements do not render elements.- if !matches!(name.as_str(), "eye_drag_id" | "label" | "placement_field_content_size") {+ if !matches!(name.as_str(), "eye_drag_id" | "icon_label_width" | "label" | "placement_field_content_size") {assert!(names.contains(name.as_str()), "{file}: {name} needs a gallery entry");}}diff --git a/crates/ui-egui/src/ui_kit/layout.rs b/crates/ui-egui/src/ui_kit/layout.rsindex 6908e5c016..4f87b1800d 100644--- a/crates/ui-egui/src/ui_kit/layout.rs+++ b/crates/ui-egui/src/ui_kit/layout.rs@@ -463,8 +463,7 @@ pub(crate) fn figure_rows(/// Memory belongs to the enclosing dialog ID; animation is avoided so each row keeps its fixed height./// Persisted disclosure with a rule and uppercase title. Tokens: `control_height, space_2, radius_sm, hover, dialog_rule, form_section_icon_size, form_gap_y, font_caption, font_section_tracking, text_dim`.-/// Static section caption for an Inspector group that stays expanded.-#[cfg(test)]+/// Static section caption for a group that stays expanded.pub(crate) fn section_heading(ui: &mut Ui, title: &str) {let t = Tokens::get();let (rect, _) = ui.allocate_exact_size(vec2(dimension(ui.available_width()), t.space_16), egui::Sense::hover());diff --git a/crates/ui-egui/src/ui_kit/preferences.rs b/crates/ui-egui/src/ui_kit/preferences.rsindex bb66eab570..9cd62d69aa 100644--- a/crates/ui-egui/src/ui_kit/preferences.rs+++ b/crates/ui-egui/src/ui_kit/preferences.rs@@ -392,7 +392,23 @@ pub(crate) fn settings_section<R>(ui: &mut Ui, key: &str, title: &str, add: impl}/// A settings disclosure with a real item count, using the shared section badge.-pub(crate) fn settings_section_count<R>(ui: &mut Ui, key: &str, title: &str, count: Option<&str>, mut add: impl FnMut(&mut Ui) -> R) -> Option<R> {+pub(crate) fn settings_section_count<R>(ui: &mut Ui, key: &str, title: &str, count: Option<&str>, add: impl FnMut(&mut Ui) -> R) -> Option<R> {+ settings_section_count_spaced(ui, key, title, count, false, add)+}++/// A list section directly following its search toolbar uses the compact page rhythm.+pub(crate) fn settings_list_section<R>(ui: &mut Ui, key: &str, title: &str, count: Option<&str>, add: impl FnMut(&mut Ui) -> R) -> Option<R> {+ settings_section_count_spaced(ui, key, title, count, true, add)+}++fn settings_section_count_spaced<R>(+ ui: &mut Ui,+ key: &str,+ title: &str,+ count: Option<&str>,+ compact: bool,+ mut add: impl FnMut(&mut Ui) -> R,+) -> Option<R> {if crate::prefs_search::querying(ui) {crate::prefs_search::begin_section(ui, title);if !ui.is_visible() {@@ -424,7 +440,7 @@ pub(crate) fn settings_section_count<R>(ui: &mut Ui, key: &str, title: &str, coulet page = super::settings_page_active(ui);if page {// The page's 10 pt item gap plus the shared disclosure's 2 pt inset complete 38 pt.- ui.add_space(t.space_24 + t.space_14 - t.space_10 - t.space_2);+ ui.add_space(if compact { 0.0 } else { t.space_24 + t.space_14 - t.space_10 - t.space_2 });} else {ui.add_space(t.space_8);}diff --git a/crates/ui-egui/src/ui_kit/preferences_assistant.rs b/crates/ui-egui/src/ui_kit/preferences_assistant.rsindex 92d1daa132..783e0053f1 100644--- a/crates/ui-egui/src/ui_kit/preferences_assistant.rs+++ b/crates/ui-egui/src/ui_kit/preferences_assistant.rs@@ -6,6 +6,7 @@ use egui::{FontId, Rect, Response, Sense, Stroke, Ui, pos2, vec2};/// One concise choice with its full meaning available to keyboard users and on hover.pub(crate) struct SettingsChoice<'a> {pub key: &'a str,+ pub icon: Option<&'a str>,pub title: &'a str,pub summary: &'a str,pub detail: &'a str,@@ -33,19 +34,27 @@ pub(crate) fn settings_choices(ui: &mut Ui, choices: &[SettingsChoice<'_>], selefn choice_row(ui: &mut Ui, choices: &[SettingsChoice<'_>], selected: &mut usize, keep: &[usize]) -> bool {let t = Tokens::get();let count = keep.len().max(1);- let width = ((dimension(ui.available_width()) - t.space_8 * count.saturating_sub(1) as f32) / count as f32).max(0.0);+ let minimum = keep+ .iter()+ .filter_map(|index| choices.get(*index))+ .map(|choice| super::ContentWidth::name(ui, choice.title) + t.space_24 * 2.0)+ .fold(t.form_label_width * 2.0, f32::max);+ let columns = (((dimension(ui.available_width()) + t.space_8) / (minimum + t.space_8)).floor() as usize).clamp(1, count);+ let width = ((dimension(ui.available_width()) - t.space_8 * columns.saturating_sub(1) as f32) / columns as f32).floor().max(0.0);let mut changed = false;- ui.horizontal_top(|ui| {- ui.spacing_mut().item_spacing.x = t.space_8;- for index in keep {- let Some(choice) = choices.get(*index) else { continue };- let response = choice_card(ui, width, choice, *selected == *index, false);- if response.clicked() {- *selected = *index;- changed = true;+ for row in keep.chunks(columns) {+ ui.horizontal_top(|ui| {+ ui.spacing_mut().item_spacing.x = t.space_8;+ for index in row {+ let Some(choice) = choices.get(*index) else { continue };+ let response = choice_card(ui, width, choice, *selected == *index, false);+ if response.clicked() {+ *selected = *index;+ changed = true;+ }}- }- });+ });+ }changed}@@ -59,7 +68,20 @@ fn choice_card(ui: &mut Ui, width: f32, choice: &SettingsChoice<'_>, selected: blet selected_bg = if row { accent.soft } else { t.selected_bg };let selected_ink = if row { accent.ink } else { t.selected_ink };let primary = if row { accent.color } else { t.form_primary };- let height = if row { t.space_24 + t.space_16 } else { t.space_24 * 3.0 + t.space_16 };+ let icon_width = if choice.icon.is_some() { t.space_14 + t.space_6 } else { 0.0 };+ let title_galley = ui.painter().layout(+ choice.title.to_owned(),+ crate::fonts::semibold(t.font_label),+ if selected { selected_ink } else { t.form_ink },+ (width - t.space_24 * 2.0 - icon_width).max(1.0),+ );+ let summary_galley =+ ui.painter().layout(choice.summary.to_owned(), FontId::proportional(t.font_small), t.form_dim, (width - t.space_12 * 2.0).max(1.0));+ let height = if row {+ t.space_24 + t.space_16+ } else {+ (t.space_10 + title_galley.size().y + t.space_6 + summary_galley.size().y + t.space_10).max(t.space_24 * 2.0 + t.space_16 + 1.0)+ };let (rect, response) = ui.allocate_exact_size(vec2(width, height), Sense::click());ui.painter().rect(rect,@@ -84,21 +106,31 @@ fn choice_card(ui: &mut Ui, width: f32, choice: &SettingsChoice<'_>, selected: bif selected {ui.painter().circle_filled(radio, t.space_3, primary);}- let title = if row {- Rect::from_min_max(pos2(radio.x + t.space_12, rect.top()), pos2(rect.right() - t.space_8, rect.bottom()))- } else {- Rect::from_min_max(pos2(radio.x + t.space_12, rect.top() + t.space_4), pos2(rect.right() - t.space_8, rect.top() + t.space_24 + t.space_4))- };- let summary_width = ui.painter().layout_no_wrap(choice.summary.into(), FontId::proportional(t.font_small), t.form_dim).size().x;- let title = if row { Rect::from_min_max(title.min, title.max - vec2(summary_width + t.space_8, 0.0)) } else { title };- paint_text(ui, title, choice.title, crate::fonts::semibold(t.font_label), if selected { selected_ink } else { t.form_ink }, false);if row {+ let title = Rect::from_min_max(pos2(radio.x + t.space_12, rect.top()), pos2(rect.right() - t.space_8, rect.bottom()));+ let summary_width = ui.painter().layout_no_wrap(choice.summary.into(), FontId::proportional(t.font_small), t.form_dim).size().x;+ let title = Rect::from_min_max(title.min, title.max - vec2(summary_width + t.space_8, 0.0));+ paint_text(ui, title, choice.title, crate::fonts::semibold(t.font_label), if selected { selected_ink } else { t.form_ink }, false);let body = Rect::from_min_max(pos2(rect.right() - t.space_8 - summary_width, rect.top()), rect.max - vec2(t.space_8, 0.0));paint_text(ui, body, choice.summary, FontId::proportional(t.font_small), t.form_dim, false);} else {- let body = Rect::from_min_max(pos2(rect.left() + t.space_12, title.bottom() + t.space_4), rect.max - vec2(t.space_12, t.space_8));- let galley = ui.painter().layout(choice.summary.to_owned(), FontId::proportional(t.font_small), t.form_dim, body.width());- ui.painter().with_clip_rect(ui.clip_rect().intersect(body)).galley(body.min, galley, t.form_dim);+ let mut at = pos2(radio.x + t.space_12, rect.top() + t.space_10);+ if let Some(icon) = choice.icon {+ let cue = Rect::from_min_size(at, vec2(t.space_14, t.space_14));+ crate::icons::paint_icon(ui.painter(), cue, icon, 1.0);+ scenario::publish_rect(&format!("{}:icon", choice.key), cue);+ at.x += icon_width;+ }+ let summary_at = pos2(rect.left() + t.space_12, at.y + title_galley.size().y + t.space_6);+ ui.painter().galley(at, title_galley, if selected { selected_ink } else { t.form_ink });+ ui.painter().galley(summary_at, summary_galley, t.form_dim);+ }+ let texts = [choice.title, choice.summary];+ if let Some(text) = texts.iter().find(|text| crate::prefs_search::texts_hit(ui, &[*text])) {+ crate::prefs_search::remember(ui, text, rect);+ }+ for text in texts {+ crate::prefs_search::follow(ui, text, rect);}response.widget_info(|| {egui::WidgetInfo::selected(egui::WidgetType::RadioButton, ui.is_enabled(), selected, format!("{}: {}", choice.title, choice.detail))diff --git a/crates/ui-egui/src/ui_kit/preferences_cards.rs b/crates/ui-egui/src/ui_kit/preferences_cards.rsindex 0bab18bd79..e803944755 100644--- a/crates/ui-egui/src/ui_kit/preferences_cards.rs+++ b/crates/ui-egui/src/ui_kit/preferences_cards.rs@@ -357,3 +357,81 @@ fn carousel_arrow(ui: &mut Ui, size: egui::Vec2, direction: f32, enabled: bool,scenario::publish_target(&format!("prefs:carousel:{label}"), rect);if enabled { response.on_hover_cursor(egui::CursorIcon::PointingHand) } else { response }}++/// Installed add-on row: 12 pt padding, 36 pt mark and centred, unframed folder action.+pub(crate) fn settings_plugin_card(+ ui: &mut Ui,+ key: &str,+ name: &str,+ version: &str,+ description: &str,+ enabled: &mut bool,+) -> egui::InnerResponse<(Response, Response)> {+ let t = Tokens::get();+ let container = super::Container::new(ui.ctx(), super::Surface::Navigation);+ let frame = container+ .frame(ui.ctx(), t.control_fill, crate::frame::Side::Left)+ .stroke(Stroke::new(1.0, t.dialog_border))+ .corner_radius(t.radius_lg)+ .inner_margin(t.space_12);+ container.show_frame(ui, frame, ui.max_rect(), |ui| {+ ui.set_min_width(dimension(ui.available_width()));+ if !*enabled {+ ui.multiply_opacity(0.55);+ }+ let width = dimension(ui.available_width());+ let tile_side = t.space_24 + t.space_12;+ let folder_label = crate::i18n::tr_label("Show in folder");+ let folder_font = FontId::proportional(t.font_body);+ let folder_galley = ui.painter().layout_no_wrap(folder_label.into(), folder_font, t.form_dim);+ let folder_width = folder_galley.size().x + t.space_8 * 2.0 + t.space_14 + t.space_6;+ let actions_width = folder_width + t.space_12 + t.space_16;+ let beside = width >= tile_side + t.space_12 * 2.0 + actions_width + t.form_label_width;+ let text_width = (width - tile_side - t.space_12 - if beside { actions_width + t.space_12 } else { 0.0 }).max(1.0);+ let version_galley = ui.painter().layout_no_wrap(version.into(), FontId::proportional(t.font_small), t.form_dim);+ let title = ui.painter().layout(+ name.into(),+ crate::fonts::semibold(t.font_button),+ t.form_ink,+ (text_width - version_galley.size().x - t.space_8).max(1.0),+ );+ let header_height = title.size().y.max(t.space_16 + t.space_2);+ let body = ui.painter().layout(description.into(), FontId::proportional(t.font_body), t.form_dim, text_width);+ let text_height = header_height + if description.is_empty() { 0.0 } else { t.space_2 + body.size().y };+ let content_height = tile_side.max(text_height);+ let height = content_height + if beside { 0.0 } else { t.space_8 + t.space_24 };+ let (rect, _) = ui.allocate_exact_size(vec2(width, height), Sense::hover());+ let header_center = rect.top() + content_height / 2.0;+ let tile = Rect::from_center_size(pos2(rect.left() + tile_side / 2.0, header_center), vec2(tile_side, tile_side));+ ui.painter().rect_filled(tile, t.radius_lg, t.selected_bg);+ crate::icons::paint_ink(ui.painter(), tile.shrink(t.space_8), "settings_plug", t.form_primary);+ scenario::publish_rect(&format!("prefs:plugin:{key}:icon"), tile);+ let at = pos2(tile.right() + t.space_12, header_center - text_height / 2.0);+ let title_rect = Rect::from_min_size(at, title.size());+ scenario::publish_rect(&format!("prefs:plugin:{key}:title"), title_rect);+ let version_at = pos2(at.x + title.size().x + t.space_8, at.y + (header_height - version_galley.size().y) / 2.0);+ ui.painter().galley(pos2(at.x, at.y + (header_height - title.size().y) / 2.0), title, t.form_ink);+ ui.painter().galley(version_at, version_galley, t.form_dim);+ if !description.is_empty() {+ ui.painter().galley(at + vec2(0.0, header_height + t.space_2), body, t.form_dim);+ }+ let center_y = if beside { rect.center().y } else { rect.bottom() - t.space_12 };+ let check_rect = Rect::from_center_size(pos2(rect.right() - t.space_8, center_y), vec2(t.space_16, t.space_16));+ let folder_rect =+ Rect::from_min_size(pos2(check_rect.left() - t.space_12 - folder_width, center_y - t.space_12), vec2(folder_width, t.space_24));+ let folder = ui.interact(folder_rect, ui.make_persistent_id("plugin_folder"), Sense::click());+ // Quiet actions retain their focus affordance without a button surface.+ if folder.has_focus() {+ ui.painter().rect_stroke(folder_rect, t.control_radius, Stroke::new(1.0, t.form_primary), StrokeKind::Inside);+ }+ let icon = Rect::from_center_size(pos2(folder_rect.left() + t.space_8 + t.space_14 / 2.0, center_y), vec2(t.space_14, t.space_14));+ crate::icons::paint_ink(ui.painter(), icon, "folder", t.form_dim);+ ui.painter().galley(pos2(icon.right() + t.space_6, center_y - folder_galley.size().y / 2.0), folder_galley, t.form_dim);+ folder.widget_info(|| egui::WidgetInfo::labeled(egui::WidgetType::Button, ui.is_enabled(), folder_label));+ if folder.hovered() {+ ui.ctx().set_cursor_icon(egui::CursorIcon::PointingHand);+ }+ let check = super::checkbox_at(ui, check_rect, &format!("{name}: {}", crate::i18n::tr("prefs.plugins_enabled")), enabled);+ (folder, check)+ })+}diff --git a/crates/ui-egui/src/ui_kit/shortcuts.rs b/crates/ui-egui/src/ui_kit/shortcuts.rsindex 5d23e0fa2f..f6e4f07c6f 100644--- a/crates/ui-egui/src/ui_kit/shortcuts.rs+++ b/crates/ui-egui/src/ui_kit/shortcuts.rs@@ -1,71 +1,75 @@-//! Search-and-actions toolbar shared by settings tables and command lists.+//! Shared chord keycaps and the Preferences title-bar search field.use crate::{icons, theme::Tokens};-use egui::{Align, FontId, Rect, Response, Sense, Stroke, Ui, pos2, vec2};+use egui::{FontId, Rect, Response, Sense, Stroke, Ui, pos2, vec2};-pub(crate) struct SearchAction<'a> {- pub label: &'a str,- pub icon: Option<&'a str>,- pub visible: bool,- pub tooltip: Option<&'a str>,+fn chord_parts(chord: &str) -> Vec<&str> {+ // A literal plus key follows the separator, as in Ctrl++; keep its own full keycap.+ if let Some(prefix) = chord.strip_suffix('+') {+ let prefix = prefix.strip_suffix('+').unwrap_or(prefix);+ let mut parts: Vec<_> = prefix.split('+').filter(|part| !part.is_empty()).collect();+ parts.push("+");+ parts+ } else {+ chord.split('+').collect()+ }}-/// One expanding search input followed by measured, untruncated action buttons.-/// Narrow hosts scroll the row horizontally rather than wrapping actions below its filter.-pub(crate) fn search_actions_row(- ui: &mut Ui,- id: egui::Id,- value: &mut String,- hint: &str,- actions: &[SearchAction<'_>],-) -> (Response, Option<usize>) {+/// Natural width of a complete chord in the same mono keycaps used by command search.+pub(crate) fn shortcut_binding_width(ui: &Ui, chord: &str) -> f32 {let t = Tokens::get();- let action_width: f32 = actions+ if chord.is_empty() {+ return super::ContentWidth::label(ui, crate::i18n::tr("prefs.shortcuts_not_assigned")) + t.space_8;+ }+ let parts = chord_parts(chord);+ parts.iter()- .filter(|a| a.visible)- .map(|a| {- let text = super::ContentWidth::label(ui, a.label);- let padding = if a.icon.is_some() { t.space_10 * 2.0 + t.space_14 + t.space_6 } else { ui.spacing().button_padding.x * 2.0 };- text + padding + t.space_8- })- .sum();- let width = super::metrics::dimension(ui.available_width());- let minimum = t.form_label_width * 2.0 + action_width;- let shown = egui::ScrollArea::horizontal().id_salt(id.with("actions_scroll")).auto_shrink([false, true]).show(ui, |ui| {- ui.horizontal(|ui| {- ui.spacing_mut().item_spacing.x = t.space_8;- let filter_width = (width.max(minimum) - action_width).max(0.0);- let response = ui- .allocate_ui_with_layout(vec2(filter_width, t.control_height), egui::Layout::left_to_right(Align::Center), |ui| {- search_with_icon(ui, id, value, hint, false)- })- .inner;- let mut action = None;- for (index, item) in actions.iter().enumerate().filter(|(_, a)| a.visible) {- let response = if let Some(icon) = item.icon {- super::icon_label_button(ui, item.label, icon, true, false)- } else {- super::button(ui, item.label, super::Button::Normal)- };- let response = if let Some(tooltip) = item.tooltip { response.on_hover_text(tooltip) } else { response };- if response.clicked() {- action = Some(index);- }- }- (response, action)- })- .inner+ .map(|part| ui.painter().layout_no_wrap((*part).to_owned(), FontId::monospace(t.font_small), t.form_dim).size().x + t.space_10)+ .sum::<f32>()+ + t.space_4 * parts.len().saturating_sub(1) as f32+}++/// One focusable binding, with a separate full keycap for every modifier and key.+/// Read-only callers keep exactly the same caps without an interactive recorder target.+pub(crate) fn shortcut_binding(ui: &mut Ui, chord: &str, editable: bool) -> Response {+ let t = Tokens::get();+ let (rect, response) =+ ui.allocate_exact_size(vec2(shortcut_binding_width(ui, chord), t.control_height), if editable { Sense::click() } else { Sense::hover() });+ if editable && response.clicked() {+ response.request_focus();+ }+ let mut x = rect.left();+ if chord.is_empty() {+ let text = crate::i18n::tr("prefs.shortcuts_not_assigned");+ let galley = ui.painter().layout_no_wrap(text.to_owned(), FontId::proportional(t.font_label), t.form_dim);+ ui.painter().galley(pos2(x + t.space_4, rect.center().y - galley.size().y / 2.0), galley, t.form_dim);+ } else {+ for part in chord_parts(chord) {+ let width = ui.painter().layout_no_wrap(part.to_owned(), FontId::monospace(t.font_small), t.form_dim).size().x + t.space_10;+ super::CommandSearch::key(ui, pos2(x + width, rect.center().y), part);+ x += width + t.space_4;+ }+ }+ if response.has_focus() || (editable && response.hovered()) {+ ui.painter().rect_stroke(rect, t.radius_sm, Stroke::new(1.0, t.form_primary), egui::StrokeKind::Outside);+ }+ response.widget_info(|| {+ egui::WidgetInfo::labeled(+ if editable { egui::WidgetType::Button } else { egui::WidgetType::Label },+ ui.is_enabled(),+ if chord.is_empty() { crate::i18n::tr("prefs.shortcuts_not_assigned") } else { chord },+ )});- shown.inner+ response}/// Native text editing with the same token frame and leading magnifier as command search.pub(crate) fn preferences_search_field(ui: &mut Ui, id: egui::Id, value: &mut String, hint: &str) -> Response {- search_with_icon(ui, id, value, hint, true)+ search_with_icon(ui, id, value, hint)}-fn search_with_icon(ui: &mut Ui, id: egui::Id, value: &mut String, hint: &str, titlebar: bool) -> Response {+fn search_with_icon(ui: &mut Ui, id: egui::Id, value: &mut String, hint: &str) -> Response {let t = Tokens::get();- let height = if titlebar { t.form_close_size } else { t.control_height };+ let height = t.form_close_size;let (r, frame) = ui.allocate_exact_size(vec2(super::metrics::dimension(ui.available_width()), height), Sense::click());let focused = ui.memory(|m| m.has_focus(id));ui.painter().rect(@@ -75,20 +79,12 @@ fn search_with_icon(ui: &mut Ui, id: egui::Id, value: &mut String, hint: &str, tif focused { Stroke::new(1.0, t.form_primary) } else { t.control_border_stroke(t.control_border) },egui::StrokeKind::Inside,);- let side = if titlebar { t.space_14 } else { t.space_16 };+ let side = t.space_14;let icon = Rect::from_center_size(pos2(r.left() + t.space_8 + side * 0.5, r.center().y), vec2(side, side));icons::paint_ink(ui.painter(), icon, "zoom", t.form_dim);let show_clear = !value.is_empty();- let clear_side = if show_clear {- height- } else if titlebar {- super::CommandSearch::key(ui, r.right_center() - vec2(t.space_6, 0.0), "Ctrl F") + t.space_12- } else {- 0.0- };- if titlebar {- crate::scenario::publish_rect("prefs:search:frame", r);- }+ let clear_side = if show_clear { height } else { super::CommandSearch::key(ui, r.right_center() - vec2(t.space_6, 0.0), "Ctrl F") + t.space_12 };+ crate::scenario::publish_rect("prefs:search:frame", r);let editor =Rect::from_min_max(pos2((icon.right() + t.space_6).min(r.right()), r.top()), pos2((r.right() - clear_side).max(icon.right()), r.bottom()));let response = uidiff --git a/crates/ui-egui/src/ui_kit/table.rs b/crates/ui-egui/src/ui_kit/table.rsindex 7568b02bfe..951ad063d1 100644--- a/crates/ui-egui/src/ui_kit/table.rs+++ b/crates/ui-egui/src/ui_kit/table.rs@@ -48,16 +48,7 @@ pub(crate) struct Table<'a> {reveal: Option<egui::Rect>,}-/// Header, horizontally scrolling body and empty state. Regular rows use table_row_height.-/// Tokens: form_label_width, font_label, dialog_label, space_4/8, dialog_rule, text/dim, selected_bg.-pub(crate) fn table<R>(ui: &mut Ui, id: &str, columns: &[Column<'_>], empty: &str, add: impl FnOnce(&mut Ui, &mut Table<'_>) -> R) -> R {- table_custom(ui, id, columns, empty, |ui, table| {- table.headers(ui, |_, _| false);- add(ui, table)- })-}--/// The same table grid with caller-supplied header actions through Table::headers.+/// Table grid with caller-supplied header actions through Table::headers./// Custom cells own their actions; all body rows share the same widths and metrics.pub(crate) fn table_custom<R>(ui: &mut Ui, id: &str, columns: &[Column<'_>], empty: &str, add: impl FnOnce(&mut Ui, &mut Table<'_>) -> R) -> R {let mut reveal = None;diff --git a/crates/ui-egui/src/ui_kit/table_tests.rs b/crates/ui-egui/src/ui_kit/table_tests.rsindex 4579cd84ce..8a8ef0c7cc 100644--- a/crates/ui-egui/src/ui_kit/table_tests.rs+++ b/crates/ui-egui/src/ui_kit/table_tests.rs@@ -12,12 +12,13 @@ fn fitting_flex_tables_have_no_horizontal_scrollbar_at_card_widths_and_pixel_scaui.set_width(width);// Include a non-zero inherited scroll margin: the grid owns its insets.ui.spacing_mut().scroll.content_margin = egui::Margin::same(1);- table(+ table_custom(ui,"fit",&[Column::new("Name", 1.1).flex(), Column::new("Expression", 1.5).flex(), Column::new("Value", 1.1).flex()],"Empty",|ui, table| {+ table.headers(ui, |_, _| false);table.row(ui, "row", false, |row| {row.cell(|ui| {ui_kit::text(ui, "Width", ui_kit::Text::Cell);@@ -58,7 +59,8 @@ fn fitting_flex_tables_have_no_horizontal_scrollbar_at_card_widths_and_pixel_scafn genuinely_wide_tables_keep_horizontal_scrolling() {let ctx = crate::fonts::test_context();harness::frame(&ctx, vec![], |ui| {- table(ui, "overflow", &[Column::new("Name", 1.0).flex().min_content_width(400.0)], "Empty", |ui, table| {+ table_custom(ui, "overflow", &[Column::new("Name", 1.0).flex().min_content_width(400.0)], "Empty", |ui, table| {+ table.headers(ui, |_, _| false);table.row(ui, "row", false, |row| {row.cell(|ui| ui_kit::text(ui, "Name", ui_kit::Text::Cell));});@@ -77,7 +79,7 @@ fn row_hover_paints_under_every_interactive_child_and_respects_clip_and_enabled(let mut selected = 0;let mut draw = |ui: &mut Ui| {ui.set_width(600.0);- table(+ table_custom(ui,"hover",&[@@ -88,6 +90,7 @@ fn row_hover_paints_under_every_interactive_child_and_respects_clip_and_enabled(],"Empty",|ui, table| {+ table.headers(ui, |_, _| false);table.row(ui, "row", false, |row| {row.cell(|ui| {ui_kit::text(ui, "Width", ui_kit::Text::Cell);@@ -139,7 +142,8 @@ fn row_hover_paints_under_every_interactive_child_and_respects_clip_and_enabled(fn add_prompt_is_short_rounded_and_uses_a_hand_cursor() {let ctx = crate::fonts::test_context();let mut draw = |ui: &mut Ui| {- table(ui, "prompt", &[Column::new("Name", 1.0).flex()], "Empty", |ui, table| {+ table_custom(ui, "prompt", &[Column::new("Name", 1.0).flex()], "Empty", |ui, table| {+ table.headers(ui, |_, _| false);table.add_prompt(ui, "Add configuration", "Add configuration");});};@@ -283,7 +287,8 @@ fn horizontal_bar_is_painted_only_for_actual_table_overflow() {ui.set_width(280.0);ui_kit::scope(ui, |ui| {let column = Column::new("Name", 1.0).flex().min_content_width(if overflow { 400.0 } else { 0.0 });- table(ui, "bar", &[column], "Empty", |ui, table| {+ table_custom(ui, "bar", &[column], "Empty", |ui, table| {+ table.headers(ui, |_, _| false);table.row(ui, "row", false, |row| {row.cell(|ui| ui_kit::text(ui, "Width", ui_kit::Text::Cell));});diff --git a/crates/ui-egui/tests/scenarios/s45_preferences.json b/crates/ui-egui/tests/scenarios/s45_preferences.jsonindex c6054c863e..ee928a2450 100644--- a/crates/ui-egui/tests/scenarios/s45_preferences.json+++ b/crates/ui-egui/tests/scenarios/s45_preferences.json@@ -15,7 +15,15 @@{"key": "Comma", "cmd": true},{"expect": {"prefs": {"dialog": "General"}}},{"click": {"handle": "prefs:page:Shortcuts"}},- {"expect": {"shown": "Reset All", "prefs": {"dialog": "Shortcuts"}}},+ {"expect": {"shown": "Done", "prefs": {"dialog": "Shortcuts"}}},+ {"click": {"handle": "keymap:filter"}},+ {"text": "solid.extrude"},+ {"click": {"handle": "keymap:capture:solid.extrude"}},+ {"expect": {"shown": "Press a key..."}},+ {"click": {"handle": "keymap:done"}},+ {"click": {"handle": "keymap:clear:solid.extrude"}},+ {"expect": {"shown": "Not assigned"}},+ {"click": {"handle": "keymap:reset:solid.extrude"}},{"click": {"handle": "prefs:page:Navigation"}},{"widget": "Fusion"},{"widget": "Tinkercad"},diff --git a/crates/ui-egui/tests/scenarios/s46_preferences_fixed_size.json b/crates/ui-egui/tests/scenarios/s46_preferences_fixed_size.jsonindex 12eaa55188..d341480361 100644--- a/crates/ui-egui/tests/scenarios/s46_preferences_fixed_size.json+++ b/crates/ui-egui/tests/scenarios/s46_preferences_fixed_size.json@@ -25,6 +25,12 @@{"expect": {"prefs": {"dialog": "Sketch"}, "same_width": "prefs:window", "right_edge": {"inner": "prefs:ok", "outer": "prefs:actions", "tol": 1}}},{"widget": "Assistant"},{"expect": {"prefs": {"dialog": "Assistant"}, "same_width": "prefs:window", "right_edge": {"inner": "prefs:ok", "outer": "prefs:actions", "tol": 1}}},+ {"click": {"handle": "prefs:ai_mode:ask"}},+ {"expect": {"prefs": {"ai_permissions": "ask"}}},+ {"click": {"handle": "prefs:ai_mode:all"}},+ {"expect": {"prefs": {"ai_permissions": "all"}}},+ {"click": {"handle": "prefs:ai_mode:edits"}},+ {"expect": {"prefs": {"ai_permissions": "edits"}}},{"widget": "Plugins"},{"expect": {"prefs": {"dialog": "Plugins"}, "same_width": "prefs:window", "right_edge": {"inner": "prefs:ok", "outer": "prefs:actions", "tol": 1}}},{"widget": "General"},@@ -51,6 +57,12 @@{"expect": {"prefs": {"dialog": "Shortcuts"}, "same_width": "prefs:window"}},{"call": "ui.prefs", "params": {"open": "Assistant"}},{"expect": {"prefs": {"dialog": "Assistant"}, "same_width": "prefs:window"}},+ {"click": {"handle": "prefs:ai_mode:ask"}},+ {"expect": {"prefs": {"ai_permissions": "ask"}}},+ {"click": {"handle": "prefs:ai_mode:all"}},+ {"expect": {"prefs": {"ai_permissions": "all"}}},+ {"click": {"handle": "prefs:ai_mode:edits"}},+ {"expect": {"prefs": {"ai_permissions": "edits"}}},{"call": "ui.prefs", "params": {"open": "Plugins"}},{"expect": {"prefs": {"dialog": "Plugins"}, "same_width": "prefs:window"}},{"click": {"handle": "prefs:page:Interface"}},diff --git a/docs/design/preferences/pages/assistant.md b/docs/design/preferences/pages/assistant.mdindex 5aab775a14..beb302f9bd 100644--- a/docs/design/preferences/pages/assistant.md+++ b/docs/design/preferences/pages/assistant.md@@ -15,7 +15,8 @@ profile" tag. Source today: the AI page (`crates/ui-egui/src/agent_chat/settings| Label | Control | Edits | Default | Hover | Figure | Notes ||---|---|---|---|---|---|---|-| Ask first: "Asks for every change" / Make edits: "Edits freely, asks for the rest" / Do everything: "Never asks" | Three radio cards (204 x 65, name and one line) | `Prefs.ai_permissions` (`agent_chat::agents::Mode`) | Make edits (`Mode::Edits`) | "Use with care" on Do everything | none | |+| Ask first: "Asks for every change" / Make edits: "Edits freely, asks for the rest" / Do everything: "Never asks" | Three radio cards (204 x 65, name and one line) | `Prefs.ai_permissions` (`agent_chat::agents::Mode`) | Make edits (`Mode::Edits`) | "Use with care" on Do everything | Warning artwork with an exclamation beside Do everything | |+| Always allowed | Collapsed disclosure with the real remembered-approval count and per-agent Reset | `Prefs.agent_always_allow` | empty | existing approval guidance | none | Below permission cards and warnings, before Agents. Retains actual remembered tools. |## Agents (3)@@ -23,9 +24,10 @@ One card per agent, with an "Add agent..." and a "Refresh" button at the end.| Label | Control | Edits | Default | Hover | Figure | Notes ||---|---|---|---|---|---|---|-| Agent card (Claude Code "Default" "Signed in"; Codex CLI "Not signed in"; Local model "Key in environment") | Card with name, badges, buttons "Test" (40 x 24) and for custom agents "Remove" | `Prefs.agents` (`agent_chat::agents::AgentConfig`), `Prefs.agent_default` | none configured | none | none | Names and states are samples; build from `agents.rs`. |+| Agent card (Claude Code "Default" "Signed in"; Codex CLI "Not signed in"; Local model "Key in environment") | Card with name, badges, "Test" (40 x 24), and for added agents "Edit" then "Remove" | `Prefs.agents` (`agent_chat::agents::AgentConfig`), `Prefs.agent_default` | none configured | none | none | Names and states are samples; build from `agents.rs`. Found agents cannot be edited or removed. || Permissions | Dropdown (220 wide, "Same as above") | `Prefs.agent_permissions[agent]` (`Mode`) | same as above | none | none | Per agent. |-| Request timeout | Number field (64 wide, aria "Seconds") with "seconds" | the agent's timeout in `AgentConfig` | per agent | none | none | |+| Request timeout | Number field (64 wide, aria "Seconds") with "seconds" | the agent's timeout in `AgentConfig` | per agent | none | none | Added API agents only, 30–3600 seconds in steps of 5. |+| Reasoning effort | Existing text field below Request timeout | `AgentConfig.reasoning_effort` | empty | existing reasoning guidance | none | Added API agents only; preserves normalization and next-request updates. || Add agent... | Button (109 x 28) | opens the add-agent form | n/a | none | none | || Refresh | Button (65 x 28) | refreshes agent states | n/a | none | none | |@@ -34,7 +36,7 @@ One card per agent, with an "Add agent..." and a "Refresh" button at the end.| Label | Control | Edits | Default | Hover | Figure | Notes ||---|---|---|---|---|---|---|| Dock the chat: Left / Right / Own window | Segmented | `Prefs.agent_chat_side` (`"left"`, `"right"`) and `Prefs.agent_chat_popped` (Own window) | Right | none | none | Two fields behind one control. |-| Changes per message | Dropdown ("Unlimited") | `Prefs.agent_chat_turn_limit` (aria "Limit") | `DEFAULT_TURN_LIMIT` | none | none | The board shows "Unlimited" as the sample; the default is the code's `DEFAULT_TURN_LIMIT`. |+| Changes per message | Unlimited / Limited dropdown; number field when Limited | `Prefs.agent_chat_turn_limit` (aria "Limit") | `DEFAULT_TURN_LIMIT` = 0 (Unlimited) | none | none | Every value 1–200 remains reachable. Switching from Unlimited to Limited seeds 24; rendering never changes a value. The existing saved-value migration remains unchanged. |## Connecting@@ -56,6 +58,6 @@ One card per agent, with an "Add agent..." and a "Refresh" button at the end.## Mismatches-* `agent_chat_width`, `agent_chat_minimized`, `agent_chat_window`, `agent_last`, `agent_models` and- `agent_always_allow` have no control on the board.+* `agent_chat_width`, `agent_chat_minimized`, `agent_chat_window`, `agent_last` and `agent_models`+ have no control on the board. Always allowed, Edit and reasoning effort are retained newer controls.* Agent names and states are sample content.diff --git a/docs/design/preferences/pages/plugins.md b/docs/design/preferences/pages/plugins.mdindex 2deb012440..f9af44fb31 100644--- a/docs/design/preferences/pages/plugins.md+++ b/docs/design/preferences/pages/plugins.md@@ -8,25 +8,27 @@ tag. Source today: Plugins page (`crates/ui-egui/src/plugins.rs`, `Prefs.disable| Label | Control | Edits | Default | Hover | Figure | Notes ||---|---|---|---|---|---|---|-| Search plugins | Search field, full width | filters the cards only | empty | none | none | |+| Search plugins | Search field with magnifier, full width | filters the cards only | empty | none | none | |## Installed (3)-One card per installed plugin, 61.7 px high.+One card per installed plugin: 12 px padding inside its border, 36 px icon tile, 12 px gaps, 13 px semibold title, 11 px version and 12 px description. The text lines have a 2 px gap. The icon, text block, unframed 24 px folder action and 16 px checkbox are vertically centred. Cards grow for wrapped text. Disabled plugins use muted content.| Part | Control | Edits | Default | Hover | Figure | Notes ||---|---|---|---|---|---|---|-| Name, version, permission badge, description | Text and a badge ("No permissions", "Reads files") | none (from the plugin manifest) | n/a | none | none | Sample content: Gear generator 1.2.0 "Adds a parametric gear feature.", Bracket tools 0.4.1 "Batch-place mounting brackets." (Reads files), Thread library 2.0.0 "Standard thread profiles.". Build from the installed plugins. |-| Show in folder | Small button (114.6 x 24) | opens the plugin's folder | n/a | none | none | |+| Name, version, description | Text from the plugin manifest | none | n/a | none | none | Build from installed plugins. The current manifest has no permission metadata, so omit permission badges. |+| Show in folder | Unframed action with folder icon | opens the plugin's folder | n/a | none | none | || Enabled | Checkbox (16 px) | `Prefs.disabled_plugins` (a plugin is enabled when its id is not in the set) | enabled | none | none | |## Footer row| Label | Control | Edits | Default | Hover | Figure | Notes ||---|---|---|---|---|---|---|-| Show plugins folder | Button (152 x 28) | opens the plugins folder | n/a | none | none | The page has no "Restore page defaults" button on the board; the footer shows "Cancel" and "OK" only. |+| Show plugins folder | Button with folder icon | opens the plugins folder | n/a | none | none | Creates the folder if needed. Per-plugin Show in folder opens that plugin's own folder. |+| Restore page defaults | Shared footer action | clears `Prefs.disabled_plugins` | empty (all plugins enabled) | none | none | Retain the existing action and Cancel transaction semantics alongside Cancel and OK. |## Mismatches* Plugin cards are sample content (see README).-* The board footer omits "Restore page defaults" because nothing on this page has a default.+* The board footer omits "Restore page defaults"; the retained disabled-plugin preference does+ have a default, so the implementation keeps the shared action.diff --git a/docs/design/preferences/pages/shortcuts.md b/docs/design/preferences/pages/shortcuts.mdindex a34834dc2b..ba33fad3c6 100644--- a/docs/design/preferences/pages/shortcuts.md+++ b/docs/design/preferences/pages/shortcuts.md@@ -37,3 +37,5 @@ registry and the keymap (`keymap.rs`).* The per-row "reset" and "clear" affordances are two icon buttons on the board; check `keymap.rs` forwhat today's keymap edit offers before building them.* The board's footer is the shared "Restore page defaults / Cancel / OK".++The search field has a leading magnifier. Done, Export and Import follow it on the same row; Export and Import use tray-arrow icons. The toolbar wraps only when the available width cannot fit the controls.diff --git a/docs/ui-kit.md b/docs/ui-kit.mdindex 104f216eb2..b15154f7b4 100644--- a/docs/ui-kit.md+++ b/docs/ui-kit.md@@ -273,13 +273,14 @@ table. Panel/Window/Confirm compositions also have dedicated geometry and intera| navigation_menu: `navigation_menu`, `NavigationMenuRow`, `navigation_context`, `navigation_tooltip` | Upward menus, checked rows, headings, separators and the delayed shortcut tooltip; context menus retain kit popup hosts and Container's shared elevation | `dialog_body/border/rule`, `form_ink/dim/primary`, `selected_bg`, `nav_hover/tip/tip_ink/tip_key_border` || navigation_settings: `navigation_stage`, `navigation_tile`, `navigation_drag_ghost` | Custom preview stage, draggable slot tiles and drag feedback. Ordinary preferences reuse `settings_section`, `settings_form`, `row`, default `segmented`, `checkbox`, `button`, `divider` and text hints | `dialog_border`, `control_border`, `form_ink/dim`, `nav_field/hover/viewport` || `settings_card` | Full-width settings detail group; uses Container chrome and preserves its width with empty or changing content | `dialog_footer`, `border`, `radius_md`, `space_12/10` |+| `settings_plugin_card`, `checkbox_at` | Installed plugin card with 36 pt content, 12 pt padding, 36 pt tile, 13 pt semibold title, 11 pt version, 12 pt description and 2 pt text gap. The unframed 24 pt folder action and 16 pt checkbox are centred; actions wrap on narrow cards. | `control_fill`, `dialog_border`, `radius_lg`, `space_12/16/24` || `mirrored_icon_button_at` | Directional counterpart of an existing icon master, sharing icon-button presentation and accessible label | Shared icon-button tokens || `icon_button_at` | Icon action inside a supplied rectangle | `form_icon_inset`, `text/dim`, icon palette || `button_pair`, `PairButton` | Equal secondary actions, optional icons and selected state | `form_button_height`, control/selection/icon tokens || `footer`, `Footer`, `Action`, `HeaderActions` | OK/Cancel with optional Apply, compute status or selected action; `HeaderActions` puts the same buttons in a header row | `form_footer/button_height`, `dialog_footer/rule`, `control_*`, `accent`, spacing || `keyboard` | Esc cancels, unowned Enter submits when valid | none || `action_menu`, `command_menu_button` | Nested dense action menu or ribbon overflow action retaining its icon, shortcut and enabled state | form control/font tokens, `space_16`, icon palette |-| table: `table`, `table_custom`, `Column`, `Table::headers`, `Table::row`, `TableRow::cell`, `Table::add_prompt` | Left-aligned headers/cells, horizontal overflow, selected/hover rows and empty state. `table_custom` supplies header actions through `headers`. `Column::flex` shares remaining width by weight, freezing columns at their control minimums before redistributing the remaining space; `Column::icon_only` hides the heading while retaining its automation identity. `add_prompt` is the final slim dashed line and requests a regular draft row from its owner; `Column::new(label, width)` uses label-column multiples, `min_content_width(points)` reserves measured control content; `ContentWidth::name` measures strong configuration names | label-column tokens, `control_height`, `dialog_rule/footer`, `selected_bg`, spacing |+| table: `table_custom`, `Column`, `Table::headers`, `Table::row`, `TableRow::cell`, `Table::add_prompt` | Left-aligned headers/cells, horizontal overflow, selected/hover rows and empty state. `table_custom` supplies header actions through `headers`. `Column::flex` shares remaining width by weight, freezing columns at their control minimums before redistributing the remaining space; `Column::icon_only` hides the heading while retaining its automation identity. `add_prompt` is the final slim dashed line and requests a regular draft row from its owner; `Column::new(label, width)` uses label-column multiples, `min_content_width(points)` reserves measured control content; `ContentWidth::name` measures strong configuration names | label-column tokens, `control_height`, `dialog_rule/footer`, `selected_bg`, spacing || `name_list`, `NameList::row`, `NameRow::name`, `NameRow::cell` | A list of named rows on the table grid (the web app's stored files): the name column takes the width the other columns leave; the other columns are as wide as their widest cell, measured as drawn (a changed measurement discards the frame). A name is cut with an ellipsis, and given its full text on hover, only when it does not fit; `dialog:name:NAME:cut` reports it | `form_label_width`, `font_label`, `form_ink`, `space_8`, `table_row_height` || `removable_header`, `plus_header`, `bin_button`, `active_pill` | Hover-only column removal, anchored Add Column menu with insertion brackets, icon-only immediate deletion and active-row status. Bins preserve `dialog:button:Actions:Delete` and `:×`; header removal preserves `dialog:button:LABEL:×`. | `control_*`, `form_*`, `selected_bg`, spacing || `compact_button`, `summary_row` | Borderless stars and chevrons with enabled/selected states; named two-line rule summary beside an enable checkbox and compact actions. | `form_close_size`, `control_*`, `form_*`, typography and spacing |@@ -884,6 +885,7 @@ these shared pieces; the pages themselves arrive in later steps. Sizes follow| `toggle_tile(ui, &Card, width)` | The same picture with a 15 pt checkbox in the top-right corner (`Card::selected` is "on"). Reports `Checkbox`. | as above, `control_border` || `preset_card(ui, name, word, selected, enabled, &icon, width)` | A 70 pt card with a 38 pt icon box (`icon` paints into it in the ink it is given), a name, one word and an accent check. Used for Performance, Quality and Custom. | as above, `pref_well` || `help_icon(ui, text)` | The (i) after a label. Shows `text` as a tooltip and exposes it as the widget's label. | `form_dim`, `form_ink` |+| `shortcut_binding(ui, chord, editable)` | Complete mono keycaps using the command-search painter; one focusable recorder target per binding, or a read-only label. Empty chords show dim Not assigned. `shortcut_binding_width` measures the same font and padding, including literal plus keys. Gallery: `shortcut_binding`. | `font_small/label`, `control_height`, `form_dim`, `form_primary`, `space_4/8/10`, `radius_sm` || `carousel(ui, id, count, item_width, item_height, item)` | A row of items between a previous and a next arrow (both labelled from the `prefs.carousel_*` messages). `carousel_window(count, offset, available, item_width, gap, arrow)` says which items show; the arrow at an end is dimmed (0.35) and inert. The first shown index is kept in the Ui's temporary memory under `id`. | `dialog_border`, `control_fill`, `hover`, `form_ink`, `radius_lg` |`card_look(selected, enabled, hovered, focused)` holds the state rules (border width, fill, ink, weight,@@ -920,3 +922,5 @@ New pieces and figures each have an entry in `gallery::ELEMENTS` (`picture_card`in both themes. `SOLIDCRAFT_PREFERENCE_WIDGET_EVIDENCE=<dir>` keeps the CPU-rendered boards(`preferences-widgets-*.png`, `preferences-figures-*.png`) from`preference_widgets_and_figures_board_in_both_themes`.++Assistant permission cards accept an optional `SettingsChoice.icon`; Do everything uses the existing warning artwork, including its exclamation mark.