Function: eca-chat--has-pending-approvals-p
eca-chat--has-pending-approvals-p is a natively compiled function
defined in eca-chat.el.
Signature
(eca-chat--has-pending-approvals-p)
Documentation
Return non-nil if current buffer has any pending approval tool call.
The buffer scan result is cached since mode-line, tab-line and
header-line call this on every redisplay; rescanning a long chat
each time is too slow (#307). Tool call lifecycle events and
eca-chat--clear mark the cache stale.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--has-pending-approvals-p ()
"Return non-nil if current buffer has any pending approval tool call.
The buffer scan result is cached since mode-line, tab-line and
header-line call this on every redisplay; rescanning a long chat
each time is too slow (#307). Tool call lifecycle events and
`eca-chat--clear' mark the cache stale."
(when (eq eca-chat--pending-approvals-cache 'dirty)
(setq-local eca-chat--pending-approvals-cache
(save-excursion
(goto-char (point-min))
(not (null (text-property-search-forward
'eca-tool-call-pending-approval-accept t t))))))
eca-chat--pending-approvals-cache)