Function: eca-chat--update-task-state

eca-chat--update-task-state is a natively compiled function defined in eca-chat.el.

Signature

(eca-chat--update-task-state CONTENT)

Documentation

Store the task state carried by the finished task tool call CONTENT.

The server sends a :details plist with :type "task", :activeSummary,
:tasks, :inProgressTaskIds and :summary; a failed or rejected call
carries none. The widget is then re-rendered from the last known state, dropping the placeholder or approval prompt shown for that call. When the widget is asking to approve another task tool call (the server asks for the next call while the approved one still runs), that prompt is kept and the new state shows once it resolves.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--update-task-state (content)
  "Store the task state carried by the finished task tool call CONTENT.
The server sends a :details plist with :type \"task\", :activeSummary,
:tasks, :inProgressTaskIds and :summary; a failed or rejected call
carries none.  The widget is then re-rendered from the last known state,
dropping the placeholder or approval prompt shown for that call.  When
the widget is asking to approve another task tool call (the server asks
for the next call while the approved one still runs), that prompt is
kept and the new state shows once it resolves."
  (when-let* ((details (plist-get content :details)))
    (setq-local eca-chat--task-state details))
  (let ((approval-id (eca-chat--task-widget-approval-id)))
    (when (or (null approval-id)
              (equal approval-id (plist-get content :id)))
      (eca-chat--render-task-widget))))