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/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/editor/context/project/ProjectContextProvider.kt
+15-13Lines changed: 15 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -37,22 +37,22 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
37
37
privateval retryCount =AtomicInteger(0)
38
38
val isIndexComplete =AtomicBoolean(false)
39
39
privateval mapper = jacksonObjectMapper()
40
+
40
41
init {
41
42
cs.launch {
42
-
if (CodeWhispererSettings.getInstance().isProjectContextEnabled()) {
43
-
while (true) {
44
-
if (encoderServer.isNodeProcessRunning()) {
45
-
// TODO: need better solution for this
46
-
delay(10000)
47
-
initAndIndex()
48
-
break
49
-
} else {
50
-
yield()
51
-
}
43
+
while (true) {
44
+
if (encoderServer.isNodeProcessRunning()) {
45
+
// TODO: need better solution for this
46
+
delay(10000)
47
+
initAndIndex()
48
+
break
49
+
} else {
50
+
yield()
52
51
}
53
52
}
54
53
}
55
54
}
55
+
56
56
data classIndexRequestPayload(
57
57
valfilePaths:List<String>,
58
58
valprojectRoot:String,
@@ -113,9 +113,11 @@ class ProjectContextProvider(val project: Project, private val encoderServer: En
113
113
if (isInitSuccess) {
114
114
logger.info { "project context index starting" }
115
115
delay(300)
116
-
val isIndexSuccess = index()
117
-
if (isIndexSuccess) isIndexComplete.set(true)
118
-
return@launch
116
+
if (CodeWhispererSettings.getInstance().isProjectContextEnabled()) {
117
+
val isIndexSuccess = index()
118
+
if (isIndexSuccess) isIndexComplete.set(true)
119
+
return@launch
120
+
}
119
121
}
120
122
} catch (e:Exception) {
121
123
if (e.stackTraceToString().contains("Connection refused")) {
0 commit comments