PageSourceSearch

https://app.jungleai.com/assets/QuestionGenerationEvalsPage-McY_4iV-.js

js jungleai.com collected 2026-09-24 12:17:44 UTC 8,991 bytes, 2 lines download raw bytes

1import{j as e,R as G,r as s,Z as p,B as u,X as Q,_ as x,T as g,aK as D,aL as P,aM as Z,aN as Y}from"./MarketingSiteLoadingFallback-DF4Bevx8.js";import{V as H,u as $,h as f,B as A,T as L,ah as w}from"./renderJungleWebApp-Bj6DEPtG.js";import{F as v,L as K}from"./landingHandoffUploadClaim-ZWzmhSYt.js";import"./legacy-referrer-id-B23nat6c.js";import{E as X}from"./EvalsWorkspaceHeader-k9hAhAYL.js";import{I as T}from"./icon-button-BEFLF1_f.js";import{E as J}from"./ExternalLink-BYcpQ5TX.js";import{H as C}from"./h-stack-DavPIuKl.js";import{B as ee}from"./badge-Dq2M1c8-.js";import{C as ne}from"./code-By7Q2fVH.js";import"./frontend-release-DHVEZwfg.js";import"./hub-CmyV34zS.js";import"./index-rQLcFmgX.js";import"./track-error-fzCnz4fY.js";import"./main-CR0pPclt.js";import"./stripe-price-details-Q-KLtuJy.js";import"./document-upload-sentry-CwY_2GoS.js";import"./jungle_river-fkLKo0Re.js";import"./sentry-init-DYpmux4V.js";import"./client-environment-BMTHOZAb.js";const te=H({displayName:"SmallAddIcon",viewBox:"0 0 20 20",path:e.jsx("path",{fill:"currentColor",d:"M14 9h-3V6c0-.55-.45-1-1-1s-1 .45-1 1v3H6c-.55 0-1 .45-1 1s.45 1 1 1h3v3c0 .55.45 1 1 1s1-.45 1-1v-3h3c.55 0 1-.45 1-1s-.45-1-1-1z",fillRule:"evenodd"})}),I=H({displayName:"RepeatIcon",path:e.jsxs("g",{fill:"currentColor",children:[e.jsx("path",{d:"M10.319,4.936a7.239,7.239,0,0,1,7.1,2.252,1.25,1.25,0,1,0,1.872-1.657A9.737,9.737,0,0,0,9.743,2.5,10.269,10.269,0,0,0,2.378,9.61a.249.249,0,0,1-.271.178l-1.033-.13A.491.491,0,0,0,.6,9.877a.5.5,0,0,0-.019.526l2.476,4.342a.5.5,0,0,0,.373.248.43.43,0,0,0,.062,0,.5.5,0,0,0,.359-.152l3.477-3.593a.5.5,0,0,0-.3-.844L5.15,10.172a.25.25,0,0,1-.2-.333A7.7,7.7,0,0,1,10.319,4.936Z"}),e.jsx("path",{d:"M23.406,14.1a.5.5,0,0,0,.015-.526l-2.5-4.329A.5.5,0,0,0,20.546,9a.489.489,0,0,0-.421.151l-3.456,3.614a.5.5,0,0,0,.3.842l1.848.221a.249.249,0,0,1,.183.117.253.253,0,0,1,.023.216,7.688,7.688,0,0,1-5.369,4.9,7.243,7.243,0,0,1-7.1-2.253,1.25,1.25,0,1,0-1.872,1.656,9.74,9.74,0,0,0,9.549,3.03,10.261,10.261,0,0,0,7.369-7.12.251.251,0,0,1,.27-.179l1.058.127a.422.422,0,0,0,.06,0A.5.5,0,0,0,23.406,14.1Z"})]})}),b="http://127.0.0.1:8877",re="PYTHONPATH=.:question-gen-agent-evals:question-gen-agent python3 question-gen-agent-evals/review_interface/server.py",se="jungle-question-gen-evals-status";function ae(n){const t=typeof n=="string"&&n.trim()?n.trim():b;try{const c=new URL(t);return["http:","https:"].includes(c.protocol)?(c.search="",c.hash="",c.toString().replace(/\/$/,"")):b}catch{return b}}function ie(n){const t=new URL(n);return t.searchParams.set("embedded","1"),t.toString()}function oe(n){return new URL("/api/health",n).toString()}function le(n){if(!n||typeof n!="object")return!1;const t=n;return t.type===se&&["loading","ready","error"].includes(String(t.status))}function ce(){const{t:n}=$(),t=s.useMemo(()=>ae(void 0),[]),c=s.useMemo(()=>ie(t),[t]),j=s.useMemo(()=>oe(t),[t]),y=s.useMemo(()=>new URL(t).origin,[t]),R=s.useRef(null),[r,m]=s.useState("checking"),[M,_]=s.useState(null),[U,B]=s.useState(0),W=p("#F7F5EF","gray.900"),E=p("rgba(255, 255, 255, 0.88)","gray.800"),S=p("rgba(28, 33, 39, 0.1)","whiteAlpha.200"),d=p(f.text.label,"gray.400"),z=p("gray.50","gray.900"),k=n("admin_question_gen_evals_unavailable_message","The local review server could not load its artifacts."),h=s.useCallback(async()=>{m("checking"),_(null);const o=new AbortController,l=window.setTimeout(()=>o.abort(),5e3);try{const a=await fetch(j,{cache:"no-store",signal:o.signal}),i=await a.json().catch(()=>({}));if(!a.ok||(i==null?void 0:i.ok)!==!0){_((i==null?void 0:i.error)||k),m("error");return}m("loading")}catch(a){const i=a instanceof TypeError||a instanceof DOMException&&a.name==="AbortError";_(!i&&a instanceof Error?a.message:null),m("offline")}finally{window.clearTimeout(l)}},[j,k]);s.useEffect(()=>{h()},[h]),s.useEffect(()=>{const o=l=>{var a;l.origin!==y||l.source!==((a=R.current)==null?void 0:a.contentWindow)||!le(l.data)||(_(l.data.message||null),m(l.data.status))};return window.addEventListener("message",o),()=>window.removeEventListener("message",o)},[y]);const q=s.useCallback(()=>{B(o=>o+1),h()}
1,[h]),F=s.useCallback(()=>{window.open(t,"_blank","noopener,noreferrer")},[t]),V={checking:n("admin_question_gen_evals_checking_short","Checking"),offline:n("admin_question_gen_evals_offline","Review server offline"),loading:n("admin_question_gen_evals_loading","Loading review"),ready:n("admin_question_gen_evals_ready","Review ready"),error:n("admin_question_gen_evals_error","Review failed")}[r],O=r==="ready"?"green":r==="error"?"red":r==="offline"?"orange":"gray",N=r==="loading"||r==="ready";return e.jsxs(u,{w:"100%",minH:"calc(100vh - 112px)",bg:W,p:{base:4,lg:6},children:[e.jsx(X,{activeTab:"question-runs",title:n("admin_question_gen_evals_title","Question generation evals"),description:n("admin_question_gen_evals_description","Inspect saved benchmark runs from aggregate scores down to source documents, questions, rubric outcomes, and judge evidence."),actions:e.jsxs(e.Fragment,{children:[e.jsx(A,{as:Q,to:"/generate-questions",title:n("admin_question_gen_evals_generate","Generate test questions"),size:"small",minH:"40px",LeftIcon:te,borderRadius:"full"}),e.jsx(L,{label:n("admin_question_gen_evals_open","Open standalone review"),children:e.jsx(T,{"aria-label":n("admin_question_gen_evals_open","Open standalone review"),icon:e.jsx(J,{}),size:"sm",minW:"40px",minH:"40px",borderRadius:"full",variant:"outline",onClick:F})})]})}),e.jsxs(u,{mt:5,borderWidth:"1px",borderColor:S,borderRadius:{base:"18px",md:"24px"},overflow:"hidden",bg:E,boxShadow:"0 20px 50px rgba(15, 23, 42, 0.07)",children:[e.jsxs(v,{minH:"52px",px:{base:3,md:4},py:2,align:"center",justify:"space-between",gap:3,borderBottomWidth:"1px",borderColor:S,children:[e.jsxs(C,{spacing:2,minW:0,children:[(r==="checking"||r==="loading")&&e.jsx(x,{size:"xs"}),e.jsx(ee,{colorScheme:O,variant:"subtle",borderRadius:"full",px:2.5,py:1,children:V}),e.jsx(g,{display:{base:"none",md:"block"},fontSize:"sm",color:d,noOfLines:1,children:n("admin_question_gen_evals_local_artifacts","Local artifacts stay on this machine")})]}),e.jsx(L,{label:n("admin_question_gen_evals_retry","Retry review connection"),children:e.jsx(T,{"aria-label":n("admin_question_gen_evals_retry","Retry review connection"),icon:e.jsx(I,{}),size:"sm",variant:"ghost",borderRadius:"full",onClick:q,isLoading:r==="checking"})})]}),N?e.jsxs(u,{position:"relative",minH:"760px",children:[e.jsx(u,{as:"iframe",ref:R,title:n("admin_question_gen_evals_iframe_title","Question generation evaluation review"),src:c,w:"100%",h:"calc(100vh - 286px)",minH:"760px",border:"0",opacity:r==="ready"?1:0,transition:"opacity 160ms ease",referrerPolicy:"no-referrer"},U),r==="loading"?e.jsx(v,{position:"absolute",inset:0,align:"center",justify:"center",bg:E,children:e.jsxs(w,{spacing:3,color:d,children:[e.jsx(x,{color:f.primaryAction.default}),e.jsx(g,{fontSize:"sm",children:n("admin_question_gen_evals_connecting","Loading the latest saved evaluation run")})]})}):null]}):r==="checking"?e.jsx(v,{minH:"520px",align:"center",justify:"center",children:e.jsxs(w,{spacing:3,color:d,children:[e.jsx(x,{color:f.primaryAction.default}),e.jsx(g,{fontSize:"sm",children:n("admin_question_gen_evals_checking","Checking the local review server")})]})}):e.jsx(v,{minH:"520px",align:"center",justify:"center",p:{base:5,md:10},children:e.jsxs(w,{align:"stretch",spacing:5,width:"100%",maxW:"720px",children:[e.jsxs(D,{status:r==="error"?"error":"warning",variant:"subtle",alignItems:"flex-start",borderRadius:"16px",p:5,children:[e.jsx(P,{mt:1}),e.jsxs(u,{children:[e.jsx(Z,{children:r==="error"?n("admin_question_gen_evals_failed_title","The evaluation run could not be loaded"):n("admin_question_gen_evals_start_title","Start the local review server")}),e.jsx(Y,{display:"block",mt:1,color:d,children:M||n("admin_question_gen_evals_start_description","This page reads saved evaluation artifacts from a server on your machine; it does not upload them to the web app.")})]})]}),e.jsxs(u,{children:[e.jsx(g,{fontSize:"xs",fontWeight:"700",textTransform:"uppercase",letterSpacing:"0.08em",color:d,children:n("admin_question_gen_evals_start_command","Start from the backend repository")}),e.jsx(ne,{display:"block",mt:2,p:4,borderRadius:"12px",bg:z,whiteSpace:"pre-wrap",overflowWrap:"anywhere",fontSize:"sm",children:re})]}),e.jsxs(C,{justify:"space-between",flexWrap:"wrap",gap:3,children:[e.jsxs(g,{fontSize:"sm",color:d,children:[n("admin_question_gen_evals_expected_url","Expected review URL"),":"," ",e.jsx(K,{href:t,isExternal:!0,color:f.primaryAction.default,fontWeight:"600",children:t})]}),e.jsx(A,{title:n("admin_question_gen_evals_retry","Retry review connection"),size:"small",LeftIcon:I,borderRadius:"full",onClick:q})]})]})})]})]})}const Le=G.memo(ce);export{ie as buildEmbeddedReviewUrl,oe as buildReviewHealthUrl,Le as default,ae as resolveQuestionGenerationEvalsUrl};
2//# sourceMappingURL=QuestionGenerationEvalsPage-McY_4iV-.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.