chat - trace setup context (#235415)

pull/235423/head
Benjamin Pasero 2024-12-05 17:38:49 +01:00 committed by GitHub
parent d8980958a4
commit eae086b136
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -934,7 +934,8 @@ class ChatSetupContext extends Disposable {
@IWorkspaceContextService private readonly workspaceContextService: IWorkspaceContextService,
@IExtensionService private readonly extensionService: IExtensionService,
@IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService,
@IWorkbenchExtensionEnablementService private readonly extensionEnablementService: IWorkbenchExtensionEnablementService
@IWorkbenchExtensionEnablementService private readonly extensionEnablementService: IWorkbenchExtensionEnablementService,
@ILogService private readonly logService: ILogService
) {
super();
@ -968,6 +969,8 @@ class ChatSetupContext extends Disposable {
update(context: { triggered: boolean }): Promise<void>;
update(context: { entitlement: ChatEntitlement }): Promise<void>;
update(context: { installed?: boolean; triggered?: boolean; entitlement?: ChatEntitlement }): Promise<void> {
this.logService.trace(`[chat setup] update(): ${JSON.stringify(context)}`);
if (typeof context.installed === 'boolean') {
this._state.installed = context.installed;
@ -998,6 +1001,8 @@ class ChatSetupContext extends Disposable {
private async updateContext(): Promise<void> {
await this.updateBarrier?.wait();
this.logService.trace(`[chat setup] updateContext(): ${JSON.stringify(this._state)}`);
if (this._state.triggered && !this._state.installed) {
// this is ugly but fixes flicker from a previous chat install
this.storageService.remove('chat.welcomeMessageContent.panel', StorageScope.APPLICATION);