Fix typing indicator not showing in group chats on NovelAI

This commit is contained in:
SillyLossy
2023-05-31 23:54:31 +03:00
parent 35cb1f6182
commit 0633d16622

View File

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