fix(jetbrains): improve prompt picker interactions

This commit is contained in:
kirillk
2026-07-04 12:07:00 -04:00
parent 6469e9c196
commit 30407a3e12
3 changed files with 8 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@kilocode/kilo-jetbrains": patch
---
Fix JetBrains prompt pickers so reasoning effort opens above the button and expanded model details still allow one-click model selection.
@@ -6,6 +6,7 @@ import com.intellij.icons.AllIcons
import com.intellij.openapi.ui.popup.JBPopupFactory
import com.intellij.openapi.ui.popup.ListPopup
import com.intellij.openapi.ui.popup.PopupStep
import com.intellij.openapi.ui.popup.PopupShowOptions
import com.intellij.openapi.ui.popup.util.BaseListPopupStep
import com.intellij.util.ui.EmptyIcon
import java.awt.Cursor
@@ -17,7 +18,7 @@ import javax.swing.Icon
* Clickable label-style dropdown picker with a native filled background.
*
* Shows the selected item's display text with a down-arrow. On click,
* opens a list popup below the picker. Disabled (greyed out, not
* opens a list popup above the picker. Disabled (greyed out, not
* clickable) when no items are loaded.
*/
class ReasoningPicker : PickerButton() {
@@ -100,7 +101,7 @@ class ReasoningPicker : PickerButton() {
}
val popup: ListPopup = JBPopupFactory.getInstance().createListPopup(step)
popup.showUnderneathOf(this)
popup.show(PopupShowOptions.aboveComponent(this))
}
private fun icon(item: Item): Icon = if (item.id == selected?.id) checked else empty
@@ -379,11 +379,6 @@ class ModelPicker : PickerButton() {
e.consume()
return
}
if (expanded && e.clickCount < 2) {
list.selectedIndex = row
syncDetails()
return
}
activate(value)
}
})