emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ellama f1fbb33521 03/53: add code review command


From: ELPA Syncer
Subject: [elpa] externals/ellama f1fbb33521 03/53: add code review command
Date: Sun, 17 Dec 2023 18:57:56 -0500 (EST)

branch: externals/ellama
commit f1fbb33521149a237e5757047cc16d7ee9f2e5ca
Author: Sergey Kostyaev <s.kostyaev@omp.ru>
Commit: Sergey Kostyaev <s.kostyaev@omp.ru>

    add code review command
---
 ellama.el | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/ellama.el b/ellama.el
index 7320e737ae..c265752b2c 100644
--- a/ellama.el
+++ b/ellama.el
@@ -56,7 +56,7 @@
   :type 'boolean)
 
 (defcustom ellama-user-nick "User" "User nick in logs."
-  :grop 'ellama
+  :group 'ellama
   :type 'string)
 
 (defcustom ellama-assistant-nick "Ellama" "Assistant nick in logs."
@@ -235,12 +235,21 @@ default. Default value is `ellama-template'."
 
 ;;;###autoload
 (defun ellama-summarize ()
-  "Summarize selected region of current buffer."
+  "Summarize selected region or current buffer."
   (interactive)
   (let ((text (if (region-active-p)
                  (buffer-substring-no-properties (region-beginning) 
(region-end))
                (buffer-substring-no-properties (point-min) (point-max)))))
     (ellama-instant (format "Summarize the following text:\n%s" text))))
 
+;;;###autoload
+(defun ellama-code-review ()
+  "Review code in selected region or current buffer."
+  (interactive)
+  (let ((text (if (region-active-p)
+                 (buffer-substring-no-properties (region-beginning) 
(region-end))
+               (buffer-substring-no-properties (point-min) (point-max)))))
+    (ellama-instant (format "Review the following code and make concise 
suggestions:\n```\n%s\n```" text))))
+
 (provide 'ellama)
 ;;; ellama.el ends here.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]