feat: debug logging for tool calls

This commit is contained in:
Zoe
2026-09-19 15:19:50 -05:00
parent 1a4e4d0a97
commit c49f228847
+5 -2
View File
@@ -77,8 +77,11 @@ async function main(): Promise<void> {
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<void> {
}
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 {