File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -250,7 +250,9 @@ export class WaveAIModel {
250250
251251 async handleSubmit ( shouldFocus : boolean ) {
252252 const input = globalStore . get ( this . inputAtom ) ;
253- if ( ! input . trim ( ) || this . useChatStatus !== "ready" || globalStore . get ( this . isLoadingChatAtom ) ) {
253+ const droppedFiles = globalStore . get ( this . droppedFiles ) ;
254+
255+ if ( ( ! input . trim ( ) && droppedFiles . length === 0 ) || ( this . useChatStatus !== "ready" && this . useChatStatus !== "error" ) || globalStore . get ( this . isLoadingChatAtom ) ) {
254256 return ;
255257 }
256258
@@ -262,8 +264,6 @@ export class WaveAIModel {
262264
263265 this . clearError ( ) ;
264266
265- const droppedFiles = globalStore . get ( this . droppedFiles ) ;
266-
267267 const aiMessageParts : AIMessagePart [ ] = [ { type : "text" , text : input . trim ( ) } ] ;
268268
269269 const uiMessageParts : WaveUIMessagePart [ ] = [ ] ;
You can’t perform that action at this time.
0 commit comments