aider icon indicating copy to clipboard operation
aider copied to clipboard

Enhanced interaction with chat history

Open lockmeister opened this issue 1 year ago • 2 comments

Issue

It would be good to be able to have enhanced interaction with the chat history. This is already implemented for user input, but would be good for the output as well.

At the moment you can ctrl-r (reverse search) and look back through your prompts.

But I can't see how to look back through the output. It would be handy to be able to navigate back through the chat history using vim from within the aider interface. At the moment I open a separate terminal and open the history in vim, but that's clunky and there are conflicts when editing and viewing simultaneously.

A nicer solution would be to log the chat in a sqlite database (#1859) but in the meantime, accessing the chat history markdown file using vim would be very handy.

Aider version: 0.58.1 Python version: 3.10.12 Platform: Linux-5.15.153.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 Python implementation: CPython Virtual environment: Yes OS: Linux 5.15.153.1-microsoft-standard-WSL2 (64bit) Git version: git version 2.34.1

Aider v0.58.1 Main model: claude-3-5-sonnet-20240620 with ask edit format, prompt cache, infinite output Weak model: claude-3-haiku-20240307 Git repo: ../houseman/.git/worktrees/davids_last with 22 files Repo-map: using 1024 tokens, files refresh Added db_utils.py to the chat. Added portfolio_backtester.py to the chat.

lockmeister avatar Oct 01 '24 22:10 lockmeister

Thank you for filing this issue.

As a current workaround you cab use and modify the shell alias I posted here -> https://github.com/paul-gauthier/aider/issues/1859#issuecomment-2385403725

Ideas for modification:

  • print out the name of the current chat history file on startup
  • create history file with touch <chat-history-filename>
  • open history file in an editor which automatically reloads this file when it changes

To implement these change I'd recommend to throw the current alias into a capable LLM with the ideas/instructions above (that is how this alias was built in the first place).

At some point a shell function or even a full-blown wrapper script may be more suitable, as this alias grows (ask the LLM to build this for you).

You can, of course, also use other standard macOS/Linux tools like tail -f <chat-history-filename> in another terminal instead of an editor, be creative.

fry69 avatar Oct 02 '24 05:10 fry69

I really appreciate your suggestions, thanks! Do you have any recommended posts or write-ups about how you use Aider?

lockmeister avatar Oct 02 '24 19:10 lockmeister