@@ -12,6 +12,8 @@ import { SecretStorage, getAccessToken } from './services/SecretStorageProvider'
1212 * All configuration values, with some sanitization performed.
1313 */
1414export function getConfiguration ( config : Pick < vscode . WorkspaceConfiguration , 'get' > ) : Configuration {
15+ const isTesting = process . env . CODY_TESTING === 'true'
16+
1517 let debugRegex : RegExp | null = null
1618 try {
1719 const debugPattern : string | null = config . get < string | null > ( 'cody.debug.filter' , null )
@@ -30,15 +32,15 @@ export function getConfiguration(config: Pick<vscode.WorkspaceConfiguration, 'ge
3032 return {
3133 serverEndpoint : sanitizeServerEndpoint ( config . get ( 'cody.serverEndpoint' , '' ) ) ,
3234 codebase : sanitizeCodebase ( config . get ( 'cody.codebase' ) ) ,
35+ customHeaders : config . get < object > ( 'cody.customHeaders' , { } ) as Record < string , string > ,
36+ useContext : config . get < ConfigurationUseContext > ( 'cody.useContext' ) || 'embeddings' ,
3337 debugEnable : config . get < boolean > ( 'cody.debug.enable' , false ) ,
3438 debugVerbose : config . get < boolean > ( 'cody.debug.verbose' , false ) ,
3539 debugFilter : debugRegex ,
36- useContext : config . get < ConfigurationUseContext > ( 'cody.useContext' ) || 'embeddings' ,
37- experimentalSuggest : config . get ( 'cody.experimental.suggestions' , false ) ,
38- experimentalChatPredictions : config . get ( 'cody.experimental.chatPredictions' , false ) ,
39- experimentalInline : config . get ( 'cody.experimental.inline' , false ) ,
40- experimentalGuardrails : config . get ( 'cody.experimental.guardrails' , false ) ,
41- customHeaders : config . get < object > ( 'cody.customHeaders' , { } ) as Record < string , string > ,
40+ experimentalSuggest : config . get ( 'cody.experimental.suggestions' , isTesting ) ,
41+ experimentalChatPredictions : config . get ( 'cody.experimental.chatPredictions' , isTesting ) ,
42+ experimentalInline : config . get ( 'cody.experimental.inline' , isTesting ) ,
43+ experimentalGuardrails : config . get ( 'cody.experimental.guardrails' , isTesting ) ,
4244 }
4345}
4446
0 commit comments