24 lines
715 B
TypeScript
24 lines
715 B
TypeScript
import { $ } from "bun"
|
|
import type { Info } from "@opencode/plugin/promise/tool"
|
|
|
|
const teaComment: Info = {
|
|
name: "tea-comment",
|
|
description: "Add a comment to a specific issue using tea CLI",
|
|
input: {
|
|
type: "object",
|
|
properties: {
|
|
issueNumber: { type: "number", description: "Issue number/index" },
|
|
body: { type: "string", description: "Comment body" },
|
|
},
|
|
required: ["issueNumber", "body"],
|
|
additionalProperties: false,
|
|
},
|
|
async execute(input) {
|
|
const { issueNumber, body } = input as { issueNumber: number; body: string }
|
|
const result = await $`tea comment ${issueNumber} ${body}`.text()
|
|
return { content: result.trim() }
|
|
},
|
|
}
|
|
|
|
export default teaComment
|