Files
absolute-dotfiles/.config/opencode/plugin/terminal-bell.ts

13 lines
442 B
TypeScript

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"'`
}
},
}
}