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

    Simplify file writing in ellama-tools-write-file-tool
    
    Replaced temp buffer-based file writing with write-region to simplify
    implementation and avoid temporary buffer overhead.
---
 ellama-tools.el | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/ellama-tools.el b/ellama-tools.el
index 54ab31c65d..eb0d3bb113 100644
--- a/ellama-tools.el
+++ b/ellama-tools.el
@@ -324,10 +324,7 @@ TOOL-PLIST is a property list in the format expected by 
`llm-make-tool'."
 
 (defun ellama-tools-write-file-tool (path content)
   "Write CONTENT to the file located at the specified PATH."
-  (with-temp-buffer
-    (setq buffer-file-name (expand-file-name path))
-    (insert content)
-    (save-buffer)))
+  (write-region content nil path nil 'silent))
 
 (ellama-tools-define-tool
  '(:function

Reply via email to