From 53794d78f23fe1f92b89a289e5ee4ec83a059b23 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sat, 13 Dec 2025 23:15:56 +0100 Subject: [PATCH] Update existing tool components when toggling show-images setting --- .../src/modes/interactive/components/tool-execution.ts | 5 +++++ .../src/modes/interactive/interactive-mode.ts | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/packages/coding-agent/src/modes/interactive/components/tool-execution.ts b/packages/coding-agent/src/modes/interactive/components/tool-execution.ts index b5b3849f..27c6f567 100644 --- a/packages/coding-agent/src/modes/interactive/components/tool-execution.ts +++ b/packages/coding-agent/src/modes/interactive/components/tool-execution.ts @@ -80,6 +80,11 @@ export class ToolExecutionComponent extends Container { this.updateDisplay(); } + setShowImages(show: boolean): void { + this.showImages = show; + this.updateDisplay(); + } + private updateDisplay(): void { const bgFn = this.result ? this.result.isError diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.ts index 13918eac..2603e8bf 100644 --- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts +++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts @@ -1674,6 +1674,14 @@ export class InteractiveMode { this.settingsManager.setShowImages(newValue); this.showStatus(`Inline images: ${newValue ? "on" : "off"}`); this.chatContainer.removeChild(selector); + + // Update all existing tool execution components with new setting + for (const child of this.chatContainer.children) { + if (child instanceof ToolExecutionComponent) { + child.setShowImages(newValue); + } + } + this.ui.setFocus(this.editor); this.ui.requestRender(); };