feat: disengage surface adhesion protocols (#12989)

This commit is contained in:
N. Taylor Mullen
2025-11-12 23:36:18 -08:00
committed by GitHub
parent 0f9ec2735c
commit fe1bfc64f7
4 changed files with 108 additions and 7 deletions

View File

@@ -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') {