feat: Clear all browser storage when deleting chat history and use local instead of sync

This commit is contained in:
n4ze3m
2024-12-13 18:25:05 +05:30
parent 143541e915
commit caf1dfcbe8
2 changed files with 12 additions and 4 deletions

View File

@@ -239,6 +239,13 @@ export const GeneralSettings = () => {
})
clearChat()
}
try {
await browser.storage.sync.clear()
await browser.storage.local.clear()
await browser.storage.session.clear()
} catch (e) {
console.log("Error clearing storage:", e)
}
}}
className="bg-red-500 dark:bg-red-600 text-white dark:text-gray-200 px-4 py-2 rounded-md">
{t("generalSettings.system.deleteChatHistory.button")}