Skip to content

Commit 2338cf4

Browse files
committed
Fix backend buffer parsers ignoring converted user queries
1 parent a70af0b commit 2338cf4

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

gptel-gemini.el

+3-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,9 @@
9191
(or (not max-entries) (>= max-entries 0))
9292
(setq prop (text-property-search-backward
9393
'gptel 'response
94-
(when (get-char-property (max (point-min) (1- (point)))
95-
'gptel)
94+
(when (eq (get-char-property (max (point-min) (1- (point)))
95+
'gptel)
96+
'response)
9697
t))))
9798
(push (list :role (if (prop-match-value prop) "model" "user")
9899
:parts

gptel-kagi.el

+3-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@
8484
;; (filename (thing-at-point 'existing-filename)) ;no file upload support yet
8585
(prop (text-property-search-backward
8686
'gptel 'response
87-
(when (get-char-property (max (point-min) (1- (point)))
88-
'gptel)
87+
(when (eq (get-char-property (max (point-min) (1- (point)))
88+
'gptel)
89+
'response)
8990
t))))
9091
(if (and url (string-prefix-p "summarize" gptel-model))
9192
(list :url url)

gptel-ollama.el

+3-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ Intended for internal use only.")
101101
(or (not max-entries) (>= max-entries 0))
102102
(setq prop (text-property-search-backward
103103
'gptel 'response
104-
(when (get-char-property (max (point-min) (1- (point)))
105-
'gptel)
104+
(when (eq (get-char-property (max (point-min) (1- (point)))
105+
'gptel)
106+
'response)
106107
t))))
107108
(push (list :role (if (prop-match-value prop) "assistant" "user")
108109
:content

gptel-openai.el

+3-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ with differing settings.")
127127
(or (not max-entries) (>= max-entries 0))
128128
(setq prop (text-property-search-backward
129129
'gptel 'response
130-
(when (get-char-property (max (point-min) (1- (point)))
131-
'gptel)
130+
(when (eq (get-char-property (max (point-min) (1- (point)))
131+
'gptel)
132+
'response)
132133
t))))
133134
(push (list :role (if (prop-match-value prop) "assistant" "user")
134135
:content

0 commit comments

Comments
 (0)