mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 12:47:39 +00:00
refactor: rename to openclaw
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import type { OpenClawConfig } from "../config/config.js";
|
||||
import { resolveEntriesWithActiveFallback, resolveModelEntries } from "./resolve.js";
|
||||
|
||||
const providerRegistry = new Map([
|
||||
@@ -10,7 +10,7 @@ const providerRegistry = new Map([
|
||||
|
||||
describe("resolveModelEntries", () => {
|
||||
it("uses provider capabilities for shared entries without explicit caps", () => {
|
||||
const cfg: MoltbotConfig = {
|
||||
const cfg: OpenClawConfig = {
|
||||
tools: {
|
||||
media: {
|
||||
models: [{ provider: "openai", model: "gpt-5.2" }],
|
||||
@@ -34,7 +34,7 @@ describe("resolveModelEntries", () => {
|
||||
});
|
||||
|
||||
it("keeps per-capability entries even without explicit caps", () => {
|
||||
const cfg: MoltbotConfig = {
|
||||
const cfg: OpenClawConfig = {
|
||||
tools: {
|
||||
media: {
|
||||
image: {
|
||||
@@ -54,7 +54,7 @@ describe("resolveModelEntries", () => {
|
||||
});
|
||||
|
||||
it("skips shared CLI entries without capabilities", () => {
|
||||
const cfg: MoltbotConfig = {
|
||||
const cfg: OpenClawConfig = {
|
||||
tools: {
|
||||
media: {
|
||||
models: [{ type: "cli", command: "gemini", args: ["--file", "{{MediaPath}}"] }],
|
||||
@@ -73,7 +73,7 @@ describe("resolveModelEntries", () => {
|
||||
|
||||
describe("resolveEntriesWithActiveFallback", () => {
|
||||
it("uses active model when enabled and no models are configured", () => {
|
||||
const cfg: MoltbotConfig = {
|
||||
const cfg: OpenClawConfig = {
|
||||
tools: {
|
||||
media: {
|
||||
audio: { enabled: true },
|
||||
@@ -93,7 +93,7 @@ describe("resolveEntriesWithActiveFallback", () => {
|
||||
});
|
||||
|
||||
it("ignores active model when configured entries exist", () => {
|
||||
const cfg: MoltbotConfig = {
|
||||
const cfg: OpenClawConfig = {
|
||||
tools: {
|
||||
media: {
|
||||
audio: { enabled: true, models: [{ provider: "openai", model: "whisper-1" }] },
|
||||
@@ -113,7 +113,7 @@ describe("resolveEntriesWithActiveFallback", () => {
|
||||
});
|
||||
|
||||
it("skips active model when provider lacks capability", () => {
|
||||
const cfg: MoltbotConfig = {
|
||||
const cfg: OpenClawConfig = {
|
||||
tools: {
|
||||
media: {
|
||||
video: { enabled: true },
|
||||
|
||||
Reference in New Issue
Block a user