mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-24 16:02:55 +08:00
Merge branch 'main' into rapid-empress
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
---
|
||||
"@kilocode/kilo-jetbrains": patch
|
||||
---
|
||||
|
||||
Show file names before their containing folders in JetBrains `@file` suggestions.
|
||||
+1
-1
@@ -252,7 +252,7 @@ class KiloPromptCompletionProvider(
|
||||
PrioritizedLookupElement.withGrouping(PrioritizedLookupElement.withPriority(element, 100.0), 100)
|
||||
|
||||
private fun file(file: WorkspaceFileDto): LookupElement = LookupElementBuilder.create(file.path)
|
||||
.withPresentableText("@${file.name}")
|
||||
.withPresentableText("@${file.path}")
|
||||
.withTailText(parent(file.path), true)
|
||||
.withIcon(icon(file))
|
||||
.withLookupString(file.name)
|
||||
|
||||
-10
@@ -211,16 +211,6 @@ class KiloPromptCompletionProviderTest : BasePlatformTestCase() {
|
||||
assertSame(AllIcons.Nodes.Folder, icon("src"))
|
||||
}
|
||||
|
||||
fun `test mention completion renders filename before parent path`() {
|
||||
rpc.searchResult = FileSearchResultDto(files = listOf(file("src/foo/Bar.kt")))
|
||||
|
||||
complete("@bar<caret>")
|
||||
|
||||
val view = LookupElementPresentation().also { item("src/foo/Bar.kt").renderElement(it) }
|
||||
assertEquals("@Bar.kt", view.itemText)
|
||||
assertEquals(" src/foo", view.tailText)
|
||||
}
|
||||
|
||||
fun `test highlights known slash command at start`() {
|
||||
assertEquals(
|
||||
listOf(KiloPromptCompletionProvider.Highlight(0, 4, KiloPromptCompletionProvider.HighlightKind.COMMAND)),
|
||||
|
||||
Reference in New Issue
Block a user