(facts: string[], title: string)
| 24 | |
| 25 | /** Render facts as a markdown memory file (PURE). One fact per bullet; newlines folded to spaces. */ |
| 26 | export 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. */ |
| 32 | export function parseMemory(md: string): string[] { |
no outgoing calls
no test coverage detected