We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef602ee commit 69d01b5Copy full SHA for 69d01b5
core/src/main/kotlin/cc/unitmesh/devti/gui/chat/ui/file/FilePresentation.kt
@@ -31,13 +31,16 @@ data class FilePresentation(
31
)
32
}
33
34
- private fun getPresentablePath(project: Project, file: VirtualFile): String =
35
- project.basePath?.let { basePath ->
+ private fun getPresentablePath(project: Project, file: VirtualFile): String {
+ val path = project.basePath?.let { basePath ->
36
when (file.parent?.path) {
37
basePath -> file.name
38
else -> file.path.removePrefix(basePath)
39
40
} ?: file.path
41
+
42
+ return path.removePrefix("/")
43
+ }
44
45
46
fun relativePath(project: Project): String {
0 commit comments