diff --git a/src/agents/agent-command.compaction-rotation.test.ts b/src/agents/agent-command.compaction-rotation.test.ts index 8bff3a78a0da..47de6b46368e 100644 --- a/src/agents/agent-command.compaction-rotation.test.ts +++ b/src/agents/agent-command.compaction-rotation.test.ts @@ -5,15 +5,17 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vite import { loadSessionStore, saveSessionStore, type SessionEntry } from "../config/sessions.js"; import { CURRENT_SESSION_VERSION } from "../config/sessions/version.js"; import type { OpenClawConfig } from "../config/types.openclaw.js"; +import type { loadManifestModelCatalog } from "./model-catalog.js"; type ProviderModelNormalizationParams = { provider: string; context: { modelId: string } }; +type LoadManifestModelCatalogParams = Parameters[0]; const state = vi.hoisted(() => ({ cfg: undefined as OpenClawConfig | undefined, workspaceDir: undefined as string | undefined, agentDir: undefined as string | undefined, runAgentAttemptMock: vi.fn(), - loadManifestModelCatalogMock: vi.fn(() => []), + loadManifestModelCatalogMock: vi.fn((_params: LoadManifestModelCatalogParams) => []), normalizeProviderModelIdWithRuntimeMock: vi.fn( (_params: ProviderModelNormalizationParams) => undefined, ), @@ -57,7 +59,8 @@ vi.mock("../plugins/manifest-contract-eligibility.js", () => ({ })); vi.mock("./model-catalog.js", () => ({ - loadManifestModelCatalog: (...args: unknown[]) => state.loadManifestModelCatalogMock(...args), + loadManifestModelCatalog: (params: LoadManifestModelCatalogParams) => + state.loadManifestModelCatalogMock(params), })); vi.mock("./provider-model-normalization.runtime.js", () => ({