pi: parse turn_end streams

This commit is contained in:
Peter Steinberger committed 2025-12-10 11:31:28 +00:00
1 parent cce65e19e1
commit 81385cf820
2 files changed
+69 -38

No files matched your search

+3
View File
@@ -46,6 +46,9 @@ function stripRpcNoise(raw: string): string {
const msgType = msg?.type;
const role = msg?.role;
// Drop early lifecycle frames; we only want final assistant/tool outputs.
if (type === "message_start") continue;
// RPC streaming emits one message_update per delta; skip them to avoid flooding fallbacks.
if (type === "message_update") continue;