Skip to content

Commit 50f626e

Browse files
akosyakovjeanp413
authored andcommitted
enable VS Code Desktop in stable
1 parent ccd52d6 commit 50f626e

File tree

5 files changed

+42
-46
lines changed

5 files changed

+42
-46
lines changed

extensions/gitpod-remote/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "%displayName%",
44
"description": "%description%",
55
"publisher": "gitpod",
6-
"version": "0.0.20",
6+
"version": "0.0.21",
77
"license": "MIT",
88
"preview": true,
99
"icon": "resources/gitpod.png",
@@ -111,17 +111,17 @@
111111
{
112112
"command": "gitpod.openInStable",
113113
"title": "%openInStable%",
114-
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'web' && gitpod.ideAlias == 'code-latest'"
114+
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'web'"
115115
},
116116
{
117117
"command": "gitpod.openInInsiders",
118118
"title": "%openInInsiders%",
119-
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'web' && gitpod.ideAlias == 'code-latest'"
119+
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'web'"
120120
},
121121
{
122122
"command": "gitpod.openInBrowser",
123123
"title": "%openInBrowser%",
124-
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'desktop' && gitpod.ideAlias == 'code-latest'"
124+
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'desktop'"
125125
}
126126
],
127127
"menus": {
@@ -204,17 +204,17 @@
204204
{
205205
"command": "gitpod.openInStable",
206206
"group": "remote_00_gitpod_navigation@900",
207-
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'web' && gitpod.ideAlias == 'code-latest'"
207+
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'web'"
208208
},
209209
{
210210
"command": "gitpod.openInInsiders",
211211
"group": "remote_00_gitpod_navigation@1000",
212-
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'web' && gitpod.ideAlias == 'code-latest'"
212+
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'web'"
213213
},
214214
{
215215
"command": "gitpod.openInBrowser",
216216
"group": "remote_00_gitpod_navigation@1000",
217-
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'desktop' && gitpod.ideAlias == 'code-latest'"
217+
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'desktop'"
218218
}
219219
]
220220
}

extensions/gitpod-shared/scripts/inflate.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,17 @@ const commands = [
106106
{
107107
'command': 'gitpod.openInStable',
108108
'title': '%openInStable%',
109-
'enablement': 'gitpod.inWorkspace == true && gitpod.UIKind == \'web\' && gitpod.ideAlias == \'code-latest\''
109+
'enablement': 'gitpod.inWorkspace == true && gitpod.UIKind == \'web\''
110110
},
111111
{
112112
'command': 'gitpod.openInInsiders',
113113
'title': '%openInInsiders%',
114-
'enablement': 'gitpod.inWorkspace == true && gitpod.UIKind == \'web\' && gitpod.ideAlias == \'code-latest\''
114+
'enablement': 'gitpod.inWorkspace == true && gitpod.UIKind == \'web\''
115115
},
116116
{
117117
'command': 'gitpod.openInBrowser',
118118
'title': '%openInBrowser%',
119-
'enablement': 'gitpod.inWorkspace == true && gitpod.UIKind == \'desktop\' && gitpod.ideAlias == \'code-latest\''
119+
'enablement': 'gitpod.inWorkspace == true && gitpod.UIKind == \'desktop\''
120120
}
121121
];
122122

@@ -199,17 +199,17 @@ const remoteMenus = [
199199
{
200200
'command': 'gitpod.openInStable',
201201
'group': 'remote_00_gitpod_navigation@900',
202-
'when': 'gitpod.inWorkspace == true && gitpod.UIKind == \'web\' && gitpod.ideAlias == \'code-latest\''
202+
'when': 'gitpod.inWorkspace == true && gitpod.UIKind == \'web\''
203203
},
204204
{
205205
'command': 'gitpod.openInInsiders',
206206
'group': 'remote_00_gitpod_navigation@1000',
207-
'when': 'gitpod.inWorkspace == true && gitpod.UIKind == \'web\' && gitpod.ideAlias == \'code-latest\''
207+
'when': 'gitpod.inWorkspace == true && gitpod.UIKind == \'web\''
208208
},
209209
{
210210
'command': 'gitpod.openInBrowser',
211211
'group': 'remote_00_gitpod_navigation@1000',
212-
'when': 'gitpod.inWorkspace == true && gitpod.UIKind == \'desktop\' && gitpod.ideAlias == \'code-latest\''
212+
'when': 'gitpod.inWorkspace == true && gitpod.UIKind == \'desktop\''
213213
}
214214
];
215215

extensions/gitpod-shared/src/features.ts

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -321,29 +321,27 @@ export async function registerWorkspaceCommands(context: GitpodExtensionContext)
321321
vscode.env.openExternal(vscode.Uri.parse('https://github.com/gitpod-io/gitpod/issues/new/choose'))
322322
));
323323

