Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(desktop): 静音任务不再参与灵动岛阻塞态仲裁
WZBbiao333c3ba30bb9
diff --git a/apps/desktop/src/main/agent-island/__tests__/state.test.ts b/apps/desktop/src/main/agent-island/__tests__/state.test.tsindex 50fd7957e9..4785b2a922 100644--- a/apps/desktop/src/main/agent-island/__tests__/state.test.ts+++ b/apps/desktop/src/main/agent-island/__tests__/state.test.ts@@ -192,6 +192,35 @@ describe('Agent Island display state', () => {expect(buildAgentIslandDisplayState(state, 1_300).currentSessionId).toBeNull();});+ it('静音任务的待交互态不参与阻塞态仲裁,不再挡住其它任务的完成卡', () => {+ const state = createAgentIslandState();++ applyAgentIslandEvent(state, { sessionId: 'done', title: 'Done' }, doneEvent(), 1_000);+ applyAgentIslandInteractionRequest(state, { sessionId: 'ask', title: 'Ask' }, permissionRequest('r1'), 1_100);+ // 静音任务自己不上岛面,也不能继续按阻塞态按住队列里的完成卡。+ setAgentIslandSessionDisplaySuppressed(state, 'ask', true);++ const display = buildAgentIslandDisplayState(state, 1_200);++ expect(display.sessions.map((session) => session.sessionId)).toEqual(['done']);+ expect(display.displayPolicy).toBe('transient');+ expect(display.displaySurface).toBe('completionCard');+ expect(display.currentSessionId).toBe('done');+ expect(display.pillSnapshot.deferredRevealCount).toBe(0);+ });++ it('静音任务的待交互态不再禁用灵动岛的悬停展开', () => {+ const state = createAgentIslandState();++ applyAgentIslandEvent(state, { sessionId: 'running', title: 'Running' }, statusEvent(true, 'Running'), 1_000);+ applyAgentIslandInteractionRequest(state, { sessionId: 'ask', title: 'Ask' }, permissionRequest('r1'), 1_100);+ setAgentIslandSessionDisplaySuppressed(state, 'ask', true);++ setAgentIslandHovered(state, true, 1_200);++ expect(buildAgentIslandDisplayState(state, 1_750).mode).toBe('expanded');+ });+it('does not complete the island on claimed SDK boundary events', () => {const state = createAgentIslandState();const meta = { sessionId: 'continuing', title: 'Continuing', agentKind: 'codex' };diff --git a/apps/desktop/src/main/agent-island/state.ts b/apps/desktop/src/main/agent-island/state.tsindex febcc6f3fd..6c1352d2a2 100644--- a/apps/desktop/src/main/agent-island/state.ts+++ b/apps/desktop/src/main/agent-island/state.ts@@ -2101,6 +2101,9 @@ function shouldSmartSuppressSession(state: AgentIslandState, session: AgentIslanfunction hasBlockingSession(state: AgentIslandState, now: number): boolean {for (const session of state.sessions.values()) {if (!isBlockingSession(session)) continue;+ // 静音任务不占阻塞态仲裁:它本来就不上岛面,也不该挡住其它任务的卡片提升+ // 与悬停展开。和 shouldDisplaySession 用同一个抑制集合。+ if (state.displaySuppressedSessionIds.has(session.sessionId)) continue;if (isBlockingRevealInactive(state, session, now)) continue;return true;}