fix(tui): surface provider error in assistant footer (#34511)
This commit is contained in:
@@ -1147,15 +1147,32 @@ function AssistantFooter(props: { message: SessionMessageAssistant }) {
|
|||||||
props.message.time.completed ? props.message.time.completed - props.message.time.created : 0,
|
props.message.time.completed ? props.message.time.completed - props.message.time.created : 0,
|
||||||
)
|
)
|
||||||
return (
|
return (
|
||||||
<box paddingLeft={3}>
|
<>
|
||||||
|
<Show when={props.message.error}>
|
||||||
|
<box
|
||||||
|
border={["left"]}
|
||||||
|
paddingTop={1}
|
||||||
|
paddingBottom={1}
|
||||||
|
paddingLeft={2}
|
||||||
|
backgroundColor={theme.backgroundPanel}
|
||||||
|
customBorderChars={SplitBorder.customBorderChars}
|
||||||
|
borderColor={theme.error}
|
||||||
|
>
|
||||||
|
<text fg={theme.textMuted}>{errorMessage(props.message.error)}</text>
|
||||||
|
</box>
|
||||||
|
</Show>
|
||||||
|
<box paddingLeft={3} marginTop={props.message.error ? 1 : 0}>
|
||||||
<text>
|
<text>
|
||||||
<span style={{ fg: local.agent.color(props.message.agent) }}>{Locale.titlecase(props.message.agent)}</span>
|
<span style={{ fg: props.message.error ? theme.textMuted : local.agent.color(props.message.agent) }}>
|
||||||
|
{Locale.titlecase(props.message.agent)}
|
||||||
|
</span>
|
||||||
<span style={{ fg: theme.textMuted }}> · {model()}</span>
|
<span style={{ fg: theme.textMuted }}> · {model()}</span>
|
||||||
<Show when={duration()}>
|
<Show when={duration()}>
|
||||||
<span style={{ fg: theme.textMuted }}> · {Locale.duration(duration())}</span>
|
<span style={{ fg: theme.textMuted }}> · {Locale.duration(duration())}</span>
|
||||||
</Show>
|
</Show>
|
||||||
</text>
|
</text>
|
||||||
</box>
|
</box>
|
||||||
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user