@@ -11,21 +11,26 @@ import { IExtensionService } from '../../../../services/extensions/common/extens
11
11
import { ExtensionIdentifier } from '../../../../../platform/extensions/common/extensions.js' ;
12
12
import { CHAT_OPEN_ACTION_ID } from './chatActions.js' ;
13
13
import { IExtensionManagementService , InstallOperation } from '../../../../../platform/extensionManagement/common/extensionManagement.js' ;
14
+ import { IStorageService , StorageScope , StorageTarget } from '../../../../../platform/storage/common/storage.js' ;
14
15
15
16
16
17
export class ChatGettingStartedContribution extends Disposable implements IWorkbenchContribution {
17
18
static readonly ID = 'workbench.contrib.chatGettingStarted' ;
18
19
private recentlyInstalled : boolean = false ;
19
20
21
+ private static readonly hideWelcomeView = 'workbench.chat.hideWelcomeView' ;
22
+
20
23
constructor (
21
24
@IProductService private readonly productService : IProductService ,
22
25
@IExtensionService private readonly extensionService : IExtensionService ,
23
26
@ICommandService private readonly commandService : ICommandService ,
24
27
@IExtensionManagementService private readonly extensionManagementService : IExtensionManagementService ,
28
+ @IStorageService private readonly storageService : IStorageService ,
25
29
) {
26
30
super ( ) ;
27
31
28
- if ( ! this . productService . gitHubEntitlement ) {
32
+ const hideWelcomeView = this . storageService . getBoolean ( ChatGettingStartedContribution . hideWelcomeView , StorageScope . APPLICATION , false ) ;
33
+ if ( ! this . productService . gitHubEntitlement || hideWelcomeView ) {
29
34
return ;
30
35
}
31
36
@@ -49,6 +54,7 @@ export class ChatGettingStartedContribution extends Disposable implements IWorkb
49
54
const extensionStatus = this . extensionService . getExtensionsStatus ( ) ;
50
55
if ( extensionStatus [ ext . value ] . activationTimes && this . recentlyInstalled ) {
51
56
await this . commandService . executeCommand ( CHAT_OPEN_ACTION_ID ) ;
57
+ this . storageService . store ( ChatGettingStartedContribution . hideWelcomeView , true , StorageScope . APPLICATION , StorageTarget . MACHINE ) ;
52
58
this . recentlyInstalled = false ;
53
59
return ;
54
60
}
0 commit comments