Agents
ThreadRail
Conversation minimap for scanning and jumping between chat turns.
Composition
The preferred shape for composing the installed agent from its exported parts.
Parts
Exported compound parts from the installed source.
ThreadRail├── ThreadRailItem├── ThreadRailLine├── ThreadRailPopover├── ThreadRailTitle├── ThreadRailSummary├── ThreadRailFooter├── ThreadRailFile├── ThreadRailFileIcon└── ThreadRailMoreThis agent installs from the chat registry. Install the bundle with the command above, or inspect the source below.
npx shadcn@latest add http://127.0.0.1:3000/r/refined/chat.jsonUsage
import { ThreadRail, ThreadRailFile, ThreadRailFileIcon, ThreadRailFooter, ThreadRailItem, ThreadRailLine, ThreadRailMore, ThreadRailPopover, ThreadRailSummary, ThreadRailTitle,} from "@/components/refined-ui/thread-rail";// Host app maps its conversation into plain ThreadRail props: one tick per user message, popover shows prompt + part of reply.type UserTurn = { id: string; prompt: string; reply: string; files: string[];};export function Example({ turns, inViewId }: { turns: UserTurn[]; inViewId?: string }) { return ( <ThreadRail> {turns.map((turn) => { const visible = turn.files.slice(0, 2); const overflow = turn.files.length - visible.length; return ( <ThreadRailItem key={turn.id} inView={turn.id === inViewId}> <ThreadRailLine aria-label={turn.prompt} /> <ThreadRailPopover> <ThreadRailTitle>{turn.prompt}</ThreadRailTitle> <ThreadRailSummary>{turn.reply}</ThreadRailSummary> {turn.files.length > 0 ? ( <ThreadRailFooter> {visible.map((file) => ( <ThreadRailFile key={file}> <ThreadRailFileIcon>#</ThreadRailFileIcon> {file} </ThreadRailFile> ))} {overflow > 0 ? <ThreadRailMore>+{overflow}</ThreadRailMore> : null} </ThreadRailFooter> ) : null} </ThreadRailPopover> </ThreadRailItem> ); })} </ThreadRail> );}Installed dependencies
Installed with this agent because the visible component depends on them; they are support files, not separate product surfaces.
Interaction layer
src/registry/sources/refined/thread-rail.cssSupportSurface variants
src/registry/sources/refined/surface-variants.tsSupportRaw code
Primary installed agent source
Component
src/registry/sources/refined/thread-rail.tsx