fix(opencode): skip falsy plugin hook returns instead of crashing provider listing#13
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughPlugin loading now filters falsy hook results, records plugin modules that produce no hooks, and logs warnings for internal and external no-hook cases. New tests cover legacy helper exports and v1 server functions resolving to ChangesPlugin hook filtering
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…vider listing Ported from upstream anomalyco#36102.
79ff66e to
bd61dbf
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Port of upstream anomalyco/opencode#36102.
Plugin hook collection now guards against plugins that return
undefined/falsy hook objects — previously these were pushed into the hook list and crashed provider listing with a 500.Verified:
bun test test/plugin/(166 pass across 16 files, includes new falsy-hooks regression suite) andbun typecheckfrom packages/opencode. Applied cleanly.Summary by CodeRabbit
Bug Fixes
Tests