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/amazonq/workspace/context/ProjectContextProviderTest.kt
Copy file name to clipboardExpand all lines: plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/project/ProjectContextProvider.kt
+16-8Lines changed: 16 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -130,14 +130,18 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
130
130
privatefuninitEncryption(): Boolean {
131
131
val request = encoderServer.getEncryptionRequest()
132
132
val response = sendMsgToLsp(LspMessage.Initialize, request)
133
-
return response.responseCode ==200
133
+
return response?.responseCode ==200
134
134
}
135
135
136
136
funindex(): Boolean {
137
137
val projectRoot = project.basePath ?:returnfalse
138
138
139
139
val indexStartTime =System.currentTimeMillis()
140
140
val filesResult = collectFiles()
141
+
if (filesResult.files.isEmpty()) {
142
+
logger.warn { "No file found in workspace" }
143
+
returnfalse
144
+
}
141
145
var duration = (System.currentTimeMillis() - indexStartTime).toDouble()
0 commit comments