Skip to content

Commit 634a16d

Browse files
jeanp413akosyakov
authored andcommitted
Show message when extension disabled in gitpod flex environment
1 parent 79e4915 commit 634a16d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Gitpod",
44
"description": "Gitpod Support",
55
"publisher": "gitpod",
6-
"version": "0.0.174",
6+
"version": "0.0.175",
77
"license": "MIT",
88
"icon": "resources/gitpod.png",
99
"repository": {

src/extension.ts

+15
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,21 @@ export async function activate(context: vscode.ExtensionContext) {
4747

4848
if (isGitpodFlexRemoteWindow()) {
4949
vscode.commands.executeCommand('setContext', 'gitpod.inGitpodFlexRemoteWindow', true);
50+
context.subscriptions.push(vscode.window.registerUriHandler({
51+
handleUri(uri: vscode.Uri) {
52+
try {
53+
const params: SSHConnectionParams = JSON.parse(uri.query);
54+
const openNewWindow = 'Use New Window';
55+
vscode.window.showInformationMessage(`We cannot open Gitpod workspace on ${params.gitpodHost} from a Gitpod Flex environment window.`, openNewWindow)
56+
.then(action => {
57+
if (action === openNewWindow) {
58+
vscode.commands.executeCommand('vscode.newWindow', { remoteAuthority: null });
59+
}
60+
});
61+
} catch {
62+
}
63+
}
64+
}));
5065
return;
5166
}
5267

0 commit comments

Comments
 (0)