fix(lsp): advertise codeActionProvider in server capabilities#3358
fix(lsp): advertise codeActionProvider in server capabilities#3358MFS-code wants to merge 1 commit intoBoundaryML:canaryfrom
Conversation
|
@MFS-code is attempting to deploy a commit to the Boundary Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe LSP server capability advertisement now advertises code action support by setting Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs (1)
18-32: Add a unit test to lock this handshake behavior.Please add a small unit test asserting
server_capabilities().code_action_provideris enabled, so this regression does not reappear.As per coding guidelines "Prefer writing Rust unit tests over integration tests where possible".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs` around lines 18 - 32, Add a unit test in the same module (e.g., inside request.rs under #[cfg(test)] mod tests) that calls server_capabilities() and asserts the code_action_provider is enabled; specifically verify server_capabilities().code_action_provider is Some(CodeActionProviderCapability::Simple(true)) (or use a matches! assertion) so the expectation is locked in and future regressions are caught. Ensure the test imports ServerCapabilities/CodeActionProviderCapability as needed and is a normal #[test] unit test so it runs with cargo test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs`:
- Around line 18-32: Add a unit test in the same module (e.g., inside request.rs
under #[cfg(test)] mod tests) that calls server_capabilities() and asserts the
code_action_provider is enabled; specifically verify
server_capabilities().code_action_provider is
Some(CodeActionProviderCapability::Simple(true)) (or use a matches! assertion)
so the expectation is locked in and future regressions are caught. Ensure the
test imports ServerCapabilities/CodeActionProviderCapability as needed and is a
normal #[test] unit test so it runs with cargo test.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 4faef7b4-8056-431b-80c4-d7843e293525
📒 Files selected for processing (1)
baml_language/crates/bex_project/src/bex_lsp/multi_project/request.rs
|
Thanks! |
Head branch was pushed to by a user without write access
The server implements textDocument/codeAction but did not set code_action_provider in initialize, so spec-compliant clients never requested code actions. Import CodeActionProviderCapability for the capability value.
The server implements textDocument/codeAction but did not set code_action_provider in initialize, so spec-compliant clients never requested code actions. Import CodeActionProviderCapability for the capability value.
Summary by CodeRabbit