mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
13 lines
356 B
TypeScript
13 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",
|
|
})
|
|
},
|
|
})
|