• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

futpib-bot / claugrep / 23593317532

26 Mar 2026 12:04PM UTC coverage: 89.639% (+2.8%) from 86.848%
23593317532

push

github

web-flow
feat: add --diff/-d flag for Edit tool unified diff view (#17)

* feat: add --diff/-d flag to search for Edit tool unified diff view

When `--diff` is passed alongside `--tool-use`, any match against an Edit
tool call is rendered as a unified diff instead of the raw key/value format:

  --- a/src/lib.rs
  +++ b/src/lib.rs
  @@ -1,2 +1,2 @@
  -fn old_name() {}
  +fn new_name() {}

Non-Edit matches (Bash, Read, user messages, etc.) are unaffected.

- Parser: adds `EditDiff` struct and populates `edit_diff` on `ExtractedContent`
  for Edit tool calls that have all three fields (file_path, old_string, new_string)
- Search: carries `edit_diff` through to `SearchMatch`; adds `diff_mode` to options
- Output: adds `format_diff` rendering old lines with `-` and new lines with `+`,
  with ANSI colour (red/green); match highlights still work inside diff lines
- Main: wires `--diff`/`-d` flag through to the rendering path
- Tests: 8 new e2e tests covering the diff format, 3 new unit tests in parser
  and 4 new unit tests in output

Closes #16

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: make diff default for Edit matches; add --no-diff; remove claudex search refs

- Diff is now the default rendering for Edit tool-use matches — no flag needed
- Add --no-diff flag to get the old raw key/value (file_path / old_string /
  new_string) format
- README: remove 'Feature parity with claudex' section; document --no-diff and
  the Edit diff behaviour in the options table
- main.rs: update --account description to drop 'claudex' phrasing
- e2e tests: remove --diff from all test args (diff is now default); rename
  test_diff_without_flag → test_no_diff_flag_shows_raw_format and add
  --no-diff arg; update comments
- integration.rs: update comment that referenced 'claudex search'

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: use similar + console for proper unified diff with TTY-aware colors

- Replace hand-rolled diff with `similar... (continued)

285 of 292 new or added lines in 4 files covered. (97.6%)

85 existing lines in 4 files now uncovered.

1540 of 1718 relevant lines covered (89.64%)

15.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

86.48
/src/parser.rs


Build SHA Not Found

The commit SHA "495f1ebc6677c805527675aa72d15f21271ef8ef" was not found in your repository, so the file cannot be loaded. This may be because you posted from a local development environment, or your CI created an ephemeral commit.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc