diff options
| author | Billy Biggs <[email protected]> | 2025-07-08 12:57:34 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-08 16:57:34 +0000 |
| commit | c0940a194ea002742cb12d88dee9328a0d2da153 (patch) | |
| tree | d4ecc47c3a297aa1c00d6fc42616491614b4bad5 /packages/core/src | |
| parent | f1647d9e19bf6930bc50bd2e66d2929f8f771503 (diff) | |
Add a command line option to enable and list extensions (#3191)
Diffstat (limited to 'packages/core/src')
| -rw-r--r-- | packages/core/src/config/config.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index ca0714f0..2cea70ca 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -66,6 +66,11 @@ export interface TelemetrySettings { logPrompts?: boolean; } +export interface ActiveExtension { + name: string; + version: string; +} + export class MCPServerConfig { constructor( // For stdio transport @@ -133,6 +138,8 @@ export interface ConfigParameters { bugCommand?: BugCommandSettings; model: string; extensionContextFilePaths?: string[]; + listExtensions?: boolean; + activeExtensions?: ActiveExtension[]; } export class Config { @@ -172,6 +179,8 @@ export class Config { private readonly model: string; private readonly extensionContextFilePaths: string[]; private modelSwitchedDuringSession: boolean = false; + private readonly listExtensions: boolean; + private readonly _activeExtensions: ActiveExtension[]; flashFallbackHandler?: FlashFallbackHandler; constructor(params: ConfigParameters) { @@ -214,6 +223,8 @@ export class Config { this.bugCommand = params.bugCommand; this.model = params.model; this.extensionContextFilePaths = params.extensionContextFilePaths ?? []; + this.listExtensions = params.listExtensions ?? false; + this._activeExtensions = params.activeExtensions ?? []; if (params.contextFileName) { setGeminiMdFilename(params.contextFileName); @@ -446,6 +457,14 @@ export class Config { return this.extensionContextFilePaths; } + getListExtensions(): boolean { + return this.listExtensions; + } + + getActiveExtensions(): ActiveExtension[] { + return this._activeExtensions; + } + async getGitService(): Promise<GitService> { if (!this.gitService) { this.gitService = new GitService(this.targetDir); |
