mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 18:48:27 +00:00
refactor(commands): dedupe auth choice agent model notes
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
normalizeApiKeyInput,
|
||||
validateApiKeyInput,
|
||||
} from "./auth-choice.api-key.js";
|
||||
import { createAuthChoiceAgentModelNoter } from "./auth-choice.apply-helpers.js";
|
||||
import { applyDefaultModelChoice } from "./auth-choice.default-model.js";
|
||||
import { ensureModelAllowlistEntry } from "./model-allowlist.js";
|
||||
import {
|
||||
@@ -27,15 +28,7 @@ export async function applyAuthChoiceHuggingface(
|
||||
|
||||
let nextConfig = params.config;
|
||||
let agentModelOverride: string | undefined;
|
||||
const noteAgentModel = async (model: string) => {
|
||||
if (!params.agentId) {
|
||||
return;
|
||||
}
|
||||
await params.prompter.note(
|
||||
`Default model set to ${model} for agent "${params.agentId}".`,
|
||||
"Model configured",
|
||||
);
|
||||
};
|
||||
const noteAgentModel = createAuthChoiceAgentModelNoter(params);
|
||||
|
||||
let hasCredential = false;
|
||||
let hfKey = "";
|
||||
|
||||
Reference in New Issue
Block a user