File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
codewhispererChat/controllers/chat Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ import { CodeWhispererSettings } from '../../../codewhisperer/util/codewhisperer
4949import { getSelectedCustomization } from '../../../codewhisperer/util/customizationUtil'
5050import { getHttpStatusCode , AwsClientResponseError } from '../../../shared/errors'
5151import { uiEventRecorder } from '../../../amazonq/util/eventRecorder'
52- import { globals , waitUntil } from '../../../shared'
5352import { telemetry } from '../../../shared/telemetry'
5453import { isSsoConnection } from '../../../auth/connection'
5554import { inspect } from '../../../shared/utilities/collectionUtils'
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export const Features = {
3535 customizationArnOverride : 'customizationArnOverride' ,
3636 dataCollectionFeature : 'IDEProjectContextDataCollection' ,
3737 projectContextFeature : 'ProjectContextV2' ,
38+ workspaceContextFeature : 'WorkspaceContext' ,
3839 test : 'testFeature' ,
3940} as const
4041
@@ -83,6 +84,21 @@ export class FeatureConfigProvider {
8384 }
8485 }
8586
87+ getWorkspaceContextGroup ( ) : 'control' | 'treatment' {
88+ const variation = this . featureConfigs . get ( Features . projectContextFeature ) ?. variation
89+
90+ switch ( variation ) {
91+ case 'CONTROL' :
92+ return 'control'
93+
94+ case 'TREATMENT' :
95+ return 'treatment'
96+
97+ default :
98+ return 'control'
99+ }
100+ }
101+
86102 public async listFeatureEvaluations ( ) : Promise < ListFeatureEvaluationsResponse > {
87103 const request : ListFeatureEvaluationsRequest = {
88104 userContext : {
@@ -157,7 +173,7 @@ export class FeatureConfigProvider {
157173 await vscode . commands . executeCommand ( 'aws.amazonq.refreshStatusBar' )
158174 }
159175 }
160- if ( Auth . instance . isInternalAmazonUser ( ) ) {
176+ if ( this . getWorkspaceContextGroup ( ) === 'treatment' ) {
161177 // Enable local workspace index by default only once, for Amzn users.
162178 const isSet = globals . globalState . get < boolean > ( 'aws.amazonq.workspaceIndexToggleOn' ) || false
163179 if ( ! isSet ) {
You can’t perform that action at this time.
0 commit comments