Skip to content

Commit f3f324d

Browse files
committed
Fix syntax error
1 parent 5317be3 commit f3f324d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/controller/ChatController.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class ChatController private constructor(
130130
var shouldAddIndexInProgressMessage: Boolean = false
131131
var shouldUseWorkspaceContext: Boolean = false
132132
val isDataCollectionGroup = CodeWhispererFeatureConfigService.getInstance().getIsDataCollectionEnabled()
133-
val startUrl = getStartUrl(context.project)
133+
val startUrl = getStartUrl(context.project)
134134

135135
if (prompt.contains("@workspace")) {
136136
if (CodeWhispererSettings.getInstance().isProjectContextEnabled()) {
@@ -334,9 +334,11 @@ class ChatController private constructor(
334334
}
335335

336336
// Create prompt
337-
val prompt = if (EditorContextCommand.GenerateUnitTests == message.command)
338-
"${message.command.verb} the following part of my code for me: $codeSelection" else
337+
val prompt = if (EditorContextCommand.GenerateUnitTests == message.command) {
338+
"${message.command.verb} the following part of my code for me: $codeSelection"
339+
} else {
339340
"${message.command} the following part of my code for me: $codeSelection"
341+
}
340342

341343
processPromptActions(prompt, message, triggerId, fileContext)
342344
}

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/controller/chat/userIntent/UserIntentRecognizer.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,5 @@ class UserIntentRecognizer {
4646
OnboardingPageInteractionType.CwcButtonClick -> null
4747
}
4848

49-
private fun isInternalAmazonUser(startUrl: String?): Boolean {
50-
return startUrl == "https://amzn.awsapps.com/start"
51-
}
49+
private fun isInternalAmazonUser(startUrl: String?): Boolean = startUrl == "https://amzn.awsapps.com/start"
5250
}

0 commit comments

Comments
 (0)