Repository navigation
feat: add line comments to the diff that go back to the agent as one message - #122
Merged
abhishekgahlot2 merged 4 commits intoNov 6, 2026
Merged
Conversation
Contributor
|
recheck |
|
All contributors have signed the CLA ✍️ ✅ |
Contributor
Author
|
@abhishekgahlot2 I have updated the branch, can you please review this PR now |
Send comments used the composer prefill, which replaces the draft, so a reply the user had started (and its saved draft) was overwritten by the review message. The prefill now takes an append option: the Diff pane asks for it and the composer adds the review under a non-empty draft. Ask agent to redo still replaces the draft.
Contributor
|
Merged, thanks @Asymtode712. Commenting on diff lines and sending them back as one review message is a great workflow. I added a small follow-up so Send comments adds the review under a half-written reply instead of replacing it. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #89
What
Comment on lines of the agent's diff, like a pull request review, and send all the comments back as the next message.
diffblock, then the comment) and puts it in the reply composer, focused, using the same prefill path as "Ask agent to redo". The drafts are then cleared.How
session-ui/diff-review.ts: the draft store (useSyncExternalStore, keyed by thread id) andbuildReviewMessage, a pure function. The quoted code's fence grows past any backticks inside it.session-ui/diff-line-comments.tsx:CommentableHunk(selection, comment form, saved comments) andReviewBar.file-diff-view.tsx: diff lines now carryoldLine/newLinewhen the recorded payload has them (a numbered@@header, or a Write's whole body), shown in a gutter. Edit-tool changes record no position, so they stay unnumbered and the message says so instead of guessing. Comments are on only when areviewtarget is passed in.diff-pane.tsx: passes the thread id and the composer prefill. The lab page and anything without a composer render the diff as before.Notes
session-view.tsxis unchanged.Testing
diff-review.test.ts: building the follow-up message (paths, line ranges, quoted code, ordering, singular wording, fence escaping) and the new line numbering.file-diff-view.test.tsx: lines take comments only when a review target exists.bun run typecheck,bun run lintandbun test componentspass, except the existing terminal-parser test that also fails on main.Screenshots
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.