Procházet zdrojové kódy

feat: accept loopNodeId/loopIteration on a node execution record

The engine now tags each nodeExecution that ran inside a loop body with
the loop node's id and a 0-based iteration index. Add the two fields to
the NodeExecution type so the editor can group a loop's results by
iteration instead of just listing every pass flat. Both are optional -
absent on a record from before the engine sent them, and absent for a
node that never ran inside a loop.
fszontagh před 1 měsícem
rodič
revize
47274b23da
1 změnil soubory, kde provedl 7 přidání a 0 odebrání
  1. 7 0
      webui/src/api/workflows.ts

+ 7 - 0
webui/src/api/workflows.ts

@@ -464,6 +464,13 @@ export interface NodeExecution {
   output: any
   error?: string
   retryCount?: number
+  // Present only when this node ran inside a loop body. loopNodeId names the
+  // loop node that owns the iteration; loopIteration is the 0-based index of
+  // that iteration. Both are absent for a node that did not run in a loop,
+  // and absent entirely on executions recorded before the engine started
+  // sending them - treat their absence as "unknown", not "not in a loop".
+  loopNodeId?: string
+  loopIteration?: number
 }
 
 export interface WorkflowSnapshot {