Show edit diff before tool execution (fixes #393)

- Extract diff computation from edit.ts into shared edit-diff.ts
- ToolExecutionComponent computes and caches diff when args are complete
- Diff is visible while permission hooks block, before tool executes
This commit is contained in:
Mario Zechner 2026-01-01 20:34:19 +01:00
parent 173b81bc04
commit 1ed009e2cf
4 changed files with 277 additions and 134 deletions

View file

@ -902,6 +902,11 @@ export class InteractiveMode {
});
}
this.pendingTools.clear();
} else {
// Args are now complete - trigger diff computation for edit tools
for (const [, component] of this.pendingTools.entries()) {
component.setArgsComplete();
}
}
this.streamingComponent = undefined;
this.streamingMessage = undefined;