fix(tui): expand MCP server errors in dialog (#35243)
This commit is contained in:
parent
7bd3f8ac83
commit
b04d8d53e6
6 changed files with 92 additions and 37 deletions
|
|
@ -59,6 +59,8 @@ export interface DialogSelectOption<T = any> {
|
|||
value: T
|
||||
description?: string
|
||||
details?: string[]
|
||||
detailsColor?: RGBA
|
||||
detailsWrap?: boolean
|
||||
footer?: JSX.Element | string
|
||||
titleWidth?: number
|
||||
truncateTitle?: boolean | "left"
|
||||
|
|
@ -697,8 +699,13 @@ export function DialogSelect<T>(props: DialogSelectProps<T>) {
|
|||
<For each={option.details}>
|
||||
{(detail) => (
|
||||
<box paddingLeft={3} paddingRight={3}>
|
||||
<text fg={theme.textMuted} wrapMode="none">
|
||||
{Locale.truncateMiddle(detail, Math.max(1, Math.min(76, dimensions().width - 12)))}
|
||||
<text
|
||||
fg={option.detailsColor ?? theme.textMuted}
|
||||
wrapMode={option.detailsWrap ? "word" : "none"}
|
||||
>
|
||||
{option.detailsWrap
|
||||
? detail
|
||||
: Locale.truncateMiddle(detail, Math.max(1, Math.min(76, dimensions().width - 12)))}
|
||||
</text>
|
||||
</box>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue