File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import {
2121import {
2222 AuthUtil ,
2323 CodeWhispererSettings ,
24+ FeatureConfigProvider ,
2425 getSelectedCustomization ,
2526 TelemetryHelper ,
2627 vsCodeState ,
@@ -339,7 +340,7 @@ async function onLanguageServerReady(
339340 // tutorial for inline chat
340341 const inlineChatTutorialAnnotation = new InlineChatTutorialAnnotation ( inlineTutorialAnnotation )
341342
342- const enableInlineRollback = true
343+ const enableInlineRollback = FeatureConfigProvider . instance . getPreFlareRollbackGroup ( ) === 'treatment'
343344 if ( enableInlineRollback ) {
344345 // use VSC inline
345346 await activateInline ( client )
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ export const Features = {
3939 dataCollectionFeature : 'IDEProjectContextDataCollection' ,
4040 projectContextFeature : 'ProjectContextV2' ,
4141 workspaceContextFeature : 'WorkspaceContext' ,
42+ preFlareRollbackBIDFeature : 'PreflareRollbackExperiment_BID' ,
43+ preFlareRollbackIDCFeature : 'PreflareRollbackExperiment_IDC' ,
4244 test : 'testFeature' ,
4345 highlightCommand : 'highlightCommand' ,
4446} as const
@@ -106,6 +108,16 @@ export class FeatureConfigProvider {
106108 }
107109 }
108110
111+ getPreFlareRollbackGroup ( ) : 'control' | 'treatment' | 'default' {
112+ const variationBid = this . featureConfigs . get ( Features . preFlareRollbackBIDFeature ) ?. variation
113+ const variationIdc = this . featureConfigs . get ( Features . preFlareRollbackIDCFeature ) ?. variation
114+ if ( variationBid === 'TREATMENT' || variationIdc === 'TREATMENT' ) {
115+ return 'treatment'
116+ } else {
117+ return 'control'
118+ }
119+ }
120+
109121 public async listFeatureEvaluations ( ) : Promise < ListFeatureEvaluationsResponse > {
110122 const profile = AuthUtil . instance . regionProfileManager . activeRegionProfile
111123 const request : ListFeatureEvaluationsRequest = {
You can’t perform that action at this time.
0 commit comments