MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / parseMemory

Function parseMemory

src/context/memory-mirror.ts:32–39  ·  view source on GitHub ↗
(md: string)

Source from the content-addressed store, hash-verified

30
31/** Extract the facts from a markdown memory file (PURE): bullet lines, skipping header/comment/blank. */
32export function parseMemory(md: string): string[] {
33 const out: string[] = [];
34 for (const raw of md.split('\n')) {
35 const m = /^\s*[-*]\s+(.+?)\s*$/.exec(raw);
36 if (m && m[1] && m[1] !== '_(none yet)_') out.push(m[1].trim());
37 }
38 return out;
39}
40
41/** Where the two mirror files live for a given working directory. */
42export function memoryPaths(cwd: string): { user: string; project: string } {

Callers 2

importMemoryFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected