* 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.
()
| 37 | * not the remote server where Claude is running. |
| 38 | */ |
| 39 | function 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 | } |
| 47 | export function getNativeCSIuTerminalDisplayName(): string | null { |
| 48 | if (!env.terminal || !(env.terminal in NATIVE_CSIU_TERMINALS)) { |
| 49 | return null; |
no outgoing calls
no test coverage detected