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
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