aider icon indicating copy to clipboard operation
aider copied to clipboard

Use recent chat history from prior sessions when you launch a new session

Open steven-reyes opened this issue 2 years ago • 5 comments

steven-reyes avatar Jul 31 '23 16:07 steven-reyes

Clearing the chat when reaching maximum tokens is absolutely necessary and can be opt-in based. I would love to pick this up and raise a PR

sriramr98 avatar Aug 01 '23 02:08 sriramr98

Paul has merged in a 'auto summarize chat when token limit hit' feature in #144

I like the idea of being able to restore your last context with a command, and it should be feasible by reading the history files - it also makes me think about things like /stash xyz which lets you store a context and /restore xyz which brings it back.

I think the long term vision is to make Aider is smart enough to know what files (or fractions of a file) to bring in to context based on the task being given so one day we don't have to think about it anywhere near as much. In that world I could imagine /stash and /restore commands being feature bloat or temporary band aid solutions. Or maybe they would be good editions.

joshuavial avatar Aug 01 '23 20:08 joshuavial

Yes, everything @joshuavial said is 100% correct!

In fact, in the main branch you can already run python -m aider.history .aider.chat.history.md and it will print out a summarized version of the recent conversation. Keep in mind that this command line invocation is purely for debugging purposes at this time!

It's likely that in the future aider will do this on startup.

paul-gauthier avatar Aug 02 '23 09:08 paul-gauthier

Hey,

that would be the great feature. Any plans on continuing working on it?

vaisov avatar Dec 01 '23 23:12 vaisov

I just put up PR #591 for this.

paul-gauthier avatar May 06 '24 02:05 paul-gauthier

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.

paul-gauthier avatar Jun 20 '24 14:06 paul-gauthier