Skip to content

Commit 04535ff

Browse files
committed
Fix accept/reject actions
1 parent 61d7c5d commit 04535ff

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

eca-chat.el

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,8 +1723,8 @@ string."
17231723
(save-excursion
17241724
(eca-chat--with-current-buffer (eca-chat--get-buffer (eca-session))
17251725
(goto-char (point-min))
1726-
(text-property-search-forward 'eca-tool-call-pending-approval-accept t)
1727-
(call-interactively #'eca-chat--key-pressed-return))))
1726+
(when (text-property-search-forward 'eca-tool-call-pending-approval-accept t t)
1727+
(call-interactively #'eca-chat--key-pressed-return)))))
17281728

17291729
;;;###autoload
17301730
(defun eca-chat-tool-call-accept-next ()
@@ -1733,8 +1733,8 @@ string."
17331733
(eca-assert-session-running (eca-session))
17341734
(eca-chat--with-current-buffer (eca-chat--get-buffer (eca-session))
17351735
(save-excursion
1736-
(text-property-search-forward 'eca-tool-call-pending-approval-accept t)
1737-
(call-interactively #'eca-chat--key-pressed-return))))
1736+
(when (text-property-search-forward 'eca-tool-call-pending-approval-accept t t)
1737+
(call-interactively #'eca-chat--key-pressed-return)))))
17381738

17391739
;;;###autoload
17401740
(defun eca-chat-tool-call-reject-next ()
@@ -1743,8 +1743,8 @@ string."
17431743
(eca-assert-session-running (eca-session))
17441744
(eca-chat--with-current-buffer (eca-chat--get-buffer (eca-session))
17451745
(save-excursion
1746-
(text-property-search-forward 'eca-tool-call-pending-approval-reject t)
1747-
(call-interactively #'eca-chat--key-pressed-return))))
1746+
(when (text-property-search-forward 'eca-tool-call-pending-approval-reject t)
1747+
(call-interactively #'eca-chat--key-pressed-return)))))
17481748

17491749
;;;###autoload
17501750
(defun eca-chat-select-behavior ()

0 commit comments

Comments
 (0)