mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-06-01 19:03:42 +00:00
feat(core): Enable generalist agent (#19665)
This commit is contained in:
@@ -24,8 +24,7 @@ export const GeneralistAgent = (
|
||||
name: 'generalist',
|
||||
displayName: 'Generalist Agent',
|
||||
description:
|
||||
"A general-purpose AI agent with access to all tools. Use it for complex tasks that don't fit into other specialized agents.",
|
||||
experimental: true,
|
||||
'A general-purpose AI agent with access to all tools. Highly recommended for tasks that are turn-intensive or involve processing large amounts of data. Use this to keep the main session history lean and efficient. Excellent for: batch refactoring/error fixing across multiple files, running commands with high-volume output, and speculative investigations.',
|
||||
inputConfig: {
|
||||
inputSchema: {
|
||||
type: 'object',
|
||||
|
||||
@@ -50,6 +50,7 @@ function makeMockedConfig(params?: Partial<ConfigParameters>): Config {
|
||||
} as unknown as ToolRegistry);
|
||||
vi.spyOn(config, 'getAgentRegistry').mockReturnValue({
|
||||
getDirectoryContext: () => 'mock directory context',
|
||||
getAllDefinitions: () => [],
|
||||
} as unknown as AgentRegistry);
|
||||
return config;
|
||||
}
|
||||
@@ -262,6 +263,7 @@ describe('AgentRegistry', () => {
|
||||
overrides: {
|
||||
codebase_investigator: { enabled: false },
|
||||
cli_help: { enabled: false },
|
||||
generalist: { enabled: false },
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -299,13 +301,13 @@ describe('AgentRegistry', () => {
|
||||
expect(registry.getDefinition('cli_help')).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should NOT register generalist agent by default (because it is experimental)', async () => {
|
||||
it('should register generalist agent by default', async () => {
|
||||
const config = makeMockedConfig();
|
||||
const registry = new TestableAgentRegistry(config);
|
||||
|
||||
await registry.initialize();
|
||||
|
||||
expect(registry.getDefinition('generalist')).toBeUndefined();
|
||||
expect(registry.getDefinition('generalist')).toBeDefined();
|
||||
});
|
||||
|
||||
it('should register generalist agent if explicitly enabled via override', async () => {
|
||||
|
||||
Reference in New Issue
Block a user