We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52f1902 commit 53be24eCopy full SHA for 53be24e
gptel-kagi.el
@@ -98,13 +98,10 @@
98
(user-error "No user prompt found!")
99
(let ((prompts
100
(if (or gptel-mode gptel-track-response)
101
- (string-trim
102
- (buffer-substring-no-properties (prop-match-beginning prop)
103
- (prop-match-end prop))
104
- (format "[\t\r\n ]*\\(?:%s\\)?[\t\r\n ]*"
105
- (regexp-quote (gptel-prompt-prefix-string)))
106
107
- (regexp-quote (gptel-response-prefix-string))))
+ (or (gptel--trim-prefixes
+ (buffer-substring-no-properties (prop-match-beginning prop)
+ (prop-match-end prop)))
+ "")
108
(string-trim (buffer-substring-no-properties (point-min) (point-max))))))
109
(pcase-exhaustive (gptel--model-name gptel-model)
110
("fastgpt" (setq prompts (list :query (if (prop-match-p prop) prompts ""))))
0 commit comments