Skip to content

Commit 76d638d

Browse files
committed
refactor(vcs): update for prompting msg
1 parent 78fcce7 commit 76d638d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/main/kotlin/cc/unitmesh/devti/actions/vcs/CommitMessageSuggestionAction.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import com.intellij.openapi.components.service
1414
import com.intellij.openapi.diagnostic.logger
1515
import com.intellij.openapi.vcs.VcsDataKeys
1616
import com.intellij.openapi.vcs.changes.Change
17+
import com.intellij.openapi.vcs.changes.ChangeListManager
1718
import com.intellij.openapi.vcs.ui.CommitMessage
1819
import kotlinx.coroutines.runBlocking
1920
import kotlinx.coroutines.flow.*

src/main/kotlin/cc/unitmesh/devti/vcs/VcsPrompting.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,11 @@ class VcsPrompting(private val project: Project) {
4747
it.changes
4848
}
4949

50-
val context = project.service<DiffSimplifier>().simplify(changes, defaultIgnoreFilePatterns)
51-
return context
50+
return prepareContext(changes)
51+
}
52+
53+
fun prepareContext(changes: List<Change>): String {
54+
return project.service<DiffSimplifier>().simplify(changes, defaultIgnoreFilePatterns)
5255
}
5356

5457
/**

0 commit comments

Comments
 (0)