refactor(agents): dedupe fast tool stubs

This commit is contained in:
Peter Steinberger
2026-02-16 02:17:37 +00:00
parent cbc3de6c97
commit a74251d415
3 changed files with 24 additions and 43 deletions

View File

@@ -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";