refactor(plugin): scope context hook to session (#37175)

Co-authored-by: Dax Raad <d@ironbay.co>
This commit is contained in:
opencode-agent[bot] 2026-07-15 16:32:00 -04:00 committed by GitHub
commit f92d84746b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 85 additions and 97 deletions

View file

@ -196,7 +196,7 @@ export const Plugin = {
)
.pipe(Effect.orDie)
yield* ctx.ai.hook("request", (event) =>
yield* ctx.session.hook("context", (event) =>
Effect.sync(() => {
const usePatch =
event.model.providerID.toLowerCase() === "openai" || event.model.id.toLowerCase().includes("gpt")