fix(query): keep tool turns active until final stop#10
Merged
Conversation
Full-row red/green tint for removed/added lines (gutter, marker, and content), brighter saturated bg on inline word-level changes, soft brand-consistent fg colors, and a single-line slate hunk header that no longer doubles the @@ prefix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Two focused changes:
fix(query): keep tool turns active until final stop— extractsshould_emit_turn_complete(stop, max_tokens_recovery_count)soQueryEvent::TurnCompleteno longer fires on intermediatetool_useturns or onmax_tokenswhile we're still inside the recovery window. Adds 3 unit tests covering the predicate.feat(tui): color-coded diffs in Claude Code style— diff viewer renders full-row red/green tints for removed/added lines (gutter + marker + content), brighter saturated bg on inline word-level changes, soft brand-consistent fg colors, and a single-line slate hunk header that no longer doubles the@@prefix.Net diff: 2 files, +186/−49.
Test plan
cargo test -p claurst-tui— diff viewer unit + integration tests green locallyshould_emit_turn_completeunit tests covertool_use,max_tokens(under + at recovery limit), and terminal stop reasons/changesin the TUI on a branch with mixed adds/removes and confirm:@@ -X,Y +A,B @@on a full-width slate band2add182query/turn fix against the original session-turn-complete repro🤖 Generated with Claude Code