mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
Implements per-workspace API profile selection as requested in #8010. Addresses critical issues from review by @daniel-lxs: 1. Fix: Workspace selection no longer overwrites global config across windows. When scope="workspace", only the local cache is updated via setLocalValue(), avoiding leaking currentApiConfigName to other windows via shared globalState. 2. Fix: Toggling scope back to Global now clears workspace overrides via clearWorkspaceOverrides(), preventing stale workspace state from keeping the scope stuck on "workspace". Backend changes: - Add ConfigScope type and WorkspaceOverrides schema to ProviderSettingsManager - Add workspace override methods (getWorkspaceOverrides, storeWorkspaceOverrides, clearWorkspaceOverrides, getConfigScope, getActiveProfileName) - Modify activateProfile and setModeConfig to accept scope parameter - Modify getModeConfigId to check workspace overrides first - Add setLocalValue to ContextProxy for cache-only state updates - Add scope field to WebviewMessage and currentConfigScope to ExtensionState Frontend changes: - Add scope toggle UI to ApiConfigSelector with [W] indicator - Wire scope through ChatTextArea to pass with config changes - Add i18n translation keys for scope UI elements Testing: - Add comprehensive workspace-scoped tests to ProviderSettingsManager.spec.ts - Update ClineProvider test mocks with getConfigScope method - All tests passing (175 across 5 test files) Fixes #8010 |
||
|---|---|---|
| .. | ||
| npm | ||
| scripts | ||
| src | ||
| .gitignore | ||
| eslint.config.mjs | ||
| package.json | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vitest.config.ts | ||