From a38b615df54ec7fd4a16c3d8f2039d7748d51f39 Mon Sep 17 00:00:00 2001 From: Yong Quan Tan Date: Tue, 12 Aug 2025 00:33:25 +0800 Subject: [PATCH 01/23] feat: add single message queue with Enter key handling and cleanup on thread change/unmount --- web-app/src/containers/ChatInput.tsx | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/web-app/src/containers/ChatInput.tsx b/web-app/src/containers/ChatInput.tsx index ffa9a0245c..c8befbb8fa 100644 --- a/web-app/src/containers/ChatInput.tsx +++ b/web-app/src/containers/ChatInput.tsx @@ -105,7 +105,9 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => { try { // Only check mmproj for llamacpp provider if (selectedProvider === 'llamacpp') { - const hasLocalMmproj = await serviceHub.models().checkMmprojExists(selectedModel.id) + const hasLocalMmproj = await serviceHub + .models() + .checkMmprojExists(selectedModel.id) setHasMmproj(hasLocalMmproj) } // For non-llamacpp providers, only check vision capability @@ -543,12 +545,12 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => { )} { setPrompt(e.target.value) // Count the number of newlines to estimate rows @@ -748,6 +750,15 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => { + {/* Queue indicator */} + {queuedMessage && ( +
+
+ Message queued +
+
+ )} + {streamingContent ? (