Function: eca-chat--stop-prompt
eca-chat--stop-prompt is a natively compiled function defined in
eca-chat.el.
Signature
(eca-chat--stop-prompt SESSION)
Documentation
Stop the running chat prompt for SESSION.
Pending questions keep the turn active server-side, so allow stopping while any is pending: cancel them, then notify the server.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--stop-prompt (session)
"Stop the running chat prompt for SESSION.
Pending questions keep the turn active server-side, so allow
stopping while any is pending: cancel them, then notify the server."
(when (or (eq eca-chat--chat-loading t)
eca-chat--pending-questions)
(eca-chat--stream-flush)
(mapc #'eca-chat--cancel-question eca-chat--pending-questions)
(eca-api-notify session
:method "chat/promptStop"
:params (list :chatId eca-chat--id))
(eca-chat--set-chat-loading session 'stopping)))