Function: eca-chat--maybe-run-tool-call-functions
eca-chat--maybe-run-tool-call-functions is a natively compiled
function defined in eca-chat.el.
Signature
(eca-chat--maybe-run-tool-call-functions SESSION CONTENT)
Documentation
Run eca-chat-tool-call-functions when CONTENT is a tool call event.
Only the tool-call lifecycle content types trigger the hook, so subscribers are not called for every chunk streamed to SESSION.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--maybe-run-tool-call-functions (session content)
"Run `eca-chat-tool-call-functions' when CONTENT is a tool call event.
Only the tool-call lifecycle content types trigger the hook, so
subscribers are not called for every chunk streamed to SESSION."
(when (member (plist-get content :type)
'("toolCallRun" "toolCallRunning" "toolCalled" "toolCallRejected"))
(with-demoted-errors "eca-chat-tool-call-functions: %S"
(run-hook-with-args 'eca-chat-tool-call-functions session content))))