Skip to content

Commit e6fee67

Browse files
committed
Remove duplicate commands
Fixes https://linear.app/gitpod/issue/EXP-431
1 parent 64af262 commit e6fee67

File tree

4 files changed

+18
-54
lines changed

4 files changed

+18
-54
lines changed

gitpod-remote/package.json

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@
3939
"segmentKey": "YErmvd89wPsrCuGcVnF2XAl846W9WIGl",
4040
"contributes": {
4141
"commands": [
42-
{
43-
"command": "gitpod.stop.ws",
44-
"title": "%stopWorkspace%",
45-
"enablement": "gitpod.inWorkspace == true && gitpod.workspaceOwned == true"
46-
},
4742
{
4843
"command": "gitpod.open.settings",
4944
"title": "%openSettings%",
@@ -54,11 +49,6 @@
5449
"title": "%openAccessControl%",
5550
"enablement": "gitpod.inWorkspace == true"
5651
},
57-
{
58-
"command": "gitpod.open.context",
59-
"title": "%openContext%",
60-
"enablement": "gitpod.inWorkspace == true"
61-
},
6252
{
6353
"command": "gitpod.open.dashboard",
6454
"title": "%openDashboard%",
@@ -114,11 +104,6 @@
114104
"title": "%stopSharingWorkspace%",
115105
"enablement": "gitpod.inWorkspace == true && gitpod.workspaceOwned == true && gitpod.workspaceShared == true"
116106
},
117-
{
118-
"command": "gitpod.openInBrowser",
119-
"title": "%openInBrowser%",
120-
"enablement": "gitpod.inWorkspace == true && gitpod.UIKind == 'desktop'"
121-
},
122107
{
123108
"command": "gitpod.ports.openBrowser",
124109
"title": "%openBrowser%",
@@ -192,11 +177,6 @@
192177
],
193178
"menus": {
194179
"statusBar/remoteIndicator": [
195-
{
196-
"command": "gitpod.stop.ws",
197-
"group": "remote_00_gitpod_navigation@10",
198-
"when": "gitpod.inWorkspace == true && gitpod.workspaceOwned == true"
199-
},
200180
{
201181
"command": "gitpod.open.settings",
202182
"group": "remote_00_gitpod_navigation@20",
@@ -207,11 +187,6 @@
207187
"group": "remote_00_gitpod_navigation@30",
208188
"when": "gitpod.inWorkspace == true"
209189
},
210-
{
211-
"command": "gitpod.open.context",
212-
"group": "remote_00_gitpod_navigation@40",
213-
"when": "gitpod.inWorkspace == true"
214-
},
215190
{
216191
"command": "gitpod.open.dashboard",
217192
"group": "remote_00_gitpod_navigation@50",
@@ -261,11 +236,6 @@
261236
"command": "gitpod.stopSharingWorkspace",
262237
"group": "remote_00_gitpod_navigation@130",
263238
"when": "gitpod.inWorkspace == true && gitpod.workspaceOwned == true && gitpod.workspaceShared == true"
264-
},
265-
{
266-
"command": "gitpod.openInBrowser",
267-
"group": "remote_00_gitpod_navigation@1000",
268-
"when": "gitpod.inWorkspace == true && gitpod.UIKind == 'desktop'"
269239
}
270240
],
271241
"editor/context": [

gitpod-remote/src/extension.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,6 @@ function registerCLI(context: GitpodExtensionContext): void {
8080
}
8181

8282
function registerCommands(context: GitpodExtensionContext) {
83-
context.subscriptions.push(vscode.commands.registerCommand('gitpod.openInBrowser', () => {
84-
context.telemetryService.sendTelemetryEvent('vscode_execute_command_gitpod_change_vscode_type', {
85-
...context.getWorkspaceTelemetryProperties(),
86-
targetUiKind: 'web'
87-
});
88-
const url = context.info.workspaceUrl;
89-
return vscode.env.openExternal(vscode.Uri.parse(url));
90-
}));
91-
9283
// For collecting logs, will be called by gitpod-desktop extension;
9384
context.subscriptions.push(vscode.commands.registerCommand('__gitpod.getGitpodRemoteLogsUri', () => {
9485
return context.logUri;

gitpod-shared/src/features.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,6 @@ export async function registerWorkspaceCommands(context: GitpodExtensionContext)
148148
});
149149
return vscode.env.openExternal(vscode.Uri.parse(url));
150150
}));
151-
context.subscriptions.push(vscode.commands.registerCommand('gitpod.open.context', () => {
152-
const url = context.workspaceContextUrl.toString();
153-
context.telemetryService.sendTelemetryEvent('vscode_execute_command_gitpod_open_link', {
154-
...context.getWorkspaceTelemetryProperties(),
155-
url
156-
});
157-
return vscode.env.openExternal(vscode.Uri.parse(url));
158-
}));
159151
context.subscriptions.push(vscode.commands.registerCommand('gitpod.open.documentation', () => {
160152
const url = 'https://www.gitpod.io/docs';
161153
context.telemetryService.sendTelemetryEvent('vscode_execute_command_gitpod_open_link', {
@@ -193,13 +185,6 @@ export async function registerWorkspaceCommands(context: GitpodExtensionContext)
193185
if (!workspaceOwned) {
194186
return;
195187
}
196-
context.subscriptions.push(vscode.commands.registerCommand('gitpod.stop.ws', () => {
197-
context.telemetryService.sendTelemetryEvent('vscode_execute_command_gitpod_workspace', {
198-
...context.getWorkspaceTelemetryProperties(),
199-
action: 'stop'
200-
});
201-
return context.gitpod.server.stopWorkspace(context.info.workspaceId);
202-
}));
203188
context.subscriptions.push(vscode.commands.registerCommand('gitpod.upgradeSubscription', () => {
204189
const url = new GitpodHostUrl(context.info.gitpodHost).asBilling().toString();
205190
context.telemetryService.sendTelemetryEvent('vscode_execute_command_gitpod_open_link', {

gitpod-web/src/extension.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,24 @@ function registerCommands(context: GitpodExtensionContext) {
455455
});
456456
return openDesktop('vscode-insiders');
457457
}));
458+
context.subscriptions.push(vscode.commands.registerCommand('gitpod.open.context', () => {
459+
const url = context.workspaceContextUrl.toString();
460+
context.telemetryService.sendTelemetryEvent('vscode_execute_command_gitpod_open_link', {
461+
...context.getWorkspaceTelemetryProperties(),
462+
url
463+
});
464+
return vscode.env.openExternal(vscode.Uri.parse(url));
465+
}));
466+
467+
if (context.workspaceOwned) {
468+
context.subscriptions.push(vscode.commands.registerCommand('gitpod.stop.ws', () => {
469+
context.telemetryService.sendTelemetryEvent('vscode_execute_command_gitpod_workspace', {
470+
...context.getWorkspaceTelemetryProperties(),
471+
action: 'stop'
472+
});
473+
return context.gitpod.server.stopWorkspace(context.info.workspaceId);
474+
}));
475+
}
458476
}
459477

460478
async function registerDesktop(): Promise<void> {

0 commit comments

Comments
 (0)