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 @@ -264,6 +264,9 @@ Optional RAW disables text properties and transformation."
264264 (set-marker-insertion-type tracking-marker t )
265265 (plist-put info :tracking-marker tracking-marker))
266266 (goto-char tracking-marker)
267+ (when (plist-get info :last-was-tool-result )
268+ (insert gptel-response-separator)
269+ (plist-put info :last-was-tool-result nil ))
267270 (unless raw
268271 (when transformer
269272 (setq response (funcall transformer response)))
@@ -278,7 +281,8 @@ Optional RAW disables text properties and transformation."
278281 (`(tool-call . , tool-calls )
279282 (gptel--display-tool-calls tool-calls info))
280283 (`(tool-result . , tool-results )
281- (gptel--display-tool-results tool-results info))))
284+ (gptel--display-tool-results tool-results info)
285+ (plist-put info :last-was-tool-result t ))))
282286
283287(defun gptel-curl--stream-filter (process output )
284288 (let* ((fsm (alist-get process gptel--request-alist))
You can’t perform that action at this time.
0 commit comments