mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-14 02:16:14 +01:00
Await QR auto-execution
This commit is contained in:
parent
d122f8ee2c
commit
25a695c783
@ -183,7 +183,7 @@ const init = async () => {
|
|||||||
slash.init();
|
slash.init();
|
||||||
autoExec = new AutoExecuteHandler(settings);
|
autoExec = new AutoExecuteHandler(settings);
|
||||||
|
|
||||||
autoExec.handleStartup();
|
await autoExec.handleStartup();
|
||||||
};
|
};
|
||||||
eventSource.on(event_types.APP_READY, init);
|
eventSource.on(event_types.APP_READY, init);
|
||||||
|
|
||||||
@ -197,16 +197,16 @@ const onChatChanged = async (chatIdx) => {
|
|||||||
manager.rerender();
|
manager.rerender();
|
||||||
buttons.refresh();
|
buttons.refresh();
|
||||||
|
|
||||||
autoExec.handleChatChanged();
|
await autoExec.handleChatChanged();
|
||||||
};
|
};
|
||||||
eventSource.on(event_types.CHAT_CHANGED, onChatChanged);
|
eventSource.on(event_types.CHAT_CHANGED, onChatChanged);
|
||||||
|
|
||||||
const onUserMessage = async () => {
|
const onUserMessage = async () => {
|
||||||
autoExec.handleUser();
|
await autoExec.handleUser();
|
||||||
};
|
};
|
||||||
eventSource.on(event_types.USER_MESSAGE_RENDERED, onUserMessage);
|
eventSource.on(event_types.USER_MESSAGE_RENDERED, onUserMessage);
|
||||||
|
|
||||||
const onAiMessage = async () => {
|
const onAiMessage = async () => {
|
||||||
autoExec.handleAi();
|
await autoExec.handleAi();
|
||||||
};
|
};
|
||||||
eventSource.on(event_types.CHARACTER_MESSAGE_RENDERED, onAiMessage);
|
eventSource.on(event_types.CHARACTER_MESSAGE_RENDERED, onAiMessage);
|
||||||
|
Loading…
Reference in New Issue
Block a user