mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-08 18:40:29 +00:00
feat(tui): add running spinner to bash tool in TUI (#12317)
This commit is contained in:
parent
e08705f4ef
commit
40ebc34909
1 changed files with 2 additions and 0 deletions
|
|
@ -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}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue