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: sync main and unify PI orphan recovery test

david13b771d55df5
diff --cc apps/desktop/src/main/scheduler-host/runner.ts
index 178744fe89,0285c0c764..903118ff3e
--- a/apps/desktop/src/main/scheduler-host/runner.ts
+++ b/apps/desktop/src/main/scheduler-host/runner.ts
@@@ -285,17 -285,12 +285,18 @@@ export interface MakerScheduleRunnerDep
sessionId: string,
signal?: AbortSignal,
selection?: ScheduledModelSelection,
+ scheduledModelOverride?: boolean,
) => Promise<(() => void) | ScheduledModelSelectionLease>;
- preserveModelPreferences?: (sessionId: string) => Promise<() => Promise<void>>;
+ prepareModelPreferences?: (sessionId: string, override: boolean) => Promise<void>;
onModelDispatched?: (sessionId: string, clientId: string) => void;
- /** Resolve the same provider-specific snapshot for fresh explicit choices. */
- resolveModelSelection?: (selection: ScheduledModelSelection) => Promise<ScheduledModelSelection>;
+ /**
+ * Resolve the same provider-specific snapshot for fresh explicit choices. With
+ * agentDeviceId the snapshot comes from that computer's authorized catalog.
+ */
+ resolveModelSelection?: (
+ selection: ScheduledModelSelection,
+ location?: { agentDeviceId: string },
+ ) => Promise<ScheduledModelSelection>;
/** Apply Pi's route and context-window transaction while the send lock is held. */
applyPiModelSelectionUnderLock?: (
sessionId: string,
diff --cc apps/desktop/src/renderer/features/scheduler/components/__tests__/ScheduleChip.test.tsx
index 5d06923e08,cfe42e03c2..93b086383f
--- a/apps/desktop/src/renderer/features/scheduler/components/__tests__/ScheduleChip.test.tsx
+++ b/apps/desktop/src/renderer/features/scheduler/components/__tests__/ScheduleChip.test.tsx
@@@ -3,10 -3,11 +3,13 @@@ import { useState } from 'react'
import { cleanup, fireEvent, render, screen } from '@testing-library/react';
import { afterEach, expect, it, vi } from 'vitest';
+ // The shared-quota rail observes auth; this component fixture has no auth host.
+ vi.mock('@/contexts/AuthContext', () => ({ useOptionalAuthUser: () => null }));
+
vi.mock('react-i18next', () => ({
useTranslation: () => ({ t: (key: string) => key, i18n: { language: 'en' } }),
+ // ScheduleChips 经模型面板的远程位置候选间接加载 i18n 初始化。
+ initReactI18next: { type: '3rdParty', init: () => undefined },
}));
import { ScheduleChip } from '../ScheduleChips';
diff --cc apps/desktop/src/renderer/features/scheduler/components/__tests__/ThreadPickerInline.test.tsx
index ba9f27a4d2,c3be1d8814..52d96b7291
--- a/apps/desktop/src/renderer/features/scheduler/components/__tests__/ThreadPickerInline.test.tsx
+++ b/apps/desktop/src/renderer/features/scheduler/components/__tests__/ThreadPickerInline.test.tsx
@@@ -16,10 -16,11 +16,13 @@@ const mocks = vi.hoisted(() => (
}));
vi.mock('@/lib/sessionService', () => ({ list: mocks.list }));
+ // The shared-quota rail observes auth; this component fixture has no auth host.
+ vi.mock('@/contexts/AuthContext', () => ({ useOptionalAuthUser: () => null }));
+
vi.mock('react-i18next', () => ({
useTranslation: () => ({ t: (key: string) => key }),
+ // ScheduleChips 经模型面板的远程位置候选间接加载 i18n 初始化。
+ initReactI18next: { type: '3rdParty', init: () => undefined },
}));
import { ThreadPickerInline } from '../ScheduleChips';
diff --cc docs/product-rules/agent-user-parity.md
index 734e52db5b,9181651067..4708c2a0aa
--- a/docs/product-rules/agent-user-parity.md
+++ b/docs/product-rules/agent-user-parity.md
@@@ -49,10 -49,10 +49,11 @@@
| 任务 | 模型、推理强度、Fast | 有 | 无 |
| 任务 | 删除、Fork、Rewind、切换权限档、代用户确认权限或回答提问 | 无 | 无 |
| 协同 / Worker | 单个 / 批量创建、指定已有目录、查询实际目录与自有 worktree | 有 | 有(运行设备;新建 worktree 仅本机) |
+ | 协同 / Worker | Lead 使用远程供应商时派发跨设备 Worker;独立选择工作电脑与模型电脑 | 有 | 有(`execution_device_id` + `agent_device_id`;目录查询支持同一工作电脑范围) |
| 协同 / Worker | 为 Worker 新建 worktree、指定源分支、归档时回收 | 有 | 无 |
| 定时任务 | 列出、详情、运行记录、修改、暂停、恢复、删除、立即运行 | 有 | 有(2026-10-14) |
-| 定时任务 | 新建、安装检查脚本 | 有 | 无 |
+| 定时任务 | 新建、安装检查脚本 | 有(绑定远程 Agent 时由本机辅助模型生成脚本) | 无 |
+| 定时任务 | 查可选运行位置与模型;设每次新建任务的 Agent 运行位置(其他电脑 / 分享来的供应商) | 有(2026-10-22) | 无 |
| 定时任务 | 删除单条运行记录、标记已读 | 无 | 无 |
| 项目 | 列出、登记、改名、移除;工作目录列表 | 有 | 无 |
| 伙伴 | 发现伙伴、伙伴间消息 | 有 | 有 |