fix: improve memory status and batch fallback

This commit is contained in:
Peter Steinberger
2026-01-19 22:48:45 +00:00
parent 39dfdccf6c
commit 4bac76e66d
5 changed files with 564 additions and 25 deletions

View File

@@ -70,7 +70,19 @@ export async function listMemoryFiles(workspaceDir: string): Promise<string[]> {
if (await exists(memoryDir)) {
await walkDir(memoryDir, result);
}
return result;
if (result.length <= 1) return result;
const seen = new Set<string>();
const deduped: string[] = [];
for (const entry of result) {
let key = entry;
try {
key = await fs.realpath(entry);
} catch {}
if (seen.has(key)) continue;
seen.add(key);
deduped.push(entry);
}
return deduped;
}
export function hashText(value: string): string {