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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user