gptel-transient: Improve system-message edit buffer
* gptel-transient.el (gptel--suffix-system-message): Use a header line for better messaging when editing the system prompt.
This commit is contained in:
parent
e5357383ce
commit
48047c0600
1 changed files with 9 additions and 8 deletions
|
@ -535,19 +535,20 @@ This uses the prompts in the variable
|
||||||
(let ((inhibit-read-only t))
|
(let ((inhibit-read-only t))
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(text-mode)
|
(text-mode)
|
||||||
(insert
|
(setq header-line-format
|
||||||
"# Insert your system message below and press "
|
(concat
|
||||||
|
"Edit your system message below and press "
|
||||||
(propertize "C-c C-c" 'face 'help-key-binding)
|
(propertize "C-c C-c" 'face 'help-key-binding)
|
||||||
" when ready, or "
|
" when ready, or "
|
||||||
(propertize "C-c C-k" 'face 'help-key-binding)
|
(propertize "C-c C-k" 'face 'help-key-binding)
|
||||||
" to abort.\n"
|
" to abort."))
|
||||||
|
(insert
|
||||||
"# Example: You are a helpful assistant. Answer as concisely as possible.\n"
|
"# Example: You are a helpful assistant. Answer as concisely as possible.\n"
|
||||||
"# Example: Reply only with shell commands and no prose.\n"
|
"# Example: Reply only with shell commands and no prose.\n"
|
||||||
"# Example: You are a poet. Reply only in verse.\n")
|
"# Example: You are a poet. Reply only in verse.\n\n")
|
||||||
(add-text-properties
|
(add-text-properties
|
||||||
(point-min) (point)
|
(point-min) (1- (point))
|
||||||
(list 'read-only t 'face 'font-lock-comment-face))
|
(list 'read-only t 'face 'font-lock-comment-face))
|
||||||
(insert "\n")
|
|
||||||
;; TODO: make-separator-line requires Emacs 28.1+.
|
;; TODO: make-separator-line requires Emacs 28.1+.
|
||||||
;; (insert (propertize (make-separator-line) 'rear-nonsticky t))
|
;; (insert (propertize (make-separator-line) 'rear-nonsticky t))
|
||||||
(set-marker msg-start (point))
|
(set-marker msg-start (point))
|
||||||
|
|
Loading…
Add table
Reference in a new issue