Skip to content

Commit f305172

Browse files
committed
Fix backend buffer parsers ignoring converted user queries
1 parent a927990 commit f305172

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

gptel-gemini.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@
9999
(or (not max-entries) (>= max-entries 0))
100100
(setq prop (text-property-search-backward
101101
'gptel 'response
102-
(when (get-char-property (max (point-min) (1- (point)))
103-
'gptel)
102+
(when (eq (get-char-property (max (point-min) (1- (point)))
103+
'gptel)
104+
'response)
104105
t))))
105106
(if (prop-match-value prop) ;assistant role
106107
(push (list :role "model"

gptel-kagi.el

Lines changed: 3 additions & 2 deletions
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-name gptel-model)))
9192
(list :url url)

gptel-ollama.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,9 @@ Intended for internal use only.")
104104
(or (not max-entries) (>= max-entries 0))
105105
(setq prop (text-property-search-backward
106106
'gptel 'response
107-
(when (get-char-property (max (point-min) (1- (point)))
108-
'gptel)
107+
(when (eq (get-char-property (max (point-min) (1- (point)))
108+
'gptel)
109+
'response)
109110
t))))
110111
(if (prop-match-value prop) ;assistant role
111112
(push (list :role "assistant"

gptel-openai.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ with differing settings.")
153153
(or (not max-entries) (>= max-entries 0))
154154
(setq prop (text-property-search-backward
155155
'gptel 'response
156-
(when (get-char-property (max (point-min) (1- (point)))
157-
'gptel)
156+
(when (eq (get-char-property (max (point-min) (1- (point)))
157+
'gptel)
158+
'response)
158159
t))))
159160
(if (prop-match-value prop) ;assistant role
160161
(push (list :role "assistant"

0 commit comments

Comments
 (0)