From 3556df8895406092ed88a5ed2920ba5547ac8be4 Mon Sep 17 00:00:00 2001 From: mesalogo Date: Fri, 9 Oct 2026 01:50:03 +0800 Subject: [PATCH] fix: adapt Electron model fetcher type --- src/main/index.ts | 2 +- src/main/ipc.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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,