Temp chat button works
| @@ -10113,7 +10113,7 @@ async function removeCharacterFromUI() { | |||
| 10113 | saveSettingsDebounced(); | 10113 | saveSettingsDebounced(); |
| 10114 | } | 10114 | } |
| 10115 | 10115 | ||
| 10116 | async function newAssistantChat() { | 10116 | export async function newAssistantChat() { |
| 10117 | await clearChat(); | 10117 | await clearChat(); |
| 10118 | chat.splice(0, chat.length); | 10118 | chat.splice(0, chat.length); |
| 10119 | chat_metadata = {}; | 10119 | chat_metadata = {}; |
| @@ -6,6 +6,7 @@ import { | |||
| 6 | getCurrentChatId, | 6 | getCurrentChatId, |
| 7 | getRequestHeaders, | 7 | getRequestHeaders, |
| 8 | getThumbnailUrl, | 8 | getThumbnailUrl, |
| 9 | newAssistantChat, | ||
| 9 | openCharacterChat, | 10 | openCharacterChat, |
| 10 | selectCharacterById, | 11 | selectCharacterById, |
| 11 | sendSystemMessage, | 12 | sendSystemMessage, |
| @@ -50,7 +51,7 @@ async function sendWelcomePanel() { | |||
| 50 | }); | 51 | }); |
| 51 | }); | 52 | }); |
| 52 | fragment.querySelector('button.openTemporaryChat').addEventListener('click', () => { | 53 | fragment.querySelector('button.openTemporaryChat').addEventListener('click', () => { |
| 53 | toastr.info('This button does nothing at the moment. Try again later.'); | 54 | void newAssistantChat(); |
| 54 | }); | 55 | }); |
| 55 | chatElement.append(fragment.firstChild); | 56 | chatElement.append(fragment.firstChild); |
| 56 | } catch (error) { | 57 | } catch (error) { |