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
@@ -38,18 +38,17 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
38
38
privateval retryCount =AtomicInteger(0)
39
39
val isIndexComplete =AtomicBoolean(false)
40
40
privateval mapper = jacksonObjectMapper()
41
+
41
42
init {
42
43
cs.launch {
43
-
if (CodeWhispererSettings.getInstance().isProjectContextEnabled()) {
44
-
while (true) {
45
-
if (encoderServer.isNodeProcessRunning()) {
46
-
// TODO: need better solution for this
47
-
delay(10000)
48
-
initAndIndex()
49
-
break
50
-
} else {
51
-
yield()
52
-
}
44
+
while (true) {
45
+
if (encoderServer.isNodeProcessRunning()) {
46
+
// TODO: need better solution for this
47
+
delay(10000)
48
+
initAndIndex()
49
+
break
50
+
} else {
51
+
yield()
53
52
}
54
53
}
55
54
}
@@ -101,9 +100,11 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
101
100
if (isInitSuccess) {
102
101
logger.info { "project context index starting" }
103
102
delay(300)
104
-
val isIndexSuccess = index()
105
-
if (isIndexSuccess) isIndexComplete.set(true)
106
-
return@launch
103
+
if (CodeWhispererSettings.getInstance().isProjectContextEnabled()) {
104
+
val isIndexSuccess = index()
105
+
if (isIndexSuccess) isIndexComplete.set(true)
106
+
return@launch
107
+
}
107
108
}
108
109
} catch (e:Exception) {
109
110
if (e.stackTraceToString().contains("Connection refused")) {
0 commit comments