mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 04:01:56 +00:00
Release v0.25.2
This commit is contained in:
parent
d07d784ed3
commit
299986f06b
12 changed files with 54 additions and 41 deletions
|
|
@ -44,6 +44,7 @@ export class ToolExecutionComponent extends Container {
|
|||
private contentBox?: Box; // Only used for custom tools
|
||||
private contentText: Text; // For built-in tools (with its own padding/bg)
|
||||
private imageComponents: Image[] = [];
|
||||
private imageSpacers: Spacer[] = [];
|
||||
private toolName: string;
|
||||
private args: any;
|
||||
private expanded = false;
|
||||
|
|
@ -173,6 +174,10 @@ export class ToolExecutionComponent extends Container {
|
|||
this.removeChild(img);
|
||||
}
|
||||
this.imageComponents = [];
|
||||
for (const spacer of this.imageSpacers) {
|
||||
this.removeChild(spacer);
|
||||
}
|
||||
this.imageSpacers = [];
|
||||
|
||||
if (this.result) {
|
||||
const imageBlocks = this.result.content?.filter((c: any) => c.type === "image") || [];
|
||||
|
|
@ -180,7 +185,9 @@ export class ToolExecutionComponent extends Container {
|
|||
|
||||
for (const img of imageBlocks) {
|
||||
if (caps.images && this.showImages && img.data && img.mimeType) {
|
||||
this.addChild(new Spacer(1));
|
||||
const spacer = new Spacer(1);
|
||||
this.addChild(spacer);
|
||||
this.imageSpacers.push(spacer);
|
||||
const imageComponent = new Image(
|
||||
img.data,
|
||||
img.mimeType,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue