fix(core): filter dead worktrees

This commit is contained in:
Adam
2026-01-15 10:43:27 -06:00
parent d71153eae6
commit b0345284f9

View File

@@ -272,7 +272,11 @@ export namespace Project {
export async function list() {
const keys = await Storage.list(["project"])
return await Promise.all(keys.map((x) => Storage.read<Info>(x)))
const projects = await Promise.all(keys.map((x) => Storage.read<Info>(x)))
return projects.map((project) => ({
...project,
sandboxes: project.sandboxes.filter((x) => existsSync(x)),
}))
}
export const update = fn(