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 @@ -274,6 +274,9 @@ Optional RAW disables text properties and transformation."
274
274
(set-marker-insertion-type tracking-marker t )
275
275
(plist-put info :tracking-marker tracking-marker))
276
276
(goto-char tracking-marker)
277
+ (when (plist-get info :last-was-tool-result )
278
+ (insert gptel-response-separator)
279
+ (plist-put info :last-was-tool-result nil ))
277
280
(unless raw
278
281
(when transformer
279
282
(setq response (funcall transformer response)))
@@ -288,7 +291,8 @@ Optional RAW disables text properties and transformation."
288
291
(`(tool-call . , tool-calls )
289
292
(gptel--display-tool-calls tool-calls info))
290
293
(`(tool-result . , tool-results )
291
- (gptel--display-tool-results tool-results info))))
294
+ (gptel--display-tool-results tool-results info)
295
+ (plist-put info :last-was-tool-result t ))))
292
296
293
297
(defun gptel-curl--stream-filter (process output )
294
298
(let* ((fsm (alist-get process gptel--request-alist))
You can’t perform that action at this time.
0 commit comments