diff --git a/public/scripts/group-chats.js b/public/scripts/group-chats.js index 679863921..a10bd608a 100644 --- a/public/scripts/group-chats.js +++ b/public/scripts/group-chats.js @@ -506,13 +506,12 @@ async function generateGroupWrapper(by_auto_mode, type = null, params = {}) { // now the real generation begins: cycle through every activated character for (const chId of activatedMembers) { + deactivateSendButtons(); isGenerationDone = false; const generateType = type == "swipe" || type == "impersonate" || type == "quiet" ? type : "group_chat"; setCharacterId(chId); setCharacterName(characters[chId].name) - await Generate(generateType, { automatic_trigger: by_auto_mode, ...(params || {}) }); - if (type !== "swipe" && type !== "impersonate" && !isMultigenEnabled() && !isStreamingEnabled()) { // update indicator and scroll down typingIndicator @@ -524,6 +523,8 @@ async function generateGroupWrapper(by_auto_mode, type = null, params = {}) { }); } + Generate(generateType, { automatic_trigger: by_auto_mode, ...(params || {}) }); + // TODO: This is awful. Refactor this while (true) { deactivateSendButtons(); @@ -606,7 +607,6 @@ async function generateGroupWrapper(by_auto_mode, type = null, params = {}) { break; } } - } } finally { // hide and reapply the indicator to the bottom of the list