From 26cc61d26f3558b6998d825fecc2b8665bacf183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D1=80=D0=BE=D0=B4=D0=B8=D0=BD=20=D0=A0=D0=BE?= =?UTF-8?q?=D0=BC=D0=B0=D0=BD?= Date: Sun, 27 Sep 2026 13:50:22 +0300 Subject: [PATCH] feat: show execute result as spoiler after child tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Порядок когда execute имеет детей: 1. Thinking spoiler 2. Каждый дочерний инструмент с args 3. Execute result spoiler 4. --- separator + step.text --- index.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index aa085c8..2a041fe 100644 --- a/index.ts +++ b/index.ts @@ -579,8 +579,7 @@ async function runPlugin(ctx: any, options: any, dataDir: string) { : [] if (childTools.length > 0) { - // Execute has child tool calls — show only children, skip execute entirely - // (execute result is in step.text, shown after "---") + // Execute has child tool calls — show children, then execute result for (const child of childTools) { parts.push(`
\n🔧 ${child.name}\n\n`) parts.push(`Args:\n\`\`\`\n${child.args}\n\`\`\`\n\n`) @@ -591,6 +590,12 @@ async function runPlugin(ctx: any, options: any, dataDir: string) { } parts.push(`
`) } + // Execute result as a separate spoiler (like a regular tool result) + if (executeTool?.result) { + parts.push(`
\n🔧 execute\n\n`) + parts.push(`Result:\n\`\`\`\n${executeTool.result}\n\`\`\`\n\n`) + parts.push(`
`) + } } else { // No child tool calls — show tools normally (including execute as-is) for (const tool of step.tools) {