Skip to content

Commit c4bc45d

Browse files
committed
detekt
1 parent 1cde7de commit c4bc45d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,20 @@ class DefaultCodeWhispererFileContextProvider(private val project: Project) : Fi
146146
val latency = System.currentTimeMillis() - startFetchingTimestamp
147147
if (it.contents.isNotEmpty()) {
148148
val logStr = buildString {
149-
append("""Q inline completion supplemental context:
149+
append(
150+
"""Q inline completion supplemental context:
150151
| Strategy: ${it.strategy},
151152
| Latency: $latency ms,
152153
| Contents: ${it.contents.size} chunks,
153154
| ContentLength: ${it.contentLength} chars,
154155
| TargetFile: ${it.targetFileName},
155-
""".trimMargin())
156+
""".trimMargin()
157+
)
156158
it.contents.forEachIndexed { index, chunk ->
157159
append(
158160
"""
159161
|
160-
| Chunk ${index}:
162+
| Chunk $index:
161163
| path = ${chunk.path},
162164
| score = ${chunk.score},
163165
| contentLength = ${chunk.content.length}

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
@@ -22,7 +22,7 @@ enum class CrossFileStrategy : SupplementalContextStrategy {
2222
OpenTabsBM25,
2323
Empty,
2424
ProjectContext,
25-
Codemap
25+
Codemap,
2626
;
2727

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

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ data class QueryChatRequest(
5252
data class QueryInlineCompletionRequest(
5353
val query: String,
5454
val filePath: String,
55-
val target: String
55+
val target: String,
5656
) : LspRequest
5757

5858
data class LspResponse(
@@ -76,9 +76,7 @@ enum class InlineContextTarget(private val v: String) {
7676
CODEMAP("codemap"),
7777
BM25("bm25"), ;
7878

79-
override fun toString(): String {
80-
return this.v
81-
}
79+
override fun toString(): String = this.v
8280
}
8381

8482
// TODO: unify with [software.aws.toolkits.jetbrains.services.codewhisperer.model.Chunk]

0 commit comments

Comments
 (0)