From 8b72d98463b661eba1cdc2643f634a68ce89b5e5 Mon Sep 17 00:00:00 2001 From: tylerslaton Date: Thu, 17 Oct 2024 13:47:09 -0400 Subject: [PATCH] fix: remove id from event stream messages This is a fix for issue #223. The event stream for messages included a new id entry that was not expected by the client. Signed-off-by: tylerslaton --- ui/admin/app/lib/stream.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;