Force save new chats without 1st message

This commit is contained in:
Cohee 2024-07-26 22:12:14 +03:00
parent ff5d5fcc5e
commit 475eca6fca
1 changed files with 4 additions and 3 deletions

View File

@ -6053,9 +6053,10 @@ async function getChatResult() {
const message = getFirstMessage(); const message = getFirstMessage();
if (message.mes) { if (message.mes) {
chat.push(message); chat.push(message);
await saveChatConditional();
freshChat = true; freshChat = true;
} }
// Make sure the chat appears on the server
await saveChatConditional();
} }
await loadItemizedPrompts(getCurrentChatId()); await loadItemizedPrompts(getCurrentChatId());
await printMessages(); await printMessages();
@ -9837,8 +9838,8 @@ jQuery(async function () {
hideMenu(); hideMenu();
}); });
$('#newChatFromManageScreenButton').on('click', function () { $('#newChatFromManageScreenButton').on('click', async function () {
doNewChat({ deleteCurrentChat: false }); await doNewChat({ deleteCurrentChat: false });
$('#select_chat_cross').trigger('click'); $('#select_chat_cross').trigger('click');
}); });