From 28992f86577c4b9d7581908ab7909bc09a96474e 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: Sat, 26 Sep 2026 11:32:14 +0300 Subject: [PATCH] feat: group all tools in single spoiler with names in summary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Раньше: каждый инструмент — отдельный
. Теперь: один
с именами всех инструментов в summary, каждый инструмент внутри с toolName заголовком. --- index.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/index.ts b/index.ts index 9d11179..f958e86 100644 --- a/index.ts +++ b/index.ts @@ -330,18 +330,21 @@ async function runPlugin(ctx: any, options: any, dataDir: string) { parts.push(`
\nThinking\n\n${step.reasoning}\n\n
`) } - // Tool calls + // Tool calls — all in one spoiler with tool names in summary if (step.tools.length > 0) { + const toolNames = step.tools.map(t => t.name).join(", ") + parts.push(`
\n🔧 ${toolNames}\n\n`) for (const tool of step.tools) { - parts.push(`
\n🔧 ${tool.name}\n\n`) - parts.push(`Args:\n\`\`\`\n${tool.args}\n\`\`\`\n\n`) + parts.push(`${tool.name}\n`) + parts.push(`Args:\n\`\`\`\n${tool.args}\n\`\`\`\n`) if (tool.failed) { - parts.push(`Failed: ${tool.result}\n\n`) + parts.push(`Failed: ${tool.result}\n`) } else { - parts.push(`Result:\n\`\`\`\n${tool.result}\n\`\`\`\n\n`) + parts.push(`Result:\n\`\`\`\n${tool.result}\n\`\`\`\n`) } - parts.push(`
`) + parts.push("\n") } + parts.push(`
`) } // Separator before text