Skip to content

Commit 22935de

Browse files
committed
detekt
1 parent 61fa22c commit 22935de

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import kotlinx.coroutines.delay
2929
import kotlinx.coroutines.isActive
3030
import kotlinx.coroutines.launch
3131
import kotlinx.coroutines.withContext
32-
import java.nio.file.Paths
3332
import software.amazon.awssdk.core.exception.SdkServiceException
3433
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList
3534
import software.amazon.awssdk.services.codewhispererruntime.model.CodeWhispererRuntimeException
@@ -96,6 +95,7 @@ import software.aws.toolkits.telemetry.CodewhispererCompletionType
9695
import software.aws.toolkits.telemetry.CodewhispererSuggestionState
9796
import software.aws.toolkits.telemetry.CodewhispererTriggerType
9897
import java.net.URI
98+
import java.nio.file.Paths
9999
import java.util.concurrent.CompletableFuture
100100
import java.util.concurrent.TimeUnit
101101

@@ -683,13 +683,14 @@ class CodeWhispererService(private val cs: CoroutineScope) : Disposable {
683683
LOG.info("Found workspaceId from LSP '$workspaceId'")
684684
break
685685
}
686-
687686
}
688687
} catch (e: Exception) {
689688
LOG.warn("Cannot get workspaceId from LSP'$e'")
690689
}
691-
return RequestContext(project, editor, triggerTypeInfo, caretPosition,
692-
fileContext, supplementalContext, connection, latencyContext, customizationArn, workspaceId)
690+
return RequestContext(
691+
project, editor, triggerTypeInfo, caretPosition,
692+
fileContext, supplementalContext, connection, latencyContext, customizationArn, workspaceId
693+
)
693694
}
694695

695696
private fun getWorkspaceIds(project: Project): CompletableFuture<LspServerConfigurations> {
@@ -832,7 +833,7 @@ class CodeWhispererService(private val cs: CoroutineScope) : Disposable {
832833
fileContextInfo: FileContextInfo,
833834
supplementalContext: SupplementalContextInfo?,
834835
customizationArn: String?,
835-
workspaceId: String?
836+
workspaceId: String?,
836837
): GenerateCompletionsRequest {
837838
val programmingLanguage = ProgrammingLanguage.builder()
838839
.languageName(fileContextInfo.programmingLanguage.toCodeWhispererRuntimeLanguage().languageId)
@@ -877,7 +878,7 @@ data class RequestContext(
877878
val connection: ToolkitConnection?,
878879
val latencyContext: LatencyContext,
879880
val customizationArn: String?,
880-
val workspaceId: String?
881+
val workspaceId: String?,
881882
) {
882883
// TODO: should make the entire getRequestContext() suspend function instead of making supplemental context only
883884
var supplementalContext: SupplementalContextInfo? = null

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/model/aws/LspServerConfigurations.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@ package software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws
77
data class WorkspaceInfo(val workspaceRoot: String, val workspaceId: String)
88

99
// This represents the entire array
10-
data class LspServerConfigurations ( val workspaces: List<WorkspaceInfo> )
11-
12-
10+
data class LspServerConfigurations(val workspaces: List<WorkspaceInfo>)

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/settings/CodeWhispererSettings.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ enum class CodeWhispererConfigurationType {
210210
HasEnabledProjectContextOnce,
211211
IsQPrioritizedForTabAccept,
212212
IsTabAcceptPriorityNotificationShownOnce,
213-
IsWorkspaceContextEnabled
213+
IsWorkspaceContextEnabled,
214214
}
215215

216216
enum class CodeWhispererStringConfigurationType {

0 commit comments

Comments
 (0)