notify.ts 411 B

1234567891011121314151617
  1. import type { Plugin } from "@opencode-ai/plugin"
  2. // 🔧 CONFIGURATION: Set to true to enable this plugin
  3. const ENABLED = false
  4. export const Notify: Plugin = async ({ $ }) => {
  5. // Plugin disabled - set ENABLED = true to activate
  6. if (!ENABLED) return {}
  7. return {
  8. async event(input) {
  9. if (input.event.type === "session.idle") {
  10. await $`say "Your code is done!"`
  11. }
  12. },
  13. }
  14. }