Function: gptel--format-tool-call

gptel--format-tool-call is a natively compiled function defined in gptel.el.

Signature

(gptel--format-tool-call NAME ARG-VALUES)

Documentation

Format a tool call for display in the buffer.

NAME and ARG-VALUES are the name and arguments for the call.

Source Code

;; Defined in /nix/store/q3r7g81pvghw7a523kjk2k2zih3pfk8z-emacs-packages-deps/share/emacs/site-lisp/elpa/gptel-20261002.545/gptel.el
(defun gptel--format-tool-call (name arg-values)
  "Format a tool call for display in the buffer.

NAME and ARG-VALUES are the name and arguments for the call."
  (format "(%s %s)\n"
          (propertize name 'font-lock-face 'font-lock-keyword-face)
          (propertize
           (mapconcat (lambda (arg)
                        (cond ((stringp arg)
                               (prin1-to-string
                                (replace-regexp-in-string
                                 "\n" "⮐" (truncate-string-to-width
                                           arg 256
                                           nil nil t))))
                              (t (prin1-to-string arg))))
                      arg-values " ")
           'font-lock-face 'font-lock-constant-face)))