2025-12-03 13:11:58 +09:00
|
|
|
import type { Plugin } from "@opencode-ai/plugin"
|
|
|
|
|
import { builtinAgents } from "./agents"
|
|
|
|
|
import { createTodoContinuationEnforcer } from "./hooks"
|
2025-12-03 11:49:33 +09:00
|
|
|
|
|
|
|
|
const OhMyOpenCodePlugin: Plugin = async (ctx) => {
|
2025-12-03 13:11:58 +09:00
|
|
|
const todoContinuationEnforcer = createTodoContinuationEnforcer(ctx)
|
2025-12-03 11:49:33 +09:00
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
config: async (config) => {
|
|
|
|
|
config.agent = {
|
|
|
|
|
...config.agent,
|
|
|
|
|
...builtinAgents,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
2025-12-03 13:11:58 +09:00
|
|
|
event: todoContinuationEnforcer,
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-12-03 11:49:33 +09:00
|
|
|
|
2025-12-03 13:11:58 +09:00
|
|
|
export default OhMyOpenCodePlugin
|