-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Support file content change part for cloud agent #1641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 adds functionality to display pull request file changes using remote GitHub content rather than local workspace files. The implementation creates a new content provider that fetches file content directly from GitHub's API, ensuring diffs show the exact PR state regardless of local workspace state.
Key Changes
- Added
getFileContentAPI to fetch file content from specific commits via GitHub - Fixed
headRefOidtype fromnumbertostringand addedbaseRefOidfield to PR metadata - Implemented
PRContentProviderwith custom URI schemes to fetch and display remote PR content - Refactored
PullRequestFileChangesServiceto use remote URIs instead of local workspace paths
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/platform/github/common/githubAPI.ts | Fixed headRefOid type to string and added baseRefOid field to GraphQL queries |
| src/platform/github/common/githubService.ts | Added getFileContent API method and base64 decoding logic |
| src/platform/github/common/octoKitServiceImpl.ts | Implemented getFileContent with authentication handling |
| src/extension/chatSessions/vscode-node/prContentProvider.ts | New content provider for fetching PR file content from GitHub |
| src/extension/chatSessions/vscode-node/pullRequestFileChangesService.ts | Refactored to use remote URIs via PRContentProvider |
| src/extension/chatSessions/vscode-node/chatSessions.ts | Registered PRContentProvider instance |
CLI editor puts this together, let's visit post universe.