Compare commits

...

1 Commits

Author SHA1 Message Date
Kit Langton d5f10eb176 feat(tui): show failed shell exit code 2026-08-13 17:51:28 +00:00
@@ -2799,6 +2799,10 @@ function Shell(props: ToolProps) {
const isRunning = createMemo(() => props.part.state.status === "running" || backgroundRunning())
const command = createMemo(() => stringValue(props.input.command))
const workdir = createMemo(() => pathFormatter.format(stringValue(props.input.workdir)))
const failedExit = createMemo(() => {
const exit = finiteNumber(props.metadata.exit)
return exit !== undefined && exit !== 0 ? exit : undefined
})
const [expanded, setExpanded] = createSignal(false)
const [backgroundOutput, setBackgroundOutput] = createSignal("")
const [outputTruncated, setOutputTruncated] = createSignal(false)
@@ -2925,6 +2929,9 @@ function Shell(props: ToolProps) {
<text fg={theme.text.subdued}>{limitedOutput()}</text>
</Show>
</Show>
<Show when={failedExit()}>
{(exit) => <text fg={theme.text.feedback.error.default}>× exited with code {exit()}</text>}
</Show>
<Show when={background()}>
<StatusBadge>Background</StatusBadge>
</Show>