-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix Copilot option bug #74781
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
Fix Copilot option bug #74781
Conversation
// The bool setting is persisted as 0=None, 1=True, 2=False, so it needs to be retrieved as an int. | ||
return settingManager.TryGetValue($"{CopilotOptionNamePrefix}.{optionName}", out int isEnabled) == GetValueResult.Success | ||
&& isEnabled == 1; | ||
&& isEnabled != 2; |
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.
So None
and True
both means enabled? Does this mean it's enabled by default?
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.
yea, this is now enabled by default (the source of truth is in copilot repo, where all those options are defined)
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 needs an option provider service so they can apply the defaults when you request values.
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.
do you have an example for that?
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.
No, it was all me wishing something existed. They could write the defaults for their settings as $"{CopilotOptionNamePrefix}.{option.Name}.Default"
or something similar. Then we could defer to whatever they ship.
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.
Why are we not using our existing options infra?
Fixes bug where default option value was not being respected