mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix stop button not showing for the second speaking member in queue
This commit is contained in:
@ -3294,14 +3294,14 @@ export function isMultigenEnabled() {
|
|||||||
return power_user.multigen && (main_api == 'textgenerationwebui' || main_api == 'kobold' || main_api == 'koboldhorde' || main_api == 'novel');
|
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;
|
is_send_press = false;
|
||||||
$("#send_but").css("display", "flex");
|
$("#send_but").css("display", "flex");
|
||||||
$("#send_textarea").attr("disabled", false);
|
$("#send_textarea").attr("disabled", false);
|
||||||
hideStopButton();
|
hideStopButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
function deactivateSendButtons() {
|
export function deactivateSendButtons() {
|
||||||
$("#send_but").css("display", "none");
|
$("#send_but").css("display", "none");
|
||||||
showStopButton();
|
showStopButton();
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,8 @@ import {
|
|||||||
sendMessageAsUser,
|
sendMessageAsUser,
|
||||||
getBiasStrings,
|
getBiasStrings,
|
||||||
saveChatConditional,
|
saveChatConditional,
|
||||||
|
deactivateSendButtons,
|
||||||
|
activateSendButtons,
|
||||||
} from "../script.js";
|
} from "../script.js";
|
||||||
import { appendTagToList, createTagMapFromList, getTagsList, applyTagsOnCharacterSelect } from './tags.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")
|
.find(".typing_indicator_name")
|
||||||
.text(characters[chId].name);
|
.text(characters[chId].name);
|
||||||
$("#chat").append(typingIndicator);
|
$("#chat").append(typingIndicator);
|
||||||
typingIndicator.show(250, function () {
|
typingIndicator.show(200, function () {
|
||||||
typingIndicator.get(0).scrollIntoView({ behavior: "smooth" });
|
typingIndicator.get(0).scrollIntoView({ behavior: "smooth" });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This is awful. Refactor this
|
// TODO: This is awful. Refactor this
|
||||||
while (true) {
|
while (true) {
|
||||||
|
deactivateSendButtons();
|
||||||
if (isGenerationAborted) {
|
if (isGenerationAborted) {
|
||||||
throw new Error('Group generation aborted');
|
throw new Error('Group generation aborted');
|
||||||
}
|
}
|
||||||
@ -607,7 +610,7 @@ async function generateGroupWrapper(by_auto_mode, type = null, params = {}) {
|
|||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
// hide and reapply the indicator to the bottom of the list
|
// hide and reapply the indicator to the bottom of the list
|
||||||
typingIndicator.hide(250);
|
typingIndicator.hide(200);
|
||||||
$("#chat").append(typingIndicator);
|
$("#chat").append(typingIndicator);
|
||||||
|
|
||||||
is_group_generating = false;
|
is_group_generating = false;
|
||||||
@ -615,6 +618,7 @@ async function generateGroupWrapper(by_auto_mode, type = null, params = {}) {
|
|||||||
setSendButtonState(false);
|
setSendButtonState(false);
|
||||||
setCharacterId(undefined);
|
setCharacterId(undefined);
|
||||||
setCharacterName('');
|
setCharacterName('');
|
||||||
|
activateSendButtons();
|
||||||
showSwipeButtons();
|
showSwipeButtons();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user