Skip to content

fix: tolerate missing tools in V2 context hooks - #678

Open
Tarquinen wants to merge 1 commit into
devfrom
fix/compaction-tools
Open

Tarquinen wants to merge 1 commit into
devfrom
fix/compaction-tools

Conversation

@Tarquinen

Copy link
Copy Markdown
Owner

Fixes #668

  • Use delete event.tools?.compress so the V2 context/compaction hooks no longer throw when an earlier hook removed event.tools.

Tested: typecheck/tests/format; sandbox on OpenCode 2.3.0 with a hook that deletes event.tools and compress.permission: "deny": 3.2.0 fails with undefined is not an object (evaluating 'delete event.tools.compress'), this branch completes the request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant