diff --git a/app/src/lib/runtime/runtime-executor.ts b/app/src/lib/runtime/runtime-executor.ts index 279f069..bf9d3bc 100644 --- a/app/src/lib/runtime/runtime-executor.ts +++ b/app/src/lib/runtime/runtime-executor.ts @@ -128,7 +128,7 @@ export class MemoryRuntimeExecutor implements RuntimeExecutor { const nodes = new Map(); // loop through all the nodes and assign each nodes its depth - const stack = [outputNode]; + const stack = [outputNode, ...graphNodes.filter(n => n.type.endsWith('/debug'))]; while (stack.length) { const node = stack.pop(); if (!node) continue; @@ -145,6 +145,7 @@ export class MemoryRuntimeExecutor implements RuntimeExecutor { node.state = node.state || {}; const parent = node.state.parents[0]; if (parent) { + node.state.depth = parent.state.depth - 1; parent.state.debugNode = true; } nodes.set(node.id, node);