Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/assets/images/vscode-insiders.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 34 additions & 5 deletions src/shared/openInApps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const ICON_PATHS = {
files: 'files.svg',
cursor: 'cursor.svg',
vscode: 'vscode.png',
'vscode-insiders': 'vscode-insiders.svg',
vscodium: 'vscodium.png',
terminal: 'terminal.png',
xcode: 'xcode.png',
Expand Down Expand Up @@ -100,16 +101,44 @@ export const OPEN_IN_APPS: OpenInAppConfigShape[] = [
'open -n -a "Visual Studio Code" {{path}}',
],
checkCommands: ['code'],
bundleIds: ['com.microsoft.VSCode', 'com.microsoft.VSCodeInsiders'],
bundleIds: ['com.microsoft.VSCode'],
appNames: ['Visual Studio Code'],
},
win32: {
openCommands: ['start "" code {{path}}', 'start "" code-insiders {{path}}'],
checkCommands: ['code', 'code-insiders'],
openCommands: ['start "" code {{path}}'],
checkCommands: ['code'],
},
linux: {
openCommands: ['code {{path}}'],
checkCommands: ['code'],
},
},
},
{
id: 'vscode-insiders',
label: 'VS Code Insiders',
iconPath: ICON_PATHS['vscode-insiders'],
autoInstall: true,
supportsRemote: true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supportsRemote: true has no handler in appIpc.ts

Setting supportsRemote: true here causes VS Code Insiders to appear as a valid remote SSH target, but the remote-handling dispatch in appIpc.ts has no appId === 'vscode-insiders' branch. When a user tries to open a remote worktree in VS Code Insiders it will always fall through to the generic catch-all and return:

{ success: false, error: 'Remote SSH not yet implemented for VS Code Insiders' }

VS Code Insiders registers its own deep-link scheme (vscode-insiders://) and the existing buildRemoteEditorUrl helper already parametrises the scheme — so it just needs to be wired up. The RemoteEditorScheme type in remoteOpenIn.ts is currently 'vscode' | 'cursor' and would also need to be widened.

Until the handler is added you should either:

  1. Remove supportsRemote: true to avoid surfacing a broken feature, or
  2. Add the handler alongside this PR:
// in appIpc.ts, after the 'cursor' branch
} else if (appId === 'vscode-insiders') {
  const remoteUrl = buildRemoteEditorUrl(
    'vscode-insiders',
    connection.host,
    connection.username,
    target
  );
  await shell.openExternal(remoteUrl);
  return { success: true };
}

And in remoteOpenIn.ts:

type RemoteEditorScheme = 'vscode' | 'cursor' | 'vscode-insiders';

hideIfUnavailable: true,
platforms: {
darwin: {
openCommands: [
'command -v code-insiders >/dev/null 2>&1 && code-insiders {{path}}',
'open -n -b com.microsoft.VSCodeInsiders --args {{path}}',
'open -n -a "Visual Studio Code - Insiders" {{path}}',
],
checkCommands: ['code-insiders'],
bundleIds: ['com.microsoft.VSCodeInsiders'],
appNames: ['Visual Studio Code - Insiders'],
},
win32: {
openCommands: ['start "" code-insiders {{path}}'],
checkCommands: ['code-insiders'],
},
linux: {
openCommands: ['code {{path}}', 'code-insiders {{path}}'],
checkCommands: ['code', 'code-insiders'],
openCommands: ['code-insiders {{path}}'],
checkCommands: ['code-insiders'],
},
},
},
Expand Down