mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-21 18:44:30 -07:00
fix(telemetry): Improve Cloud Shell surface type detection for telemetry purposes (#10162)
This commit is contained in:
@@ -21,6 +21,10 @@ export interface IdeInfo {
|
||||
displayName: string;
|
||||
}
|
||||
|
||||
export function isCloudShell(): boolean {
|
||||
return !!(process.env['EDITOR_IN_CLOUD_SHELL'] || process.env['CLOUD_SHELL']);
|
||||
}
|
||||
|
||||
export function detectIdeFromEnv(): IdeInfo {
|
||||
if (process.env['__COG_BASHRC_SOURCED']) {
|
||||
return IDE_DEFINITIONS.devin;
|
||||
@@ -34,7 +38,7 @@ export function detectIdeFromEnv(): IdeInfo {
|
||||
if (process.env['CODESPACES']) {
|
||||
return IDE_DEFINITIONS.codespaces;
|
||||
}
|
||||
if (process.env['EDITOR_IN_CLOUD_SHELL'] || process.env['CLOUD_SHELL']) {
|
||||
if (isCloudShell()) {
|
||||
return IDE_DEFINITIONS.cloudshell;
|
||||
}
|
||||
if (process.env['TERM_PRODUCT'] === 'Trae') {
|
||||
|
||||
Reference in New Issue
Block a user