feat: update diff strategy dynamically

- Added `updateDiffStrategy` method to dynamically adjust the diff strategy based on the current state and experimental settings.
- Updated ClineProvider to call `updateDiffStrategy` when the experimental diff strategy is modified, ensuring real-time updates in the Cline instance.
This commit is contained in:
Daniel Riccio
2025-01-16 17:13:25 -05:00
parent c0d0548479
commit 3ce2e0c6bf
2 changed files with 20 additions and 6 deletions

View File

@@ -1072,6 +1072,10 @@ export class ClineProvider implements vscode.WebviewViewProvider {
break
case "experimentalDiffStrategy":
await this.updateGlobalState("experimentalDiffStrategy", message.bool ?? false)
// Update diffStrategy in current Cline instance if it exists
if (this.cline) {
await this.cline.updateDiffStrategy(message.bool ?? false)
}
await this.postStateToWebview()
}
},