mirror of
https://github.com/boxpositron/absolute-dotfiles.git
synced 2026-02-28 11:40:37 +00:00
feat(terminal-bell.ts): add NotificationPlugin to send notification on session completion.
This commit is contained in:
12
.config/opencode/plugin/terminal-bell.ts
Normal file
12
.config/opencode/plugin/terminal-bell.ts
Normal 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"'`
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user