Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Conversation

  • Conversation
  • ChatMessage
  • PromptInput
  • TypingDots

Reasoning and Tools

  • ThinkingBlock
  • ToolCall
  • AgentPlan
  • Dossier
  • Artifact
  • ConfirmCard
  • ThreadList
  • TaskRunner

Assistance

  • StreamingText
  • PromptSuggestions
  • MessageActions
  • Citation

TaskRunner

task-runner

Summarizes agent task status, plan steps, completion progress, tags, and elapsed time.

Usage

Running

status=running Head logo pulse; progress Explicit control of progress bar.

Sandboxnode26
Running
  1. Allocate microVM180ms
  2. Restore snapshot820ms
  3. Boot runtime · Node 261082ms
  4. Execute main.js…
  5. Reclaim sandbox
3.12sExecuting…
tsx
<TaskRunner
  title="Sandbox"
  tag="node26"
  status="running"
  steps={[
    { title: "Allocate microVM", status: "done", meta: "180ms" },
    { title: "Restore snapshot", status: "done", meta: "820ms" },
    { title: "Boot runtime · Node 26", status: "done", meta: "1082ms" },
    { title: "Execute main.js", status: "running", meta: "…" },
    { title: "Reclaim sandbox", status: "pending" },
  ]}
  progress={58}
  elapsed="3.12s"
  footerStatus="Executing…"
/>

Success

status=success; when progress is omitted, the step ratio is automatically derived as 100% by done.

Buildci
Done
  1. Install deps4.2s
  2. Typecheck8.1s
  3. Bundle12.6s
24.9sDone
tsx
<TaskRunner
  title="Build"
  tag="ci"
  status="success"
  steps={[
    { title: "Install deps", status: "done", meta: "4.2s" },
    { title: "Typecheck", status: "done", meta: "8.1s" },
    { title: "Bundle", status: "done", meta: "12.6s" },
  ]}
  elapsed="24.9s"
  footerStatus="Done"
/>

Failed

status=error red logo; use detail to indicate the reason for failed steps.

Deploy
Failed
  1. Build image31s
  2. Push registryregistry Timeout—
  3. Rolling update
46sFailed
tsx
<TaskRunner
  title="Deploy"
  status="error"
  steps={[
    { title: "Build image", status: "done", meta: "31s" },
    { title: "Push registry", status: "error", detail: "registry timeout", meta: "-" },
    { title: "Rolling update", status: "pending" },
  ]}
  elapsed="46s"
  footerStatus="Failed"
/>

No bottom bar

Bottom bar is not rendered when elapsed/footerStatus/footerExtra is omitted.

Lint
Running
  1. Scan files
  2. Apply rules
tsx
<TaskRunner
  title="Lint"
  status="running"
  steps={[
    { title: "Scan files", status: "done" },
    { title: "Apply rules", status: "running" },
  ]}
/>

When to Use

Use it to present sequential task execution (sandbox startup, a deployment pipeline) with overall status, progress, per-step timing, active-step highlighting, and an elapsed-time footer. Unlike AgentPlan, TaskRunner adds execution status and timing, but the consumer remains responsible for advancing state.

Import

ts
import { TaskRunner, resolveProgress, statusMeta } from "@hulianui/ui"

Props

NameTypeDefaultDescription
steps*AgentTask[]-Step list using AgentTask; use meta for per-step timing
status"idle" | "running" | "success" | "error""idle"Overall running status: driver head logo color + progress bar tone
progressnumber-Top progress 0-100; if omitted, the steps completion (done) ratio will be automatically derived
classNamestring-Container additional class

Slots

SlotTypeDescription
title*ReactNodeCard header title (such as "Sandbox")
tagReactNodeTag next to the title (such as "node26"), rendered as a light background Tag
statusLabelReactNodeHead logo text overlay; when omitted, press status derivation (Idle/Running/Done/Failed)
elapsedReactNodeThe accumulated time on the left side of the bottom (such as "3.12s")
footerStatusReactNodeBottom right status text; replaced by footerExtra when it exists
headerExtraReactNodeAdd to the right side of the head (buttons/menus, etc.)
footerExtraReactNodeReplace the bottom right content

AgentTask step item status: "done" (completed, metadata can show elapsed time) / "running" (highlighted) / "pending" (hollow ring) / "error".

Usage Guidelines

  • Pure display component: does not come with timer/step advancement. Run the driver (setInterval advances status, accumulate elapsed) on the consumer side, and feed in the derived steps/status/elapsed.
  • When progress is omitted, it is automatically derived according to the proportion of done in steps; if you want smooth non-intact step progress (such as 58%), you must explicitly pass progress.
  • footerExtra will overwrite footerStatus, do not expect both to be displayed at the same time.
  • resolveProgress counts completed steps; error, running, and pending steps do not contribute to the derived percentage.

Related

ThinkingBlock · ToolCall · AgentPlan · Dossier · Artifact · ConfirmCard

PreviousThreadListAI AgentsNextStreamingText

On this page

  • Usage
  • Documentation
    • When to Use
    • Import
    • Props
    • Slots
    • Usage Guidelines
    • Related