handle file changes on jetbrains
This commit is contained in:
parent
963fe50f2d
commit
3444d9276a
1 changed files with 13 additions and 0 deletions
|
|
@ -147,6 +147,19 @@ class ContinuePluginStartupActivity : StartupActivity, Disposable, DumbAware {
|
|||
}
|
||||
})
|
||||
|
||||
// Handle file changes and deletions - reindex
|
||||
connection.subscribe(VirtualFileManager.VFS_CHANGES, object : VirtualFileListener {
|
||||
override fun fileDeleted(event: VirtualFileEvent) {
|
||||
val data = mapOf("dirs" to listOf(event.filePath))
|
||||
continuePluginService.coreMessenger?.request("index/forceReIndex", data, null) { _ -> }
|
||||
}
|
||||
|
||||
override fun contentsChanged(event: VirtualFileEvent) {
|
||||
val data = mapOf("dirs" to listOf(event.filePath))
|
||||
continuePluginService.coreMessenger?.request("index/forceReIndex", data, null) { _ -> }
|
||||
}
|
||||
})
|
||||
|
||||
// Listen for clicking settings button to start the auth flow
|
||||
val authService = service<ContinueAuthService>()
|
||||
val initialSessionInfo = authService.loadControlPlaneSessionInfo()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue