feat: add setToolsExpanded and getToolsExpanded to ExtensionsUIContext

This commit is contained in:
Esteban Beltran 2026-02-02 19:25:00 +01:00
parent df5b0f76c0
commit ca62c44775
No known key found for this signature in database
4 changed files with 25 additions and 2 deletions

View file

@ -1396,6 +1396,8 @@ export class InteractiveMode {
}
return result;
},
getToolsExpanded: () => this.toolOutputExpanded,
setToolsExpanded: (expanded) => this.setToolsExpanded(expanded),
};
}
@ -2658,10 +2660,14 @@ export class InteractiveMode {
}
private toggleToolOutputExpansion(): void {
this.toolOutputExpanded = !this.toolOutputExpanded;
this.setToolsExpanded(!this.toolOutputExpanded);
}
private setToolsExpanded(expanded: boolean): void {
this.toolOutputExpanded = expanded;
for (const child of this.chatContainer.children) {
if (isExpandable(child)) {
child.setExpanded(this.toolOutputExpanded);
child.setExpanded(expanded);
}
}
this.ui.requestRender();