@@ -10,6 +10,7 @@ import { ICommandService } from '../../../../../platform/commands/common/command
1010import { IExtensionService } from '../../../../services/extensions/common/extensions.js' ;
1111import { ExtensionIdentifier } from '../../../../../platform/extensions/common/extensions.js' ;
1212import { CHAT_OPEN_ACTION_ID } from './chatActions.js' ;
13+ import { IExtensionManagementService } from '../../../../../platform/extensionManagement/common/extensionManagement.js' ;
1314
1415
1516export class ChatGettingStartedContribution extends Disposable implements IWorkbenchContribution {
@@ -20,6 +21,7 @@ export class ChatGettingStartedContribution extends Disposable implements IWorkb
2021 @IProductService private readonly productService : IProductService ,
2122 @IExtensionService private readonly extensionService : IExtensionService ,
2223 @ICommandService private readonly commandService : ICommandService ,
24+ @IExtensionManagementService private readonly extensionManagementService : IExtensionManagementService ,
2325 ) {
2426 super ( ) ;
2527
@@ -32,16 +34,16 @@ export class ChatGettingStartedContribution extends Disposable implements IWorkb
3234
3335 private registerListeners ( ) {
3436
35- this . _register ( this . extensionService . onDidChangeExtensions ( ( result ) => {
36- for ( const ext of result . added ) {
37- if ( ExtensionIdentifier . equals ( this . productService . gitHubEntitlement ! . extensionId , ext . identifier ) ) {
37+ this . _register ( this . extensionManagementService . onDidInstallExtensions ( async ( result ) => {
38+ for ( const e of result ) {
39+ if ( ExtensionIdentifier . equals ( this . productService . gitHubEntitlement ! . extensionId , e . identifier . id ) ) {
3840 this . recentlyInstalled = true ;
3941 return ;
4042 }
4143 }
4244 } ) ) ;
4345
44- this . extensionService . onDidChangeExtensionsStatus ( async ( event ) => {
46+ this . _register ( this . extensionService . onDidChangeExtensionsStatus ( async ( event ) => {
4547 for ( const ext of event ) {
4648 if ( ExtensionIdentifier . equals ( this . productService . gitHubEntitlement ! . extensionId , ext . value ) ) {
4749 const extensionStatus = this . extensionService . getExtensionsStatus ( ) ;
@@ -52,6 +54,6 @@ export class ChatGettingStartedContribution extends Disposable implements IWorkb
5254 }
5355 }
5456 }
55- } ) ;
57+ } ) ) ;
5658 }
5759}
0 commit comments