remove unecessary pooled thread execution

This commit is contained in:
Nate 2024-09-21 21:55:40 -07:00
parent 6e5d07e86a
commit eb6f2751b9
2 changed files with 4 additions and 10 deletions

View file

@ -30,7 +30,7 @@ import com.intellij.openapi.components.service
import com.intellij.openapi.module.ModuleManager
import com.intellij.openapi.roots.ModuleRootManager
suspend fun showTutorial(project: Project) {
fun showTutorial(project: Project) {
ContinuePluginStartupActivity::class.java.getClassLoader().getResourceAsStream("continue_tutorial.py").use { `is` ->
if (`is` == null) {
throw IOException("Resource not found: continue_tutorial.py")
@ -40,9 +40,7 @@ suspend fun showTutorial(project: Project) {
content = content.replace("⌘", "⌃")
}
val filepath = Paths.get(getContinueGlobalPath(), "continue_tutorial.py").toString()
withContext(Dispatchers.IO) {
File(filepath).writeText(content)
}
File(filepath).writeText(content)
File(filepath).writeText(content)
val virtualFile = LocalFileSystem.getInstance().findFileByPath(filepath)
@ -78,9 +76,7 @@ class ContinuePluginStartupActivity : StartupActivity, Disposable, DumbAware {
// }
// )
ApplicationManager.getApplication().executeOnPooledThread {
initializePlugin(project)
}
initializePlugin(project)
}
private fun getPlatformSpecificKeyStroke(key: String): String {

View file

@ -169,9 +169,7 @@ class ContinueBrowser(val project: Project, url: String, useOsr: Boolean = false
),"#00ff0022")
}
"showTutorial" -> {
coroutineScope.launch {
showTutorial(project)
}
showTutorial(project)
}
"showVirtualFile" -> {
val data = data.asJsonObject