From 7672dba7e6a1b54cef05400a136d47ae35628d7a Mon Sep 17 00:00:00 2001 From: Bhavya U Date: Tue, 23 May 2023 22:22:16 -0700 Subject: [PATCH] Check for onDidChangeExtensions before fetching commands (#183275) Check for onDidChangeExtensions --- .../workbench/contrib/remote/browser/remoteStartEntry.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/remote/browser/remoteStartEntry.ts b/src/vs/workbench/contrib/remote/browser/remoteStartEntry.ts index 94c88c45d7e..555203e5cd1 100644 --- a/src/vs/workbench/contrib/remote/browser/remoteStartEntry.ts +++ b/src/vs/workbench/contrib/remote/browser/remoteStartEntry.ts @@ -162,12 +162,12 @@ export class RemoteStartEntry extends Disposable implements IWorkbenchContributi } private registerListeners(): void { - this._register(this.extensionManagementService.onDidInstallExtensions(async (result) => { - for (const ext of result) { - const index = this.remoteExtensionMetadata.findIndex(value => ExtensionIdentifier.equals(value.id, ext.identifier.id)); + this._register(this.extensionService.onDidChangeExtensions(async (result) => { + for (const ext of result.added) { + const index = this.remoteExtensionMetadata.findIndex(value => ExtensionIdentifier.equals(value.id, ext.identifier)); if (index > -1) { this.remoteExtensionMetadata[index].installed = true; - this.remoteExtensionMetadata[index].remoteCommands = await this.getRemoteCommands(ext.identifier.id); + this.remoteExtensionMetadata[index].remoteCommands = await this.getRemoteCommands(ext.identifier.value); } } }));