MCPcopy Create free account
hub / github.com/codag-megalith/codag-visualizer / load

Method load

packages/mcp-server/src/graph-loader.ts:26–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 }
25
26 private load(): void {
27 if (!existsSync(this.graphPath)) {
28 this.index = null;
29 return;
30 }
31
32 try {
33 const raw = readFileSync(this.graphPath, "utf-8");
34 const graph: WorkflowGraph = JSON.parse(raw);
35 graph._workspacePath = this.workspacePath;
36 this.index = this.buildIndex(graph);
37 } catch {
38 this.index = null;
39 }
40 }
41
42 private buildIndex(graph: WorkflowGraph): GraphIndex {
43 const nodeById = new Map<string, WorkflowNode>();

Callers 3

constructorMethod · 0.95
startWatchingMethod · 0.95
initMethod · 0.80

Calls 2

buildIndexMethod · 0.95
parseMethod · 0.80

Tested by

no test coverage detected