-
Notifications
You must be signed in to change notification settings - Fork 4k
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: enhance chat import with multi-format support #936
base: main
Are you sure you want to change the base?
feat: enhance chat import with multi-format support #936
Conversation
- Add support for importing chats from different formats: - Standard Bolt format - Chrome extension format - History array format - Bolt export format - Add Import Chats button to Data Management - Add proper error handling and logging - Update README with backup/restore feature
thank you for checking my other PR, #871 Please review and let me know if we need any further changes. |
Hm, what is chrome extension format? |
What also is interesting, it seems to overwrite existing chats if id matches, but leaves older in place If I made changes to chats after export and then imported than changes are lost. I am fine with merging this though and making such a change as separate PR. I mean its usually bad if users by accident looses his work. Thinking of how this usually is solved form UX standpoint this reminds of copy pasting files when user is asked "replace, cancel, or make copies of duplicate items" |
I included multiple formats for the backward compatibility. I was initially using the indexeddb-exporter chrome extension for exporting the database since we natively did not have that functionality. Also, I noticed the previous implementation seems to have a slightly different exported format than the current one, so the multiple format support helps bring these in just in case someone was switching from an older version to the latest version, not a big deal but nice to have. |
Nice Observations! Initially I introduced these features since I was using them quite a bit and I think we are already giving users the opportunity to individually duplicate chats, restore to older stages, restore single chats and all chats. My request and suggestion is to go ahead with the current implementation and use new PRs to enhance based on feedback. Please let me know if you agree or have further suggestions. |
Hm, about formats. It does mean that you add support for import format that only you used and no one else? I mean we will be merging code we will never be able to remove(as no one knows who needs it) but only you will ever use it? |
I do not know anyone else that used these chromedb extensions (they do have 1000s of users) that can backup browser databases, but there could be people who faced this in the past just like I did and tried different other methods. I can relate to why you are skeptical about including the support for other formats, I already worked on that solution so I included it just like I initially posted the complete backup feature, and it is very straightforward code, it should not slow down the system, rather providing the error handling in case users have used other methods to back up chats. I guess we have the following choices:
I am happy to take either direction, please let me know. |
@sidbetatester |
- Remove multi-format support from DataTab - Keep only standard Bolt export formats - Simplify ImportButtons to handle standard format only
c52eda0
to
5b6ba80
Compare
@wonderwhy-er Changes Made Based on Review FeedbackSimplified the chat import functionality by removing multi-format support: In
|
This PR enhances the chat import functionality, continuing the work from #280 and #871. Care has has been taken to follow the latest structure.
Changes:
Note: This addresses feedback from previous PRs:
References:
Overall History:
feat: Add chat history backup and restore functionality" #280 Added chat history backup and restore functionality in the side bar, however the there was a structural change to bolt.diy, hand multiple conflicts with new structure.
feat: add chat history backup and restore functionality #871 tried to add the feature back but some of the functionality was moved and based on feedback, needed more work.
This PR: Addressed previous feedback, merged using feature branch avoiding the issues caused in the previous PR by merging the main branch.
Import Multiple Chats in the Settings Window:
Import Single Chat In Main Window:
My original Method of implementation in the Side Menu removed for now since we will already have this inside the settings: