-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log chats to database for enhanced interaction #1859
Comments
added PR #1860 |
This would be a perfect first plugin if aider ever gets a plugin system, otherwise I think the current markdown file log works super fine. The only downside is that the markdown log is for all aider sessions combined, but that can be worked around with a Bash/shell alias. See this post I copied from the Discord -> Here is a cute Bash alias for aider: It will create separate chat/input history files for each aider session in a Example when run: aider --input-history-file .aider.history/feature-20240910_1213.input.md --chat-history-file .aider.history/feature-20240910_1213.chat.md Bash alias: alias aider='mkdir -p .aider.history ; branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "default"); timestamp=$(date "+%Y%m%d_%H%M"); aider --input-history-file ".aider.history/$branch-$timestamp.input.md" --chat-history-file ".aider.history/$branch-$timestamp.chat.md"' This makes it also possible to automatically clean out old sessions, preventing endless growing history files (which are also a pain to search/lookup). |
Slight modification to @fry69 's helpful bash alias. The following version will support Git branches if they have alias aider='branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "default"); timestamp=$(date "+%Y%m%d_%H%M"); mkdir -p ".aider.history/$(dirname "$branch")" ; aider --input-history-file ".aider.history/$branch-$timestamp.input.md" --chat-history-file ".aider.history/$branch-$timestamp.chat.md"' |
Issue
It would be handy to log chats to a database rather than just save a large .md file.
I was inspired by this tool, which logs all LLM chats to sqlite and then allows you to explore the logs in your browser.
this can add a lot of really nice features "for free", through the use of SQL queries in datasette.
Using datasette is a good solution, or perhaps a future version of aider might implement some of those features internally.
The text was updated successfully, but these errors were encountered: