diff --git a/public/script.js b/public/script.js index fd33d2c1d..90c05c512 100644 --- a/public/script.js +++ b/public/script.js @@ -3294,14 +3294,14 @@ export function isMultigenEnabled() { return power_user.multigen && (main_api == 'textgenerationwebui' || main_api == 'kobold' || main_api == 'koboldhorde' || main_api == 'novel'); } -function activateSendButtons() { +export function activateSendButtons() { is_send_press = false; $("#send_but").css("display", "flex"); $("#send_textarea").attr("disabled", false); hideStopButton(); } -function deactivateSendButtons() { +export function deactivateSendButtons() { $("#send_but").css("display", "none"); showStopButton(); } diff --git a/public/scripts/group-chats.js b/public/scripts/group-chats.js index f0f2b2f40..679863921 100644 --- a/public/scripts/group-chats.js +++ b/public/scripts/group-chats.js @@ -51,6 +51,8 @@ import { sendMessageAsUser, getBiasStrings, saveChatConditional, + deactivateSendButtons, + activateSendButtons, } from "../script.js"; import { appendTagToList, createTagMapFromList, getTagsList, applyTagsOnCharacterSelect } from './tags.js'; @@ -517,13 +519,14 @@ async function generateGroupWrapper(by_auto_mode, type = null, params = {}) { .find(".typing_indicator_name") .text(characters[chId].name); $("#chat").append(typingIndicator); - typingIndicator.show(250, function () { + typingIndicator.show(200, function () { typingIndicator.get(0).scrollIntoView({ behavior: "smooth" }); }); } // TODO: This is awful. Refactor this while (true) { + deactivateSendButtons(); if (isGenerationAborted) { throw new Error('Group generation aborted'); } @@ -607,7 +610,7 @@ async function generateGroupWrapper(by_auto_mode, type = null, params = {}) { } } finally { // hide and reapply the indicator to the bottom of the list - typingIndicator.hide(250); + typingIndicator.hide(200); $("#chat").append(typingIndicator); is_group_generating = false; @@ -615,6 +618,7 @@ async function generateGroupWrapper(by_auto_mode, type = null, params = {}) { setSendButtonState(false); setCharacterId(undefined); setCharacterName(''); + activateSendButtons(); showSwipeButtons(); } }