Skip to content

The open source coding agent.

TypeScript

fix(opencode): command palette mouse hover highlights wrong item (#7721)

Kit Langtona457828a6754
diff --git a/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx b/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx
index f2f2927c000..c5d36826c2c 100644
--- a/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx
+++ b/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx
@@ -255,7 +255,7 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
props.onSelect?.(option)
}}
onMouseOver={() => {
- const index = filtered().findIndex((x) => isDeepEqual(x.value, option.value))
+ const index = flat().findIndex((x) => isDeepEqual(x.value, option.value))
if (index === -1) return
moveTo(index)
}}