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(pi): keep latest main agent boundaries compatible

Chris0628a5b47d20
diff --git a/apps/desktop/src/main/maker-ipc/__tests__/agent-input-coordinator.test.ts b/apps/desktop/src/main/maker-ipc/__tests__/agent-input-coordinator.test.ts
index d37c5ea76a..8324856c5c 100644
--- a/apps/desktop/src/main/maker-ipc/__tests__/agent-input-coordinator.test.ts
+++ b/apps/desktop/src/main/maker-ipc/__tests__/agent-input-coordinator.test.ts
@@ -154,7 +154,7 @@ function sessionRunningError(): Error & { code: string } {
function createHarness() {
let running = false;
let pendingInteraction = false;
- let agentKind: 'claude-code' | 'codex' | null = 'claude-code';
+ let agentKind: AgentInputCreateOpts['agentKind'] | null = 'claude-code';
const projections: AgentInputProjection[] = [];
const sendToAgent = vi.fn<AgentInputCoordinatorDeps['sendToAgent']>(async (sessionId, _message, _createOpts, sendOpts) => {
@@ -276,7 +276,7 @@ function createHarness() {
setPendingInteraction(value: boolean) {
pendingInteraction = value;
},
- setAgentKind(value: 'claude-code' | 'codex' | null) {
+ setAgentKind(value: AgentInputCreateOpts['agentKind'] | null) {
agentKind = value;
},
setHasPendingCredentialSwitch(fn: (() => boolean) | null) {
@@ -3594,6 +3594,7 @@ describe('AgentInputCoordinator stop and drain boundaries', () => {
it.each([
{ agentKind: 'claude-code' as const, providerId: 'xd', model: 'claude-opus-5' },
{ agentKind: 'codex' as const, providerId: 'xd', model: 'gpt-5.5' },
+ { agentKind: 'pi' as const, providerId: 'openai', model: 'gpt-5.5' },
])('retries abort reconciliation after $agentKind abort settles before the live turn is idle', async ({
agentKind,
providerId,
diff --git a/apps/desktop/src/main/maker-ipc/agent-input-coordinator.ts b/apps/desktop/src/main/maker-ipc/agent-input-coordinator.ts
index 18eeaad9fe..709f55dc9e 100644
--- a/apps/desktop/src/main/maker-ipc/agent-input-coordinator.ts
+++ b/apps/desktop/src/main/maker-ipc/agent-input-coordinator.ts
@@ -139,7 +139,7 @@ export interface AgentInputCoordinatorDeps {
*/
reconcileTurnIdle?: (sessionId: string) => boolean;
hasPendingInteraction: (sessionId: string) => boolean;
- getAgentKind: (sessionId: string) => 'claude-code' | 'codex' | 'pi' | null;
+ getAgentKind: (sessionId: string) => AgentInputCreateOpts['agentKind'] | null;
getSdkSessionId: (sessionId: string) => Promise<string | undefined>;
/**
* interrupted-turn-resume:判断某条已派发 user 消息之后 agent 是否已产出内容
@@ -2966,7 +2966,7 @@ export class AgentInputCoordinator {
return;
}
- let agentKind: 'claude-code' | 'codex' | null = null;
+ let agentKind: AgentInputCreateOpts['agentKind'] | null = null;
try {
agentKind = this.deps.getAgentKind(sessionId);
} catch (err) {