diff --git a/.opencode/tools/tea-notification.ts b/.opencode/tools/tea-notification.ts new file mode 100644 index 0000000..8db7f23 --- /dev/null +++ b/.opencode/tools/tea-notification.ts @@ -0,0 +1,21 @@ +import { tool } from "@opencode-ai/plugin" +import { $ } from "bun" + +export const notificationList = tool({ + description: "List unread notifications including PR reviews, mentions, and other updates", + args: { + limit: tool.schema.number().default(30).describe("Number of notifications to return"), + }, + async execute(args, context) { + try { + const result = await $`tea notification list --output json --limit ${args.limit}`.text() + return JSON.parse(result) + } catch (error: any) { + return { + error: "Failed to list notifications", + message: error.message, + stderr: error.stderr?.toString(), + } + } + }, +}) \ No newline at end of file