2026-07-27 00:08:55 +00:00
|
|
|
import { Plugin } from "@opencode-ai/plugin/effect"
|
2026-06-22 23:06:57 +00:00
|
|
|
import { Effect } from "effect"
|
|
|
|
|
|
2026-07-07 23:56:47 +00:00
|
|
|
export default Plugin.define({
|
2026-06-22 23:06:57 +00:00
|
|
|
id: "config-effect-plugin",
|
|
|
|
|
effect: (ctx) =>
|
|
|
|
|
ctx.agent
|
|
|
|
|
.transform((agents) => {
|
|
|
|
|
agents.update("effect-configured", (agent) => {
|
|
|
|
|
agent.description = ctx.options.description
|
|
|
|
|
agent.mode = "subagent"
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
.pipe(Effect.asVoid),
|
|
|
|
|
})
|