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

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

[elpa] externals/ellama 0d9ab0ee25 6/9: Add key bindings for context man


From: ELPA Syncer
Subject: [elpa] externals/ellama 0d9ab0ee25 6/9: Add key bindings for context management
Date: Sun, 11 Feb 2024 12:58:09 -0500 (EST)

branch: externals/ellama
commit 0d9ab0ee2595dbbe9e14f03cd3d73688c326abee
Author: Sergey Kostyaev <sskostyaev@gmail.com>
Commit: Sergey Kostyaev <sskostyaev@gmail.com>

    Add key bindings for context management
---
 ellama.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/ellama.el b/ellama.el
index 424c349644..25674e2be2 100644
--- a/ellama.el
+++ b/ellama.el
@@ -125,6 +125,10 @@
             ("t c" ellama-complete "Text complete")
             ;; define
             ("d w" ellama-define-word "Define word")
+            ;; context
+            ("x b" ellama-context-add-buffer "Context add buffer")
+            ("x f" ellama-context-add-file "Context add file")
+            ("x s" ellama-context-add-selection "Context add selection")
             ;; provider
             ("p s" ellama-provider-select "Provider select"))))
       (dolist (key-command key-commands)
@@ -638,7 +642,7 @@ If EPHEMERAL non nil new session will not be associated 
with any file."
     (push (cons 'buffer buf) ellama--new-session-context)))
 
 ;;;###autoload
-(defun ellama-context-add-region ()
+(defun ellama-context-add-selection ()
   "Add file to current session."
   (interactive)
   (if-let* ((id ellama--current-session-id)
@@ -877,7 +881,7 @@ If CREATE-SESSION set, creates new session even if there is 
an active session."
   (interactive)
   (let ((input (read-string "Ask ellama about this text: ")))
     (if (region-active-p)
-       (ellama-context-add-region)
+       (ellama-context-add-selection)
       (ellama-context-add-buffer (buffer-name (current-buffer))))
     (ellama-chat input)))
 



reply via email to

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