Skip to content

Commit 395495f

Browse files
authored
Make the listCustomizations method caller force to be in BGT (#3958)
The caller (Black Caiman) is calling this method from EDT, where an API call could happen that needs to be in BGT. Enforce this on CW side while fixing this on BC side.
1 parent 374c0cc commit 395495f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jetbrains-core/src/software/aws/toolkits/jetbrains/services/codewhisperer/customization/CodeWhispererModelConfigurator.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import com.intellij.openapi.components.State
1515
import com.intellij.openapi.components.Storage
1616
import com.intellij.openapi.components.service
1717
import com.intellij.openapi.project.Project
18+
import com.intellij.util.concurrency.annotations.RequiresBackgroundThread
1819
import com.intellij.util.xmlb.annotations.MapAnnotation
1920
import com.intellij.util.xmlb.annotations.Property
2021
import software.amazon.awssdk.services.codewhispererruntime.model.CodeWhispererRuntimeException
@@ -113,6 +114,7 @@ class DefaultCodeWhispererModelConfigurator : CodeWhispererModelConfigurator, Pe
113114
}
114115
}
115116

117+
@RequiresBackgroundThread
116118
override fun listCustomizations(project: Project, passive: Boolean): List<CustomizationUiItem>? =
117119
calculateIfIamIdentityCenterConnection(project) {
118120
// 1. invoke API and get result

0 commit comments

Comments
 (0)