-
Notifications
You must be signed in to change notification settings - Fork 697
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
base: main
Are you sure you want to change the base?
Conversation
@@ -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; |
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.
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`); |
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.
need to make a note here - this PR requires a Roslyn version bump with the handler present in it (otherwise this request may fail).
This is to support the change in dotnet/roslyn#77973