"use client" /** * activity-feed.tsx — chronological list of recent file modifications * across all agents. */ import * as React from "react" import { Clock, Loader2 } from "lucide-react" import { cn } from "@/lib/utils" export interface ActivityEvent { agentId: string agentName: string agentEmoji: string path: string action: string ts: number } interface Props { events: ActivityEvent[] loading?: boolean } function relativeTime(ts: number): string { const diff = Date.now() - ts const s = Math.floor(diff / 1000) if (s < 60) return `${s}s ago` const m = Math.floor(s / 60) if (m < 60) return `${m}m ago` const h = Math.floor(m / 60) if (h < 24) return `${h}h ago` return `${Math.floor(h / 24)}d ago` } export function ActivityFeed({ events, loading }: Props) { if (loading) { return (
{ev.path}