Add NO_BROWSER environment variable to trigger offline oauth flow (#3713)

This commit is contained in:
Seth Troisi
2025-07-10 18:59:02 -07:00
committed by GitHub
parent ab66e3a24e
commit 8a128d8dc6
11 changed files with 169 additions and 35 deletions

View File

@@ -141,6 +141,7 @@ export interface ConfigParameters {
extensionContextFilePaths?: string[];
listExtensions?: boolean;
activeExtensions?: ActiveExtension[];
noBrowser?: boolean;
}
export class Config {
@@ -179,6 +180,7 @@ export class Config {
private readonly bugCommand: BugCommandSettings | undefined;
private readonly model: string;
private readonly extensionContextFilePaths: string[];
private readonly noBrowser: boolean;
private modelSwitchedDuringSession: boolean = false;
private readonly listExtensions: boolean;
private readonly _activeExtensions: ActiveExtension[];
@@ -227,6 +229,7 @@ export class Config {
this.extensionContextFilePaths = params.extensionContextFilePaths ?? [];
this.listExtensions = params.listExtensions ?? false;
this._activeExtensions = params.activeExtensions ?? [];
this.noBrowser = params.noBrowser ?? false;
if (params.contextFileName) {
setGeminiMdFilename(params.contextFileName);
@@ -475,6 +478,10 @@ export class Config {
return this._activeExtensions;
}
getNoBrowser(): boolean {
return this.noBrowser;
}
async getGitService(): Promise<GitService> {
if (!this.gitService) {
this.gitService = new GitService(this.targetDir);