diff --git a/raggr-frontend/src/components/ChatScreen.tsx b/raggr-frontend/src/components/ChatScreen.tsx index fe8b96e..0beafb8 100644 --- a/raggr-frontend/src/components/ChatScreen.tsx +++ b/raggr-frontend/src/components/ChatScreen.tsx @@ -156,6 +156,14 @@ export const ChatScreen = ({ setAuthenticated }: ChatScreenProps) => { setQuery(event.target.value); }; + const handleKeyDown = (event: React.KeyboardEvent) => { + // Submit on Enter, but allow Shift+Enter for new line + if (event.key === "Enter" && !event.shiftKey) { + event.preventDefault(); + handleQuestionSubmit(); + } + }; + return (
@@ -200,8 +208,10 @@ export const ChatScreen = ({ setAuthenticated }: ChatScreenProps) => {