Просмотр исходного кода

tui: fix dialog select items taking up 2 lines when truncated

Prevents text wrapping in dialog select options by removing wrapMode,
ensuring truncated text stays on single line and maintains proper timestamp visibility
Dax Raad 10 месяцев назад
Родитель
Сommit
e2fbd098d2
1 измененных файлов с 1 добавлено и 2 удалено
  1. 1 2
      packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx

+ 1 - 2
packages/opencode/src/cli/cmd/tui/ui/dialog-select.tsx

@@ -307,10 +307,9 @@ function Option(props: {
         fg={props.active ? fg : props.current ? theme.primary : theme.text}
         fg={props.active ? fg : props.current ? theme.primary : theme.text}
         attributes={props.active ? TextAttributes.BOLD : undefined}
         attributes={props.active ? TextAttributes.BOLD : undefined}
         overflow="hidden"
         overflow="hidden"
-        wrapMode="word"
         paddingLeft={3}
         paddingLeft={3}
       >
       >
-        {Locale.truncate(props.title, 62)}
+        {Locale.truncate(props.title, 61)}
         <Show when={props.description}>
         <Show when={props.description}>
           <span style={{ fg: props.active ? fg : theme.textMuted }}> {props.description}</span>
           <span style={{ fg: props.active ? fg : theme.textMuted }}> {props.description}</span>
         </Show>
         </Show>