From cab59cb07916153f7bb9891bcfcf18acd8030b6f Mon Sep 17 00:00:00 2001 From: Roo Code Date: Tue, 9 Dec 2025 03:40:22 +0000 Subject: [PATCH] feat: Add per-mode API configuration selector - Added "Use currently selected API configuration" option in Modes panel - Similar to existing functionality in Prompts settings for enhance/condense - Users can now select specific API configs for each mode or use the current one - Updated translation keys for new feature - Leverages existing modeApiConfigs state management --- webview-ui/src/components/modes/ModesView.tsx | 32 ++++++++++++------- webview-ui/src/i18n/locales/en/prompts.json | 4 ++- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/webview-ui/src/components/modes/ModesView.tsx b/webview-ui/src/components/modes/ModesView.tsx index 09cd237f19..dba2c27dc4 100644 --- a/webview-ui/src/components/modes/ModesView.tsx +++ b/webview-ui/src/components/modes/ModesView.tsx @@ -70,11 +70,11 @@ const ModesView = () => { const { customModePrompts, listApiConfigMeta, - currentApiConfigName, mode, customInstructions, setCustomInstructions, customModes, + modeApiConfigs, } = useExtensionState() // Use a local state to track the visually active mode @@ -910,33 +910,43 @@ const ModesView = () => { )} - {/* API Configuration - Moved Here */} + {/* API Configuration - Per Mode */}
{t("prompts:apiConfiguration.title")}
-
- {t("prompts:apiConfiguration.select")} -
+
+ {t("prompts:apiConfiguration.description")} +
diff --git a/webview-ui/src/i18n/locales/en/prompts.json b/webview-ui/src/i18n/locales/en/prompts.json index 19837c6b2c..df00b399fd 100644 --- a/webview-ui/src/i18n/locales/en/prompts.json +++ b/webview-ui/src/i18n/locales/en/prompts.json @@ -14,7 +14,9 @@ }, "apiConfiguration": { "title": "API Configuration", - "select": "Select which API configuration to use for this mode" + "select": "Select which API configuration to use for this mode", + "useCurrentConfig": "Use currently selected API configuration", + "description": "You can select an API configuration to always use for this mode, or just use whatever is currently selected" }, "tools": { "title": "Available Tools",