Sessions: Gray out cloud delegation option for non-git workspaces#302979
Merged
joshspicer merged 1 commit intomicrosoft:mainfrom Mar 19, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Disables “Continue In → Cloud” delegation in the Sessions window when the current workspace has no Git repository, preventing users from initiating cloud sessions that would be broken/confusing for non-git workspaces.
Changes:
- Injected
IGitServiceintoDelegationSessionPickerActionItemto detect whether any Git repositories are available. - Disabled the Cloud session provider option in the Sessions window when no Git repo is present.
- Added a localized disabled-item description (“Requires a Git repository”) for the Cloud option in that scenario.
You can also share your feedback on Copilot code review. Take the survey.
src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.ts
Show resolved
Hide resolved
eleanorjboyd
previously approved these changes
Mar 18, 2026
6b5bc73 to
a043f44
Compare
When a session is based on a local non-git workspace in the Sessions window, the Cloud option in the delegation picker is now disabled with a descriptive 'Requires a Git repository' message. Cloud delegation requires a GitHub repository, so allowing it for non-git workspaces would create broken cloud sessions. Fixes microsoft#302281 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
a043f44 to
a224384
Compare
vijayupadya
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #302281
When a session is based on a local non-git workspace in the Sessions window, the Cloud option in the delegation picker ("Continue In") is now disabled (grayed out) with a descriptive "Requires a Git repository" message.
Cloud delegation requires a GitHub allowing it for non-git workspaces would create broken cloud sessions and filter the session list to only show cloud sessions, confusing the user.repository
Changes
src/vs/workbench/contrib/chat/browser/widget/input/delegationSessionPickerActionItem.tsIGitServiceto check for git repositories at delegation time_hasGitRepository()helper that checksgitService.repositories_isSessionTypeEnabled()to returnfalsefor Cloud when in the sessions window with no git repo_getSessionDescription()override to show "Requires a Git repository" on the disabled Cloud itemThe Cloud option remains visible so users understand it exists, but is grayed out and unselectable with a clear explanation.