Skip to content

Commit

Permalink
Revert "gptel-context: Support adding files in directories to context"
Browse files Browse the repository at this point in the history
This reverts commit 6b2c0b9.
  • Loading branch information
benthamite committed Dec 5, 2024
1 parent c99b2cc commit 147fe6e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions gptel-context.el
Original file line number Diff line number Diff line change
Expand Up @@ -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;)
Expand Down

0 comments on commit 147fe6e

Please sign in to comment.