diff --git a/package.json b/package.json index 7c2bfc1..c5c8ab9 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Gitpod", "description": "Gitpod Support", "publisher": "gitpod", - "version": "0.0.174", + "version": "0.0.175", "license": "MIT", "icon": "resources/gitpod.png", "repository": { diff --git a/src/extension.ts b/src/extension.ts index 8ad021e..8f6296b 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -47,6 +47,21 @@ export async function activate(context: vscode.ExtensionContext) { if (isGitpodFlexRemoteWindow()) { vscode.commands.executeCommand('setContext', 'gitpod.inGitpodFlexRemoteWindow', true); + context.subscriptions.push(vscode.window.registerUriHandler({ + handleUri(uri: vscode.Uri) { + try { + const params: SSHConnectionParams = JSON.parse(uri.query); + const openNewWindow = 'Use New Window'; + vscode.window.showInformationMessage(`We cannot open Gitpod workspace on ${params.gitpodHost} from a Gitpod Flex environment window.`, openNewWindow) + .then(action => { + if (action === openNewWindow) { + vscode.commands.executeCommand('vscode.newWindow', { remoteAuthority: null }); + } + }); + } catch { + } + } + })); return; }