File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,6 @@ <h2 class="font-bold ml-4">Conversations</h2>
154154 placeholder ="Type a message (Shift+Enter to add a new line) "
155155 v-model ="inputMsg "
156156 @keydown.enter.exact.prevent ="sendMessage "
157- :disabled ="isGenerating "
158157 id ="msg-input "
159158 dir ="auto "
160159 > </ textarea >
Original file line number Diff line number Diff line change @@ -469,6 +469,14 @@ const mainApp = createApp({
469469 } ,
470470 async sendMessage ( ) {
471471 if ( ! this . inputMsg ) return ;
472+
473+ if ( this . isGenerating ) {
474+ this . stopGeneration ( ) ;
475+ while ( this . isGenerating ) {
476+ await new Promise ( ( resolve ) => setTimeout ( resolve , 10 ) ) ;
477+ }
478+ }
479+
472480 const currConvId = this . viewingConvId ;
473481
474482 StorageUtils . appendMsg ( currConvId , {
You can’t perform that action at this time.
0 commit comments