Function: gptel--continue-query
gptel--continue-query is an interactive and natively compiled function
defined in gptel.el.
Signature
(gptel--continue-query &optional COPY)
Documentation
Continue sending the gptel query displayed in this buffer.
The request is continued with the same parameters as originally specified.
With prefix arg COPY, copy the Curl command for the request to the kill ring instead.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/q3r7g81pvghw7a523kjk2k2zih3pfk8z-emacs-packages-deps/share/emacs/site-lisp/elpa/gptel-20261002.545/gptel.el
(defun gptel--continue-query (&optional copy)
"Continue sending the gptel query displayed in this buffer.
The request is continued with the same parameters as originally
specified.
With prefix arg COPY, copy the Curl command for the request to the
kill ring instead."
(interactive "P" lisp-data-mode fundamental-mode)
(unless (equal (buffer-name) "*gptel-query*")
(user-error "This command is meant for use in a gptel dry-run buffer"))
(save-excursion
(goto-char (point-min))
(condition-case-unless-debug nil
(when-let* ((data (if (eq major-mode 'lisp-data-mode)
(read (current-buffer))
(gptel--json-read))))
(cl-assert (cl-typep gptel--fsm-last 'gptel-fsm))
(plist-put (gptel-fsm-info gptel--fsm-last) :data data)
(if copy ;Copy Curl command instead of sending request
(let ((args (gptel-curl--get-args (gptel-fsm-info gptel--fsm-last)
(md5 (format "%s" (random))))))
(kill-new
(mapconcat #'shell-quote-argument
(cons (gptel--curl-path) args) " \\\n"))
(message "Curl command for request copied to kill-ring"))
(gptel--fsm-transition gptel--fsm-last) ;INIT -> WAIT
(quit-window)))
(error
(user-error "Can not resume request: could not read data from buffer!")))))