mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 08:37:41 +00:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import { makePrompter } from "./onboarding/__tests__/test-utils.js";
|
||||
import {
|
||||
applyModelAllowlist,
|
||||
@@ -53,7 +53,7 @@ describe("promptDefaultModel", () => {
|
||||
return first?.value ?? "";
|
||||
});
|
||||
const prompter = makePrompter({ select });
|
||||
const config = { agents: { defaults: {} } } as ClawdbotConfig;
|
||||
const config = { agents: { defaults: {} } } as MoltbotConfig;
|
||||
|
||||
await promptDefaultModel({
|
||||
config,
|
||||
@@ -90,7 +90,7 @@ describe("promptModelAllowlist", () => {
|
||||
params.options.map((option: { value: string }) => option.value),
|
||||
);
|
||||
const prompter = makePrompter({ multiselect });
|
||||
const config = { agents: { defaults: {} } } as ClawdbotConfig;
|
||||
const config = { agents: { defaults: {} } } as MoltbotConfig;
|
||||
|
||||
await promptModelAllowlist({ config, prompter });
|
||||
|
||||
@@ -126,7 +126,7 @@ describe("promptModelAllowlist", () => {
|
||||
params.options.map((option: { value: string }) => option.value),
|
||||
);
|
||||
const prompter = makePrompter({ multiselect });
|
||||
const config = { agents: { defaults: {} } } as ClawdbotConfig;
|
||||
const config = { agents: { defaults: {} } } as MoltbotConfig;
|
||||
|
||||
await promptModelAllowlist({
|
||||
config,
|
||||
@@ -152,7 +152,7 @@ describe("applyModelAllowlist", () => {
|
||||
},
|
||||
},
|
||||
},
|
||||
} as ClawdbotConfig;
|
||||
} as MoltbotConfig;
|
||||
|
||||
const next = applyModelAllowlist(config, ["openai/gpt-5.2"]);
|
||||
expect(next.agents?.defaults?.models).toEqual({
|
||||
@@ -169,7 +169,7 @@ describe("applyModelAllowlist", () => {
|
||||
},
|
||||
},
|
||||
},
|
||||
} as ClawdbotConfig;
|
||||
} as MoltbotConfig;
|
||||
|
||||
const next = applyModelAllowlist(config, []);
|
||||
expect(next.agents?.defaults?.models).toBeUndefined();
|
||||
@@ -184,7 +184,7 @@ describe("applyModelFallbacksFromSelection", () => {
|
||||
model: { primary: "anthropic/claude-opus-4-5" },
|
||||
},
|
||||
},
|
||||
} as ClawdbotConfig;
|
||||
} as MoltbotConfig;
|
||||
|
||||
const next = applyModelFallbacksFromSelection(config, [
|
||||
"anthropic/claude-opus-4-5",
|
||||
@@ -203,7 +203,7 @@ describe("applyModelFallbacksFromSelection", () => {
|
||||
model: { primary: "anthropic/claude-opus-4-5", fallbacks: ["openai/gpt-5.2"] },
|
||||
},
|
||||
},
|
||||
} as ClawdbotConfig;
|
||||
} as MoltbotConfig;
|
||||
|
||||
const next = applyModelFallbacksFromSelection(config, ["openai/gpt-5.2"]);
|
||||
expect(next.agents?.defaults?.model).toEqual({
|
||||
|
||||
Reference in New Issue
Block a user