feat: add default modes for profile dropdown in provider settings#12229
Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
Draft
feat: add default modes for profile dropdown in provider settings#12229roomote-v0[bot] wants to merge 1 commit intomainfrom
roomote-v0[bot] wants to merge 1 commit intomainfrom
Conversation
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
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: AddedsetDefaultModesForProfilemessage type toWebviewMessagesrc/core/config/ProviderSettingsManager.ts: AddedunsetModeConfig()andgetAllModeConfigs()methodssrc/core/webview/webviewMessageHandler.ts: Added handler for the new message that assigns/unassigns modes to profiles and syncsmodeApiConfigsto global stateFrontend
webview-ui/src/components/settings/ApiConfigManager.tsx: Added a dropdown usingDropdownMenuCheckboxItemthat shows all available modes. Checked modes indicate that the current profile is the default for that mode.webview-ui/src/components/settings/SettingsView.tsx: PassmodeApiConfigsandcustomModestoApiConfigManagerwebview-ui/src/i18n/locales/en/settings.json: Added translation stringsTests
unsetModeConfigandgetAllModeConfigsinProviderSettingsManager.spec.ts(4 new tests, all passing)ApiConfigManager.spec.tsxmocks to include DropdownMenu components (13 tests, all passing)How it works
ProviderSettingsManagerand synced to the webviewInteractively review PR in Roo Code Cloud