Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public async Task<bool> IsCopilotOptionEnabledAsync(string optionName)
var settingManager = await _settingsManagerTask.ConfigureAwait(false);
// 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;
Copy link
Member

@Cosifne Cosifne Aug 15, 2024

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?

Copy link
Member

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)

Copy link
Member

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.

Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

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?

}

public Task<bool> IsCodeAnalysisOptionEnabledAsync()
Expand Down