-
Notifications
You must be signed in to change notification settings - Fork 750
Fix CodeLens references to search across project references #2225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
The handleCodeLensResolve now uses multi-project search mechanism similar to handleReferences to find all references across project references, not just within the current project. Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
- Fix error assignment logic to only assign first error - Move defer s.recover() to only apply to single-project resolution path Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
DanielRosenwasser
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot I think the better thing to do might actually be to get rid of registerMultiProjectReferenceRequestHandler, and shift more of that work into a common helper that handleReferences and handleRename can do. That way, handleCodeLensResolve can call that directly.
Extract common multi-project search logic from registerMultiProjectReferenceRequestHandler into a new multiProjectSearchHelper function that can be used by handleReferences, handleRename, and handleCodeLensResolve. This eliminates code duplication and makes the multi-project search logic more maintainable. Co-authored-by: DanielRosenwasser <972891+DanielRosenwasser@users.noreply.github.com>
Refactored the code to extract the multi-project search logic into a reusable |
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.