diff --git a/.opencode/tools/tea-label.ts b/.opencode/tools/tea-label.ts new file mode 100644 index 0000000..5284ce4 --- /dev/null +++ b/.opencode/tools/tea-label.ts @@ -0,0 +1,19 @@ +import { tool } from "@opencode-ai/plugin" +import { $ } from "bun" + +export const labelList = tool({ + description: "List available labels with their colors and descriptions", + args: {}, + async execute(args, context) { + try { + const result = await $`tea label list --output json`.text() + return JSON.parse(result) + } catch (error: any) { + return { + error: "Failed to list labels", + message: error.message, + stderr: error.stderr?.toString(), + } + } + }, +}) \ No newline at end of file