mirror of
https://github.com/instructkr/claude-code.git
synced 2026-04-03 15:28:51 +03:00
Some tools, especially Read, can emit very large payloads that overwhelm the interactive renderer. This change truncates only the displayed preview for long tool outputs while leaving the underlying tool result string untouched for downstream logic and persisted session state. Constraint: Rendering changes must not modify stored tool outputs or tool-result messages Rejected: Truncate tool output before returning from the executor | would corrupt session history and downstream processing Confidence: high Scope-risk: narrow Directive: Keep truncation strictly in presentation helpers; do not move it into tool execution or session persistence paths Tested: cargo test -p rusty-claude-cli tool_rendering_truncates_ -- --nocapture; cargo test -p rusty-claude-cli tool_rendering_helpers_compact_output -- --nocapture Not-tested: Manual terminal rendering with real multi-megabyte tool output