Function: eca-chat--apply-selection-snapshot
eca-chat--apply-selection-snapshot is a natively compiled function
defined in eca-chat.el.
Signature
(eca-chat--apply-selection-snapshot SELECTION BUFFER)
Documentation
Apply atomic chat/open SELECTION fields to BUFFER.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--apply-selection-snapshot (selection buffer)
"Apply atomic chat/open SELECTION fields to BUFFER."
(when (and selection (buffer-live-p buffer))
(let (chat-config)
(dolist (mapping '((:model . :selectModel)
(:agent . :selectAgent)
(:variant . :selectVariant)
(:variants . :variants)
(:trust . :selectTrust)))
(when (plist-member selection (car mapping))
(setq chat-config
(plist-put chat-config
(cdr mapping)
(plist-get selection (car mapping))))))
(when chat-config
(eca-chat--apply-per-chat-config chat-config buffer)))))