Variable: gptel--tool-preview-alist
gptel--tool-preview-alist is a variable defined in gptel.el.
Value
nil
Documentation
Alist mapping tool names to preview functions for tools.
Each key is a tool name (string) and value is a list of one or two functions, for preview-setup and (optional) preview-teardown.
The preview-setup function is called with two arguments: a plist of the corresponding tool call arguments and the request INFO plist. It must set up the preview for the tool call and return a handle to the preview, which can be any object, but typically an overlay or a buffer.
The preview-setup can integrate with gptel's default previewer by inserting at point (and moving point), or use a different preview method entirely.
The preview-teardown function, if provided, is called with this handle when the tool call is accepted or rejected, and it must clear the preview.
Note: This tool call preview API is currently experimental.
Source Code
;; Defined in /nix/store/q3r7g81pvghw7a523kjk2k2zih3pfk8z-emacs-packages-deps/share/emacs/site-lisp/elpa/gptel-20261002.545/gptel.el
(defvar gptel--tool-preview-alist nil
"Alist mapping tool names to preview functions for tools.
Each key is a tool name (string) and value is a list of one or two
functions, for preview-setup and (optional) preview-teardown.
The preview-setup function is called with two arguments: a plist of the
corresponding tool call arguments and the request INFO plist. It must
set up the preview for the tool call and return a handle to the preview,
which can be any object, but typically an overlay or a buffer.
The preview-setup can integrate with gptel's default previewer by
inserting at point (and moving point), or use a different preview method
entirely.
The preview-teardown function, if provided, is called with this handle
when the tool call is accepted or rejected, and it must clear the
preview.
Note: This tool call preview API is currently experimental.")