Fix recursive generalist agent.

This commit is contained in:
Christian Gunderman
2026-03-12 19:53:09 -07:00
parent 97bc3f28c5
commit f51891b270
3 changed files with 13 additions and 7 deletions
@@ -57,6 +57,7 @@ export const GeneralistAgent = (
config,
/*useMemory=*/ undefined,
/*interactiveOverride=*/ false,
/*includeSubagents=*/ false,
),
query: '${request}',
};
+2
View File
@@ -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,
);
}
+10 -7
View File
@@ -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',