diff options
| author | joshualitt <[email protected]> | 2025-08-06 10:50:02 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-08-06 17:50:02 +0000 |
| commit | 6133bea388a2de69c71a6be6f1450707f2ce4dfb (patch) | |
| tree | 367de1d618069ea80e47d7e86c4fb8f82ad032a7 /packages/core/src/tools/tool-registry.test.ts | |
| parent | 882a97aff998b2f19731e9966d135f1db5a59914 (diff) | |
feat(core): Introduce `DeclarativeTool` and `ToolInvocation`. (#5613)
Diffstat (limited to 'packages/core/src/tools/tool-registry.test.ts')
| -rw-r--r-- | packages/core/src/tools/tool-registry.test.ts | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/packages/core/src/tools/tool-registry.test.ts b/packages/core/src/tools/tool-registry.test.ts index 24b6ca5f..e7c71e14 100644 --- a/packages/core/src/tools/tool-registry.test.ts +++ b/packages/core/src/tools/tool-registry.test.ts @@ -21,7 +21,6 @@ import { sanitizeParameters, } from './tool-registry.js'; import { DiscoveredMCPTool } from './mcp-tool.js'; -import { BaseTool, Icon, ToolResult } from './tools.js'; import { FunctionDeclaration, CallableTool, @@ -32,6 +31,7 @@ import { import { spawn } from 'node:child_process'; import fs from 'node:fs'; +import { MockTool } from '../test-utils/tools.js'; vi.mock('node:fs'); @@ -107,28 +107,6 @@ const createMockCallableTool = ( callTool: vi.fn(), }); -class MockTool extends BaseTool<{ param: string }, ToolResult> { - constructor( - name = 'mock-tool', - displayName = 'A mock tool', - description = 'A mock tool description', - ) { - super(name, displayName, description, Icon.Hammer, { - type: Type.OBJECT, - properties: { - param: { type: Type.STRING }, - }, - required: ['param'], - }); - } - async execute(params: { param: string }): Promise<ToolResult> { - return { - llmContent: `Executed with ${params.param}`, - returnDisplay: `Executed with ${params.param}`, - }; - } -} - const baseConfigParams: ConfigParameters = { cwd: '/tmp', model: 'test-model', |
