Update auth-choice.default-model.ts
This commit is contained in:
parent
b720016087
commit
a6fe38846c
@ -5,21 +5,21 @@ export async function applyDefaultModelChoice(params: {
|
||||
config: ClawdbotConfig;
|
||||
setDefaultModel: boolean;
|
||||
defaultModel: string;
|
||||
applyDefaultConfig: (config: ClawdbotConfig) => ClawdbotConfig | Promise<ClawdbotConfig>;
|
||||
applyProviderConfig: (config: ClawdbotConfig) => ClawdbotConfig | Promise<ClawdbotConfig>;
|
||||
applyDefaultConfig: (config: ClawdbotConfig) => ClawdbotConfig;
|
||||
applyProviderConfig: (config: ClawdbotConfig) => ClawdbotConfig;
|
||||
noteDefault?: string;
|
||||
noteAgentModel: (model: string) => Promise<void>;
|
||||
prompter: WizardPrompter;
|
||||
}): Promise<{ config: ClawdbotConfig; agentModelOverride?: string }> {
|
||||
if (params.setDefaultModel) {
|
||||
const next = await params.applyDefaultConfig(params.config);
|
||||
const next = params.applyDefaultConfig(params.config);
|
||||
if (params.noteDefault) {
|
||||
await params.prompter.note(`Default model set to ${params.noteDefault}`, "Model configured");
|
||||
}
|
||||
return { config: next };
|
||||
}
|
||||
|
||||
const next = await params.applyProviderConfig(params.config);
|
||||
const next = params.applyProviderConfig(params.config);
|
||||
await params.noteAgentModel(params.defaultModel);
|
||||
return { config: next, agentModelOverride: params.defaultModel };
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user