mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-27 21:44:25 -07:00
Refactor subagent delegation to be one tool per agent (#17346)
This commit is contained in:
committed by
GitHub
parent
07bd89399d
commit
2c6781d134
@@ -943,10 +943,10 @@ describe('AgentRegistry', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('getToolDescription', () => {
|
||||
describe('getDirectoryContext', () => {
|
||||
it('should return default message when no agents are registered', () => {
|
||||
expect(registry.getToolDescription()).toContain(
|
||||
'No agents are currently available',
|
||||
expect(registry.getDirectoryContext()).toContain(
|
||||
'No sub-agents are currently available.',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -958,18 +958,12 @@ describe('AgentRegistry', () => {
|
||||
description: 'Another agent description',
|
||||
});
|
||||
|
||||
const description = registry.getToolDescription();
|
||||
const description = registry.getDirectoryContext();
|
||||
|
||||
expect(description).toContain(
|
||||
'Delegates a task to a specialized sub-agent',
|
||||
);
|
||||
expect(description).toContain('Available agents:');
|
||||
expect(description).toContain(
|
||||
`- **${MOCK_AGENT_V1.name}**: ${MOCK_AGENT_V1.description}`,
|
||||
);
|
||||
expect(description).toContain(
|
||||
`- **AnotherAgent**: Another agent description`,
|
||||
);
|
||||
expect(description).toContain('Sub-agents are specialized expert agents');
|
||||
expect(description).toContain('Available Sub-Agents');
|
||||
expect(description).toContain(`- ${MOCK_AGENT_V1.name}`);
|
||||
expect(description).toContain(`- AnotherAgent`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user