MCPcopy Index your code
hub / github.com/anus-dev/ANUS / MockEditToolInvocation

Class MockEditToolInvocation

packages/core/src/core/coreToolScheduler.test.ts:332–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330});
331
332class MockEditToolInvocation extends BaseToolInvocation<
333 Record<string, unknown>,
334 ToolResult
335> {
336 constructor(params: Record<string, unknown>) {
337 super(params);
338 }
339
340 getDescription(): string {
341 return 'A mock edit tool invocation';
342 }
343
344 override async shouldConfirmExecute(
345 _abortSignal: AbortSignal,
346 ): Promise<ToolCallConfirmationDetails | false> {
347 return {
348 type: 'edit',
349 title: 'Confirm Edit',
350 fileName: 'test.txt',
351 filePath: 'test.txt',
352 fileDiff:
353 '--- test.txt\n+++ test.txt\n@@ -1,1 +1,1 @@\n-old content\n+new content',
354 originalContent: 'old content',
355 newContent: 'new content',
356 onConfirm: async () => {},
357 };
358 }
359
360 async execute(_abortSignal: AbortSignal): Promise<ToolResult> {
361 return {
362 llmContent: 'Edited successfully',
363 returnDisplay: 'Edited successfully',
364 };
365 }
366}
367
368class MockEditTool extends BaseDeclarativeTool<
369 Record<string, unknown>,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected