feat/debug-node #41

Merged
max merged 17 commits from feat/debug-node into main 2026-02-12 23:20:59 +01:00
Showing only changes of commit e098be6013 - Show all commits

View File

@@ -128,7 +128,7 @@ export class MemoryRuntimeExecutor implements RuntimeExecutor {
const nodes = new Map<number, RuntimeNode>(); const nodes = new Map<number, RuntimeNode>();
// loop through all the nodes and assign each nodes its depth // 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) { while (stack.length) {
const node = stack.pop(); const node = stack.pop();
if (!node) continue; if (!node) continue;
@@ -145,6 +145,7 @@ export class MemoryRuntimeExecutor implements RuntimeExecutor {
node.state = node.state || {}; node.state = node.state || {};
const parent = node.state.parents[0]; const parent = node.state.parents[0];
if (parent) { if (parent) {
node.state.depth = parent.state.depth - 1;
parent.state.debugNode = true; parent.state.debugNode = true;
} }
nodes.set(node.id, node); nodes.set(node.id, node);