Fix auto-continue with stream aborting

Closes #3021
This commit is contained in:
Cohee 2024-10-28 11:14:35 +02:00
parent 08d177e7ba
commit 17b7f17676
1 changed files with 5 additions and 0 deletions

View File

@ -4770,6 +4770,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;