From 61f69aa674ab237d8d02fb96636595e8c09984d7 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 12 May 2025 01:10:50 +0300 Subject: [PATCH] Temp chat button works --- public/script.js | 2 +- public/scripts/welcome-screen.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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) {