Follows the @query under the caret, searches for it 150 ms after the
last keystroke, and closes the list once the caret leaves it. The caller
calls it on every change with lookup set, and on every caret move
without, since only typing may search.
Usage
import { type UseMentionAutocompleteResult } from "src/hooks/editor/useMentionAutocomplete.ts";