From 82aa416e85cd1f15c9dd65eaa835cae55f7398c0 Mon Sep 17 00:00:00 2001 From: Alex Ross <38270282+alexr00@users.noreply.github.com> Date: Mon, 10 Nov 2025 10:26:48 +0100 Subject: [PATCH] Fix build --- src/@types/vscode.proposed.chatSessionsProvider.d.ts | 5 +++++ src/github/copilotRemoteAgent.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/@types/vscode.proposed.chatSessionsProvider.d.ts b/src/@types/vscode.proposed.chatSessionsProvider.d.ts index 3e7c795fbe..489e5f952c 100644 --- a/src/@types/vscode.proposed.chatSessionsProvider.d.ts +++ b/src/@types/vscode.proposed.chatSessionsProvider.d.ts @@ -123,6 +123,11 @@ declare module 'vscode' { * Statistics about the chat session. */ statistics?: { + /** + * Number of files edited during the session. + */ + files: number; + /** * Number of insertions made during the session. */ diff --git a/src/github/copilotRemoteAgent.ts b/src/github/copilotRemoteAgent.ts index ff5d2dfd17..e31b3b0c6b 100644 --- a/src/github/copilotRemoteAgent.ts +++ b/src/github/copilotRemoteAgent.ts @@ -1064,6 +1064,7 @@ export class CopilotRemoteAgentManager extends Disposable { const repo = pullRequest.remote.repositoryName; repoInfo = `${owner}/${repo} `; } + const fileCount = pullRequest.fileChanges.size === 0 ? (await pullRequest.getFileChangesInfo()).length : pullRequest.fileChanges.size; const description = new vscode.MarkdownString(`[${repoInfo}#${pullRequest.number}](${uri.toString()} "${prLinkTitle}")`); // pullRequest.base.ref === defaultBranch ? `PR #${pullRequest.number}`: `PR #${pullRequest.number} → ${pullRequest.base.ref}`; const chatSession: ChatSessionWithPR = { resource: vscode.Uri.from({ scheme: COPILOT_SWE_AGENT, path: '/' + pullRequest.number }), @@ -1078,7 +1079,8 @@ export class CopilotRemoteAgentManager extends Disposable { }, statistics: pullRequest.item.additions !== undefined && pullRequest.item.deletions !== undefined && (pullRequest.item.additions > 0 || pullRequest.item.deletions > 0) ? { insertions: pullRequest.item.additions, - deletions: pullRequest.item.deletions + deletions: pullRequest.item.deletions, + files: fileCount } : undefined }; return chatSession;