Fix bash tool visual line truncation

Use visual line counting (accounting for line wrapping) instead of logical
line counting for bash tool output in collapsed mode. Now consistent with
bash-execution.ts behavior.

- Add shared truncateToVisualLines utility
- Update tool-execution.ts to use Box for bash with visual truncation
- Update bash-execution.ts to use shared utility
- Pass TUI to ToolExecutionComponent for terminal width access

Fixes #275
This commit is contained in:
Mario Zechner 2025-12-22 17:01:04 +01:00
parent 31f4a588fd
commit 7ad8a8c447
5 changed files with 163 additions and 58 deletions

View file

@ -2,6 +2,10 @@
## [Unreleased]
### Fixed
- **Bash tool visual line truncation**: Fixed bash tool output in collapsed mode to use visual line counting (accounting for line wrapping) instead of logical line counting. Now consistent with bash-execution.ts behavior. Extracted shared `truncateToVisualLines` utility. ([#275](https://github.com/badlogic/pi-mono/issues/275))
## [0.26.1] - 2025-12-22
### Fixed