Skip to content

Sessions: Gray out cloud delegation option for non-git workspaces#302979

Merged
joshspicer merged 1 commit intomicrosoft:mainfrom
joshspicer:jospicer/sessions-gray-out-cloud-non-git
Mar 19, 2026
Merged

Sessions: Gray out cloud delegation option for non-git workspaces#302979
joshspicer merged 1 commit intomicrosoft:mainfrom
joshspicer:jospicer/sessions-gray-out-cloud-non-git

Conversation

@joshspicer
Copy link
Member

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.ts

  • Injected IGitService to check for git repositories at delegation time
  • Added _hasGitRepository() helper that checks gitService.repositories
  • Extended _isSessionTypeEnabled() to return false for Cloud when in the sessions window with no git repo
  • Added _getSessionDescription() override to show "Requires a Git repository" on the disabled Cloud item

The Cloud option remains visible so users understand it exists, but is grayed out and unselectable with a clear explanation.

Copilot AI review requested due to automatic review settings March 18, 2026 20:52
@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 18, 2026
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

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 IGitService into DelegationSessionPickerActionItem to 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.

eleanorjboyd
eleanorjboyd previously approved these changes Mar 18, 2026
@joshspicer joshspicer force-pushed the jospicer/sessions-gray-out-cloud-non-git branch from 6b5bc73 to a043f44 Compare March 18, 2026 23:25
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>
@joshspicer joshspicer force-pushed the jospicer/sessions-gray-out-cloud-non-git branch from a043f44 to a224384 Compare March 18, 2026 23:30
@joshspicer joshspicer enabled auto-merge (squash) March 18, 2026 23:38
@joshspicer joshspicer merged commit 6edd566 into microsoft:main Mar 19, 2026
18 checks passed
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.

Sessions: Gray out option to delegate to cloud for non-git workspace

4 participants