extract console error to util func (#11675)

This commit is contained in:
Abhi
2025-10-22 16:09:10 -04:00
committed by GitHub
parent a7faa2080f
commit b40f67b76a
9 changed files with 19 additions and 63 deletions
+6 -17
View File
@@ -1199,24 +1199,13 @@ export class Config {
!allowedTools || allowedTools.includes(definition.name);
if (isAllowed && !isExcluded) {
try {
const messageBusEnabled = this.getEnableMessageBusIntegration();
const wrapper = new SubagentToolWrapper(
definition,
this,
messageBusEnabled ? this.getMessageBus() : undefined,
);
registry.registerTool(wrapper);
} catch (error) {
console.error(
`Failed to wrap agent '${definition.name}' as a tool:`,
error,
);
}
} else if (this.getDebugMode()) {
debugLogger.log(
`[Config] Skipping registration of agent '${definition.name}' due to allow/exclude configuration.`,
const messageBusEnabled = this.getEnableMessageBusIntegration();
const wrapper = new SubagentToolWrapper(
definition,
this,
messageBusEnabled ? this.getMessageBus() : undefined,
);
registry.registerTool(wrapper);
}
}
}