fix: remove clashing coroutines deps

This commit is contained in:
carlrobertoh@gmail.com 2025-02-10 17:34:16 +00:00
parent a487eb0483
commit c25ad6ee38
3 changed files with 12 additions and 9 deletions

View file

@ -65,8 +65,6 @@ dependencies {
implementation(kotlin("stdlib"))
implementation(kotlin("reflect"))
implementation(libs.jsoup)
implementation(libs.kotlinx.coroutines.swing)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.commons.text)
implementation(libs.jtokkit)
testImplementation(kotlin("test"))

View file

@ -15,7 +15,6 @@ kotlin = "2.0.0"
llm-client = "0.8.35"
okio = "3.9.0"
tree-sitter = "0.24.4"
coroutines = "1.7.3"
[libraries]
analytics = { module = "com.rudderstack.sdk.java.analytics:analytics", version.ref = "analytics" }
@ -32,8 +31,6 @@ kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", v
llm-client = { module = "ee.carlrobert:llm-client", version.ref = "llm-client" }
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
tree-sitter = { module = "io.github.bonede:tree-sitter", version.ref = "tree-sitter" }
kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }

View file

@ -1,21 +1,29 @@
package ee.carlrobert.codegpt.settings.service.custom
import com.intellij.openapi.application.runInEdt
import com.intellij.openapi.components.service
import com.intellij.openapi.options.Configurable
import ee.carlrobert.codegpt.settings.service.custom.form.CustomServiceListForm
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
import kotlinx.coroutines.cancel
import kotlinx.coroutines.swing.Swing
import javax.swing.JComponent
import kotlin.coroutines.CoroutineContext
object SwingDispatcher : CoroutineDispatcher() {
override fun dispatch(context: CoroutineContext, block: Runnable) {
runInEdt {
block.run()
}
}
}
class CustomServiceConfigurable : Configurable {
private val coroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Swing.immediate)
private val coroutineScope = CoroutineScope(SupervisorJob() + SwingDispatcher)
private lateinit var component: CustomServiceListForm
override fun getDisplayName(): String {
return "CodeGPT: Custom Service"
}