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

Function serializeMemory

src/context/memory-mirror.ts:26–29  ·  view source on GitHub ↗
(facts: string[], title: string)

Source from the content-addressed store, hash-verified

24
25/** Render facts as a markdown memory file (PURE). One fact per bullet; newlines folded to spaces. */
26export function serializeMemory(facts: string[], title: string): string {
27 const body = facts.length ? facts.map(f => `- ${f.replace(/\s*\n\s*/g, ' ').trim()}`).join('\n') : '_(none yet)_';
28 return `# QodeX memory — ${title}\n${COMMENT}\n\n${body}\n`;
29}
30
31/** Extract the facts from a markdown memory file (PURE): bullet lines, skipping header/comment/blank. */
32export function parseMemory(md: string): string[] {

Callers 2

exportMemoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected