From 76993eea688860bb8dfedfb937ad5e643620f5da Mon Sep 17 00:00:00 2001 From: Mike Fortman Date: Fri, 24 Oct 2025 15:20:46 -0500 Subject: [PATCH] support file upload w/o a messasge --- frontend/src/app/chat/components/chat-input.tsx | 2 +- frontend/src/app/chat/page.tsx | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/chat/components/chat-input.tsx b/frontend/src/app/chat/components/chat-input.tsx index 6a72f4da..32fec72d 100644 --- a/frontend/src/app/chat/components/chat-input.tsx +++ b/frontend/src/app/chat/components/chat-input.tsx @@ -201,7 +201,7 @@ export const ChatInput = forwardRef( variant="default" type="submit" size="iconSm" - disabled={!input.trim() || loading} + disabled={(!input.trim() && !uploadedFile) || loading} className="!rounded-md h-8 w-8 p-0" > {loading ? ( diff --git a/frontend/src/app/chat/page.tsx b/frontend/src/app/chat/page.tsx index 28be640d..1d25700f 100644 --- a/frontend/src/app/chat/page.tsx +++ b/frontend/src/app/chat/page.tsx @@ -278,7 +278,6 @@ function ChatPage() { // If this is a new conversation (no currentConversationId), set it now if (!currentConversationId) { - console.log("Setting current conversation ID to:", result.response_id); setCurrentConversationId(result.response_id); refreshConversations(true); } else { @@ -914,8 +913,11 @@ function ChatPage() { } } - // Pass the responseId from upload (if any) to handleSendMessage - handleSendMessage(input, uploadedResponseId || undefined); + // Only send message if there's input text + if (input.trim()) { + // Pass the responseId from upload (if any) to handleSendMessage + handleSendMessage(input, uploadedResponseId || undefined); + } }; const toggleFunctionCall = (functionCallId: string) => {