refactor: rename to openclaw

This commit is contained in:
Peter Steinberger
2026-01-30 03:15:10 +01:00
parent 4583f88626
commit 9a7160786a
2357 changed files with 16688 additions and 16788 deletions

View File

@@ -7,7 +7,7 @@ import {
normalizeProviderId,
modelKey,
} from "./model-selection.js";
import type { MoltbotConfig } from "../config/config.js";
import type { OpenClawConfig } from "../config/config.js";
describe("model-selection", () => {
describe("normalizeProviderId", () => {
@@ -49,7 +49,7 @@ describe("model-selection", () => {
describe("buildModelAliasIndex", () => {
it("should build alias index from config", () => {
const cfg: Partial<MoltbotConfig> = {
const cfg: Partial<OpenClawConfig> = {
agents: {
defaults: {
models: {
@@ -61,7 +61,7 @@ describe("model-selection", () => {
};
const index = buildModelAliasIndex({
cfg: cfg as MoltbotConfig,
cfg: cfg as OpenClawConfig,
defaultProvider: "anthropic",
});
@@ -105,7 +105,7 @@ describe("model-selection", () => {
describe("resolveConfiguredModelRef", () => {
it("should fall back to anthropic and warn if provider is missing for non-alias", () => {
const warnSpy = vi.spyOn(console, "warn").mockImplementation(() => {});
const cfg: Partial<MoltbotConfig> = {
const cfg: Partial<OpenClawConfig> = {
agents: {
defaults: {
model: "claude-3-5-sonnet",
@@ -114,7 +114,7 @@ describe("model-selection", () => {
};
const result = resolveConfiguredModelRef({
cfg: cfg as MoltbotConfig,
cfg: cfg as OpenClawConfig,
defaultProvider: "google",
defaultModel: "gemini-pro",
});
@@ -127,9 +127,9 @@ describe("model-selection", () => {
});
it("should use default provider/model if config is empty", () => {
const cfg: Partial<MoltbotConfig> = {};
const cfg: Partial<OpenClawConfig> = {};
const result = resolveConfiguredModelRef({
cfg: cfg as MoltbotConfig,
cfg: cfg as OpenClawConfig,
defaultProvider: "openai",
defaultModel: "gpt-4",
});