diff --git a/ui/admin/app/lib/stream.ts b/ui/admin/app/lib/stream.ts index 686d2375..a453471b 100644 --- a/ui/admin/app/lib/stream.ts +++ b/ui/admin/app/lib/stream.ts @@ -39,7 +39,10 @@ export async function readStream({ // Process complete messages for (const message of messages) { - const dataString = message.replace(/^data: /, "").trim(); + const dataString = message + .replace(/^id:.*\n/, "") + .replace(/^data: /, "") + .trim(); if (dataString) { try { const data = JSON.parse(dataString) as T;