The overlay id to update
filterText replaces the stored filter text (omit to leave it unchanged; the empty
string is normalized to undefined so the entry never stores ''); selectedIndex sets the
highlighted index ABSOLUTELY (the active palette mirrors cmdk's arrow-key highlight this way —
it knows the resulting index, not a delta); selectedIndexDelta moves the current index by
this many items; both clamp; itemCount is the length of the filtered item list used to clamp
selectedIndex
True if the overlay was found and updated, false otherwise
Updates the mutable
filterText/selectedIndexstate of a command palette overlay and notifies subscribers.selectedIndexis always clamped to[0, itemCount - 1](or0whenitemCountis0) — both when moved byselectedIndexDeltaand when left alone, since afilterTextchange can shrink the filtered list out from under the previous index.