Function: eca-workspaces--session-cost

eca-workspaces--session-cost is a natively compiled function defined in eca-workspaces.el.

Signature

(eca-workspaces--session-cost SESSION)

Documentation

Return the total cost of all SESSION chats, or nil.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-workspaces.el
(defun eca-workspaces--session-cost (session)
  "Return the total cost of all SESSION chats, or nil."
  (let ((total (-sum (-map (lambda (buffer)
                             (string-to-number
                              (or (buffer-local-value 'eca-chat--session-cost
                                                      buffer)
                                  "0")))
                           (eca-chat-buffers session)))))
    (when (> total 0) total)))