Skip to content

Commit 9c8157e

Browse files
authored
add event for chat view openend (microsoft#278195)
1 parent e8c3cb2 commit 9c8157e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/vs/workbench/contrib/chat/browser/chatViewPane.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { ILayoutService } from '../../../../platform/layout/browser/layoutServic
2020
import { ILogService } from '../../../../platform/log/common/log.js';
2121
import { IOpenerService } from '../../../../platform/opener/common/opener.js';
2222
import { IStorageService, StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js';
23+
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';
2324
import { editorBackground } from '../../../../platform/theme/common/colorRegistry.js';
2425
import { IThemeService } from '../../../../platform/theme/common/themeService.js';
2526
import { IViewPaneOptions, ViewPane } from '../../../browser/parts/views/viewPane.js';
@@ -72,6 +73,7 @@ export class ChatViewPane extends ViewPane implements IViewWelcomeDelegate {
7273
@ILogService private readonly logService: ILogService,
7374
@ILayoutService private readonly layoutService: ILayoutService,
7475
@IChatSessionsService private readonly chatSessionsService: IChatSessionsService,
76+
@ITelemetryService private readonly telemetryService: ITelemetryService,
7577
) {
7678
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, hoverService);
7779

@@ -185,6 +187,12 @@ export class ChatViewPane extends ViewPane implements IViewWelcomeDelegate {
185187

186188
this._register(this.instantiationService.createInstance(ChatViewWelcomeController, parent, this, this.chatOptions.location));
187189

190+
type ChatViewPaneOpenedClassification = {
191+
owner: 'sbatten';
192+
comment: 'Event fired when the chat view pane is opened';
193+
};
194+
195+
this.telemetryService.publicLog2<{}, ChatViewPaneOpenedClassification>('chatViewPaneOpened');
188196
const scopedInstantiationService = this._register(this.instantiationService.createChild(new ServiceCollection([IContextKeyService, this.scopedContextKeyService])));
189197
const locationBasedColors = this.getLocationBasedColors();
190198
const editorOverflowNode = this.layoutService.getContainer(getWindow(parent)).appendChild($('.chat-editor-overflow.monaco-editor'));

0 commit comments

Comments
 (0)