Skip to content

Commit a59204c

Browse files
committed
lint
1 parent 1ff4021 commit a59204c

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/SupplementalContextStrategy.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ enum class UtgStrategy : SupplementalContextStrategy {
2121
enum class CrossFileStrategy : SupplementalContextStrategy {
2222
OpenTabsBM25,
2323
Empty,
24-
ProjectContext
24+
ProjectContext,
2525
;
2626

2727
override fun toString() = when (this) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import software.amazon.awssdk.services.codewhispererruntime.model.FeatureValue
1212
import software.amazon.awssdk.services.codewhispererruntime.model.ListAvailableCustomizationsRequest
1313
import software.aws.toolkits.core.utils.debug
1414
import software.aws.toolkits.core.utils.getLogger
15-
import software.aws.toolkits.jetbrains.isDeveloperMode
1615
import software.aws.toolkits.jetbrains.core.awsClient
16+
import software.aws.toolkits.jetbrains.isDeveloperMode
1717
import software.aws.toolkits.jetbrains.utils.isQExpired
1818

1919
@Service

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

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
141141
val encrypted = encryptRequest(IndexRequest(filesResult.files, projectRoot, "all", ""))
142142
val response = sendMsgToLsp(LspMessage.Index, encrypted)
143143

144-
145144
duration = (System.currentTimeMillis() - indexStartTime).toDouble()
146145
logger.debug { "project context index time: ${duration}ms" }
147146

@@ -200,26 +199,26 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
200199
sendMsgToLsp(LspMessage.UpdateIndex, encrypted)
201200
}
202201

203-
private fun recordIndexWorkspace(
204-
duration: Double,
205-
fileCount: Int = 0,
206-
fileSize: Int = 0,
207-
isSuccess: Boolean,
208-
memoryUsage: Int? = 0,
209-
cpuUsage: Int? = 0,
210-
startUrl: String? = null,
211-
) {
212-
AmazonqTelemetry.indexWorkspace(
213-
project = null,
214-
duration = duration,
215-
amazonqIndexFileCount = fileCount.toLong(),
216-
amazonqIndexFileSizeInMB = fileSize.toLong(),
217-
success = isSuccess,
218-
amazonqIndexMemoryUsageInMB = memoryUsage?.toLong(),
219-
amazonqIndexCpuUsagePercentage = cpuUsage?.toLong(),
220-
credentialStartUrl = startUrl
221-
)
222-
}
202+
private fun recordIndexWorkspace(
203+
duration: Double,
204+
fileCount: Int = 0,
205+
fileSize: Int = 0,
206+
isSuccess: Boolean,
207+
memoryUsage: Int? = 0,
208+
cpuUsage: Int? = 0,
209+
startUrl: String? = null,
210+
) {
211+
AmazonqTelemetry.indexWorkspace(
212+
project = null,
213+
duration = duration,
214+
amazonqIndexFileCount = fileCount.toLong(),
215+
amazonqIndexFileSizeInMB = fileSize.toLong(),
216+
success = isSuccess,
217+
amazonqIndexMemoryUsageInMB = memoryUsage?.toLong(),
218+
amazonqIndexCpuUsagePercentage = cpuUsage?.toLong(),
219+
credentialStartUrl = startUrl
220+
)
221+
}
223222

224223
private fun setConnectionTimeout(connection: HttpURLConnection) {
225224
connection.connectTimeout = 5000 // 5 seconds

0 commit comments

Comments
 (0)