migrated custom tools to V2 plugin
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { $ } from "bun"
|
||||
import type { Info } from "@opencode/plugin/promise/tool"
|
||||
|
||||
const teaIssueGet: Info = {
|
||||
name: "tea-issue-get",
|
||||
description: "Get a specific issue with all details and comments using tea CLI",
|
||||
input: {
|
||||
type: "object",
|
||||
properties: {
|
||||
issueNumber: { type: "number", description: "Issue number/index" },
|
||||
},
|
||||
required: ["issueNumber"],
|
||||
additionalProperties: false,
|
||||
},
|
||||
async execute(input) {
|
||||
const { issueNumber } = input as { issueNumber: number }
|
||||
const result = await $`tea issues ${issueNumber} --comments --output json`.text()
|
||||
return { content: result.trim() }
|
||||
},
|
||||
}
|
||||
|
||||
export default teaIssueGet
|
||||
Reference in New Issue
Block a user