mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Await event emission
This commit is contained in:
@ -2404,7 +2404,7 @@ async function generatePicture(initiator, args, trigger, message, callback) {
|
||||
const callbackOriginal = callback;
|
||||
callback = async function (prompt, imagePath, generationType, _negativePromptPrefix, _initiator, prefixedPrompt) {
|
||||
const imgUrl = `url("${encodeURI(imagePath)}")`;
|
||||
void eventSource.emit(event_types.FORCE_SET_BACKGROUND, { url: imgUrl, path: imagePath });
|
||||
await eventSource.emit(event_types.FORCE_SET_BACKGROUND, { url: imgUrl, path: imagePath });
|
||||
|
||||
if (typeof callbackOriginal === 'function') {
|
||||
await callbackOriginal(prompt, imagePath, generationType, negativePromptPrefix, initiator, prefixedPrompt);
|
||||
|
Reference in New Issue
Block a user