mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-29 03:44:06 +08:00
fix(jetbrains): improve prompt picker interactions
This commit is contained in:
@@ -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.
|
||||
+3
-2
@@ -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
|
||||
|
||||
-5
@@ -379,11 +379,6 @@ class ModelPicker : PickerButton() {
|
||||
e.consume()
|
||||
return
|
||||
}
|
||||
if (expanded && e.clickCount < 2) {
|
||||
list.selectedIndex = row
|
||||
syncDetails()
|
||||
return
|
||||
}
|
||||
activate(value)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user