Turn-level file change summary with View deleted & Undo (#82) - #83
Open
datvm wants to merge 3 commits into
Open
Conversation
…aggregate edits - Introduced a new feature to summarize file changes at the turn level, displaying a card for each agent turn that lists the number of files changed along with added and removed lines. - Added functions to handle the aggregation of edits, including case normalization for file paths and summing changes across multiple edits. - Enhanced the diff rendering to support multiple edits on the same file, ensuring that the openDiff reflects the full range of changes. - Updated tests to cover new functionality, including handling of shell delete commands and ensuring correct behavior for multi-edit scenarios. - Refactored existing tests to accommodate the new summary feature and ensure comprehensive coverage of edge cases.
- Introduced `turnBaselines` message type to handle host-side file baselines. - Added support for viewing deleted files and undoing changes per file or all files in a turn. - Captured first-touch snapshots of files before mutations occur, enabling restoration of previous states. - Enhanced UI to display "Undo all" and "View" buttons for files based on baseline metadata. - Implemented helper functions for parsing shell delete commands and managing baseline data. - Added tests for baseline functionality, including normalization, parsing, and archival behavior.
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.
Summary
Closes #82.
Adds a Changed N files card at the end of (and during) each agent turn that mutates the workspace:
Remove-Item/rmincluded), with path-deduped+N −McountsHow it works
type:"diff"blocks still drive per-tool rows and the summary listfs/write_text_file, or sync read before a shell deletePure helpers live in
src/file-baseline.tsandaggregateTurnEditsinmedia/webview-helpers.js. Deep dive:research/edit-diff.md§ Turn-level.Test plan
npm test— 1457 tests greenOut of scope (v1)
sed/mv)