mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 16:00:58 +00:00
Release v0.7.26
This commit is contained in:
parent
4afb3231e4
commit
11aa39c5e4
13 changed files with 72 additions and 31 deletions
|
|
@ -127,6 +127,7 @@ export class ToolExecutionComponent extends Container {
|
|||
private contentText: Text;
|
||||
private toolName: string;
|
||||
private args: any;
|
||||
private expanded = false;
|
||||
private result?: {
|
||||
content: Array<{ type: string; text?: string; data?: string; mimeType?: string }>;
|
||||
isError: boolean;
|
||||
|
|
@ -158,6 +159,11 @@ export class ToolExecutionComponent extends Container {
|
|||
this.updateDisplay();
|
||||
}
|
||||
|
||||
setExpanded(expanded: boolean): void {
|
||||
this.expanded = expanded;
|
||||
this.updateDisplay();
|
||||
}
|
||||
|
||||
private updateDisplay(): void {
|
||||
const bgColor = this.result
|
||||
? this.result.isError
|
||||
|
|
@ -201,7 +207,7 @@ export class ToolExecutionComponent extends Container {
|
|||
const output = this.getTextOutput().trim();
|
||||
if (output) {
|
||||
const lines = output.split("\n");
|
||||
const maxLines = 5;
|
||||
const maxLines = this.expanded ? lines.length : 5;
|
||||
const displayLines = lines.slice(0, maxLines);
|
||||
const remaining = lines.length - maxLines;
|
||||
|
||||
|
|
@ -218,7 +224,7 @@ export class ToolExecutionComponent extends Container {
|
|||
if (this.result) {
|
||||
const output = this.getTextOutput();
|
||||
const lines = output.split("\n");
|
||||
const maxLines = 10;
|
||||
const maxLines = this.expanded ? lines.length : 10;
|
||||
const displayLines = lines.slice(0, maxLines);
|
||||
const remaining = lines.length - maxLines;
|
||||
|
||||
|
|
@ -240,7 +246,7 @@ export class ToolExecutionComponent extends Container {
|
|||
|
||||
// Show first 10 lines of content if available
|
||||
if (fileContent) {
|
||||
const maxLines = 10;
|
||||
const maxLines = this.expanded ? lines.length : 10;
|
||||
const displayLines = lines.slice(0, maxLines);
|
||||
const remaining = lines.length - maxLines;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue