The ⌘K palette as a library piece: a dialog near the top with a large field, an optional row of scopes (all, pull requests, tasks...), the results in groups with their hints, an "ask the AI" action with the typed text and a footer that teaches the keys. ↑ ↓ move the active row, ↵ opens it, ⌘↵ asks the AI and Esc closes it.
The server owns the search, as in DevactionUI.Autocomplete (whose keyboard hook it shares and whose groups
it takes). The LiveView decides when it is there (:if={@open}); it takes the focus in and keeps it inside.
Summary
Functions
Attributes
id(:string) (required)label(:string) (required) - the name of the dialog, for assistive technology.query(:string) - Defaults to"".placeholder(:string) - Defaults tonil.search_event(:string) (required) - sent with the text, debounced.close_event(:string) (required)groups(:list) - as inAutocomplete:%{label, items: [%{id, label, to, hint, tone}]}. Defaults to[].empty(:string) (required)ask_label(:string) - Defaults tonil.ask_event(:string) - Defaults tonil.scopes(:list) -%{value, label}each; none draws no row. Defaults to[].scope(:string) - Defaults tonil.scope_event(:string) - Defaults tonil.scope_label(:string) - Defaults tonil.keys(:list) -{keys, what}for the footer:{"↑↓", "move"}. Defaults to[].- Global attributes are accepted.
Slots
search_icon