From 8150b58110a41f94f97bab6923f57014fb94ee61 Mon Sep 17 00:00:00 2001 From: Meleki Date: Tue, 17 Mar 2026 10:20:52 +0100 Subject: [PATCH] Block message send during active stream Prevent sending messages via Enter key while a stream/response is active. sendMessage() now returns early if isStreaming is true. --- wwwroot/js/chat.js | 1 + 1 file changed, 1 insertion(+) diff --git a/wwwroot/js/chat.js b/wwwroot/js/chat.js index 4e67f6f..eda4923 100644 --- a/wwwroot/js/chat.js +++ b/wwwroot/js/chat.js @@ -319,6 +319,7 @@ async function _runStream(fetchPromise) { // ── Send Message ── async function sendMessage() { + if (isStreaming) return; const input = $('#input'); const text = input.value.trim(); if (!text && pendingFiles.length === 0 && pendingRefs.length === 0) return;