From 31c183f05038c4ecc5b0d064cc525937c8e0d32b Mon Sep 17 00:00:00 2001 From: paisley <8197966+su8su@users.noreply.github.com> Date: Wed, 4 Mar 2026 16:11:23 +0800 Subject: [PATCH] feat --- scripts/installer.nsh | 5 ++--- src/pages/Setup/index.tsx | 8 +++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/installer.nsh b/scripts/installer.nsh index 71dfed6..74ea8c5 100644 --- a/scripts/installer.nsh +++ b/scripts/installer.nsh @@ -3,8 +3,7 @@ ; Install: enables long paths, adds resources\cli to user PATH for openclaw CLI. ; Uninstall: removes the PATH entry and optionally deletes user data. -!ifndef nsProcess_included - !define nsProcess_included +!ifndef nsProcess::FindProcess !include "nsProcess.nsh" !endif @@ -61,7 +60,7 @@ Goto loop ${endIf} not_running: - nsProcess::Unload + ${nsProcess::Unload} ${endIf} !macroend diff --git a/src/pages/Setup/index.tsx b/src/pages/Setup/index.tsx index 6e7bb6a..f767fe5 100644 --- a/src/pages/Setup/index.tsx +++ b/src/pages/Setup/index.tsx @@ -948,7 +948,8 @@ function ProviderContent({ try { // Validate key if the provider requires one and a key was entered - if (requiresKey && apiKey) { + const isApiKeyRequired = requiresKey || (supportsApiKey && authMode === 'apikey'); + if (isApiKeyRequired && apiKey) { const result = await window.electron.ipcRenderer.invoke( 'provider:validateKey', selectedProviderConfigId || selectedProvider, @@ -1024,9 +1025,10 @@ function ProviderContent({ }; // Can the user submit? + const isApiKeyRequired = requiresKey || (supportsApiKey && authMode === 'apikey'); const canSubmit = selectedProvider - && (requiresKey ? apiKey.length > 0 : true) + && (isApiKeyRequired ? apiKey.length > 0 : true) && (showModelIdField ? modelId.trim().length > 0 : true) && !useOAuthFlow; @@ -1197,7 +1199,7 @@ function ProviderContent({ )} {/* API Key field (hidden for ollama) */} - {(!isOAuth || (supportsApiKey && authMode === 'apikey')) && requiresKey && ( + {(!isOAuth || (supportsApiKey && authMode === 'apikey')) && (