branch: externals/ellama
commit 01882a95a16342966a594688d7fb9ae3451cc724
Author: Sergey Kostyaev <sskosty...@gmail.com>
Commit: Sergey Kostyaev <sskosty...@gmail.com>

    Fix `ellama--insert` for non chat buffers
---
 ellama.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ellama.el b/ellama.el
index 4a690b5d52..dec44e44f9 100644
--- a/ellama.el
+++ b/ellama.el
@@ -1249,7 +1249,7 @@ REASONING-BUFFER is a buffer for reasoning."
                     `((ignore . 
(,ellama-reasoning-display-action-function)))))))
              nil)))
        (when text
-         (if reasoning
+         (if (and reasoning ellama--current-session)
              (concat "</think>\n" (string-trim text))
            (string-trim text))))))))
 

Reply via email to