From 27f33ca7c604e4c615735e3d66e059a3898d0e7c Mon Sep 17 00:00:00 2001 From: Hugo Nijhuis Date: Sun, 3 May 2026 16:35:31 +0200 Subject: [PATCH] feat: add tea-label.ts tool for label management (labelList) --- .opencode/tools/tea-label.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .opencode/tools/tea-label.ts 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