Function: eca-chat--tool-call-accept-button-pos
eca-chat--tool-call-accept-button-pos is a natively compiled function
defined in eca-chat.el.
Signature
(eca-chat--tool-call-accept-button-pos ID)
Documentation
Return the position of the Accept button in tool call ID's label.
Return nil when the block is not rendered or awaits no approval.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--tool-call-accept-button-pos (id)
"Return the position of the Accept button in tool call ID's label.
Return nil when the block is not rendered or awaits no approval."
(when-let* ((ov-label (eca-chat--get-expandable-content id))
(ov-content (overlay-get ov-label 'eca-chat--expandable-content-ov-content)))
(save-excursion
(goto-char (overlay-start ov-label))
(when-let* ((match (text-property-search-forward
'eca-tool-call-pending-approval-accept t t))
(pos (prop-match-beginning match)))
;; The label ends where the content overlay starts; a later
;; match belongs to another block.
(when (< pos (overlay-start ov-content))
pos)))))