mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-14 23:30:23 +01:00
Make diagnostics context provider experiment configurable by language (#2412)
* make the diagnostics context provider exp configurable based on the language * change name
This commit is contained in:
committed by
GitHub
parent
ba86c3f43f
commit
b331f08b77
+6
@@ -78,6 +78,12 @@ class ContextResolver implements Copilot.ContextResolver<Copilot.SupportedContex
|
||||
return [];
|
||||
}
|
||||
|
||||
const languageId = request.documentContext.languageId;
|
||||
const languageEnablement = this.experimentationService.getTreatmentVariable<boolean>(`config.github.copilot.chat.inlineEdits.diagnosticsContextProvider.${languageId}`);
|
||||
if (!languageEnablement) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const requestedFileResource = URI.parse(request.documentContext.uri);
|
||||
const cursor = new Position(request.documentContext.position.line + 1, request.documentContext.position.character + 1);
|
||||
const linesAbove = this.configurationService.getExperimentBasedConfig(ConfigKey.TeamInternal.InlineEditsXtabProviderNLinesAbove, this.experimentationService) ?? N_LINES_ABOVE;
|
||||
|
||||
Reference in New Issue
Block a user