cleanup(environment): keep one lookup order

This commit is contained in:
Tianyi Cui
2026-08-07 23:33:11 +08:00
parent 2c532f3b2c
commit d0e052dd83
10 changed files with 25 additions and 29 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ export function apply(ctx: Context, config: Config): void {
ctx.web.registerSearchProvider(new ExaSearchProvider({
// Every environment layer may name this key: the product trusts the
// project it is launched in, and the managed store is not involved here.
apiKey: config.apiKey ?? environmentOf(ctx).getFrom('EXA_API_KEY', ['process', 'project-env', 'user-env'])?.value ?? '',
apiKey: config.apiKey ?? environmentOf(ctx).get('EXA_API_KEY')?.value ?? '',
baseURL: config.baseURL ?? EXA_DEFAULT_BASE_URL,
searchType: config.searchType ?? EXA_DEFAULT_SEARCH_TYPE,
highlightsPerResult: config.highlightsPerResult ?? EXA_DEFAULT_HIGHLIGHTS_PER_RESULT,