feat: add per-workspace API profile selection #8011
Closed
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.
Summary
This PR implements per-workspace API profile selection as requested in #8010. Users can now configure different API profiles for each workspace, which persist across VS Code restarts.
Problem
Previously, changing API configuration in one VS Code window would affect all windows globally. This was problematic for users working on multiple projects with different API requirements or tracking costs per client.
Solution
Implemented a two-tier configuration system where workspace-specific settings override global settings:
workspaceState[W]indicator to show when workspace config is activeKey Changes
Backend
ProviderSettingsManagerwith workspace-scoped configuration supportConfigScopetype to distinguish between global and workspace settingsgetWorkspaceOverrides()andstoreWorkspaceOverrides()methodsFrontend
ApiConfigSelectorcomponent[W]indicator when using workspace-scoped configurationChatTextAreato pass selected scope through callbacksTesting
getConfigScopemethod in mocksBreaking Changes
None. The feature is backward compatible - existing global configurations continue to work as before.
Testing Instructions
Screenshots
The scope selector appears in the API configuration dropdown with a toggle between "Global" and "Workspace" options. When workspace scope is active, a
[W]indicator appears next to the profile name.Fixes #8010
Important
Adds per-workspace API profile selection, allowing workspace-specific configurations that override global settings, with UI and backend support.
[W]indicator in UI to denote workspace-scoped configuration.ProviderSettingsManagerwithConfigScopetype and methodsgetWorkspaceOverrides()andstoreWorkspaceOverrides().ApiConfigSelectorandChatTextAreato support scope selection and display.ProviderSettingsManager.spec.ts.common.jsonfor new UI elements.This description was created by
for 7a2388e. You can customize this summary. It will automatically update as commits are pushed.