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 @@ -266,6 +266,9 @@ Optional RAW disables text properties and transformation."
266266 (set-marker-insertion-type tracking-marker t )
267267 (plist-put info :tracking-marker tracking-marker))
268268 (goto-char tracking-marker)
269+ (when (plist-get info :last-was-tool-result )
270+ (insert gptel-response-separator)
271+ (plist-put info :last-was-tool-result nil ))
269272 (unless raw
270273 (when transformer
271274 (setq response (funcall transformer response)))
@@ -280,7 +283,8 @@ Optional RAW disables text properties and transformation."
280283 (`(tool-call . , tool-calls )
281284 (gptel--display-tool-calls tool-calls info))
282285 (`(tool-result . , tool-results )
283- (gptel--display-tool-results tool-results info))))
286+ (gptel--display-tool-results tool-results info)
287+ (plist-put info :last-was-tool-result t ))))
284288
285289(defun gptel-curl--stream-filter (process output )
286290 (let* ((fsm (alist-get process gptel--request-alist))
You can’t perform that action at this time.
0 commit comments