Do a more complete mode switch from switch_mode command

This commit is contained in:
Matt Rubens
2025-01-24 23:02:30 -05:00
parent f5021993ea
commit 8c929ba16a
4 changed files with 108 additions and 35 deletions

View File

@@ -2065,11 +2065,10 @@ export class Cline {
break
}
// Switch the mode
// Switch the mode using shared handler
const provider = this.providerRef.deref()
if (provider) {
await provider.updateGlobalState("mode", mode_slug)
await provider.postStateToWebview()
await provider.handleModeSwitch(mode_slug)
}
pushToolResult(
`Successfully switched from ${getModeBySlug(currentMode)?.name ?? currentMode} mode to ${