feat
This commit is contained in:
@@ -3,8 +3,7 @@
|
|||||||
; Install: enables long paths, adds resources\cli to user PATH for openclaw CLI.
|
; Install: enables long paths, adds resources\cli to user PATH for openclaw CLI.
|
||||||
; Uninstall: removes the PATH entry and optionally deletes user data.
|
; Uninstall: removes the PATH entry and optionally deletes user data.
|
||||||
|
|
||||||
!ifndef nsProcess_included
|
!ifndef nsProcess::FindProcess
|
||||||
!define nsProcess_included
|
|
||||||
!include "nsProcess.nsh"
|
!include "nsProcess.nsh"
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
@@ -61,7 +60,7 @@
|
|||||||
Goto loop
|
Goto loop
|
||||||
${endIf}
|
${endIf}
|
||||||
not_running:
|
not_running:
|
||||||
nsProcess::Unload
|
${nsProcess::Unload}
|
||||||
${endIf}
|
${endIf}
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
|||||||
@@ -948,7 +948,8 @@ function ProviderContent({
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Validate key if the provider requires one and a key was entered
|
// 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(
|
const result = await window.electron.ipcRenderer.invoke(
|
||||||
'provider:validateKey',
|
'provider:validateKey',
|
||||||
selectedProviderConfigId || selectedProvider,
|
selectedProviderConfigId || selectedProvider,
|
||||||
@@ -1024,9 +1025,10 @@ function ProviderContent({
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Can the user submit?
|
// Can the user submit?
|
||||||
|
const isApiKeyRequired = requiresKey || (supportsApiKey && authMode === 'apikey');
|
||||||
const canSubmit =
|
const canSubmit =
|
||||||
selectedProvider
|
selectedProvider
|
||||||
&& (requiresKey ? apiKey.length > 0 : true)
|
&& (isApiKeyRequired ? apiKey.length > 0 : true)
|
||||||
&& (showModelIdField ? modelId.trim().length > 0 : true)
|
&& (showModelIdField ? modelId.trim().length > 0 : true)
|
||||||
&& !useOAuthFlow;
|
&& !useOAuthFlow;
|
||||||
|
|
||||||
@@ -1197,7 +1199,7 @@ function ProviderContent({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* API Key field (hidden for ollama) */}
|
{/* API Key field (hidden for ollama) */}
|
||||||
{(!isOAuth || (supportsApiKey && authMode === 'apikey')) && requiresKey && (
|
{(!isOAuth || (supportsApiKey && authMode === 'apikey')) && (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
<Label htmlFor="apiKey">{t('provider.apiKey')}</Label>
|
<Label htmlFor="apiKey">{t('provider.apiKey')}</Label>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
|
|||||||
Reference in New Issue
Block a user