From 475eca6fcac57dddc992a5b902d25a917fb93da2 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 26 Jul 2024 22:12:14 +0300 Subject: [PATCH] Force save new chats without 1st message --- public/script.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/script.js b/public/script.js index d9f4af123..226f8fd15 100644 --- a/public/script.js +++ b/public/script.js @@ -6053,9 +6053,10 @@ async function getChatResult() { const message = getFirstMessage(); if (message.mes) { chat.push(message); - await saveChatConditional(); freshChat = true; } + // Make sure the chat appears on the server + await saveChatConditional(); } await loadItemizedPrompts(getCurrentChatId()); await printMessages(); @@ -9837,8 +9838,8 @@ jQuery(async function () { hideMenu(); }); - $('#newChatFromManageScreenButton').on('click', function () { - doNewChat({ deleteCurrentChat: false }); + $('#newChatFromManageScreenButton').on('click', async function () { + await doNewChat({ deleteCurrentChat: false }); $('#select_chat_cross').trigger('click'); });