Show message in the frontend if prompt execution raises an exception

This commit is contained in:
space-nuko
2023-05-25 13:03:41 -05:00
parent ffec815257
commit 6b2a8a3845
3 changed files with 45 additions and 10 deletions

View File

@@ -88,6 +88,12 @@ class ComfyApi extends EventTarget {
case "executed":
this.dispatchEvent(new CustomEvent("executed", { detail: msg.data }));
break;
case "execution_start":
this.dispatchEvent(new CustomEvent("execution_start", { detail: msg.data }));
break;
case "execution_error":
this.dispatchEvent(new CustomEvent("execution_error", { detail: msg.data }));
break;
default:
if (this.#registered.has(msg.type)) {
this.dispatchEvent(new CustomEvent(msg.type, { detail: msg.data }));