Skip to content

Commit 13e5d8d

Browse files
authored
config(amazonq): setup project context ab for inline completion (#4990)
1 parent e9bfb9a commit 13e5d8d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

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

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

111+
@Suppress("UNUSED")
112+
fun getInlineCompletion(): Boolean = getFeatureValueForKey(INLINE_COMPLETION).stringValue() == "TREATMENT"
113+
111114
// Get the feature value for the given key.
112115
// In case of a misconfiguration, it will return a default feature value of Boolean false.
113116
private fun getFeatureValueForKey(name: String): FeatureValue =
@@ -117,6 +120,7 @@ class CodeWhispererFeatureConfigService {
117120
companion object {
118121
fun getInstance(): CodeWhispererFeatureConfigService = service()
119122
private const val TEST_FEATURE_NAME = "testFeature"
123+
private const val INLINE_COMPLETION = "ProjectContextV2"
120124
private const val DATA_COLLECTION_FEATURE = "IDEProjectContextDataCollection"
121125
const val CUSTOMIZATION_ARN_OVERRIDE_NAME = "customizationArnOverride"
122126
private const val NEW_AUTO_TRIGGER_UX = "newAutoTriggerUX"
@@ -141,6 +145,11 @@ class CodeWhispererFeatureConfigService {
141145
"CONTROL",
142146
FeatureValue.builder().stringValue("CONTROL").build()
143147
),
148+
INLINE_COMPLETION to FeatureContext(
149+
INLINE_COMPLETION,
150+
"CONTROL",
151+
FeatureValue.builder().stringValue("CONTROL").build()
152+
)
144153
)
145154
}
146155
}

0 commit comments

Comments
 (0)