MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / ensureLevel

Function ensureLevel

graph-ui/src/app/tree-model.ts:893–909  ·  view source on GitHub ↗
(levels: Map<string, TreeLevel>, path: string)

Source from the content-addressed store, hash-verified

891}
892
893function ensureLevel(levels: Map<string, TreeLevel>, path: string): TreeLevel {
894 const existing = levels.get(path);
895 if (existing !== undefined) {
896 return existing;
897 }
898 const created: TreeLevel = {
899 path,
900 files: 0,
901 symbols: 0,
902 children: [],
903 foldedDuplicates: 0,
904 droppedNonPaths: 0,
905 synthetic: true,
906 };
907 levels.set(path, created);
908 return created;
909}
910
911function graftPath(levels: Map<string, TreeLevel>, path: string, kind: 'file' | 'dir'): void {
912 const parent = parentPath(path);

Callers 1

graftPathFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected