config-promise-plugin.ts 333 B

12345678910111213
  1. import { Plugin } from "@opencode-ai/plugin"
  2. export default Plugin.define({
  3. id: "config-promise-plugin",
  4. setup: async (ctx) => {
  5. await ctx.agent.transform((agents) => {
  6. agents.update("configured", (agent) => {
  7. agent.description = ctx.options.description
  8. agent.mode = "subagent"
  9. })
  10. })
  11. },
  12. })