diff --git a/ui/suite/chat/chat.html b/ui/suite/chat/chat.html
index 2114920..129b121 100644
--- a/ui/suite/chat/chat.html
+++ b/ui/suite/chat/chat.html
@@ -857,22 +857,25 @@ function processMessage(data) {
) {
renderSuggestions(data.suggestions);
}
- } else {
- if (!isStreaming) {
- isStreaming = true;
- streamingMessageId = "streaming-" + Date.now();
- currentStreamingContent = data.content || "";
- addMessage(
- "bot",
- currentStreamingContent,
- streamingMessageId,
- );
- } else {
- currentStreamingContent += data.content || "";
- updateStreaming(currentStreamingContent);
- }
- }
- }
+ } else {
+ // Streaming chunk received
+ if (!isStreaming) {
+ // New streaming response - create a new message element
+ isStreaming = true;
+ streamingMessageId = "streaming-" + Date.now();
+ currentStreamingContent = data.content || "";
+ addMessage(
+ "bot",
+ currentStreamingContent,
+ streamingMessageId,
+ );
+ } else {
+ // Continue streaming to existing message element
+ currentStreamingContent += data.content || "";
+ updateStreaming(currentStreamingContent);
+ }
+ }
+ }
// Thinking indicator (shown while LLM is in reasoning mode)
var thinkingIndicator = null;