Register separate timestamps for user query and response by Khoj Chat

This commit is contained in:
Debanjum Singh Solanky
2023-03-24 15:27:30 +07:00
parent 93e2aff786
commit cf28f104c7
3 changed files with 9 additions and 5 deletions

View File

@@ -363,10 +363,11 @@ Render results in BUFFER-NAME using QUERY, CONTENT-TYPE."
;; render json response into formatted chat messages
(with-current-buffer (get-buffer buffer-name)
(let ((inhibit-read-only t)
(query-time (format-time-string "%F %T"))
(json-response (khoj--query-chat-api query)))
(goto-char (point-max))
(insert
(khoj--render-chat-message query "you")
(khoj--render-chat-message query "you" query-time)
(khoj--render-chat-response json-response)))
(progn (org-mode)
(visual-line-mode))