gptel-transient: Exit transient when writing directive
* gptel-transient.el (gptel--suffix-system-message): Explicitly set the :transient slot of the system-message editor commands to `transient--do-exit` (#157).
This commit is contained in:
parent
32dd463bd6
commit
0690c8b6a9
1 changed files with 5 additions and 2 deletions
|
@ -188,7 +188,10 @@ which see."
|
||||||
prompt-suffixes
|
prompt-suffixes
|
||||||
(list (list "SPC" "Pick crowdsourced prompt"
|
(list (list "SPC" "Pick crowdsourced prompt"
|
||||||
'gptel--read-crowdsourced-prompt
|
'gptel--read-crowdsourced-prompt
|
||||||
:transient nil))))))
|
;; NOTE: Quitting the completing read when picking a
|
||||||
|
;; crowdsourced prompt will cause the transient to exit
|
||||||
|
;; instead of returning to the system prompt menu.
|
||||||
|
:transient 'transient--do-exit))))))
|
||||||
|
|
||||||
(transient-define-prefix gptel-system-prompt ()
|
(transient-define-prefix gptel-system-prompt ()
|
||||||
"Change the system prompt to send ChatGPT.
|
"Change the system prompt to send ChatGPT.
|
||||||
|
@ -522,7 +525,7 @@ This uses the prompts in the variable
|
||||||
|
|
||||||
(transient-define-suffix gptel--suffix-system-message ()
|
(transient-define-suffix gptel--suffix-system-message ()
|
||||||
"Set directives sent to ChatGPT."
|
"Set directives sent to ChatGPT."
|
||||||
:transient nil
|
:transient 'transient--do-exit
|
||||||
:description "Set custom directives"
|
:description "Set custom directives"
|
||||||
:key "h"
|
:key "h"
|
||||||
(interactive)
|
(interactive)
|
||||||
|
|
Loading…
Add table
Reference in a new issue