Fix: Workspace-specific API configurations to prevent mixing between projects #9073
+234
−6
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
Fixes #9071 - API configurations getting mixed up when using Roo Code in multiple VSCode projects simultaneously.
Problem
Previously, API configurations were stored globally using a fixed key
"roo_cline_config_api_config"in VSCode's secrets storage. This caused all open VSCode instances to share the same configuration state, leading to:Solution
Implemented workspace-specific storage for API configurations:
roo_cline_config_ws_${workspaceHash}for workspace scenariosChanges
src/core/config/ProviderSettingsManager.tsgetWorkspaceIdentifier()method to generate unique workspace IDssecretsKeygetter to use workspace-specific keys when availableload()method to handle migration from global to workspace-specific storageworkspaceIdproperty to store the current workspace identifiersrc/core/config/__tests__/ProviderSettingsManager.spec.tsTesting
All tests pass successfully:
Known Limitations
If the same workspace is opened from different file system paths (e.g., via symlinks or different mount points), it will create separate configurations. This is acceptable behavior as they're technically different paths.
Review Confidence
85% (High) - The implementation:
Verification Steps
Important
Implements workspace-specific API configuration storage in
ProviderSettingsManagerto prevent configuration mixing across VSCode projects.ProviderSettingsManager.ProviderSettingsManager.spec.tsfor workspace-specific storage and migration.getWorkspaceIdentifier()to generate unique workspace IDs.secretsKeygetter to use workspace-specific keys.This description was created by
for 2688612. You can customize this summary. It will automatically update as commits are pushed.