From cf7462f1cb44ea36a74fef30563838c261b47f98 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Tue, 14 Apr 2026 20:14:52 -0300 Subject: [PATCH] fix: ensure each bot response creates a new message element --- ui/suite/chat/chat.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/suite/chat/chat.html b/ui/suite/chat/chat.html index 161a84a..2114920 100644 --- a/ui/suite/chat/chat.html +++ b/ui/suite/chat/chat.html @@ -817,6 +817,15 @@ function finalizeStreaming() { } function processMessage(data) { + // Ensure each bot response creates a new message element + // If we're still streaming from a previous response, finalize it first + if (isStreaming && streamingMessageId) { + finalizeStreaming(); + isStreaming = false; + streamingMessageId = null; + currentStreamingContent = ""; + } + // Strip any remaining GPT-oSS thinking content from display // These should have been filtered by botserver, but remove any that slip through if (data.content && typeof data.content === "string") { @@ -830,7 +839,7 @@ function processMessage(data) { data.content = content; } - if (data.is_complete) { + if (data.is_complete) { if (isStreaming) { finalizeStreaming(); } else {