branch: elpa/aidermacs
commit a8ebb012b1519d26a3ac3bbf5ed445a9f94f9af1
Author: Kang Tu (aider) <kang...@apple.com>
Commit: Kang Tu (aider) <kang...@apple.com>

    fix: update aider-general-command to read command from user input correctly
---
 aider.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/aider.el b/aider.el
index 199cd6ef2b..3c3235ccd8 100644
--- a/aider.el
+++ b/aider.el
@@ -126,13 +126,12 @@ COMMAND should be a string representing the command to 
send."
         (aider--send-command command)))))
 
 ;; Function to send a custom command to *aider* buffer
-(defun aider-general-command (command)
-  "Prompt the user to input COMMAND and send it to the *aider* comint buffer.
-COMMAND is a string representing the command to send."
-  (interactive
-   (list (read-string "Enter command to send to aider: ")))
-  ;; Use the shared helper function to send the command
-  (aider--send-command command))
+(defun aider-general-command ()
+  "Prompt the user to input COMMAND and send it to the *aider* comint buffer."
+  (interactive)
+  (let ((command (read-string "Enter command to send to aider: ")))
+    ;; Use the shared helper function to send the command
+    (aider--send-command command)))
 
 ;; New function to get command from user and send it prefixed with "/code "
 (defun aider-code-command ()

Reply via email to