Skip to content

Commit 5cbd13a

Browse files
committed
Store welcomeView show status
1 parent e6bb858 commit 5cbd13a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatGettingStarted.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,26 @@ import { IExtensionService } from '../../../../services/extensions/common/extens
1111
import { ExtensionIdentifier } from '../../../../../platform/extensions/common/extensions.js';
1212
import { CHAT_OPEN_ACTION_ID } from './chatActions.js';
1313
import { IExtensionManagementService, InstallOperation } from '../../../../../platform/extensionManagement/common/extensionManagement.js';
14+
import { IStorageService, StorageScope, StorageTarget } from '../../../../../platform/storage/common/storage.js';
1415

1516

1617
export class ChatGettingStartedContribution extends Disposable implements IWorkbenchContribution {
1718
static readonly ID = 'workbench.contrib.chatGettingStarted';
1819
private recentlyInstalled: boolean = false;
1920

21+
private static readonly hideWelcomeView = 'workbench.chat.hideWelcomeView';
22+
2023
constructor(
2124
@IProductService private readonly productService: IProductService,
2225
@IExtensionService private readonly extensionService: IExtensionService,
2326
@ICommandService private readonly commandService: ICommandService,
2427
@IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService,
28+
@IStorageService private readonly storageService: IStorageService,
2529
) {
2630
super();
2731

28-
if (!this.productService.gitHubEntitlement) {
32+
const hideWelcomeView = this.storageService.getBoolean(ChatGettingStartedContribution.hideWelcomeView, StorageScope.APPLICATION, false);
33+
if (!this.productService.gitHubEntitlement || hideWelcomeView) {
2934
return;
3035
}
3136

@@ -49,6 +54,7 @@ export class ChatGettingStartedContribution extends Disposable implements IWorkb
4954
const extensionStatus = this.extensionService.getExtensionsStatus();
5055
if (extensionStatus[ext.value].activationTimes && this.recentlyInstalled) {
5156
await this.commandService.executeCommand(CHAT_OPEN_ACTION_ID);
57+
this.storageService.store(ChatGettingStartedContribution.hideWelcomeView, true, StorageScope.APPLICATION, StorageTarget.MACHINE);
5258
this.recentlyInstalled = false;
5359
return;
5460
}

0 commit comments

Comments
 (0)