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

About the history log #26

Closed
yuchanns opened this issue Aug 16, 2024 · 4 comments
Closed

About the history log #26

yuchanns opened this issue Aug 16, 2024 · 4 comments

Comments

@yuchanns
Copy link
Collaborator

          However, according to @aarnphm's suggestion, we should use [shada](https://neovim.io/doc/user/starting.html#shada-file) to store the history. I'm concerned that future refactoring might disrupt your current efforts. Are you interested in doing this refactoring?

Originally posted by @yetone in #18 (comment)

We previously discussed the history log behavior of avante.nvim.

Using shada to store history is effective, but I would propose a more flexible approach that allows users to customize their history storage. For instance, some users might prefer to save and load from an abstract storage solution with cloud integration. The default option would still be shada.

What are your thoughts?

@yuchanns
Copy link
Collaborator Author

What I mean is that we can provide a callback function to allow users to customize the save and load behavior. We do not need to implement the details of integration.

@yetone
Copy link
Owner

yetone commented Aug 16, 2024

‌‌‌‌‌Saving in the cloud is a good feature. If the history is stored in the cloud, how can we uniquely locate a specific file within a project? Or to rephrase the question: what should the project ID be? It shouldn't be an absolute path, right?

@aarnphm
Copy link
Collaborator

aarnphm commented Aug 16, 2024

Saving to the cloud is only useful for nvim --remote fwiw.

shada will be managed by nvim and with 0.11 dev it is pretty much free lunch as we don't have to worry too much about IO.

afaik doing anything IO intensive (such as saving history and polling from the cloud in neovim) is often frowned upon. If you know of any plugins that do this well, I'm more than happy to be proven wrong.

@aarnphm
Copy link
Collaborator

aarnphm commented Aug 25, 2024

I was looking into this a bit, but now the logs is refactored to $XDG_DATA_STATE/avante, we can keep saving json for now.

@aarnphm aarnphm closed this as completed Aug 25, 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

No branches or pull requests

3 participants