aider icon indicating copy to clipboard operation
aider copied to clipboard

Have the /commands return their output when scripting aider

Open sidhujag opened this issue 2 years ago • 6 comments

I see that a recursive mechanism to push repo, read repo, working across autonomous agents might be a real good way to increase productivity. Working locally is great prior to pushing but would it be possible (for safety reasons) to push as PR to a repo? (ofc needing github API key for the user to create a PR) so that widespread coordination becomes possible between users and agents?

sidhujag avatar Dec 01 '23 23:12 sidhujag

Just work on a different branch and request to merge ? ( Sorry, maybe i misunderstand the question )

hrakotom avatar Dec 02 '23 17:12 hrakotom

I mean can it be part of aider to push the local repo to remote as part of the API, also does the Coder object support the CLI commands so that other projects can integrate the functionality without calling CLI?

sidhujag avatar Dec 02 '23 23:12 sidhujag

Thanks for trying aider and filing this issue. There's a FAQ entry that might contain helpful information:

https://aider.chat/docs/faq.html#can-i-script-aider

paul-gauthier avatar Dec 02 '23 23:12 paul-gauthier

Thanks for trying aider and filing this issue. There's a FAQ entry that might contain helpful information:

https://aider.chat/docs/faq.html#can-i-script-aider

Hi Paul,

Thanks, another question: If directly using the Coder object in another project, how do you get the command outputs if you want just the output from a command or run? If an agent framework calls a function which calls aider runs the command I just want the output of that command or run.. but the functions write out to chat history in InputOutput object: cmd_ls for example https://github.com/paul-gauthier/aider/blob/main/aider/commands.py#L420

sidhujag avatar Dec 04 '23 22:12 sidhujag

Unfortunately those commands don't currently have a way to "return" their output. Obviously it wouldn't be super hard to add that, but it's likely not a near term priority.

paul-gauthier avatar Dec 05 '23 21:12 paul-gauthier

Unfortunately those commands don't currently have a way to "return" their output. Obviously it wouldn't be super hard to add that, but it's likely not a near term priority.

I'd rather not fork and add it if I don't have to, I see you can do a "diff" of the output but, I see theres no way to get the output difference from before and after the command easily? I would have to read the history file myself and get the difference before and after it looks like

sidhujag avatar Dec 05 '23 23:12 sidhujag