Cmdpal: Peek command in indexer (#44581)

<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
Add a peek command, so we could quickly view the files found by indexer

I’m aware that wiring the Peek command directly into the indexer
extension is fairly PowerToys-specific.
I’m open to suggestions if we think this should instead be handled via a
more general extension / plugin mechanism; if a broader framework is
planned, I’m happy to wait and revisit this once that structure is in
place.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [ ] Closes: #43517
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

<img width="279" height="315" alt="image"
src="https://github.com/user-attachments/assets/c095ac55-30a2-49e6-a972-b51b35939c53"
/>
This commit is contained in:
Kai Tao
2026-01-08 12:04:03 +08:00
committed by GitHub
parent 72fc8288eb
commit b9de59ce64
8 changed files with 126 additions and 0 deletions

View File

@@ -132,6 +132,33 @@ namespace Microsoft.CmdPal.Ext.Indexer.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Peek preview.
/// </summary>
internal static string Indexer_Command_Peek {
get {
return ResourceManager.GetString("Indexer_Command_Peek", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Failed to launch Peek.
/// </summary>
internal static string Indexer_Command_Peek_Failed {
get {
return ResourceManager.GetString("Indexer_Command_Peek_Failed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PowerToys Peek is not available.
/// </summary>
internal static string Indexer_Command_Peek_NotAvailable {
get {
return ResourceManager.GetString("Indexer_Command_Peek_NotAvailable", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Search all files.
/// </summary>

View File

@@ -202,4 +202,13 @@ You can try searching all files on this PC or adjust your indexing settings.</va
<data name="Indexer_Filter_Files_Only" xml:space="preserve">
<value>Files</value>
</data>
<data name="Indexer_Command_Peek" xml:space="preserve">
<value>Peek preview</value>
</data>
<data name="Indexer_Command_Peek_NotAvailable" xml:space="preserve">
<value>PowerToys Peek is not available</value>
</data>
<data name="Indexer_Command_Peek_Failed" xml:space="preserve">
<value>Failed to launch Peek</value>
</data>
</root>