Fix tea_issue_create: use Bun.$ and include description
This commit is contained in:
@@ -1,8 +1,4 @@
|
|||||||
import { tool } from "@opencode-ai/plugin"
|
import { tool } from "@opencode-ai/plugin"
|
||||||
import { exec } from "child_process"
|
|
||||||
import { promisify } from "util"
|
|
||||||
|
|
||||||
const execAsync = promisify(exec)
|
|
||||||
|
|
||||||
export default tool({
|
export default tool({
|
||||||
description: "Create a new issue in the GitHub repository using tea CLI",
|
description: "Create a new issue in the GitHub repository using tea CLI",
|
||||||
@@ -13,8 +9,8 @@ export default tool({
|
|||||||
milestone: tool.schema.string().optional().describe("Milestone name"),
|
milestone: tool.schema.string().optional().describe("Milestone name"),
|
||||||
},
|
},
|
||||||
async execute(args) {
|
async execute(args) {
|
||||||
const cmd = `tea issues create -t "${args.title}"`
|
const cmd = `tea issues create -t "${args.title}" -d "${args.description}"`
|
||||||
const { stdout, stderr } = await execAsync(cmd)
|
const result = await Bun.$`${cmd}`.text()
|
||||||
return stdout.trim()
|
return result.trim()
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user