MCPcopy Create free account
hub / github.com/anus-dev/ANUS / constructor

Method constructor

packages/cli/src/ui/hooks/useToolScheduler.test.ts:96–126  ·  view source on GitHub ↗
(
    name: string,
    displayName: string,
    canUpdateOutput = false,
    shouldConfirm = false,
    isOutputMarkdown = false,
  )

Source from the content-addressed store, hash-verified

94
95class MockTool extends BaseDeclarativeTool<object, ToolResult> {
96 constructor(
97 name: string,
98 displayName: string,
99 canUpdateOutput = false,
100 shouldConfirm = false,
101 isOutputMarkdown = false,
102 ) {
103 super(
104 name,
105 displayName,
106 'A mock tool for testing',
107 Kind.Other,
108 {},
109 isOutputMarkdown,
110 canUpdateOutput,
111 );
112 if (shouldConfirm) {
113 this.shouldConfirmExecute.mockImplementation(
114 async (): Promise<ToolCallConfirmationDetails | false> => ({
115 type: 'edit',
116 title: 'Mock Tool Requires Confirmation',
117 onConfirm: mockOnUserConfirmForToolConfirmation,
118 filePath: 'mock',
119 fileName: 'mockToolRequiresConfirmation.ts',
120 fileDiff: 'Mock tool requires confirmation',
121 originalContent: 'Original content',
122 newContent: 'New content',
123 }),
124 );
125 }
126 }
127
128 execute = vi.fn();
129 shouldConfirmExecute = vi.fn();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected