feat: include diff context in comment text output - #455
Conversation
|
Implementation and tests look great. One thing to confirm: since |
|
Thanks for the review and for catching this! You're right, I overlooked this broader effect when describing the PR. The current implementation also appends The full comparison header remains specific to Structured JSON and stored comments remain unchanged. I updated the PR description to make this scope explicit. The existing |
|
After the review I kept thinking about the notation myself, and here is the format I would like to land on. 1. Side marker: only mark the old side, with
No marker for new-side and legacy comments. This applies to all the text outputs (copy prompts, Ctrl+C output, 2. Header: git range notation instead of
Sorry for the back and forth after my initial comments, and thanks again for the solid implementation and tests! レビュー後に自分でも記法をどうするか考えていて、最終的にこの形に落ち着けたいです。 1. side は old 側だけ
2. ヘッダーは git のレンジ記法に 直接比較は 初回レビュー後の追加注文になってしまってすみません。実装とテストがしっかりしているので、この変更もスムーズに入ると思っています! |
f15a67c to
9d12def
Compare
|
Thanks for the feedback. I agree that this keeps the output less noisy and more natural. I was focused on adding the extra context and missed the readability aspect :) I've adjusted the implementation and PR description accordingly. |
|
@l0stplains Thank you!! |

Closes #454
Summary
(old)inCopy Prompt,Copy All Prompt, the text API, CLI text output, and terminal shutdown output.Copy All Promptusing Git range notation.The human-readable output remains neutral so it can be used by people and tools without prescribing what to do with the comments.
The old-side marker is part of each comment location, so it appears in every human-readable output. The comparison header remains specific to
Copy All Prompt, which is the aggregate export path with access to the displayed diff metadata. Adding it elsewhere would require broader metadata plumbing and output-contract changes, which are outside the scope of this PR.Implementation notes
Apppasses the existingDiffResponseselection metadata through theCopy All Promptpath...; merge-base comparisons use....working,staged,., and stdin-backed diffs).position.side.Copy Prompt
Before
After
Copy All Prompt
Before
After
Direct comparisons use the same format with
... Working-tree and stdin-backed comparisons omit the header.Human-readable comment output
This output is shared by
/api/comments-output,difit comment get --format text, and terminal shutdown output.Before
After
Test plan
pnpm check,pnpm format, andpnpm knippnpm test(856 passed, 2 skipped)pnpm buildCopy PromptandCopy All Promptfor old/new comments and direct/merge-base/working-tree comparisons/api/comments-outputcoverage to assert the old-side marker and unchanged new-side output