Function: eca-chat--approval-acted-on-p

eca-chat--approval-acted-on-p is a natively compiled function defined in eca-chat.el.

Signature

(eca-chat--approval-acted-on-p ID)

Documentation

Return non-nil when point is within tool call ID's block awaiting approval.

Point lands there when the user clicks or hits RET on a button, or when eca-chat--ensure-tool-call-approval-visible anchored the window on the block. Must be checked before the block is re-rendered without its buttons.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--approval-acted-on-p (id)
  "Return non-nil when point is within tool call ID's block awaiting approval.
Point lands there when the user clicks or hits RET on a button, or
when `eca-chat--ensure-tool-call-approval-visible' anchored the
window on the block.  Must be checked before the block is
re-rendered without its buttons."
  (when-let* ((win (get-buffer-window (current-buffer)))
              (ov-label (eca-chat--get-expandable-content id))
              (ov-content (overlay-get ov-label 'eca-chat--expandable-content-ov-content)))
    (and (eca-chat--tool-call-accept-button-pos id)
         (<= (overlay-start ov-label) (window-point win) (overlay-end ov-content)))))