feat(plugin): add namespaced hook API (#33416)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { define } from "@opencode-ai/plugin/v2/promise"
|
||||
|
||||
export default define({
|
||||
id: "directory-plugin",
|
||||
setup: async (ctx) => {
|
||||
await ctx.agent.transform((agents) => {
|
||||
agents.update("directory", (agent) => {
|
||||
agent.description = "Loaded from plugin directory"
|
||||
agent.mode = "subagent"
|
||||
})
|
||||
})
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user