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(orca): 窗口预检用例适配 switchSessionAgent 第 8 参思考意图载体

zyjisdog432aa3aa23a1
diff --git a/apps/desktop/src/renderer/__tests__/orcaModelWindowSelection.test.ts b/apps/desktop/src/renderer/__tests__/orcaModelWindowSelection.test.ts
index e7e4d1ff1a..5c46f04d22 100644
--- a/apps/desktop/src/renderer/__tests__/orcaModelWindowSelection.test.ts
+++ b/apps/desktop/src/renderer/__tests__/orcaModelWindowSelection.test.ts
@@ -74,8 +74,10 @@ describe('Orca same-Agent window preflight', () => {
h.confirmDialog.mockResolvedValue(true);
expect(await h.pick(agent, 'small', 'provider')).toBe(true);
+ // 第 8 参是 #5044 的 targetThinking 载体;本 harness 无 modelMemory →
+ // 不猜、传 undefined。
expect(h.switchSessionAgent).toHaveBeenCalledWith('s1', agent, 'small', 'provider', 'high', false,
- { confirmedContextWindow: 200000 });
+ { confirmedContextWindow: 200000 }, undefined);
}
});
@@ -132,7 +134,7 @@ describe('Orca same-Agent window preflight', () => {
expect(h.confirmDialog).not.toHaveBeenCalled();
expect(h.bindings.resolveProviderModelContextWindow).not.toHaveBeenCalled();
expect(h.switchSessionAgent).toHaveBeenCalledWith('s1', 'codex', 'small', 'provider', 'high', false,
- { agentDeviceId: 'share:alice-share' });
+ { agentDeviceId: 'share:alice-share' }, undefined);
}
});
@@ -147,7 +149,8 @@ describe('Orca same-Agent window preflight', () => {
it('does not turn an unknown target window into acknowledgement', async () => {
const h = setup({ target: Number.NaN });
expect(await h.pick('codex', 'unknown', 'provider')).toBe(true);
- expect(h.switchSessionAgent).toHaveBeenCalledWith('s1', 'codex', 'unknown', 'provider', 'high', false);
+ expect(h.switchSessionAgent).toHaveBeenCalledWith('s1', 'codex', 'unknown', 'provider', 'high', false,
+ undefined, undefined);
});
it('rechecks a pending route when selected again, while axis-only edits skip the dialog', async () => {
@@ -159,7 +162,7 @@ describe('Orca same-Agent window preflight', () => {
h.confirmDialog.mockResolvedValue(true);
expect(await h.pick('codex', 'old-model', 'old-provider')).toBe(true);
expect(h.switchSessionAgent).toHaveBeenLastCalledWith('s1', 'codex', 'old-model', 'old-provider', 'high', false,
- { confirmedContextWindow: 200000 });
+ { confirmedContextWindow: 200000 }, undefined);
h.confirmDialog.mockClear();
expect(await h.pick('codex', 'old-model', 'old-provider', { effort: 'high', axesOnly: true })).toBe(true);
expect(h.confirmDialog).not.toHaveBeenCalled();