File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/routes/conversation/[id] Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 421421 await sendStopRequest ();
422422 } catch (retryErr ) {
423423 console .error (" Failed to stop generation" , firstErr , retryErr );
424- stopRequested = false ;
425424 $error = " Failed to stop generation. Please try again." ;
426425 }
427426 }
442441 $pendingMessage = undefined ;
443442 }
444443
445- const streaming = isConversationStreaming (messages );
444+ const streaming = isConversationGenerationActive (messages );
446445 if (streaming ) {
447446 addBackgroundGeneration ({ id: page .params .id , startedAt: Date .now () });
448447 $loading = true ;
477476 messages = data .messages ;
478477 });
479478
480- function isConversationStreaming(msgs : Message []): boolean {
481- return isConversationGenerationActive (msgs );
482- }
479+ $effect (() => {
480+ page .params .id ;
481+ stopRequested = false ;
482+ });
483483
484484 $effect (() => {
485- const streaming = isConversationStreaming (messages );
485+ const streaming = isConversationGenerationActive (messages );
486486 if (stopRequested ) {
487487 $loading = false ;
488488 } else if (streaming ) {
You can’t perform that action at this time.
0 commit comments