feat(cli): make tool output responsive to terminal width
- Add terminal_width module with get_terminal_width(), clip_line(), compress_path(), and compress_command() utilities - Update ConsoleUiWriter to use dynamic terminal width for all tool output - Tool output lines are clipped to fit without wrapping - Tool headers use semantic compression (paths preserve filename, commands clip from right) - 4-character right margin for visual clarity - Minimum 40 columns, default 80 when terminal size unavailable - All truncation is UTF-8 safe (char counting, not byte slicing) - Add 13 unit tests for terminal width utilities
This commit is contained in:
@@ -24,6 +24,7 @@ mod template;
|
||||
mod completion;
|
||||
mod project;
|
||||
mod input_formatter;
|
||||
mod terminal_width;
|
||||
|
||||
use anyhow::Result;
|
||||
use std::path::PathBuf;
|
||||
|
||||
Reference in New Issue
Block a user