Function: eca-workspaces--chat-line

eca-workspaces--chat-line is a natively compiled function defined in eca-workspaces.el.

Signature

(eca-workspaces--chat-line SESSION CHAT-BUFFER)

Documentation

Return the rendered dashboard line for CHAT-BUFFER of SESSION.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-workspaces.el
(defun eca-workspaces--chat-line (session chat-buffer)
  "Return the rendered dashboard line for CHAT-BUFFER of SESSION."
  (let* ((status (eca-chat-status chat-buffer))
         (line (concat
                "   "
                (mapconcat
                 (lambda (segment-and-width)
                   (eca-workspaces--cell
                    (eca-workspaces--chat-segment (car segment-and-width)
                                                  chat-buffer
                                                  status)
                    (cdr segment-and-width)
                    ;; Only titles truncate; other cells show in full.
                    (eq (car segment-and-width) 'title)))
                 eca-workspaces-chat-segments
                 ""))))
    (add-text-properties
     0 (length line)
     (list 'eca-workspaces-session-id (eca--session-id session)
           'eca-workspaces-chat-id (buffer-local-value 'eca-chat--id
                                                       chat-buffer))
     line)
    (when (eq status 'waiting-approval)
      (add-face-text-property 0 (length line)
                              'eca-chat-approval-modeline-face
                              t line))
    (concat line "\n")))