(name: string)
| 12 | } |
| 13 | |
| 14 | unregisterTool(name: string) { |
| 15 | const tool = this.getToolByName(name); |
| 16 | const assistantManager = require('./assistant-manager').default; |
| 17 | if (assistantManager.getAssistants().find(a => a.tools?.includes(tool))) |
| 18 | throw new Error(`Can not unregister Tool "${name}" because there is an assistant using it.`); |
| 19 | delete this.#tools[name]; |
| 20 | } |
| 21 | |
| 22 | getToolByName(name: string) { |
| 23 | const tool = this.#tools[name]; |
nothing calls this directly
no test coverage detected