branch: externals/ellama
commit bafbafec43c7f4a5b5f5a3d44db4f8923d2a8f50
Author: Sergey Kostyaev <[email protected]>
Commit: Sergey Kostyaev <[email protected]>

    Filter function objects from function call arguments
    
    Added filtering of function objects from the arguments list when displaying 
and
    confirming Ellama function calls, preventing display of uncallable function
    objects in the confirmation prompt.
---
 ellama-tools.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ellama-tools.el b/ellama-tools.el
index 52272f0268..5db40956e9 100644
--- a/ellama-tools.el
+++ b/ellama-tools.el
@@ -154,7 +154,7 @@ approved, \"Forbidden by the user\" otherwise."
                             ellama-tools-argument-max-length))
                           (t
                            (format "%S" arg))))
-                       args))
+                       (cl-remove-if (lambda (arg) (functionp arg)) args)))
               (prompt (format "Allow calling %s with arguments: %s?"
                               function-name
                               (mapconcat #'identity args-display ", ")))
@@ -174,7 +174,7 @@ approved, \"Forbidden by the user\" otherwise."
                                       arg)
                                      (t
                                       (format "%S" arg))))
-                                  args)))
+                                  (cl-remove-if (lambda (arg) (functionp arg)) 
args))))
                     (with-current-buffer buf
                       (erase-buffer)
                       (insert (propertize "Ellama Function Call Confirmation\n"

Reply via email to