Simple file dialog: allow editing folder name on create-folder prompt#320390
Draft
Copilot wants to merge 2 commits into
Draft
Simple file dialog: allow editing folder name on create-folder prompt#320390Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix new folder naming in simple file dialog
Simple file dialog: allow editing folder name on create-folder prompt
Jun 8, 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.
In the simple file dialog's "The folder X does not exist. Would you like to create it?" prompt, any keystroke would invisibly dismiss the prompt (via
onDidChangeValue→hide()), making it look like typing "did nothing".Changes
yesNoPrompt: addedallowEditflag; return type changed fromPromise<boolean>toPromise<URI | undefined>so callers can read back the (possibly edited) path. WithallowEdit=truethe auto-dismiss-on-change handler is not registered, and on cancel-after-edit the typed value is propagated back tofilePickBox.valueso edits aren't lost.yesNoPrompt(uri, message, true). If the accepted URI differs from the original, the new value is pushed into the file picker and validation re-runs (re-prompting against the new name) rather than creating a folder at the edited path while the outeronDidAcceptstill resolves with the staleresolveValue.!!(await this.yesNoPrompt(...)). These flows have no path to re-validate an edited URI before saving, so silently changing them would risk saving at the wrong location.