feat(core): pass resolved plan directory context to tools and system prompt via activeExtensionName

This commit is contained in:
Mahima Shanware
2026-04-14 07:21:09 +00:00
parent ece2b0c3a0
commit f94dbbeb46
8 changed files with 121 additions and 23 deletions
@@ -26,6 +26,9 @@ export interface AgentLoopContext {
/** The unique ID for the parent session if this is a subagent. */
readonly parentSessionId?: string;
/** The name of the active extension driving this context, if any. */
readonly activeExtensionName?: string;
/** The registry of tools available to the agent in this context. */
readonly toolRegistry: ToolRegistry;
+11
View File
@@ -737,6 +737,17 @@ export class Config implements McpContext, AgentLoopContext {
private blockedEnvironmentVariables: string[];
private readonly enableEnvironmentVariableRedaction: boolean;
private _promptRegistry!: PromptRegistry;
private _activeExtensionName?: string;
get activeExtensionName(): string | undefined {
return (
this._activeExtensionName || process.env['GEMINI_CLI_ACTIVE_EXTENSION']
);
}
setActiveExtensionName(name: string | undefined): void {
this._activeExtensionName = name;
}
private _resourceRegistry!: ResourceRegistry;
private agentRegistry!: AgentRegistry;
private readonly acknowledgedAgentsService: AcknowledgedAgentsService;