branch: elpa/aidermacs commit e0e4a34d0ecda174b7543c109a09f037370c1e39 Author: Arthur Heymans <art...@aheymans.xyz> Commit: Matthew Zeng <matthew...@posteo.net>
feat: add auto-commit command to Magit transient menu --- aidermacs.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/aidermacs.el b/aidermacs.el index be53b6083a..1c5b6c0d4b 100644 --- a/aidermacs.el +++ b/aidermacs.el @@ -168,6 +168,7 @@ This is the file name without path." :if (lambda () aidermacs-auto-commits)) ("u" "Undo Last Commit" aidermacs-undo-last-commit :if (lambda () aidermacs-auto-commits)) + ("C" "Auto-commit Changes" aidermacs-commit-with-auto-message) ("R" "Refresh Repo Map" aidermacs-refresh-repo-map) ("h" "Session History" aidermacs-show-output-history) ("o" "Switch Model (C-u: weak-model)" aidermacs-change-model) @@ -667,6 +668,13 @@ If Magit is not installed, report that it is required." (interactive) (aidermacs--send-command "/undo")) +(defun aidermacs-commit-with-auto-message () + "Commit edits to the repo with an automatically generated commit message. +Uses aider's /commit command without arguments to generate a descriptive +commit message automatically based on the changes made." + (interactive) + (aidermacs--send-command "/commit")) + (defun aidermacs-question-this-symbol () "Ask aidermacs to explain symbol under point." (interactive)