mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
When switching Configuration Profiles within the Settings/Providers tab,
provider settings were not refreshing because:
1. The cachedState update happened asynchronously (useEffect) after the
render cycle, causing child components to mount with stale config
2. ApiOptions and provider components retained local state from the
previous profile since they were not remounted
Three fixes applied:
- Changed profile-switch useEffect to synchronous render-time state
update (React "adjusting state when a prop changes" pattern)
- Added key={currentApiConfigName} on ApiOptions to force full remount
on profile switch, resetting all local state in provider components
- Added sync effects and write-back guards in OpenAICompatible.tsx to
prevent stale header overwrites
Closes #11450
|
||
|---|---|---|
| .. | ||
| audio | ||
| public | ||
| src | ||
| .gitignore | ||
| components.json | ||
| eslint.config.mjs | ||
| index.html | ||
| package.json | ||
| tsconfig.json | ||
| turbo.json | ||
| vite.config.ts | ||
| vitest.config.ts | ||
| vitest.setup.ts | ||