From 2030c2c71136d1325491ea2e98fae375a5f936ec Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:14:35 +0200 Subject: [PATCH] Fix auto-continue with stream aborting Closes #3021 --- public/script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/script.js b/public/script.js index bb07a1ec1..d27202dac 100644 --- a/public/script.js +++ b/public/script.js @@ -4775,6 +4775,11 @@ export function shouldAutoContinue(messageChunk, isImpersonate) { return false; } + if (abortController && abortController.signal.aborted) { + console.debug('Auto-continue is not triggered because the generation was stopped.'); + return false; + } + if (power_user.auto_continue.target_length <= 0) { console.log('Auto-continue target length is 0, not triggering auto-continue'); return false;