Skip to content
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

feat: configurable history directory #18

Closed
wants to merge 2 commits into from
Closed

feat: configurable history directory #18

wants to merge 2 commits into from

Conversation

yuchanns
Copy link
Collaborator

@yuchanns yuchanns commented Aug 16, 2024

Users should be able to set up a custom history directory.

Also fix #17

elseif type(history_dir) == "function" then
history_dir = history_dir(project_root)
else
history_dir = Path:new(history_dir, project_root:match("([^/]+)$"), ".avante_chat_history")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

‌‌‌‌If placed outside the project_root directory, wouldn't it be impossible to use relative_path?

https://github.com/yetone/avante.nvim/pull/18/files#diff-ddcb4139fbc53f068a08051ae32665c76507f66698fe427fcfdd384a36dce2fcR222

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this what you want? I'm sorry, but I don't quite understand your meaning.

@yetone
Copy link
Owner

yetone commented Aug 16, 2024

‌‌‌‌Rather than making it user-configurable, why don't we implement a more disruptive update (since we're still in early versions) by moving the history directory to the $HOME directory and recording the absolute path? What do you think?

@yuchanns
Copy link
Collaborator Author

yuchanns commented Aug 16, 2024

Says that we have a project under $HOME/coding/proj1, will the history be saved to $HOME/.avante_history/$HOME/coding/proj1? Or $HOME/.avante_history/coding/proj1? Or $HOME/.avante_history/proj1?

@yetone
Copy link
Owner

yetone commented Aug 16, 2024

For example, my chat history in /Users/yetone/workspace/projects/test/foo/bar.go will be saved in $HOME/.avante_history/chat/Users__yetone__workspace__projects__test__foo__bar.go.json

@yetone
Copy link
Owner

yetone commented Aug 16, 2024

However, according to @aarnphm's suggestion, we should use shada to store the history. I'm concerned that future refactoring might disrupt your current efforts. Are you interested in doing this refactoring?

@yuchanns
Copy link
Collaborator Author

Nevermind. I'll close this PR. Since using shade is better IMO.

@yuchanns yuchanns closed this Aug 16, 2024
@yuchanns yuchanns deleted the custom-history-dir branch August 16, 2024 05:35
@yuchanns yuchanns mentioned this pull request Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AzureAPI should not force to setup OPENAI_API_KEY
2 participants