@@ -222,6 +222,7 @@ export const useExecutionStore = defineStore('execution', () => {
222222 function bindExecutionEvents ( ) {
223223 api . addEventListener ( 'execution_start' , handleExecutionStart )
224224 api . addEventListener ( 'execution_cached' , handleExecutionCached )
225+ api . addEventListener ( 'execution_interrupted' , handleExecutionInterrupted )
225226 api . addEventListener ( 'executed' , handleExecuted )
226227 api . addEventListener ( 'executing' , handleExecuting )
227228 api . addEventListener ( 'progress' , handleProgress )
@@ -235,6 +236,7 @@ export const useExecutionStore = defineStore('execution', () => {
235236 function unbindExecutionEvents ( ) {
236237 api . removeEventListener ( 'execution_start' , handleExecutionStart )
237238 api . removeEventListener ( 'execution_cached' , handleExecutionCached )
239+ api . removeEventListener ( 'execution_interrupted' , handleExecutionInterrupted )
238240 api . removeEventListener ( 'executed' , handleExecuted )
239241 api . removeEventListener ( 'executing' , handleExecuting )
240242 api . removeEventListener ( 'progress' , handleProgress )
@@ -257,6 +259,10 @@ export const useExecutionStore = defineStore('execution', () => {
257259 }
258260 }
259261
262+ function handleExecutionInterrupted ( ) {
263+ nodeProgressStates . value = { }
264+ }
265+
260266 function handleExecuted ( e : CustomEvent < ExecutedWsMessage > ) {
261267 if ( ! activePrompt . value ) return
262268 activePrompt . value . nodes [ e . detail . node ] = true
0 commit comments