From f429cc06d69d8c20d3a12fc5928311f5843ebdb9 Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Tue, 15 Jul 2025 12:20:29 +0100 Subject: [PATCH 1/3] Include `event_type` when invoking Copilot coding agent This includes an `event_type` argument when invoking Copilot coding agent to allow VS Code to be identified as the invoker. --- src/github/copilotRemoteAgent.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/github/copilotRemoteAgent.ts b/src/github/copilotRemoteAgent.ts index 89377125d5..7f49875852 100644 --- a/src/github/copilotRemoteAgent.ts +++ b/src/github/copilotRemoteAgent.ts @@ -559,6 +559,7 @@ export class CopilotRemoteAgentManager extends Disposable { const problemStatement: string = `${prompt} ${problemContext ? `: ${problemContext}` : ''}`; const payload: RemoteAgentJobPayload = { problem_statement: problemStatement, + event_type: 'visual_studio_code_remote_agent_tool_invoked', pull_request: { title, body_placeholder: problemContext, @@ -671,4 +672,4 @@ export class CopilotRemoteAgentManager extends Disposable { public getStateForPR(owner: string, repo: string, prNumber: number): CopilotPRStatus { return this._stateModel.get(owner, repo, prNumber); } -} \ No newline at end of file +} From 52d05507931b7b5057b058b6405aabb42225452f Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Tue, 15 Jul 2025 12:20:55 +0100 Subject: [PATCH 2/3] Fix formatting issue in copilotRemoteAgent.ts From dfebfbe4372b64f0ad357308ef509a3ecf19f622 Mon Sep 17 00:00:00 2001 From: Tim Rogers Date: Tue, 15 Jul 2025 12:22:07 +0100 Subject: [PATCH 3/3] Add optional event_type property to RemoteAgentJobPayload interface --- src/github/copilotApi.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/github/copilotApi.ts b/src/github/copilotApi.ts index 0fa38dde2d..74885390fc 100644 --- a/src/github/copilotApi.ts +++ b/src/github/copilotApi.ts @@ -18,6 +18,7 @@ const PREMIUM_REQUESTS_URL = 'https://docs.github.com/en/copilot/concepts/copilo export interface RemoteAgentJobPayload { problem_statement: string; + event_type?: string; pull_request?: { title?: string; body_placeholder?: string; @@ -243,4 +244,4 @@ export async function getCopilotApi(credentialStore: CredentialStore, telemetry: const { token } = await github.octokit.api.auth() as { token: string }; return new CopilotApi(github.octokit, token, telemetry); -} \ No newline at end of file +}