Function: eca-chat--context-bar-make-cache-key

eca-chat--context-bar-make-cache-key is a natively compiled function defined in eca-chat.el.

Signature

(eca-chat--context-bar-make-cache-key BREAKDOWN CATEGORIES WIDTH GRAPHIC? COMPACT-PCT)

Documentation

Return a cache key for the context bar rendering inputs.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--context-bar-make-cache-key
    (breakdown categories width graphic? compact-pct)
  "Return a cache key for the context bar rendering inputs."
  (list width
        graphic?
        (when graphic? (frame-char-width))
        compact-pct
        (plist-get breakdown :usedTokens)
        (plist-get breakdown :freeTokens)
        (plist-get breakdown :contextLimit)
        (plist-get breakdown :freeColor)
        (plist-get breakdown :freeEmoji)
        (when graphic? (eca-chat--context-free-color breakdown))
        (mapcar (lambda (cat)
                  (list (plist-get cat :name)
                        (plist-get cat :tokens)
                        (plist-get cat :color)
                        (plist-get cat :emoji)
                        (when graphic?
                          (eca-chat--context-category-color cat))))
                categories)))