[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gptel 20e07943d7 2/2: gptel-rewrite: Implement dry-run for
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gptel 20e07943d7 2/2: gptel-rewrite: Implement dry-run for rewrite suffix |
Date: |
Sat, 23 Nov 2024 15:59:54 -0500 (EST) |
branch: elpa/gptel
commit 20e07943d792133ba57a325e123436de471e1429
Author: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
Commit: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
gptel-rewrite: Implement dry-run for rewrite suffix
* gptel-rewrite.el (gptel--suffix-rewrite): Implement the dry-run
option.
---
gptel-rewrite.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gptel-rewrite.el b/gptel-rewrite.el
index cebf125c5b..a018f11518 100644
--- a/gptel-rewrite.el
+++ b/gptel-rewrite.el
@@ -334,7 +334,7 @@ the changed regions. BUF is the (current) buffer."
;; * Transient suffixes for rewriting/refactoring
-(transient-define-suffix gptel--suffix-rewrite (&optional rewrite-message)
+(transient-define-suffix gptel--suffix-rewrite (&optional rewrite-message
dry-run)
"Rewrite or refactor region contents."
:key "r"
:description #'gptel--refactor-or-rewrite
@@ -346,6 +346,7 @@ the changed regions. BUF is the (current) buffer."
(gptel-use-context (and gptel-use-context 'system)))
(deactivate-mark)
(gptel-request prompt
+ :dry-run dry-run
:context
(let ((ov (make-overlay (region-beginning) (region-end))))
(overlay-put ov 'category 'gptel)