revert original workspaceDirectories and getWorkspaceDirs
This commit is contained in:
parent
a2c86bf555
commit
cfee705b60
1 changed files with 13 additions and 9 deletions
|
|
@ -148,17 +148,11 @@ class IntelliJIDE(
|
|||
}
|
||||
|
||||
override suspend fun getWorkspaceDirs(): List<String> {
|
||||
val dirs = this.continuePluginService.workspacePaths
|
||||
|
||||
if (dirs?.isNotEmpty() == true) {
|
||||
return dirs
|
||||
}
|
||||
|
||||
return listOfNotNull(project.guessProjectDir()?.toUriOrNull()).toTypedArray()
|
||||
return workspaceDirectories().toList()
|
||||
}
|
||||
|
||||
override suspend fun getWorkspaceConfigs(): List<ContinueRcJson> {
|
||||
val workspaceDirs = gitService.workspaceDirectories()
|
||||
val workspaceDirs = this.getWorkspaceDirs()
|
||||
|
||||
val configs = mutableListOf<String>()
|
||||
|
||||
|
|
@ -407,7 +401,7 @@ class IntelliJIDE(
|
|||
}
|
||||
|
||||
override suspend fun getTags(artifactId: String): List<IndexTag> {
|
||||
val workspaceDirs = gitService.workspaceDirectories()
|
||||
val workspaceDirs = this.getWorkspaceDirs()
|
||||
|
||||
// Collect branches concurrently using Kotlin coroutines
|
||||
val branches = withContext(Dispatchers.IO) {
|
||||
|
|
@ -541,4 +535,14 @@ class IntelliJIDE(
|
|||
}
|
||||
}
|
||||
|
||||
private fun workspaceDirectories(): Array<String> {
|
||||
val dirs = this.continuePluginService.workspacePaths
|
||||
|
||||
if (dirs?.isNotEmpty() == true) {
|
||||
return dirs
|
||||
}
|
||||
|
||||
return listOfNotNull(project.guessProjectDir()?.toUriOrNull()).toTypedArray()
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue