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

Optionally save previous chats #4

Open
not-matthias opened this issue May 4, 2024 · 4 comments
Open

Optionally save previous chats #4

not-matthias opened this issue May 4, 2024 · 4 comments
Labels
feature help wanted Extra attention is needed p1

Comments

@not-matthias
Copy link

It'd be nice to save previous chats (kinda like ChatGPT) to access them again in the future.

@abi
Copy link
Owner

abi commented May 4, 2024

Yeah should be relatively easy to do this with local storage. Will spec this out in case anyone is interested to helping to implement it.

@arthurjdam
Copy link
Contributor

arthurjdam commented May 5, 2024

Yeah should be relatively easy to do this with local storage. Will spec this out in case anyone is interested to helping to implement it.

I may have some time to help! Started persisting state in LocalStorage using zustand persist middleware. Will need to figure out what changes to accommodate an array of conversations, and some kind of routing

@abi
Copy link
Owner

abi commented May 6, 2024

For reference, in this discord, @o-stahl shared his fork where he's added some of this support: https://github.com/o-stahl/secret-llama/tree/main

IndexedDB would be a decent solution to start. But because the browser can still choose to evict that data, it's not truly persistent. File system API is also worth exploring for a more persistent and reliable solution: https://developer.mozilla.org/en-US/docs/Web/API/File_System_API https://mburakerman.github.io/file-system-access-api-demo/

@abi
Copy link
Owner

abi commented May 7, 2024

Linked to #11

@abi abi added help wanted Extra attention is needed p1 feature labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature help wanted Extra attention is needed p1
Projects
None yet
Development

No branches or pull requests

3 participants