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。

merge: 同步主干并解决容量换机与定时恢复的冲突

guyong2a560d63d278
diff --cc apps/desktop/src/main/maker-ipc/agent-input-coordinator.ts
index 62abc2f14a,fb48e33fc0..6841b405fc
--- a/apps/desktop/src/main/maker-ipc/agent-input-coordinator.ts
+++ b/apps/desktop/src/main/maker-ipc/agent-input-coordinator.ts
@@@ -6732,8 -6749,17 +6762,11 @@@ export class AgentInputCoordinator
signals?: Omit<InterruptedTurnErrorSignals, 'message'>,
): void {
state.providerGroupSwitchHold = null;
+ // Scheduled quota waits belong to the runner; do not hide their error behind
+ // a provider-group takeover that this scheduled path does not start.
+ if (isSchedulerOriginItem(item)) return;
- const candidate = this.deps.providerGroupSwitchCandidate;
- if (!candidate || !this.willNotifyUsageLimitedTurnError(state, item)) return;
- let cause: AutoResumeAgentSwitchCause | null = null;
- try {
- cause = candidate(sessionId, { ...(signals ?? {}), message }, item);
- } catch (err) {
- log.warn('providerGroupSwitchCandidate failed', { sessionId, error: errorMessage(err) });
- }
+ if (!this.willNotifyUsageLimitedTurnError(state, item)) return;
+ const cause = this.getProviderGroupSwitchCandidate(sessionId, item, message, signals);
if (!cause) return;
state.providerGroupSwitchHold = {
id: ++this.providerGroupSwitchHoldSeq,
@@@ -7282,10 -7356,9 +7386,10 @@@
this.notifyResumableTurnErrorDiscarded(sessionId, {
surfaceError: terminalEvent.supersededByUser !== true,
owner: { generation: active.generation, clientId: active.item!.clientId },
+ ...(holdId !== null ? { providerGroupSwitchHoldId: holdId } : {}),
});
}
- if (schedulerItem) {
+ if (schedulerItem && !scheduledQuota) {
state.recovery = null;
this.markPendingExternalTerminalDone(sessionId, state);
this.emit(sessionId);