Skip to content

fix setting repo#298387

Merged
sandy081 merged 3 commits intomainfrom
sandy081/colorful-squid
Feb 28, 2026
Merged

fix setting repo#298387
sandy081 merged 3 commits intomainfrom
sandy081/colorful-squid

Conversation

@sandy081
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 28, 2026 00:24
@sandy081 sandy081 enabled auto-merge (squash) February 28, 2026 00:24
@sandy081 sandy081 self-assigned this Feb 28, 2026
osortega
osortega previously approved these changes Feb 28, 2026
Copy link
Copy Markdown
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 fixes how a repository is set when creating a new cloud (remote) agent session. Previously, the RepoPicker was calling session.setOption('repositories', item) directly, and RemoteNewSession.setRepoUri was incorrectly calling setOption('repository', uri.fsPath). The fix centralizes repo-setting logic through a new _setRepo helper in RepoPicker, routes it through setRepoUri, and constructs the correct repositories option format ({ id, name }) for cloud sessions.

Changes:

  • Added _setRepo() helper to RepoPicker that constructs a https://github.com/{repo.id} URI and calls setRepoUri on the session, replacing direct setOption calls.
  • Updated RemoteNewSession.setRepoUri() to extract owner/repo from the URI path and set the repositories option with a properly structured { id, name } object.
  • Fixed _setNewSession in NewChatWidget to wire pickers conditionally based on session target (Background vs Cloud), and updated getActiveSessionFolderData to only return folder data for Background sessions (not Cloud).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
repoPicker.ts Adds URI import; extracts _setRepo() helper that calls setRepoUri instead of setOption('repositories', ...) directly
newSession.ts Fixes RemoteNewSession.setRepoUri to use uri.path.substring(1) to extract owner/repo and pass it as a repositories option item
newChatViewPane.ts Wires pickers to sessions conditionally by target type (Background → folder/isolation/branch; Cloud → repo)
workspaceFolderManagement.ts Fixes guard to only skip undefined sessions; restricts workspace folder assignment to Background sessions only (Cloud case commented out)

Comment thread src/vs/sessions/contrib/chat/browser/newChatViewPane.ts
@sandy081 sandy081 merged commit 90127b7 into main Feb 28, 2026
20 checks passed
@sandy081 sandy081 deleted the sandy081/colorful-squid branch February 28, 2026 00:51
DonJayamanne pushed a commit that referenced this pull request Mar 2, 2026
* set remote repo uri

* fix setting repo

* fix setting repo uri
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Apr 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants