Function: eca-chat-go-to-next-attention-in-project

eca-chat-go-to-next-attention-in-project is an interactive and natively compiled function defined in eca-chat.el.

Signature

(eca-chat-go-to-next-attention-in-project)

Documentation

Go to the next chat of the current project needing attention.

A chat needs attention when it is waiting on you: a tool call pending approval or an unanswered question. Cycles through the current session's chats, wrapping around, so repeated invocations visit every chat that is waiting.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
;;;###autoload
(defun eca-chat-go-to-next-attention-in-project ()
  "Go to the next chat of the current project needing attention.
A chat needs attention when it is waiting on you: a tool call
pending approval or an unanswered question.  Cycles through the
current session's chats, wrapping around, so repeated invocations
visit every chat that is waiting."
  (interactive)
  (let ((session (eca-session)))
    (eca-assert-session-running session)
    (let* ((chats (eca-chat--session-chats-oldest-first session))
           ;; Start searching after the current chat (wrapping) so each
           ;; call advances instead of re-selecting the current one.
           (ordered (eca-chat--rotate-after chats
                                            (cl-position (current-buffer)
                                                         chats)))
           (target (seq-find #'eca-chat--needs-attention-p ordered)))
      (if target
          (eca-chat--switch-to-buffer target session)
        (eca-info "No chat needs attention in this project")))))