From 8f0c077424700054d58ea528e1ac9e79b396631a Mon Sep 17 00:00:00 2001 From: abose Date: Mon, 27 Jul 2026 15:19:40 +0530 Subject: [PATCH] feat(ai): strings and styles for enable-AI checkbox in settings dialog Companion to the phoenix-pro change adding an 'Enable AI features' checkbox to the Claude Code settings dialog. Adds the two strings and the checkbox row/note/menu-path-chip styles. Also bumps the settings dialog secondary text (note, provider URL) from quiet to medium in light theme for readability. --- src/nls/root/strings.js | 2 ++ src/styles/Extn-AIChatPanel.less | 58 +++++++++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/nls/root/strings.js b/src/nls/root/strings.js index 166d62d90d..cd99c51bf9 100644 --- a/src/nls/root/strings.js +++ b/src/nls/root/strings.js @@ -2737,6 +2737,8 @@ define({ "AI_SETTINGS_NAME_REQUIRED": "Provider name is required.", "AI_SETTINGS_NAME_DUPLICATE": "A provider with this name already exists.", "AI_SETTINGS_DONE": "Done", + "AI_SETTINGS_ENABLE_AI": "Enable AI features", + "AI_SETTINGS_ENABLE_AI_NOTE": "Turns all AI features in {APP_NAME} on or off. Takes effect after restart — you can enable it again anytime from View menu > Enable AI.", // demo start - Phoenix Code Playground - Interactive Onboarding "DEMO_SECTION1_TITLE": "Edit in Live Preview", diff --git a/src/styles/Extn-AIChatPanel.less b/src/styles/Extn-AIChatPanel.less index 7f9a27a45f..6b4b9e67a1 100644 --- a/src/styles/Extn-AIChatPanel.less +++ b/src/styles/Extn-AIChatPanel.less @@ -3499,7 +3499,7 @@ .ai-settings-provider-url { font-size: @ai-text-meta; - color: @bc-text-quiet; + color: @bc-text-medium; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; @@ -3605,6 +3605,62 @@ } } + .ai-settings-enable-row { + display: flex; + align-items: flex-start; + gap: 8px; + margin: 0; + cursor: pointer; + + input[type="checkbox"] { + margin: 2px 0 0; + flex-shrink: 0; + cursor: pointer; + } + } + + .ai-settings-enable-text { + display: flex; + flex-direction: column; + gap: 2px; + min-width: 0; + } + + .ai-settings-enable-label { + font-size: @ai-text-body; + font-weight: 600; + color: @bc-text; + + .dark & { + color: @dark-bc-text; + } + } + + .ai-settings-enable-note { + font-size: @ai-text-meta; + color: @bc-text-medium; + + .dark & { + color: @dark-bc-text-quiet; + } + + .ai-settings-menu-path { + display: inline-block; + padding: 0 5px; + border: 1px solid @bc-panel-border; + border-radius: 3px; + background: @bc-panel-bg-alt; + color: @bc-text-medium; + white-space: nowrap; + + .dark & { + border-color: @dark-bc-panel-border; + background: @dark-bc-panel-bg-alt; + color: @dark-bc-text-medium; + } + } + } + .ai-settings-footer { display: flex; align-items: center;