diff --git a/index.ts b/index.ts index f958e86..9d11179 100644 --- a/index.ts +++ b/index.ts @@ -330,21 +330,18 @@ async function runPlugin(ctx: any, options: any, dataDir: string) { parts.push(`
\nThinking\n\n${step.reasoning}\n\n
`) } - // Tool calls — all in one spoiler with tool names in summary + // Tool calls 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(`${tool.name}\n`) - parts.push(`Args:\n\`\`\`\n${tool.args}\n\`\`\`\n`) + parts.push(`
\n🔧 ${tool.name}\n\n`) + parts.push(`Args:\n\`\`\`\n${tool.args}\n\`\`\`\n\n`) if (tool.failed) { - parts.push(`Failed: ${tool.result}\n`) + parts.push(`Failed: ${tool.result}\n\n`) } else { - parts.push(`Result:\n\`\`\`\n${tool.result}\n\`\`\`\n`) + parts.push(`Result:\n\`\`\`\n${tool.result}\n\`\`\`\n\n`) } - parts.push("\n") + parts.push(`
`) } - parts.push(`
`) } // Separator before text