[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/aidermacs 526ef8be59 043/466: feat: extract read-string to
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/aidermacs 526ef8be59 043/466: feat: extract read-string to aider-read-string function for user customization |
Date: |
Sat, 15 Mar 2025 19:10:49 -0400 (EDT) |
branch: elpa/aidermacs
commit 526ef8be59b58df38999efcd20182c8ce96b8474
Author: Kang Tu <kang_tu@apple.com>
Commit: Kang Tu (aider) <kang_tu@apple.com>
feat: extract read-string to aider-read-string function for user
customization
---
aider.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/aider.el b/aider.el
index 2a47b2a143..f7de42e740 100644
--- a/aider.el
+++ b/aider.el
@@ -23,6 +23,11 @@
:type '(repeat string)
:group 'aider)
+(defun aider-read-string (prompt &optional initial-input)
+ "Read a string from the user with PROMPT and optional INITIAL-INPUT.
+This function can be customized or redefined by the user."
+ (read-string prompt initial-input))
+
;; Transient menu for Aider commands
(transient-define-prefix aider-transient-menu ()
"Transient menu for Aider commands."
@@ -130,7 +135,7 @@ COMMAND should be a string representing the command to
send."
(defun aider-general-command ()
"Prompt the user to input COMMAND and send it to the corresponding aider
comint buffer."
(interactive)
- (let ((command (read-string "Enter command to send to aider: ")))
+ (let ((command (aider-read-string "Enter command to send to aider: ")))
;; Use the shared helper function to send the command
(aider-add-current-file)
(aider--send-command command)))
@@ -139,28 +144,28 @@ COMMAND should be a string representing the command to
send."
(defun aider-code-change ()
"Prompt the user for a command and send it to the corresponding aider comint
buffer prefixed with \"/code \"."
(interactive)
- (let ((command (read-string "Enter code command: ")))
+ (let ((command (aider-read-string "Enter code command: ")))
(aider-send-command-with-prefix "/code " command)))
;; New function to get command from user and send it prefixed with "/ask "
(defun aider-ask-question ()
"Prompt the user for a command and send it to the corresponding aider comint
buffer prefixed with \"/ask \"."
(interactive)
- (let ((command (read-string "Enter ask question: ")))
+ (let ((command (aider-read-string "Enter ask question: ")))
(aider-send-command-with-prefix "/ask " command)))
;; New function to get command from user and send it prefixed with "/help "
(defun aider-help ()
"Prompt the user for a command and send it to the corresponding aider comint
buffer prefixed with \"/help \"."
(interactive)
- (let ((command (read-string "Enter help question: ")))
+ (let ((command (aider-read-string "Enter help question: ")))
(aider--send-command (concat "/help " command))))
;; New function to get command from user and send it prefixed with "/architect
"
(defun aider-architect-discussion ()
"Prompt the user for a command and send it to the corresponding aider comint
buffer prefixed with \"/architect \"."
(interactive)
- (let ((command (read-string "Enter architect command: ")))
+ (let ((command (aider-read-string "Enter architect command: ")))
(aider-send-command-with-prefix "/architect " command)))
;; Modified function to get command from user and send it based on selected
region
@@ -176,7 +181,7 @@ The command will be formatted as \"/code \" followed by the
user command and the
(if (use-region-p)
(let* ((region-text (buffer-substring-no-properties (region-beginning)
(region-end)))
(processed-region-text (replace-regexp-in-string "\n" "\\\\n"
region-text))
- (user-command (read-string "Enter your command: "))
+ (user-command (aider-read-string "Enter your command: "))
(function-name (or (which-function) "unknown function"))
(command (format "/code \"in function %s, for the following code
block, %s: %s\""
function-name user-command
processed-region-text)))
- [nongnu] elpa/aidermacs e09619dcbd 202/466: Merge pull request #72 from marienz/main, (continued)
- [nongnu] elpa/aidermacs e09619dcbd 202/466: Merge pull request #72 from marienz/main, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 9dfed23113 210/466: docs: add FAQ section for multi-line prompts usage, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 9227f6b02a 228/466: Refine README, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs b0a60a60d4 238/466: Merge pull request #6 from CeleritasCelery/remove_magit, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs f68a341d27 143/466: feat(menu): add explain symbol under point menu item, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 471673b0d4 170/466: Feat: Add "Go Ahead" menu item (#43), ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 1ad04baa4c 179/466: Add instructions to install without straight, fix missing comment., ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 1882d43421 180/466: Merge pull request #55 from Willyfrog/doc-fix, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 846f283f83 190/466: doc: Add hard mode for battleship game using o3-mini high model (#70), ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 5352b92df5 192/466: docs: improve feature development guide flow and clarity, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 526ef8be59 043/466: feat: extract read-string to aider-read-string function for user customization,
ELPA Syncer <=
- [nongnu] elpa/aidermacs e7ed9570ed 055/466: feat: replace new-line characters with spaces in user input for aider-read-string function, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 1dc7db6194 063/466: update menu shortcut, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs eec7180732 067/466: refactor: Pass home-path as argument to aider-buffer-name-from-git-repo-path, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 439a2c7d71 075/466: feat: custom option of aider program, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 77e33c72fc 076/466: enh: autoload entry commands, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 8a039d5137 082/466: Merge pull request #5 from AmaiKinono/custom-aider-program, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs e0e77f3874 090/466: add aider-send-line-under-cursor, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs c57f083466 097/466: feat: add interactive function to run find-name-dired from Git repository root, ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs 9fc3b04775 099/466: Feat: Git repo find / mark / add files, and buffer send command for .aider file (#7), ELPA Syncer, 2025/03/15
- [nongnu] elpa/aidermacs a181be69c6 102/466: update place to invoke aider--send-command. remove dup, ELPA Syncer, 2025/03/15