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