Skip to content

ui/CommandListView

Classes

CommandListView

Defined in: ui/CommandListView.ts:31

Constructors

Constructor
new CommandListView(options): CommandListView;

Defined in: ui/CommandListView.ts:46

Parameters
options

CommandListViewOptions

Returns

CommandListView

Methods

focusSearch()
focusSearch(): void;

Defined in: ui/CommandListView.ts:67

Move keyboard focus to the search input and select existing text.

Returns

void

refreshRecents()
refreshRecents(): void;

Defined in: ui/CommandListView.ts:76

Refresh the recents section from storage. The Console writes to the same key, so we reread on demand (e.g. each time the modal opens).

Returns

void

destroy()
destroy(): void;

Defined in: ui/CommandListView.ts:82

Detach state subscription. Safe to call more than once.

Returns

void

recordRecent()
static recordRecent(name): void;

Defined in: ui/CommandListView.ts:277

Public helper so other code (e.g. Console after a successful send) can push a command into the recents list. Cap at RECENTS_MAX, dedupe by moving an existing entry to the front.

Parameters
name

string

Returns

void

Interfaces

CommandListViewOptions

Defined in: ui/CommandListView.ts:20

Properties

container
container: HTMLElement;

Defined in: ui/CommandListView.ts:22

Container that will hold the search input + scroll list.

stateManager
stateManager: StateManager;

Defined in: ui/CommandListView.ts:23

console
console: Console;

Defined in: ui/CommandListView.ts:24

onSelect?
optional onSelect?: (commandName) => void;

Defined in: ui/CommandListView.ts:26

Optional callback fired after a command is inserted (used by modal to close).

Parameters
commandName

string

Returns

void

placeholder?
optional placeholder?: string;

Defined in: ui/CommandListView.ts:28

Placeholder text for the search input.