Initialize world info during app startup

Moves world info event binding from jQuery document-ready handler
to explicit initialization function for better control flow
Ensures world info setup occurs after core dependencies are loaded
This commit is contained in:
Wolfsblvt
2025-04-25 20:43:13 +02:00
parent 74f441d0ba
commit 470a0964f7
2 changed files with 4 additions and 3 deletions

View File

@ -5160,8 +5160,7 @@ export async function assignLorebookToChat(event) {
return callGenericPopup(template, POPUP_TYPE.TEXT);
}
jQuery(() => {
export function initWorldInfo() {
$('#world_info').on('mousedown change', async function (e) {
// If there's no world names, don't do anything
if (world_names.length === 0) {
@ -5373,7 +5372,7 @@ jQuery(() => {
}
});
});
});
}
/**
* Moves a World Info entry from a source lorebook to a target lorebook.