PageSourceSearch

https://mindtrip.ai/_next/static/chunks/pages/internal/agentic-evaluations/[id]-66e702270aee490f.js

js mindtrip.ai collected 2026-10-02 02:36:45 UTC 25,372 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1595],{20872:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/internal/agentic-evaluations/[id]",function(){return a(41054)}])},41054:(e,s,a)=>{"use strict";a.r(s),a.d(s,{__N_SSP:()=>O,default:()=>H});var t=a(37876),n=a(27964),l=a(14232),r=a(71857),i=a(81321),d=a(74302),c=a(41946),o=a.n(c),x=a(88254),m=a(36920),h=a(4294),u=a(98315),p=a(13497),g=a(36986),j=a(33949),v=a(34265),_=a(66811),b=a(32516),f=a(99177),N=a(73753),y=a(25834),w=a(56765),k=a(79345),C=a(924),R=a(85750),$=a(85539),E=a(78115),S=a(92197),T=a(20658),A=a(54160),I=a(73273),F=a(2692),z=a(50436),V=a(49320),P=a(81684);function L(e){let s,a,l,r=(0,n.c)(7),{assertions:i}=e;return r[0]!==i.items.length?(s=(0,t.jsxs)("h3",{className:"text-sm font-medium",children:["Assertions (",i.items.length,")"]}),r[0]=i.items.length,r[1]=s):s=r[1],r[2]!==i.time_target_seconds?(a=null!=i.time_target_seconds&&(0,t.jsxs)("span",{className:"text-xs text-gray-10",children:["+ ",i.time_target_seconds,"s time target"]}),r[2]=i.time_target_seconds,r[3]=a):a=r[3],r[4]!==s||r[5]!==a?(l=(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[s,a]}),r[4]=s,r[5]=a,r[6]=l):l=r[6],l}function U(e){let s,a,l=(0,n.c)(5),{severity:r}=e;if(l[0]!==r)s=(0,d.cn)("rounded px-1.5 py-0.5 text-xs font-medium","critical"===r?"bg-red-3 text-red-11":"minor"===r?"bg-subtle text-gray-11":"bg-amber-3 text-amber-11"),l[0]=r,l[1]=s;else s=l[1];return l[2]!==r||l[3]!==s?(a=(0,t.jsx)("span",{className:s,children:r}),l[2]=r,l[3]=s,l[4]=a):a=l[4],a}function G(e){let s,a,l,r,i=(0,n.c)(7),{result:c}=e;if(null==c.actual_seconds||null==c.target_seconds){let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("span",{className:"text-gray-10",children:"-"}),i[0]=e):e=i[0],e}switch(c.grade){case"pass":s="text-green-10";break;case"over":s="text-amber-11";break;case"fail":case"severe_fail":s="text-red-10";break;default:s="text-gray-11"}let o=s;switch(c.grade){case"pass":a="Pass";break;case"over":a="Over";break;case"fail":a="Fail";break;case"severe_fail":a="Severe";break;default:a=""}let x=a;return i[1]!==o?(l=(0,d.cn)("text-xs font-medium",o),i[1]=o,i[2]=l):l=i[2],i[3]!==x||i[4]!==c.actual_seconds||i[5]!==l?(r=(0,t.jsxs)("span",{className:l,children:[c.actual_seconds,"s ",x]}),i[3]=x,i[4]=c.actual_seconds,i[5]=l,i[6]=r):r=i[6],r}function M(e){let s,a,l,r,i=(0,n.c)(11),{user:d}=e;i[0]!==d.first_name||i[1]!==d.last_name?(s=[d.first_name,d.last_name].filter(Boolean),i[0]=d.first_name,i[1]=d.last_name,i[2]=s):s=i[2];let c=s.join(" "),o=d.handle?`@${d.handle}`:null,x=`ID: ${d.id}`;i[3]!==o||i[4]!==c||i[5]!==x||i[6]!==d.email?(a=[c,o,d.email,x].filter(Boolean),i[3]=o,i[4]=c,i[5]=x,i[6]=d.email,i[7]=a):a=i[7];let m=a;i[8]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("div",{className:"border-b px-3 py-2",children:(0,t.jsx)("h3",{className:"text-sm font-medium",children:"Session User"})}),i[8]=l):l=i[8];let h=m.join(" \xb7 ");return i[9]!==h?(r=(0,t.jsxs)("div",{className:"rounded-lg bg-background shadow-ring-xs",children:[l,(0,t.jsx)("div",{className:"px-3 py-2 text-sm",children:h})]}),i[9]=h,i[10]=r):r=i[10],r}function B(e){let s,a,l,r,i,d,c,o,x=(0,n.c)(33),{title:m,mode:h,isRunning:u,saving:p,modelOptions:g,selectedModel:j,onModelChange:v,onBack:_,onEdit:b,onClone:f,onExportLocal:N,onExportProd:y,onRun:w,onCancel:k,onSave:C,onOpenBuilder:R}=e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(s={name:"chevronLeft"},x[0]=s):s=x[0],x[1]!==_?(a=(0,t.jsx)(F.K,{icon:s,label:"Back",tooltip:!0,size:"xs",variant:"outline",onClick:_}),x[1]=_,x[2]=a):a=x[2],x[3]!==h||x[4]!==m?(l="view"===h&&(0,t.jsx)("h1",{className:"truncate font-semibold",children:m}),x[3]=h,x[4]=m,x[5]=l):l=x[5],x[6]!==h?(r="edit"===h&&(0,t.jsx)("span",{className:"text-sm text-gray-10",children:"Editing evaluation"}),x[6]=h,x[7]=r):r=x[7],x[8]!==h||x[9]!==g||x[10]!==v||x[11]!==j?(i="view"===h&&g.length>0&&(0,t.jsxs)(V.l6,{value:j,onValueChange:v,children:[(0,t.jsx)(V.bq,{size:"xs",className:"w-52 shrink-0",children:(0,t.jsx)(V.yv,{placeholder:"Select model…"})}),(0,t.jsx)(V.gC,{children:g.map(D)})]}),x[8]=h,x[9]=g,x[10]=v,x[11]=j,x[12]=i):i=x[12],x[13]!==l||x[14]!==r||x[15]!==i?(d=(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[l,r,i]}),x[13]=l,x[14]=r,x[15]=i,x[16]=d):d=x[16],x[17]!==u||x[18]!==h||x[19]!==k||x[20]!==f||x[21]!==b||x[22]!==N||x[23]!==y||x[24]!==R||x[25]!==w||x[26]!==C||x[27]!==
1p?(c="view"===h?(0,t.jsxs)("div",{className:"flex shrink-0 gap-1.5",children:[(0,t.jsx)(T.$,{variant:"outline",size:"xs",onClick:b,children:"Edit"}),(0,t.jsx)(T.$,{variant:"outline",size:"xs",onClick:f,children:"Clone"}),(0,t.jsxs)(I.rI,{children:[(0,t.jsx)(I.ty,{render:(0,t.jsx)(T.$,{variant:"outline",size:"xs",children:"Export"})}),(0,t.jsxs)(I.SQ,{children:[(0,t.jsx)(I._2,{onClick:N,children:"Copy Local URL"}),(0,t.jsx)(I._2,{onClick:y,children:"Copy Prod URL"})]})]}),(0,t.jsx)(T.$,{size:"sm",onClick:w,disabled:u,children:u?"Running…":"Run Evaluation"})]}):(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(T.$,{variant:"outline",size:"sm",onClick:R,disabled:p,children:"Eval Builder"}),(0,t.jsx)(T.$,{variant:"outline",size:"sm",onClick:k,disabled:p,children:"Cancel"}),(0,t.jsx)(T.$,{size:"sm",onClick:C,disabled:p,children:p?"Saving…":"Save Changes"})]}),x[17]=u,x[18]=h,x[19]=k,x[20]=f,x[21]=b,x[22]=N,x[23]=y,x[24]=R,x[25]=w,x[26]=C,x[27]=p,x[28]=c):c=x[28],x[29]!==a||x[30]!==d||x[31]!==c?(o=(0,t.jsxs)($.u,{children:[a,d,c]}),x[29]=a,x[30]=d,x[31]=c,x[32]=o):o=x[32],o}function D(e){return(0,t.jsx)(V.eb,{value:e.id,children:e.label},e.id)}var O=!0;function H(e){let{evaluationId:s}=e,a=(0,_.r)(),n=(0,b.jL)(),c=(0,b.CU)(),I=v.h.useFormatYearMonthDay(),V=v.h.useFormatHourMinute(),D=v.h.useFormatTimeZone(),O=(0,l.useMemo)(()=>new x.c((0,h.Q)()),[]),H=(0,l.useRef)(null),[K,X]=(0,l.useState)("view"),[q,W]=(0,l.useState)(!1),[J,Q]=(0,l.useState)(!1),[Z,Y]=(0,l.useState)(null),ee=(0,b.GV)(f.yVP),es=(0,b.GV)(f.e$x),ea=(0,b.GV)(f.sL6),et=(0,b.GV)(f.v5e),en=(0,b.GV)(f.XaB),el=(0,b.GV)(f.W4w),er=(0,b.GV)(f.A5S),ei=(0,w.KT)(a.query.model)??null,ed=(0,b.GV)(f.lk3),ec=(0,b.GV)(f.Rir),eo=(0,b.GV)(f.LkE),ex=(0,b.GV)(f.H$z),em=(0,b.GV)(f.AsN),eh=(0,b.GV)(f.$R),eu=(0,b.GV)(f.c0A),ep=(0,b.GV)(f.kXm),{modelOptions:eg,agentTypeDefaultModelId:ej}=(0,l.useMemo)(()=>{if(!ee)return{modelOptions:[],agentTypeDefaultModelId:null};let e=(0,m.WN)(ep,ee.agent_type,eu),s=(0,m.jk)(ep,ee.agent_type,eu),a=new Map;for(let e of s)a.set(e.id,{label:e.model,maxContext:e.max_context});for(let e of ee.available_models??[])a.has(e)||a.set(e,{label:e.replace(/_/g," "),maxContext:0});let t=new Map;for(let{label:e}of a.values())t.set(e,(t.get(e)??0)+1);for(let[e,s]of a)if((t.get(s.label)??0)>1&&s.maxContext>0){let t=Math.round(s.maxContext/1e3);a.set(e,{...s,label:`${s.label} (${t}k)`})}let n=Array.from(a.entries());return n.sort((s,a)=>s[0]===e?-1:a[0]===e?1:s[1].label.localeCompare(a[1].label)),{modelOptions:n.map(s=>{let[a,{label:t}]=s;return{id:a,label:a===e?`${t} (default)`:t}}),agentTypeDefaultModelId:e}},[ee,ep,eu]),ev=ei??ej,e_=er.includes(s),eb=Intl.DateTimeFormat().resolvedOptions().timeZone,ef=(0,p.k)(a.query.callbackUrl,"/internal/agentic-evaluations"),eN=(0,p.k)(a.asPath,`/internal/agentic-evaluations/${s}`),ey="edit"===K&&null!==Z&&!o()(Z,ed);(0,j.M)({enabled:ey&&!eo,router:a}),(0,l.useEffect)(()=>{n((0,f.F2R)()),n((0,N.mI)({evaluationId:s})),n((0,N.a_)())},[n,s]),(0,l.useEffect)(()=>{ev&&n((0,N.Ix)({evaluationId:s,page:1,modelId:ev}))},[n,ev,s]),"edit"===K&&eh&&eh!==H.current&&(H.current=eh,Q(!0));let ew=(0,l.useCallback)(()=>{el?.next_page&&n((0,N.Ix)({evaluationId:s,page:el.next_page,modelId:ev}))},[n,ev,s,el]),ek=(0,l.useCallback)(()=>{el?.prev_page&&n((0,N.Ix)({evaluationId:s,page:el.prev_page,modelId:ev}))},[n,ev,s,el]),eC=(0,l.useCallback)(e=>{if(!e)return;let s={...a.query,model:e};a.replace({pathname:a.pathname,query:s},void 0,{shallow:!0})},[a]),eR=(0,l.useCallback)(async e=>{n((0,f.gwj)()),n((0,f.UXg)(s));try{let t=await O.runEvaluation(s,{session_config:e});a.push(`/internal/agentic-evaluations/runs/${t.run_id}?callbackUrl=${encodeURIComponent(eN)}`)}catch(e){console.error("Failed to run evaluation:",e),y.J.add({type:"error",description:"Failed to start evaluation run"}),n((0,f.LUQ)(s))}},[O,eN,n,s,a]),e$=(0,l.useCallback)(()=>{ee&&n((0,f.aw8)({evaluationId:ee.id,agentType:ee.agent_type}))},[n,ee]),eE=(0,l.useCallback)(()=>{ee&&(n((0,f.VR)(ee)),Y((0,f.lk3)(c.getState()))),W(!1),X("edit")},[n,ee,c]),eS=(0,l.useCallback)(()=>{W(!1),Y(null),X("view")},[]),eT=(0,l.useCallback)(()=>{a.push(`/internal/agentic-evaluations/new?cloneFrom=${s}&callbackUrl=${encodeURIComponent(eN)}`)},[eN,a,s]),eA=(0,l.useCallback)(async()=>
1{if(W(!0),ec){n((0,f.$r)(!0)),n((0,f.j8A)(null));try{let e=await O.updateEvaluation(s,ed);Y(ed),n((0,f.cXs)(e)),X("view")}catch(e){n((0,f.j8A)(e instanceof Error?e.message:"Failed to save"))}finally{n((0,f.$r)(!1))}}},[O,n,s,ed,ec]),eI=(0,l.useCallback)(()=>{n((0,f.ijO)())},[n]),eF=(0,l.useCallback)(async e=>{if(!ee)return;let s={name:ee.name,description:ee.description??"",agent_type:ee.agent_type,initial_prompt:ee.initial_prompt,assertions:ee.assertions,driver_config:{max_turns:ee.driver_config.max_turns??void 0,driver_objective:ee.driver_config.driver_objective??void 0,chat_config:ee.driver_config.chat_config??void 0,key_facts:ee.driver_config.key_facts??void 0,memories:ee.driver_config.memories??void 0},preprocess_instruction:ee.preprocess_instruction??void 0,follow_up_instruction:ee.follow_up_instruction??void 0,tags:ee.tags??[]};try{let a=await (0,u.H)(s),t=new URLSearchParams({prefill:a}),n=`${e}/internal/agentic-evaluations/new?${t.toString()}`;await navigator.clipboard.writeText(n),y.J.add({type:"success",description:"URL copied"})}catch(e){console.error("Failed to copy export URL:",e),y.J.add({type:"error",description:"Failed to copy URL"})}},[ee]),ez=(0,l.useCallback)(()=>{eF("http://localhost:3001")},[eF]),eV=(0,l.useCallback)(()=>{eF("https://mindtrip.ai")},[eF]),eP=ee?.name??"Evaluation Detail",eL=ee?.agent_type===i.TD?ee.driver_config.chat_config??null:null,eU=ee?.driver_config.key_facts??[],eG=ee?.driver_config.memories??[];return es?(0,t.jsxs)(r.A,{title:`${eP} | mindtrip`,children:[(0,t.jsxs)($.u,{className:"px-0",children:[(0,t.jsx)(F.K,{icon:{name:"chevronLeft"},label:"Back",tooltip:!0,size:"xs",variant:"outline",onClick:()=>a.push(ef)}),(0,t.jsx)("div",{className:"container mx-auto flex items-center px-(--container-pad)",children:(0,t.jsx)("span",{className:"font-semibold",children:eP})})]}),(0,t.jsx)("div",{className:"flex justify-center py-16",children:(0,t.jsx)(z.R,{})})]}):ea||!ee?(0,t.jsxs)(r.A,{title:"Evaluation | mindtrip",children:[(0,t.jsxs)($.u,{className:"px-0",children:[(0,t.jsx)(F.K,{icon:{name:"chevronLeft"},label:"Back",tooltip:!0,size:"xs",variant:"outline",onClick:()=>a.push(ef)}),(0,t.jsx)("div",{className:"container mx-auto flex items-center px-(--container-pad)",children:(0,t.jsx)("span",{className:"font-semibold",children:"Error"})})]}),(0,t.jsx)("div",{className:"container mx-auto px-(--container-pad) py-8",children:(0,t.jsx)("div",{className:"py-8 text-center text-red-10",children:ea??"Evaluation not found"})})]}):(0,t.jsxs)(r.A,{title:`${eP} | mindtrip`,children:[(0,t.jsx)(B,{title:eP,mode:K,isRunning:e_,saving:eo,modelOptions:eg,selectedModel:ev??void 0,onModelChange:eC,onBack:()=>a.push(ef),onEdit:eE,onClone:eT,onExportLocal:ez,onExportProd:eV,onRun:e$,onCancel:eS,onSave:eA,onOpenBuilder:eI}),(0,t.jsx)("div",{className:"container mx-auto px-(--container-pad) py-4",children:"view"===K?(0,t.jsxs)(t.Fragment,{children:[ee.description&&(0,t.jsx)("p",{className:"mb-4 text-sm text-gray-10",children:ee.description}),ee.tags.length>0&&(0,t.jsx)("div",{className:"mb-4 flex flex-wrap gap-1.5",children:ee.tags.map(e=>(0,t.jsx)(S.E,{color:"gray",size:1,children:e},e))}),(0,t.jsxs)("div",{className:"mb-4 grid gap-3 sm:grid-cols-5",children:[(0,t.jsxs)("div",{className:"rounded-lg bg-background px-3 py-2 shadow-ring-xs",children:[(0,t.jsx)("div",{className:"text-xs text-gray-10",children:"Avg Score (30d)"}),(0,t.jsx)("div",{children:ee.total_runs_30d>0?(0,t.jsx)("span",{className:(0,d.cn)("text-lg font-semibold",(0,g.Co)(ee.avg_score_30d)),children:`${(100*ee.avg_score_30d).toFixed(0)}%`}):ee.total_runs>0?(0,t.jsx)("span",{className:"text-lg font-semibold text-gray-10",children:`${(100*ee.avg_score).toFixed(0)}%`}):(0,t.jsx)("span",{className:"text-lg font-semibold text-gray-10",children:"-"})})]}),(0,t.jsxs)("div",{className:"rounded-lg bg-background px-3 py-2 shadow-ring-xs",children:[(0,t.jsx)("div",{className:"text-xs text-gray-10",children:"Avg Time (30d)"}),(0,t.jsx)("div",{className:"text-lg font-semibold",children:null!=ee.avg_time_ms_30d?(0,t.jsx)("span",{children:(0,g.jB)(ee.avg_time_ms_30d)}):null!=ee.avg_time_ms?(0,t.jsx)("span",{className:"text-gray-10",children:(0,g.jB)(ee.avg_time_ms)}):(0,t.jsx)("span",{className:"text-gray-10",children:"-"})})]}),(0,t.jsxs)("div",{className:"rounded-lg bg-background px-3 py-2 shadow-ring-xs",children:[(0,t.jsx)("div",{className:"text-xs text-gray-10",children:"Runs (30d)"}),(0,t.jsxs)("div",{className:"text-lg font-semibold",children:[(0,t.jsx)("span",{children:ee.total_runs_30d}),ee.total_runs!==ee.total_runs_30d&&(0,t.jsxs)("span",{className:"ml-1 text-xs font-normal text-gray-10",children:["(",ee.total_runs,")"]})]})]}),(0,t.jsxs)("div",{className:"rounded-lg bg-background px-3 py-2 shadow-ring-xs",children:[(0,t.jsx)("div",{className:"text-xs text-gray-10",children:"Latest Status"}),(0,t.jsx)("div",{className:"text-lg font-semibold",children:ee.latest_status?(0,g.vi)(ee.latest_status):"-"})]}),(0,t.jsxs)("div",{className:"rounded-lg bg-background px-3 py-2 shadow-ring-xs",children:[(0,t.jsx)("div",{className:"text-xs text-gray-10",children:"Last Run"}),(0,t.jsx)("div",{className:"text-sm font-semibold",children:ee.latest_run_at?`${I(ee.latest_run_at,eb)} ${V(ee.latest_run_at,eb)}`:"-"})]})]}),(0,t.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"rounded-lg bg-background shadow-ring-xs",children:[(0,t.jsx)("div",{className:"border-b px-3 py-2",children:(0,t.jsx)("h3",{className:"text-sm font-medium",children:"Test Configuration"})}),(0,t.jsxs)("div",{className:"p-3",children:[(0,t.jsxs)("dl",{className:"grid grid-cols-2 gap-3 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-gray-10",children:"Agent Type"}),(0,t.jsx)("dd",{className:"font-mono text-xs",children:ee.agent_type})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-gray-10",children:"Max Iterations"}),(0,t.jsx)("dd",{children:ee.max_iterations})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-gray-10",children:"Max Turns"}),(0,t.jsx)("dd",{children:ee.driver_config.max_turns??"Default"})]}),eL?.bot&&(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-gray-10",children:"Chat Bot"}),(0,t.jsx)("dd",{children:eL.bot})]}),eL?.vertical&&(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-gray-10",children:"Chat Vertical"}),(0,t.jsx)("dd",{children:eL.vertical})]}),eL?.orgid&&(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-gray-10",children:"Organization"}),(0,t.jsx)("dd",{children:eL.orgid})]})]}),eU.length>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("dt",{className:"text-sm text-gray-10",children:"Key Facts"}),(0,t.jsx)("dd",{className:"mt-1 space-y-1",children:eU.map((e,s)=>(0,t.jsx)("div",{className:"rounded bg-subtle p-2 text-sm whitespace-pre-wrap",children:e},s))})]}),eG.length>0&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("dt",{className:"text-sm text-gray-10",children:"Memories"}),(0,t.jsx)("dd",{className:"mt-1 space-y-1",children:eG.map((e,s)=>(0,t.jsxs)("div",{className:"rounded bg-subtle p-2 text-sm",children:[(0,t.jsxs)("div",{className:"font-mono text-xs",children:[e.path,"/",e.key]}),(0,t.jsx)("div",{className:"mt-1 whitespace-pre-wrap",children:e.value})]},s))})]}),(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("dt",{className:"text-sm text-gray-10",children:"Initial Prompt"}),(0,t.jsx)("dd",{className:"mt-1 rounded bg-subtle p-2 text-sm whitespace-pre-wrap",children:ee.initial_prompt})]}),ee.driver_config.driver_objective&&(0,t.jsxs)("div",{className:"mt-3",children:[(0,t.jsx)("dt",{className:"text-sm text-gray-10",children:"Driver Objective"}),(0,t.jsx)("dd",{className:"mt-1 rounded bg-subtle p-2 text-sm whitespace-pre-wrap",children:ee.driver_config.driver_objective})]})]})]}),ee.preprocess_instruction&&(0,t.jsxs)("div",{className:"rounded-lg bg-background shadow-ring-xs",children:[(0,t.jsx)("div",{className:"border-b px-3 py-2",children:(0,t.jsx)("h3",{className:"text-sm font-medium",children:"Preprocessing Instruction"})}),(0,t.jsx)("div",{className:"px-3 py-2",children:(0,t.jsx)("p",{className:"text-sm whitespace-pre-wrap",children:ee.preprocess_instruction})})]}),ee.follow_up_instruction&&(0,t.jsxs)("div",{className:"rounded-lg bg-background shadow-ring-xs",children:[(0,t.jsx)("div",{className:"border-b px-3 py-2",children:(0,t.jsx)("h3",{className:"text-sm font-medium",children:"Follow-Up Instruction"})}),(0,t.jsx)("div",{className:"px-3 py-2",children:(0,t.jsx)("p",{className:"text-sm whitespace-pre-wrap",children:ee.follow_up_instruction})})]}),ee.session_user&&(0,t.jsx)(M,{user:ee.session_user})]}),(0,t.jsxs)("div",{className:"rounded-lg bg-background shadow-ring-xs",children:[(0,t.jsx)("div",{className:"border-b px-3 py-2",children:(0,t.jsx)(L,{assertions:ee.assertions})}),(0,t.jsxs)("div",{className:"divide-y",children:[null!=ee.assertions.time_target_seconds&&(0,t.jsxs)("div",{className:"px-3 py-2",children:[(0,t.jsx)("span",{className:"text-xs text-gray-10",children:"Time target"}),(0,t.jsxs)("p",{className:"text-sm",children:[ee.assertions.time_target_seconds," seconds"]})]}),ee.assertions.items.map((e,s)=>(0,t.jsxs)("div",{className:"px-3 py-2",children:[(0,t.jsx)("div",{className:"mb-1 flex items-center gap-2",children:(0,t.jsx)(U,{severity:e.severity})}),(0,t.jsx)("p",{className:"text-sm",children:e.assertion})]},s))]})]})]}),(0,t.jsxs)("div",{className:"mt-6",children:[(0,t.jsx)("h3",{className:"mb-3 text-sm font-medium",children:"Run History"}),en?(0,t.jsx)("div",{className:"flex justify-center py-8",children:(0,t.jsx)(z.R,{})}):0===et.length?(0,t.jsx)("div",{className:"py-8 text-center text-gray-10",children:'No runs yet. Click "Run Evaluation" to start.'}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(P.XI,{children:[(0,t.jsx)(P.A0,{children:(0,t.jsxs)(P.MS,{children:[(0,t.jsx)(P.nd,{children:"Run ID"}),(0,t.jsx)(P.nd,{children:"Status"}),(0,t.jsx)(P.nd,{children:"Assertions"}),(0,t.jsx)(P.nd,{children:"Time"}),(0,t.jsx)(P.nd,{children:"Turns"}),(0,t.jsx)(P.nd,{children:"Duration"}),(0,t.jsxs)(P.nd,{children:["Started (",(0,t.jsx)("span",{className:"no-translate",children:D(eb)}),")"]})]})}),(0,t.jsx)(P.BF,{children:et.map(e=>(0,t.jsxs)(P.Hj,{href:`/internal/agentic-evaluations/runs/${e.id}?callbackUrl=${encodeURIComponent(eN)}`,children:[(0,t.jsxs)(P.nA,{children:["#",e.id]}),(0,t.jsx)(P.nA,{children:(0,g.vi)(e.status)}),(0,t.jsx)(P.nA,{children:(0,t.jsxs)("span",{className:e.passed_count===e.total_count?"text-green-10":"text-red-10",children:[e.passed_count,"/",e.total_count]})}),(0,t.jsx)(P.nA,{children:null!=e.time_target_result?(0,t.jsx)(G,{result:e.time_target_result}):(0,t.jsx)("span",{className:"text-gray-10",children:"-"})}),(0,t.jsx)(P.nA,{children:e.total_turns??"-"}),(0,t.jsx)(P.nA,{children:(0,g.jB)(e.execution_time_ms)}),(0,t.jsxs)(P.nA,{className:"text-xs whitespace-nowrap",children:[(0,t.jsx)("span",{className:"no-translate",children:I(e.created_at,eb)}),"\xa0",(0,t.jsx)("span",{className:"no-translate",children:V(e.created_at,eb)})]})]},e.id))})]}),el&&et.length>0&&(0,t.jsx)("div",{className:"mt-4 flex justify-center",children:(0,t.jsx)(E.d,{currPage:el.current_page,maxPage:el.total_pages,loading:en,handlePrevPage:el.prev_page?ek:void 0,handleNextPage:el.next_page?ew:void 0})})]})]})]}):(0,t.jsxs)("div",{className:"rounded-lg bg-background p-6 shadow-ring-xs",children:[ex&&(0,t.jsx)("div",{className:"mb-6 rounded-md bg-red-2 p-4 text-sm text-red-10",children:ex}),(0,t.jsx)(R.N,{availableAgentTypes:eu,showValidation:q})]})}),(0,t.jsx)(k.F,{}),(0,t.jsx)(A.lG,{open:J,onOpenChange:Q,children:(0,t.jsxs)(A.Cf,{size:"auto",children:[(0,t.jsx)(A.c7,{children:(0,t.jsx)(A.L3,{children:"Generated Evaluation Draft"})}),(0,t.jsx)(A.R4,{children:(0,t.jsxs)("div",{className:"w-[640px] space-y-4",children:[(0,t.jsx)("p",{className:"text-sm whitespace-pre-wrap",children:em}),(0,t.jsxs)("div",{className:"rounded-md border border-amber-5 bg-amber-2 p-3 text-sm text-amber-12",children:[(0,t.jsx)("strong",{children:"This evaluation has NOT been saved."})," Review all generated fields, then click ",(0,t.jsx)("strong",{children:"Save Changes"})," to persist it."]})]})}),(0,t.jsx)(A.Es,{children:(0,t.jsx)(T.$,{onClick:()=>Q(!1),children:"Review Draft"})})]})}),(0,t.jsx)(C.S,{title:ee?`Run: ${ee.name}`:"Run Evaluation",running:e_,onRun:e=>void eR(e)})]})}},78115:(e,s,a)=>{"use strict";a.d(s,{d:()=>d});var t=a(37876),n=a(27964),l=a(14232),r=a(2692),i=a(83310);function d(e){let s,a,d=(0,n.c)(15),{currPage:c,maxPage:o,loading:x,handlePrevPage:m,handleNextPage:h,handleGoToPage:u,prevPageHref:p,nextPageHref:g}=e,j=void 0===c?1:c,v=void 0===o?1:o,_=void 0!==x&&x,[b,f]=(0,l.useState)("");d[0]!==u||d[1]!==v||d[2]!==b?(s=e=>{"Enter"===e.key&&(()=>{if(!u||!b)return;let e=parseInt(b,10);e>v&&(e=v),e<1&&(e=1),u(e),f("")})()},d[0]=u,d[1]=v,d[2]=b,d[3]=s):s=d[3];let N=s;return d[4]!==j||d[5]!==u||d[6]!==N||d[7]!==h||d[8]!==m||d[9]!==_||d[10]!==v||d[11]!==g||d[12]!==b||d[13]!==p?(a=(0,t.jsx)(t.Fragment,{children:v>1&&!_?(0,t.jsxs)("div",{className:"my-8 flex items-center justify-center gap-4",children:[(0,t.jsx)(r.K,{variant:"outline",size:"sm",icon:{name:"chevronLeft",className:"text-[1.125em]",strokeWidth:3},label:"Previous",...1===j?{disabled:!0}:{href:p},onClick:m}),u&&v>1?(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(i.ks,{type:"number",min:1,max:v,value:b,onChange:e=>f(e.target.value),onKeyDown:N,placeholder:String(j),className:"h-8! w-14 px-2 text-center text-xs! leading-8! text-foreground placeholder:text-foreground",size:"sm"}),(0,t.jsxs)("span",{className:"text-muted",children:["of ",v]})]}):(0,t.jsxs)("span",{className:"text-xs text-muted",children:["Page ",j," of ",v]}),(0,t.jsx)(r.K,{variant:"outline",size:"sm",icon:{name:"chevronRight",className:"text-[1.125em]",strokeWidth:3},label:"Next",...j>=v?{disabled:!0}:{href:g},onClick:h})]}):(0,t.jsx)("div",{className:"h-16"})}),d[4]=j,d[5]=u,d[6]=N,d[7]=h,d[8]=m,d[9]=_,d[10]=v,d[11]=g,d[12]=b,d[13]=p,d[14]=a):a=d[14],a}},81684:(e,s,a)=>{"use strict";a.d(s,{A0:()=>d,BF:()=>o,Hj:()=>x,MS:()=>c,XI:()=>i,nA:()=>h,nd:()=>m});var t=a(37876),n=a(14232),l=a(74302),r=a(28104);let i=(0,n.forwardRef)((e,s)=>{let{className:a,...n}=e;return(0,t.jsx)("table",{ref:s,className:(0,l.cn)("w-full caption-bottom",a),...n})});i.displayName="Table";let d=(0,n.forwardRef)((e,s)=>{let{className:a,...n}=e;return(0,t.jsx)("thead",{ref:s,className:(0,l.cn)("[&_tr]:border-b",a),...n})});d.displayName="TableHeader";let c=(0,n.forwardRef)((e,s)=>{let{className:a,...n}=e;return(0,t.jsx)("tr",{ref:s,className:(0,l.cn)("bg-background/80 shadow-[inset_0_-1px_0_0_var(--color-separator)] backdrop-blur-md",a),...n})});c.displayName="TableHeaderRow";let o=(0,n.forwardRef)((e,s)=>{let{className:a,...n}=e;return(0,t.jsx)("tbody",{ref:s,className:(0,l.cn)("[&_tr:last-child]:border-0",a),...n})});o.displayName="TableBody",(0,n.forwardRef)((e,s)=>{let{className:a,...n}=e;return(0,t.jsx)("tfoot",{ref:s,className:(0,l.cn)("border-t bg-subtle font-medium last:[&>tr]:border-b-0",a),...n})}).displayName="TableFooter";let x=(0,n.forwardRef)((e,s)=>{let{className:a,hover:i=!0,href:d,children:c,...o}=e,x=c;return d&&(x=n.Children.toArray(c).map(e=>{if(!(0,n.isValidElement)(e))return e;let s=e.props.className,a=(0,t.jsx)(r.N,{href:d,className:"absolute inset-0 z-0",tabIndex:-1,"aria-hidden":"true"});return(0,n.cloneElement)(e,{className:(0,l.cn)(s,"relative")},a,e.props.children)})),(0,t.jsx)("tr",{ref:s,className:(0,l.cn)("border-b",i&&"hover:bg-subtle",d&&"relative cursor-pointer [&_td_a:not([aria-hidden])]:relative [&_td_a:not([aria-hidden])]:z-1 [&_td_button]:relative [&_td_button]:z-1",a),...o,children:x})});x.displayName="TableRow";let m=(0,n.forwardRef)((e,s)=>{let{className:a,...n}=e;return(0,t.jsx)("th",{ref:s,className:(0,l.cn)("h-[3.5em] px-[1em] text-left align-middle font-semibold [&:has([role=checkbox])]:pr-0",a),...n})});m.displayName="TableHead";let h=(0,n.forwardRef)((e,s)=>{let{className:a,...n}=e;return(0,t.jsx)("td",{ref:s,className:(0,l.cn)("p-[1em] align-middle [&:has([role=checkbox])]:pr-0",a),...n})});h.displayName="TableCell",(0,n.forwardRef)((e,s)=>{let{className:a,...n}=e;return(0,t.jsx)("caption",{ref:s,className:(0,l.cn)("mt-[1em] text-sm text-
1muted",a),...n})}).displayName="TableCaption"}},e=>{e.O(0,[770,8901,9117,929,1294,7142,8404,8913,3200,4260,8138,9e3,5307,3022,1857,3753,5283,9690,6593,636,8792],()=>e(e.s=20872)),_N_E=e.O()}]);
2//# sourceMappingURL=[id]-66e702270aee490f.js.map

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.