Open bdougie opened 1 year ago
We are saving the settings to chrome.storage.local
for it to be persistent.
https://github.com/open-sauced/ai/blob/cc76e950a33d30677e2eb37fadb3d318ceca2d5b/src/popup/pages/aiprdescription.tsx#L35-L39
https://github.com/open-sauced/ai/blob/cc76e950a33d30677e2eb37fadb3d318ceca2d5b/src/utils/ai-utils/descriptionconfig.ts#L39-L41
The problem being, the storage is reset if there's a reinstall.
@Anush008, consider using chrome.storage.sync
instead. See https://developer.chrome.com/docs/extensions/reference/storage/#storage-areas. The only caveat is it can't store much, only 100KB but it will perist across all devices and shouldn't get wiped between installs (need to double check that)
Right. The extension settings are being saved to the synced storage. https://github.com/open-sauced/ai/blob/f67f67339a5daca506822715ee29aa66c4b0ba6e/src/popup/pages/settings.tsx#L15-L30 We can do same for the AI description settings too.
@Anush008 do we have anything to do for this issue?
Type of feature
🍕 Feature
Current behavior
I use the same settings every-time I generate a description. But every-time there is an update or the cookie refreshes I need to save the settings again. It would be nice if we save the user settings in local storage.
Suggested solution
localstorage is preferred, but we could potentially store a settings JSON.
Additional context
No response
Code of Conduct
Contributing Docs