Skip to content

Commit bac09f8

Browse files
authored
Merge pull request #151 from MarselScheer/fix-tool-reject
Fix: rejecting tool-call
2 parents 8dce305 + c5fbd63 commit bac09f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

eca-chat.el

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2966,21 +2966,23 @@ Must be called with `eca-chat--with-current-buffer' or equivalent."
29662966

29672967
;;;###autoload
29682968
(defun eca-chat-tool-call-accept-next ()
2969-
"Search the next pending approval tool call after cursor and approve it."
2969+
"Search the next pending approval tool call in the buffer and approve it, starting from the beginning of the buffer."
29702970
(interactive)
29712971
(eca-assert-session-running (eca-session))
29722972
(eca-chat--with-current-buffer (eca-chat--get-last-buffer (eca-session))
29732973
(save-excursion
2974+
(goto-char (point-min))
29742975
(when (text-property-search-forward 'eca-tool-call-pending-approval-accept t t)
29752976
(call-interactively #'eca-chat--key-pressed-return)))))
29762977

29772978
;;;###autoload
29782979
(defun eca-chat-tool-call-reject-next ()
2979-
"Search the next pending approval tool call after cursor and reject it."
2980+
"Search the next pending approval tool call in the buffer and reject it, starting from the beginning of the buffer."
29802981
(interactive)
29812982
(eca-assert-session-running (eca-session))
29822983
(eca-chat--with-current-buffer (eca-chat--get-last-buffer (eca-session))
29832984
(save-excursion
2985+
(goto-char (point-min))
29842986
(when (text-property-search-forward 'eca-tool-call-pending-approval-reject t t)
29852987
(call-interactively #'eca-chat--key-pressed-return)))))
29862988

0 commit comments

Comments
 (0)