Introduce IDE mode installer (#4877)

This commit is contained in:
christine betts
2025-07-30 21:26:31 +00:00
committed by GitHub
parent c1fe688956
commit 7bc8766542
18 changed files with 433 additions and 277 deletions

View File

@@ -0,0 +1,25 @@
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export enum DetectedIde {
VSCode = 'vscode',
}
export function getIdeDisplayName(ide: DetectedIde): string {
switch (ide) {
case DetectedIde.VSCode:
return 'VSCode';
default:
throw new Error(`Unsupported IDE: ${ide}`);
}
}
export function detectIde(): DetectedIde | undefined {
if (process.env.TERM_PROGRAM === 'vscode') {
return DetectedIde.VSCode;
}
return undefined;
}