Skip to content

Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.

refactor: return shallow copies of nodes and edges from build()

Nikola Chetelyazove82235e1dfc2
diff --git a/understand-anything-plugin/packages/core/src/analyzer/graph-builder.ts b/understand-anything-plugin/packages/core/src/analyzer/graph-builder.ts
index e2dd6458..8aa73b10 100644
--- a/understand-anything-plugin/packages/core/src/analyzer/graph-builder.ts
+++ b/understand-anything-plugin/packages/core/src/analyzer/graph-builder.ts
@@ -412,8 +412,8 @@ export class GraphBuilder {
analyzedAt: new Date().toISOString(),
gitCommitHash: this.gitHash,
},
- nodes: this.nodes,
- edges: this.edges,
+ nodes: [...this.nodes],
+ edges: [...this.edges],
layers: [],
tour: [],
};