gptel-transient: No pre-fill when reading from minibuffer
* gptel-transient.el (gptel--suffix-send): Don't pre-fill the minibuffer prompt with the current line when reading the query from the minibuffer. (If the region is active, it is used as the initial contents -- this behavior is unchanged.)
This commit is contained in:
parent
34a52aa047
commit
12e00cbd09
1 changed files with 3 additions and 4 deletions
|
@ -599,10 +599,9 @@ Or in an extended conversation:
|
||||||
((member "m" args)
|
((member "m" args)
|
||||||
(read-string
|
(read-string
|
||||||
(format "Ask %s: " (gptel-backend-name gptel-backend))
|
(format "Ask %s: " (gptel-backend-name gptel-backend))
|
||||||
(apply #'buffer-substring-no-properties
|
(and (use-region-p)
|
||||||
(if (use-region-p)
|
(buffer-substring-no-properties
|
||||||
(list (region-beginning) (region-end))
|
(region-beginning) (region-end)))))
|
||||||
(list (line-beginning-position) (line-end-position))))))
|
|
||||||
((member "y" args)
|
((member "y" args)
|
||||||
(unless (car-safe kill-ring)
|
(unless (car-safe kill-ring)
|
||||||
(user-error "`kill-ring' is empty! Nothing to send"))
|
(user-error "`kill-ring' is empty! Nothing to send"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue