@@ -399,6 +399,7 @@ export interface Config<T> extends BaseConfig<T> {
399
399
400
400
export interface ExperimentBasedConfig < T extends ExperimentBasedConfigType > extends BaseConfig < T > {
401
401
readonly configType : ConfigType . ExperimentBased ;
402
+ readonly experimentName : string | undefined ;
402
403
}
403
404
404
405
let packageJsonDefaults : Map < string , any > | undefined = undefined ;
@@ -488,8 +489,8 @@ function defineSetting<T>(key: string, defaultValue: T | DefaultValueWithTeamVal
488
489
* config.github.copilot.chat.advanced.inlineEdits.internalRollout
489
490
* ```
490
491
*/
491
- export function defineExpSetting < T extends ExperimentBasedConfigType > ( key : string , defaultValue : T | DefaultValueWithTeamValue < T > | DefaultValueWithTeamAndInternalValue < T > , options ?: ConfigOptions ) : ExperimentBasedConfig < T > {
492
- const value : ExperimentBasedConfig < T > = { ...toBaseConfig ( key , defaultValue , options ) , configType : ConfigType . ExperimentBased } ;
492
+ export function defineExpSetting < T extends ExperimentBasedConfigType > ( key : string , defaultValue : T | DefaultValueWithTeamValue < T > | DefaultValueWithTeamAndInternalValue < T > , options ?: ConfigOptions , expOptions ?: { experimentName ?: string } ) : ExperimentBasedConfig < T > {
493
+ const value : ExperimentBasedConfig < T > = { ...toBaseConfig ( key , defaultValue , options ) , configType : ConfigType . ExperimentBased , experimentName : expOptions ?. experimentName } ;
493
494
if ( value . advancedSubKey ) {
494
495
// This is a `github.copilot.advanced.*` setting
495
496
throw new BugIndicatingError ( 'Shared settings cannot be experiment based' ) ;
@@ -714,6 +715,7 @@ export namespace ConfigKey {
714
715
export const VerifyTextDocumentChanges = defineExpSetting < boolean > ( 'chat.advanced.inlineEdits.verifyTextDocumentChanges' , true , INTERNAL_RESTRICTED ) ;
715
716
export const EnableApplyPatchForNotebooks = defineExpSetting < boolean > ( 'chat.advanced.enableApplyPatchForNotebooks' , false , INTERNAL_RESTRICTED ) ;
716
717
export const OmitBaseAgentInstructions = defineSetting < boolean > ( 'chat.advanced.omitBaseAgentInstructions' , false , INTERNAL ) ;
718
+ export const GeminiReplaceString = defineExpSetting < boolean > ( 'chat.advanced.geminiReplaceString.enabled' , false , INTERNAL , { experimentName : 'copilotchat.geminiReplaceString' } ) ;
717
719
}
718
720
719
721
export const AgentThinkingTool = defineSetting < boolean > ( 'chat.agent.thinkingTool' , false ) ;
0 commit comments