merge
This commit is contained in:
commit
bb5f7afd2c
3 changed files with 5 additions and 12 deletions
|
|
@ -173,7 +173,7 @@ class ContinuePluginStartupActivity : StartupActivity, DumbAware {
|
|||
// Collect all relevant URIs for content changes
|
||||
val changedURIs = events.filterIsInstance<VFileContentChangeEvent>()
|
||||
.map { event -> event.file.url }
|
||||
|
||||
|
||||
// Send "files/changed" message if there are any content changes
|
||||
if (changedURIs.isNotEmpty()) {
|
||||
val data = mapOf("files" to changedURIs)
|
||||
|
|
@ -220,12 +220,10 @@ class ContinuePluginStartupActivity : StartupActivity, DumbAware {
|
|||
// Reload the WebView
|
||||
continuePluginService?.let { pluginService ->
|
||||
val allModulePaths = ModuleManager.getInstance(project).modules
|
||||
.flatMap { module -> ModuleRootManager.getInstance(module).contentRoots.map { it.path } }
|
||||
.map { Paths.get(it).normalize() }
|
||||
.flatMap { module -> ModuleRootManager.getInstance(module).contentRoots.map { it.url } }
|
||||
|
||||
val topLevelModulePaths = allModulePaths
|
||||
.filter { modulePath -> allModulePaths.none { it != modulePath && modulePath.startsWith(it) } }
|
||||
.map { it.toString() }
|
||||
|
||||
pluginService.workspacePaths = topLevelModulePaths.toTypedArray()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import com.github.continuedev.continueintellijextension.*
|
||||
import com.github.continuedev.continueintellijextension.constants.getContinueGlobalPath
|
||||
import com.github.continuedev.continueintellijextension.`continue`.DiffManager
|
||||
import com.github.continuedev.continueintellijextension.services.ContinueExtensionSettings
|
||||
import com.github.continuedev.continueintellijextension.services.ContinuePluginService
|
||||
import com.github.continuedev.continueintellijextension.utils.OS
|
||||
|
|
@ -178,16 +177,14 @@ class IntelliJIDE(
|
|||
val configs = mutableListOf<String>()
|
||||
|
||||
for (workspaceDir in workspaceDirs) {
|
||||
val workspacePath = File(workspaceDir)
|
||||
val dir = VirtualFileManager.getInstance().findFileByUrl("file://$workspacePath")
|
||||
val dir = VirtualFileManager.getInstance().findFileByUrl(workspaceDir)
|
||||
if (dir != null) {
|
||||
val contents = dir.children.map { it.name }
|
||||
val contents = dir.children.map { it.url }
|
||||
|
||||
// Find any .continuerc.json files
|
||||
for (file in contents) {
|
||||
if (file.endsWith(".continuerc.json")) {
|
||||
val filePath = workspacePath.resolve(file)
|
||||
val fileContent = File(filePath.toString()).readText()
|
||||
val fileContent = File(URI(file)).readText()
|
||||
configs.add(fileContent)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,8 +115,6 @@ interface IDE {
|
|||
|
||||
suspend fun getAvailableThreads(): List<Thread>
|
||||
|
||||
suspend fun listFolders(): List<String>
|
||||
|
||||
suspend fun getWorkspaceDirs(): List<String>
|
||||
|
||||
suspend fun getWorkspaceConfigs(): List<ContinueRcJson>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue