fix(tui): stop bash spinner when tool errors before command received
This commit is contained in:
parent
b6553d14e1
commit
f43f066741
1 changed files with 10 additions and 1 deletions
|
|
@ -1870,7 +1870,16 @@ function Shell(props: ToolProps) {
|
||||||
return (
|
return (
|
||||||
<BlockTool part={props.part} onClick={collapsed().overflow ? () => setExpanded((prev) => !prev) : undefined}>
|
<BlockTool part={props.part} onClick={collapsed().overflow ? () => setExpanded((prev) => !prev) : undefined}>
|
||||||
<box gap={1}>
|
<box gap={1}>
|
||||||
<Show when={command()} fallback={<Spinner color={color()}>Writing command...</Spinner>}>
|
<Show
|
||||||
|
when={command()}
|
||||||
|
fallback={
|
||||||
|
isRunning() || props.part.state.status === "pending" ? (
|
||||||
|
<Spinner color={color()}>Writing command...</Spinner>
|
||||||
|
) : (
|
||||||
|
<text fg={theme.textMuted}>Writing command...</text>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
>
|
||||||
<Show
|
<Show
|
||||||
when={isRunning()}
|
when={isRunning()}
|
||||||
fallback={
|
fallback={
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue