diff --git a/public/script.js b/public/script.js index 360e5ae92..3f97bcb5f 100644 --- a/public/script.js +++ b/public/script.js @@ -9909,6 +9909,7 @@ export async function doNewChat({ deleteCurrentChat = false } = {}) { } //Fix it; New chat doesn't create while open create character menu + await waitUntilCondition(() => !isChatSaving, debounce_timeout.extended, 10); await clearChat(); chat.length = 0; @@ -11205,6 +11206,7 @@ jQuery(async function () { else if (id == 'option_close_chat') { if (is_send_press == false) { + await waitUntilCondition(() => !isChatSaving, debounce_timeout.extended, 10); await clearChat(); chat.length = 0; resetSelectedGroup(); @@ -11219,7 +11221,7 @@ jQuery(async function () { select_rm_characters(); await eventSource.emit(event_types.CHAT_CHANGED, getCurrentChatId()); } else { - toastr.info('Please stop the message generation first.'); + toastr.info(t`Please stop the message generation first.`); } }