mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 17:36:22 +01:00
Fix regeneration calls on empty chat
This commit is contained in:
parent
109ea4008b
commit
8ec9b64be4
@ -2342,10 +2342,10 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
||||
if (chat.length && chat[chat.length - 1]['is_user']) {
|
||||
//do nothing? why does this check exist?
|
||||
}
|
||||
else if (type !== 'quiet' && type !== "swipe" && !isImpersonate && !dryRun) {
|
||||
else if (type !== 'quiet' && type !== "swipe" && !isImpersonate && !dryRun && chat.length) {
|
||||
chat.length = chat.length - 1;
|
||||
count_view_mes -= 1;
|
||||
$('#chat').children().last().hide(500, function () {
|
||||
$('#chat').children().last().hide(250, function () {
|
||||
$(this).remove();
|
||||
});
|
||||
await eventSource.emit(event_types.MESSAGE_DELETED, chat.length);
|
||||
|
Loading…
Reference in New Issue
Block a user