mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-10 22:21:22 -07:00
fix(core): avoid 'activate_skill' re-registration warning (#16398)
This commit is contained in:
@@ -2029,7 +2029,7 @@ describe('Config JIT Initialization', () => {
|
||||
expect(mockOnReload).toHaveBeenCalled();
|
||||
expect(skillManager.setDisabledSkills).toHaveBeenCalledWith(['skill2']);
|
||||
expect(toolRegistry.registerTool).toHaveBeenCalled();
|
||||
expect(toolRegistry.unregisterTool).not.toHaveBeenCalledWith(
|
||||
expect(toolRegistry.unregisterTool).toHaveBeenCalledWith(
|
||||
ACTIVATE_SKILL_TOOL_NAME,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -761,6 +761,7 @@ export class Config {
|
||||
|
||||
// Re-register ActivateSkillTool to update its schema with the discovered enabled skill enums
|
||||
if (this.getSkillManager().getSkills().length > 0) {
|
||||
this.getToolRegistry().unregisterTool(ActivateSkillTool.Name);
|
||||
this.getToolRegistry().registerTool(
|
||||
new ActivateSkillTool(this, this.messageBus),
|
||||
);
|
||||
@@ -1568,6 +1569,7 @@ export class Config {
|
||||
|
||||
// Re-register ActivateSkillTool to update its schema with the newly discovered skills
|
||||
if (this.getSkillManager().getSkills().length > 0) {
|
||||
this.getToolRegistry().unregisterTool(ActivateSkillTool.Name);
|
||||
this.getToolRegistry().registerTool(
|
||||
new ActivateSkillTool(this, this.messageBus),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user