BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/trovecn/agent-activity

Agent Activity

trovecn/agent-activity
FreeComponent

A collapsible agent-run timeline with streaming steps, sources, details, and inline visual artifacts.

Install it

npx shadcn@latest add https://trovecn.dev/r/agent-activity.json

Source

src/components/trovecn/ai-workbench/agent-activity.tsxtrovecn.dev/r/agent-activity.json · first 6 KB
1"use client";
2
3import { useId, useState, type ComponentType, type ReactNode } from "react";
4import {
5 CheckIcon,
6 ChevronDownIcon,
7 CircleIcon,
8 FileTextIcon,
9 GlobeIcon,
10 ImageIcon,
11 SearchIcon,
12 SquareTerminalIcon,
13} from "lucide-react";
14import { AnimatePresence, motion, useReducedMotion } from "motion/react";
15
16import { spring } from "@/lib/springs";
17import { cn } from "@/lib/utils";
18
19export type AgentActivityStatus = "pending" | "active" | "complete";
20
21export type AgentActivityIcon = "thinking" | "reasoning" | "search" | "tool" | "image";
22
23export interface AgentActivityImage {
24 src: string;
25 alt: string;
26 caption?: ReactNode;
27}
28
29export interface AgentActivityDetails {
30 summary: ReactNode;
31 items: readonly ReactNode[];
32 defaultOpen?: boolean;
33}
34
35export interface AgentActivityEntry {
36 id: string;
37 /** The completed label shown after the step resolves. */
38 label: ReactNode;
39 /** Optional in-progress label, such as "Reading…" before "Read…". */
40 activeLabel?: ReactNode;
41 status: AgentActivityStatus;
42 /** Marks a description that changes token by token while its step is active. */
43 isStreamingText?: boolean;
44 /** A compact secondary line, including text that may update while streaming. */
45 description?: ReactNode;
46 icon?: AgentActivityIcon;
47 /** Defaults to an understated dot when false. */
48 showIcon?: boolean;
49 sources?: readonly ReactNode[];
50 details?: AgentActivityDetails;
51 image?: AgentActivityImage;
52}
53
54export interface AgentActivityProps {
55 entries: readonly AgentActivityEntry[];
56 /** The interactive run label; it remains the stable anchor while steps arrive. */
57 title?: ReactNode;
58 defaultOpen?: boolean;
59 open?: boolean;
60 onOpenChange?: (open: boolean) => void;
61 className?: string;
62}
63
64const ICONS: Record<AgentActivityIcon, ComponentType<{ className?: string }>> = {
65 thinking: CircleIcon,
66 reasoning: FileTextIcon,
67 search: SearchIcon,
68 tool: SquareTerminalIcon,
69 image: ImageIcon,
70};
71
72const railDrawTransition = { ...spring.moderate.enter, bounce: 0.06 };
73// Output is append-only trace data, so it should simply arrive in place rather
74// than competing with the structural step and rail motion.
75const evidenceRevealTransition = spring.quick.exit;
76const reducedFadeTransition = spring.quick.exit;
77
78function AgentActivityDetails({ details }: { details: AgentActivityDetails }) {
79 const [isOpen, setIsOpen] = useState(details.defaultOpen ?? false);
80 const id = useId();
81 const reduceMotion = useReducedMotion();
82
83// … truncated

What it pulls in

npm packages

  • lucide-react
  • motion

Other registry items

  • utils
  • springs

Files it writes

  • src/components/trovecn/ai-workbench/agent-activity.tsx

Facts

Registry
trovecn
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-14
Last confirmed
today

Go to the source

trovecn.dev PPRAMANIK62/trovecn on GitHub Raw registry item This item as JSON

More from trovecn

All 26 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordiontrovecnComponentsFree3 deps
Approval Requestapproval-requesttrovecnComponentsFree2 deps
ButtonbuttontrovecnComponentsFree2 deps
CheckboxcheckboxtrovecnComponentsFree2 deps
Checkbox Groupcheckbox-grouptrovecnComponentsFree2 deps
ComboboxcomboboxtrovecnComponentsFree3 deps
Comparison Slidercomparison-slidertrovecnComponentsFree1 dep
Context Menucontext-menutrovecnComponentsFree3 deps

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex