Revert "use vscode-vfs scheme for cloud session repo URIs (#298689)" - #300227
Revert "use vscode-vfs scheme for cloud session repo URIs (#298689)"#300227Osvaldo Ortega (osortega) wants to merge 1 commit into
Conversation
This reverts the changes from PR #298689, restoring the use of GITHUB_REMOTE_FILE_SCHEME for cloud session repository URIs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Reverts PR #298689 by restoring use of the GITHUB_REMOTE_FILE_SCHEME scheme when constructing cloud session repository URIs in the Agent Sessions window (vs/sessions).
Changes:
- Reintroduce
GITHUB_REMOTE_FILE_SCHEMEimport and use it when setting the repo URI in the cloud repo picker. - Reintroduce
GITHUB_REMOTE_FILE_SCHEMEimport and use it when deriving the repository URI from cloud session metadata.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/vs/sessions/contrib/sessions/browser/sessionsManagementService.ts | Reverts cloud-session repository URI construction back to GITHUB_REMOTE_FILE_SCHEME. |
| src/vs/sessions/contrib/chat/browser/repoPicker.ts | Reverts repo picker’s cloud repo URI scheme back to GITHUB_REMOTE_FILE_SCHEME. |
| if (session.providerType === AgentSessionProviders.Cloud) { | ||
| return [URI.parse(`vscode-vfs://github/${metadata.owner}/${metadata.name}`), undefined]; | ||
| return [URI.parse(`${GITHUB_REMOTE_FILE_SCHEME}://github/${metadata.owner}/${metadata.name}`), undefined]; | ||
| } |
There was a problem hiding this comment.
For cloud sessions this constructs a repo URI from metadata.owner/metadata.name without validating they are present and strings. If either is missing, this will produce a URI containing undefined segments (and then get used as the active session repository label/key). Consider mirroring the safer pattern used elsewhere (e.g. casting to string | undefined and returning undefined when owner/name are not set) before building the URI.
This reverts the changes from PR #298689.
Changes
Restores the use of
GITHUB_REMOTE_FILE_SCHEMEfor cloud session repository URIs by:repoPicker.ts- Re-adds theGITHUB_REMOTE_FILE_SCHEMEimport and uses it in_setRepo()instead of hardcodedvscode-vfsschemesessionsManagementService.ts- Re-adds theGITHUB_REMOTE_FILE_SCHEMEimport and uses it ingetRepositoryFromMetadata()for cloud sessionsThis reverts commit from PR #298689.