Skip to content

Make "Reload" command case-insensitive in Command Palette #39779

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented May 28, 2025

Problem

The "Reload" command in the Command Palette was only showing up when searching with a lowercase 'r' (e.g., "reload") but not with an uppercase 'R' (e.g., "Reload"). This was inconsistent with the documentation which references a "Reload" command.

Solution

Fixed the case-sensitivity issue in FallbackReloadItem.UpdateQuery() by changing the string comparison from case-sensitive to case-insensitive:

// Before
_reloadCommand.Name = query.StartsWith('r') ? "Reload" : string.Empty;

// After
_reloadCommand.Name = query.StartsWith("r", StringComparison.OrdinalIgnoreCase) ? "Reload" : string.Empty;

This change makes the Reload command visible when typing either "reload" or "Reload" in the Command Palette, improving the user experience for extension developers.

Fixes #39769.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: zadjii-msft <18356694+zadjii-msft@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] The "Reload" command does not show up in the command palette. Make "Reload" command case-insensitive in Command Palette May 28, 2025
@Copilot Copilot AI requested a review from zadjii-msft May 28, 2025 11:06
Copilot finished work on behalf of zadjii-msft May 28, 2025 11:06
@crutkas
Copy link
Member

crutkas commented May 28, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zadjii-msft
Copy link
Member

/azp run

@zadjii-msft zadjii-msft marked this pull request as ready for review June 18, 2025 14:56
@zadjii-msft zadjii-msft added the Product-Command Palette Refers to the Command Palette utility label Jun 18, 2025
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zadjii-msft zadjii-msft added the Needs-Review This Pull Request awaits the review of a maintainer. label Jun 18, 2025
@zadjii-msft zadjii-msft added this to the PowerToys 0.92 milestone Jun 19, 2025
@zadjii-msft
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Review This Pull Request awaits the review of a maintainer. Product-Command Palette Refers to the Command Palette utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The "Reload" command does not show up in the command palette.
4 participants