Conversation
slarse
force-pushed
the
skip-syntax-highlighting-for-agent
branch
from
September 18, 2026 09:46
054e027 to
0ea35a1
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved review issues were identified.
Pull request overview
Optimizes but diff for agent output by skipping syntax highlighting while preserving diff colors and layout.
Changes:
- Selects plain rendering for agent mode.
- Adds tab expansion support.
- Adds human and agent snapshot coverage.
File summaries
| File | Description |
|---|---|
crates/but/tests/but/command/snapshots/diff/human-syntax.stdout.term.svg |
Human syntax-highlighted output snapshot. |
crates/but/tests/but/command/snapshots/diff/agent-no-syntax.stdout.term.svg |
Uncommitted agent output snapshot. |
crates/but/tests/but/command/snapshots/diff/agent-committed-no-syntax.stdout.term.svg |
Committed agent output snapshot. |
crates/but/tests/but/command/diff.rs |
Agent rendering regression tests. |
crates/but/src/utils/diff_rendering.rs |
Tab expansion support for plain rendering. |
crates/but/src/command/legacy/diff.rs |
Selects highlighted or plain rendering based on agent mode. |
Review details
- Files reviewed: 3/6 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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.
Vibed, not yet looked through this. But we should save plenty of performance in
but diffby not syntax highlighting.Benchmarks will include AI output mode from tomorrow's run, so this should go in at the very earliest after that.