add event when world info is updated

This commit is contained in:
LenAnderson 2024-01-01 14:34:09 +00:00
parent a436a2536f
commit 8cd75cf03d
2 changed files with 2 additions and 0 deletions

View File

@ -324,6 +324,7 @@ export const event_types = {
OAI_PRESET_CHANGED_BEFORE: 'oai_preset_changed_before',
OAI_PRESET_CHANGED_AFTER: 'oai_preset_changed_after',
WORLDINFO_SETTINGS_UPDATED: 'worldinfo_settings_updated',
WORLDINFO_UPDATED: 'worldinfo_updated',
CHARACTER_EDITED: 'character_edited',
CHARACTER_PAGE_LOADED: 'character_page_loaded',
CHARACTER_GROUP_OVERLAY_STATE_CHANGE_BEFORE: 'character_group_overlay_state_change_before',

View File

@ -1420,6 +1420,7 @@ async function _save(name, data) {
headers: getRequestHeaders(),
body: JSON.stringify({ name: name, data: data }),
});
eventSource.emit(event_types.WORLDINFO_UPDATED, name, data);
}
async function saveWorldInfo(name, data, immediately) {