Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,13 @@
optOutTelemetry = AwsSettings.getInstance().isTelemetryEnabled,
customization = CodeWhispererModelConfigurator.getInstance().activeCustomization(project)?.arn,
// local context
enableLocalIndexing = qSettings.isProjectContextEnabled(),
indexWorkerThreads = qSettings.getProjectContextIndexThreadCount(),
enableGpuAcceleration = qSettings.isProjectContextGpu(),
localIndexing = LocalIndexingConfiguration(
maxIndexSizeMB = qSettings.getProjectContextIndexMaxSize()
projectContext = ProjectContextConfiguration(
enableLocalIndexing = qSettings.isProjectContextEnabled(),
indexWorkerThreads = qSettings.getProjectContextIndexThreadCount(),
enableGpuAcceleration = qSettings.isProjectContextGpu(),
localIndexing = LocalIndexingConfiguration(
maxIndexSizeMB = qSettings.getProjectContextIndexMaxSize()

Check warning on line 114 in plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageClientImpl.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageClientImpl.kt#L109-L114

Added lines #L109 - L114 were not covered by tests
)
)
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
@SerializedName(AmazonQLspConstants.LSP_CUSTOMIZATION_CONFIGURATION_KEY)
val customization: String? = null,

val projectContext: ProjectContextConfiguration? = null,
)

Check warning on line 19 in plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspConfiguration.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspConfiguration.kt#L18-L19

Added lines #L18 - L19 were not covered by tests

data class ProjectContextConfiguration(

Check warning on line 21 in plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspConfiguration.kt

View check run for this annotation

Codecov / codecov/patch

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLspConfiguration.kt#L21

Added line #L21 was not covered by tests
val enableLocalIndexing: Boolean? = null,

val enableGpuAcceleration: Boolean? = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,13 @@ class AmazonQLanguageClientImplTest {
AmazonQLspConfiguration(
optOutTelemetry = telemetryEnabled,
customization = customizationArn,
enableLocalIndexing = enableIndexing,
enableGpuAcceleration = enableGpu,
indexWorkerThreads = workerThreads,
localIndexing = LocalIndexingConfiguration(
maxIndexSizeMB = indexSize,
projectContext = ProjectContextConfiguration(
enableLocalIndexing = enableIndexing,
enableGpuAcceleration = enableGpu,
indexWorkerThreads = workerThreads,
localIndexing = LocalIndexingConfiguration(
maxIndexSizeMB = indexSize,
)
)
)
)
Expand All @@ -196,14 +198,16 @@ class AmazonQLanguageClientImplTest {
optOutTelemetry = true,
enableTelemetryEvents = true,
customization = "arn",
enableLocalIndexing = true,
enableGpuAcceleration = true,
indexWorkerThreads = 123,
localIndexing = LocalIndexingConfiguration(
maxFileSizeMB = 789,
maxIndexSizeMB = 456,
indexCacheDirPath = "/a/path",
ignoreFilePatterns = listOf("ignore", "patterns")
projectContext = ProjectContextConfiguration(
enableLocalIndexing = true,
enableGpuAcceleration = true,
indexWorkerThreads = 123,
localIndexing = LocalIndexingConfiguration(
maxFileSizeMB = 789,
maxIndexSizeMB = 456,
indexCacheDirPath = "/a/path",
ignoreFilePatterns = listOf("ignore", "patterns")
)
)
)

Expand All @@ -214,17 +218,19 @@ class AmazonQLanguageClientImplTest {
"optOutTelemetry": true,
"enableTelemetryEventsToDestination": true,
"customization": "arn",
"enableLocalIndexing": true,
"enableGpuAcceleration": true,
"indexWorkerThreads": 123,
"localIndexing": {
"ignoreFilePatterns": [
"ignore",
"patterns"
],
"maxFileSizeMB": 789,
"maxIndexSizeMB": 456,
"indexCacheDirPath": "/a/path"
"projectContext": {
"enableLocalIndexing": true,
"enableGpuAcceleration": true,
"indexWorkerThreads": 123,
"localIndexing": {
"ignoreFilePatterns": [
"ignore",
"patterns"
],
"maxFileSizeMB": 789,
"maxIndexSizeMB": 456,
"indexCacheDirPath": "/a/path"
}
}
}
""".trimIndent()
Expand Down
Loading