branch: elpa/aidermacs commit 14095b1aa5a0bb69f7814e0dd3a37b3948922a2c Author: Arthur Heymans <art...@aheymans.xyz> Commit: Matthew Zeng <matthew...@posteo.net>
feat: add web content fetching function to aidermacs --- aidermacs.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/aidermacs.el b/aidermacs.el index 3ba048873c..be53b6083a 100644 --- a/aidermacs.el +++ b/aidermacs.el @@ -171,6 +171,7 @@ This is the file name without path." ("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) + ("W" "Fetch Web Content" aidermacs-web) ("?" "Aider Meta-level Help" aidermacs-help)]] ["File Actions" ["Add Files (C-u: read-only)" @@ -1102,6 +1103,14 @@ This updates aider's understanding of the repository structure and files." (aidermacs--send-command "/map-refresh") (message "Refreshing repository map...")) +(defun aidermacs-web (url) + "Fetch web content from URL using aider's web command. +This allows aider to access online documentation, references, or examples." + (interactive "sEnter URL to fetch: ") + (when (and url (not (string-empty-p url))) + (aidermacs--send-command (format "/web %s" url)) + (message "Fetching content from %s..." url))) + ;; Add a hook to clean up temp buffers when an aidermacs buffer is killed (defun aidermacs--cleanup-on-buffer-kill () "Clean up temporary buffers when an aidermacs buffer is killed."