import React, { useState, useEffect } from 'react'; import { supabase } from '../services/supabase'; import { MessageSquare, Play, CheckCircle2, AlertCircle } from 'lucide-react'; import { motion } from 'framer-motion'; import { getApiUrl } from '../services/runtimeConfig'; interface DebateAgent { id: string; name: string; model: string; } interface DebateTask { id: string; title: string; status: string; } const renderContent = (content: any) => { if (!content) return null; if (typeof content === 'string') return content; if (Array.isArray(content) && content.length > 0 && typeof content[0] === 'object' && !Array.isArray(content[0])) { const keys = Object.keys(content[0]); const isTableCandidate = content.every(item => item && typeof item === 'object' && Object.keys(item).length === keys.length && keys.every(k => Object.keys(item).includes(k)) ); if (isTableCandidate && keys.length <= 6) { return (
| {k.replace(/_/g, ' ')} | ))}
|---|
| {typeof item[k] === 'object' ? JSON.stringify(item[k]) : String(item[k])} | ))}
Two agents collaborate to refine a task's output.