diff --git a/src/commands/configure.gateway-auth.prompt-auth-config.test.ts b/src/commands/configure.gateway-auth.prompt-auth-config.test.ts index b779ec38de0..48e82086c76 100644 --- a/src/commands/configure.gateway-auth.prompt-auth-config.test.ts +++ b/src/commands/configure.gateway-auth.prompt-auth-config.test.ts @@ -1,4 +1,5 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; +import type { NormalizedModelCatalogRow } from "../model-catalog/index.js"; import type { RuntimeEnv } from "../runtime.js"; import type { WizardPrompter } from "../wizard/prompts.js"; @@ -10,7 +11,7 @@ const mocks = vi.hoisted(() => ({ promptCustomApiConfig: vi.fn(), resolvePluginProviders: vi.fn(() => []), resolveProviderPluginChoice: vi.fn<() => unknown>(() => null), - loadStaticManifestCatalogRowsForList: vi.fn(() => []), + loadStaticManifestCatalogRowsForList: vi.fn<() => readonly NormalizedModelCatalogRow[]>(() => []), resolvePreferredProviderForAuthChoice: vi.fn<() => Promise>( async () => undefined, ), diff --git a/src/commands/model-picker.test.ts b/src/commands/model-picker.test.ts index 551482904e6..073de57700a 100644 --- a/src/commands/model-picker.test.ts +++ b/src/commands/model-picker.test.ts @@ -1,5 +1,6 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; import type { OpenClawConfig } from "../config/config.js"; +import type { NormalizedModelCatalogRow } from "../model-catalog/index.js"; import { applyModelAllowlist, applyModelFallbacksFromSelection, @@ -13,7 +14,9 @@ vi.mock("../agents/model-catalog.js", () => ({ loadModelCatalog, })); -const loadStaticManifestCatalogRowsForList = vi.hoisted(() => vi.fn(() => [])); +const loadStaticManifestCatalogRowsForList = vi.hoisted(() => + vi.fn<() => readonly NormalizedModelCatalogRow[]>(() => []), +); vi.mock("./models/list.manifest-catalog.js", () => ({ loadStaticManifestCatalogRowsForList, })); diff --git a/src/tui/tui-event-handlers.ts b/src/tui/tui-event-handlers.ts index e97687cb8a4..3a1271cf51e 100644 --- a/src/tui/tui-event-handlers.ts +++ b/src/tui/tui-event-handlers.ts @@ -228,7 +228,7 @@ export function createEventHandlers(context: EventHandlerContext) { const activeRunId = state.activeChatRunId; if (!activeRunId) { reconnectPendingRunId = null; - clearStaleStreamingRunIfNoTrackedRunRemains(); + clearStaleStreamingIfNoTrackedRunRemains(); return; } if (!sessionRuns.has(activeRunId)) {