mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 22:14:52 -07:00
feat: add native Sublime Text support to IDE detection (#16083)
Co-authored-by: phreakocious <567063+phreakocious@users.noreply.github.com>
This commit is contained in:
@@ -15,6 +15,7 @@ export const IDE_DEFINITIONS = {
|
||||
vscode: { name: 'vscode', displayName: 'VS Code' },
|
||||
vscodefork: { name: 'vscodefork', displayName: 'IDE' },
|
||||
antigravity: { name: 'antigravity', displayName: 'Antigravity' },
|
||||
sublimetext: { name: 'sublimetext', displayName: 'Sublime Text' },
|
||||
} as const;
|
||||
|
||||
export interface IdeInfo {
|
||||
@@ -51,6 +52,9 @@ export function detectIdeFromEnv(): IdeInfo {
|
||||
if (process.env['MONOSPACE_ENV']) {
|
||||
return IDE_DEFINITIONS.firebasestudio;
|
||||
}
|
||||
if (process.env['TERM_PROGRAM'] === 'sublime') {
|
||||
return IDE_DEFINITIONS.sublimetext;
|
||||
}
|
||||
return IDE_DEFINITIONS.vscode;
|
||||
}
|
||||
|
||||
@@ -87,8 +91,11 @@ export function detectIde(
|
||||
};
|
||||
}
|
||||
|
||||
// Only VSCode-based integrations are currently supported.
|
||||
if (process.env['TERM_PROGRAM'] !== 'vscode') {
|
||||
// Only VS Code and Sublime Text integrations are currently supported.
|
||||
if (
|
||||
process.env['TERM_PROGRAM'] !== 'vscode' &&
|
||||
process.env['TERM_PROGRAM'] !== 'sublime'
|
||||
) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user