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(desktop): 去掉新增 mock 的未使用参数

fmfsaisai011859395dc5
diff --git a/apps/desktop/src/main/maker-ipc/__tests__/pluginWriteAccess.test.ts b/apps/desktop/src/main/maker-ipc/__tests__/pluginWriteAccess.test.ts
index bf8e49eaf3..53af65d30b 100644
--- a/apps/desktop/src/main/maker-ipc/__tests__/pluginWriteAccess.test.ts
+++ b/apps/desktop/src/main/maker-ipc/__tests__/pluginWriteAccess.test.ts
@@ -45,7 +45,7 @@ function fixture() {
let setPlan!: (event:unknown, sessionId:string, enabled:boolean)=>Promise<unknown>;
let remote = false;
const persistedResults = new WeakSet<object>();
- const forgetGrants = vi.fn((_sessionId: string) => {});
+ const forgetGrants = vi.fn();
const settingDeps = {...deps, forgetCredentialGrants:forgetGrants, log:{warn:vi.fn()}, ipcMain:{handle:(_name:unknown,fn:typeof setMode)=>{setMode=fn;}}, MAKER_INVOKE:{SET_PERMISSION_MODE:'permission'}, isDeviceLinkInvoke:()=>remote, assertTrustedAppRendererEvent:()=>{}, assertReviewSettingsUnlocked:async()=>{}, isSessionPermissionMode:()=>true, throwIpcError:(code:string,message:string)=>{throw Object.assign(Error(message),{code});}, persistPermissionModeWithoutRuntime:async(_id:string,mode:string)=>(await epoch.client.tx('bots.persistSessionPermission',{mode})).updated, markRemoteSettingPersistedInsideHandler:(result:object)=>persistedResults.add(result)};
new Function(...Object.keys(settingDeps), settingJs)(...Object.values(settingDeps));
expect(setMode, 'SET_PERMISSION_MODE source extraction must register its handler').toBeTypeOf('function');