diff --git a/src/main/index.ts b/src/main/index.ts index ac7b8371..fbd62c4e 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1116,7 +1116,7 @@ if (hasSingleInstanceLock) { : Promise.resolve([]) ]) return createAgentRuntime(defaultWorkspace, settings, { - modelFetcher: net.fetch, + modelFetcher: net.fetch as unknown as typeof fetch, outputStore: { backingStore: storageFiles.backingStore }, outputAdopt: storageFiles.attachments.outputAdopt, observeFailure: observeDesktopFailure, diff --git a/src/main/ipc.ts b/src/main/ipc.ts index e366755b..876fcf30 100644 --- a/src/main/ipc.ts +++ b/src/main/ipc.ts @@ -6319,7 +6319,7 @@ export function registerIpcHandlers( if (profile.authentication === 'api-key' && !profile.apiKey) { throw new Error(`监督者模型连接“${profile.name}”未配置 API Key`) } - return createModelProfileRuntime(settings.workspacePath, settings, profile, net.fetch) + return createModelProfileRuntime(settings.workspacePath, settings, profile, net.fetch as unknown as typeof fetch) } const supervisorService = createProductionSupervisorService(supervisionDatabase, async () => applicationSettingsStore?.get(), resolveSupervisorRuntime, supervisionModelPool,