324-
if (context.info.getIdeAlias() === 'code-latest') {
325-
if (vscode.env.uiKind === vscode.UIKind.Web) {
326-
function openDesktop(scheme: 'vscode' | 'vscode-insiders'): void {
327-
const uri = vscode.workspace.workspaceFile || vscode.workspace.workspaceFolders?.[0]?.uri;
328-
vscode.env.openExternal(vscode.Uri.from({
329-
scheme,
330-
authority: 'gitpod.gitpod-desktop',
331-
path: uri?.path || context.info.getWorkspaceLocationFile() || context.info.getWorkspaceLocationFolder() || context.info.getCheckoutLocation(),
332-
query: JSON.stringify({
333-
instanceId: context.info.getInstanceId(),
334-
workspaceId: context.info.getWorkspaceId(),
335-
gitpodHost: context.info.getGitpodHost()
336-
})
337-
}));
338-
}
339-
context.subscriptions.push(vscode.commands.registerCommand('gitpod.openInStable', () => openDesktop('vscode')));
340-
context.subscriptions.push(vscode.commands.registerCommand('gitpod.openInInsiders', () => openDesktop('vscode-insiders')));
341-
}
342-
if (vscode.env.uiKind === vscode.UIKind.Desktop) {
343-
context.subscriptions.push(vscode.commands.registerCommand('gitpod.openInBrowser', () =>
344-
vscode.env.openExternal(vscode.Uri.parse(context.info.getWorkspaceUrl()))
345-
));
324+
if (vscode.env.uiKind === vscode.UIKind.Web) {
325+
function openDesktop(scheme: 'vscode' | 'vscode-insiders'): void {
326+
const uri = vscode.workspace.workspaceFile || vscode.workspace.workspaceFolders?.[0]?.uri;
327+
vscode.env.openExternal(vscode.Uri.from({
328+
scheme,
329+
authority: 'gitpod.gitpod-desktop',
330+
path: uri?.path || context.info.getWorkspaceLocationFile() || context.info.getWorkspaceLocationFolder() || context.info.getCheckoutLocation(),
331+
query: JSON.stringify({
332+
instanceId: context.info.getInstanceId(),
333+
workspaceId: context.info.getWorkspaceId(),
334+
gitpodHost: context.info.getGitpodHost()
335+
})
336+
}));
346337
}
338+
context.subscriptions.push(vscode.commands.registerCommand('gitpod.openInStable', () => openDesktop('vscode')));
339+
context.subscriptions.push(vscode.commands.registerCommand('gitpod.openInInsiders', () => openDesktop('vscode-insiders')));
340+
}
341+
if (vscode.env.uiKind === vscode.UIKind.Desktop) {
342+
context.subscriptions.push(vscode.commands.registerCommand('gitpod.openInBrowser', () =>
343+
vscode.env.openExternal(vscode.Uri.parse(context.info.getWorkspaceUrl()))
344+
));
347345
}
348346

349347
const communityStatusBarItem = vscode.window.createStatusBarItem('gitpod.community', vscode.StatusBarAlignment.Right, -100);

extensions/gitpod-web/package.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,17 @@
101101
{
102102
"command": "gitpod.openInStable",
103103
"title": "%openInStable%",
104-
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'web' && gitpod.ideAlias == 'code-latest'"
104+
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'web'"
105105
},
106106
{
107107
"command": "gitpod.openInInsiders",
108108
"title": "%openInInsiders%",
109-
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'web' && gitpod.ideAlias == 'code-latest'"
109+
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'web'"
110110
},
111111
{
112112
"command": "gitpod.openInBrowser",
113113
"title": "%openInBrowser%",
114-
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'desktop' && gitpod.ideAlias == 'code-latest'"
114+
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'desktop'"
115115
},
116116
{
117117
"command": "gitpod.ports.openBrowser",
@@ -197,13 +197,11 @@
197197
},
198198
{
199199
"command": "gitpod.openInStable",
200-
"group": "gitpod@70",
201-
"when": "gitpod.ideAlias == 'code-latest'"
200+
"group": "gitpod@70"
202201
},
203202
{
204203
"command": "gitpod.openInInsiders",
205-
"group": "gitpod@80",
206-
"when": "gitpod.ideAlias == 'code-latest'"
204+
"group": "gitpod@80"
207205
}
208206
],
209207
"accounts/context": [
@@ -400,17 +398,17 @@
400398
{
401399
"command": "gitpod.openInStable",
402400
"group": "remote_00_gitpod_navigation@900",
403-
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'web' && gitpod.ideAlias == 'code-latest'"
401+
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'web'"
404402
},
405403
{
406404
"command": "gitpod.openInInsiders",
407405
"group": "remote_00_gitpod_navigation@1000",
408-
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'web' && gitpod.ideAlias == 'code-latest'"
406+
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'web'"
409407
},
410408
{
411409
"command": "gitpod.openInBrowser",
412410
"group": "remote_00_gitpod_navigation@1000",
413-
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'desktop' && gitpod.ideAlias == 'code-latest'"
411+
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'desktop'"
414412
}
415413
]
416414
},

extensions/gitpod/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "%displayName%",
44
"description": "%description%",
55
"publisher": "gitpod",
6-
"version": "0.0.20",
6+
"version": "0.0.21",
77
"license": "MIT",
88
"preview": true,
99
"icon": "resources/gitpod.png",

0 commit comments

Comments
 (0)