PageSourceSearch

https://cridergpt.com/assets/AgentSwarmPanel-CpYVaDXy.js

js cridergpt.com collected 2026-10-02 01:27:02 UTC 21,932 bytes, 3 lines download raw bytes

1import{a as I,j as e,B as u,c2 as z,r as i,s as A,o as Z,d as S,c3 as Q,C as k,b as P,c as D,e as E,l as B,Z as K,z as ee,Y as ae,c4 as te,L as H,ag as re,ad as le,az as se,aA as oe,I as ie,F as $,c5 as ne,p as ce,c6 as pe,a7 as me}from"./index-0skl7k4W.js";import{P as de}from"./paperclip-BF9mgdgE.js";function ue({title:t,content:g,url:s,variant:o="default",className:p}){const{toast:x}=I(),h=async()=>{const f=`${t}
2
3${g.slice(0,200)}${g.length>200?"...":""}`,n=s||window.location.href;if(navigator.share)try{await navigator.share({title:t,text:f,url:n}),x({title:"Shared! 👻",description:"Content shared successfully."});return}catch{}const v=`https://www.snapchat.com/scan?attachmentUrl=${encodeURIComponent(n)}`,_=500,w=650,y=window.screenX+(window.outerWidth-_)/2,C=window.screenY+(window.outerHeight-w)/2;window.open(v,"snapchat-share",`width=${_},height=${w},left=${y},top=${C},scrollbars=yes`),x({title:"Opening Snapchat 👻",description:"Share your CriderGPT content with friends!"})};return o==="icon"?e.jsx(u,{onClick:h,variant:"ghost",size:"icon",className:p,title:"Share to Snapchat",children:e.jsx(z,{className:"h-4 w-4 text-[#FFFC00]"})}):e.jsxs(u,{onClick:h,variant:"outline",size:"sm",className:`gap-2 border-[#FFFC00]/30 hover:bg-[#FFFC00]/10 ${p||""}`,children:[e.jsx(z,{className:"h-4 w-4 text-[#FFFC00]"}),"Share to Snapchat"]})}const R=[{role:"researcher",label:"🔍 Researcher",prompt:"Research and find facts"},{role:"writer",label:"✍️ Writer",prompt:"Draft content"},{role:"coder",label:"💻 Coder",prompt:"Write code solutions"},{role:"analyst",label:"📊 Analyst",prompt:"Analyze data and patterns"},{role:"critic",label:"🎯 Critic",prompt:"Review and improve quality"},{role:"planner",label:"📋 Planner",prompt:"Create action plans"},{role:"creative",label:"🎨 Creative",prompt:"Generate ideas"},{role:"ffa_expert",label:"🌾 FFA Expert",prompt:"FFA and agriculture expertise"},{role:"livestock",label:"🐄 Livestock",prompt:"Livestock management"},{role:"mechanic",label:"🔧 Mechanic",prompt:"Equipment and vehicle repair"},{role:"financial",label:"💰 Financial",prompt:"Budget and finance"},{role:"marketer",label:"📢 Marketer",prompt:"Marketing strategies"},{role:"mod_builder",label:"🎮 Mod Builder",prompt:"FS22/FS25 mod building"},{role:"scheduler",label:"📅 Scheduler",prompt:"Scheduling and planning"},{role:"debugger",label:"🐛 Debugger",prompt:"Find and fix errors"},{role:"communicator",label:"💬 Communicator",prompt:"Draft communications"},{role:"educator",label:"📚 Educator",prompt:"Create study materials"},{role:"synthesizer",label:"🧠 Synthesizer",prompt:"Combine all outputs"},{role:"agronomist",label:"🌱 Agronomist",prompt:"Crop and soil advice"},{role:"veterinarian",label:"🩺 Veterinarian",prompt:"Animal health diagnosis"},{role:"nutritionist",label:"🥗 Nutritionist",prompt:"Animal feed rations"},{role:"soil_scientist",label:"🧪 Soil Scientist",prompt:"Soil analysis"},{role:"weather_analyst",label:"🌦️ Weather Analyst",prompt:"Weather risk assessment"},{role:"irrigation_specialist",label:"💧 Irrigation",prompt:"Watering systems"},{role:"pest_manager",label:"🐛 Pest Manager",prompt:"Pest control IPM"},{role:"weed_specialist",label:"🌿 Weed Specialist",prompt:"Weed management"},{role:"dairy_specialist",label:"🥛 Dairy",prompt:"Dairy herd management"},{role:"beef_specialist",label:"🥩 Beef",prompt:"Beef cattle operations"},{role:"swine_specialist",label:"🐷 Swine",prompt:"Swine management"},{role:"poultry_specialist",label:"🐔 Poultry",prompt:"Poultry operations"},{role:"equine_specialist",label:"🐴 Equine",prompt:"Horse care and training"},{role:"sheep_goat_specialist",label:"🐑 Sheep & Goat",prompt:"Small ruminants"},{role:"aquaculture_specialist",label:"🐟 Aquaculture",prompt:"Fish farming"},{role:"genetics_specialist",label:"🧬 Genetics",prompt:"Breeding programs"},{role:"reproduction_specialist",label:"🐣 Reproduction",prompt:"Breeding protocols"},{role:"show_prep",label:"🏅 Show Prep",prompt:"Livestock showing"},{role:"judging_coach",label:"👁️ Judging Coach",prompt:"Livestock judging"},{role:"meat_science",label:"🥩 Meat Science",prompt:"Carcass evaluation"},{role:"forestry_specialist",label:"🌲 Forestry",prompt:"Timber management"},{role:"horticulture_specialist",label:"🌺 Horticulture",prompt:"Greenhouse operations"},{role:"environmental_specialist",label:"🌍 Environmental",prompt:"Conservation practices"},{role:"sustainability",label:"♻️ Sustainability",prompt:"Regenerative agriculture"},{role:"organic_specialist",label:"🌿 Organic",prompt:"Organic certification"},{role:"pasture_manager",label:"🏕️ Pasture Manager",prompt:"Rotational grazing"},{role:"wildlife_manager",label:"🦌 Wildlife Manager",prompt:"Habitat management"},{role:"water_quality",label:"💧 Water Quality",prompt:"Water testing"},{role:"compost_specialist",label:"🍂 Compost",prompt:"Waste management"},{role:"permaculture",label:"🍃 Permaculture",prompt:"Sustainable design"},{role:"climate_advisor",label:"🌡️ Climate Advisor",prompt:"Climate adaptation"},{role:"precision_ag",label:"📡 Precision Ag",prompt:"GPS and drone data"},{role:"ag_engineer",label:"⚙️ Ag Engineer",prompt:"Farm structures"},{role:"iot_specialist",label:"📶 IoT Specialist",prompt:"Sensor networks"},{role:"drone_operator",label:"🛸 Drone Operator",prompt:"Aerial surveys"},{role:"gis_specialist",label:"🗺️ GIS Specialist",prompt:"Mapping and spatial data"},{role:"robotics_engineer",label:"🦾 Robotics",prompt:"Farm automation"},{role:"data_scientist",label:"📊 Data Scientist",prompt:"Predictive analytics"},{role:"ml_engineer",label:"🤖 ML Engineer",prompt:"Machine learning models"},{role:"web_developer",label:"🌐 Web Developer",prompt:"Web apps and sites"},{role:"mobile_developer",label:"📲 Mobile Developer",prompt:"Mobile apps"},{role:"database_admin",label:"🗄️ Database Admin",prompt:"Database management"},{role:"api_developer",label:"🔌 API Developer",prompt:"API integrations"},{role:"security_analyst",label:"🔐 Security Analyst",prompt:"Cybersecurity"},{role:"devops_engineer",label:"🚀 DevOps",prompt:"CI/CD and deployment"},{role:"qa_tester",label:"✅ QA Tester",prompt:"Test cases and bugs"},{role:"ux_designer",label:"🖥️ UX Designer",prompt:"UI/UX improvement"},{role:"welder_specialist",label:"🔥 Welder",prompt:"Welding and fabrication"},{role:"electrician",label:"⚡ Electrician",prompt:"Electrical systems"},{role:"plumber",label:"🔧 Plumber",prompt:"Water and plumbing"}
3,{role:"carpenter",label:"🪚 Carpenter",prompt:"Building and structures"},{role:"hvac_specialist",label:"🌡️ HVAC",prompt:"Climate control"},{role:"diesel_mechanic",label:"🛢️ Diesel Mechanic",prompt:"Diesel engines"},{role:"auto_mechanic",label:"🚗 Auto Mechanic",prompt:"Vehicle repair"},{role:"small_engine",label:"⛽ Small Engine",prompt:"Small engine repair"},{role:"hydraulics_specialist",label:"🔴 Hydraulics",prompt:"Hydraulic systems"},{role:"paint_specialist",label:"🎨 Paint",prompt:"Painting and coatings"},{role:"concrete_specialist",label:"🧱 Concrete",prompt:"Concrete and masonry"},{role:"fencing_specialist",label:"🏗️ Fencing",prompt:"Livestock fencing"},{role:"energy_advisor",label:"☀️ Energy",prompt:"Solar and renewable"},{role:"sae_advisor",label:"🌾 SAE Advisor",prompt:"SAE project guidance"},{role:"cde_coach",label:"🏆 CDE Coach",prompt:"CDE preparation"},{role:"lde_coach",label:"🎭 LDE Coach",prompt:"Leadership events"},{role:"chapter_advisor",label:"📖 Chapter Advisor",prompt:"Chapter management"},{role:"public_speaking",label:"🎤 Public Speaking",prompt:"Speech coaching"},{role:"debate_coach",label:"🗣️ Debate Coach",prompt:"Parliamentary procedure"},{role:"essay_writer",label:"✏️ Essay Writer",prompt:"Human-sounding essays"},{role:"scholarship_advisor",label:"🎓 Scholarships",prompt:"Scholarship applications"},{role:"college_advisor",label:"🏫 College Advisor",prompt:"College admissions"},{role:"mentor",label:"🧑‍🏫 Mentor",prompt:"Career guidance"},{role:"historian",label:"📜 Historian",prompt:"Ag and FFA history"},{role:"ag_economist",label:"📈 Ag Economist",prompt:"Market analysis"},{role:"grant_writer",label:"📝 Grant Writer",prompt:"Grant proposals"},{role:"legal_advisor",label:"⚖️ Legal Advisor",prompt:"Farm law and regulations"},{role:"insurance_advisor",label:"🛡️ Insurance",prompt:"Crop/livestock insurance"},{role:"real_estate",label:"🏡 Real Estate",prompt:"Land evaluation"},{role:"tax_specialist",label:"🧾 Tax Specialist",prompt:"Farm taxes"},{role:"supply_chain",label:"🚚 Supply Chain",prompt:"Procurement and logistics"},{role:"commodity_trader",label:"📉 Commodity Trader",prompt:"Futures and hedging"},{role:"equipment_buyer",label:"🏷️ Equipment Buyer",prompt:"Equipment evaluation"},{role:"auction_specialist",label:"🔨 Auction",prompt:"Auction strategies"},{role:"fundraising",label:"💵 Fundraising",prompt:"Fundraising campaigns"},{role:"negotiations",label:"🤝 Negotiator",prompt:"Deal negotiations"},{role:"brand_strategist",label:"🏷️ Brand Strategist",prompt:"Brand identity"},{role:"project_manager",label:"📊 Project Manager",prompt:"Project tracking"},{role:"scrum_master",label:"🔄 Scrum Master",prompt:"Agile workflows"},{role:"hr_specialist",label:"👥 HR Specialist",prompt:"Workforce management"},{role:"safety_officer",label:"🦺 Safety Officer",prompt:"Farm safety"},{role:"compliance_officer",label:"📜 Compliance",prompt:"USDA/EPA regulations"},{role:"ranch_manager",label:"🤠 Ranch Manager",prompt:"Daily operations"},{role:"farm_hand",label:"👨‍🌾 Farm Hand",prompt:"Practical farm tasks"},{role:"inventory_manager",label:"📦 Inventory",prompt:"Supply tracking"},{role:"logistics_coordinator",label:"🗂️ Logistics",prompt:"Trans
3portation coordination"},{role:"event_planner",label:"🎪 Event Planner",prompt:"Event organization"},{role:"cooperative_advisor",label:"🤝 Co-op Advisor",prompt:"Cooperative management"},{role:"social_media",label:"📱 Social Media",prompt:"Social content strategy"},{role:"video_producer",label:"🎬 Video Producer",prompt:"Video production"},{role:"graphic_designer",label:"🖌️ Graphic Designer",prompt:"Visual design"},{role:"photographer",label:"📸 Photographer",prompt:"Farm photography"},{role:"podcast_producer",label:"🎙️ Podcast",prompt:"Audio content"},{role:"ag_journalist",label:"📰 Ag Journalist",prompt:"News and features"},{role:"content_curator",label:"📚 Content Curator",prompt:"Content aggregation"},{role:"technical_writer",label:"📋 Technical Writer",prompt:"Documentation"},{role:"food_scientist",label:"🧫 Food Scientist",prompt:"Food safety and processing"},{role:"biotech_specialist",label:"🧬 Biotech",prompt:"Agricultural biotech"},{role:"biosecurity",label:"🦠 Biosecurity",prompt:"Disease prevention"},{role:"apiculture",label:"🐝 Apiculture",prompt:"Beekeeping"},{role:"wool_fiber",label:"🧶 Wool & Fiber",prompt:"Fiber production"},{role:"grain_specialist",label:"🌾 Grain",prompt:"Grain storage and marketing"},{role:"hay_specialist",label:"🟫 Hay",prompt:"Hay and forage"},{role:"seed_specialist",label:"🌰 Seed",prompt:"Seed selection"},{role:"fertilizer_specialist",label:"💊 Fertilizer",prompt:"Fertilizer rates"},{role:"urban_ag",label:"🏙️ Urban Ag",prompt:"Urban farming"},{role:"farm_to_table",label:"🍽️ Farm to Table",prompt:"Direct marketing"},{role:"agritourism",label:"🎪 Agritourism",prompt:"Farm tourism"},{role:"resume_builder",label:"📄 Resume Builder",prompt:"Job applications"},{role:"customer_support",label:"🎧 Customer Support",prompt:"User assistance"},{role:"translator",label:"🌐 Translator",prompt:"Language translation"},{role:"statistician",label:"📐 Statistician",prompt:"Statistical analysis"},{role:"surveyor",label:"📏 Surveyor",prompt:"Land measurement"},{role:"health_safety",label:"🏥 Health & Safety",prompt:"Emergency and safety"},{role:"volunteer_coordinator",label:"🙋 Volunteer Coord",prompt:"Community organizing"},{role:"peer_reviewer",label:"👀 Peer Reviewer",prompt:"Proofreading and feedback"},{role:"auctioneer",label:"🗣️ Auctioneer",prompt:"Auction management"},{role:"rdr2_guide",label:"🤠 RDR2 Guide",prompt:"Red Dead Redemption 2"},{role:"gaming_advisor",label:"🎮 Gaming Advisor",prompt:"Gaming tips and mods"},{role:"music_advisor",label:"🎵 Music Advisor",prompt:"Music production"},{role:"fitness_coach",label:"💪 Fitness Coach",prompt:"Workout plans"},{role:"recipe_creator",label:"👨‍🍳 Recipe Creator",prompt:"Farm-fresh recipes"},{role:"weather_forecaster",label:"☁️ Weather",prompt:"Local forecasts"},{role:"emergency_responder",label:"🚨 Emergency",prompt:"Emergency response"},{role:"hunting_advisor",label:"🎯 Hunting Advisor",prompt:"Hunting and outdoors"},{role:"fishing_advisor",label:"🎣 Fishing Advisor",prompt:"Pond management"}],ge=10*1024*1024;function he(t){return t.startsWith("image/")?e.jsx(ie,{className:"h-4 w-4"}):t==="application/pdf"?e.jsx($,{className:"h-4 w-4 text-red-500"}):t.includes("text")||t.includes("json")||t.includes("xml")?e.jsx($,{className:"h-4 w-4 text-blue-500"}):e.jsx(ne,{className:"h-4 w-4"})}function be(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}async function xe(t){return new Promise((g,s)=>{const o=new FileReader,p=t.type.startsWith("text/")||t.type==="application/json"||t.type==="application/xml";o.onload=()=>{g({name:t.name,type:t.type,size:t.size,content:o.result})},o.onerror=s,p?o.readAsText(t):o.readAsDataURL(t)})}function _e(){const[t,g]=i.useState(""),[s,o]=i.useState([]),[p,x]=i.useState(!1),[h,f]=i.useState(null),[n,v]=i.useState([]),[_,w]=i.useState([]),[y,C]=i.useState(null),[N,M]=i.useState(!1),[c,F]=i.useState([]),j=i.useRef(null),{toast:m}=I();i.useEffect(()=>{W()},[]);const W=async()=>{const{data:a}=await A.functions.invoke("swarm-orchestrator",{body:{action:"list"}});a!=null&&a.sessions&&w(a.sessions)},G=a=>{o(r=>
3r.includes(a)?r.filter(l=>l!==a):r.length<150?[...r,a]:r)},U=()=>o(R.map(a=>a.role)),q=()=>o([]),O=async a=>{const r=a.target.files;if(r){for(const l of Array.from(r)){if(l.size>ge){m({title:"File too large",description:`${l.name} exceeds 10MB limit`,variant:"destructive"});continue}if(c.length>=5){m({title:"Max files reached",description:"You can attach up to 5 files per swarm",variant:"destructive"});break}try{const b=await xe(l);F(d=>[...d,b])}catch{m({title:"Read failed",description:`Could not read ${l.name}`,variant:"destructive"})}}j.current&&(j.current.value="")}},X=a=>{F(r=>r.filter((l,b)=>b!==a))},V=async()=>{if(!t.trim()){m({title:"Need an objective",description:"Tell the swarm what to work on",variant:"destructive"});return}if(s.length===0){m({title:"No agents selected",description:"Pick at least one agent role",variant:"destructive"});return}x(!0),v([]),f(null);try{const a=s.map(d=>({role:d,prompt:t,model:"gpt-4o-mini"})),r=c.map(d=>({name:d.name,type:d.type,content:d.content.substring(0,15e3)})),{data:l,error:b}=await A.functions.invoke("swarm-orchestrator",{body:{action:"launch",objective:t,agents:a,files:r.length>0?r:void 0}});if(b)throw b;if(l!=null&&l.error)throw new Error(l.error);f(l.session),v(l.tasks||[]),F([]),await W(),m({title:"🐝 Swarm Complete!",description:`${l.summary.completed}/${l.summary.total} agents finished successfully`})}catch(a){console.error("Swarm error:",a),m({title:"Swarm Failed",description:a.message,variant:"destructive"})}finally{x(!1)}},J=async a=>{const{data:r}=await A.functions.invoke("swarm-orchestrator",{body:{action:"status",sessionId:a}});r&&(f(r.session),v(r.tasks||[]),M(!1))},Y=a=>{switch(a){case"completed":return e.jsx(me,{className:"h-4 w-4 text-green-500"});case"failed":return e.jsx(pe,{className:"h-4 w-4 text-red-500"});case"running":return e.jsx(H,{className:"h-4 w-4 text-blue-500 animate-spin"});default:return e.jsx(ce,{className:"h-4 w-4 text-muted-foreground"})}},L=n.filter(a=>a.status==="completed").length,T=n.length>0?L/n.length*100:0;return e.jsxs("div",{className:"space-y-4 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Z,{className:"h-6 w-6 text-primary"}),e.jsx("h2",{className:"text-xl font-bold",children:"Agent Swarm"}),e.jsx(S,{variant:"secondary",className:"text-xs",children:"Up to 150 agents"})]}),e.jsxs(u,{variant:"outline",size:"sm",onClick:()=>M(!N),children:[e.jsx(Q,{className:"h-4 w-4 mr-1"}),"History"]})]}),N&&e.jsxs(k,{children:[e.jsx(P,{className:"pb-2",children:e.jsx(D,{className:"text-sm",children:"Past Sessions"})}),e.jsx(E,{children:e.jsx(B,{className:"h-48",children:_.length===0?e.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No sessions yet"}):e.jsx("div",{className:"space-y-2",children:_.map(a=>e.jsxs("div",{className:"flex items-center justify-between p-2 rounded-lg border cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>J(a.id),children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium truncate",children:a.name}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[new Date(a.created_at).toLocaleDateString()," · ",a.completed_agents,"/",a.max_agents," agents"]})]}),e.jsx(S,{variant:a.status==="completed"?"default":a.status==="failed"?"destructive":"secondary",className:"text-xs",children:a.status})]},a.id))})})})]}),e.jsxs(k,{children:[e.jsx(P,{className:"pb-2",children:e.jsxs(D,{className:"text-sm flex items-center gap-2",children:[e.jsx(K,{className:"h-4 w-4"}),"Launch New Swarm"]})}),e.jsxs(E,{className:"space-y-3",children:[e.jsx(ee,{placeholder:"What's the mission? e.g., 'Research best cattle feed ratios for show steers and create a 30-day plan'",value:t,onChange:a=>g(a.target.value),className:"min-h-[80px]"}),e.jsxs("div",{children:[e.jsx("input",{ref:j,type:"file",multiple:!0,accept:".pdf,.txt,.csv,.md,.json,.xml,.docx,.xlsx,.png,.jpg,.jpeg,.webp,.gif",onChange:O,className:"hidden"}),e.jsxs(u,{variant:"outline",size:"sm",onClick:()=>{var a;return(a=j.current)==null?void 0:a.click()},disabled:c.length>=5,className:"gap-2",children:[e.jsx(de,{className:"h-4 w-4"}),"Attach Files (",c.length,"/5)"]}),e.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:"PDF, images, text, CSV, JSON, DOCX, XLSX"})]}),c.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2",children:c.map((a,r)=>
3e.jsxs("div",{className:"flex items-center gap-1.5 bg-muted/60 border rounded-md px-2 py-1.5 text-xs",children:[he(a.type),e.jsx("span",{className:"max-w-[120px] truncate font-medium",children:a.name}),e.jsxs("span",{className:"text-muted-foreground",children:["(",be(a.size),")"]}),e.jsx("button",{onClick:()=>X(r),className:"ml-1 hover:text-destructive transition-colors",children:e.jsx(ae,{className:"h-3 w-3"})})]},r))}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("p",{className:"text-sm font-medium",children:["Select Agents (",s.length,"/150)"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:U,className:"text-xs h-7",children:["All ",R.length]}),e.jsx(u,{variant:"ghost",size:"sm",onClick:q,className:"text-xs h-7",children:"Clear"})]})]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-1.5",children:R.map(a=>e.jsxs("label",{className:`flex items-center gap-2 p-2 rounded-md border cursor-pointer transition-colors text-xs ${s.includes(a.role)?"bg-primary/10 border-primary/50":"hover:bg-muted/50"}`,children:[e.jsx(te,{checked:s.includes(a.role),onCheckedChange:()=>G(a.role)}),e.jsx("span",{children:a.label})]},a.role))})]}),e.jsx(u,{onClick:V,disabled:p||!t.trim()||s.length===0,className:"w-full",size:"lg",children:p?e.jsxs(e.Fragment,{children:[e.jsx(H,{className:"h-4 w-4 mr-2 animate-spin"}),"Running ",s.length," agents..."]}):e.jsxs(e.Fragment,{children:[e.jsx(re,{className:"h-4 w-4 mr-2"}),"Launch Swarm (",s.length," agents)",c.length>0&&` + ${c.length} file${c.length>1?"s":""}`]})})]})]}),n.length>0&&e.jsxs(k,{children:[e.jsxs(P,{className:"pb-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(D,{className:"text-sm",children:(h==null?void 0:h.name)||"Swarm Results"}),e.jsxs(S,{variant:T===100?"default":"secondary",children:[L,"/",n.length," done"]})]}),e.jsx(le,{value:T,className:"h-2 mt-2"})]}),e.jsx(E,{children:e.jsx(B,{className:"max-h-[500px]",children:e.jsx("div",{className:"space-y-2",children:n.map(a=>e.jsxs("div",{className:"border rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 cursor-pointer hover:bg-muted/30 transition-colors",onClick:()=>C(y===a.id?null:a.id),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[Y(a.status),e.jsx("span",{className:"text-sm font-medium",children:a.role_label}),a.tokens_used>0&&e.jsxs(S,{variant:"outline",className:"text-xs",children:[a.tokens_used," tokens"]})]}),y===a.id?e.jsx(se,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(oe,{className:"h-4 w-4 text-muted-foreground"})]}),y===a.id&&e.jsx("div",{className:"px-3 pb-3 border-t",children:a.result?e.jsxs("div",{className:"mt-2",children:[e.jsx("div",{className:"text-sm whitespace-pre-wrap bg-muted/30 p-3 rounded-md max-h-64 overflow-y-auto",children:a.result}),e.jsx("div",{className:"mt-2 flex justify-end",children:e.jsx(ue,{title:`CriderGPT Agent: ${a.role_label}`,content:a.result,variant:"default"})})]}):a.error_message?e.jsx("p",{className:"mt-2 text-sm text-destructive",children:a.error_message}):e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Waiting..."})})]},a.id))})})})]})]})}export{_e as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.