gptel-curl: Run post-response-hook in gptel buffer
* gptel-curl.el (gptel-curl--stream-cleanup): `gptel-post-response-hook' should run in the buffer that was current when the request was sent. This was not the case for the curl method (with response streaming). Fixed.
This commit is contained in:
parent
ac754ceb2a
commit
422eba8048
1 changed files with 3 additions and 2 deletions
|
@ -145,8 +145,9 @@ PROCESS and STATUS are process parameters."
|
|||
(with-current-buffer gptel-buffer
|
||||
(when gptel-mode
|
||||
(gptel--update-header-line
|
||||
(format " Response Error: %s" http-msg) 'error)))))
|
||||
(run-hooks 'gptel-post-response-hook)
|
||||
(format " Response Error: %s" http-msg) 'error))))
|
||||
(with-current-buffer gptel-buffer
|
||||
(run-hooks 'gptel-post-response-hook)))
|
||||
(setf (alist-get process gptel-curl--process-alist nil 'remove) nil)
|
||||
(kill-buffer proc-buf)))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue