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."
274274 (set-marker-insertion-type tracking-marker t )
275275 (plist-put info :tracking-marker tracking-marker))
276276 (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 ))
277280 (unless raw
278281 (when transformer
279282 (setq response (funcall transformer response)))
@@ -288,7 +291,8 @@ Optional RAW disables text properties and transformation."
288291 (`(tool-call . , tool-calls )
289292 (gptel--display-tool-calls tool-calls info))
290293 (`(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 ))))
292296
293297(defun gptel-curl--stream-filter (process output )
294298 (let* ((fsm (alist-get process gptel--request-alist))
You can’t perform that action at this time.
0 commit comments