mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
fix: restore tab-specific mode when loading task from history
- Set tabSpecificMode when restoring task with saved mode - Set tabSpecificApiConfigName when restoring associated API config - Ensures tabs maintain independent state even when loading from history
This commit is contained in:
parent
822eca3923
commit
4cd5e20c79
1 changed files with 6 additions and 0 deletions
|
|
@ -836,6 +836,10 @@ export class ClineProvider
|
|||
historyItem.mode = defaultModeSlug
|
||||
}
|
||||
|
||||
// Update tab-specific mode
|
||||
this.tabSpecificMode = historyItem.mode
|
||||
|
||||
// Also update global state for backward compatibility
|
||||
await this.updateGlobalState("mode", historyItem.mode)
|
||||
|
||||
// Load the saved API config for the restored mode if it exists.
|
||||
|
|
@ -851,6 +855,8 @@ export class ClineProvider
|
|||
|
||||
if (profile?.name) {
|
||||
try {
|
||||
// Update tab-specific API config name
|
||||
this.tabSpecificApiConfigName = profile.name
|
||||
await this.activateProviderProfile({ name: profile.name })
|
||||
} catch (error) {
|
||||
// Log the error but continue with task restoration.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue