From cd2faea2b21c577222e508e7223bdbde869c11d1 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Thu, 24 Aug 2023 17:46:44 +0300 Subject: [PATCH] Fix group chats with streaming --- public/scripts/group-chats.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/scripts/group-chats.js b/public/scripts/group-chats.js index 339d477b5..db8753b35 100644 --- a/public/scripts/group-chats.js +++ b/public/scripts/group-chats.js @@ -8,6 +8,7 @@ import { extractAllWords, saveBase64AsFile, PAGINATION_TEMPLATE, + waitUntilCondition, } from './utils.js'; import { RA_CountCharTokens, humanizedDateTime, dragElement, favsToHotswap, getMessageTimeStamp } from "./RossAscends-mods.js"; import { loadMovingUIState, sortEntitiesList } from './power-user.js'; @@ -665,6 +666,7 @@ async function generateGroupWrapper(by_auto_mode, type = null, params = {}) { if (streamingProcessor && !streamingProcessor.isFinished) { await delay(100); } else { + await waitUntilCondition(() => streamingProcessor == null, 1000, 10); messagesBefore++; break; }