Spaces:
Paused
Paused
Download frontend/apps/internal/src/components/TraceGraph.tsx from 3SCError404/miracle: direct link, hf CLI and curl.
- Browser
- Download file 1.55 kB
-
https://huggingface.co/spaces/3SCError404/miracle/resolve/main/frontend/apps/internal/src/components/TraceGraph.tsx
- Command line
-
hf download hf://spaces/3SCError404/miracle/frontend/apps/internal/src/components/TraceGraph.tsx
-
curl -L -o TraceGraph.tsx https://huggingface.co/spaces/3SCError404/miracle/resolve/main/frontend/apps/internal/src/components/TraceGraph.tsx
1.55 kB
| import React from 'react'; | |
| import { motion } from 'framer-motion'; | |
| import styles from './TraceGraph.module.css'; | |
| interface Node { | |
| id: string; | |
| label: string; | |
| status: 'complete' | 'active' | 'pending'; | |
| } | |
| export const TraceGraph: React.FC = () => { | |
| // Demo data for the "analytical journey" | |
| const nodes: Node[] = [ | |
| { id: '1', label: 'Intent Extraction', status: 'complete' }, | |
| { id: '2', label: 'Knowledge Lookup', status: 'complete' }, | |
| { id: '3', label: 'Policy Check', status: 'active' }, | |
| { id: '4', label: 'Response Synthesis', status: 'pending' }, | |
| ]; | |
| return ( | |
| <div className={styles.container}> | |
| <div className={styles.header}>Analytical Trace</div> | |
| <div className={styles.graph}> | |
| {nodes.map((node, i) => ( | |
| <React.Fragment key={node.id}> | |
| <motion.div | |
| initial={{ opacity: 0, scale: 0.8 }} | |
| animate={{ opacity: 1, scale: 1 }} | |
| transition={{ delay: i * 0.2 }} | |
| className={`${styles.node} ${styles[node.status]}`} | |
| > | |
| <div className={styles.statusDot} /> | |
| <span className={styles.label}>{node.label}</span> | |
| </motion.div> | |
| {i < nodes.length - 1 && ( | |
| <motion.div | |
| initial={{ height: 0 }} | |
| animate={{ height: 20 }} | |
| transition={{ delay: i * 0.2 + 0.1 }} | |
| className={styles.connector} | |
| /> | |
| )} | |
| </React.Fragment> | |
| ))} | |
| </div> | |
| </div> | |
| ); | |
| }; | |