You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/amazonq/chat/jetbrains-community/tst/software/aws/toolkits/jetbrains/services/amazonqFeatureDev/FeatureDevSessionContextTest.kt
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -161,4 +161,49 @@ class FeatureDevSessionContextTest : FeatureDevTestBase(HeavyJavaCodeInsightTest
161
161
162
162
assertEquals(zippedFiles, expectedFiles)
163
163
}
164
+
165
+
@Test
166
+
funtestConvertGitIgnorePatternToRegex() {
167
+
val sampleGitIgnorePatterns =listOf(".*", "build/", "*.txt", "*.png")
168
+
val sampleFileNames =listOf(
169
+
".gitignore/",
170
+
".env/",
171
+
"file.txt/",
172
+
".git/config/",
173
+
"src/file.txt/",
174
+
"build/",
175
+
"build/output.jar/",
176
+
"builds/",
177
+
"mybuild/",
178
+
"build.json/",
179
+
"log.txt/",
180
+
"file.txt.json/",
181
+
"file.png/",
182
+
"src/file.png/"
183
+
)
184
+
185
+
val patterns = sampleGitIgnorePatterns.map { pattern -> featureDevSessionContext.convertGitIgnorePatternToRegex(pattern).toRegex() }
186
+
187
+
val matchedFiles = sampleFileNames.filter { fileName ->
Copy file name to clipboardExpand all lines: plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/project/ProjectContextProvider.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -314,7 +314,7 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
314
314
logger.info { "sending message: ${msgType.endpoint} to lsp on port ${encoderServer.port}" }
315
315
val url =URL("http://localhost:${encoderServer.port}/${msgType.endpoint}")
316
316
if (!encoderServer.isNodeProcessRunning()) {
317
-
logger.warn { "language server is not running" }
317
+
logger.warn { "language server for ${project.name}is not running" }
318
318
returnnull
319
319
}
320
320
// use 1h as timeout for index, 5 seconds for other APIs
Copy file name to clipboardExpand all lines: plugins/core/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/FeatureDevSessionContext.kt
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -279,10 +279,17 @@ class FeatureDevSessionContext(val project: Project, val maxProjectSizeBytes: Lo
279
279
}
280
280
281
281
// gitignore patterns are not regex, method update needed.
0 commit comments