mirror of
https://github.com/instructkr/claude-code.git
synced 2026-04-03 17:38:49 +03:00
Extend the CLI renderer's generic tool-result path to reuse the existing display-only truncation helper, so large plugin or unknown-tool payloads no longer flood the terminal while the original tool result still flows through runtime/session state unchanged. The renderer now pretty-prints structured fallback payloads before truncating them for display, and the test suite covers both Read output and generic long tool output rendering. I also added a narrow clippy allow on an oversized slash-command parser test so the workspace lint gate stays green during verification. Constraint: Tool result truncation must affect screen rendering only, not stored tool output Rejected: Truncate tool results at execution time | would lose session fidelity and break downstream consumers Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep future tool-output shortening in renderer helpers only; do not trim runtime tool payloads before persistence Tested: cargo fmt --all; cargo clippy --workspace --all-targets -- -D warnings; cargo test --workspace Not-tested: Manual interactive terminal run showing truncation in a live REPL session