Function: eca-chat--dismiss-pending-question-for-tool-call
eca-chat--dismiss-pending-question-for-tool-call is a natively
compiled function defined in eca-chat.el.
Signature
(eca-chat--dismiss-pending-question-for-tool-call TOOL-CALL-ID)
Documentation
Dismiss the pending question belonging to TOOL-CALL-ID, if any.
Used when another client answers the same ask_user question first, so
the server resolves the tool call out from under us. The tool output is
rendered by the caller; here we only drop the local question state and
refresh the prompt so this client does not stay stuck in answer mode.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--dismiss-pending-question-for-tool-call (tool-call-id)
"Dismiss the pending question belonging to TOOL-CALL-ID, if any.
Used when another client answers the same `ask_user' question first, so
the server resolves the tool call out from under us. The tool output is
rendered by the caller; here we only drop the local question state and
refresh the prompt so this client does not stay stuck in answer mode."
(when-let* ((question (and tool-call-id
(-first (lambda (q)
(equal tool-call-id
(plist-get q :tool-call-id)))
eca-chat--pending-questions))))
(setq eca-chat--pending-questions
(remq question eca-chat--pending-questions))
(eca-chat--refresh-question-prompt-prefix)
(eca-chat--refresh-transient-area)
(eca-chat--notify-status-changed (ignore-errors (eca-session)))))