@@ -11,6 +11,7 @@ import { IGitService } from '../../../platform/git/common/gitService';
1111import { API , Repository } from '../../../platform/git/vscode/git' ;
1212import { IOctoKitService } from '../../../platform/github/common/githubService' ;
1313import { ILogService } from '../../../platform/log/common/logService' ;
14+ import { ITelemetryService } from '../../../platform/telemetry/common/telemetry' ;
1415import { Disposable } from '../../../util/vs/base/common/lifecycle' ;
1516import { EXTENSION_ID } from '../../common/constants' ;
1617import { getRepoId } from './copilotCodingAgentUtils' ;
@@ -46,6 +47,7 @@ export class ChatSessionsUriHandler extends Disposable implements CustomUriHandl
4647 @IVSCodeExtensionContext private readonly _extensionContext : IVSCodeExtensionContext ,
4748 @ILogService private readonly _logService : ILogService ,
4849 @IFileSystemService private readonly fileSystemService : IFileSystemService ,
50+ @ITelemetryService private readonly _telemetryService : ITelemetryService ,
4951 ) {
5052 super ( ) ;
5153 }
@@ -59,6 +61,18 @@ export class ChatSessionsUriHandler extends Disposable implements CustomUriHandl
5961 const prId = params . get ( 'id' ) ;
6062 const url = decodeURIComponent ( params . get ( 'url' ) || '' ) ;
6163 const branch = decodeURIComponent ( params . get ( 'branch' ) || '' ) ;
64+ /* __GDPR__
65+ "copilot.codingAgent.deeplink" : {
66+ "owner": "rebornix",
67+ "comment": "Reports when the ChatSessionsUriHandler handles a URI to open a chat session",
68+ "sessionType": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "The type of chat session" },
69+ "hasId": { "classification": "SystemMetaData", "purpose": "FeatureInsight", "comment": "Whether the session has an ID" }
70+ }
71+ */
72+ this . _telemetryService . sendTelemetryEvent ( 'copilot.codingAgent.deeplink' , { microsoft : true , github : false } , {
73+ sessionType : type || 'unknown' ,
74+ hasId : prId ? 'true' : 'false' ,
75+ } ) ;
6276 if ( type ?. startsWith ( 'copilot' ) && prId ) {
6377 // For now we hardcode it to this type, eventually the full type should come in the URI
6478 return this . _openGitHubSession ( 'copilot-cloud-agent' , prId , url , branch ) ;
0 commit comments