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 @@ -283,6 +283,9 @@ Optional RAW disables text properties and transformation."
283
283
(set-marker-insertion-type tracking-marker t )
284
284
(plist-put info :tracking-marker tracking-marker))
285
285
(goto-char tracking-marker)
286
+ (when (plist-get info :last-was-tool-result )
287
+ (insert gptel-response-separator)
288
+ (plist-put info :last-was-tool-result nil ))
286
289
(unless raw
287
290
(when transformer
288
291
(setq response (funcall transformer response)))
@@ -297,7 +300,8 @@ Optional RAW disables text properties and transformation."
297
300
(`(tool-call . , tool-calls )
298
301
(gptel--display-tool-calls tool-calls info))
299
302
(`(tool-result . , tool-results )
300
- (gptel--display-tool-results tool-results info))))
303
+ (gptel--display-tool-results tool-results info)
304
+ (plist-put info :last-was-tool-result t ))))
301
305
302
306
(defun gptel-curl--stream-filter (process output )
303
307
(let* ((fsm (car (alist-get process gptel--request-alist)))
You can’t perform that action at this time.
0 commit comments