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/src/software/aws/toolkits/jetbrains/services/amazonq/startup/AmazonQStartupActivity.kt
Copy file name to clipboardExpand all lines: plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/project/ProjectContextProvider.kt
+14-13Lines changed: 14 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -40,18 +40,17 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
40
40
privateval retryCount =AtomicInteger(0)
41
41
val isIndexComplete =AtomicBoolean(false)
42
42
privateval mapper = jacksonObjectMapper()
43
+
43
44
init {
44
45
cs.launch {
45
-
if (CodeWhispererSettings.getInstance().isProjectContextEnabled()) {
46
-
while (true) {
47
-
if (encoderServer.isNodeProcessRunning()) {
48
-
// TODO: need better solution for this
49
-
delay(10000)
50
-
initAndIndex()
51
-
break
52
-
} else {
53
-
yield()
54
-
}
46
+
while (true) {
47
+
if (encoderServer.isNodeProcessRunning()) {
48
+
// TODO: need better solution for this
49
+
delay(10000)
50
+
initAndIndex()
51
+
break
52
+
} else {
53
+
yield()
55
54
}
56
55
}
57
56
}
@@ -109,9 +108,11 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
109
108
if (isInitSuccess) {
110
109
logger.info { "project context index starting" }
111
110
delay(300)
112
-
val isIndexSuccess = index()
113
-
if (isIndexSuccess) isIndexComplete.set(true)
114
-
return@launch
111
+
if (CodeWhispererSettings.getInstance().isProjectContextEnabled()) {
112
+
val isIndexSuccess = index()
113
+
if (isIndexSuccess) isIndexComplete.set(true)
114
+
return@launch
115
+
}
115
116
}
116
117
} catch (e:Exception) {
117
118
if (e.stackTraceToString().contains("Connection refused")) {
0 commit comments