Skip to content

Commit dbffac8

Browse files
committed
setup project context ab for inline completion
1 parent 6955ef9 commit dbffac8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/CodeWhispererFeatureConfigService.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ class CodeWhispererFeatureConfigService {
108108

109109
fun getNewAutoTriggerUX(): Boolean = getFeatureValueForKey(NEW_AUTO_TRIGGER_UX).stringValue() == "TREATMENT"
110110

111+
fun getInlineCompletion(): Boolean = getFeatureValueForKey(INLINE_COMPLETION).stringValue() == "TREATMENT"
112+
111113
// Get the feature value for the given key.
112114
// In case of a misconfiguration, it will return a default feature value of Boolean false.
113115
private fun getFeatureValueForKey(name: String): FeatureValue =
@@ -117,6 +119,7 @@ class CodeWhispererFeatureConfigService {
117119
companion object {
118120
fun getInstance(): CodeWhispererFeatureConfigService = service()
119121
private const val TEST_FEATURE_NAME = "testFeature"
122+
private const val INLINE_COMPLETION = "ProjectContextV2"
120123
private const val DATA_COLLECTION_FEATURE = "IDEProjectContextDataCollection"
121124
const val CUSTOMIZATION_ARN_OVERRIDE_NAME = "customizationArnOverride"
122125
private const val NEW_AUTO_TRIGGER_UX = "newAutoTriggerUX"
@@ -141,6 +144,11 @@ class CodeWhispererFeatureConfigService {
141144
"CONTROL",
142145
FeatureValue.builder().stringValue("CONTROL").build()
143146
),
147+
INLINE_COMPLETION to FeatureContext(
148+
INLINE_COMPLETION,
149+
"CONTROL",
150+
FeatureValue.builder().stringValue("CONTROL").build()
151+
)
144152
)
145153
}
146154
}

0 commit comments

Comments
 (0)