mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Temp chat button works
This commit is contained in:
@ -10113,7 +10113,7 @@ async function removeCharacterFromUI() {
|
|||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function newAssistantChat() {
|
export async function newAssistantChat() {
|
||||||
await clearChat();
|
await clearChat();
|
||||||
chat.splice(0, chat.length);
|
chat.splice(0, chat.length);
|
||||||
chat_metadata = {};
|
chat_metadata = {};
|
||||||
|
@ -6,6 +6,7 @@ import {
|
|||||||
getCurrentChatId,
|
getCurrentChatId,
|
||||||
getRequestHeaders,
|
getRequestHeaders,
|
||||||
getThumbnailUrl,
|
getThumbnailUrl,
|
||||||
|
newAssistantChat,
|
||||||
openCharacterChat,
|
openCharacterChat,
|
||||||
selectCharacterById,
|
selectCharacterById,
|
||||||
sendSystemMessage,
|
sendSystemMessage,
|
||||||
@ -50,7 +51,7 @@ async function sendWelcomePanel() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
fragment.querySelector('button.openTemporaryChat').addEventListener('click', () => {
|
fragment.querySelector('button.openTemporaryChat').addEventListener('click', () => {
|
||||||
toastr.info('This button does nothing at the moment. Try again later.');
|
void newAssistantChat();
|
||||||
});
|
});
|
||||||
chatElement.append(fragment.firstChild);
|
chatElement.append(fragment.firstChild);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Reference in New Issue
Block a user