WIP and merge
This commit is contained in:
parent
97f4406ef6
commit
1bdde8b2e4
584 changed files with 33536 additions and 17400 deletions
|
@ -288,6 +288,8 @@ pub struct CopilotSettings {
|
|||
pub proxy: Option<String>,
|
||||
/// Disable certificate verification for proxy (not recommended).
|
||||
pub proxy_no_verify: Option<bool>,
|
||||
/// Enterprise URI for Copilot.
|
||||
pub enterprise_uri: Option<String>,
|
||||
}
|
||||
|
||||
/// The settings for all languages.
|
||||
|
@ -607,6 +609,11 @@ pub struct CopilotSettingsContent {
|
|||
/// Default: false
|
||||
#[serde(default)]
|
||||
pub proxy_no_verify: Option<bool>,
|
||||
/// Enterprise URI for Copilot.
|
||||
///
|
||||
/// Default: none
|
||||
#[serde(default)]
|
||||
pub enterprise_uri: Option<String>,
|
||||
}
|
||||
|
||||
/// The settings for enabling/disabling features.
|
||||
|
@ -1228,10 +1235,10 @@ impl settings::Settings for AllLanguageSettings {
|
|||
let mut copilot_settings = default_value
|
||||
.edit_predictions
|
||||
.as_ref()
|
||||
.map(|settings| settings.copilot.clone())
|
||||
.map(|copilot| CopilotSettings {
|
||||
proxy: copilot.proxy,
|
||||
proxy_no_verify: copilot.proxy_no_verify,
|
||||
.map(|settings| CopilotSettings {
|
||||
proxy: settings.copilot.proxy.clone(),
|
||||
proxy_no_verify: settings.copilot.proxy_no_verify,
|
||||
enterprise_uri: settings.copilot.enterprise_uri.clone(),
|
||||
})
|
||||
.unwrap_or_default();
|
||||
|
||||
|
@ -1287,6 +1294,14 @@ impl settings::Settings for AllLanguageSettings {
|
|||
copilot_settings.proxy_no_verify = Some(proxy_no_verify);
|
||||
}
|
||||
|
||||
if let Some(enterprise_uri) = user_settings
|
||||
.edit_predictions
|
||||
.as_ref()
|
||||
.and_then(|settings| settings.copilot.enterprise_uri.clone())
|
||||
{
|
||||
copilot_settings.enterprise_uri = Some(enterprise_uri);
|
||||
}
|
||||
|
||||
// A user's global settings override the default global settings and
|
||||
// all default language-specific settings.
|
||||
merge_settings(&mut defaults, &user_settings.defaults);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue