| 2404 | 2404 | const callbackOriginal = callback; |
| 2405 | 2405 | callback = async function (prompt, imagePath, generationType, _negativePromptPrefix, _initiator, prefixedPrompt) { |
| 2406 | 2406 | const imgUrl = `url("${encodeURI(imagePath)}")`; |
| 2407 | 2407 | voidawait eventSource.emit(event_types.FORCE_SET_BACKGROUND, { url: imgUrl, path: imagePath }); |
| 2408 | 2408 | |
| 2409 | 2409 | if (typeof callbackOriginal === 'function') { |
| 2410 | 2410 | await callbackOriginal(prompt, imagePath, generationType, negativePromptPrefix, initiator, prefixedPrompt); |