File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "type" : " bugfix" ,
3+ "description" : " Fixed an issue where Q inline won't appear in JetBrains remote 2024.2+"
4+ }
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ import software.aws.toolkits.core.utils.debug
4646import software.aws.toolkits.core.utils.getLogger
4747import software.aws.toolkits.core.utils.info
4848import software.aws.toolkits.core.utils.warn
49+ import software.aws.toolkits.jetbrains.core.coroutines.EDT
4950import software.aws.toolkits.jetbrains.core.coroutines.disposableCoroutineScope
5051import software.aws.toolkits.jetbrains.core.coroutines.getCoroutineBgContext
5152import software.aws.toolkits.jetbrains.core.coroutines.projectCoroutineScope
@@ -206,9 +207,12 @@ class CodeWhispererService(private val cs: CoroutineScope) : Disposable {
206207 invokeCodeWhispererInBackground(requestContext)
207208 }
208209
209- internal fun invokeCodeWhispererInBackground (requestContext : RequestContext ): Job {
210- val popup = CodeWhispererPopupManager .getInstance().initPopup()
211- Disposer .register(popup) { CodeWhispererInvocationStatus .getInstance().finishInvocation() }
210+ internal suspend fun invokeCodeWhispererInBackground (requestContext : RequestContext ): Job {
211+ val popup = withContext(EDT ) {
212+ CodeWhispererPopupManager .getInstance().initPopup().also {
213+ Disposer .register(it) { CodeWhispererInvocationStatus .getInstance().finishInvocation() }
214+ }
215+ }
212216
213217 val workerContexts = mutableListOf<WorkerContext >()
214218 // When popup is disposed we will cancel this coroutine. The only places popup can get disposed should be
You can’t perform that action at this time.
0 commit comments