Skip to content

fix(tool-call-edit-diff): emit compact file-edit diffs and raw io#311

Open
duclvz wants to merge 1 commit into
agentclientprotocol:mainfrom
duclvz:fix/compact-file-diff
Open

fix(tool-call-edit-diff): emit compact file-edit diffs and raw io#311
duclvz wants to merge 1 commit into
agentclientprotocol:mainfrom
duclvz:fix/compact-file-diff

Conversation

@duclvz

@duclvz duclvz commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Problem

File-edit tool calls expand small changes into whole-file diffs and omit useful ACP metadata. This creates noisy output and can drop edits when the source file is unavailable or already patched.

image

Solution

  • Emit compact, per-hunk diffs without reading files from disk
  • Add locations, rawInput, and rawOutput
  • Map item/fileChange/patchUpdated events
  • Keep session-history replay consistent

Test plan

  • npm run typecheck
  • npm test (312 passing)
  • Regression coverage for invalid patches, unavailable files, patch updates, and event ordering

Replace whole-file diff expansion with hunk-local oldText/newText plus locations, normalized rawInput/rawOutput, and patchUpdated mapping for Codex file-change tool calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant