Skip to content

feat: add default modes for profile dropdown in provider settings#12229

Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
feature/default-modes-for-profile
Draft

feat: add default modes for profile dropdown in provider settings#12229
roomote-v0[bot] wants to merge 1 commit intomainfrom
feature/default-modes-for-profile

Conversation

@roomote-v0
Copy link
Copy Markdown
Contributor

@roomote-v0 roomote-v0 Bot commented Apr 29, 2026

This PR attempts to address Issue #12227. Feedback and guidance are welcome.

Summary

Adds a "Default for modes" multi-select dropdown in the provider settings section. Users can now see and configure which modes should use a specific provider profile as their default. When switching to a selected mode, the assigned profile will be activated automatically.

Changes

Backend

  • packages/types/src/vscode-extension-host.ts: Added setDefaultModesForProfile message type to WebviewMessage
  • src/core/config/ProviderSettingsManager.ts: Added unsetModeConfig() and getAllModeConfigs() methods
  • src/core/webview/webviewMessageHandler.ts: Added handler for the new message that assigns/unassigns modes to profiles and syncs modeApiConfigs to global state

Frontend

  • webview-ui/src/components/settings/ApiConfigManager.tsx: Added a dropdown using DropdownMenuCheckboxItem that shows all available modes. Checked modes indicate that the current profile is the default for that mode.
  • webview-ui/src/components/settings/SettingsView.tsx: Pass modeApiConfigs and customModes to ApiConfigManager
  • webview-ui/src/i18n/locales/en/settings.json: Added translation strings

Tests

  • Added tests for unsetModeConfig and getAllModeConfigs in ProviderSettingsManager.spec.ts (4 new tests, all passing)
  • Updated ApiConfigManager.spec.tsx mocks to include DropdownMenu components (13 tests, all passing)

How it works

  1. Each provider profile shows a "Default for modes" dropdown listing all available modes (built-in + custom)
  2. Checking a mode assigns the current profile as the default for that mode
  3. Unchecking a mode removes the assignment (falls back to whatever profile the mode had before)
  4. If a custom mode is deleted, it simply disappears from the dropdown (no stale entries shown)
  5. Changes are persisted immediately via ProviderSettingsManager and synced to the webview

Interactively review PR in Roo Code Cloud

Adds a "Default for modes" multi-select dropdown in the provider settings
section. Users can now see and configure which modes should use a specific
provider profile as their default.

Changes:
- Add setDefaultModesForProfile message type to WebviewMessage
- Add unsetModeConfig and getAllModeConfigs to ProviderSettingsManager
- Add dropdown UI to ApiConfigManager using DropdownMenuCheckboxItem
- Add message handler in webviewMessageHandler.ts
- Add translation strings for the new UI
- Add tests for new ProviderSettingsManager methods
- Update existing ApiConfigManager test mocks

Closes #12227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant