Agent 活动流

New

自适应 Agent 活动流:推理文本、搜索结果、工具调用、结构化执行轨迹,或按时间混排;进行中有界跟随,完成后折叠为可重开摘要。

流式文本

index.tsx

把自由推理文本流进有界视口,完成后以计时披露保留完整日志。

Thinking…

API 参考

items
AgentActivityItem[]

Chronological activity entries. Append or update items as events stream.

contentType?
"text" | "search" | "mixed" | "step" | "tool" | "trace"

Expected activity kind before the first streamed item arrives.

status?
"complete" | "working"

Current run phase. Active runs always stay expanded.

working
duration?
number

Elapsed run time, in seconds. Used by the step-only summary.

0
open?
boolean

Controlled expanded state used after the run completes.

defaultOpen?
boolean

Initial expanded state used after the run completes.

false
onOpenChange?
((open: boolean) => void)

Called when the completed activity disclosure changes state.

collapseOnComplete?
boolean

Collapse the disclosure when status changes from working to complete.

true
activeLabel?
ReactNode

Optional label shown while the run is active.

summary?
ReactNode

Optional completed summary. Derived from the item types by default.

maxHeight?
number

Maximum visible activity height before the stream begins gliding.

208
className?
string
contentClassName?
string

推理步骤

index.tsx

展示已完成、进行中与待定的推理步骤,并可附带尾部元数据。

Thinking…
Reading the product brief

API 参考

items
AgentActivityItem[]

Chronological activity entries. Append or update items as events stream.

contentType?
"text" | "search" | "mixed" | "step" | "tool" | "trace"

Expected activity kind before the first streamed item arrives.

status?
"complete" | "working"

Current run phase. Active runs always stay expanded.

working
duration?
number

Elapsed run time, in seconds. Used by the step-only summary.

0
open?
boolean

Controlled expanded state used after the run completes.

defaultOpen?
boolean

Initial expanded state used after the run completes.

false
onOpenChange?
((open: boolean) => void)

Called when the completed activity disclosure changes state.

collapseOnComplete?
boolean

Collapse the disclosure when status changes from working to complete.

true
activeLabel?
ReactNode

Optional label shown while the run is active.

summary?
ReactNode

Optional completed summary. Derived from the item types by default.

maxHeight?
number

Maximum visible activity height before the stream begins gliding.

208
className?
string
contentClassName?
string

工具调用

index.tsx

汇总读/改/运行事件,目标路径等宽展示,可选行变更计数。

Running tools…

API 参考

items
AgentActivityItem[]

Chronological activity entries. Append or update items as events stream.

contentType?
"text" | "search" | "mixed" | "step" | "tool" | "trace"

Expected activity kind before the first streamed item arrives.

status?
"complete" | "working"

Current run phase. Active runs always stay expanded.

working
duration?
number

Elapsed run time, in seconds. Used by the step-only summary.

0
open?
boolean

Controlled expanded state used after the run completes.

defaultOpen?
boolean

Initial expanded state used after the run completes.

false
onOpenChange?
((open: boolean) => void)

Called when the completed activity disclosure changes state.

collapseOnComplete?
boolean

Collapse the disclosure when status changes from working to complete.

true
activeLabel?
ReactNode

Optional label shown while the run is active.

summary?
ReactNode

Optional completed summary. Derived from the item types by default.

maxHeight?
number

Maximum visible activity height before the stream begins gliding.

208
className?
string
contentClassName?
string

混合活动

index.tsx

在同一时间线混排推理、搜索与工具事件,视口平滑跟随新进度。

Thinking…
Reading the launch brief

API 参考

items
AgentActivityItem[]

Chronological activity entries. Append or update items as events stream.

contentType?
"text" | "search" | "mixed" | "step" | "tool" | "trace"

Expected activity kind before the first streamed item arrives.

status?
"complete" | "working"

Current run phase. Active runs always stay expanded.

working
duration?
number

Elapsed run time, in seconds. Used by the step-only summary.

0
open?
boolean

Controlled expanded state used after the run completes.

defaultOpen?
boolean

Initial expanded state used after the run completes.

false
onOpenChange?
((open: boolean) => void)

Called when the completed activity disclosure changes state.

collapseOnComplete?
boolean

Collapse the disclosure when status changes from working to complete.

true
activeLabel?
ReactNode

Optional label shown while the run is active.

summary?
ReactNode

Optional completed summary. Derived from the item types by default.

maxHeight?
number

Maximum visible activity height before the stream begins gliding.

208
className?
string
contentClassName?
string

执行轨迹

index.tsx

把消息与结构化动作流进紧凑执行账本,完成后按工具调用与消息数汇总。

Running the agent trace…

API 参考

items
AgentActivityItem[]

Chronological activity entries. Append or update items as events stream.

contentType?
"text" | "search" | "mixed" | "step" | "tool" | "trace"

Expected activity kind before the first streamed item arrives.

status?
"complete" | "working"

Current run phase. Active runs always stay expanded.

working
duration?
number

Elapsed run time, in seconds. Used by the step-only summary.

0
open?
boolean

Controlled expanded state used after the run completes.

defaultOpen?
boolean

Initial expanded state used after the run completes.

false
onOpenChange?
((open: boolean) => void)

Called when the completed activity disclosure changes state.

collapseOnComplete?
boolean

Collapse the disclosure when status changes from working to complete.

true
activeLabel?
ReactNode

Optional label shown while the run is active.

summary?
ReactNode

Optional completed summary. Derived from the item types by default.

maxHeight?
number

Maximum visible activity height before the stream begins gliding.

208
className?
string
contentClassName?
string

安装

用 shadcn CLI 添加,或手动复制源码。

$ bunx --bun shadcn add @uilab/agent-activity

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.