Skip to content

Expose "View Previous Edits" command in command palette and accessibility help #257355

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 3 commits into from
Jul 23, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 22, 2025

This PR addresses the accessibility request to make the "View Previous Edits" command discoverable for screen reader users by exposing it in the command palette and adding it to the accessibility help dialog.

Changes Made

1. Command Palette Exposure

  • Changed f1: false to f1: true in ViewPreviousEditsAction constructor
  • This makes the command available in the Command Palette (F1 menu) with ID chatEditing.viewPreviousEdits

2. Accessibility Help Integration

  • Added the command to the helpful commands list in the accessibility help for editsView
  • Uses proper keybinding format: <keybinding:chatEditing.viewPreviousEdits>
  • Positioned logically after the "View Changes" command

Technical Details

The changes are minimal and surgical:

  • 2 lines changed across 2 files
  • Uses existing command ID chatEditing.viewPreviousEdits consistently
  • Follows established VS Code patterns for command registration and accessibility help
  • Maintains the existing localization key 'chatEditing.viewPreviousEdits'

Impact

Screen reader users can now:

  1. Discover the "View Previous Edits" command via the Command Palette (F1)
  2. Learn about it through the accessibility help dialog in the edits view
  3. Access the command using keyboard shortcuts once assigned

This complements the existing accessibility.openChatEditedFiles setting mentioned in the issue.

Fixes #257092.

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.

@Copilot Copilot AI changed the title [WIP] Expose command to view all edited files in command palette Expose "View Previous Edits" command in command palette and accessibility help Jul 22, 2025
@Copilot Copilot AI requested a review from meganrogge July 22, 2025 21:12
Copilot finished work on behalf of meganrogge July 22, 2025 21:12
Copy link
Contributor

@meganrogge meganrogge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @anthonykim1 something to tell ppl about on Friday!

@meganrogge meganrogge marked this pull request as ready for review July 22, 2025 22:24
@meganrogge meganrogge enabled auto-merge (squash) July 22, 2025 22:24
@vs-code-engineering vs-code-engineering bot added this to the July 2025 milestone Jul 22, 2025
rzhao271
rzhao271 previously approved these changes Jul 22, 2025
@meganrogge
Copy link
Contributor

@copilot fix error: [tsec-compile-check ] src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.ts(725,9): error TS2345: Argument of type '{ id: string; title: string; tooltip: string; f1: true; icon: ThemeIcon; precondition: ContextKeyExpression; menu: { id: MenuId; group: string; order: number; when: ContextKeyExpression | undefined; }[]; }' is not assignable to parameter of type 'Readonly'.

Copy link
Contributor Author

Copilot AI commented Jul 23, 2025

@copilot fix error: [tsec-compile-check ] src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingActions.ts(725,9): error TS2345: Argument of type '{ id: string; title: string; tooltip: st...

Fixed the TypeScript compilation error. The issue was that when f1: true is set, the action must implement ICommandPaletteOptions which requires title to be of type ICommandActionTitle (not just string). Changed to use localize2() for the title instead of localize() to satisfy this requirement. This follows the same pattern used by other VS Code actions with f1: true. (241741e)

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:

@Copilot Copilot AI requested a review from meganrogge July 23, 2025 01:48
Copilot finished work on behalf of meganrogge July 23, 2025 01:48
@meganrogge meganrogge merged commit 36e541e into main Jul 23, 2025
18 checks passed
@meganrogge meganrogge deleted the copilot/fix-257092 branch July 23, 2025 16:08
@@ -724,9 +724,9 @@ export class ViewPreviousEditsAction extends EditingSessionAction {
constructor() {
super({
id: ViewPreviousEditsAction.Id,
title: ViewPreviousEditsAction.Label,
title: localize2('chatEditing.viewPreviousEdits', 'View Previous Edits'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

meganrogge added a commit that referenced this pull request Jul 28, 2025
meganrogge added a commit that referenced this pull request Jul 28, 2025
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.

Expose command to view all edited files in command palette
5 participants