feat(terminal-bell.ts): add NotificationPlugin to send notification on session completion.

This commit is contained in:
David Ibia
2025-11-09 14:20:47 +01:00
parent 9396c57b63
commit 2343dfec2c

View File

@@ -0,0 +1,12 @@
import type { Plugin } from "@opencode-ai/plugin"
export const NotificationPlugin: Plugin = async ({ project, client, $, directory, worktree }) => {
return {
event: async ({ event }) => {
// Send notification on session completion
if (event.type === "session.idle") {
await $`osascript -e 'display notification "Session completed!" with title "opencode"'`
}
},
}
}