mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 17:01:02 +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
|
|
@ -83,8 +83,9 @@ export class ToolExecutionComponent extends Container {
|
|||
const textBlocks = this.result.content?.filter((c: any) => c.type === "text") || [];
|
||||
const imageBlocks = this.result.content?.filter((c: any) => c.type === "image") || [];
|
||||
|
||||
// Strip ANSI codes from raw output (bash may emit colors/formatting)
|
||||
let output = textBlocks.map((c: any) => stripAnsi(c.text || "")).join("\n");
|
||||
// Strip ANSI codes and carriage returns from raw output
|
||||
// (bash may emit colors/formatting, and Windows may include \r)
|
||||
let output = textBlocks.map((c: any) => stripAnsi(c.text || "").replace(/\r/g, "")).join("\n");
|
||||
|
||||
// Add indicator for images
|
||||
if (imageBlocks.length > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue