Listen for new execution_start message

This commit is contained in:
space-nuko
2023-05-16 19:32:57 -05:00
parent cd8c93b853
commit 3972a8126d
7 changed files with 82 additions and 35 deletions

View File

@@ -79,6 +79,7 @@ type ComfyAPIEvents = {
reconnected: () => void,
executing: (promptID: PromptID | null, runningNodeID: ComfyNodeID | null) => void,
executed: (promptID: PromptID, nodeID: ComfyNodeID, output: SerializedPromptOutputs) => void,
execution_start: (promptID: PromptID) => void,
execution_cached: (promptID: PromptID, nodes: ComfyNodeID[]) => void,
execution_error: (promptID: PromptID, message: string) => void,
}
@@ -183,6 +184,9 @@ export default class ComfyAPI {
case "executed":
this.eventBus.emit("executed", msg.data.prompt_id, msg.data.node, msg.data.output);
break;
case "execution_start":
this.eventBus.emit("execution_start", msg.data.prompt_id);
break;
case "execution_cached":
this.eventBus.emit("execution_cached", msg.data.prompt_id, msg.data.nodes);
break;