1- package com.ashotn.opencode.companion.diff
1+ package com.ashotn.opencode.companion.core
22
33import com.ashotn.opencode.companion.settings.OpenCodeSettings
44import com.intellij.openapi.Disposable
@@ -54,7 +54,7 @@ class EditorDiffRenderer(private val project: Project) : Disposable, FileEditorM
5454 bus.subscribe(FileDocumentManagerListener .TOPIC , object : FileDocumentManagerListener {
5555 override fun fileContentReloaded (file : VirtualFile , document : Document ) {
5656 val filePath = file.path
57- val diffService = OpenCodeDiffService .getInstance(project)
57+ val diffService = OpenCodeCoreService .getInstance(project)
5858 if (! diffService.hasPendingHunks(filePath)) return
5959 ApplicationManager .getApplication().invokeLater {
6060 refreshFile(filePath)
@@ -65,7 +65,7 @@ class EditorDiffRenderer(private val project: Project) : Disposable, FileEditorM
6565
6666 override fun fileOpened (source : FileEditorManager , file : VirtualFile ) {
6767 val filePath = file.path
68- val diffService = OpenCodeDiffService .getInstance(project)
68+ val diffService = OpenCodeCoreService .getInstance(project)
6969 if (diffService.hasPendingHunks(filePath)) {
7070 ApplicationManager .getApplication().invokeLater {
7171 refreshFile(filePath)
@@ -78,7 +78,7 @@ class EditorDiffRenderer(private val project: Project) : Disposable, FileEditorM
7878 if (! OpenCodeSettings .getInstance(project).inlineDiffEnabled) {
7979 clearAll()
8080 } else {
81- val diffService = OpenCodeDiffService .getInstance(project)
81+ val diffService = OpenCodeCoreService .getInstance(project)
8282 diffService.allTrackedFiles().forEach { refreshFile(it) }
8383 }
8484 }
@@ -88,7 +88,7 @@ class EditorDiffRenderer(private val project: Project) : Disposable, FileEditorM
8888
8989 if (! OpenCodeSettings .getInstance(project).inlineDiffEnabled) return
9090
91- val diffService = OpenCodeDiffService .getInstance(project)
91+ val diffService = OpenCodeCoreService .getInstance(project)
9292 val hunks = diffService.getHunks(filePath)
9393 log.debug(" EditorDiffRenderer: refresh file=$filePath pendingHunkCount=${hunks.size} " )
9494 if (hunks.isEmpty()) return
@@ -179,4 +179,4 @@ class EditorDiffRenderer(private val project: Project) : Disposable, FileEditorM
179179 fun getInstance (project : Project ): EditorDiffRenderer =
180180 project.getService(EditorDiffRenderer ::class .java)
181181 }
182- }
182+ }
0 commit comments