fix(patch): cherry-pick b2d6dc4 to release/v0.35.0-preview.4-pr-23546 [CONFLICTS] (#23585)

Co-authored-by: Abhi <43648792+abhipatel12@users.noreply.github.com>
Co-authored-by: Abhi <abhipatel@google.com>
This commit is contained in:
gemini-cli-robot
2026-03-23 15:40:50 -07:00
committed by GitHub
parent 63c6560a38
commit e88b56bbcb
10 changed files with 63 additions and 11 deletions
+3 -2
View File
@@ -951,7 +951,7 @@ export class Config implements McpContext, AgentLoopContext {
this.model = params.model;
this.disableLoopDetection = params.disableLoopDetection ?? false;
this._activeModel = params.model;
this.enableAgents = params.enableAgents ?? true;
this.enableAgents = params.enableAgents ?? false;
this.agents = params.agents ?? {};
this.disableLLMCorrection = params.disableLLMCorrection ?? true;
this.planEnabled = params.plan ?? true;
@@ -3196,7 +3196,8 @@ export class Config implements McpContext, AgentLoopContext {
for (const definition of definitions) {
try {
if (
!this.isAgentsEnabled() ||
(!this.isAgentsEnabled() &&
!this.agentRegistry.isBuiltIn(definition.name)) ||
agentsOverrides[definition.name]?.enabled === false
) {
continue;