'use client' import React from 'react' import { IconCheck as Check, IconChecklist as BookCheck, IconFile as File, IconFileText as FileText, IconMessageCircle as MessageCircleMore, IconMovie as Film, IconPhoto as Image, IconRepeat as Repeat2, IconSearch as Search } from '@tabler/icons-react' import { cn } from '@/lib/utils' import { Badge } from './ui/badge' import { Separator } from './ui/separator' import { StatusIndicator } from './ui/status-indicator' import { ToolBadge } from './tool-badge' type SectionProps = { children: React.ReactNode className?: string size?: 'sm' | 'md' | 'lg' title?: string separator?: boolean } export const Section: React.FC = ({ children, className, size = 'md', title, separator = false }) => { const iconSize = 16 const iconClassName = 'mr-1.5 text-muted-foreground' let icon: React.ReactNode let type: 'text' | 'badge' = 'text' switch (title) { case 'Images': // eslint-disable-next-line jsx-a11y/alt-text icon = break case 'Videos': icon = type = 'badge' break case 'Sources': icon = type = 'badge' break case 'Answer': icon = break case 'Related': icon = break case 'Follow-up': icon = break case 'Content': icon = type = 'badge' break default: icon = } return ( <> {separator && }
{title && type === 'text' && (

{icon} {title}

)} {title && type === 'badge' && ( {icon} {title} )} {children}
) } export function ToolArgsSection({ children, tool, number, isLoading }: { children: React.ReactNode tool: string number?: number isLoading?: boolean }) { return (
{children}
{number && number > 0 && (
{number} results
)}
) }