MCPcopy Index your code
hub / github.com/PatrickSys/codebase-context / readMemoriesFile

Function readMemoriesFile

src/memory/store.ts:98–105  ·  view source on GitHub ↗
(memoryPath: string)

Source from the content-addressed store, hash-verified

96}
97
98export async function readMemoriesFile(memoryPath: string): Promise<Memory[]> {
99 try {
100 const content = await fs.readFile(memoryPath, 'utf-8');
101 return normalizeMemories(JSON.parse(content));
102 } catch {
103 return [];
104 }
105}
106
107export async function writeMemoriesFile(memoryPath: string, memories: Memory[]): Promise<void> {
108 await fs.mkdir(path.dirname(memoryPath), { recursive: true });

Callers 6

handleMemoryCliFunction · 0.85
handleFunction · 0.85
handleFunction · 0.85
handleFunction · 0.85
appendMemoryFileFunction · 0.85
removeMemoryFunction · 0.85

Calls 1

normalizeMemoriesFunction · 0.85

Tested by

no test coverage detected