Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/command-palette/domain/CommandGroups

Pure (DOMAIN-001): grouping commands under headings for display.

Cockpit client (features), next. Source: ui/client/features/command-palette/domain/CommandGroups.ts.

Functions#

flatten()#

flatten(groups): Command[]

Defined in: ui/client/features/command-palette/domain/CommandGroups.ts:16

Commands in the order they are displayed (group by group). Arrow keys move through this list.

Parameters#

groups

CommandGroup[]

Returns#

Command[]


groupCommands()#

groupCommands(commands): CommandGroup[]

Defined in: ui/client/features/command-palette/domain/CommandGroups.ts:5

Groups by heading in order of first appearance, keeping each group's command order.

Parameters#

commands

Command[]

Returns#

CommandGroup[]