Skip to content

Add "Accept All Edits" command accessible from editor context with Ctrl+Alt+Y #251443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 18, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 13, 2025

Adds a new command to accept all chat edits directly from the editor context, improving accessibility for screen reader users who want to review files in the editor and accept all edits without navigating back to the chat panel.

Changes Made

New AcceptAllEditsAction Class

  • Extends ChatEditingEditorAction to work from editor context
  • Calls session.accept() without parameters to accept all edits (same logic as chat panel)
  • Configured with Ctrl+Alt+Y keybinding as requested
  • Available in F1 command palette as "Keep All Chat Edits"
  • Proper preconditions: only enabled when there are chat modifications and no request in progress

Updated Accessibility Help

  • Added keybinding reference for the new "Accept all edits" command in standaloneStrings.ts
  • Screen readers will now announce this option when viewing accessibility help for editors with chat edits

Usage

When a user has pending chat edits in an editor:

  1. Press Ctrl+Alt+Y to accept all edits in the session
  2. Or use F1 → "Keep All Chat Edits" command
  3. Works in both regular editors and notebook contexts
  4. Fully accessible via keyboard and screen readers

Technical Details

  • Follows existing VS Code patterns by extending ChatEditingEditorAction
  • Uses same preconditions as other chat editing actions (ctxHasEditorModification, ctxHasRequestInProgress.negate())
  • High keybinding weight to avoid conflicts
  • Only 27 lines of changes across 2 files

Fixes #251440.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • electronjs.org
    • Triggering command: node-gyp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] With one's focus in the editor, there's no way to accept all edits Add "Accept All Edits" command accessible from editor context with Ctrl+Alt+Y Jun 13, 2025
@Copilot Copilot AI requested a review from meganrogge June 13, 2025 20:10
Copilot finished work on behalf of meganrogge June 13, 2025 20:10
@meganrogge meganrogge added this to the June 2025 milestone Jun 16, 2025
@meganrogge meganrogge marked this pull request as ready for review June 17, 2025 16:45
@meganrogge meganrogge requested a review from roblourens June 17, 2025 16:46
@meganrogge
Copy link
Contributor

Tested and it works. Use case is a screen reader user's in the editor reviewing changes and wants to accept all without navigating back to the panel.

@meganrogge meganrogge enabled auto-merge (squash) June 17, 2025 16:46
@meganrogge meganrogge merged commit fbc1fbe into main Jun 18, 2025
8 checks passed
@meganrogge meganrogge deleted the copilot/fix-251440 branch June 18, 2025 18:39
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.

With one's focus in the editor, there's no way to accept all edits
3 participants