mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-24 03:54:43 -07:00
extract console error to util func (#11675)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user