Function: eca-chat--shell-command-breakdown-line
eca-chat--shell-command-breakdown-line is a natively compiled function
defined in eca-chat.el.
Signature
(eca-chat--shell-command-breakdown-line CMD PREFIX ANNOTATE-ALWAYS-ASKS? &optional APPROVED?)
Documentation
Build a single breakdown line for CMD, a shellCommand details entry.
PREFIX is the line prefix string ($ for the first command,
↳ for the chained ones).
When ANNOTATE-ALWAYS-ASKS? is non-nil, commands that can never be
auto-approved get an annotation; only meaningful while the tool call is
pending approval (not on trusted/auto-allowed/finished calls).
APPROVED? is non-nil when the tool call is already approved.
Source Code
;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--shell-command-breakdown-line (cmd prefix annotate-always-asks? &optional approved?)
"Build a single breakdown line for CMD, a shellCommand details entry.
PREFIX is the line prefix string (`$ ' for the first command,
`↳ ' for the chained ones).
When ANNOTATE-ALWAYS-ASKS? is non-nil, commands that can never be
auto-approved get an annotation; only meaningful while the tool call is
pending approval (not on trusted/auto-allowed/finished calls).
APPROVED? is non-nil when the tool call is already approved."
(-let* (((&plist :command command :args args :approvalKey approval-key) cmd))
(concat (propertize prefix 'font-lock-face 'eca-chat-shell-command-breakdown-prefix-face)
(propertize command 'font-lock-face (eca-chat--shell-command-state-face cmd approved?))
(when (and args (> (length args) 0))
(concat " " (string-join (append args nil) " ")))
(when (and annotate-always-asks? (not approval-key))
(propertize " (always asks)" 'font-lock-face 'eca-chat-shell-command-always-asks-face)))))