diff --git a/extensions/discord/src/monitor/native-command.model-picker.test.ts b/extensions/discord/src/monitor/native-command.model-picker.test.ts index 225271e1327..f9078c00467 100644 --- a/extensions/discord/src/monitor/native-command.model-picker.test.ts +++ b/extensions/discord/src/monitor/native-command.model-picker.test.ts @@ -3,6 +3,7 @@ import * as commandRegistryModule from "openclaw/plugin-sdk/command-auth"; import type { ChatCommandDefinition, CommandArgsParsing } from "openclaw/plugin-sdk/command-auth"; import type { ModelsProviderData } from "openclaw/plugin-sdk/command-auth"; import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import * as pluginRuntimeModule from "openclaw/plugin-sdk/plugin-runtime"; import * as dispatcherModule from "openclaw/plugin-sdk/reply-dispatch-runtime"; import * as globalsModule from "openclaw/plugin-sdk/runtime-env"; import * as commandTextModule from "openclaw/plugin-sdk/text-runtime"; @@ -10,6 +11,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import * as modelPickerPreferencesModule from "./model-picker-preferences.js"; import * as modelPickerModule from "./model-picker.js"; import { createModelsProviderData as createBaseModelsProviderData } from "./model-picker.test-utils.js"; +import * as nativeCommandRouteModule from "./native-command-route.js"; import { replyWithDiscordModelPickerProviders } from "./native-command-ui.js"; import { __testing as nativeCommandTesting, @@ -256,9 +258,14 @@ describe("Discord model picker interactions", () => { beforeEach(() => { vi.useRealTimers(); vi.restoreAllMocks(); + nativeCommandTesting.setMatchPluginCommand(pluginRuntimeModule.matchPluginCommand); + nativeCommandTesting.setExecutePluginCommand(pluginRuntimeModule.executePluginCommand); nativeCommandTesting.setDispatchReplyWithDispatcher( dispatcherModule.dispatchReplyWithDispatcher, ); + nativeCommandTesting.setResolveDiscordNativeInteractionRouteState( + nativeCommandRouteModule.resolveDiscordNativeInteractionRouteState, + ); }); afterEach(() => {