Files
architecture/.opencode/tools/tea-label.ts

19 lines
505 B
TypeScript

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(),
}
}
},
})