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" "sendNotificationAfterIndexing"
) )
if (sendNotificationAfterIndexing) { if (sendNotificationAfterIndexing) {
console.log("Sending notification")
browser.notifications.create({ browser.notifications.create({
type: "basic", type: "basic",
iconUrl: browser.runtime.getURL("/icon.png"), iconUrl: browser.runtime.getURL("/icon/128.png"),
title, title,
message message
}) })
console.log("Notification sent")
} }
} catch (error) { } catch (error) {
console.error(error) console.error(error)