mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 01:52:44 +00:00
refactor(commands): dedupe auth choice agent model notes
This commit is contained in:
15
src/commands/auth-choice.apply-helpers.ts
Normal file
15
src/commands/auth-choice.apply-helpers.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import type { ApplyAuthChoiceParams } from "./auth-choice.apply.js";
|
||||
|
||||
export function createAuthChoiceAgentModelNoter(
|
||||
params: ApplyAuthChoiceParams,
|
||||
): (model: string) => Promise<void> {
|
||||
return async (model: string) => {
|
||||
if (!params.agentId) {
|
||||
return;
|
||||
}
|
||||
await params.prompter.note(
|
||||
`Default model set to ${model} for agent "${params.agentId}".`,
|
||||
"Model configured",
|
||||
);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user