Skip to content

Conversation

@lszomoru
Copy link
Member

@lszomoru lszomoru commented Dec 17, 2025

In yesterday's meeting we have discussed bringing the local/cloud background agent sessions closer together. In order to provide a consistent experience to review changes produced by a background agent, I have updated the cloud agent session to use the working set to display the changes instead of the multi-diff chat response part. When these changes are merged, I will follow up with a PR in the GHPRI extension to move the Apply/Checkout actions.

As part of this change, I have also updated getFileChangesMultiDiffPart() since it was favoring the owner/repo from the active repository which is not appropriate as one might have multiple repositories opened. When possible we should use the information available in the pull request model returned by GitHub.

image

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors how file changes are displayed in cloud sessions by using the working set (ChatSessionItem.changes) instead of streaming multi-diff parts in the chat response. The change simplifies the architecture by getting repository information directly from the PullRequestSearchItem instead of requiring Git service lookups.

Key Changes:

  • File changes are now populated in the ChatSessionItem's changes field using ChatSessionChangedFile objects from the multi-diff data
  • Removed redundant streaming of ChatResponseMultiDiffPart from session completion handlers
  • Simplified PullRequestFileChangesService to use repository info from the PR object directly instead of Git service lookups

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/extension/chatSessions/vscode-node/pullRequestFileChangesService.ts Removed IGitService dependency and getRepoId usage; now gets repository info directly from PullRequestSearchItem
src/extension/chatSessions/vscode-node/copilotCloudSessionsProvider.ts Added logic to populate changes field with ChatSessionChangedFile array from multi-diff part; removed code that streamed multi-diff part on session completion
src/extension/chatSessions/vscode-node/copilotCloudSessionContentBuilder.ts Removed IPullRequestFileChangesService dependency and logic that added multi-diff parts to response when session completed/failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants