Skip to content

Fix/305961 create file keeps running - #305967

Open
rupeshkumar-555 wants to merge 5 commits into
microsoft:mainfrom
rupeshkumar-555:fix/305961-create-file-keeps-running
Open

Fix/305961 create file keeps running#305967
rupeshkumar-555 wants to merge 5 commits into
microsoft:mainfrom
rupeshkumar-555:fix/305961-create-file-keeps-running

Conversation

@rupeshkumar-555

Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings March 28, 2026 13:35
@vs-code-engineering

vs-code-engineering Bot commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Benjamin Pasero (@bpasero)

Matched files:

  • src/vs/workbench/contrib/files/browser/fileCommands.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adjusts the “New File” flow so that when a filename is already provided programmatically (e.g. from the welcome “New File…” quick pick), it no longer opens a save dialog, and it also tweaks the Agent Sessions title bar label styling.

Changes:

  • Update workbench.action.files.newFile to directly use the provided args.fileName target URI instead of showing a save dialog.
  • Adjust Sessions title bar label typography by applying a medium font weight.

Reviewed changes

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

File Description
src/vs/workbench/contrib/files/browser/fileCommands.ts Skips the save dialog when args.fileName is provided and uses the computed default URI directly.
src/vs/sessions/contrib/sessions/browser/media/sessionsTitleBarWidget.css Makes the sessions title label slightly heavier (font-weight: 500).

Comment thread src/vs/workbench/contrib/files/browser/fileCommands.ts Outdated
Comment thread src/vs/workbench/contrib/files/browser/fileCommands.ts Outdated
@rupeshkumar-555
rupeshkumar-555 force-pushed the fix/305961-create-file-keeps-running branch from abfadf5 to 85130b6 Compare April 17, 2026 01:56
@rupeshkumar-555

Copy link
Copy Markdown
Author

I cleaned this PR to keep scope focused on #305961 only.\n\n- Rebased branch on latest main\n- Removed unrelated workflow/chat changes\n- Kept only the new-file command fix in src/vs/workbench/contrib/files/browser/fileCommands.ts\n\nRegarding the merge snippet in chatListRenderer: the correct resolved line is the main-side condition using isSystemInitiatedRequest, and this PR no longer carries that unrelated change.

@rupeshkumar-555

Copy link
Copy Markdown
Author

Addressed the review thread for #305961 in the current PR diff:\n\n- Validated provided fileName before using it to build the target URI\n- Rejected unsafe values by requiring the resolved URI to stay under the default file path\n- Prevented silent overwrite when fileName is provided programmatically by warning and returning if the target already exists\n- Kept overwrite behavior only for the save-dialog path\n\nThis is now in the current branch diff for src/vs/workbench/contrib/files/browser/fileCommands.ts.

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.

3 participants