Skip to content

Commit

Permalink
Show proxy settings in local and remote tabs (microsoft/vscode-copilo…
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmarti committed Jan 17, 2025
1 parent a74aabd commit 833bb3e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/vs/platform/request/common/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ export function updateProxyConfigurationsScope(useHostProxy: boolean, useHostPro
registerProxyConfigurations(useHostProxy, useHostProxyDefault);
}

export const USER_LOCAL_AND_REMOTE_SETTINGS = [
'http.proxy',
'http.proxyStrictSSL',
'http.proxyKerberosServicePrincipal',
'http.noProxy',
'http.proxyAuthorization',
'http.proxySupport',
'http.systemCertificates',
'http.experimental.systemCertificatesV2',
'http.fetchAdditionalSupport',
];

let proxyConfiguration: IConfigurationNode[] = [];
function registerProxyConfigurations(useHostProxy = true, useHostProxyDefault = true): void {
const configurationRegistry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { ILanguageService } from '../../../../editor/common/languages/language.j
import { Registry } from '../../../../platform/registry/common/platform.js';
import { IUserDataProfileService } from '../../../services/userDataProfile/common/userDataProfile.js';
import { IProductService } from '../../../../platform/product/common/productService.js';
import { USER_LOCAL_AND_REMOTE_SETTINGS } from '../../../../platform/request/common/request.js';

export const ONLINE_SERVICES_SETTING_TAG = 'usesOnlineServices';

Expand Down Expand Up @@ -425,12 +426,12 @@ export class SettingsTreeSettingElement extends SettingsTreeElement {
}

if (configTarget === ConfigurationTarget.USER_REMOTE) {
return REMOTE_MACHINE_SCOPES.includes(this.setting.scope);
return REMOTE_MACHINE_SCOPES.includes(this.setting.scope) || USER_LOCAL_AND_REMOTE_SETTINGS.includes(this.setting.key);
}

if (configTarget === ConfigurationTarget.USER_LOCAL) {
if (isRemote) {
return LOCAL_MACHINE_SCOPES.includes(this.setting.scope);
return LOCAL_MACHINE_SCOPES.includes(this.setting.scope) || USER_LOCAL_AND_REMOTE_SETTINGS.includes(this.setting.key);
}
}

Expand Down

0 comments on commit 833bb3e

Please sign in to comment.