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 8be0ac1039..464615e486 100644 --- a/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx +++ b/packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx @@ -354,7 +354,7 @@ export function DialogSelect(props: DialogSelectProps) { const right = createMemo(() => visibleActions().filter((item) => item.side === "right")) return ( - + @@ -391,106 +391,108 @@ export function DialogSelect(props: DialogSelectProps) { - 0} - fallback={ - - No results found - - } - > - (scroll = r)} - maxHeight={height()} + + 0} + fallback={ + + No results found + + } > - - {([category, options], index) => ( - <> - - 0 ? 1 : 0} paddingLeft={3}> - - {category} - - } - > - {options[0]?.categoryView} - - - - - {(option) => { - const active = createMemo(() => isDeepEqual(option.value, selected()?.value)) - const current = createMemo(() => isDeepEqual(option.value, props.current)) - return ( - { - setStore("input", "mouse") - }} - onMouseUp={() => { - option.onSelect?.(dialog) - props.onSelect?.(option) - }} - onMouseOver={() => { - if (store.input !== "mouse") return - const index = flat().findIndex((x) => isDeepEqual(x.value, option.value)) - if (index === -1) return - moveTo(index) - }} - onMouseDown={() => { - const index = flat().findIndex((x) => isDeepEqual(x.value, option.value)) - if (index === -1) return - moveTo(index) - }} + (scroll = r)} + maxHeight={height()} + > + + {([category, options], index) => ( + <> + + 0 ? 1 : 0} paddingLeft={3}> + + {category} + + } > + {options[0]?.categoryView} + + + + + {(option) => { + const active = createMemo(() => isDeepEqual(option.value, selected()?.value)) + const current = createMemo(() => isDeepEqual(option.value, props.current)) + return ( { + setStore("input", "mouse") + }} + onMouseUp={() => { + option.onSelect?.(dialog) + props.onSelect?.(option) + }} + onMouseOver={() => { + if (store.input !== "mouse") return + const index = flat().findIndex((x) => isDeepEqual(x.value, option.value)) + if (index === -1) return + moveTo(index) + }} + onMouseDown={() => { + const index = flat().findIndex((x) => isDeepEqual(x.value, option.value)) + if (index === -1) return + moveTo(index) + }} > - - - {option.margin} - - - - - {(detail) => ( - - - {Locale.truncateMiddle(detail, Math.max(1, Math.min(76, dimensions().width - 12)))} - - - )} - - - ) - }} - - - )} - - - + ) + }} + + + )} + + + + }>