mirror of
https://github.com/Heretek-AI/opencode.git
synced 2026-11-23 07:59:33 -10:00
14 lines
356 B
TypeScript
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",
|
|
})
|
|
},
|
|
})
|