CmdPal: Add option to choose default order for Terminal profiles (#41945)

## Summary of the Pull Request

This PR adds a new drop-down to the Windows Terminal extension settings
page that allows the user to choose the default sort order of profiles.
The available options are:
- Default (currently alphabetical, but may change in the future)
- Alphabetical
- Most recently used

It also extends the app data to store AppSettings, including a list of
up to 64 recently used profiles, stored as pairs of profile name and
terminal app ID.

Pictures? Pictures!

<img width="1821" height="1097" alt="image"
src="https://github.com/user-attachments/assets/c751dcbf-e638-4207-a3e4-6dd283c5239c"
/>

<img width="1694" height="521" alt="image"
src="https://github.com/user-attachments/assets/914c0498-98fa-4ed7-997d-f988253c923c"
/>

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

- [x] Closes: #41430 
- [ ] **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
This commit is contained in:
Jiří Polášek
2025-09-23 23:23:58 +02:00
committed by GitHub
parent 0edf06bb5f
commit 830a32fc1f
12 changed files with 190 additions and 13 deletions

View File

@@ -159,6 +159,60 @@ namespace Microsoft.CmdPal.Ext.WindowsTerminal.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Profiles order.
/// </summary>
internal static string profile_sort_order {
get {
return ResourceManager.GetString("profile_sort_order", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Profiles order.
/// </summary>
internal static string profile_sort_order_description {
get {
return ResourceManager.GetString("profile_sort_order_description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Alphabetical.
/// </summary>
internal static string profile_sort_order_item_alphabetical {
get {
return ResourceManager.GetString("profile_sort_order_item_alphabetical", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to As defined in Terminal.
/// </summary>
internal static string profile_sort_order_item_as_in_terminal {
get {
return ResourceManager.GetString("profile_sort_order_item_as_in_terminal", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Default (alphabetical).
/// </summary>
internal static string profile_sort_order_item_default {
get {
return ResourceManager.GetString("profile_sort_order_item_default", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Most recently used.
/// </summary>
internal static string profile_sort_order_item_mru {
get {
return ResourceManager.GetString("profile_sort_order_item_mru", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Windows Terminal Profiles.
/// </summary>