Files

14 lines
356 B
TypeScript

import { Plugin } from "@opencode/plugin"
export default Plugin.define({
id: "test.worktree-delegate",
async setup(ctx) {
const directory = ctx.options.directory
if (typeof directory !== "string") throw new Error("Missing target location")
await ctx.worktree.create({
location: { directory },
name: "delegated",
})
},
})