From dcedf1c3371237761c6c29050b3747a61e5cc578 Mon Sep 17 00:00:00 2001 From: Pablo Stafforini Date: Thu, 5 Dec 2024 10:45:59 -0300 Subject: [PATCH] Revert "gptel-context: Support adding files in directories to context" This reverts commit 6b2c0b99ee23a992512cdbde9a0b1baa4a7d9657. --- gptel-context.el | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/gptel-context.el b/gptel-context.el index 6602507..f0877e6 100644 --- a/gptel-context.el +++ b/gptel-context.el @@ -112,14 +112,10 @@ context chunk. This is accessible as, for example: (message "Current region added as context.")) ;; If in dired ((derived-mode-p 'dired-mode) - (let ((files (cl-loop for file in (dired-get-marked-files) - if (file-directory-p file) - append (directory-files-recursively file "." t) - else collect file))) - (mapc (if (and arg (< (prefix-numeric-value arg) 0)) - #'gptel-context-remove + (mapc (if (and arg (< (prefix-numeric-value arg) 0)) + #'gptel-context-remove #'gptel-context-add-file) - (cl-remove-if #'file-directory-p files)))) + (dired-get-marked-files))) ;; If in an image buffer ((and (derived-mode-p 'image-mode) (gptel--model-capable-p 'media;)