File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -281,6 +281,9 @@ Optional RAW disables text properties and transformation."
281281 (set-marker-insertion-type tracking-marker t )
282282 (plist-put info :tracking-marker tracking-marker))
283283 (goto-char tracking-marker)
284+ (when (plist-get info :last-was-tool-result )
285+ (insert gptel-response-separator)
286+ (plist-put info :last-was-tool-result nil ))
284287 (unless raw
285288 (when transformer
286289 (setq response (funcall transformer response)))
@@ -295,7 +298,8 @@ Optional RAW disables text properties and transformation."
295298 (`(tool-call . , tool-calls )
296299 (gptel--display-tool-calls tool-calls info))
297300 (`(tool-result . , tool-results )
298- (gptel--display-tool-results tool-results info))))
301+ (gptel--display-tool-results tool-results info)
302+ (plist-put info :last-was-tool-result t ))))
299303
300304(defun gptel-curl--stream-filter (process output )
301305 (let* ((fsm (car (alist-get process gptel--request-alist)))
You can’t perform that action at this time.
0 commit comments