branch: elpa/aidermacs commit 23c0c6ed70a520ed538436d03f5b831789dc0de9 Author: Kang Tu <kang...@apple.com> Commit: Kang Tu (aider) <kang...@apple.com>
feat: add function to send "ask <line under cursor>" to Aider buffer --- aider.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/aider.el b/aider.el index f4511a610d..5444962a56 100644 --- a/aider.el +++ b/aider.el @@ -237,6 +237,13 @@ The command will be formatted as \"/architect \" followed by the user command an (aider-add-current-file) (aider--send-command (concat prefix command))) +;; New function to send "ask <line under cursor>" to the Aider buffer +(defun aider-ask-question-under-cursor () + "Send the command \"ask <line under cursor>\" to the Aider buffer." + (interactive) + (let ((line (thing-at-point 'line t))) + (aider--send-command (concat "/ask " (string-trim line))))) + (provide 'aider) ;;; aider.el ends here