[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/aidermacs 60dbdcd6ad 120/466: Feat: Added defun aider-magi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/aidermacs 60dbdcd6ad 120/466: Feat: Added defun aider-magit-show-last-commit function (#13) |
Date: |
Sat, 15 Mar 2025 19:12:25 -0400 (EDT) |
branch: elpa/aidermacs
commit 60dbdcd6ade5d4c679ca724b18025ee5ef418fd4
Author: Kang Tu <tninja@gmail.com>
Commit: GitHub <noreply@github.com>
Feat: Added defun aider-magit-show-last-commit function (#13)
* feat: Add option for Architect Discuss and Change in code change menu
* feat: Add function to show last commit message using Magit
* add last commit function
* update menu screenshot
---------
Co-authored-by: Kang Tu <kang_tu@apple.com>
---
aider.el | 17 +++++++++++++----
transient_menu.png | Bin 58345 -> 58197 bytes
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/aider.el b/aider.el
index 63c550ca68..00a8f2be9b 100644
--- a/aider.el
+++ b/aider.el
@@ -63,12 +63,13 @@ This function can be customized or redefined by the user."
]
["Code change"
("c" "Code Change" aider-code-change)
+ ("t" "Architect Discuss and Change" aider-architect-discussion)
("r" "Refactor Code in Selected Region" aider-region-refactor)
+ ("m" "Show last commit with magit" aider-magit-show-last-commit)
("u" "Undo Last Change" aider-undo-last-change)
]
["Discussion"
("q" "Ask Question" aider-ask-question)
- ("t" "Architect Discussion" aider-architect-discussion)
("e" "Explain Code in Selected Region" aider-region-explain)
("d" "Debug Exception" aider-debug-exception)
]
@@ -133,7 +134,7 @@ If not in a git repository, an error is raised."
(aider--send-command "/reset"))
;; Function to send large text (> 1024 chars) to the Aider buffer
-(defun comint-send-large-string (buffer text)
+(defun aider--comint-send-large-string (buffer text)
"Send large TEXT to the comint buffer in chunks of 1000 characters."
(let ((chunk-size 1000)
(pos 0)
@@ -160,7 +161,7 @@ COMMAND should be a string representing the command to
send."
(unless (string-suffix-p "\n" command)
(setq command (concat command "\n")))
;; Send the command to the aider process
- (comint-send-large-string aider-buffer command)
+ (aider--comint-send-large-string aider-buffer command)
;; Provide feedback to the user
;; (message "Sent command to aider buffer: %s" (string-trim
command))
(when switch-to-buffer
@@ -239,6 +240,15 @@ replacing all newline characters except for the one at the
end."
(let ((command (aider-plain-read-string "Enter exception, can be multiple
lines: ")))
(aider--send-command (concat "/ask Investigate the following exception,
with current added files as context: " command) t)))
+;; New function to show the last commit using magit
+(defun aider-magit-show-last-commit ()
+ "Show the last commit message using Magit.
+If Magit is not installed, report that it is required."
+ (interactive)
+ (if (require 'magit nil 'noerror)
+ (magit-show-commit "HEAD")
+ (message "Magit is required to show the last commit.")))
+
;; Modified function to get command from user and send it based on selected
region
(defun aider-undo-last-change ()
"Undo the last change made by Aider."
@@ -363,4 +373,3 @@ The command will be formatted as \"/ask \" followed by the
text from the selecte
(provide 'aider)
;;; aider.el ends here
-
diff --git a/transient_menu.png b/transient_menu.png
index dfd15846b0..eb5c15ad78 100644
Binary files a/transient_menu.png and b/transient_menu.png differ
- [nongnu] elpa/aidermacs 99fbe5a37c 064/466: refactor: extract buffer name logic to `aider-buffer-name-from-git-repo-path`, (continued)
- [nongnu] elpa/aidermacs 99fbe5a37c 064/466: refactor: extract buffer name logic to `aider-buffer-name-from-git-repo-path`, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 4b462a20cd 060/466: fuzzy match support, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 84dcfe827d 073/466: chore: remove unused local variables, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 673011c9c9 074/466: doc: fix quote usage in docstring, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 7fb8c67a16 078/466: Merge pull request #1 from AmaiKinono/fix-comint, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 52e1c836cb 101/466: refactor: Rename parameter in aider--send-command for clarity and update calls, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 61ae93b373 108/466: re-organize menu, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 20a72c239b 106/466: adding back (provide 'aider), ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 0742aa2666 110/466: Merge remote-tracking branch 'refs/remotes/origin/main', ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 097cd76663 111/466: Hardcode terminal type to dumb, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 60dbdcd6ad 120/466: Feat: Added defun aider-magit-show-last-commit function (#13),
ELPA Syncer <=
- [nongnu] elpa/aidermacs 3893b78a16 124/466: Merge pull request #14 from CeleritasCelery/improve-display, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 08452a8a30 115/466: fix README, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 84e6abac02 121/466: update menu, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs cf42ae6691 119/466: add last commit function, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 6bf4d6789a 135/466: Feat: Highlight the comint buffer based on initial buffer major mode (#21), ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 5f9b7fa1fe 136/466: Feat: easily refactor the function under cursor (#22), ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs b636c89b78 141/466: Refactor: Merge some dup code, move less used functions to aider-etc.el. Update the menu. (#33), ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs d0e296f524 145/466: docs: Add docs for new refactor and explain functions, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs f256eda338 146/466: docs: Update README to reflect new function names and usage, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs fcfc5fb0c7 148/466: docs: Update README with improved function descriptions, ELPA Syncer, 2025/03/15