fix: adapt Electron model fetcher type

This commit is contained in:
mesalogo
2026-10-09 01:50:03 +08:00
parent d7fb4299a3
commit 5c99548694
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,