armindarvish / consult-omni

A Powerful Versatile Omni Search inside Emacs
https://github.com/armindarvish/consult-omni/tree/main
131 stars 4 forks source link

The preview doesn't use the entire input if I type too fast #15

Closed anonimitoraf closed 1 month ago

anonimitoraf commented 2 months ago

Describe the bug When I type too fast, the search preview doesn't use the entire input. My config's pretty much the same as the basic example in the README

(use-package consult-omni
  :after consult
  :config
  (require 'consult-omni-sources)
  (require 'consult-omni-embark)
  (consult-omni-sources-load-modules)
  (setq consult-omni-show-preview t
        consult-omni-default-autosuggest-command #'consult-omni-dynamic-brave-autosuggest
        consult-omni-default-interactive-command #'consult-omni-multi
        consult-omni-multi-sources '("calc"
                                     ;; "File"
                                     ;; "Buffer"
                                     ;; "Bookmark"
                                     "Apps"
                                     ;; "gptel"
                                     "Brave"
                                     "Dictionary"
                                     ;; "Google"
                                     "Wikipedia"
                                     "elfeed"
                                     ;; "mu4e"
                                     ;; "buffers text search"
                                     "Notes Search"
                                     "Org Agenda"
                                     "GitHub"
                                     ;; "YouTube"
                                     "Invidious")
        consult-omni-brave-api-key (getenv "BRAVE_API_KEY")))

To Reproduce Steps to reproduce the behavior:

  1. Search "something"
  2. Notice that the search preview doesn't use "something". Instead it gets cutoff (see recording below)
  3. Try typing a bit slower
  4. Notice that it's fine this time

Expected behavior I expect my input to be debounced a bit and for the search preview to use my entire input.

Screenshots

Peek 2024-07-20 19-10.webm

Important Information:

armindarvish commented 2 months ago

@anonimitoraf That is weird and I cannot reproduce this. The only thing I can think of is that you are typing slow (and not fast) and you hit some API rate limits (query/seconds). What is the value of consult-omni-dynamic-input-debounce and consult-async-input-debounce? You can try to increase the former and see if that helps. If that does not solve the issue, then you need to help me understand the issue

armindarvish commented 1 month ago

Closing this, since there are no new updates, and nothing I can reproduce. Feel free to reopen if the problem persists.