Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
}
}

private fun sendMessageAppToUi(message: AmazonQMessage, tabType: String) {

Check warning on line 79 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/toolwindow/AmazonQToolWindow.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Unused symbol

Function "sendMessageAppToUi" is never used
appConnections.filter { it.app.tabTypes.contains(tabType) }.forEach {
scope.launch {
it.messagesFromAppToUi.publish(message)
Expand Down Expand Up @@ -155,18 +155,20 @@
}

fun getStarted(project: Project) {
// Make sure the window is shown
showChatWindow(project)

// Send the interaction message
val window = getInstance(project)
window.sendMessage(OnboardingPageInteraction(OnboardingPageInteractionType.CwcButtonClick), "cwc")
openTab(project, OnboardingPageInteraction(OnboardingPageInteractionType.CwcButtonClick), "cwc")
}

fun openScanTab(project: Project) {
openTab(project, runCodeScanMessage, "codescan")
}

private fun openTab(project: Project, message: AmazonQMessage, tabType: String) {
// Make sure the window is shown
showChatWindow(project)

// Send the interaction message
val window = getInstance(project)
window.sendMessageAppToUi(runCodeScanMessage, tabType = "codescan")
window.sendMessage(message, tabType)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ fun buildClearPromptProgressMessage(tabId: String) = PromptProgressMessage(
tabId = tabId
)

val runCodeScanMessage = CodeScanChatMessage(messageType = ChatMessageType.Prompt, command = "review", tabId = UUID.randomUUID().toString())
val runCodeScanMessage
get() = CodeScanChatMessage(messageType = ChatMessageType.Prompt, command = "review", tabId = UUID.randomUUID().toString())

val cancelFileScanButton = Button(
id = CodeScanButtonId.StopFileScan.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class AmazonQCodeFixSession(val project: Project) {
val createCodeFixResponse = createCodeFixJob(
sourceZipUploadResponse.uploadId(),
issueRange,
issue.description.toString(),
issue.recommendation.text,
codeFixName,
issue.ruleId
)
Expand Down
Loading