Skip to content

CmdPal: Add support for commands with parameters #40948

Description

@zadjii

Description of the new feature / enhancement

Commands should be able to specify that they require additional parameters before they can be run.

Prototypes:

A text box for string input
Image

A button that opens a custom picker from the extension
Image

Scenario when this would be used?

This would be an infinitely better "lightweight" parameter passing, rather than force a whole adaptive card for like, one field.

Supporting information

draft spec:

enum ParameterType
{
    Text,
    Enum,
    Custom
};

// interface IArgumentEnumValue requires INotifyPropChanged
// {
//     String Name { get; };
//     IIconInfo Icon { get; };
// }

interface ICommandArgument requires INotifyPropChanged
{
    ParameterType Type { get; };
    String Name { get; };
    Boolean Required{ get; };

    Object Value { get; set; };
    String DisplayName { get; };
    IIconInfo Icon { get; };

    void ShowPicker(UInt64 hostHwnd);
    // todo
    // IArgumentEnumValue[] GetValues();
};

interface IInvokableCommandWithParameters requires ICommand {
    ICommandArgument[] Parameters { get; };
    ICommandResult InvokeWithArgs(Object sender, ICommandArgument[] args);
};

There are however a LOT of considerations here.

  • Should an extension be able to specify where in the Title the parameter lives? So that we show the args inline with the list item, rather than the search bar?
  • Should a page be able to accept parameters, and then be able to use that to filter it's list of commands itself?
  • What do we do about CommandContextItem's? By all accounts, they support ICommands too.
    • And we can't just make this a property on IListItem, because we actually want top-level commands to support these too

Activity

  1. added
    Needs-TriageFor issues raised to be triaged and prioritized by internal Microsoft teams
    on Aug 3, 2025
  2. zadjii commented on Aug 3, 2025

    @zadjii
    ContributorAuthor

    Draft branch in dev/migrie/f/invokable-params-experiments. That started in one place, and has gone in a bunch of places now.

    EDIT: that branch is very old, and I went in a different direction with it.

  3. zadjii-msft commented on Aug 14, 2025

    @zadjii-msft
    Member

    Oh I FINALLY figured it out. Watch this, from 7:20, and play it at probably .5 speed or slower

    https://youtu.be/cGhGL29yegI?si=iDbbv_33zR5jWPuJ&t=440

    The command with parameters isn't inline at all. You hit enter on it, and that takes you to a different kind of page. There are no other results. The whole search is cleared out, and replaced with Some special ${format} string.

    So like, we could have the parameters just be tokens inline with text. I got a plan

  4. added
    Needs-SpecSomething needs additional alignment/thought on how we'll implement functionallly
    Issue-FeatureA planned feature addition to a product
    and removed
    Needs-TriageFor issues raised to be triaged and prioritized by internal Microsoft teams
    on Oct 10, 2025
  5. zadjii-msft commented on Oct 10, 2025

    @zadjii-msft
    Member

    Current branch is: dev/migrie/s/token-search-page. The spec I'm looking for is here: spec.

    hackathon25-parameters-000.mp4

    Code itself is dirty hackathon code, and it doesn't look pretty, but I mean, it does work.

  6. ChaseKnowlden commented on Apr 9, 2026

    @ChaseKnowlden
    Contributor

    I'm working on this issue right now.

  7. added a commit that references this issue on May 16, 2026
    42902ee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Issue-FeatureA planned feature addition to a productNeeds-SpecSomething needs additional alignment/thought on how we'll implement functionalllyProduct-Command PaletteRefers to the Command Palette utility

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions