CommandPaletteService

Full API of CommandPaletteService — the primary way to interact with the palette.

Member Type Description
isOpenSignal<boolean> Current open/closed state
querySignal<string> Current search query
resultsSignal<SearchResult[]> Flat ranked results for the current query
groupsSignal<CommandGroup[]> Results grouped by category
hasResultsSignal<boolean> Shorthand for results().length > 0
open()void Open the palette and clear the query
close()void Close the palette
toggle()void Toggle open/closed
register(commands)void Add or update commands by id
unregister(ids)void Remove commands by id
setQuery(query)void Programmatically set the search query