1
0
Fork 0

Improve readability

This commit is contained in:
Bram Schoenmakers 2024-03-31 19:49:45 +02:00
parent 3f60094815
commit 3fe442758c
Signed by: bram
GPG key ID: 0CCD19DFDC63258F

13
kagi.el
View file

@ -91,13 +91,14 @@ called interactively, to select the corresponding prompt."
(push (cons ,name ,prompt) kagi--fastgpt-prompts)
(defun ,symbol-name (text &optional interactive-p)
(interactive (list (kagi--get-text-for-prompt) t))
(let ((prompt-template (if (functionp ,prompt)
(funcall ,prompt interactive-p)
,prompt)))
(let* ((prompt-template (if (functionp ,prompt)
(funcall ,prompt interactive-p)
,prompt))
(expanded-prompt (kagi--fastgpt-expand-prompt-placeholders
prompt-template
(lambda () text))))
(kagi-fastgpt-prompt
(kagi--fastgpt-expand-prompt-placeholders
prompt-template
(lambda () text))
expanded-prompt
nil
interactive-p)))))