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

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

[elpa] externals/ellama 2d982274cb 05/11: Pass complete response to on-d


From: ELPA Syncer
Subject: [elpa] externals/ellama 2d982274cb 05/11: Pass complete response to on-done function
Date: Fri, 22 Dec 2023 15:57:50 -0500 (EST)

branch: externals/ellama
commit 2d982274cb6834b61700d488a899889cd4567391
Author: Steven Allen <steven@stebalien.com>
Commit: Steven Allen <steven@stebalien.com>

    Pass complete response to on-done function
---
 ellama.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ellama.el b/ellama.el
index 6c01a31f6d..fb962ec5a8 100644
--- a/ellama.el
+++ b/ellama.el
@@ -190,8 +190,8 @@ current (buffer-local) conversation.
 :on-error ON-ERROR -- ON-ERROR a function that's called with an error message 
on
 failure (with BUFFER current).
 
-:on-done ON-DONE -- ON-DONE a function that's called when the request completes
-\(with BUFFER current)."
+:on-done ON-DONE -- ON-DONE a function that's called with the full response 
text
+when the request completes (with BUFFER current)."
   (let* ((buffer (or (plist-get args :buffer) (current-buffer)))
         (point (or (plist-get args :point)
                    (with-current-buffer buffer (point))))
@@ -245,7 +245,7 @@ failure (with BUFFER current).
                                      (undo-amalgamate-change-group 
ellama--change-group)
                                      (accept-change-group ellama--change-group)
                                      (spinner-stop)
-                                     (funcall donecb)))
+                                     (funcall donecb text)))
                                  (lambda (_ msg)
                                    (with-current-buffer buffer
                                      (cancel-change-group ellama--change-group)
@@ -267,7 +267,7 @@ failure (with BUFFER current).
              "## " ellama-assistant-nick ":\n")
       (ellama-stream prompt
                     :session t
-                    :on-done (lambda () (save-excursion
+                    :on-done (lambda (_) (save-excursion
                                      (goto-char (point-max))
                                      (insert "\n\n")))))))
 



reply via email to

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