fix(coding-agent): configure inline tool image width

closes #3508
This commit is contained in:
Mario Zechner
2026-04-22 00:56:01 +02:00
parent 780d536727
commit 97a38bf652
6 changed files with 57 additions and 3 deletions

View File

@@ -2633,6 +2633,7 @@ export class InteractiveMode {
content.arguments,
{
showImages: this.settingsManager.getShowImages(),
imageWidthCells: this.settingsManager.getImageWidthCells(),
},
this.getRegisteredToolDefinition(content.name),
this.ui,
@@ -2701,6 +2702,7 @@ export class InteractiveMode {
event.args,
{
showImages: this.settingsManager.getShowImages(),
imageWidthCells: this.settingsManager.getImageWidthCells(),
},
this.getRegisteredToolDefinition(event.toolName),
this.ui,
@@ -3031,7 +3033,10 @@ export class InteractiveMode {
content.name,
content.id,
content.arguments,
{ showImages: this.settingsManager.getShowImages() },
{
showImages: this.settingsManager.getShowImages(),
imageWidthCells: this.settingsManager.getImageWidthCells(),
},
this.getRegisteredToolDefinition(content.name),
this.ui,
this.sessionManager.getCwd(),
@@ -3650,6 +3655,7 @@ export class InteractiveMode {
{
autoCompact: this.session.autoCompactionEnabled,
showImages: this.settingsManager.getShowImages(),
imageWidthCells: this.settingsManager.getImageWidthCells(),
autoResizeImages: this.settingsManager.getImageAutoResize(),
blockImages: this.settingsManager.getBlockImages(),
enableSkillCommands: this.settingsManager.getEnableSkillCommands(),
@@ -3684,6 +3690,14 @@ export class InteractiveMode {
}
}
},
onImageWidthCellsChange: (width) => {
this.settingsManager.setImageWidthCells(width);
for (const child of this.chatContainer.children) {
if (child instanceof ToolExecutionComponent) {
child.setImageWidthCells(width);
}
}
},
onAutoResizeImagesChange: (enabled) => {
this.settingsManager.setImageAutoResize(enabled);
},