feat(cli): accept quote and quote_offset in crit comment --json - #1013
Merged
Merged
Conversation
A line comment from `crit comment --json` could only cover whole lines. The web UI already saves a comment on part of the lines as `quote` (and `quote_offset`); bulk entries can now set the same two fields, so a tool that selects text (a terminal UI, an agent) records exactly what the comment is about. - quote and quote_offset are stored on line comments - either one on a review- or file-level comment is an error - quote_offset needs a quote and must be >= 0 - documented in every crit-cli skill; integration hashes regenerated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1013 +/- ##
==========================================
+ Coverage 75.52% 77.56% +2.03%
==========================================
Files 161 168 +7
Lines 23440 23595 +155
==========================================
+ Hits 17704 18301 +597
+ Misses 4327 3885 -442
Partials 1409 1409
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
crit comment --jsonentries can now setquoteandquote_offseton a line comment. These are the same fields the web UI saves when you comment on a text selection.[{"file": "plan.md", "line": "2-3", "body": "why?", "quote": "read a.go\n2. patch", "quote_offset": 3}]Why
Before this, a CLI comment always covered whole lines. A tool that lets you select part of a line (a terminal review UI, or an agent) had no way to record the exact text, so the review sent to the agent quoted the whole lines.
Rules
quote/quote_offsetare stored on line comments. The whole-lineanchoris still filled in as before.quote needs a line comment). Nothing from the batch is written.quote_offsetneeds aquoteand must be >= 0. It means the same as in the web UI: where the quote starts in the lines' text, with whitespace collapsed.Also
crit-cliskill (all integrations, including the codex plugin copy).integration_hashes_gen.goregenerated withgo generate.Testing
go test ./..., gofmt, golangci-lint: clean.crit commentsshows the quote and anchor, and the review file hasquoteandquote_offset.🤖 Generated with Claude Code