branch: elpa/aidermacs
commit 14f314949ca6abde303e3803c88a8c9e335fc8c9
Author: Kang Tu <[email protected]>
Commit: Kang Tu (aider) <[email protected]>
feat: add function to batch add Dired marked files to Aider buffer
---
aider.el | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/aider.el b/aider.el
index f3016350b1..3c809c5731 100644
--- a/aider.el
+++ b/aider.el
@@ -161,16 +161,6 @@ COMMAND should be a string representing the command to
send."
;; Use the shared helper function to send the command
(aider--send-command command t))))
-;; New function to add multiple Dired marked files to Aider buffer
-(defun aider-batch-add-dired-marked-files ()
- "Add multiple Dired marked files to the Aider buffer with the \"/add\"
command."
- (interactive)
- (let ((files (dired-get-marked-files)))
- (if files
- (let ((command (concat "/add " (mapconcat 'expand-file-name files "
"))))
- (aider--send-command command))
- (message "No files marked in Dired."))))
-
;; Function to send a custom command to corresponding aider buffer
(defun aider-general-command ()
"Prompt the user to input COMMAND and send it to the corresponding aider
comint buffer."
@@ -256,6 +246,18 @@ The command will be formatted as \"/architect \" followed
by the user command an
(let ((line (thing-at-point 'line t)))
(aider--send-command (concat "/ask " (string-trim line)))))
+;;; functions for dired related
+
+;; New function to add multiple Dired marked files to Aider buffer
+(defun aider-batch-add-dired-marked-files ()
+ "Add multiple Dired marked files to the Aider buffer with the \"/add\"
command."
+ (interactive)
+ (let ((files (dired-get-marked-files)))
+ (if files
+ (let ((command (concat "/add " (mapconcat 'expand-file-name files "
"))))
+ (aider--send-command command))
+ (message "No files marked in Dired."))))
+
;;; functions for .aider file
;; New function to send "<line under cursor>" to the Aider buffer