Improve user-facing error messages for IDE mode (#5522)

This commit is contained in:
Shreya Keshive
2025-08-04 17:06:17 -04:00
committed by GitHub
parent 11808ef7ed
commit 2180dd13dc
5 changed files with 43 additions and 54 deletions

View File

@@ -11,9 +11,12 @@ export enum DetectedIde {
export function getIdeDisplayName(ide: DetectedIde): string {
switch (ide) {
case DetectedIde.VSCode:
return 'VSCode';
default:
throw new Error(`Unsupported IDE: ${ide}`);
return 'VS Code';
default: {
// This ensures that if a new IDE is added to the enum, we get a compile-time error.
const exhaustiveCheck: never = ide;
return exhaustiveCheck;
}
}
}