fix: render pwsh and powershell tools correctly in UI

This fixes regressions from splitting the shell tools where powershell commands were missing their native exit codes and their correct UI rendering.
This commit is contained in:
LukeParkerDev 2026-04-03 14:01:13 +10:00
commit 6ad6358eb1
4 changed files with 51 additions and 7 deletions

View file

@ -33,6 +33,7 @@ import type { Diagnostic } from "vscode-languageserver-types"
import styles from "./part.module.css"
const MIN_DURATION = 2000
const SHELL = new Set(["bash", "pwsh", "powershell"])
export interface PartProps {
index: number
@ -90,7 +91,7 @@ export function Part(props: PartProps) {
<Match when={props.part.type === "tool" && props.part.tool === "todowrite"}>
<IconQueueList width={18} height={18} />
</Match>
<Match when={props.part.type === "tool" && props.part.tool === "bash"}>
<Match when={props.part.type === "tool" && SHELL.has(props.part.tool)}>
<IconCommandLine width={18} height={18} />
</Match>
<Match when={props.part.type === "tool" && props.part.tool === "edit"}>
@ -240,7 +241,7 @@ export function Part(props: PartProps) {
state={props.part.state}
/>
</Match>
<Match when={props.part.tool === "bash"}>
<Match when={SHELL.has(props.part.tool)}>
<BashTool
id={props.part.id}
tool={props.part.tool}