mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tui: fix text wrapping to prevent layout overflow in terminal UI
This commit is contained in:
parent
f2b8a3ada4
commit
754c264ea1
4 changed files with 5 additions and 5 deletions
|
|
@ -222,7 +222,7 @@ function App() {
|
|||
tab
|
||||
</text>
|
||||
<text fg={local.agent.color(local.agent.current().name)}>{""}</text>
|
||||
<text bg={local.agent.color(local.agent.current().name)} fg={Theme.background} wrap={false}>
|
||||
<text bg={local.agent.color(local.agent.current().name)} fg={Theme.background} wrapMode="none">
|
||||
<span style={{ bold: true }}> {local.agent.current().name.toUpperCase()}</span>
|
||||
<span> AGENT </span>
|
||||
</text>
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@ export function Prompt(props: PromptProps) {
|
|||
<box backgroundColor={Theme.backgroundElement} width={1} justifyContent="center" alignItems="center"></box>
|
||||
</box>
|
||||
<box flexDirection="row" justifyContent="space-between">
|
||||
<text flexShrink={0} wrap={false}>
|
||||
<text flexShrink={0} wrapMode="none">
|
||||
<span style={{ fg: Theme.textMuted }}>{local.model.parsed().provider}</span>{" "}
|
||||
<span style={{ bold: true }}>{local.model.parsed().model}</span>
|
||||
</text>
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ export function Header() {
|
|||
<text fg={Theme.textMuted}>{session().share!.url}</text>
|
||||
</Match>
|
||||
<Match when={true}>
|
||||
<text wrap={false}>
|
||||
<text wrapMode="none">
|
||||
/share <span style={{ fg: Theme.textMuted }}>to create a shareable link</span>
|
||||
</text>
|
||||
</Match>
|
||||
</Switch>
|
||||
<Show when={context()}>
|
||||
<text fg={Theme.textMuted} wrap={false}>
|
||||
<text fg={Theme.textMuted} wrapMode="none">
|
||||
{context()} ({cost()})
|
||||
</text>
|
||||
</Show>
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ function Option(props: {
|
|||
fg={props.active ? Theme.background : props.current ? Theme.primary : Theme.text}
|
||||
attributes={props.active ? TextAttributes.BOLD : undefined}
|
||||
overflow="hidden"
|
||||
wrap={false}
|
||||
wrapMode="none"
|
||||
>
|
||||
{Locale.truncate(props.title, 62)}
|
||||
<span style={{ fg: props.active ? Theme.background : Theme.textMuted }}> {props.description}</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue