Skip to content

Commit 4bbf1ad

Browse files
authored
Update remote tunnel action to execute action (microsoft#182103)
1 parent cc44336 commit 4bbf1ad

File tree

1 file changed

+4
-32
lines changed

1 file changed

+4
-32
lines changed

src/vs/workbench/contrib/remote/browser/remoteStartEntry.ts

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -325,38 +325,10 @@ export class RemoteStartEntry extends Disposable implements IWorkbenchContributi
325325

326326
private async showRemoteTunnelStartActions() {
327327
await this._init();
328-
329-
const computeItems = async () => {
330-
const metadata = this.remoteExtensionMetadata[0];
331-
if (!metadata) {
332-
return [];
333-
}
334-
335-
if (!metadata.installed) {
336-
await this.installAndRunStartCommand(metadata);
337-
}
338-
339-
return this.getRemoteCommandQuickPickItems(metadata.remoteCommands);
340-
};
341-
342-
const quickPick = this.quickInputService.createQuickPick();
343-
quickPick.placeholder = nls.localize('remote.startActions.quickPickPlaceholder', 'Select an option to connect');
344-
quickPick.items = await computeItems();
345-
quickPick.sortByLabel = false;
346-
quickPick.canSelectMany = false;
347-
quickPick.ignoreFocusOut = false;
348-
once(quickPick.onDidAccept)(async () => {
349-
350-
const selectedItems = quickPick.selectedItems;
351-
if (selectedItems.length === 1) {
352-
const selectedItem = selectedItems[0].id!;
353-
this.executeCommandWithTelemetry(selectedItem);
354-
quickPick.dispose();
355-
}
356-
});
357-
358-
quickPick.onDidHide(() => quickPick.dispose());
359-
quickPick.show();
328+
const metadata = this.remoteExtensionMetadata[0];
329+
if (metadata.installed) {
330+
this.executeCommandWithTelemetry(metadata.startCommand);
331+
}
360332
}
361333

362334
private async installAndRunStartCommand(metadata: RemoteExtensionMetadata) {

0 commit comments

Comments
 (0)