paul-gauthier / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
19.47k stars 1.79k forks source link

Option to output to stdout/stderr instead of console #733

Closed caseymcc closed 2 months ago

caseymcc commented 3 months ago

Issue

I am currently modifying the InputOutput class to output to stdout/err when a command line option --stdout is provided. I am working on this to see if I can get better functionality with vscode extensions (the default terminal there does not provide output) and I am having to use node-pty to talk to aider but it does not support some of the current console functionality.

All that to say is that in making changes I have seen a few other places in the code that creates a new console and/or uses io.console directly. I was thinking of adding functions in InputOuput for all those random calls and replace the calls with io.func calls. I am also looking at adding some kind of \<tag>, maybe json, or something to the output going to stdout to make it easier to parse what is being sent and received and identify diffs, errors, etc...

Any ideas and direction for this would be appreciated.

Version and model info

No response

paul-gauthier commented 2 months ago

This is probably out of scope for aider. But I do hope to refactor the scripting api to make it easier to do what you're asking about. Not in the exact way you propose though.

paul-gauthier commented 2 months ago

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.