mirror of
https://github.com/Heretek-AI/opencode.git
synced 2026-11-10 02:11:36 -10:00
14 lines
368 B
TypeScript
14 lines
368 B
TypeScript
import { Plugin } from "@opencode/plugin"
|
|
|
|
export default Plugin.define({
|
|
id: "test.worktree-delegate",
|
|
async setup(ctx) {
|
|
const projectID = ctx.options.projectID ?? ctx.location.project.id
|
|
if (typeof projectID !== "string") throw new Error("Missing target project")
|
|
await ctx.worktree.create({
|
|
projectID,
|
|
name: "delegated",
|
|
})
|
|
},
|
|
})
|