Aider-AI / aider

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

Auto drop images!!! #2074

Open unphased opened 2 days ago

unphased commented 2 days ago

Issue

I would like to streamline aider workflow slightly

currently the way is

the big friction point is having to manually remove the image being active in the chat, because the common case is to discard it. I would like to have a hotkey i can hit to automate /drop for something matching a pattern!

Even better! By default drop any images. If we want it back we can easily copy the file path that was shown in the earlier prompt in the terminal... or since with official flow it's still potentially in the clipboard one could just re-run /paste!

So then for the streamlined workflow what I would love to have is:

5ocworkshop commented 1 day ago

I've had a similar thought, I like your idea. Maybe instead of auto-drop we could confirm to drop when the next prompt is submitted and an image that was already submitted is still included in the chat? Basically the same effect but if you did intend to leave it, you can.

unphased commented 1 day ago

I think that's good. It does make me wonder, if images included in past prompts carry forward in the chat history or not. I've simply never had a need to re-submit the same image but maybe depending on the model it could be something that is needed sometimes!

5ocworkshop commented 1 day ago

My understanding is that all files loaded in the current chat will be re-submitted with each query, including the images.

unphased commented 1 day ago

what i was asking about was whether images could be included as part of "chat history" even if it is removed from the list of context files. It is doubtful since each MLLM has its own specific tokenization schemes for images and i assume chat history is assembled into one big string/file.

5ocworkshop commented 16 hours ago

That is an interesting question, I don't have any visibility in to that one but am now interested in learning the answer :)

I also need to turn on --verbose and see if I can get a sense of how the files you include are ordered when submitted.