mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 14:35:00 +00:00
refactor: dedupe cli config cron and install flows
This commit is contained in:
@@ -4,8 +4,7 @@ import { normalizeApiKeyInput, validateApiKeyInput } from "./auth-choice.api-key
|
||||
import {
|
||||
normalizeSecretInputModeInput,
|
||||
createAuthChoiceAgentModelNoter,
|
||||
createAuthChoiceDefaultModelApplier,
|
||||
createAuthChoiceModelStateBridge,
|
||||
createAuthChoiceDefaultModelApplierForMutableState,
|
||||
ensureApiKeyFromOptionEnvOrPrompt,
|
||||
normalizeTokenProviderInput,
|
||||
} from "./auth-choice.apply-helpers.js";
|
||||
@@ -317,14 +316,12 @@ export async function applyAuthChoiceApiProviders(
|
||||
let nextConfig = params.config;
|
||||
let agentModelOverride: string | undefined;
|
||||
const noteAgentModel = createAuthChoiceAgentModelNoter(params);
|
||||
const applyProviderDefaultModel = createAuthChoiceDefaultModelApplier(
|
||||
const applyProviderDefaultModel = createAuthChoiceDefaultModelApplierForMutableState(
|
||||
params,
|
||||
createAuthChoiceModelStateBridge({
|
||||
getConfig: () => nextConfig,
|
||||
setConfig: (config) => (nextConfig = config),
|
||||
getAgentModelOverride: () => agentModelOverride,
|
||||
setAgentModelOverride: (model) => (agentModelOverride = model),
|
||||
}),
|
||||
() => nextConfig,
|
||||
(config) => (nextConfig = config),
|
||||
() => agentModelOverride,
|
||||
(model) => (agentModelOverride = model),
|
||||
);
|
||||
|
||||
let authChoice = params.authChoice;
|
||||
|
||||
Reference in New Issue
Block a user