feat(tui): add running spinner to bash tool in TUI (#12317)

This commit is contained in:
Goni Zahavy 2026-02-05 20:23:02 +02:00 committed by GitHub
parent e08705f4ef
commit 40ebc34909
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1625,6 +1625,7 @@ function BlockTool(props: {
function Bash(props: ToolProps<typeof BashTool>) {
const { theme } = useTheme()
const sync = useSync()
const isRunning = createMemo(() => props.part.state.status === "running")
const output = createMemo(() => stripAnsi(props.metadata.output?.trim() ?? ""))
const [expanded, setExpanded] = createSignal(false)
const lines = createMemo(() => output().split("\n"))
@ -1665,6 +1666,7 @@ function Bash(props: ToolProps<typeof BashTool>) {
<BlockTool
title={title()}
part={props.part}
spinner={isRunning()}
onClick={overflow() ? () => setExpanded((prev) => !prev) : undefined}
>
<box gap={1}>