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 {