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

Function addFile

graph-ui/src/architecture/source-metrics.ts:76–81  ·  view source on GitHub ↗
(path: string | undefined)

Source from the content-addressed store, hash-verified

74export function collectSourceMetrics(graph: GraphData, knownFiles: string[] = []): SourceCatalog {
75 const files = new Map<string, FileMeasure>();
76 const addFile = (path: string | undefined) => {
77 if (!path || path === '{}') return undefined;
78 const key = pathKey(path);
79 if (!files.has(key)) files.set(key, { path: key, language: sourceLanguage(key), connection: 'unknown' });
80 return files.get(key)!;
81 };
82 for (const path of knownFiles) addFile(path);
83 const represented = new Set<string>();
84 for (const node of graph.nodes) {

Callers 1

collectSourceMetricsFunction · 0.85

Calls 3

pathKeyFunction · 0.85
sourceLanguageFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected