Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
test(desktop): preserve generic simulator lock type
JiangJiahao776328d4e46b
diff --git a/apps/desktop/src/main/mcp-integrations/__tests__/ios-simulator.test.ts b/apps/desktop/src/main/mcp-integrations/__tests__/ios-simulator.test.tsindex bc6c59000e..ecd83b503e 100644--- a/apps/desktop/src/main/mcp-integrations/__tests__/ios-simulator.test.ts+++ b/apps/desktop/src/main/mcp-integrations/__tests__/ios-simulator.test.ts@@ -898,12 +898,15 @@ describe('iOS Simulator host', () => {bootProvenance: 'agent-booted',device: { ...READY_REPORT.devices[0]!, state: 'Booted' },});- const withSessionLock = vi.fn(- async <T>(_sessionId: string, task: () => Promise<T>): Promise<T> => {- await lockGate;- return task();- },- );+ const observeSessionLock = vi.fn();+ const withSessionLock = async <T>(+ sessionId: string,+ task: () => Promise<T>,+ ): Promise<T> => {+ observeSessionLock(sessionId, task);+ await lockGate;+ return task();+ };const host = createIOSSimulatorHost({actor,lifecycle,@@ -916,12 +919,15 @@ describe('iOS Simulator host', () => {});const reconcile = host.reconcileOwnership();- await vi.waitFor(() => expect(withSessionLock).toHaveBeenCalledOnce());+ await vi.waitFor(() => expect(observeSessionLock).toHaveBeenCalledOnce());status = 'active';releaseLock();await reconcile;- expect(withSessionLock).toHaveBeenCalledWith('archived-then-restored', expect.any(Function));+ expect(observeSessionLock).toHaveBeenCalledWith(+ 'archived-then-restored',+ expect.any(Function),+ );expect(lifecycle.shutdownExact).not.toHaveBeenCalled();expect(lifecycle.deleteExact).not.toHaveBeenCalled();expect(actor.getOwned('archived-then-restored', instance.instanceId)).toMatchObject({