mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-13 07:30:52 -07:00
feat: disengage surface adhesion protocols (#12989)
This commit is contained in:
@@ -53,8 +53,7 @@ export interface TerminalSetupResult {
|
||||
|
||||
type SupportedTerminal = 'vscode' | 'cursor' | 'windsurf';
|
||||
|
||||
// Terminal detection
|
||||
async function detectTerminal(): Promise<SupportedTerminal | null> {
|
||||
export function getTerminalProgram(): SupportedTerminal | null {
|
||||
const termProgram = process.env['TERM_PROGRAM'];
|
||||
|
||||
// Check VS Code and its forks - check forks first to avoid false positives
|
||||
@@ -75,6 +74,15 @@ async function detectTerminal(): Promise<SupportedTerminal | null> {
|
||||
if (termProgram === 'vscode' || process.env['VSCODE_GIT_IPC_HANDLE']) {
|
||||
return 'vscode';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Terminal detection
|
||||
async function detectTerminal(): Promise<SupportedTerminal | null> {
|
||||
const envTerminal = getTerminalProgram();
|
||||
if (envTerminal) {
|
||||
return envTerminal;
|
||||
}
|
||||
|
||||
// Check parent process name
|
||||
if (os.platform() !== 'win32') {
|
||||
|
||||
Reference in New Issue
Block a user