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

Function removeMemory

src/memory/store.ts:124–134  ·  view source on GitHub ↗
(
  memoryPath: string,
  id: string
)

Source from the content-addressed store, hash-verified

122}
123
124export async function removeMemory(
125 memoryPath: string,
126 id: string
127): Promise<{ status: 'removed' | 'not_found' }> {
128 const existing = await readMemoriesFile(memoryPath);
129 const index = existing.findIndex((m) => m.id === id);
130 if (index === -1) return { status: 'not_found' };
131 existing.splice(index, 1);
132 await writeMemoriesFile(memoryPath, existing);
133 return { status: 'removed' };
134}
135
136export function filterMemories(memories: Memory[], filters: MemoryFilters): Memory[] {
137 const { category, type, query } = filters;

Callers 1

handleMemoryCliFunction · 0.85

Calls 2

readMemoriesFileFunction · 0.85
writeMemoriesFileFunction · 0.85

Tested by

no test coverage detected