(raw: unknown)
| 86 | } |
| 87 | |
| 88 | export function normalizeMemories(raw: unknown): Memory[] { |
| 89 | if (!Array.isArray(raw)) return []; |
| 90 | const out: Memory[] = []; |
| 91 | for (const item of raw) { |
| 92 | const normalized = normalizeMemory(item); |
| 93 | if (normalized) out.push(normalized); |
| 94 | } |
| 95 | return out; |
| 96 | } |
| 97 | |
| 98 | export async function readMemoriesFile(memoryPath: string): Promise<Memory[]> { |
| 99 | try { |
no test coverage detected