mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-18 15:52:53 -07:00
Fix recursive generalist agent.
This commit is contained in:
@@ -57,6 +57,7 @@ export const GeneralistAgent = (
|
||||
config,
|
||||
/*useMemory=*/ undefined,
|
||||
/*interactiveOverride=*/ false,
|
||||
/*includeSubagents=*/ false,
|
||||
),
|
||||
query: '${request}',
|
||||
};
|
||||
|
||||
@@ -24,11 +24,13 @@ export function getCoreSystemPrompt(
|
||||
config: Config,
|
||||
userMemory?: string | HierarchicalMemory,
|
||||
interactiveOverride?: boolean,
|
||||
includeSubagents?: boolean,
|
||||
): string {
|
||||
return new PromptProvider().getCoreSystemPrompt(
|
||||
config,
|
||||
userMemory,
|
||||
interactiveOverride,
|
||||
includeSubagents,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ export class PromptProvider {
|
||||
config: Config,
|
||||
userMemory?: string | HierarchicalMemory,
|
||||
interactiveOverride?: boolean,
|
||||
includeSubagents: boolean = true,
|
||||
): string {
|
||||
const systemMdResolution = resolvePathFromEnv(
|
||||
process.env['GEMINI_SYSTEM_MD'],
|
||||
@@ -124,13 +125,15 @@ export class PromptProvider {
|
||||
contextFilenames,
|
||||
})),
|
||||
subAgents: this.withSection('agentContexts', () =>
|
||||
config
|
||||
.getAgentRegistry()
|
||||
.getAllDefinitions()
|
||||
.map((d) => ({
|
||||
name: d.name,
|
||||
description: d.description,
|
||||
})),
|
||||
includeSubagents
|
||||
? config
|
||||
.getAgentRegistry()
|
||||
.getAllDefinitions()
|
||||
.map((d) => ({
|
||||
name: d.name,
|
||||
description: d.description,
|
||||
}))
|
||||
: [],
|
||||
),
|
||||
agentSkills: this.withSection(
|
||||
'agentSkills',
|
||||
|
||||
Reference in New Issue
Block a user