Repository navigation
Conversation
Changes showed a diff but gave no way to say anything about it: feedback on a change meant retyping the path, the line and the code into the composer. Select a line number in a diff to write a note on that line; Shift-select a second number in the same hunk to cover the lines between. Notes stay under their last line, can be edited and deleted, and collect across files in a bar under the diff. Send notes writes all of them into one message for the chosen agent: the file and line in the form messages already link (`src/a.ts:12`), the diff lines, and the comment. Notes are kept in the browser per workspace, so opening another file or reloading does not lose them. They are cleared when the message is accepted and kept when sending fails. A note whose lines have left the diff stays in the list and is still sent with the lines it was written on. Changes still never writes to Git.
…ng lines Checked against a real repository, a note on a file at the workspace root was written as `README.md:12`, which a message does not take for a path, so it was not a link. Such a file is now written as `./README.md:12`. A note on a minified or generated line put the whole line into the message. A snippet line is now cut at 240 characters and says how many were left out.
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.
What
In the workspace Changes view, a user can now leave notes on diff lines and send them to an agent as one message, instead of describing each location by hand.
path:line(orpath:12-18), the diff snippet and the note. References reuse the existing message path linking, so they become clickable file links in chat.The second commit fixes two issues found against a real repository: a file at the workspace root is written as
./added.md:4so chat links it (the path parser needs a directory), and each snippet line is cut to 240 characters with a note of how many were left out, so a 5,000-character line no longer produces a 5.8 KB message.New logic lives in
web/src/features/diffNotes/(model, store, widgets, bar, hook);WorkspaceDiffViewer.tsxonly gains the wiring.Verification
diffNotesModel,diffNotesStoreandWorkspaceDiffViewer.notes. The viewer tests fail without the wiring; the root-path and long-line tests fail on the first commit.scripts/quality_gate.sh faston this branch passes; the diff-notes and workspace test files pass on this base (204 tests)./workspace/changesand/workspace/diffendpoints in an isolated instance: two hunks in one file, an added (staged) file, a deleted file, a rename with edits, a 5,000-character line and a Chinese file name. Every reference in the sent message was compared with the file on disk (and withHEADfor the deleted file) and matched. Sending was also done from a 390 px phone layout.