@@ -203,10 +203,6 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
203203 } , [ selectedType , searchQuery ] )
204204
205205 const handleEnhancePrompt = useCallback ( ( ) => {
206- if ( sendingDisabled ) {
207- return
208- }
209-
210206 const trimmedInput = inputValue . trim ( )
211207
212208 if ( trimmedInput ) {
@@ -215,7 +211,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
215211 } else {
216212 setInputValue ( t ( "chat:enhancePromptDescription" ) )
217213 }
218- } , [ inputValue , sendingDisabled , setInputValue , t ] )
214+ } , [ inputValue , setInputValue , t ] )
219215
220216 const allModes = useMemo ( ( ) => getAllModes ( customModes ) , [ customModes ] )
221217
@@ -435,11 +431,9 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
435431 if ( event . key === "Enter" && ! event . shiftKey && ! isComposing ) {
436432 event . preventDefault ( )
437433
438- if ( ! sendingDisabled ) {
439- // Reset history navigation state when sending
440- resetHistoryNavigation ( )
441- onSend ( )
442- }
434+ // Always call onSend - let ChatView handle queueing when disabled
435+ resetHistoryNavigation ( )
436+ onSend ( )
443437 }
444438
445439 if ( event . key === "Backspace" && ! isComposing ) {
@@ -487,7 +481,6 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
487481 }
488482 } ,
489483 [
490- sendingDisabled ,
491484 onSend ,
492485 showContextMenu ,
493486 searchQuery ,
@@ -1145,8 +1138,8 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
11451138 < StandardTooltip content = { t ( "chat:enhancePrompt" ) } >
11461139 < button
11471140 aria-label = { t ( "chat:enhancePrompt" ) }
1148- disabled = { sendingDisabled }
1149- onClick = { ! sendingDisabled ? handleEnhancePrompt : undefined }
1141+ disabled = { false }
1142+ onClick = { handleEnhancePrompt }
11501143 className = { cn (
11511144 "relative inline-flex items-center justify-center" ,
11521145 "bg-transparent border-none p-1.5" ,
@@ -1156,9 +1149,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
11561149 "hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]" ,
11571150 "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder" ,
11581151 "active:bg-[rgba(255,255,255,0.1)]" ,
1159- ! sendingDisabled && "cursor-pointer" ,
1160- sendingDisabled &&
1161- "opacity-40 cursor-not-allowed grayscale-[30%] hover:bg-transparent hover:border-[rgba(255,255,255,0.08)] active:bg-transparent" ,
1152+ "cursor-pointer" ,
11621153 ) } >
11631154 < WandSparkles className = { cn ( "w-4 h-4" , isEnhancingPrompt && "animate-spin" ) } />
11641155 </ button >
@@ -1170,8 +1161,8 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
11701161 < StandardTooltip content = { t ( "chat:sendMessage" ) } >
11711162 < button
11721163 aria-label = { t ( "chat:sendMessage" ) }
1173- disabled = { sendingDisabled }
1174- onClick = { ! sendingDisabled ? onSend : undefined }
1164+ disabled = { false }
1165+ onClick = { onSend }
11751166 className = { cn (
11761167 "relative inline-flex items-center justify-center" ,
11771168 "bg-transparent border-none p-1.5" ,
@@ -1181,9 +1172,7 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
11811172 "hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]" ,
11821173 "focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder" ,
11831174 "active:bg-[rgba(255,255,255,0.1)]" ,
1184- ! sendingDisabled && "cursor-pointer" ,
1185- sendingDisabled &&
1186- "opacity-40 cursor-not-allowed grayscale-[30%] hover:bg-transparent hover:border-[rgba(255,255,255,0.08)] active:bg-transparent" ,
1175+ "cursor-pointer" ,
11871176 ) } >
11881177 < SendHorizontal className = "w-4 h-4" />
11891178 </ button >
0 commit comments