Update ContinuePluginToolWindowFactory.kt

This commit is contained in:
Patrick Erichsen 2025-04-08 17:19:24 -07:00
parent b601c22d01
commit a02012da32

View file

@ -11,7 +11,7 @@ import com.intellij.openapi.wm.ToolWindowFactory
import com.intellij.ui.content.ContentFactory
import javax.swing.*
const val JS_QUERY_POOL_SIZE = 200
const val JS_QUERY_POOL_SIZE = "200"
class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware {
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
@ -43,6 +43,11 @@ class ContinuePluginToolWindowFactory : ToolWindowFactory, DumbAware {
class ContinuePluginWindow(project: Project) {
private val defaultGUIUrl = "http://continue/index.html"
init {
System.setProperty("ide.browser.jcef.jsQueryPoolSize", JS_QUERY_POOL_SIZE)
System.setProperty("ide.browser.jcef.contextMenu.devTools.enabled", "true")
}
val browser: ContinueBrowser by lazy {
val url = System.getenv("GUI_URL")?.toString() ?: defaultGUIUrl