Repository navigation
Sessions: open Choose Folder dialog at the parent of the current folder - #347472
Draft
Alexandru Dima (alexdima) wants to merge 1 commit into
Draft
Alexandru Dima (alexdima) wants to merge 1 commit into
Alexandru Dima (alexdima) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for the workspace picker’s folder-dialog starting-location change.
No open issues 🎉
What changed in this PR
Updates the Agents window workspace picker so Open Folder... starts at the current local folder’s parent, making sibling projects easier to select and addressing #335652.
Changes:
- Passes the selected local folder’s parent as the folder dialog’s
defaultUri. - Preserves the dialog’s default behavior when no folder is selected or the selection is non-local.
| File | Description |
|---|---|
src/vs/workbench/contrib/sessions/browser/chat/sessionWorkspacePicker.ts |
Sets the folder dialog’s starting location from the current local selection. |
Review effort: Balanced
This branch has not been deployed
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.
Fixes #335652
Problem
In the Agents window, the workspace picker's Open Folder... always opens the folder dialog in the home folder. When you want a sibling of the current folder, which is the common case when projects live side by side, you have to navigate all the way back down every time.
Change
WorkspacePicker._browseForLocalFoldernow passesdefaultUritoshowOpenDialog: the parent of the currently selected folder, when that folder is a local (file:) folder. With no selection, or a non-local one, behavior is unchanged: the dialog picks its own default.Demo
The same scenario on installed Insiders (top) and a dev build of this branch (bottom). It picks
pr335652-projects/alphain the workspace picker, then chooses Open Folder... again.--devbuild of this branch): the dialog starts at…/pr335652-projects/and listsalpha,betaandgamma. CF-03 passes.How tested
node test/scenario/out/runScenario.js .build/vscode-playwright-mcp/pr/335652-parent.cjs(Insiders): failed at CF-03, as expected. The dialog opened at the home folder.node test/scenario/out/runScenario.js --dev .build/vscode-playwright-mcp/pr/335652-parent.cjs(this branch): passed, 3/3 steps.pnpm run eslint src/vs/workbench/contrib/sessions/browser/chat/sessionWorkspacePicker.ts: passed, no findings.Before / after
Before
335652-before-insiders.mp4
After
335652-after-dev.mp4
🤖 Authored with GitHub Copilot on behalf of Alexandru Dima (@alexdima).