From 2343dfec2c3c2e8c7f118e58c1e6e6719f3992a8 Mon Sep 17 00:00:00 2001 From: David Ibia Date: Sun, 9 Nov 2025 14:20:47 +0100 Subject: [PATCH] feat(terminal-bell.ts): add NotificationPlugin to send notification on session completion. --- .config/opencode/plugin/terminal-bell.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .config/opencode/plugin/terminal-bell.ts diff --git a/.config/opencode/plugin/terminal-bell.ts b/.config/opencode/plugin/terminal-bell.ts new file mode 100644 index 0000000..0d48e9a --- /dev/null +++ b/.config/opencode/plugin/terminal-bell.ts @@ -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"'` + } + }, + } +}