Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/@types/vscode.proposed.chatSessionsProvider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
4 changes: 3 additions & 1 deletion src/github/copilotRemoteAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
Expand All @@ -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;
Expand Down