From 033a4b704ece2c9fc13a1ddda80bdafe519dc8d0 Mon Sep 17 00:00:00 2001 From: can1357 Date: Sun, 26 Apr 2026 01:22:22 +0200 Subject: [PATCH] fix(coding-agent/exec): adjusted minimized output artifact handling and footer text - Guarded minimized output handling so the minimized text was only applied when it changed from the original output. - Replaced the artifact footer text with a shorter `[full result: artifact://...]` marker when a minimized save artifact was created. --- packages/coding-agent/src/exec/bash-executor.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/coding-agent/src/exec/bash-executor.ts b/packages/coding-agent/src/exec/bash-executor.ts index 379067516..7c6ecf190 100644 --- a/packages/coding-agent/src/exec/bash-executor.ts +++ b/packages/coding-agent/src/exec/bash-executor.ts @@ -239,7 +239,7 @@ export async function executeBash(command: string, options?: BashExecutorOptions // artifact, and splice an `artifact://` footer into the visible text so // the agent can retrieve the raw bytes losslessly. const minimized = winner.result.minimized; - if (minimized) { + if (minimized && minimized.text !== minimized.originalText) { sink.replace(minimized.text); if (options?.onMinimizedSave) { const artifactId = await options.onMinimizedSave(minimized.originalText, { @@ -248,9 +248,7 @@ export async function executeBash(command: string, options?: BashExecutorOptions outputBytes: minimized.outputBytes, }); if (artifactId) { - sink.push( - `\n… full output: artifact://${artifactId} (${minimized.inputBytes} → ${minimized.outputBytes} bytes)\n`, - ); + sink.push(`\n[full result: artifact://${artifactId}]\n`); } } }