[PR #7368] Add icons to commands in the Command Palette #26913

Closed
opened 2026-01-31 09:18:51 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/7368

State: closed
Merged: Yes


Summary of the Pull Request

cmdpal-icons

Adds support for setting a command's icon. This supports a couple different scenarios:

  • setting a path to an image
  • on "iterateOn": "profiles" commands, setting the icon to ${profile.icon} (to use the profile's icon)
  • setting the icon to a symbol from Segoe MDL2 Assets
  • setting the icon to an emoji
  • setting the icon to a character (what is an emoji other than a character, after all?)

References

  • Big s/o to @leonMSFT in #6732, who really did all the hard work here.

PR Checklist

Detailed Description of the Pull Request / Additional comments

Importantly, the creation of these icons must occur on the UI thread. That's why it's done in a "load the path from json", then "get the actual IconSource" structure.

Validation Steps Performed

see the gif

**Original Pull Request:** https://github.com/microsoft/terminal/pull/7368 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request ![cmdpal-icons](https://user-images.githubusercontent.com/18356694/90916410-97dada00-e3a6-11ea-9fb0-755938a68a05.gif) Adds support for setting a command's `icon`. This supports a couple different scenarios: * setting a path to an image * on `"iterateOn": "profiles"` commands, setting the icon to `${profile.icon}` (to use the profile's icon) * setting the icon to a symbol from [Segoe MDL2 Assets](https://docs.microsoft.com/en-us/windows/uwp/design/style/segoe-ui-symbol-font) * setting the icon to an emoji * setting the icon to a character (what is an emoji other than a character, after all?) ## References * Big s/o to @leonMSFT in #6732, who really did all the hard work here. ## PR Checklist * [x] Closes #6644 * [x] I work here * [ ] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments Importantly, the creation of these icons must occur on the UI thread. That's why it's done in a "load the path from json", then "get the actual IconSource" structure. ## Validation Steps Performed see the gif
claunia added the pull-request label 2026-01-31 09:18:51 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26913