mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-19 12:04:08 +00:00
Fix Windows terminal background rendering and add /debug command
- Strip carriage return characters from bash tool output to fix background padding on Windows - Add hidden /debug command to write rendered lines to debug log for TUI debugging - Document /debug command in README.md development section
This commit is contained in:
parent
4432fc9b72
commit
7b1f975ca1
3 changed files with 63 additions and 3 deletions
|
|
@ -1156,6 +1156,19 @@ import { getPackageDir, getThemeDir, getPackageJsonPath, getReadmePath, getChang
|
|||
|
||||
**Never use `__dirname` directly** for resolving package assets. The `paths.ts` module handles the differences between execution modes automatically.
|
||||
|
||||
### Debug Command
|
||||
|
||||
The `/debug` command is a hidden development feature (not shown in autocomplete) that writes all currently rendered lines with their visible widths and ANSI escape sequences to `~/.pi/agent/pi-debug.log`. This is useful for debugging TUI rendering issues, especially when lines don't extend to the terminal edge or contain unexpected invisible characters.
|
||||
|
||||
```
|
||||
/debug
|
||||
```
|
||||
|
||||
The debug log includes:
|
||||
- Terminal width at time of capture
|
||||
- Total number of rendered lines
|
||||
- Each line with its index, visible width, and JSON-escaped content showing all ANSI codes
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue