This commit is contained in:
2026-05-15 11:23:37 +02:00
parent 09c9527e93
commit a15aac7f38
5 changed files with 46 additions and 3 deletions

View File

@@ -1,4 +1,5 @@
import { tool } from "@opencode-ai/plugin" import { tool } from "@opencode-ai/plugin"
import { $ } from "bun"
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",
@@ -7,7 +8,7 @@ export default tool({
description: tool.schema.string().optional().describe("Issue description (supports markdown)"), description: tool.schema.string().optional().describe("Issue description (supports markdown)"),
}, },
async execute(args) { async execute(args) {
const result = await Bun.$`tea issues create -t ${args.title} -d ${args.description}`.text() const result = await $`tea issues create -t ${args.title} -d ${args.description}`.text()
return result.trim() return result.trim()
}, },
}) })

View File

@@ -1,11 +1,11 @@
import { tool } from "@opencode-ai/plugin" import { tool } from "@opencode-ai/plugin"
import path from "path" import { $ } from "bun"
export default tool({ export default tool({
description: "List all issues in the project using tea CLI", description: "List all issues in the project using tea CLI",
args: {}, args: {},
async execute(args, context) { async execute(args, context) {
const result = await Bun.$`tea issues list`.text() const result = await $`tea issues list`.text()
return result.trim() return result.trim()
}, },
}) })

1
index.ts Normal file
View File

@@ -0,0 +1 @@
console.log("Hello via Bun!");

12
package.json Normal file
View File

@@ -0,0 +1,12 @@
{
"name": "architecture",
"module": "index.ts",
"type": "module",
"private": true,
"devDependencies": {
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5"
}
}

29
tsconfig.json Normal file
View File

@@ -0,0 +1,29 @@
{
"compilerOptions": {
// Environment setup & latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "Preserve",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false
}
}