papi-dts
    Preparing search index...
    • Updates the mutable filterText/selectedIndex state of a command palette overlay and notifies subscribers. selectedIndex is always clamped to [0, itemCount - 1] (or 0 when itemCount is 0) — both when moved by selectedIndexDelta and when left alone, since a filterText change can shrink the filtered list out from under the previous index.

      Parameters

      • id: string

        The overlay id to update

      • patch: {
            filterText?: string;
            itemCount: number;
            selectedIndex?: number;
            selectedIndexDelta?: number;
        }

        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

      Returns boolean

      True if the overlay was found and updated, false otherwise