mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-25 05:21:03 -07:00
feat(core): refine User-Agent for VS Code traffic (unified format) (#23256)
This commit is contained in:
@@ -37,9 +37,10 @@ export function determineSurface(): string {
|
||||
return ide.name;
|
||||
}
|
||||
|
||||
// If the detected IDE is 'vscode', we only accept it if TERM_PROGRAM confirms it.
|
||||
// This prevents generic terminals from being misidentified as VSCode.
|
||||
if (process.env['TERM_PROGRAM'] === 'vscode') {
|
||||
// If the detected IDE is 'vscode', we only accept it if TERM_PROGRAM or VSCODE_PID confirms it.
|
||||
// This prevents generic terminals from being misidentified as VSCode, while still detecting
|
||||
// background processes spawned by the VS Code extension host (like a2a-server).
|
||||
if (process.env['TERM_PROGRAM'] === 'vscode' || process.env['VSCODE_PID']) {
|
||||
return ide.name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user