diff --git a/src/ui/UserInput.tsx b/src/ui/UserInput.tsx index f4738e859..4a962ea40 100644 --- a/src/ui/UserInput.tsx +++ b/src/ui/UserInput.tsx @@ -129,8 +129,13 @@ const UserInput: React.FC = ({ return; } + // Allow typing during streaming, but block submission if (!inputMode) { - return; + // Block only Enter key submission during streaming + if (key.return && !key.shift) { + return; + } + // Allow all other input (typing, navigation, etc.) } // Handle slash command navigation @@ -175,6 +180,7 @@ const UserInput: React.FC = ({ setCursorPosition(0); setShowSlashCommands(false); } + // Note: Enter key is already blocked during streaming by the inputMode check above return; } @@ -209,17 +215,17 @@ const UserInput: React.FC = ({ if (inputText.length === 0) { return ( <> - {inputMode && !isWaitingForResponse && ( + {(inputMode || isWaitingForResponse) && ( ▋{placeholderText} )} - {(!inputMode || isWaitingForResponse) && ( + {!inputMode && !isWaitingForResponse && ( {placeholderText} )} ); } - if (inputMode && !isWaitingForResponse) { + if (inputMode || isWaitingForResponse) { // Handle multi-line text with cursor const lines = inputText.split("\n"); let charCount = 0;