From 8673426d5c2847a1bf4a3392ce7fa2816263e077 Mon Sep 17 00:00:00 2001 From: xuewenjie Date: Tue, 16 Dec 2025 10:26:20 +0800 Subject: [PATCH] fix(core): use current chunk for shell output update instead of cumulative --- packages/core/src/tools/shell.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/core/src/tools/shell.ts b/packages/core/src/tools/shell.ts index a886010d..194de4e8 100644 --- a/packages/core/src/tools/shell.ts +++ b/packages/core/src/tools/shell.ts @@ -193,11 +193,7 @@ export class ShellToolInvocation extends BaseToolInvocation< switch (event.type) { case 'data': if (isBinaryStream) break; - if (typeof cumulativeOutput === 'string') { - cumulativeOutput += event.chunk; - } else { - cumulativeOutput = event.chunk; - } + cumulativeOutput = event.chunk; shouldUpdate = true; break; case 'binary_detected':