Pipeline
- Docsusage, props, keywords
- Demosrc/demo.tsx
- Buildshadcn add → vite
- Capturelight, dark, motion
- IndexBM25 + vectors
Public log. Prompts, raw model errors and costs stay on the admin side.
Log
Demo source
src/demo.tsx · from an earlier run
import { FileIcon, FolderIcon } from 'lucide-react';import { TreeView, TreeViewBranch, TreeViewBranchContent, TreeViewBranchControl, TreeViewBranchIndicator, TreeViewBranchText, TreeViewItem, TreeViewItemText, TreeViewNode, TreeViewTree, createTreeCollection,} from '@/components/ui/tree-view/TreeView';interface FileNode { id: string; name: string; children?: FileNode[];}const collection = createTreeCollection<FileNode>({ nodeToValue: (node) => node.id, nodeToString: (node) => node.name, rootNode: { id: 'ROOT', name: '', children: [ { id: 'src', name: 'src', children: [ { id: 'page', name: 'page.tsx' }, { id: 'index', name: 'index.ts' }, ], }, { id: 'package', name: 'package.json' }, ], },});function Nodes({ nodes, indexPath }: { nodes: FileNode[]; indexPath: number[] }) { return nodes.map((node, index) => ( <TreeViewNode key={node.id} node={node} indexPath={[...indexPath, index]}> {(props) => node.children ? ( <TreeViewBranch> <TreeViewBranchControl> <TreeViewBranchText> <FolderIcon /> {node.name} </TreeViewBranchText> <TreeViewBranchIndicator /> </TreeViewBranchControl> <TreeViewBranchContent indexPath={props.indexPath}> <Nodes nodes={node.children} indexPath={props.indexPath} /> </TreeViewBranchContent> </TreeViewBranch> ) : ( <TreeViewItem> <TreeViewItemText> <FileIcon /> {node.name} </TreeViewItemText> </TreeViewItem> ) } </TreeViewNode> ));}export default function TreeViewDemo() { return ( <TreeView collection={collection} defaultExpandedValue={['src']} className="w-full max-w-sm"> <TreeViewTree> <Nodes nodes={collection.rootNode.children ?? []} indexPath={[]} /> </TreeViewTree> </TreeView> );}