From 26937786b9dbbc6cc3b1ba75dc8226ca8aeff7d2 Mon Sep 17 00:00:00 2001 From: Adam-PAN Date: Wed, 19 Aug 2026 21:48:36 +0800 Subject: [PATCH] fix: inline type for profilePayload to avoid missing import --- webview-ui/src/components/settings/ApiOptions.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index 5bd9b774..b7a5b544 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -213,16 +213,22 @@ export const ProfileManager: React.FC<{ currentMode: Mode; showCards?: boolean; return modelInfoMap[selectedProvider] } - const profilePayload = (): Omit => { + const profilePayload = () => { const modelInfo = getCurrentModelInfo() - const payload: Omit = { + const payload: { + provider: typeof selectedProvider + apiKey: string + modelId: string + baseUrl: string + extra?: Record + } = { provider: selectedProvider, apiKey: getCurrentApiKey(), modelId: getCurrentModelId(), baseUrl: getCurrentBaseUrl(), } if (modelInfo) { - ;(payload as any).extra = { profileModelInfo: modelInfo } + payload.extra = { profileModelInfo: modelInfo } } return payload }