Don't auto-swipe on aborted stream
This commit is contained in:
parent
517b140911
commit
08d177e7ba
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue