branch: externals/ellama
commit fcb8d04f39112c978d91e1d41730a1b4ed0a482b
Merge: a3127089a9 e1bd9ecfc6
Author: Sergey Kostyaev <s-kosty...@users.noreply.github.com>
Commit: GitHub <nore...@github.com>

    Merge pull request #205 from s-kostyaev/fix-add-buffer-to-context
    
    Fix buffer name handling in context addition
---
 ellama.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ellama.el b/ellama.el
index 67edcd5d27..ad55f7349d 100644
--- a/ellama.el
+++ b/ellama.el
@@ -1302,7 +1302,10 @@ If EPHEMERAL non nil new session will not be associated 
with any file."
 (defun ellama-context-add-buffer (buf)
   "Add BUF to context."
   (interactive "bSelect buffer: ")
-  (let ((element (ellama-context-element-buffer :name buf)))
+  (let* ((buffer-name (if (stringp buf)
+                         buf
+                       (buffer-name buf)))
+        (element (ellama-context-element-buffer :name buffer-name)))
     (ellama-context-element-add element)))
 
 ;;;###autoload

Reply via email to