cleanup: removed duplicate check from Config.registerCoreTool() (#656)

This commit is contained in:
Bryan Morgan 2025-05-31 16:50:19 -04:00 committed by GitHub
parent 53bf778497
commit b228923446
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ export function createToolRegistry(config: Config): ToolRegistry {
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
const registerCoreTool = (ToolClass: any, ...args: unknown[]) => { const registerCoreTool = (ToolClass: any, ...args: unknown[]) => {
// check both the tool name (.Name) and the class name (.name) // check both the tool name (.Name) and the class name (.name)
if (!tools || tools.has(ToolClass.Name) || tools.has(ToolClass.name)) { if (!tools || tools.has(ToolClass.Name)) {
registry.registerTool(new ToolClass(...args)); registry.registerTool(new ToolClass(...args));
} }
}; };