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 { exec } from "child_process"
|
||||
import { promisify } from "util"
|
||||
|
||||
const execAsync = promisify(exec)
|
||||
|
||||
export default tool({
|
||||
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"),
|
||||
},
|
||||
async execute(args) {
|
||||
const cmd = `tea issues create -t "${args.title}"`
|
||||
const { stdout, stderr } = await execAsync(cmd)
|
||||
return stdout.trim()
|
||||
const cmd = `tea issues create -t "${args.title}" -d "${args.description}"`
|
||||
const result = await Bun.$`${cmd}`.text()
|
||||
return result.trim()
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user