enable static contextualization when needed
This commit is contained in:
parent
b0b2de7dff
commit
f04260a7ef
1 changed files with 7 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ import { BracketMatchingService } from "./filtering/BracketMatchingService.js";
|
|||
import { CompletionStreamer } from "./generation/CompletionStreamer.js";
|
||||
import { postprocessCompletion } from "./postprocessing/index.js";
|
||||
import { shouldPrefilter } from "./prefiltering/index.js";
|
||||
import { getAllSnippets } from "./snippets/index.js";
|
||||
import { getAllSnippetsWithoutRace } from "./snippets/index.js";
|
||||
import { renderPrompt } from "./templating/index.js";
|
||||
import { GetLspDefinitionsFunction } from "./types.js";
|
||||
import { AutocompleteDebouncer } from "./util/AutocompleteDebouncer.js";
|
||||
|
|
@ -121,6 +121,11 @@ export class CompletionProvider {
|
|||
...config?.tabAutocompleteOptions,
|
||||
...llm.autocompleteOptions,
|
||||
};
|
||||
|
||||
// Enable static contextualization if defined.
|
||||
options.experimental_enableStaticContextualization =
|
||||
config?.experimental?.enableStaticContextualization ?? false;
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
|
|
@ -171,7 +176,7 @@ export class CompletionProvider {
|
|||
}
|
||||
|
||||
const [snippetPayload, workspaceDirs] = await Promise.all([
|
||||
getAllSnippets({
|
||||
getAllSnippetsWithoutRace({
|
||||
helper,
|
||||
ide: this.ide,
|
||||
getDefinitionsFromLsp: this.getDefinitionsFromLsp,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue