diff --git a/public/script.js b/public/script.js index 835a9a2fc..797ad3770 100644 --- a/public/script.js +++ b/public/script.js @@ -5831,11 +5831,11 @@ export async function sendMessageAsUser(messageText, messageBias, insertAt = nul await eventSource.emit(event_types.USER_MESSAGE_RENDERED, insertAt); } else { chat.push(message); + await saveChatConditional(); const chat_id = (chat.length - 1); await eventSource.emit(event_types.MESSAGE_SENT, chat_id); addOneMessage(message); await eventSource.emit(event_types.USER_MESSAGE_RENDERED, chat_id); - await saveChatConditional(); } return message;