Function: eca-workspaces--workspace-line
eca-workspaces--workspace-line is a natively compiled function defined
in eca-workspaces.el.
Signature
(eca-workspaces--workspace-line SESSION)
Documentation
Return the rendered dashboard line for 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--workspace-line (session)
"Return the rendered dashboard line for SESSION."
(let* ((session-id (eca--session-id session))
(folded (memq session-id eca-workspaces--folded-sessions))
(chats-count (length (eca-chat-buffers session)))
(label (eca-buttonize
nil
(concat
(propertize (if folded "▶" "▼") 'face 'shadow)
" "
(propertize (eca--session-project-name session)
'face 'bold)
(propertize (concat " "
(string-join
(-map #'abbreviate-file-name
(eca--session-workspace-folders session))
", "))
'face 'eca-workspaces-tree-chat-details-face))
(lambda () (eca-workspaces--toggle-session session-id))))
(summary (propertize
(concat
(format "%d chat%s" chats-count
(if (= 1 chats-count) "" "s"))
(when-let* ((cost (eca-workspaces--session-cost session)))
(format " · $%.2f session" cost)))
'face 'eca-workspaces-tree-chat-details-face))
(line (concat (eca-workspaces--cell
label eca-workspaces-workspace-width t)
summary)))
(add-text-properties 0 (length line)
(list 'eca-workspaces-session-id session-id
'eca-workspaces-session t)
line)
(concat line "\n")))