Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): filter reserved IDs in recovery status projection

Yuewei-LLf2636c53c72e
diff --git a/apps/desktop/src/main/ownerNamespaceMigration.ts b/apps/desktop/src/main/ownerNamespaceMigration.ts
index fae7c11087..cfe2595a82 100644
--- a/apps/desktop/src/main/ownerNamespaceMigration.ts
+++ b/apps/desktop/src/main/ownerNamespaceMigration.ts
@@ -1191,7 +1191,9 @@ export function getLegacyGhostRecoveryStatus(
const targetRoot = path.join(root, 'owners', ownerKey, 'cindy-brain');
const sharedLegacyGhosts = sharedDiscovery.ghosts;
const scopedLegacyGhosts = scopedDiscovery.ghosts;
- const legacyGhosts = [...sharedLegacyGhosts, ...scopedLegacyGhosts];
+ const legacyGhosts = options.rejectReservedIds
+ ? [...sharedLegacyGhosts, ...scopedLegacyGhosts].filter((ghost) => !isOfficialGhostId(ghost.id))
+ : [...sharedLegacyGhosts, ...scopedLegacyGhosts];
const recoveryMarkerRead = readLegacyGhostRecoveryMarkerSync(root, ownerKey);
const recoveryMarker = recoveryMarkerRead.kind === 'ready'
? recoveryMarkerRead.marker