From c49f228847d98148cdea071971e4fa013adb3670 Mon Sep 17 00:00:00 2001 From: Zoe Date: Sat, 19 Sep 2026 15:19:50 -0500 Subject: [PATCH] feat: debug logging for tool calls --- src/agent.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/agent.ts b/src/agent.ts index 2ec5923..01e7122 100644 --- a/src/agent.ts +++ b/src/agent.ts @@ -77,8 +77,11 @@ async function main(): Promise { console.log(`Model turn ${turn + 1}`); const response = await complete(config, await context(), toolDefinitions, controller.signal); append(response); + if (response.reasoning_content) { + console.log(`Thinking:\n${response.reasoning_content}`); + } if (response.content) { - console.log(response.content); + console.log(`Response:\n${response.content}`); } const calls = response.tool_calls ?? []; if (mode === "probe") { @@ -100,7 +103,7 @@ async function main(): Promise { } database.prepare("INSERT INTO operations (run_id, call_id, name, arguments, status) VALUES (?, ?, ?, ?, 'started')") .run(id, call.id, call.function.name, call.function.arguments); - console.log(`Tool: ${call.function.name}`); + console.log(`Tool: ${call.function.name}\nArguments: ${call.function.arguments}`); let result: unknown; let state = "succeeded"; try {