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。

test(companions): align settings and lane fixtures with model routes

Chrise4bdb51c169e
diff --git a/apps/desktop/src/main/maker-ipc/__tests__/botGroupLaneTx.test.ts b/apps/desktop/src/main/maker-ipc/__tests__/botGroupLaneTx.test.ts
index 6f950401c5..a3b3c09372 100644
--- a/apps/desktop/src/main/maker-ipc/__tests__/botGroupLaneTx.test.ts
+++ b/apps/desktop/src/main/maker-ipc/__tests__/botGroupLaneTx.test.ts
@@ -61,7 +61,7 @@ describe('Bot group lane transactions', () => {
context_window INTEGER, fast_mode INTEGER, plan_mode_enabled INTEGER, cleared_at INTEGER,
pinned_at INTEGER, user_send_at INTEGER, agent_kind TEXT, orca_role TEXT,
parent_session_id TEXT, forked_at_message_id TEXT, worktree_path TEXT, extra_dirs TEXT,
- remote_host_id TEXT, provider_id TEXT, source TEXT NOT NULL, created_at INTEGER,
+ remote_host_id TEXT, agent_device_id TEXT, provider_id TEXT, source TEXT NOT NULL, created_at INTEGER,
updated_at INTEGER NOT NULL
);
CREATE TABLE bot_session_links (
diff --git a/apps/desktop/src/renderer/__tests__/unifiedModelPanelRendering.test.tsx b/apps/desktop/src/renderer/__tests__/unifiedModelPanelRendering.test.tsx
index 89200ccfdb..0f2fe27f46 100644
--- a/apps/desktop/src/renderer/__tests__/unifiedModelPanelRendering.test.tsx
+++ b/apps/desktop/src/renderer/__tests__/unifiedModelPanelRendering.test.tsx
@@ -55,8 +55,12 @@ vi.mock('react-i18next', async (importOriginal) => ({
}));
vi.mock('@/lib/scrollbarAutoHide', () => ({ flashScrollbar: vi.fn() }));
+vi.mock('@/hooks/useModelRouteDevices', () => ({
+ useModelRouteDevices: () => ({ devices: [], leadAgentDeviceId: null }),
+}));
vi.mock('@/hooks/useAgentCapabilities', () => ({
+ getCachedCapabilities: vi.fn(() => null),
evictDeviceCapabilities: vi.fn(),
prefetchDeviceCapabilities: vi.fn(async () => {}),
useAgentCapabilities: () => ({
diff --git a/apps/desktop/src/renderer/features/bots/__tests__/botSettings.test.tsx b/apps/desktop/src/renderer/features/bots/__tests__/botSettings.test.tsx
index 8b935a8419..65709e1c1f 100644
--- a/apps/desktop/src/renderer/features/bots/__tests__/botSettings.test.tsx
+++ b/apps/desktop/src/renderer/features/bots/__tests__/botSettings.test.tsx
@@ -104,6 +104,9 @@ vi.mock('../BotChannelsPage', () => ({
<div data-testid="bot-channels-page">{bot.id}</div>
),
}));
+vi.mock('@/hooks/useModelRouteDevices', () => ({
+ useModelRouteDevices: () => ({ devices: [], leadAgentDeviceId: null }),
+}));
vi.mock('@/components/new-chat/ModelSelector', () => ({
ModelSelector: ({ unifiedAgents, onUnifiedSelect, modelId, onEffortChange, onNavigateToProviders }: {
onNavigateToProviders?: () => void;