diff --git a/public/script.js b/public/script.js index b885a6f44..101e82e98 100644 --- a/public/script.js +++ b/public/script.js @@ -10113,7 +10113,7 @@ async function removeCharacterFromUI() { saveSettingsDebounced(); } -async function newAssistantChat() { +export async function newAssistantChat() { await clearChat(); chat.splice(0, chat.length); chat_metadata = {}; diff --git a/public/scripts/welcome-screen.js b/public/scripts/welcome-screen.js index 8c193b838..42416ea34 100644 --- a/public/scripts/welcome-screen.js +++ b/public/scripts/welcome-screen.js @@ -6,6 +6,7 @@ import { getCurrentChatId, getRequestHeaders, getThumbnailUrl, + newAssistantChat, openCharacterChat, selectCharacterById, sendSystemMessage, @@ -50,7 +51,7 @@ async function sendWelcomePanel() { }); }); fragment.querySelector('button.openTemporaryChat').addEventListener('click', () => { - toastr.info('This button does nothing at the moment. Try again later.'); + void newAssistantChat(); }); chatElement.append(fragment.firstChild); } catch (error) {