feat: Add notification support for knowledge base processing
This commit is contained in:
parent
e7b70e5b8d
commit
943813f759
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user