mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-02 21:19:12 +00:00
Auto configure server before loading khoj-menu
If the config hasn't changed there'll be no update. If config has changed indexing will get triggered asynchronously. But user cannot make query till indexing done As easier to know when server ready to configure
This commit is contained in:
@@ -266,7 +266,9 @@ for example), set this to the full interpreter path."
|
||||
(setq khoj--server-ready? nil))
|
||||
:filter (lambda (process msg)
|
||||
(cond ((string-match (format "Uvicorn running on %s" khoj-server-url) msg)
|
||||
(setq khoj--server-ready? t))
|
||||
(progn
|
||||
(setq khoj--server-ready? t)
|
||||
(khoj--server-configure)))
|
||||
((not khoj--server-ready?)
|
||||
(dolist (line (split-string msg "\n"))
|
||||
(message "khoj.el: %s" (nth 1 (split-string msg " " t " *"))))))
|
||||
@@ -923,6 +925,7 @@ Paragraph only starts at first text after blank line."
|
||||
(khoj--server-setup))
|
||||
(while (not khoj--server-ready?)
|
||||
(sleep-for 0.5))
|
||||
(khoj--server-configure)
|
||||
(khoj--menu))
|
||||
|
||||
(provide 'khoj)
|
||||
|
||||
Reference in New Issue
Block a user