Skip to content

Commit 2641472

Browse files
Merge branch 'feature/q-lsp' into lodogga/initialChanges
2 parents 973b710 + b403d8a commit 2641472

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/CodeWhispererConstants.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ object CodeWhispererConstants {
8181
const val FILE_SCAN_PAYLOAD_SIZE_LIMIT_IN_BYTES: Long = 1024 * 200 // 200KB
8282
const val AUTO_SCAN_DEBOUNCE_DELAY_IN_SECONDS: Long = 30
8383
const val CODE_FIX_CREATE_PAYLOAD_TIMEOUT_IN_SECONDS: Long = 10
84-
const val CODE_FIX_POLLING_INTERVAL_IN_SECONDS: Long = 1
85-
const val CODE_FIX_TIMEOUT_IN_SECONDS: Long = 60 // 60 seconds
84+
const val CODE_FIX_POLLING_INTERVAL_IN_SECONDS: Long = 5
85+
const val CODE_FIX_TIMEOUT_IN_SECONDS: Long = 120 // 120 seconds
8686
const val TOTAL_BYTES_IN_KB = 1024
8787
const val TOTAL_BYTES_IN_MB = 1024 * 1024
8888
const val TOTAL_MILLIS_IN_SECOND = 1000

plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/util/GitIgnoreFilteringUtil.kt

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ class GitIgnoreFilteringUtil(
5656
"*.a",
5757
"*.map",
5858
"*.graph",
59-
"*.so"
59+
"*.so",
60+
"*.csv",
61+
"*.dylib",
62+
"*.parquet",
63+
"*.xlsx"
6064
)
6165
)
6266
}
@@ -101,6 +105,18 @@ class GitIgnoreFilteringUtil(
101105

102106
suspend fun ignoreFile(file: VirtualFile): Boolean {
103107
// this method reads like something a JS dev would write and doesn't do what the author thinks
108+
109+
// ignores no extension files for test generation use case.
110+
val allowedNoExtFiles = setOf("Config", "Dockerfile", "README")
111+
if (useCase == CodeWhispererConstants.FeatureName.TEST_GENERATION &&
112+
!file.isDirectory &&
113+
file.extension.isNullOrEmpty() &&
114+
!allowedNoExtFiles.any {
115+
it.equals(file.name, ignoreCase = true)
116+
}
117+
) {
118+
return true
119+
}
104120
val deferredResults = ignorePatternsWithGitIgnore.map { pattern ->
105121
withContext(coroutineContext) {
106122
// avoid partial match (pattern.containsMatchIn) since it causes us matching files

0 commit comments

Comments
 (0)