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."
266
266
(set-marker-insertion-type tracking-marker t )
267
267
(plist-put info :tracking-marker tracking-marker))
268
268
(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 ))
269
272
(unless raw
270
273
(when transformer
271
274
(setq response (funcall transformer response)))
@@ -280,7 +283,8 @@ Optional RAW disables text properties and transformation."
280
283
(`(tool-call . , tool-calls )
281
284
(gptel--display-tool-calls tool-calls info))
282
285
(`(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 ))))
284
288
285
289
(defun gptel-curl--stream-filter (process output )
286
290
(let* ((fsm (alist-get process gptel--request-alist))
You can’t perform that action at this time.
0 commit comments