Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.96 KB

File metadata and controls

34 lines (26 loc) · 1.96 KB
title ICommandProvider Interface
description The ICommandProvider interface is used to provide commands for the Command Palette to use.
ms.date 2/7/2025
ms.topic reference
no-loc
PowerToys
Windows
Insider

ICommandProvider Interface

Definition

Namespace: Microsoft.CommandPalette.Extensions

This is the interface that an extension must implement to provide commands to the Command Palette. The Command Palette will call this interface to get the commands that it should display.

Properties

Property Type Description
DisplayName String The display name of the command provider. This is used to identify the provider in the Command Palette.
Frozen Boolean Indicates whether the command provider is frozen. A frozen command provider will not be updated or refreshed.
Icon IIconInfo The icon associated with the command provider. This is used to display an icon in the Command Palette.
Id String The unique identifier of the command provider. This is used to identify the provider in the Command Palette.
Settings ICommandSettings The settings associated with the command provider. This is used to provide additional information or resources related to the item being displayed in the Command Palette.

Methods

Method Description
FallbackCommands() Returns the fallback commands for the command provider.
GetCommand(String) Returns the command associated with the specified ID.
InitializeWithHost(IExtensionHost) Initializes the command provider with the specified host. This is called when the command provider is first created.
TopLevelCommands() Returns the top-level commands for the command provider.