Open not-matthias opened 6 months ago
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.
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
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/
Linked to #11
It'd be nice to save previous chats (kinda like ChatGPT) to access them again in the future.