mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-11 10:30:46 -07:00
feat(core): pass resolved plan directory context to tools and system prompt via activeExtensionName
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user