From 0caab2e9ea2a4591418aebe6a3d68fdd4a5b1d03 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Wed, 21 Jun 2023 14:05:22 -0300 Subject: [PATCH] Refactor buildTrigger event handling to handle end-of-stream event properly This commit refactors buildTrigger event handling to ensure that end-of-stream events are handled by closing the connection without logging them. --- .../src/components/chatComponent/buildTrigger/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/components/chatComponent/buildTrigger/index.tsx b/src/frontend/src/components/chatComponent/buildTrigger/index.tsx index dd05528aa..f3f5518c5 100644 --- a/src/frontend/src/components/chatComponent/buildTrigger/index.tsx +++ b/src/frontend/src/components/chatComponent/buildTrigger/index.tsx @@ -83,7 +83,7 @@ export default function BuildTrigger({ // if the event is the end of the stream, close the connection if (parsedData.end_of_stream) { eventSource.close(); - + return; } else if (parsedData.log) { // If the event is a log, log it