Skip to content

Commit 7c8a681

Browse files
committed
followup capital casing
1 parent bdc0459 commit 7c8a681

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/flareChat/ChatCommunicationManager.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import software.aws.toolkits.jetbrains.core.gettingstarted.editor.checkBearerCon
1919
import software.aws.toolkits.jetbrains.services.amazonq.lsp.AmazonQLspService
2020
import software.aws.toolkits.jetbrains.services.amazonq.lsp.flareChat.ProgressNotificationUtils.getObject
2121
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.AuthFollowUpClickedParams
22-
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.AuthFollowUpType
22+
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.AuthFollowupType
2323
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.GetSerializedChatResult
2424
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.OpenTabResult
2525
import software.aws.toolkits.jetbrains.services.amazonq.lsp.model.aws.chat.SEND_CHAT_COMMAND_PROMPT
@@ -69,17 +69,17 @@ class ChatCommunicationManager {
6969
}
7070

7171
fun handleAuthFollowUpClicked(project: Project, params: AuthFollowUpClickedParams) {
72-
val incomingType = params.authFollowUpType
72+
val incomingType = params.authFollowupType
7373
val connectionManager = ToolkitConnectionManager.getInstance(project)
7474
try {
7575
when (incomingType) {
76-
AuthFollowUpType.RE_AUTH.value, AuthFollowUpType.MISSING_SCOPES.value -> {
76+
AuthFollowupType.RE_AUTH.value, AuthFollowupType.MISSING_SCOPES.value -> {
7777
connectionManager.activeConnectionForFeature(QConnection.getInstance())?.let {
7878
reauthConnectionIfNeeded(project, it, isReAuth = true)
7979
}
8080
return
8181
}
82-
AuthFollowUpType.FULL_AUTH.value, AuthFollowUpType.USE_SUPPORTED_AUTH.value -> {
82+
AuthFollowupType.FULL_AUTH.value, AuthFollowupType.USE_SUPPORTED_AUTH.value -> {
8383
// Logout by deleting token credentials
8484
val validConnection = checkBearerConnectionValidity(project, BearerTokenFeatureSet.Q)
8585
val connection = validConnection.activeConnectionBearer
@@ -92,7 +92,6 @@ class ChatCommunicationManager {
9292
}
9393
else -> {
9494
LOG.warn { "Unknown auth follow up type: $incomingType" }
95-
throw IllegalStateException("Error occurred while attempting to handle auth follow up: Unknown AuthFollowUpType $incomingType")
9695
}
9796
}
9897
} catch (ex: Exception) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ data class AuthFollowUpClickNotification(
1111
data class AuthFollowUpClickedParams(
1212
val tabId: String,
1313
val messageId: String,
14-
val authFollowUpType: String,
14+
val authFollowupType: String,
1515
) {
1616
companion object {
17-
fun create(tabId: String, messageId: String, authType: AuthFollowUpType): AuthFollowUpClickedParams =
17+
fun create(tabId: String, messageId: String, authType: AuthFollowupType): AuthFollowUpClickedParams =
1818
AuthFollowUpClickedParams(tabId, messageId, authType.value)
1919
}
2020
}
2121

22-
enum class AuthFollowUpType(val value: String) {
22+
enum class AuthFollowupType(val value: String) {
2323
FULL_AUTH("full-auth"),
2424
RE_AUTH("re-auth"),
2525
MISSING_SCOPES("missing_scopes"),

0 commit comments

Comments
 (0)