diff --git a/public/script.js b/public/script.js index 1bb05e4cc..9e6231541 100644 --- a/public/script.js +++ b/public/script.js @@ -3136,7 +3136,8 @@ class StreamingProcessor { //console.log("Generated text size:", text.length, text) - if (power_user.auto_swipe) { + const isAborted = this.abortController.signal.aborted; + if (power_user.auto_swipe && !isAborted) { function containsBlacklistedWords(str, blacklist, threshold) { const regex = new RegExp(`\\b(${blacklist.join('|')})\\b`, 'gi'); const matches = str.match(regex) || []; @@ -4583,7 +4584,8 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro playMessageSound(); } - if (power_user.auto_swipe) { + const isAborted = abortController && abortController.signal.aborted; + if (power_user.auto_swipe && !isAborted) { console.debug('checking for autoswipeblacklist on non-streaming message'); function containsBlacklistedWords(getMessage, blacklist, threshold) { console.debug('checking blacklisted words');