branch: externals/ellama
commit cbb04b098be9e64a9c830b687b1a3592c6ed3101
Author: Sergey Kostyaev <[email protected]>
Commit: Sergey Kostyaev <[email protected]>
Add option to allow all tools without confirmation
Added a new defcustom variable `ellama-tools-allow-all` that enables
`ellama` to
use all tools without user confirmation. This feature is marked as
dangerous and
should be used at the user's own risk. The confirmation logic in
`ellama-tools-call` now checks this new variable in addition to the existing
confirmation hash.
---
ellama-tools.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/ellama-tools.el b/ellama-tools.el
index cf7fbf7518..f7c547d52a 100644
--- a/ellama-tools.el
+++ b/ellama-tools.el
@@ -31,6 +31,12 @@
;;; Code:
(require 'project)
+(defcustom ellama-tools-allow-all nil
+ "Allow `ellama' using all the tools without user confirmation.
+Dangerous. Use at your own risk."
+ :type 'boolean
+ :group 'ellama)
+
(defvar ellama-tools-available nil
"Alist containing all registered tools.")
@@ -51,7 +57,7 @@ otherwise."
(let ((confirmation (gethash function ellama-tools-confirm-allowed nil)))
(cond
;; If user has approved all calls, just execute the function
- ((when confirmation
+ ((when (or confirmation ellama-tools-allow-all)
(if args
(apply function args)
(funcall function))))