MCPcopy Create free account
hub / github.com/codeaashu/claude-code / isVSCodeRemoteSSH

Function isVSCodeRemoteSSH

src/commands/terminalSetup/terminalSetup.tsx:39–46  ·  view source on GitHub ↗

* Detect if we're running in a VSCode Remote SSH session. * In this case, keybindings need to be installed on the LOCAL machine, * not the remote server where Claude is running.

()

Source from the content-addressed store, hash-verified

37 * not the remote server where Claude is running.
38 */
39function isVSCodeRemoteSSH(): boolean {
40 const askpassMain = process.env.VSCODE_GIT_ASKPASS_MAIN ?? '';
41 const path = process.env.PATH ?? '';
42
43 // Check both env vars - VSCODE_GIT_ASKPASS_MAIN is more reliable when git extension
44 // is active, and PATH is a fallback. Omit path separator for Windows compatibility.
45 return askpassMain.includes('.vscode-server') || askpassMain.includes('.cursor-server') || askpassMain.includes('.windsurf-server') || path.includes('.vscode-server') || path.includes('.cursor-server') || path.includes('.windsurf-server');
46}
47export function getNativeCSIuTerminalDisplayName(): string | null {
48 if (!env.terminal || !(env.terminal in NATIVE_CSIU_TERMINALS)) {
49 return null;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected