Temp chat button works

This commit is contained in:
Cohee
2025-05-12 01:10:50 +03:00
parent e80c36c242
commit 61f69aa674
2 changed files with 3 additions and 2 deletions

View File

@ -10113,7 +10113,7 @@ async function removeCharacterFromUI() {
saveSettingsDebounced();
}
async function newAssistantChat() {
export async function newAssistantChat() {
await clearChat();
chat.splice(0, chat.length);
chat_metadata = {};

View File

@ -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) {