aider icon indicating copy to clipboard operation
aider copied to clipboard

Color for diff output

Open kwmiebach opened this issue 2 years ago • 1 comments

I understand I can set colors for various texts like so:

aider --user-input-color blue --tool-output-color blue --tool-error-color blue -assistant-output-color blue

I tried various combinations and it changes the chat colors. I also found some code in the io.py, for example InputOutput.__init__

But I would very much like to be able to change the color of the diff output. I could apply this in my own fork or locally.

As you can see in the image, in my terminal the diff appears in a light color, maybe inverted:

image

Could you pleace point me to the code, where the inversion or the light color happens. Or if this is done by some library, where does the oputput happen?

Thank you very much!

kwmiebach avatar Jul 02 '23 22:07 kwmiebach

Thanks for trying aider. Sorry to hear you're having trouble with the colors in the diff highlighting.

You're correct. There isn't currently a way to change the colors inside the diffs. I've been meaning to add a switch that could control light mode and dark mode. I'll update this issue once I've had a chance to implement that.

paul-gauthier avatar Jul 03 '23 23:07 paul-gauthier

I am preparing a pull request

image

kwmiebach avatar Jul 04 '23 22:07 kwmiebach

Okay, that sounds great. Thank you.

That commit above was actually for another issue, not this one. I put the wrong issue number in the commit message.

paul-gauthier avatar Jul 04 '23 22:07 paul-gauthier

I've opened PR #49 and welcome any feedback. I admit my understanding of the codebase is limited, so please suggest any necessary adjustments or improvements.

Thanks

kwmiebach avatar Jul 04 '23 22:07 kwmiebach

This was implemented via merge. Closing.

kwmiebach avatar Jul 05 '23 14:07 kwmiebach