config-effect-plugin.ts 401 B

123456789101112131415
  1. import { define } from "@opencode-ai/plugin/v2/effect"
  2. import { Effect } from "effect"
  3. export default define({
  4. id: "config-effect-plugin",
  5. effect: (ctx) =>
  6. ctx.agent
  7. .transform((agents) => {
  8. agents.update("effect-configured", (agent) => {
  9. agent.description = ctx.options.description
  10. agent.mode = "subagent"
  11. })
  12. })
  13. .pipe(Effect.asVoid),
  14. })