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:
@@ -77,6 +77,7 @@ export function parsePiStdoutLine(line: string, ts: string): TranscriptEntry[] {
|
|||||||
kind: "tool_result",
|
kind: "tool_result",
|
||||||
ts,
|
ts,
|
||||||
toolUseId: asString(tr.toolCallId, "unknown"),
|
toolUseId: asString(tr.toolCallId, "unknown"),
|
||||||
|
toolName: asString(tr.toolName),
|
||||||
content: contentStr,
|
content: contentStr,
|
||||||
isError,
|
isError,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user