diff --git a/core/autocomplete/snippets/getAllSnippets.ts b/core/autocomplete/snippets/getAllSnippets.ts index fccc8530b..079127abc 100644 --- a/core/autocomplete/snippets/getAllSnippets.ts +++ b/core/autocomplete/snippets/getAllSnippets.ts @@ -199,7 +199,9 @@ export const getAllSnippets = async ({ [], // racePromise(getDiffSnippets(ide)) // temporarily disabled, see https://github.com/continuedev/continue/pull/5882, racePromise(getClipboardSnippets(ide)), racePromise(getSnippetsFromRecentlyOpenedFiles(helper, ide)), // giving this one a little more time to complete - racePromise(contextRetrievalService.getStaticContextSnippets(helper)), + helper.options.experimental_enableStaticContextualization + ? racePromise(contextRetrievalService.getStaticContextSnippets(helper)) + : [], ]); return { @@ -246,7 +248,9 @@ export const getAllSnippetsWithoutRace = async ({ [], // racePromise(getDiffSnippets(ide)) // temporarily disabled, see https://github.com/continuedev/continue/pull/5882, getClipboardSnippets(ide), getSnippetsFromRecentlyOpenedFiles(helper, ide), - contextRetrievalService.getStaticContextSnippets(helper), + helper.options.experimental_enableStaticContextualization + ? contextRetrievalService.getStaticContextSnippets(helper) + : [], ]); return {