Przeglądaj źródła

tui: fix task display nesting so running status only shows when toolcalls exist

Dax Raad 1 miesiąc temu
rodzic
commit
8d232d35eb

+ 8 - 4
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

@@ -1982,12 +1982,16 @@ function Task(props: ToolProps<typeof TaskTool>) {
       part={props.part}
     >
       Task {props.input.description}
-      <Show when={isRunning() && tools().length > 0}> · {tools().length} toolcalls</Show>
-      <Show fallback={"\n└ Running..."} when={current()}>
-        {"\n└"} {Locale.titlecase(current()!.tool)} {(current()!.state as any).title}
+      <Show when={isRunning() && tools().length > 0}>
+        {" "}
+        · {tools().length} toolcalls
+        <Show fallback={"\n└ Running..."} when={current()}>
+          {"\n└"} {Locale.titlecase(current()!.tool)} {(current()!.state as any).title}
+        </Show>
       </Show>
       <Show when={duration() && props.part.state.status === "completed"}>
-        {"\n└ "} {tools().length} toolcalls · {Locale.duration(duration())}
+        {"\n└ "}
+        {tools().length} toolcalls · {Locale.duration(duration())}
       </Show>
     </InlineTool>
   )