mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-18 08:02:48 +00:00
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:
parent
31f4a588fd
commit
7ad8a8c447
5 changed files with 163 additions and 58 deletions
|
|
@ -815,6 +815,7 @@ export class InteractiveMode {
|
|||
showImages: this.settingsManager.getShowImages(),
|
||||
},
|
||||
this.customTools.get(content.name)?.tool,
|
||||
this.ui,
|
||||
);
|
||||
this.chatContainer.addChild(component);
|
||||
this.pendingTools.set(content.id, component);
|
||||
|
|
@ -862,6 +863,7 @@ export class InteractiveMode {
|
|||
showImages: this.settingsManager.getShowImages(),
|
||||
},
|
||||
this.customTools.get(event.toolName)?.tool,
|
||||
this.ui,
|
||||
);
|
||||
this.chatContainer.addChild(component);
|
||||
this.pendingTools.set(event.toolCallId, component);
|
||||
|
|
@ -1101,6 +1103,7 @@ export class InteractiveMode {
|
|||
showImages: this.settingsManager.getShowImages(),
|
||||
},
|
||||
this.customTools.get(content.name)?.tool,
|
||||
this.ui,
|
||||
);
|
||||
this.chatContainer.addChild(component);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue