Function: eca-chat--context-chips

eca-chat--context-chips is a natively compiled function defined in eca-chat-context.el.

Signature

(eca-chat--context-chips START END)

Documentation

Return (CONTEXT . IMAGE) for each context chip between START and END.

IMAGE is the thumbnail the chip shows, or nil.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat-context.el
(defun eca-chat--context-chips (start end)
  "Return (CONTEXT . IMAGE) for each context chip between START and END.
IMAGE is the thumbnail the chip shows, or nil."
  (let ((chips '())
        (pos start))
    (while (< pos end)
      (let ((next (next-single-property-change pos 'eca-chat-context-item nil end)))
        (when-let* ((context (get-text-property pos 'eca-chat-context-item)))
          (push (cons context (-some-> (eca-chat--image-thumbnail-at pos next)
                                (overlay-get 'display)))
                chips))
        (setq pos next)))
    chips))