Repository navigation
Conversation
Agents send file edits as ACP diff content on the tool call, carrying the path plus the old and new text of each hunk. The chat dropped that content and rendered only the icon and the title, so an edit was visible as a line of text and nothing else. The tool call row now shows the added and removed line counts and holds the diff below it, collapsed until the row is clicked. Colors come from the theme's diff editor tokens. Nothing is written to disk and no editor tab is opened. When a completed tool call repeats the diff it announced at the start, the second one replaces the first and keeps an expanded diff open. The diff lives in the DOM only, so a restored history shows the tool call without it. Signed-off-by: moep90 <volleyballlive@googlemail.com>
This was referenced Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ACP agents report file edits as diff content on the tool call: each entry carries the path plus the old and new text of a hunk. The chat ignores
contententirely and renders the icon and the title, so a turn that rewrites a file shows up as a row of text likepatch (replace): notes.mdand nothing else. There is no way to see what the agent actually wrote.Change
The tool call row now shows the added and removed line counts of the edit and holds the diff below it, collapsed. Clicking the row expands it, clicking again collapses it. Colors come from
diffEditor.insertedTextBackgroundanddiffEditor.removedTextBackground, the counts fromgitDecorationtokens, so it follows the active theme.Nothing is written to disk and no editor tab is opened, which keeps this independent of #43 and #37 and avoids the tab flooding described in #22.
An agent typically sends the same diff twice, once when the tool call starts and once when it completes. The second render replaces the first and an expanded diff stays open across that replacement.
The diff lives in the DOM only. A restored session shows the tool call without it, since the persisted history keeps id, title and status.
Testing
npm run lint,npm testandnpm run packagepass locally on Linux. Three JSDOM tests cover the collapsed initial render with its line contents and counts, the expand on click, the replacement of a repeated diff, and a tool call whose content holds no diff.Note on overlap
The test file brings its own JSDOM harness and adds jsdom to the dev dependencies. #56 adds the same dependency for its own tests, at a different major. Whichever lands first, I am happy to rebase this one onto it and drop the duplicate harness.