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。

chore(task-copy): clarify retained snapshot lifetime and remediate DCO

Zhao Dengfeng6505103ad957
diff --git a/apps/desktop/src/renderer/features/cc-agent/TaskMigrationStatus.tsx b/apps/desktop/src/renderer/features/cc-agent/TaskMigrationStatus.tsx
index e1a0fbc672..48f51dff50 100644
--- a/apps/desktop/src/renderer/features/cc-agent/TaskMigrationStatus.tsx
+++ b/apps/desktop/src/renderer/features/cc-agent/TaskMigrationStatus.tsx
@@ -12,6 +12,7 @@ import { TaskMigrationDialog } from './sidebar/TaskMigrationDialog';
/** Observe only mounted task details or open menus/editors, never idle sidebar rows. */
export function useTaskMigrationStatus(session: Session) {
const [status, setStatus] = useState<TaskMigrationView | null>(null);
+ // Reset for a different task/source, not a change in connection readiness.
useEffect(() => {
setStatus(null);
}, [session.id, session.deviceLinkDeviceId, session.remoteHostId]);
@@ -49,8 +50,8 @@ export function useTaskMigrationStatus(session: Session) {
online = nextOnline;
connectionGeneration += 1;
clearTimeout(timer);
- if (online) void refresh(connectionGeneration);
// Retain the last snapshot so a transient disconnect cannot unmount an open dialog.
+ if (online) void refresh(connectionGeneration);
};
// Local mode has a machine ID but no relay identity. Observe readiness before
// querying task-copy, and let pushes win over a delayed initial snapshot.