mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-31 11:35:37 +01:00
await init and wait for APP_READY
This commit is contained in:
parent
8874ffffc5
commit
65d9c944d8
@ -198,6 +198,9 @@ const init = async () => {
|
||||
slash.init();
|
||||
autoExec = new AutoExecuteHandler(settings);
|
||||
|
||||
eventSource.on(event_types.APP_READY, ()=>finalizeInit());
|
||||
};
|
||||
const finalizeInit = async () => {
|
||||
log('executing startup');
|
||||
await autoExec.handleStartup();
|
||||
log('/executing startup');
|
||||
@ -211,7 +214,7 @@ const init = async () => {
|
||||
isReady = true;
|
||||
log('READY');
|
||||
};
|
||||
init();
|
||||
await init();
|
||||
|
||||
const onChatChanged = async (chatIdx) => {
|
||||
log('CHAT_CHANGED', chatIdx);
|
||||
|
Loading…
x
Reference in New Issue
Block a user