fix: use correct path to usage in meta
Usage is at result.meta.agentMeta.usage, not result.meta.usage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0fbe3ac29e
commit
5eeac66824
@ -492,7 +492,7 @@ export async function agentCommand(
|
|||||||
content: [{ type: "text", text: result.payloads[0].text }],
|
content: [{ type: "text", text: result.payloads[0].text }],
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
stopReason: "cli",
|
stopReason: "cli",
|
||||||
usage: result.meta?.usage ?? { input: 0, output: 0, totalTokens: 0 },
|
usage: result.meta?.agentMeta?.usage ?? { input: 0, output: 0, totalTokens: 0 },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
fs.appendFileSync(transcriptPath, JSON.stringify(messageEntry) + "\n", "utf-8");
|
fs.appendFileSync(transcriptPath, JSON.stringify(messageEntry) + "\n", "utf-8");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user