fix: include toolName in tool_result entries from turn_end toolResults

The turn_end event includes toolResults array with toolName. Previously
the parsing only included toolCallId, now we also extract toolName so
the UI can display the correct tool name even when tool_result entries
arrive without a preceding tool_call.
This commit is contained in:
Richard Anaya
2026-03-18 20:57:32 -07:00
parent aa854e7efe
commit 47a6d86174

View File

@@ -77,6 +77,7 @@ export function parsePiStdoutLine(line: string, ts: string): TranscriptEntry[] {
kind: "tool_result",
ts,
toolUseId: asString(tr.toolCallId, "unknown"),
toolName: asString(tr.toolName),
content: contentStr,
isError,
});