Revert "feat: group all tools in single spoiler with names in summary"
This reverts commit 28992f8657.
This commit is contained in:
parent
28992f8657
commit
53e77e0608
15
index.ts
15
index.ts
|
|
@ -330,22 +330,19 @@ async function runPlugin(ctx: any, options: any, dataDir: string) {
|
||||||
parts.push(`<details>\n<summary>Thinking</summary>\n\n${step.reasoning}\n\n</details>`)
|
parts.push(`<details>\n<summary>Thinking</summary>\n\n${step.reasoning}\n\n</details>`)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tool calls — all in one spoiler with tool names in summary
|
// Tool calls
|
||||||
if (step.tools.length > 0) {
|
if (step.tools.length > 0) {
|
||||||
const toolNames = step.tools.map(t => t.name).join(", ")
|
|
||||||
parts.push(`<details>\n<summary>🔧 ${toolNames}</summary>\n\n`)
|
|
||||||
for (const tool of step.tools) {
|
for (const tool of step.tools) {
|
||||||
parts.push(`<b>${tool.name}</b>\n`)
|
parts.push(`<details>\n<summary>🔧 ${tool.name}</summary>\n\n`)
|
||||||
parts.push(`<b>Args:</b>\n\`\`\`\n${tool.args}\n\`\`\`\n`)
|
parts.push(`<b>Args:</b>\n\`\`\`\n${tool.args}\n\`\`\`\n\n`)
|
||||||
if (tool.failed) {
|
if (tool.failed) {
|
||||||
parts.push(`<b>Failed:</b> ${tool.result}\n`)
|
parts.push(`<b>Failed:</b> ${tool.result}\n\n`)
|
||||||
} else {
|
} else {
|
||||||
parts.push(`<b>Result:</b>\n\`\`\`\n${tool.result}\n\`\`\`\n`)
|
parts.push(`<b>Result:</b>\n\`\`\`\n${tool.result}\n\`\`\`\n\n`)
|
||||||
}
|
|
||||||
parts.push("\n")
|
|
||||||
}
|
}
|
||||||
parts.push(`</details>`)
|
parts.push(`</details>`)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Separator before text
|
// Separator before text
|
||||||
if (step.text) {
|
if (step.text) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue