Skip to content

Commit 911fb70

Browse files
authored
fix(tui): align execute child calls with task indentation (#35190)
1 parent 27e8e2e commit 911fb70

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

packages/tui/src/routes/session/index.tsx

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,6 +2348,14 @@ function Execute(props: ToolProps) {
23482348
const hasRuntimeError = createMemo(() => props.metadata.error === true)
23492349
const outputPreview = createMemo(() => collapseToolOutput(output(), 4, 4 * Math.max(20, ctx.width - 6)).output)
23502350
const showOutput = createMemo(() => output() && hasRuntimeError())
2351+
const content = createMemo(() => {
2352+
const lines = ["execute"]
2353+
for (const call of calls()) {
2354+
const args = input(call.input ?? {})
2355+
lines.push(`↳ ${call.tool}${args ? ` ${args}` : ""}${call.status === "error" ? " (failed)" : ""}`)
2356+
}
2357+
return lines.join("\n")
2358+
})
23512359

23522360
return (
23532361
<>
@@ -2359,22 +2367,8 @@ function Execute(props: ToolProps) {
23592367
complete={true}
23602368
part={props.part}
23612369
>
2362-
execute
2370+
{content()}
23632371
</InlineTool>
2364-
<For each={calls()}>
2365-
{(call) => {
2366-
const args = input(call.input ?? {})
2367-
return (
2368-
<box paddingLeft={3}>
2369-
<text paddingLeft={3} fg={call.status === "error" ? theme.error : theme.textMuted}>
2370-
{call.tool}
2371-
{args ? ` ${args}` : ""}
2372-
{call.status === "error" ? " (failed)" : ""}
2373-
</text>
2374-
</box>
2375-
)
2376-
}}
2377-
</For>
23782372
<Show when={showOutput()}>
23792373
<box paddingLeft={3}>
23802374
<For each={outputPreview().split("\n")}>

0 commit comments

Comments
 (0)