mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 05:40:35 +00:00
refactor(agents): dedupe fast tool stubs
This commit is contained in:
@@ -1,22 +1 @@
|
||||
import { vi } from "vitest";
|
||||
|
||||
const stubTool = (name: string) => ({
|
||||
name,
|
||||
description: `${name} stub`,
|
||||
parameters: { type: "object", properties: {} },
|
||||
execute: vi.fn(),
|
||||
});
|
||||
|
||||
vi.mock("../tools/image-tool.js", () => ({
|
||||
createImageTool: () => stubTool("image"),
|
||||
}));
|
||||
|
||||
vi.mock("../tools/web-tools.js", () => ({
|
||||
createWebSearchTool: () => null,
|
||||
createWebFetchTool: () => null,
|
||||
}));
|
||||
|
||||
vi.mock("../../plugins/tools.js", () => ({
|
||||
resolvePluginTools: () => [],
|
||||
getPluginToolMeta: () => undefined,
|
||||
}));
|
||||
import "./fast-tool-stubs.js";
|
||||
|
||||
Reference in New Issue
Block a user