Skip to content

Commit 049381f

Browse files
authored
fix(amazonq): auto scan trigger on change events (aws#4526)
1 parent dc5eba9 commit 049381f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/codewhisperer/codescan/listeners/CodeWhispererCodeScanDocumentListener.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ internal class CodeWhispererCodeScanDocumentListener(val project: Project) : Doc
3434
}
3535
scanManager.updateScanNodes(file)
3636

37-
if (editedTextRange.length > 0 && !CodeWhispererExplorerActionManager.getInstance().isMonthlyQuotaForCodeScansExceeded() && !isUserBuilderId(project)) {
37+
if (CodeWhispererExplorerActionManager.getInstance().isAutoEnabledForCodeScan() &&
38+
!CodeWhispererExplorerActionManager.getInstance().isMonthlyQuotaForCodeScansExceeded() &&
39+
!isUserBuilderId(project)
40+
) {
3841
scanManager.createDebouncedRunCodeScan(CodeWhispererConstants.CodeAnalysisScope.FILE)
3942
}
4043
}

0 commit comments

Comments
 (0)