Skip to content

Support new context resolve handler #8126

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

genlu
Copy link
Member

@genlu genlu commented Apr 2, 2025

This is to support the change in dotnet/roslyn#77973

@genlu genlu requested a review from a team as a code owner April 2, 2025 02:08
@genlu genlu marked this pull request as draft April 2, 2025 21:18
@genlu genlu changed the title Pass activeExperiments to context providers Support new context resolve handler Apr 3, 2025
@@ -77,26 +88,35 @@ export function registerCopilotContextProviders(
devkit.activate().then(async (devKitExports) => {
try {
// Check if the Copilot Language Server extension is installed and has the correct capabilities
let hasCapabilities = false;
// 0 means not support, 1 means old version, 2 means new version
let hasCapabilities = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of this, maybe have let resolveMethod: string | undefined = undefined; and set the method name below if the version matches? Then you also don't have to do the hasCapabilities === 1 below

capability.version === newResolveContextMethodSupportedVersion
) {
hasCapabilities = 2;
channel.debug(`supported 'roslyn/resolveContext@2' method found in capabilities.json`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to make a note here - this PR requires a Roslyn version bump with the handler present in it (otherwise this request may fail).

@akhera99 akhera99 marked this pull request as ready for review April 10, 2025 18:20
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.

3 participants