File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,21 @@ export async function activate(ctx: vscode.ExtensionContext): Promise<void> {
1919 //
2020 // This is janky, but that's alright since it provides such minimal
2121 // functionality to the extension.
22- const remoteSSHExtension = vscode . extensions . getExtension ( "ms-vscode-remote.remote-ssh" )
23- if ( ! remoteSSHExtension ) {
22+ const openRemoteSSHExtension = vscode . extensions . getExtension ( "anysphere.open-remote-ssh" )
23+ // If the "anysphere.open-remote-ssh" extension is available, it is used with priority
24+ // If it is not found, then the extension "ms-vscode-remote.remote-ssh" is sought as a fallback.
25+ // This is specifically for non-official VS Code distributions, such as Cursor.
26+ const useRemoteSSHExtension = openRemoteSSHExtension
27+ ? openRemoteSSHExtension
28+ : vscode . extensions . getExtension ( "ms-vscode-remote.remote-ssh" )
29+ if ( ! useRemoteSSHExtension ) {
2430 throw new Error ( "Remote SSH extension not found" )
2531 }
2632 // eslint-disable-next-line @typescript-eslint/no-explicit-any
2733 const vscodeProposed : typeof vscode = ( module as any ) . _load (
2834 "vscode" ,
2935 {
30- filename : remoteSSHExtension ?. extensionPath ,
36+ filename : useRemoteSSHExtension ?. extensionPath ,
3137 } ,
3238 false ,
3339 )
You can’t perform that action at this time.
0 commit comments