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

Function appendMemoryFile

src/memory/store.ts:112–122  ·  view source on GitHub ↗
(
  memoryPath: string,
  memory: Memory
)

Source from the content-addressed store, hash-verified

110}
111
112export async function appendMemoryFile(
113 memoryPath: string,
114 memory: Memory
115): Promise<{ status: 'added' | 'duplicate'; memory: Memory }> {
116 const existing = await readMemoriesFile(memoryPath);
117 const found = existing.find((m) => m.id === memory.id);
118 if (found) return { status: 'duplicate', memory: found };
119 existing.push(memory);
120 await writeMemoriesFile(memoryPath, existing);
121 return { status: 'added', memory };
122}
123
124export async function removeMemory(
125 memoryPath: string,

Callers 3

extractGitMemoriesFunction · 0.85
handleMemoryCliFunction · 0.85
handleFunction · 0.85

Calls 2

readMemoriesFileFunction · 0.85
writeMemoriesFileFunction · 0.85

Tested by

no test coverage detected