Skip to content

Commit 726430b

Browse files
fix(amazonq): remove findings message from chat when all issues ignored
1 parent 5fd92fd commit 726430b

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "remove findings message from chat even when all issues are ignored"
4+
}

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/webview/BrowserConnector.kt

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -674,22 +674,18 @@ class BrowserConnector(
674674
}
675675
}
676676

677-
if (mappedFindings.isNotEmpty()) {
678-
CodeWhispererCodeScanManager.getInstance(project)
679-
.addOnDemandIssues(
680-
mappedFindings,
681-
scannedFiles,
682-
CodeWhispererConstants.CodeAnalysisScope.AGENTIC
683-
)
684-
CodeWhispererCodeScanManager.getInstance(project).showCodeScanUI()
685-
686-
// Remove findings messages from response payload
687-
val rootNode = serializer.objectMapper.readTree(responsePayload) as ObjectNode
688-
rootNode.remove("additionalMessages")
689-
return serializer.objectMapper.writeValueAsString(rootNode)
690-
}
677+
CodeWhispererCodeScanManager.getInstance(project)
678+
.addOnDemandIssues(
679+
mappedFindings,
680+
scannedFiles,
681+
CodeWhispererConstants.CodeAnalysisScope.AGENTIC
682+
)
683+
CodeWhispererCodeScanManager.getInstance(project).showCodeScanUI()
691684

692-
return responsePayload
685+
// Remove findings messages from response payload
686+
val rootNode = serializer.objectMapper.readTree(responsePayload) as ObjectNode
687+
rootNode.remove("additionalMessages")
688+
return serializer.objectMapper.writeValueAsString(rootNode)
693689
} catch (e: Exception) {
694690
LOG.error(e) { "Failed to parse findings message" }
695691
return responsePayload

0 commit comments

Comments
 (0)