Compare commits

...
Author SHA1 Message Date
James Long 5e46b2e60d fix(tui): color full patch failure heading 2026-08-31 20:44:36 +00:00
James Long b7dfe1147a fix(tui): tone down patch failure details 2026-08-31 20:36:30 +00:00
+15 -4
View File
@@ -3087,11 +3087,13 @@ function StatusBadge(props: { children: string }) {
type BlockToolProps = {
title?: string
path?: { label: string; value: string }
headerColor?: RGBA
children?: JSX.Element
onClick?: () => void
part?: SessionMessageAssistantTool
spinner?: boolean
error?: string
errorColor?: RGBA
}
function BlockTool(props: BlockToolProps) {
@@ -3137,7 +3139,11 @@ function BlockToolContent(props: BlockToolProps & { borderColor: RGBA }) {
<Show
when={props.spinner}
fallback={
<text fg={permission() ? theme.text.feedback.warning.default : theme.text.subdued}>{title()}</text>
<text
fg={permission() ? theme.text.feedback.warning.default : (props.headerColor ?? theme.text.subdued)}
>
{title()}
</text>
}
>
<Spinner color={permission() ? theme.text.feedback.warning.default : theme.text.subdued}>
@@ -3153,7 +3159,10 @@ function BlockToolContent(props: BlockToolProps & { borderColor: RGBA }) {
<Show
when={props.spinner}
fallback={
<text flexShrink={0} fg={permission() ? theme.text.feedback.warning.default : theme.text.subdued}>
<text
flexShrink={0}
fg={permission() ? theme.text.feedback.warning.default : (props.headerColor ?? theme.text.subdued)}
>
{path().label}
</text>
}
@@ -3165,14 +3174,14 @@ function BlockToolContent(props: BlockToolProps & { borderColor: RGBA }) {
<FilePath
value={path().value}
maxWidth={Math.max(2, ctx.width - 4 - stringWidth(path().label) - (props.spinner ? 2 : 0))}
fg={permission() ? theme.text.feedback.warning.default : theme.text.subdued}
fg={permission() ? theme.text.feedback.warning.default : (props.headerColor ?? theme.text.subdued)}
/>
</box>
)}
</Show>
{props.children}
<Show when={error()}>
<text fg={theme.text.feedback.error.default}>{error()}</text>
<text fg={props.errorColor ?? theme.text.feedback.error.default}>{error()}</text>
</Show>
</box>
)
@@ -3777,6 +3786,8 @@ function ApplyPatch(props: ToolProps) {
}
part={props.part}
spinner={props.part.state.status === "streaming" || props.part.state.status === "running"}
headerColor={props.part.state.status === "error" ? theme.text.feedback.error.default : undefined}
errorColor={props.part.state.status === "error" ? theme.text.subdued : undefined}
/>
</Match>
</Switch>