mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-02 13:20:21 +00:00
fix: preserve interactive Ollama model selection (#49249) (thanks @BruceMacD)
This commit is contained in:
@@ -410,6 +410,33 @@ describe("runSetupWizard", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("prompts for a model during explicit interactive Ollama setup", async () => {
|
||||
promptDefaultModel.mockClear();
|
||||
const prompter = buildWizardPrompter({});
|
||||
const runtime = createRuntime();
|
||||
|
||||
await runSetupWizard(
|
||||
{
|
||||
acceptRisk: true,
|
||||
flow: "quickstart",
|
||||
authChoice: "ollama",
|
||||
installDaemon: false,
|
||||
skipSkills: true,
|
||||
skipSearch: true,
|
||||
skipHealth: true,
|
||||
skipUi: true,
|
||||
},
|
||||
runtime,
|
||||
prompter,
|
||||
);
|
||||
|
||||
expect(promptDefaultModel).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
allowKeep: false,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("shows plugin compatibility notices for an existing valid config", async () => {
|
||||
buildPluginCompatibilityNotices.mockReturnValue([
|
||||
{
|
||||
|
||||
@@ -482,7 +482,9 @@ export async function runSetupWizard(
|
||||
}
|
||||
}
|
||||
|
||||
if (authChoiceFromPrompt && authChoice !== "custom-api-key") {
|
||||
const shouldPromptModelSelection =
|
||||
authChoice !== "custom-api-key" && (authChoiceFromPrompt || authChoice === "ollama");
|
||||
if (shouldPromptModelSelection) {
|
||||
const modelSelection = await promptDefaultModel({
|
||||
config: nextConfig,
|
||||
prompter,
|
||||
|
||||
Reference in New Issue
Block a user