fix(patch): cherry-pick 0135b03 to release/v0.33.0-preview.2-pr-21171 [CONFLICTS] (#21336)

Co-authored-by: Shreya Keshive <shreyakeshive@google.com>
This commit is contained in:
gemini-cli-robot
2026-03-05 18:22:08 -05:00
committed by GitHub
parent 393e9a171f
commit 03a8fc3113
24 changed files with 33 additions and 25 deletions
+2 -1
View File
@@ -95,7 +95,8 @@ const mockConfig = {
getNoBrowser: () => false,
getProxy: () => 'http://test.proxy.com:8080',
isBrowserLaunchSuppressed: () => false,
getExperimentalZedIntegration: () => false,
getAcpMode: () => false,
isInteractive: () => true,
} as unknown as Config;
// Mock fetch globally
+2 -2
View File
@@ -271,8 +271,8 @@ async function initOauthClient(
await triggerPostAuthCallbacks(client.credentials);
} else {
// In Zed integration, we skip the interactive consent and directly open the browser
if (!config.getExperimentalZedIntegration()) {
// In ACP mode, we skip the interactive consent and directly open the browser
if (!config.getAcpMode()) {
const userConsent = await getConsentForOauth('');
if (!userConsent) {
throw new FatalCancellationError('Authentication cancelled by user.');
+6 -7
View File
@@ -503,7 +503,7 @@ export interface ConfigParameters {
model: string;
disableLoopDetection?: boolean;
maxSessionTurns?: number;
experimentalZedIntegration?: boolean;
acpMode?: boolean;
listSessions?: boolean;
deleteSession?: string;
listExtensions?: boolean;
@@ -699,7 +699,7 @@ export class Config implements McpContext {
private readonly summarizeToolOutput:
| Record<string, SummarizeToolOutputSettings>
| undefined;
private readonly experimentalZedIntegration: boolean = false;
private readonly acpMode: boolean = false;
private readonly loadMemoryFromIncludeDirectories: boolean = false;
private readonly includeDirectoryTree: boolean = true;
private readonly importFormat: 'tree' | 'flat';
@@ -894,8 +894,7 @@ export class Config implements McpContext {
DEFAULT_PROTECT_LATEST_TURN,
};
this.maxSessionTurns = params.maxSessionTurns ?? -1;
this.experimentalZedIntegration =
params.experimentalZedIntegration ?? false;
this.acpMode = params.acpMode ?? false;
this.listSessions = params.listSessions ?? false;
this.deleteSession = params.deleteSession;
this.listExtensions = params.listExtensions ?? false;
@@ -1148,7 +1147,7 @@ export class Config implements McpContext {
}
});
if (!this.interactive || this.experimentalZedIntegration) {
if (!this.interactive || this.acpMode) {
await this.mcpInitializationPromise;
}
@@ -2205,8 +2204,8 @@ export class Config implements McpContext {
return this.usageStatisticsEnabled;
}
getExperimentalZedIntegration(): boolean {
return this.experimentalZedIntegration;
getAcpMode(): boolean {
return this.acpMode;
}
async waitForMcpInit(): Promise<void> {