(name: string)
| 142 | } |
| 143 | |
| 144 | remove(name: string): void { |
| 145 | if (!this.toolMap.has(name)) { |
| 146 | throw new Error(`Tool \`${name}\` not found in the toolset.`); |
| 147 | } |
| 148 | this.toolMap.delete(name); |
| 149 | } |
| 150 | |
| 151 | handle(toolCall: ToolCall, _options?: { signal?: AbortSignal }): Promise<ToolResult> { |
| 152 | const entry = this.toolMap.get(toolCall.name); |