'use client' import { FileText, Lightbulb, StickyNote } from 'lucide-react' import { Badge } from '@/components/ui/badge' import { Tooltip, TooltipTrigger, TooltipContent } from '@/components/ui/tooltip' import { cn } from '@/lib/utils' interface ContextIndicatorProps { sourcesInsights: number sourcesFull: number notesCount: number tokenCount?: number charCount?: number className?: string } // Helper function to format large numbers with K/M suffixes function formatNumber(num: number): string { if (num >= 1000000) { return `${(num / 1000000).toFixed(1)}M` } if (num >= 1000) { return `${(num / 1000).toFixed(1)}K` } return num.toString() } export function ContextIndicator({ sourcesInsights, sourcesFull, notesCount, tokenCount, charCount, className }: ContextIndicatorProps) { const hasContext = (sourcesInsights + sourcesFull) > 0 || notesCount > 0 if (!hasContext) { return (
Insights for {sourcesInsights} source{sourcesInsights !== 1 ? 's' : ''}
{sourcesFull} full source{sourcesFull !== 1 ? 's' : ''}
{notesCount} full note{notesCount !== 1 ? 's' : ''}