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(desktop): 按 review 反馈修文档注释与重复 import

DavidShen46a35058620c
diff --git a/apps/desktop/src/main/turn-change-set/store.ts b/apps/desktop/src/main/turn-change-set/store.ts
index c02ecb5c08..c6211f665c 100644
--- a/apps/desktop/src/main/turn-change-set/store.ts
+++ b/apps/desktop/src/main/turn-change-set/store.ts
@@ -1426,9 +1426,12 @@ async function validAnchorIds(sessionId: string, summaries: readonly TurnChangeS
}
/**
- * A zero-file entry whose only incomplete reason is 'turn-failed' carries no change
- * information (see persistPending). Earlier builds persisted such entries for every
- * failed turn; hide them on read so legacy sidecars self-heal without a migration.
+ * A zero-file entry whose incomplete reasons are at most 'turn-failed' carries no
+ * change information (see persistPending). Earlier builds persisted such entries for
+ * every failed turn; hide them on read so legacy sidecars self-heal without a
+ * migration. The reasons-empty shape is deliberately included: no build has ever
+ * persisted it (the write guard drops it), and if a corrupted sidecar produced one
+ * it would render an equally information-free "+0 -0" card, so it is hidden too.
*/
function isEmptyFailedTurnEntry(summary: TurnChangeSetSummary): boolean {
return summary.fileCount === 0
diff --git a/apps/desktop/src/renderer/components/chat/MessageStream.tsx b/apps/desktop/src/renderer/components/chat/MessageStream.tsx
index d5759a39d4..13d109286a 100644
--- a/apps/desktop/src/renderer/components/chat/MessageStream.tsx
+++ b/apps/desktop/src/renderer/components/chat/MessageStream.tsx
@@ -218,8 +218,7 @@ import { useNavigationKeyListener } from './useNavigationKeyListener';
import { suppressScrollbarActivation } from '@/lib/scrollbarAutoHide';
import { collectAssistantTurnUsageDetails } from '@/lib/userTurnUsage';
import type { TurnUsageDetails } from '../../../shared/turnUsageDetails';
-import { hasReviewableTurnChanges } from '../../../shared/turnChangeSet';
-import type { TurnChangeSetSummary } from '../../../shared/turnChangeSet';
+import { hasReviewableTurnChanges, type TurnChangeSetSummary } from '../../../shared/turnChangeSet';
interface MessageStreamProps {
/** Active session id — used to reset scroll state on session switch. */