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