MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / persistGraph

Function persistGraph

src/core/memory-graph.ts:99–104  ·  view source on GitHub ↗
(rootDir: string)

Source from the content-addressed store, hash-verified

97}
98
99async function persistGraph(rootDir: string): Promise<void> {
100 const store = graphCache.get(rootDir);
101 if (!store) return;
102 await ensureMcpDataDir(rootDir);
103 await writeFile(join(rootDir, CACHE_DIR, GRAPH_FILE), JSON.stringify(store, null, 2));
104}
105
106function scheduleSave(rootDir: string): void {
107 const existing = saveTimeout.get(rootDir);

Callers 1

scheduleSaveFunction · 0.85

Calls 1

ensureMcpDataDirFunction · 0.85

Tested by

no test coverage detected