Skip to content

Commit bc584d9

Browse files
authored
Tracking mission control links (#1848)
1 parent a1ea546 commit bc584d9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/extension/chatSessions/vscode/chatSessionsUriHandler.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { IGitService } from '../../../platform/git/common/gitService';
1111
import { API, Repository } from '../../../platform/git/vscode/git';
1212
import { IOctoKitService } from '../../../platform/github/common/githubService';
1313
import { ILogService } from '../../../platform/log/common/logService';
14+
import { ITelemetryService } from '../../../platform/telemetry/common/telemetry';
1415
import { Disposable } from '../../../util/vs/base/common/lifecycle';
1516
import { EXTENSION_ID } from '../../common/constants';
1617
import { 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);

src/extension/onboardDebug/vscode-node/copilotDebugCommandContribution.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class CopilotDebugCommandContribution extends Disposable implements vscod
7676

7777
this.registerSerializer = this.registerEnvironment();
7878
// Initialize ChatSessionsUriHandler with extension context for storage
79-
this.chatSessionsUriHandler = new ChatSessionsUriHandler(this._octoKitService, this._gitService, this._gitExtensionService, this.context, this.logService, this.fileSystemService);
79+
this.chatSessionsUriHandler = new ChatSessionsUriHandler(this._octoKitService, this._gitService, this._gitExtensionService, this.context, this.logService, this.fileSystemService, this.telemetryService);
8080
// Check for pending chat sessions when this contribution is initialized
8181
(this.chatSessionsUriHandler as ChatSessionsUriHandler).openPendingSession().catch((err) => {
8282
this.logService.error('Failed to check for pending chat sessions from debug command contribution:', err);

0 commit comments

Comments
 (0)