1
0
Fork 0

Merge branch 'main' into markdown-mode2

This commit is contained in:
Bram Schoenmakers 2024-07-24 21:04:16 +02:00
commit 2b471f9e76
Signed by: bram
GPG key ID: 0CCD19DFDC63258F
3 changed files with 8 additions and 2 deletions

View file

@ -272,6 +272,10 @@ The full changelog can be found in README.org.
- Full support for markdown syntax returned by FastGPT, by using the [[https://github.com/jrblevin/markdown-mode][markdown-mode]] package.
- Show a welcome message when starting the FastGPT shell (=kagi-fastgpt-shell=). This can be customized with =kagi-fastgpt-welcome-function=, a variable with a function that returns a welcome string.
*** Fixes
- Prompts defined with =define-kagi-fastgpt-prompt= wouldn't always work when expanding =%s= placeholders (possibly resulting in =Lisp error: (args-out-of-range 0 7)=).
*** Misc
- Minor refactoring in the code calling the FastGPT API.

View file

@ -229,7 +229,7 @@ returns a bullet list."
value)))
(defun kagi--format-references (references)
"Format the REFRENCES as a string.
"Format the REFERENCES as a string.
The REFERENCES is a part of the JSON response, see
https://help.kagi.com/kagi/api/fastgpt.html for more information."
@ -465,7 +465,9 @@ user input."
(lambda (match)
(pcase match
("%%" "%")
("%s" (or user-text (setq user-text (funcall text-function))))
("%s" (or user-text
(setq user-text (save-match-data
(funcall text-function)))))
(_ match)))
prompt t t)))

BIN
kagi.info

Binary file not shown.