[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gptel 00abbf7597 081/273: gptel-transient: More visual fee
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gptel 00abbf7597 081/273: gptel-transient: More visual feedback |
Date: |
Wed, 1 May 2024 10:01:48 -0400 (EDT) |
branch: elpa/gptel
commit 00abbf7597d7c4a5a5d9d4b8b4273afb89040a24
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
gptel-transient: More visual feedback
* gptel.el (gptel): `gptel' only pops to the gptel buffer when
called interactively.
* gptel-transient.el: Pop up the gptel session buffer when the
prompt is sent to it, but don't select it. Also message the user
that the response has been redirected to the gptel session.
---
gptel-transient.el | 17 ++++++++++++++---
gptel.el | 7 ++++---
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/gptel-transient.el b/gptel-transient.el
index 773a58be30..1548325677 100644
--- a/gptel-transient.el
+++ b/gptel-transient.el
@@ -328,7 +328,9 @@ will get progressively longer!"
t))
(point))
(point))))))
- (setq position (with-current-buffer buffer (point)))
+ (with-current-buffer buffer
+ (gptel--update-header-line " Waiting..." 'warning)
+ (setq position (point)))
(setq output-to-other-buffer-p t))
((setq buffer-name
(cl-some (lambda (s) (and (string-prefix-p "-e" s)
@@ -352,7 +354,9 @@ will get progressively longer!"
(with-current-buffer buffer
(goto-char (point-max))
(insert reduced-prompt)
- (setq position (point))))))
+ (setq position (point))
+ (when gptel-mode
+ (gptel--update-header-line " Waiting..." 'warning))))))
(when in-place
(setq prompt (gptel--create-prompt (point)))
@@ -375,7 +379,14 @@ will get progressively longer!"
:position position
:in-place (and in-place (not output-to-other-buffer-p))
:stream stream
- :callback callback)))
+ :callback callback)
+ (when output-to-other-buffer-p
+ (message (concat "Prompt sent to buffer: "
+ (propertize buffer-name 'face 'help-key-binding)))
+ (display-buffer
+ buffer '((display-buffer-reuse-window
+ display-buffer-pop-up-window)
+ (reusable-frames . visible))))))
;; ** Set system message
(transient-define-suffix gptel--suffix-system-message ()
diff --git a/gptel.el b/gptel.el
index fc50b24370..ce239021c7 100644
--- a/gptel.el
+++ b/gptel.el
@@ -618,11 +618,12 @@ buffer created or switched to."
(t (funcall gptel-default-mode)))
(unless gptel-mode (gptel-mode 1))
(if (bobp) (insert (or initial (gptel-prompt-string))))
- (pop-to-buffer (current-buffer))
(goto-char (point-max))
(skip-chars-backward "\t\r\n")
- (message "Send your query with %s!"
- (substitute-command-keys "\\[gptel-send]"))
+ (when (called-interactively-p 'gptel)
+ (pop-to-buffer (current-buffer))
+ (message "Send your query with %s!"
+ (substitute-command-keys "\\[gptel-send]")))
(current-buffer)))
(defun gptel--convert-markdown->org (str)
- [nongnu] elpa/gptel 1ab8a57183 051/273: add installation instructions, (continued)
- [nongnu] elpa/gptel 1ab8a57183 051/273: add installation instructions, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel cd22ea836c 045/273: Add autoload for gptel-send, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel f843614f5b 048/273: gptel: Set gptel-api-key if reading from minibuffer, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel a500c76a68 053/273: Encode a lambda-provided API key as utf-8, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel c22c59d20a 061/273: gptel: Add post-response hook and fix org converter, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 1cd0f58552 067/273: gptel-curl: Better error handling when streaming, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 44045be327 072/273: gptel: gptel-mode is local by default, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel a43f5ac5fa 064/273: gptel: Rename stream-related vars and defuns, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 2e34981aa0 062/273: gptel: Rename :insert-marker, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 23332a9bc5 077/273: gptel-transient: Add outline-minor-mode support, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 00abbf7597 081/273: gptel-transient: More visual feedback,
ELPA Syncer <=
- [nongnu] elpa/gptel 444a43134f 083/273: gptel-curl: Fix current-buffer for Curl requests, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 37c381c2e5 092/273: README: Update with acknowledgments and more, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel d13b0c4ab7 088/273: gptel-transient: Fix gptel-system-prompt, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 6202474a6e 080/273: README: Update with changes to gptel-menu, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 075609544a 085/273: README: Update instructions for setting key (#46), ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel a7207a3835 097/273: README: Add TOC, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel f218388d4d 082/273: gptel-transient: Fix bug when sending in existing session, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 30700cc88a 096/273: README: Mention extensions, gptel-proxy, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel 09729ee718 089/273: gptel: Create customization group, ELPA Syncer, 2024/05/01
- [nongnu] elpa/gptel ac754ceb2a 086/273: gptel: Handle read-only gptel-buffers, ELPA Syncer, 2024/05/01