First commit of Objective extension

This commit is contained in:
ouoertheo
2023-05-30 17:35:14 -05:00
parent e07f500014
commit 4cf0e18d76
6 changed files with 317 additions and 0 deletions

View File

@ -419,6 +419,7 @@ export const event_types = {
MESSAGE_RECEIVED: 'message_received',
MESSAGE_EDITED: 'message_edited',
IMPERSONATE_READY: 'impersonate_ready',
CHAT_CHANGED: 'chat_id_changed',
}
export const eventSource = new EventEmitter();
@ -3613,6 +3614,7 @@ async function getChatResult() {
if (chat.length === 1) {
await eventSource.emit(event_types.MESSAGE_RECEIVED, (chat.length - 1));
}
await eventSource.emit(event_types.CHAT_CHANGED, (getCurrentChatId()));
}
async function openCharacterChat(file_name) {