mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Change order of arg passed to query-api-and-render-results by importance
This commit is contained in:
parent
936a88fa7e
commit
b7aa22a059
1 changed files with 6 additions and 7 deletions
|
@ -275,9 +275,8 @@ Use `which-key` if available, else display simple message in echo area"
|
||||||
(encoded-query (url-hexify-string query)))
|
(encoded-query (url-hexify-string query)))
|
||||||
(format "%s/api/search?q=%s&t=%s&r=%s&n=%s" khoj-server-url encoded-query content-type rerank khoj-results-count)))
|
(format "%s/api/search?q=%s&t=%s&r=%s&n=%s" khoj-server-url encoded-query content-type rerank khoj-results-count)))
|
||||||
|
|
||||||
(defun khoj--query-api-and-render-results (query content-type query-url buffer-name)
|
(defun khoj--query-api-and-render-results (query-url content-type query buffer-name)
|
||||||
"Query Khoj API using QUERY, CONTENT-TYPE, QUERY-URL.
|
"Query Khoj QUERY-URL. Render results in BUFFER-NAME using QUERY, CONTENT-TYPE."
|
||||||
Render results in BUFFER-NAME."
|
|
||||||
;; get json response from api
|
;; get json response from api
|
||||||
(with-current-buffer buffer-name
|
(with-current-buffer buffer-name
|
||||||
(let ((inhibit-read-only t)
|
(let ((inhibit-read-only t)
|
||||||
|
@ -335,9 +334,9 @@ Render results in BUFFER-NAME."
|
||||||
(setq khoj--rerank t)
|
(setq khoj--rerank t)
|
||||||
(message "Khoj: Rerank Results"))
|
(message "Khoj: Rerank Results"))
|
||||||
(khoj--query-api-and-render-results
|
(khoj--query-api-and-render-results
|
||||||
query
|
|
||||||
khoj--content-type
|
|
||||||
query-url
|
query-url
|
||||||
|
khoj--content-type
|
||||||
|
query
|
||||||
khoj-buffer-name))))))
|
khoj-buffer-name))))))
|
||||||
|
|
||||||
(defun khoj--delete-open-network-connections-to-server ()
|
(defun khoj--delete-open-network-connections-to-server ()
|
||||||
|
@ -438,9 +437,9 @@ Render results in BUFFER-NAME."
|
||||||
(buffer-name (get-buffer-create khoj--buffer-name)))
|
(buffer-name (get-buffer-create khoj--buffer-name)))
|
||||||
(progn
|
(progn
|
||||||
(khoj--query-api-and-render-results
|
(khoj--query-api-and-render-results
|
||||||
query-title
|
|
||||||
content-type
|
|
||||||
query-url
|
query-url
|
||||||
|
content-type
|
||||||
|
query-title
|
||||||
buffer-name)
|
buffer-name)
|
||||||
(switch-to-buffer buffer-name)
|
(switch-to-buffer buffer-name)
|
||||||
(goto-char (point-min)))))
|
(goto-char (point-min)))))
|
||||||
|
|
Loading…
Reference in a new issue