feat: Add notification support for knowledge base processing

This commit is contained in:
n4ze3m 2024-07-16 10:42:32 +05:30
parent e7b70e5b8d
commit 943813f759

View File

@ -7,12 +7,14 @@ export const sendNotification = async (title: string, message: string) => {
"sendNotificationAfterIndexing"
)
if (sendNotificationAfterIndexing) {
console.log("Sending notification")
browser.notifications.create({
type: "basic",
iconUrl: browser.runtime.getURL("/icon.png"),
iconUrl: browser.runtime.getURL("/icon/128.png"),
title,
message
})
console.log("Notification sent")
}
} catch (error) {
console.error(error)