Skip to content

Commit

Permalink
gptel-transient: Exit transient when writing directive
Browse files Browse the repository at this point in the history
* gptel-transient.el (gptel--suffix-system-message): Explicitly
set the :transient slot of the system-message editor commands to
`transient--do-exit` (#157).
  • Loading branch information
karthink committed Dec 27, 2023
1 parent 94f6813 commit 00060c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gptel-transient.el
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ which see."
prompt-suffixes
(list (list "SPC" "Pick 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 ()
"Change the system prompt to send ChatGPT.
Expand Down Expand Up @@ -522,7 +525,7 @@ This uses the prompts in the variable

(transient-define-suffix gptel--suffix-system-message ()
"Set directives sent to ChatGPT."
:transient nil
:transient 'transient--do-exit
:description "Set custom directives"
:key "h"
(interactive)
Expand Down

0 comments on commit 00060c7

Please sign in to comment.