@spexcode/spec-dashboard 0.6.7 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/App-DANZYsFg.js +2 -0
- package/dist/assets/EmptyView-xnSRh3XP.js +1 -0
- package/dist/assets/EvalsPage-DDxIUAuR.js +2 -0
- package/dist/assets/FileView-DZaiEPRK.js +2 -0
- package/dist/assets/GraphStats-CxHsXNy-.js +1 -0
- package/dist/assets/GraphView-DHEhg_eI.js +26 -0
- package/dist/assets/IssuesPage-B5qjvpP1.js +1 -0
- package/dist/assets/MobileApp-fvc4gfCx.js +2 -0
- package/dist/assets/NodeView-D6JZc3ap.js +3 -0
- package/dist/assets/PageScroll-DE6nL5p-.js +1 -0
- package/dist/assets/ProjectsPage-I7XFn8kG.js +1 -0
- package/dist/assets/ProseActions-LG4ve4AO.js +7 -0
- package/dist/assets/Settings-D7NeDdd1.js +1 -0
- package/dist/assets/SpecView-mkyrBxLO.js +1 -0
- package/dist/assets/Thread-Cx5fJkFO.js +9 -0
- package/dist/assets/WorkspaceSurface-DgbzdTEl.js +2 -0
- package/dist/assets/index-B-qrQ2QS.js +40 -0
- package/dist/assets/index-RoVUefLX.js +13 -0
- package/dist/assets/index-nweIph9V.css +1 -0
- package/dist/assets/tabs-Brk4lg7l.css +32 -0
- package/dist/assets/tabs-BxFTq-sB.js +334 -0
- package/dist/index.html +3 -3
- package/dist-public/assets/App-Bz1E7Es7.js +2 -0
- package/dist-public/assets/EmptyView-CX3NC0Nq.js +1 -0
- package/dist-public/assets/EvalsPage-BBzomD1v.js +2 -0
- package/dist-public/assets/FileView-Cf5bY14h.js +2 -0
- package/dist-public/assets/GraphStats-CxHsXNy-.js +1 -0
- package/dist-public/assets/GraphView-5dgjv4t6.js +26 -0
- package/dist-public/assets/IssuesPage-B_knZkH6.js +1 -0
- package/dist-public/assets/MobileApp-BpnF0xSz.js +2 -0
- package/dist-public/assets/NodeView-cN_xZ1kR.js +3 -0
- package/dist-public/assets/PageScroll-CEYT-x2I.js +1 -0
- package/dist-public/assets/ProjectsPage-CWaOO-Y7.js +1 -0
- package/dist-public/assets/ProseActions-rr5Mm1WB.js +7 -0
- package/dist-public/assets/Settings-louVIHfW.js +1 -0
- package/dist-public/assets/SpecView-qZMzQH75.js +1 -0
- package/dist-public/assets/Thread-Ca_r1oDT.js +9 -0
- package/dist-public/assets/WorkspaceSurface-bsUptX-4.js +2 -0
- package/dist-public/assets/index-3mcnUCQ1.js +40 -0
- package/dist-public/assets/index-BmOx7kVX.js +13 -0
- package/dist-public/assets/index-nweIph9V.css +1 -0
- package/dist-public/assets/tabs-BL3Okd06.js +334 -0
- package/dist-public/assets/tabs-PFmT6UqQ.css +32 -0
- package/dist-public/index.html +3 -3
- package/package.json +9 -3
- package/dist/assets/App-CyvuxJYw.js +0 -2
- package/dist/assets/Dashboard-DUitEyrD.js +0 -27
- package/dist/assets/EvalsPage-PLgW05y7.js +0 -2
- package/dist/assets/IssuesPage-BcFWiFjF.js +0 -1
- package/dist/assets/MobileApp-Dky_U9DL.js +0 -2
- package/dist/assets/Modal-8cCCnDgy.js +0 -1
- package/dist/assets/PageScroll-GBlw382O.js +0 -1
- package/dist/assets/ProjectsPage-CdKKLnBH.js +0 -1
- package/dist/assets/SessionInterface-6GBZ9nXN.css +0 -32
- package/dist/assets/SessionInterface-Dp-rUO1H.js +0 -40
- package/dist/assets/SessionWindow-D2zgUVTT.js +0 -1
- package/dist/assets/Settings-7cKD-jHj.js +0 -1
- package/dist/assets/Thread-BkaL_dog.js +0 -13
- package/dist/assets/TimelineChat-Cp579UoJ.css +0 -1
- package/dist/assets/TimelineChat-DOKwQ3Sd.js +0 -276
- package/dist/assets/bindings-BC9vqpYU.js +0 -1
- package/dist/assets/data-CHkRTrsm.js +0 -1
- package/dist/assets/index-Ba-oHmxn.css +0 -1
- package/dist/assets/index-Di9gWPc6.js +0 -41
- package/dist/assets/sessionSurface-H34ExWBA.js +0 -1
- package/dist-public/assets/App-DebAWelc.js +0 -2
- package/dist-public/assets/Dashboard-DhuzsOUh.js +0 -27
- package/dist-public/assets/EvalsPage-CHc1tT-0.js +0 -2
- package/dist-public/assets/IssuesPage-BqojZnnr.js +0 -1
- package/dist-public/assets/MobileApp-DevENU8x.js +0 -2
- package/dist-public/assets/Modal-DAUYhrDn.js +0 -1
- package/dist-public/assets/PageScroll-Bxaqks4c.js +0 -1
- package/dist-public/assets/ProjectsPage-GHR6vTck.js +0 -1
- package/dist-public/assets/SessionInterface-6GBZ9nXN.css +0 -32
- package/dist-public/assets/SessionInterface-C0Fy_tWd.js +0 -40
- package/dist-public/assets/SessionWindow-CkdNpele.js +0 -1
- package/dist-public/assets/Settings-1XN_EQnW.js +0 -1
- package/dist-public/assets/Thread-BHCpsJIa.js +0 -13
- package/dist-public/assets/TimelineChat-N9RZ6v95.js +0 -276
- package/dist-public/assets/TimelineChat-dIRGbAJA.css +0 -1
- package/dist-public/assets/bindings-BC9vqpYU.js +0 -1
- package/dist-public/assets/data-BmO9k_xP.js +0 -1
- package/dist-public/assets/index-Ba-oHmxn.css +0 -1
- package/dist-public/assets/index-oM1cUuGR.js +0 -41
- package/dist-public/assets/sessionSurface-BNwc7E-I.js +0 -1
- /package/dist/assets/{Dashboard-BnuhLJ6X.css → GraphView-BnuhLJ6X.css} +0 -0
- /package/dist-public/assets/{Dashboard-BnuhLJ6X.css → GraphView-BnuhLJ6X.css} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u as _,E as le,d as G,j as s,s as Cs,I as ee,r as u,e as we,f as pe,g as Ts,h as Fs,k as es,n as As,q as Ps,l as Os}from"./index-oM1cUuGR.js";import{E as ss,R as ds,a as q,g as ke,b as B,L as Is,S as Ks,F as ns,s as ts,k as as,r as zs,e as Bs,c as _s,p as qs,d as Us,f as Te,h as D,i as Q,O as Vs,j as Hs,D as Fe,m as be,l as Xs,n as ls,u as Ys,o as Qs,q as Gs,t as Js,v as Zs,w as Ae,x as hs,y as Ds}from"./Thread-BHCpsJIa.js";import{c as Ws,d as en,e as sn,f as nn}from"./data-BmO9k_xP.js";import"./PageScroll-Bxaqks4c.js";const rs={video:"vid",image:"img",transcript:"txt",data:"data"},tn=["is","state","verdict","freshness","evidence","node","filer","session","scope"],vs=e=>`eval:${e.node}·${e.scenario}`;function an({e}){const a=_(),o=e.humanOk&&a("evalsFeed.okdTip",{by:e.humanOk.by,at:new Date(e.humanOk.ts).toLocaleString()});return s.jsx(ds,{state:s.jsx(B,{kind:"eval",state:e.state}),title:e.scenario,meta:s.jsxs(s.Fragment,{children:[s.jsx("a",{className:"ef-node",href:q(ke(e.node)),style:{color:`hsl(${e.hue??210} 60% 70%)`},"data-tip":e.node,children:e.node}),e.by&&s.jsx("span",{"data-tip":e.by,children:a("evalsFeed.filedBy",{by:zs(e.by)})}),s.jsx("span",{children:a("evalsFeed.filedAt",{at:ln(e.ts)})})]}),aside:s.jsxs(s.Fragment,{children:[e.inSession&&s.jsx("span",{className:"rl-tag in-session",children:a("evalsFeed.sessionTag")}),as(e).some(c=>rs[c])&&s.jsx("span",{className:"rl-tag",children:as(e).map(c=>rs[c]).filter(Boolean).join("·")}),e.humanOk&&s.jsx("span",{role:"img",className:"ef-okd","data-tip":o,"aria-label":o,children:s.jsx(ee,{name:"check",size:11})})]})})}const ln=e=>{const a=Math.max(0,(Date.now()-new Date(e).getTime())/1e3);return a<3600?`${Math.max(1,Math.floor(a/60))}m`:a<86400?`${Math.floor(a/3600)}h`:`${Math.floor(a/86400)}d`},W=(e,a,o,c=p=>p)=>{var p,h;return(((h=(p=e==null?void 0:e.facets)==null?void 0:p[a])==null?void 0:h.options)??[]).map(x=>({value:x.value,label:x.value===""?o:c(x.value)}))};function rn({pageData:e,loading:a=!1,sessions:o=[],queryText:c="",onQueryText:p,hrefFor:h,notice:x=null,leading:m=null,error:E=null,empty:y=null,pagination:$=null}){var se,re,J;const l=_(),f=String(c??"").trim()||le,L=(i,I)=>p(Cs(f,i,I)),T=Array.isArray(e==null?void 0:e.items)?e.items:[],P=((se=e==null?void 0:e.counts)==null?void 0:se.fail)||{},S=((re=e==null?void 0:e.counts)==null?void 0:re.pass)||{},w=((J=e==null?void 0:e.counts)==null?void 0:J.unmeasured)||0,R=i=>i>0?{text:`+${i} ${l("reviewList.freshness.stale")}`,compact:`+${i}`}:null,N=G(f,"verdict"),z=T.flatMap(i=>i.filterKind===ss.BLIND?[{key:`blind:${i.node}·${i.scenario}`,cls:"se-blind",content:s.jsx(ds,{state:s.jsx(B,{kind:"eval",state:"missing"}),title:i.scenario,meta:s.jsxs(s.Fragment,{children:[s.jsx("a",{className:"ef-node",href:q(ke(i.node)),style:{color:`hsl(${i.hue??210} 60% 70%)`},"data-tip":i.node,children:i.node}),s.jsx("span",{children:l("sessionEval.unmeasured")})]})})}]:i.filterKind===ss.RESULT?[{key:vs(i),label:i.scenario,href:h(i),content:s.jsx(an,{e:i})}]:[]),v={label:l("reviewList.facetReview"),value:G(f,"state"),options:W(e,"review",l("reviewList.all"),i=>l(i==="reviewed"?"reviewList.reviewed":"reviewList.needsReview"))},C={label:l("reviewList.facetFreshness"),value:G(f,"freshness"),options:W(e,"freshness",l("reviewList.all"),i=>l(`reviewList.freshness.${i}`))},O={label:l("reviewList.facetKind"),value:G(f,"evidence")||"all",options:W(e,"kind",l("evalsFeed.kind.all"),i=>l(`evalsFeed.kind.${i}`))},j={label:l("reviewList.facetSession"),value:G(f,"session"),options:W(e,"session",l("reviewList.all"),i=>l(i==="present"?"reviewList.sessionPresent":"reviewList.sessionMissing"))},ge=G(f,"evidence");return s.jsx(Is,{notice:x,leading:m,error:E,loading:a,title:l("evalsFeed.title"),search:{value:String(c??"").trim()?c:le,onSubmit:p,placeholder:l("reviewList.searchEvals"),label:l("reviewList.search"),keys:tn,suggest:{node:W(e,"node",l("reviewList.all")).filter(i=>i.value),filer:W(e,"filer",l("reviewList.all")).filter(i=>i.value).map(({value:i})=>{const I=o.find(U=>U.id===i);return{value:i,label:I?ts(I):null}}),scope:o.map(i=>({value:i.id,label:ts(i)}))}},sections:[{key:"fail",label:s.jsx(B,{kind:"eval",state:"fail",title:l("reviewList.verdict.fail"),showLabel:!0}),count:P.fresh||0,countSuffix:R(P.stale||0),active:N==="fail",onSelect:()=>L("verdict",N==="fail"?"":"fail")},{key:"pass",label:s.jsx(B,{kind:"eval",state:"pass",title:l("reviewList.verdict.pass"),showLabel:!0}),count:S.fresh||0,countSuffix:R(S.stale||0),active:N==="pass",onSelect:()=>L("verdict",N==="pass"?"":"pass")},{key:"unmeasured",label:s.jsx(B,{kind:"eval",state:"missing",title:l("reviewList.verdict.unmeasured"),showLabel:!0}),count:w,active:N==="unmeasured",onSelect:()=>L("verdict",N==="unmeasured"?"":"unmeasured")}],sectionMode:"filters",facets:s.jsxs(s.Fragment,{children:[s.jsx(ns,{label:C.label,value:C.value,options:C.options,clearLabel:l("reviewList.all"),onChange:i=>L("freshness",i)}),s.jsx(ns,{label:O.label,value:O.value,options:O.options,onChange:i=>L("evidence",i==="all"?"":i)})]}),secondaryFilters:s.jsx(Ks,{label:l("reviewList.filters"),clearLabel:l("reviewList.all"),groups:[{label:v.label,value:v.value,active:!!v.value,options:v.options,onChange:i=>L("state",i)},{label:j.label,value:j.value,active:!!j.value,options:j.options,onChange:i=>L("session",i)},{label:C.label,value:C.value,active:!!C.value,options:C.options,onChange:i=>L("freshness",i),mobileOnly:!0},{label:O.label,value:O.value,active:!!ge,options:O.options,clearLabel:null,onChange:i=>L("evidence",i==="all"?"":i),mobileOnly:!0}]}),rows:z,pagination:$,empty:y||{hasData:((e==null?void 0:e.sourceTotal)??0)>0,dataset:l("evalsFeed.datasetEmpty"),filtered:l("evalsFeed.noMatches")}})}const on=[{name:"ok",color:"green",when:e=>!e.okd&&e.isLatest,descKey:"annotator.cmd.okDesc"}];function cn(e,a){return on.filter(o=>o.when(e)).map(o=>({...o,run:a[o.name]}))}function un(e,a){return(e||"").replace(/\{(\w+)\}/g,(o,c)=>a[c]!=null?String(a[c]):o)}const os=(e,a)=>{let o=null;for(const c of e)if(c.at<=a)o=c;else break;return o},dn=e=>{if(!e||!Array.isArray(e.events))return null;const a=e.v===1?"time":typeof e.axis=="string"?e.axis:"time",o=e.v===1?c=>c.tMs:c=>c.at;return{axis:a,events:e.events.map(c=>({at:o(c),step:c.step,...c.node?{node:c.node}:{}}))}},hn=(e,a,o)=>e==="time"?be(a):e==="frame"?`#${a}`:e==="line"?`L${a}`:e==="index"?o?`${a}/${o}`:`${a}`:String(a);function is({events:e,axis:a,extent:o,activeStepIdx:c,onSeek:p}){return s.jsx("div",{className:"an-ruler",children:e.map((h,x)=>s.jsxs("button",{className:`an-step ${c===x?"on":""}`,onClick:()=>p(h.at),"data-tip":h.node?`→ ${h.node}`:void 0,children:[hn(a,h.at,o)," ",h.step]},x))})}const me=8;function vn({hidden:e,total:a,histIdx:o,onPick:c}){const p=_(),h=Ys(),x=p("annotator.abMore",{n:e.length});return s.jsxs("div",{className:"an-ab-more",ref:h.ref,children:[s.jsx(pe,{icon:"ellipsis",size:14,className:"an-ab-morebtn",label:x,"aria-haspopup":"menu","aria-expanded":h.open,onClick:m=>h.toggle(m.currentTarget),onKeyDown:h.onTriggerKeyDown}),h.open&&s.jsx("div",{className:"rl-menu an-ab-menu",role:"menu","aria-label":x,ref:h.menuRef,onKeyDown:h.onMenuKeyDown,children:e.map(m=>{const E=Te(m);return s.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":m.idx===o,tabIndex:-1,className:"rl-menu-item an-ab-menuitem",onFocus:h.onItemFocus,onClick:()=>{h.close(!0),c(m.idx)},children:[s.jsx(B,{kind:"eval",state:E,size:13}),s.jsxs("span",{className:"an-ab-menupos",children:[a-m.idx,"/",a]}),s.jsx("span",{className:"an-ab-menudate",children:new Date(m.ts).toLocaleString()})]},`${m.ts}-${m.idx}`)})})]})}function fn({entry:e,history:a,sourceKey:o="project",specs:c=[],sessions:p=[],onWrite:h,onOpenSession:x,listHref:m=null,backHref:E=null,backLabel:y=null,queue:$={prev:[],next:[]}}){var Qe,Ge,Je,Ze,De,We;const l=_(),f=u.useRef(null),L=u.useRef(null),T=u.useRef(null),P=u.useRef(null),S=u.useRef(0),[w,R]=u.useState([]),[N,z]=u.useState("time"),[v,C]=u.useState(null),[O,j]=u.useState(""),[ge,se]=u.useState(!1),[re,J]=u.useState(null),i=u.useRef(null),I=u.useRef(null),U=u.useRef(null),ye=u.useRef(0),[fs,Pe]=u.useState(0),[je,Oe]=u.useState(-1),[Ie,Ke]=u.useState(null),[oe,Ee]=u.useState(!1),[ze,Le]=u.useState(!1),[Ne,Se]=u.useState(null),[ie,Me]=u.useState(null),[F,Be]=u.useState(null),[A,ne]=u.useState(0),b=F&&F[A]||e,ms=`${A}:${b.ts||b.codeSha||b.blob||"reading"}`,xs=`${o}·${e.node}·${e.scenario}·${ms}`,[ps,bs]=u.useState([]);u.useEffect(()=>{let n=!0;return Ws().then(t=>{n&&Array.isArray(t)&&bs(t)}).catch(()=>{}),()=>{n=!1}},[]),u.useEffect(()=>{C(null),j(""),R([]),J(null),ne(0),Be(null),Be(Array.isArray(a)?a:[e])},[e.node,e.scenario,e.ts,e.blob,(Qe=e.humanOk)==null?void 0:Qe.ts,a]),u.useEffect(()=>{C(null),J(null)},[A]);const te=Bs(b),V=te.find(n=>n.kind==="video"&&n.state==="present"),ce=te.filter(n=>n.kind==="image"),ws=te.filter(n=>n.kind!=="video"&&n.kind!=="image"),H=!!V,ue=e.thread??null,$e=u.useMemo(()=>((ue==null?void 0:ue.replies)??[]).filter(n=>n.rid!==void 0),[ue]),_e=F&&((Ge=F[0])==null?void 0:Ge.by)||e.by||null,K=u.useMemo(()=>$e.map((n,t)=>{const r=_s(qs(n.body),w);return r&&r.seekable?{i:t,tMs:r.tMs,step:r.step,label:r.label}:null}).filter(Boolean).sort((n,t)=>n.tMs-t.tMs),[$e,w]),qe=u.useRef(w);qe.current=w;const Ue=u.useRef(K);Ue.current=K;const de=u.useCallback(()=>{const n=ye.current,t=qe.current;let r=-1;for(let g=0;g<t.length&&t[g].at<=n;g++)r=g;Oe(g=>g===r?g:r);let d=null;for(const g of Ue.current)if(g.tMs<=n)d=g.i;else break;Ke(g=>g===d?g:d)},[]);u.useEffect(()=>{de()},[K,w,de]),u.useEffect(()=>{ye.current=0,i.current&&(i.current.style.width="0%"),I.current&&(I.current.style.left="0%"),U.current&&(U.current.textContent=""),Oe(-1),Ke(null),Pe(0),Ee(!1),Le(!1),Se(null),Me(null)},[e.blob,e.scenario,e.node]),u.useEffect(()=>{if(R([]),z("time"),!b.timelineBlob)return;let n=!0;return fetch(we(`/api/evidence/${b.timelineBlob}`)).then(t=>t.ok?t.json():null).then(t=>{const r=n&&dn(t);r&&(R(r.events),z(r.axis))}).catch(()=>{}),()=>{n=!1}},[b.timelineBlob]),u.useEffect(()=>{const n=f.current;if(!n)return;const t=()=>{const k=Math.round((n.currentTime||0)*1e3),M=Math.round((n.duration||0)*1e3);ye.current=k;const Y=M?k/M*100:0;i.current&&(i.current.style.width=`${Y}%`),I.current&&(I.current.style.left=`${Y}%`),U.current&&(U.current.textContent=`${be(k)} / ${be(M)}`),de()},r=()=>{Pe(n.duration||0),t()},d=()=>Ee(!0),g=()=>Ee(!1);return n.addEventListener("timeupdate",t),n.addEventListener("seeked",t),n.addEventListener("loadedmetadata",r),n.addEventListener("durationchange",r),n.addEventListener("play",d),n.addEventListener("pause",g),r(),()=>{n.removeEventListener("timeupdate",t),n.removeEventListener("seeked",t),n.removeEventListener("loadedmetadata",r),n.removeEventListener("durationchange",r),n.removeEventListener("play",d),n.removeEventListener("pause",g)}},[V==null?void 0:V.hash,e.node,e.scenario,A,de]);const X=Math.round(fs*1e3),he=w[je]||null,Ve=N==="time"?X:N==="frame"?ce.length:N==="index"?w.length:0,Z=u.useCallback(n=>{const t=f.current;t&&(t.currentTime=n/1e3)},[]),ve=u.useCallback(()=>{const n=f.current;n&&(n.paused?n.play():n.pause())},[]),He=(n,t)=>{Me(n),t!=null&&Z(t)},fe=u.useCallback(async n=>{const t=f.current;if(!(t!=null&&t.videoWidth))return null;se(!0),j(l("annotator.capturing"));try{t.seeking&&await new Promise(M=>t.addEventListener("seeked",M,{once:!0}));const r=document.createElement("canvas");r.width=t.videoWidth,r.height=t.videoHeight;const d=r.getContext("2d");d.drawImage(t,0,0,r.width,r.height),n&&(d.strokeStyle="#ff9a3c",d.lineWidth=Math.max(2,r.width/300),d.strokeRect(n.x/100*r.width,n.y/100*r.height,n.w/100*r.width,n.h/100*r.height));const g=await new Promise(M=>r.toBlob(M,"image/png")),{hash:k}=await en(g);if(!k)throw new Error("no hash");return j(""),k}catch{return j(l("annotator.failed")),null}finally{se(!1)}},[l]),ks=u.useCallback(async()=>{var r;const n=f.current;if(!n)return null;n.pause();const t=Math.round((n.currentTime??0)*1e3);return{tMs:t,step:((r=os(w,t))==null?void 0:r.step)??null,frame:await fe(null)}},[w,fe]),Re=u.useCallback(async n=>{const t=f.current;if(!t)return;t.pause();const r=Math.round((t.currentTime||0)*1e3),d=os(w,r),g=await fe(n),k=[Us(r,d==null?void 0:d.step)];g&&k.push(``),d!=null&&d.node&&d.node!==e.node&&k.push(`re: [[${d.node}]]`),k.push(""),J({seq:++S.current,body:k.join(`
|
|
2
|
-
`)})},[w,e.node,fe]),Ce=u.useCallback(n=>{var d;if(!K.length)return;let t=K.findIndex(g=>g.i===ie);if(t<0){const g=Math.round((((d=f.current)==null?void 0:d.currentTime)||0)*1e3);t=K.reduce((k,M,Y)=>M.tMs<=g?Y:k,-1)}t=Math.min(K.length-1,Math.max(0,t+n));const r=K[t];Me(r.i),Z(r.tMs)},[K,ie,Z]);u.useEffect(()=>{if(!H)return;const n=t=>{const r=document.activeElement;if(r&&(r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.tagName==="SELECT"||r.isContentEditable))return;const d=f.current;d&&(t.key===" "?(t.preventDefault(),ve()):t.key==="ArrowRight"?(t.preventDefault(),d.currentTime=Math.min(d.duration||d.currentTime,d.currentTime+(t.shiftKey?1:5))):t.key==="ArrowLeft"?(t.preventDefault(),d.currentTime=Math.max(0,d.currentTime-(t.shiftKey?1:5))):t.key===","?(t.preventDefault(),d.currentTime=Math.max(0,d.currentTime-1/30)):t.key==="."?(t.preventDefault(),d.duration&&(d.currentTime=Math.min(d.duration,d.currentTime+1/30))):t.key==="ArrowDown"?(t.preventDefault(),Ce(1)):t.key==="ArrowUp"?(t.preventDefault(),Ce(-1)):(t.key==="a"||t.key==="A")&&(t.preventDefault(),Re(null)))};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[H,ve,Ce,Re]);const Xe=n=>{var d;const t=(d=T.current)==null?void 0:d.getBoundingClientRect(),r=f.current;!t||!t.width||!r||!r.duration||(r.currentTime=Math.min(1,Math.max(0,(n-t.left)/t.width))*r.duration)},gs=n=>{n.preventDefault(),Le(!0),Xe(n.clientX)},ys=n=>{var r;const t=(r=T.current)==null?void 0:r.getBoundingClientRect();t!=null&&t.width&&Se(Math.min(100,Math.max(0,(n.clientX-t.left)/t.width*100)))};u.useEffect(()=>{if(!ze)return;const n=r=>Xe(r.clientX),t=()=>Le(!1);return window.addEventListener("mousemove",n),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",t)}},[ze]);const Ye=n=>{const t=L.current.getBoundingClientRect();return{x:(n.clientX-t.left)/t.width*100,y:(n.clientY-t.top)/t.height*100}},js=n=>{if(n.button!==0||ge)return;const t=Ye(n);C({x0:t.x,y0:t.y,x:t.x,y:t.y})},Es=n=>{var r,d;if(!v)return;const t=Ye(n);!((r=f.current)!=null&&r.paused)&&(Math.abs(t.x-v.x0)>1||Math.abs(t.y-v.y0)>1)&&((d=f.current)==null||d.pause()),C({...v,x:t.x,y:t.y})},Ls=()=>{if(!v)return;const n={x:Math.min(v.x0,v.x),y:Math.min(v.y0,v.y),w:Math.abs(v.x-v.x0),h:Math.abs(v.y-v.y0)};if(C(null),n.w<1&&n.h<1){ve();return}Re(n)},ae=v&&{x:Math.min(v.x0,v.x),y:Math.min(v.y0,v.y),w:Math.abs(v.x-v.x0),h:Math.abs(v.y-v.y0)},Ns=async()=>{const n=await nn(e.node,e.scenario).catch(t=>({error:String(t)}));h==null||h((n==null?void 0:n.error)||"")},Ss=[...cn({okd:!!b.humanOk,isLatest:!F||A===0},{ok:Ns}).map(n=>({name:n.name,description:l(n.descKey),ui:!0,color:n.color,run:n.run})),...ps.map(n=>({name:n.name,description:n.desc||n.title,source:"review",prefill:()=>un(n.body,{node:e.node,scenario:e.scenario,expected:b.expected||""})}))],Ms=s.jsxs(s.Fragment,{children:[s.jsx(B,{kind:"eval",state:Te(b),showLabel:!0,className:"an-verdict-badge",size:16}),b.humanOk&&s.jsxs("span",{className:"an-okd","data-tip":l("annotator.okBy",{by:b.humanOk.by,at:new Date(b.humanOk.ts).toLocaleString()}),children:[s.jsx(ee,{name:"circle-check",size:14})," ",l("annotator.okd")]}),F&&F.length>1&&(()=>{const n=F.length,t=Math.min(me,n),r=A<me?Array.from({length:t},(k,M)=>t-1-M):[A,...Array.from({length:me-1},(k,M)=>me-2-M)],d=new Set(r),g=F.map((k,M)=>({...k,idx:M})).filter(k=>!d.has(k.idx));return s.jsxs("div",{className:"an-ab",children:[s.jsx(pe,{icon:"chevron-left",size:13,className:"an-ab-nav",disabled:A>=F.length-1,onClick:()=>ne(k=>Math.min(F.length-1,k+1)),label:l("annotator.abOlder")}),g.length>0&&s.jsx(vn,{hidden:g,total:n,histIdx:A,onPick:ne}),s.jsx("div",{className:"an-ab-track",children:r.map(k=>{const M=F[k],Y=Te(M);return s.jsx("button",{type:"button",className:`an-ab-pip ${k===A?"on":""}`,"aria-current":k===A?"true":void 0,onClick:()=>ne(k),"aria-label":`${n-k}/${n} · ${l(`score.${Y}`)} · ${new Date(M.ts).toLocaleString()}`,children:s.jsx(B,{kind:"eval",state:Y,size:13})},`${M.ts}-${k}`)})}),s.jsx(pe,{icon:"chevron-right",size:13,className:"an-ab-nav",disabled:A<=0,onClick:()=>ne(k=>Math.max(0,k-1)),label:l("annotator.abNewer")}),s.jsx("span",{className:"an-ab-pos",children:A===0?l("annotator.abLatest"):l("annotator.abPos",{i:F.length-A,n:F.length})})]})})()]}),$s=s.jsxs(s.Fragment,{children:[s.jsxs(D,{label:l("detail.sideReading"),children:[b.evaluator&&s.jsx(Q,{text:b.evaluator}),s.jsx(Q,{text:new Date(b.ts).toLocaleString()})]}),s.jsx(D,{label:l("detail.sideNode"),children:s.jsx(Q,{text:e.node,mono:!0,tip:l("session.issuesFocusNode"),href:q(ke(e.node))})}),_e&&s.jsx(D,{label:l("detail.sideFiler"),children:s.jsx(Vs,{originator:_e,sessions:p,kind:"eval",onOpenSession:x})}),b.humanOk&&s.jsxs(D,{label:l("detail.sideOk"),children:[s.jsx(Q,{text:`☑ ${b.humanOk.by}`}),s.jsx(Q,{text:new Date(b.humanOk.ts).toLocaleString(),dim:!0})]}),!b.fresh&&(((Je=b.staleAxes)==null?void 0:Je.length)??0)>0&&s.jsxs(D,{label:l("nodeView.eval.staleLabel"),children:[s.jsx(Q,{text:b.staleAxes.join(" · "),tip:l("nodeView.eval.staleReadoutTitle")}),(((Ze=b.codeDrift)==null?void 0:Ze.length)??0)>0&&s.jsx(Q,{text:b.codeDrift.map(n=>`${n.file.split("/").pop()} +${n.behind}`).join(", "),dim:!0})]}),($.prev.length>0||$.next.length>0)&&s.jsx(D,{label:l("detail.sideQueue"),children:[["prev",l("detail.queuePrev")],["next",l("detail.queueNext")]].map(([n,t])=>$[n].length>0&&s.jsxs("div",{className:"ds-queue-group",children:[s.jsx("span",{className:"ds-queue-group-label",children:t}),$[n].map(r=>s.jsxs("a",{className:"ds-queue-row",href:r.href,"data-tip":`${r.node} · ${r.scenario}`,children:[s.jsx(B,{kind:"eval",state:r.state,size:13}),s.jsx("span",{className:"ds-queue-scenario",children:r.scenario}),s.jsx("span",{className:"ds-queue-node",children:r.node})]},r.key))]},n))})]}),Rs=s.jsx(Hs,{onSend:(n,t)=>sn({node:e.node,scenario:e.scenario,body:n,codeSha:b.codeSha,evidence:t}),specs:c,sessions:p,focusId:e.node,onDone:h,anchorNow:H?ks:null,draft:re,commands:Ss},xs);return s.jsxs(Fe,{title:e.scenario,titleMeta:s.jsx("a",{className:"an-node",href:q(ke(e.node)),children:e.node}),status:Ms,side:$s,composer:Rs,listHref:m,backHref:E,backLabel:y,children:[b.expected&&s.jsxs("div",{className:"an-expected",children:[s.jsx("b",{children:l("nodeView.eval.expected")})," ",b.expected]}),te.length>0&&((De=b.verdict)==null?void 0:De.note)&&s.jsxs("div",{className:"an-expected an-prior-note",children:[s.jsx("b",{children:l("nodeView.eval.noteLabel")})," ",b.verdict.note]}),V&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"an-player",ref:P,children:[s.jsxs("div",{className:`an-stage ${oe?"playing":"paused"}`,ref:L,onMouseDown:js,onMouseMove:Es,onMouseUp:Ls,children:[s.jsx("video",{className:"an-video",ref:f,src:we(`/api/evidence/${V.hash}`),preload:"metadata",playsInline:!0}),ae&&s.jsx("div",{className:"an-rect live",style:{left:`${ae.x}%`,top:`${ae.y}%`,width:`${ae.w}%`,height:`${ae.h}%`}}),!oe&&!v&&s.jsx("div",{className:"an-bigplay","aria-hidden":!0,children:s.jsx(ee,{name:"play",size:22})})]}),s.jsxs("div",{className:"an-bar",children:[s.jsx(pe,{icon:oe?"pause":"play",size:14,className:"an-play",label:l(oe?"annotator.pause":"annotator.play"),onClick:ve}),s.jsxs("div",{className:"an-seek",ref:T,onMouseDown:gs,onMouseMove:ys,onMouseLeave:()=>Se(null),children:[s.jsx("div",{className:"an-seek-trk"}),X>0&&N==="time"&&w.map((n,t)=>s.jsx("div",{className:"an-band",style:{left:`${n.at/X*100}%`},"data-tip":n.step},`band-${t}`)),s.jsx("div",{className:"an-seek-play",ref:i}),X>0&&K.map(n=>s.jsx("button",{type:"button",className:`an-mk ${ie===n.i?"on":""} ${Ie===n.i?"active":""}`,style:{left:`${n.tMs/X*100}%`},"data-tip":n.label,onMouseDown:t=>t.stopPropagation(),onClick:t=>{t.stopPropagation(),He(n.i,n.tMs)}},`mk-${n.i}`)),s.jsx("div",{className:"an-knob",ref:I}),Ne!=null&&X>0&&s.jsx("div",{className:"an-seek-hov",style:{left:`${Ne}%`},children:be(Ne/100*X)})]}),s.jsx("span",{className:"an-time",ref:U}),he&&s.jsx("span",{className:"an-curstep","data-tip":he.node?`→ ${he.node}`:void 0,children:he.step}),s.jsx(Xs,{target:P})]})]}),w.length>0&&s.jsx(is,{events:w,axis:N,extent:Ve,activeStepIdx:je,onSeek:Z}),O&&s.jsx("div",{className:"an-flash",children:O})]}),!V&&w.length>0&&s.jsx(is,{events:w,axis:N,extent:Ve,activeStepIdx:je,onSeek:Z}),ce.length>0&&s.jsx("div",{className:"an-gallery",children:ce.map((n,t)=>s.jsx(ls,{e:n,alt:e.scenario},`${n.hash}-${t}`))}),ws.map((n,t)=>s.jsx(ls,{e:n,alt:e.scenario,collapsed:H||ce.length>0},`${n.hash}-${t}`)),te.length===0&&((We=b.verdict)!=null&&We.note?s.jsx("pre",{className:"eval-transcript",children:b.verdict.note}):s.jsx("div",{className:"an-hint",children:l("nodeView.eval.noImage")})),s.jsx(mn,{entry:e,comments:$e,seekMs:H?Z:null,selIdx:ie,activeIdx:Ie,onSelect:H?He:null,events:H?w:null,onWrite:h})]})}function mn({entry:e,comments:a,seekMs:o,selIdx:c,activeIdx:p,onSelect:h,events:x,onWrite:m}){var y;const E=_();return s.jsxs("section",{className:"an-thread",children:[s.jsx("div",{className:"an-comments-head",children:s.jsx("span",{children:E("annotator.comments",{n:a.length})})}),s.jsx(Qs,{replies:a,onSeek:o,selIdx:c,activeIdx:p,onSelect:h,events:x,threadId:((y=e.thread)==null?void 0:y.id)??null,onRemarkChange:()=>m==null?void 0:m("")})]})}const xe=new Map,xn=[];function cs(e,a){if(!(e!=null&&e.evalRevision)||!(a!=null&&a.epoch))return!0;const o=e.evalRevision;return o.epoch!==a.epoch||o.generation<a.generation?!1:o.generation!==a.generation?!0:!(a.revision&&o.content!==a.revision||a.value&&e.summary&&["measured","total","pass","fail","review","blind","unknown"].some(p=>e.summary[p]!==a.value[p]))}function us(e,a,o){const c=`${o||""}\0${e}\0${a}`;if(xe.has(c))return xe.get(c);const p=new URLSearchParams({node:e,scenario:a});o&&p.set("scope",o);const h=fetch(we(`/api/evals/detail?${p}`),{cache:"no-store"}).then(x=>x.ok?x.json():x.status===404?!1:Promise.reject(new Error(`HTTP ${x.status}`))).finally(()=>xe.delete(c));return xe.set(c,h),h}function pn(e,a,o,c=!0,p=null){const h=String(e||"").indexOf("/"),x=h>0?e.slice(0,h):e,m=h>0?e.slice(h+1):"",E=`${a||""}\0${x}\0${m}`,[y,$]=u.useState({identity:"",data:null,error:null}),l=u.useRef(0),f=u.useRef(o);f.current=o;const L=u.useCallback(()=>{if(!c||!x||!m)return Promise.resolve();const P=++l.current;return $(S=>S.identity===E?{...S,error:null}:{identity:E,data:null,error:null}),us(x,m,a).then(async S=>{if(P===l.current){if(S&&!cs(S,f.current)){const w=await us(x,m,a);if(P!==l.current)return;if(w&&!cs(w,f.current))throw new Error("stale session eval detail");S=w}$({identity:E,data:S,error:null})}}).catch(S=>{if(P!==l.current)return;const w=S instanceof Error?S.message:String(S);$(R=>({identity:E,data:R.identity===E&&R.data?R.data:!1,error:w}))})},[c,E,x,m,a]);u.useEffect(()=>{c&&L()},[c,x,m,a,p,o==null?void 0:o.epoch,o==null?void 0:o.generation,o==null?void 0:o.revision]);const T=y.identity===E?y:{data:null,error:null};return{data:T.data,error:T.error,reload:L}}function bn({sessionId:e}){const o=_()("sessionEval.scopeDoor");return s.jsx("a",{className:"se-door",href:q(Ds(e)),"data-tip":o,"aria-label":o,children:s.jsx(ee,{name:"arrow-left",size:16})})}function wn({sessionId:e,pageData:a,loading:o,error:c,sessions:p,queryText:h,onQueryText:x,hrefFor:m,hrefForPage:E}){const y=_(),$=(a==null?void 0:a.unknown)||0,l=e&&!o&&!c&&((a==null?void 0:a.sourceTotal)??0)===0?y("sessionEval.none"):null,f=e?s.jsxs("div",{className:"se-gates",children:[s.jsx(bn,{sessionId:e}),$>0&&s.jsxs("span",{className:"se-gate bad se-unknown","data-tip":y("sessionEval.unknownCoverage",{n:$}),children:[s.jsx(ee,{name:"info",size:11})," ",$]}),a&&s.jsx("span",{className:"se-acts",children:s.jsx("a",{className:"se-export",href:we(`/api/sessions/${encodeURIComponent(e)}/evals?format=html`),target:"_blank",rel:"noreferrer","data-tip":y("sessionEval.exportTitle"),"aria-label":y("sessionEval.export"),children:s.jsx(ee,{name:"download",size:13})})})]}):null;return s.jsx(rn,{pageData:a,loading:o,sessions:p,queryText:h,onQueryText:x,hrefFor:m,leading:f,error:c?y("sessionEval.loadFailed",{reason:c}):null,empty:l,pagination:a?{page:a.page,pageCount:a.pageCount,prev:a.prev,next:a.next,hrefFor:E}:null})}function kn({param:e,detail:a,sessionId:o,loading:c=!1,error:p,specs:h,sessions:x,listHref:m,backHref:E,backLabel:y,onOpenSession:$,onWrite:l}){const f=_(),L=e.indexOf("/"),T=L>0?e.slice(0,L):e,P=L>0?e.slice(L+1):null,S=u.useMemo(()=>{const N=v=>({key:vs(v),node:v.node,scenario:v.scenario,state:v.state,href:q(o?Ae(o,v.node,v.scenario):hs(v.node,v.scenario))}),z=(a==null?void 0:a.neighbors)||{prev:[],next:[]};return{prev:z.prev.map(N),next:z.next.map(N)}},[a==null?void 0:a.neighbors,o]);if(p)return s.jsx(Fe,{failure:f("sessionEval.loadFailed",{reason:p}),listHref:m,listLabel:f("reviewShell.backToEvals")});if(c)return s.jsx("div",{className:"fv-note",children:f("common.loading")});const w=(a==null?void 0:a.selected)||null,R=(a==null?void 0:a.scopeFallback)==="trunk"?f("reviewShell.scopeFallback"):null;if(!w){const N=(a==null?void 0:a.availability)==="unmeasured"?f("reviewShell.evalUnmeasured"):f("reviewShell.evalNotFound",{node:T,scenario:P||""});return s.jsx(Fe,{missing:R?s.jsxs(s.Fragment,{children:[R,s.jsx("br",{}),N]}):N,listHref:m,listLabel:f("reviewShell.backToEvals")})}return s.jsxs("div",{className:"page-detail-stack",children:[R&&s.jsx("div",{className:"fv-source-notice",role:"status",children:R}),s.jsx(fn,{entry:w,history:a.history,sourceKey:a.scope||"project",specs:h,sessions:x,onOpenSession:$,onWrite:l,listHref:m,backHref:E,backLabel:y,queue:S})]})}function Nn({specs:e=xn,sessions:a=[],issuesStamp:o=null,reloadBoard:c,onOpenSession:p}){var O;const h=_(),{notify:x}=Ts(),{param:m,query:E}=Fs(),y=G(E.q||"","scope")||null,$=((O=a.find(j=>j.id===y))==null?void 0:O.evalSummary)||null,l=pn(m,y,$,!!m,o),f=String(E.q??"").trim()||le,L=Gs(E.page),T=Js("evals",f,L,{enabled:!m,refreshKey:e}),P=j=>{j&&x(j)},S=async j=>{P(j),await(c==null?void 0:c()),await l.reload()},w=j=>q(y?Ae(y,j.node,j.scenario):hs(j.node,j.scenario)),R=y?q(Ae(y)):es("evals"),N=Zs("evals",y),z=h("detail.backToEvals"),v=j=>As("evals",null,{query:Ps(j,le)}),C=j=>es("evals",null,Os(f,le,j));return m?s.jsx(kn,{param:m,detail:l.data&&l.data!==!1?l.data:null,sessionId:y,loading:l.data===null,error:l.error,specs:e,sessions:a,listHref:R,backHref:N,backLabel:z,onOpenSession:p,onWrite:S}):s.jsx(wn,{sessionId:y,pageData:T.data,loading:T.loading,error:T.error,sessions:a,queryText:E.q||"",onQueryText:v,hrefFor:w,hrefForPage:C})}export{kn as EvalDetailPage,bn as EvalScopeDoor,wn as EvalsListPage,Nn as default,cs as detailMatchesProjection};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as F,g as X,h as Z,m as E,r as x,j as e,n as B,k as T,q as K,s as _,d as D,I as $,l as W}from"./index-oM1cUuGR.js";import{g as ee,h as se,i as le,j as te,k as ne}from"./data-BmO9k_xP.js";import{q as ie,t as ae,D as P,z as U,o as re,j as oe,h as I,i as A,I as z,O as ce,a as Y,g as G,b as Q,v as M,R as ue,r as de,L as fe,S as pe,F as me,A as ve,B as be,M as xe,C as q,G as je,T as H,H as O,J as ge}from"./Thread-BHCpsJIa.js";import"./PageScroll-Bxaqks4c.js";const V="new",he=s=>s.status!=="open",ye=s=>{const r=Math.max(0,(Date.now()-new Date(s).getTime())/1e3);return Number.isFinite(r)?r<3600?`${Math.max(1,Math.floor(r/60))}m`:r<86400?`${Math.floor(r/3600)}h`:`${Math.floor(r/86400)}d`:""},we=s=>{const r=String(s||"").split("#"),o=r.length>1?r.at(-1):r[0];return`#${o.length>16?`${o.slice(0,13)}…`:o}`},Ne=["is","state","store","author","node","label","session"],R=(s,r,o,f=l=>l)=>{var l,i;return(((i=(l=s==null?void 0:s.facets)==null?void 0:l[r])==null?void 0:i.options)??[]).map(a=>({value:a.value,label:a.value===""?o:f(a.value)}))};function Se({data:s,loading:r,error:o,query:f}){var d,v,y,k;const l=F();if(s&&!s.enabled)return e.jsx("div",{className:"fv-note",children:l("session.issuesOff")});const i=Array.isArray(s==null?void 0:s.items)?s.items:[],a=String(f.q??"").trim()||E,j=t=>B("issues",null,{query:K(t,E)}),p=(t,C)=>j(_(a,t,C)),g=(((v=(d=s==null?void 0:s.facets)==null?void 0:d.store)==null?void 0:v.options)??[]).map(t=>t.value).filter(Boolean),m=i,w=((y=s==null?void 0:s.counts)==null?void 0:y.open)||0,b=((k=s==null?void 0:s.counts)==null?void 0:k.closed)||0,c=D(a,"state"),S=m.map(t=>{var n,h;const C=t.status||"open";return{key:t.id,label:t.concern,href:T("issues",t.id),content:e.jsx(e.Fragment,{children:e.jsx(ue,{state:e.jsx(Q,{kind:"issue",state:C}),title:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"rl-row-title-text",children:t.concern}),e.jsx(z,{labels:t.labels,onSelect:J=>p("label",J)})]}),meta:e.jsxs(e.Fragment,{children:[e.jsx("span",{"data-tip":t.id,children:we(t.id)}),t.by&&e.jsx("span",{"data-tip":t.by,children:l("reviewList.openedBy",{by:de(t.by)})}),t.created&&e.jsx("span",{children:l("reviewList.openedAt",{at:ye(t.created)})})]}),aside:e.jsxs(e.Fragment,{children:[(((n=t.replies)==null?void 0:n.length)??0)>0&&e.jsxs("span",{className:"rl-comments","data-tip":l("session.issuesReplies",{n:t.replies.length}),children:[e.jsx($,{name:"message-square",size:14}),t.replies.length]}),g.length>1&&e.jsx("span",{className:`rl-tag fv-store-${t.store==="local"?"local":"forge"}`,children:t.store}),((h=t.nodes)==null?void 0:h[0])&&e.jsx("a",{className:"rl-tag node",href:Y(G(t.nodes[0])),children:t.nodes[0]})]})})})}}),L=e.jsxs("a",{className:"rl-new",href:T("issues",V),children:[e.jsx($,{name:"plus",size:14}),l("session.issuesNew")]}),N={label:l("reviewList.facetStore"),value:D(a,"store"),options:R(s,"store",l("reviewList.all"))},u={label:l("reviewList.facetSession"),value:D(a,"session"),options:R(s,"session",l("reviewList.all"),t=>l(t==="present"?"reviewList.sessionPresent":"reviewList.sessionMissing"))};return e.jsx(fe,{loading:r,error:o,title:l("reviewList.issuesTitle"),action:L,search:{value:String(f.q??"").trim()?f.q:E,onSubmit:j,placeholder:l("reviewList.searchIssues"),label:l("reviewList.search"),keys:Ne,suggest:{author:R(s,"author",l("reviewList.all")).filter(t=>t.value),node:R(s,"node",l("reviewList.all")).filter(t=>t.value),label:R(s,"label",l("reviewList.all")).filter(t=>t.value)}},sections:[{key:"open",label:l("reviewList.open"),count:w,active:c===""||c==="open",onSelect:()=>p("state","open")},{key:"closed",label:l("reviewList.closed"),count:b,active:c!==""&&c!=="open",onSelect:()=>p("state","closed")}],facets:e.jsx(me,{label:N.label,value:N.value,options:N.options,clearLabel:l("reviewList.all"),onChange:t=>p("store",t),mobile:!0}),secondaryFilters:e.jsx(pe,{label:l("reviewList.filters"),clearLabel:l("reviewList.all"),groups:[{label:u.label,value:u.value,active:!!u.value,options:u.options,onChange:t=>p("session",t)}]}),rows:S,pagination:s?{page:s.page,pageCount:s.pageCount,prev:s.prev,next:s.next,hrefFor:t=>T("issues",null,W(a,E,t))}:null,empty:{hasData:((s==null?void 0:s.sourceTotal)??0)>0,dataset:l("session.issuesEmpty"),filtered:l("session.issuesNoMatch")}})}function Le({issue:s,specs:r,sessions:o,onOpenSession:f,onWrite:l}){const i=F(),a=s.store==="local",j=he(s),[p,g]=x.useState(""),[m,w]=x.useState(""),b=Array.isArray(s.nodes)?s.nodes:[],c=Array.isArray(s.labels)?s.labels:[],S=Array.isArray(s.replies)?s.replies:[],L=s.status||"open",N=(d,v)=>async()=>{if(!p){g(d);try{const y=await v();y!=null&&y.ok?(w(""),await(l==null?void 0:l(""))):w((y==null?void 0:y.error)||`${d} failed`)}finally{g("")}}},u=(d,v,y,k)=>e.jsx("button",{type:"button",className:`fv-close-issue fv-life-${d}`,disabled:!!p,"data-tip":k,onMouseDown:t=>t.preventDefault(),onClick:N(d,y),children:p===d?i("session.issuesActing"):v});return e.jsxs(P,{title:s.concern,backHref:M("issues"),backLabel:i("detail.backToIssues"),status:e.jsx(Q,{kind:"issue",state:L,showLabel:!0,className:"ds-status-pill",size:16}),side:e.jsxs(e.Fragment,{children:[e.jsx(I,{label:i("detail.sideIssue"),children:e.jsx(A,{text:s.id,mono:!0})}),e.jsxs(I,{label:i("detail.sideStore"),children:[e.jsx(A,{text:s.store,className:`fv-store fv-store-${a?"local":"forge"}`}),s.url&&e.jsx(A,{text:i("session.issuesOpenOnStore",{store:Ae(s.store)}),href:s.url,external:!0})]}),c.length>0&&e.jsx(I,{label:i("detail.sideLabels"),children:e.jsx(z,{labels:c,onSelect:d=>B("issues",null,{query:K(_(E,"label",d),E)})})}),s.by&&e.jsx(I,{label:i("detail.sideOriginator"),children:a?e.jsx(ce,{originator:s.by,sessions:o,kind:"issue",onOpenSession:f}):e.jsx(A,{text:s.by,dim:!0})}),b.length>0&&e.jsx(I,{label:i("detail.sideNodes"),children:b.map(d=>e.jsx(A,{text:d,mono:!0,tip:i("session.issuesFocusNode"),href:Y(G(d))},d))})]}),composer:e.jsx(oe,{onSend:(d,v)=>le(s.id,d,v),specs:r,sessions:o,focusId:b[0]||null,onDone:l,actionsEnd:!j&&e.jsxs(e.Fragment,{children:[m&&e.jsx("span",{className:"fv-error",children:m}),a&&u("promote",i("session.issuesPromote"),()=>ee(s.id),i("session.issuesPromoteTitle")),u("close",i("session.issuesCloseIssue"),()=>se(s.id),i("session.issuesCloseIssueTitle"))]})},s.id),children:[s.body&&e.jsx("div",{className:"fvd-body",children:e.jsx(U,{body:s.body})}),e.jsx(re,{replies:S,threadId:a?s.id:null,onRemarkChange:()=>l==null?void 0:l("")})]})}function ke(s,r){const[o,f]=x.useState(null),[l,i]=x.useState(null),a=x.useRef(0),j=x.useCallback(async()=>{if(!s)return null;const g=++a.current;i(null);try{const m=await te(s);return g===a.current&&f(m),m}catch(m){return g===a.current&&(f(!1),i(m instanceof Error?m.message:String(m))),null}},[s]),p=x.useRef(null);return x.useEffect(()=>{s!==p.current&&(p.current=s,f(null),i(null)),s&&j()},[s,r,j]),{issue:o,error:l,reload:j}}function Fe({onOpenSession:s,specs:r=[],sessions:o=[],issuesStamp:f=null}){var N;const l=F(),{notify:i}=X(),{param:a,query:j}=Z(),p=a===V,g=String(j.q??"").trim()||E,m=ie(j.page),w=x.useMemo(()=>o.map(u=>u.id).join(","),[o]),b=ae("issues",g,m,{enabled:!a||p,refreshKey:`${f??""}|${w}`}),c=ke(p?null:a,f),S=u=>{u&&i(u)},L=async u=>{S(u),await(a?c.reload():b.reload())};if(p){if(b.data&&!b.data.enabled)return e.jsx("div",{className:"fv-note",children:l("session.issuesOff")});const u=Array.isArray((N=b.data)==null?void 0:N.stores)&&b.data.stores.length?b.data.stores:[{id:"local",label:"local",kind:"local"}];return e.jsx(Ee,{specs:r,sessions:o,stores:u,onCreated:(d,v)=>{S(v),B("issues",d,{replace:!0})}})}return a?c.issue==null?e.jsx("div",{className:"fv-note",children:l("session.issuesLoading")}):c.error?e.jsx(P,{failure:c.error,listHref:T("issues"),listLabel:l("reviewShell.backToIssues")}):c.issue===!1?e.jsx(P,{missing:l("reviewShell.issueNotFound",{id:a}),listHref:T("issues"),listLabel:l("reviewShell.backToIssues")}):e.jsx(Le,{issue:c.issue,specs:r,sessions:o,onOpenSession:s,onWrite:L}):e.jsx(Se,{data:b.data,loading:b.loading,error:b.error,query:j})}const Ie={github:"GitHub",gitlab:"GitLab"},Ae=s=>Ie[s]||s;function Ee({specs:s,sessions:r,stores:o,onCreated:f}){var C;const l=F(),[i,a]=x.useState(((C=o[0])==null?void 0:C.id)||"local"),[j,p]=x.useState(""),[g,m]=x.useState(""),[w,b]=x.useState(!1),[c,S]=x.useState(!1),[L,N]=x.useState(""),u=x.useRef(null),{launchers:d}=ve(),v=be({inputRef:u,value:g,setValue:m,specs:s,sessions:r,launchers:d});x.useEffect(()=>{var n;o.some(h=>h.id===i)||a(((n=o[0])==null?void 0:n.id)||"local")},[o,i]);const y=[...new Set([...g.matchAll(xe)].map(n=>n[1]))],k=async()=>{const n=j.trim();if(!(!n||c)){S(!0),N("");try{const h=await ne({concern:n,body:g.trim()||void 0,store:i});h!=null&&h.ok&&h.id?f==null||f(h.id,h.outcomes||""):N((h==null?void 0:h.error)||l("session.issuesPostFailed"))}finally{S(!1)}}},t=(n,h)=>e.jsx("button",{type:"button",role:"tab","aria-selected":w===n,className:`fv-tab ${w===n?"on":""}`,onClick:()=>b(n),children:h});return e.jsx(P,{title:l("session.issuesNewTitle"),backHref:M("issues"),backLabel:l("detail.backToIssues"),side:e.jsxs(e.Fragment,{children:[e.jsx(I,{label:l("session.issuesStoreLabel"),children:e.jsxs("label",{className:"fv-store-pick",children:[e.jsx("span",{className:"sr-only",children:l("session.issuesStoreLabel")}),e.jsx("select",{value:i,disabled:c,onChange:n=>a(n.target.value),children:o.map(n=>e.jsx("option",{value:n.id,children:n.label||n.id},n.id))})]})}),e.jsx(I,{label:l("detail.sideNodes"),children:y.length>0?y.map(n=>e.jsx(A,{text:n,mono:!0},n)):e.jsx(A,{text:l("session.issuesNodesHint"),dim:!0})})]}),children:e.jsxs("div",{className:"fv-new-page",children:[e.jsxs("label",{className:"fv-field",children:[e.jsx("span",{className:"fv-field-label",children:l("session.issuesTitleLabel")}),e.jsx("input",{className:"fv-input fv-new-title",value:j,placeholder:l("session.issuesConcernPlaceholder"),disabled:c,autoFocus:!0,onChange:n=>p(n.target.value),onKeyDown:n=>{q(n)||n.key==="Enter"&&(n.preventDefault(),k())}})]}),e.jsxs("div",{className:"fv-field",children:[e.jsxs("div",{className:"fv-field-head",children:[e.jsx("span",{className:"fv-field-label",children:l("session.issuesBodyLabel")}),e.jsxs("div",{className:"fv-tabs",role:"tablist","aria-label":l("session.issuesBodyLabel"),children:[t(!1,l("session.issuesWrite")),t(!0,l("session.issuesPreview"))]})]}),e.jsx(je,{className:"fv-new-compose",editor:w?e.jsx("div",{className:"fv-new-preview",role:"tabpanel",children:g.trim()?e.jsx(U,{body:g}):e.jsx("span",{className:"fv-new-hint",children:l("session.issuesPreviewEmpty")})}):e.jsxs("div",{className:"fv-tawrap",role:"tabpanel",children:[e.jsx(ge,{ref:u,className:"fv-textarea",rows:1,value:g,placeholder:l("session.issuesBodyPlaceholder"),disabled:c,onChange:n=>{m(n.target.value),v.sync(n.target)},onSelect:n=>v.sync(n.target),onBlur:v.close,onKeyDown:n=>{q(n)||v.onKeyDown(n)||n.key==="Enter"&&(n.metaKey||n.ctrlKey)&&(n.preventDefault(),k())}}),v.menuEl]}),footer:e.jsxs("div",{className:"fv-actions",children:[e.jsx(H,{label:l("thread.mentionActor"),disabled:c||w,onClick:()=>O(u.current,"@",m,v.sync),children:"@"}),e.jsx(H,{label:l("thread.mentionNode"),disabled:c||w,onClick:()=>O(u.current,"[[",m,v.sync),children:"[["})]})})]}),e.jsxs("div",{className:"fv-new-actions",children:[L&&e.jsx("span",{className:"fv-error",children:L}),e.jsx("a",{className:"fv-cancel",href:M("issues"),children:l("session.issuesCancel")}),e.jsx("button",{type:"button",className:"fv-post",disabled:c||!j.trim(),onClick:k,children:l(c?"session.issuesSending":"session.issuesPost")})]})]})})}export{Ne as ISSUE_QUERY_KEYS,Le as IssueDetailPage,Se as IssuesListPage,V as NEW_PARAM,Fe as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./EvalsPage-CHc1tT-0.js","./index-oM1cUuGR.js","./index-Ba-oHmxn.css","./Thread-BHCpsJIa.js","./PageScroll-Bxaqks4c.js","./data-BmO9k_xP.js","./IssuesPage-BqojZnnr.js","./Settings-1XN_EQnW.js","./bindings-BC9vqpYU.js","./sessionSurface-BNwc7E-I.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{u as E,r,h as D,j as s,n as C,_ as O}from"./index-oM1cUuGR.js";import{A as R,u as H,S as $,R as B,a as U,F as Q,b as I}from"./SessionWindow-CkdNpele.js";import{K as Z,N as J,P as M,Q as K,U as W,V as X,W as Y,X as q,Y as G,Z as ss,A as es,J as as,s as ns,_ as ts,a as ls,w as is,$ as cs}from"./Thread-BHCpsJIa.js";import{T as rs}from"./TimelineChat-N9RZ6v95.js";import"./PageScroll-Bxaqks4c.js";import"./data-BmO9k_xP.js";import"./Modal-DAUYhrDn.js";const os=r.lazy(()=>O(()=>import("./EvalsPage-CHc1tT-0.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),ms=r.lazy(()=>O(()=>import("./IssuesPage-BqojZnnr.js"),__vite__mapDeps([6,1,2,5,3,4]),import.meta.url)),ds=r.lazy(()=>O(()=>import("./Settings-1XN_EQnW.js"),__vite__mapDeps([7,1,2,8,4,9]),import.meta.url)),us={spec:"nodeView.paneSpec",history:"nodeView.paneHistory",issues:"nodeView.paneIssues",eval:"nodeView.paneEval",edit:"nodeView.paneEdit"},L=(e,t)=>t.filter(o=>{var d;return(d=o.ops)==null?void 0:d.some(l=>l.nodeId===e.id)});function V({status:e}){const t=I[e]||I.pending;return s.jsx("span",{className:"m-dot",style:{background:t.color}})}function hs({node:e,kids:t,editors:o,onTap:d}){return s.jsxs("button",{className:"m-row",onClick:d,children:[s.jsx(V,{status:e.status}),s.jsx("span",{className:"m-row-title",children:e.title}),o.length>0&&s.jsx("span",{className:"m-row-faces",children:o.slice(0,3).map(l=>s.jsx(R,{seed:l.id,status:l.status,title:M(l)},l.id))}),e.version?s.jsxs("span",{className:"m-row-ver",children:["v",e.version]}):null,t>0&&s.jsxs("span",{className:"m-row-kids",children:["▸",t]}),s.jsx("span",{className:"m-row-chev",children:"›"})]})}function bs({node:e,childrenOf:t,sessions:o,onOpenChild:d}){const l=E(),m=t(e.id),b=Z(e),f=[...m.length?[{key:"children",label:l("mobile.childrenTab",{n:m.length})}]:[],...b.map(a=>({key:a.key,label:l(us[a.key])}))],[x,p]=r.useState(null),[v,j]=r.useState({issues:{},eval:{}});r.useEffect(()=>{p(null),j({issues:{},eval:{}})},[e.id]);const g=(a,y)=>j(h=>({...h,[a]:ss(h[a],y)})),i=x&&f.some(a=>a.key===x)?x:f[0].key,w=J(e.id,i==="history"),c=L(e,o);return s.jsxs("div",{className:"m-node",children:[s.jsxs("div",{className:"m-node-head",children:[s.jsx(V,{status:e.status}),s.jsx("span",{className:"m-node-title",children:e.title}),e.version?s.jsxs("span",{className:"m-node-ver",children:["v",e.version]}):null,s.jsx("span",{className:"m-node-status",children:l(`status.${e.status}`)}),c.length>0&&s.jsx("span",{className:"m-node-faces",title:l("mobile.liveEditors",{n:c.length}),children:c.map(a=>s.jsx(R,{seed:a.id,status:a.status,title:M(a)},a.id))})]}),e.desc&&s.jsx("div",{className:"m-node-desc",children:e.desc}),s.jsx("div",{className:"m-tabs",children:f.map(a=>s.jsx("button",{className:a.key===i?"m-tab on":"m-tab",onClick:()=>p(a.key),children:a.label},a.key))}),s.jsxs("div",{className:i==="history"?"m-pane-host fixed":"m-pane-host",children:[i==="children"&&s.jsx("div",{className:"m-children",children:m.map(a=>s.jsx(hs,{node:a,kids:t(a.id).length,editors:L(a,o),onTap:()=>d(a.id)},a.id))}),i==="spec"&&s.jsx(K,{node:e}),i==="history"&&s.jsx(W,{node:e,rows:w}),i==="issues"&&s.jsx(X,{node:e,sessions:o,filter:v.issues,onFilter:a=>g("issues",a)}),i==="eval"&&s.jsx(Y,{node:e,sessions:o,filter:v.eval,onFilter:a=>g("eval",a)}),i==="edit"&&s.jsx(q,{node:e})]})]})}function ps({s:e,sessions:t,onBack:o}){const d=E();return s.jsxs("div",{className:"m-sessdetail chat",children:[s.jsxs("div",{className:"m-sess-card",children:[s.jsx("button",{className:"m-sess-back",onClick:o,"aria-label":d("mobile.back"),children:"‹"}),s.jsxs("div",{className:"m-sess-meta",children:[s.jsx("span",{className:"m-sess-name",children:ns(e)}),s.jsxs("span",{className:"m-sess-status",style:{color:ts[e.status]},children:[d(`status.${e.status}`),e.merges?` · ×${e.merges}`:""," · ",s.jsx("span",{className:"m-sess-id8",children:e.id.slice(0,8)})]})]}),s.jsx("a",{className:"m-sess-evalbtn",href:ls(is(e.id)),title:d("sessionEval.btnTitle"),children:d("sessionEval.btn")})]}),s.jsx(rs,{s:e,sessions:t})]})}function xs({draft:e,setDraft:t,onBack:o,onLaunched:d}){const l=E(),{launchers:m,launcher:b,pickLauncher:f}=es(),[x,p]=r.useState(!1),[v,j]=r.useState(null),g=async()=>{const i=e.trim();if(!i||x)return;p(!0),j(null);const w=await cs(i,b);p(!1),w.ok?(t(""),d()):j(w.error||l("mobile.launchFailed"))};return s.jsxs("div",{className:"m-sessdetail m-new",children:[s.jsxs("div",{className:"m-sess-card",children:[s.jsx("button",{className:"m-sess-back",onClick:o,"aria-label":l("mobile.back"),children:"‹"}),s.jsx("div",{className:"m-sess-meta",children:s.jsx("span",{className:"m-sess-name",children:l("mobile.newSession")})})]}),s.jsxs("div",{className:"m-new-body",children:[s.jsx(as,{className:"m-input m-new-input",rows:5,placeholder:l("mobile.newPlaceholder"),value:e,onChange:i=>t(i.target.value)}),m.length>0&&s.jsxs("label",{className:"m-new-launcher",children:[s.jsx("span",{className:"m-new-launcher-label",children:l("session.launcherLabel")}),s.jsx("select",{className:"m-new-launcher-select",value:b,onChange:i=>f(i.target.value),children:m.map(i=>s.jsx("option",{value:i.name,children:i.name},i.name))})]}),v&&s.jsx("div",{className:"m-senderr",children:v}),s.jsx("button",{className:"m-send m-new-go",disabled:!e.trim()||x,onClick:g,children:l(x?"mobile.launching":"mobile.launch")})]})]})}function js({specs:e,sessions:t,openId:o,setOpenId:d,creating:l,setCreating:m,newDraft:b,setNewDraft:f}){const x=E(),p=o?t.find(c=>c.id===o):null,{expanded:v,toggle:j}=H(),[g,i]=r.useState(!1),w=r.useMemo(()=>G(t,c=>v.has(c),{zoneFolded:c=>c==="offline"&&!g}),[t,v,g]);return l?s.jsx(xs,{draft:b,setDraft:f,onBack:()=>m(!1),onLaunched:()=>m(!1)}):p?s.jsx(ps,{s:p,sessions:t,onBack:()=>d(null)}):s.jsxs("div",{className:"m-sesslist",children:[s.jsxs("button",{className:"m-new-btn",onClick:()=>m(!0),children:[s.jsx("span",{className:"m-new-btn-plus",children:"+"}),x("mobile.newSession")]}),!t.length&&s.jsx("div",{className:"m-empty big",children:x("mobile.noSessions")}),w.map(c=>{if(c.type==="zone")return s.jsx($,{item:c,baseClass:"m-zone",onToggle:()=>i(h=>!h)},`z-${c.zone}`);const a=c.s,y=c.expandable||c.depth?s.jsx(B,{guides:c.guides,expandable:c.expandable,kin:c.kin}):null;return s.jsxs("div",{className:"sess-tree-row m-sess-tree-row",style:{"--sess-fold-indent":`${c.depth*14}px`},children:[s.jsx("button",{type:"button",className:"m-sess-row",onClick:()=>d(a.id),children:s.jsx(U,{s:a,locked:!1,showAvatar:!1,lead:y})}),c.expandable&&s.jsx(Q,{expanded:c.expanded,rollup:c.rollup,kin:c.kin,onToggle:()=>j(a.id)})]},a.id)})]})}function Ss({specs:e,sessions:t,issuesStamp:o,reloadBoard:d}){const l=E(),m=r.useMemo(()=>Object.fromEntries(e.map(n=>[n.id,n])),[e]),b=r.useMemo(()=>e.find(n=>!n.parent)||e[0],[e]),f=r.useMemo(()=>{const n={};return e.forEach(u=>{var _;u.parent&&(n[_=u.parent]??(n[_]=[])).push(u)}),u=>n[u]||[]},[e]),[x,p]=r.useState("specs"),[v,j]=r.useState(()=>b?[b.id]:[]),[g,i]=r.useState(null),[w,c]=r.useState(!1),[a,y]=r.useState(""),{page:h,param:k}=D(),N=h==="evals"||h==="issues"||h==="settings"?h:x;r.useEffect(()=>{h==="sessions"&&k&&(p("sessions"),i(k))},[h,k]),r.useLayoutEffect(()=>{if(h!=="graph"||!k)return;if(p("specs"),!m[k]){j(b?[b.id]:[]);return}const n=[];for(let u=m[k];u;u=u.parent?m[u.parent]:null)n.unshift(u.id);j(n)},[h,k,m,b]);const T=n=>{if(n==="evals"||n==="issues"){C(n);return}p(n),(h==="evals"||h==="issues"||h==="settings")&&C(n==="specs"?"graph":"sessions")},A=n=>{p("sessions"),i(n),C("sessions",n)},S=v.filter(n=>m[n]),F=S[S.length-1]||(b==null?void 0:b.id),P=F?m[F]:null,z=n=>j(u=>[...u.filter(_=>m[_]),n]);return s.jsxs("div",{className:"m-app",children:[s.jsx("main",{className:"m-main",children:N==="evals"||N==="issues"||N==="settings"?s.jsx("div",{className:"m-review",children:s.jsx(r.Suspense,{fallback:s.jsx("div",{className:"m-empty",children:l("common.loading")}),children:N==="settings"?s.jsx(ds,{}):N==="evals"?s.jsx(os,{specs:e,sessions:t,issuesStamp:o,reloadBoard:d,onOpenSession:A}):s.jsx(ms,{specs:e,sessions:t,issuesStamp:o,onOpenSession:A})})}):N==="specs"?s.jsxs("div",{className:"m-specs",children:[s.jsx("nav",{className:"m-crumbs",children:S.map((n,u)=>s.jsxs("span",{className:"m-crumb",children:[u>0&&s.jsx("span",{className:"m-crumb-sep",children:"›"}),s.jsx("button",{className:u===S.length-1?"m-crumb-btn cur":"m-crumb-btn",onClick:()=>j(S.slice(0,u+1)),children:m[n].title})]},n))}),P&&s.jsx(bs,{node:P,childrenOf:f,sessions:t,onOpenChild:z},P.id)]}):s.jsx(js,{specs:e,sessions:t,openId:g,setOpenId:i,creating:w,setCreating:c,newDraft:a,setNewDraft:y})}),s.jsxs("nav",{className:"m-tabbar",children:[s.jsxs("button",{className:N==="specs"?"m-tabbar-btn on":"m-tabbar-btn",onClick:()=>T("specs"),children:[s.jsx("span",{className:"m-tabbar-ico",children:"❯_"}),l("mobile.specsTab")]}),s.jsxs("button",{className:N==="sessions"?"m-tabbar-btn on":"m-tabbar-btn",onClick:()=>T("sessions"),children:[s.jsx("span",{className:"m-tabbar-ico",children:"◐"}),l("mobile.sessionsTab"),t.length>0&&s.jsx("span",{className:"m-tabbar-badge",children:t.length})]}),s.jsxs("button",{className:N==="evals"?"m-tabbar-btn on":"m-tabbar-btn",onClick:()=>T("evals"),children:[s.jsx("span",{className:"m-tabbar-ico",children:"✓"}),l("mobile.evalsTab")]}),s.jsxs("button",{className:N==="issues"?"m-tabbar-btn on":"m-tabbar-btn",onClick:()=>T("issues"),children:[s.jsx("span",{className:"m-tabbar-ico",children:"◎"}),l("mobile.issuesTab")]})]})]})}export{Ss as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d,x as c,j as e,f as i}from"./index-oM1cUuGR.js";function x({title:a,closeLabel:n,onClose:s,className:l,children:o}){return d.useEffect(()=>()=>c(),[]),e.jsx("div",{className:"legend-backdrop","data-focus-overlay":!0,onClick:s,children:e.jsxs("div",{className:l?`legend ${l}`:"legend",role:"dialog","aria-modal":"true","aria-label":a,onClick:r=>r.stopPropagation(),children:[e.jsxs("div",{className:"legend-head",children:[e.jsx("span",{className:"legend-title",children:a}),e.jsx(i,{icon:"x",size:13,className:"legend-close",label:n,onClick:s})]}),e.jsx("div",{className:"legend-body",children:o})]})})}export{x as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as h,j as L}from"./index-oM1cUuGR.js";const w="spex.page-scroll:",T=()=>typeof window>"u"?"":`${window.location.pathname}${window.location.search}${window.location.hash}`,$=n=>{try{return Number(sessionStorage.getItem(`${w}${n}`))||0}catch{return 0}},p=(n,r)=>{try{sessionStorage.setItem(`${w}${n}`,String(r))}catch{}};function A({className:n="",scrollKey:r=T(),children:g,...E}){const f=h.useRef(null);return h.useLayoutEffect(()=>{const e=f.current;if(!e)return;const o=$(r);let i=o,c=o>0,u=0,t=0,a;const m=()=>{c=!1,t&&cancelAnimationFrame(t),t=0,a==null||a.disconnect()},l=()=>{if(t=0,!c)return;const v=Math.max(0,e.scrollHeight-e.clientHeight);if(e.scrollTop=Math.min(o,v),v<o){u=0;return}if(Math.abs(e.scrollTop-o)>1){u=0,t=requestAnimationFrame(l);return}i=e.scrollTop,p(r,i),++u<2?t=requestAnimationFrame(l):m()},d=()=>{c||(i=e.scrollTop,p(r,i))},s=()=>{m(),d()};return e.scrollTop=o,c&&(a=new MutationObserver(()=>{t||(t=requestAnimationFrame(l))}),a.observe(e,{childList:!0,subtree:!0,characterData:!0}),t=requestAnimationFrame(l)),e.addEventListener("scroll",d,{passive:!0}),e.addEventListener("pointerdown",s,!0),e.addEventListener("wheel",s,{passive:!0,capture:!0}),e.addEventListener("keydown",s,!0),()=>{e.removeEventListener("scroll",d),e.removeEventListener("pointerdown",s,!0),e.removeEventListener("wheel",s,!0),e.removeEventListener("keydown",s,!0),m(),p(r,i)}},[r]),L.jsx("div",{ref:f,className:`page-scroll${n?` ${n}`:""}`,...E,children:g})}export{A as P};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as M,r as o,j as e,I as L,f as G,F as R,b as _,G as J,H as D}from"./index-oM1cUuGR.js";import{l as q,p as K,C as U,a as V,b as Q,c as W,s as X,d as Y,e as Z,i as ee,f as se,g as ae,h as B,j as te,k as re,m as oe,n as ne,o as ce}from"./App-DebAWelc.js";import{M as ie}from"./Modal-DAUYhrDn.js";import{P as le}from"./PageScroll-Bxaqks4c.js";import"./data-BmO9k_xP.js";const H=["claude","codex","opencode","pi"];function T({onSet:t,onClear:d,placeholder:a,busy:r,t:i}){const[s,g]=o.useState("");return e.jsxs("form",{className:"proj-drawer proj-pw",onSubmit:p=>{p.preventDefault(),s&&(t(s),g(""))},children:[e.jsx("input",{className:"proj-add-path",type:"password",value:s,onChange:p=>g(p.target.value),placeholder:a,"aria-label":a}),e.jsx("button",{className:"proj-act primary",type:"submit",disabled:!s||r,children:i("projects.passwordSet")}),e.jsx("button",{className:"proj-act",type:"button",disabled:r,onClick:d,children:i("projects.passwordClear")})]})}function de({onAdded:t,onClose:d,t:a}){const[r,i]=o.useState(""),[s,g]=o.useState(null),[p,u]=o.useState(!0),[l,f]=o.useState(!1),[k,m]=o.useState(null),[E,v]=o.useState(""),[C,x]=o.useState(!1),[P,N]=o.useState(!1),[h,I]=o.useState([]),n=o.useCallback(async c=>{if(l)return;u(!0),m(null),v("");const y=await Y(c);if(u(!1),!y.ok){m(y.error==="network"?a("projects.actionFailed"):y.error);return}g(y),i(y.path),x(!1),N(!1),I([])},[l,a]);o.useEffect(()=>{n("")},[]),o.useEffect(()=>{const c=y=>{y.key==="Escape"&&!l&&d()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[l,d]);const b=!!(s!=null&&s.exists)&&r===s.path,w=!!s&&!s.exists&&r===s.path,F=b&&!s.gitRoot,j=b&&!s.initialized,S=b&&!p&&!l&&!s.cataloged&&(!F||C)&&(!P||!!h.length),z=c=>I(y=>y.includes(c)?y.filter($=>$!==c):[...y,c]),O=async c=>{if(c.preventDefault(),!S)return;f(!0),m(null),v("");const y=await B(s.path,{...F?{initGit:C}:{},...j&&P?{init:{harness:h.join(",")}}:{}});if(f(!1),y.ok){t(y.project);return}m(y.error==="network"?a("projects.actionFailed"):y.error),v(y.output||"")},A=async()=>{if(!w||l)return;f(!0),m(null),v("");const c=await B(s.path,{createDir:!0,initGit:!0});if(f(!1),c.ok){t(c.project);return}m(c.error==="network"?a("projects.actionFailed"):c.error),v(c.output||"")};return e.jsx(ie,{title:a("projects.addTitle"),closeLabel:a("common.close"),onClose:()=>{l||d()},className:"proj-add-modal",children:e.jsxs("form",{className:"proj-add-flow",onSubmit:O,children:[e.jsxs("div",{className:"proj-add-pathbar",children:[e.jsx(G,{icon:"arrow-left",size:14,className:"proj-act icon",label:a("projects.browseParent"),disabled:!(s!=null&&s.parent)||p||l,onClick:()=>n(s.parent)}),e.jsx("button",{type:"button",className:"proj-act icon proj-home-btn","data-tip":a("projects.browseHome"),"aria-label":a("projects.browseHome"),disabled:!(s!=null&&s.home)||p||l,onClick:()=>n(s.home),children:"~"}),e.jsx("input",{className:"proj-add-path",value:r,autoFocus:!0,spellCheck:!1,onChange:c=>{i(c.target.value),m(null)},onKeyDown:c=>{c.key!=="Enter"||!r.trim()||(c.preventDefault(),w?A():n(r.trim()))},placeholder:a("projects.addPlaceholder"),"aria-label":a("projects.addPlaceholder"),disabled:l}),e.jsx("button",{className:w?"proj-act primary":"proj-act",type:"button",disabled:!r.trim()||p||l,onClick:()=>{w?A():n(r.trim())},children:a(p?"projects.browseLoading":l&&w?"projects.browseCreating":w?"projects.browseNew":"projects.browseGo")})]}),e.jsxs("div",{className:"proj-folder-list","aria-label":a("projects.folderList"),"aria-busy":p,children:[!p&&(s==null?void 0:s.entries.map(c=>e.jsxs("button",{type:"button",className:"proj-folder-row",onClick:()=>n(c.path),disabled:l,children:[e.jsx(L,{name:"chevron-right",size:13}),e.jsx("span",{className:"proj-folder-name",children:c.name}),c.git&&e.jsx("span",{className:"proj-folder-tag",children:"Git"}),c.initialized&&e.jsx("span",{className:"proj-folder-tag spex",children:"SpexCode"})]},c.path))),!p&&s&&!s.exists&&e.jsx("div",{className:"proj-folder-empty",children:a("projects.folderMissing")}),!p&&(s==null?void 0:s.exists)&&!s.entries.length&&e.jsx("div",{className:"proj-folder-empty",children:a("projects.folderEmpty")}),p&&e.jsx("div",{className:"proj-folder-empty",children:a("projects.browseLoading")})]}),b&&e.jsxs("div",{className:"proj-add-options",children:[e.jsx("div",{className:"proj-add-selected",title:s.path,children:s.path}),s.gitRoot?e.jsxs("div",{className:"proj-add-state",children:[e.jsx(L,{name:"check",size:13})," Git ",e.jsx("code",{children:s.gitRoot})]}):e.jsxs("label",{className:"proj-add-check",children:[e.jsx("input",{type:"checkbox",checked:C,onChange:c=>x(c.target.checked),disabled:l}),e.jsx("span",{children:a("projects.initGit")})]}),s.initialized?e.jsxs("div",{className:"proj-add-state",children:[e.jsx(L,{name:"check",size:13})," ",a("projects.spexInitialized")]}):e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:"proj-add-check",children:[e.jsx("input",{type:"checkbox",checked:P,onChange:c=>{N(c.target.checked),v(""),m(null)},disabled:l}),e.jsx("span",{children:a("projects.initSpex")})]}),P&&e.jsxs("fieldset",{className:"proj-add-harnesses",disabled:l,children:[e.jsx("legend",{children:a("projects.harnessTargets")}),H.map(c=>e.jsxs("label",{className:"proj-add-harness",children:[e.jsx("input",{type:"checkbox",checked:h.includes(c),onChange:()=>z(c)}),e.jsx("span",{children:c})]},c))]})]}),s.cataloged&&e.jsx("div",{className:"proj-op-status ok",children:a("projects.alreadyAdded")})]}),(k||E)&&e.jsxs("div",{className:"proj-add-result",children:[k&&e.jsx("div",{className:"proj-err",children:k}),E&&e.jsx("pre",{className:"proj-log",children:E})]}),e.jsxs("div",{className:"proj-add-actions",children:[e.jsx("button",{className:"proj-act",type:"button",disabled:l,onClick:d,children:a("common.cancel")}),e.jsx("button",{className:"proj-act primary",type:"submit",disabled:!S,children:a(l?"projects.addBusy":"projects.addSubmit")})]})]})})}function pe({p:t,onRefresh:d,t:a}){const[r,i]=o.useState(null),[s,g]=o.useState(""),[p,u]=o.useState(!1),[l,f]=o.useState(null),[k,m]=o.useState(!1),[E,v]=o.useState(0),[C,x]=o.useState(t.identity.icon),[P,N]=o.useState(!1),[h,I]=o.useState(null);o.useEffect(()=>{let j=!0;return i(null),f(null),m(!1),Z(t.id).then(S=>{if(j){if(!S.ok){f(S.error==="network"?a("projects.actionFailed"):S.error);return}i({content:S.content,revision:S.revision}),g(S.content),x(t.identity.icon)}}),()=>{j=!1}},[t.id,t.identity.icon,E,a]);let n=!1;try{const j=JSON.parse(s);n=!j||typeof j!="object"||Array.isArray(j)}catch{n=!0}const b=!!r&&s!==r.content,w=async()=>{var S,z;if(!r||n||!b||p)return;u(!0),f(null),m(!1);const j=await te(t.id,s,r.revision);if(u(!1),!j.ok){f(j.error==="network"?a("projects.actionFailed"):j.error);return}i({content:j.content,revision:j.revision}),g(j.content),m(!0);try{x(((z=(S=JSON.parse(j.content))==null?void 0:S.dashboard)==null?void 0:z.icon)||t.identity.icon)}catch{}d()},F=async j=>{if(!r||P)return!1;const S=C;x(j),N(!0),I(null),m(!1);const z=await re(t.id,j,r.revision);return N(!1),z.ok?(i({content:z.content,revision:z.revision}),g(z.content),x(z.identity.icon),m(!0),d(),!0):(x(S),I(z.error==="network"?a("projects.actionFailed"):z.error),!1)};return e.jsxs("div",{className:"proj-drawer proj-config",children:[e.jsxs("div",{className:"proj-config-head",children:[e.jsx("code",{children:"spexcode.json"}),k&&e.jsx("span",{className:"proj-op-status ok",children:a("projects.configSaved")})]}),r?e.jsxs(e.Fragment,{children:[e.jsx("textarea",{className:n?"proj-config-editor invalid":"proj-config-editor",value:s,onChange:j=>{g(j.target.value),m(!1),f(null)},"aria-label":a("projects.configEditor"),spellCheck:!1,disabled:p}),e.jsxs("div",{className:"proj-setup-row",children:[e.jsx("button",{className:"proj-act primary",type:"button",disabled:!b||n||p,onClick:w,children:a(p?"projects.configSaving":"projects.configSave")}),e.jsx("button",{className:"proj-act",type:"button",disabled:p,onClick:()=>v(j=>j+1),children:a("projects.configReload")}),n&&e.jsx("span",{className:"proj-err",children:a("projects.configInvalid")}),l&&e.jsx("span",{className:"proj-err",children:l})]}),e.jsx(D,{value:C,onChange:F,label:a("projects.projectIcon"),editLabel:a("projects.editProjectIcon"),name:`project-icon-${t.id}`,disabled:p||P}),h&&e.jsx("span",{className:"proj-err",children:h})]}):e.jsxs("div",{className:"proj-setup-row",children:[!l&&e.jsx("span",{className:"proj-dim",children:a("projects.configLoading")}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"proj-err",children:l}),e.jsx("button",{className:"proj-act",type:"button",onClick:()=>v(j=>j+1),children:a("projects.configReload")})]})]})]})}function je({p:t,busyOp:d,run:a,result:r,t:i}){const[s,g]=o.useState([]),p=u=>g(l=>l.includes(u)?l.filter(f=>f!==u):[...l,u]);return e.jsxs("div",{className:"proj-drawer proj-setup",children:[e.jsxs("div",{className:"proj-setup-row",children:[e.jsx("span",{className:"proj-dim",children:i("projects.harnessLabel")}),H.map(u=>e.jsx("button",{type:"button",className:s.includes(u)?"proj-act on":"proj-act","aria-pressed":s.includes(u),disabled:!!d,onClick:()=>p(u),children:u},u))]}),e.jsxs("div",{className:"proj-setup-row",children:[e.jsx("button",{className:"proj-act primary",type:"button",disabled:!!d||!s.length,title:s.length?void 0:i("projects.harnessRequired"),onClick:()=>a("init",()=>ee(t.id,s.join(","))),children:i(d==="init"?"projects.running":"projects.init")}),e.jsx("button",{className:"proj-act",type:"button",disabled:!!d,onClick:()=>a("doctor",()=>se(t.id)),children:i(d==="doctor"?"projects.running":"projects.doctor")})]}),r&&e.jsxs("div",{className:"proj-op-result proj-full",children:[e.jsx("div",{className:r.ok?"proj-op-status ok":"proj-op-status fail",children:r.ok?i("projects.opOk",{op:i(`projects.${r.op}`)}):i("projects.opFail",{op:i(`projects.${r.op}`),code:r.code??"?"})}),r.output?e.jsx("pre",{className:"proj-log",children:r.output}):null]})]})}function ue({p:t,health:d,onRefresh:a,t:r}){const[i,s]=o.useState(null),[g,p]=o.useState(!1),[u,l]=o.useState(null),[f,k]=o.useState(null),[m,E]=o.useState(null),v=t.id===_,C=t.online===!1,x=C?"stopped":d||"probing",P=async h=>{p(!0),k(null);const I=await h();p(!1),I.ok?s(null):k(I.error||r("projects.actionFailed")),a()},N=async(h,I)=>{l(h),k(null),E(null);const n=await I();l(null),h!=="serve"?E({op:h,ok:n.ok,code:n.code,output:n.output||(n.ok?"":n.error||"")}):n.ok||k(n.error||r("projects.actionFailed")),a()};return e.jsxs("li",{className:v?"proj-row current":"proj-row",children:[e.jsxs("div",{className:"proj-row-main",children:[e.jsx("span",{className:`proj-health h-${x}`,"data-tip":r(`projects.health.${x}`)}),e.jsx(R,{icon:t.identity.icon,size:26}),e.jsx("span",{className:"proj-name",children:t.identity.title}),t.gated&&e.jsx(L,{name:"lock",size:12,className:"proj-locked"}),v&&e.jsx("span",{className:"proj-tag",children:r("projects.current")}),e.jsx("span",{className:"proj-path",title:t.id,children:t.root||t.id}),e.jsxs("span",{className:"proj-actions",children:[e.jsx(G,{icon:"settings",label:r("projects.configTitle"),className:i==="config"?"proj-act icon on":"proj-act icon",size:13,onClick:()=>{s(h=>h==="config"?null:"config"),k(null)}}),e.jsx(G,{icon:"terminal",label:r("projects.setupTitle"),className:i==="setup"?"proj-act icon on":"proj-act icon",size:13,onClick:()=>{s(h=>h==="setup"?null:"setup"),k(null)}}),e.jsx(G,{icon:"lock",label:r("projects.passwordTitle"),className:i==="pw"?"proj-act icon on":"proj-act icon",size:13,onClick:()=>{s(h=>h==="pw"?null:"pw"),k(null)}}),C?e.jsx("button",{className:"proj-act primary",type:"button",disabled:!!u,onClick:()=>N("serve",()=>oe(t.id)),children:r(u==="serve"?"projects.startBusy":"projects.start")}):e.jsx("a",{className:"proj-act primary",href:J(t.id),children:r("projects.open")})]})]}),f&&e.jsx("div",{className:"proj-err",children:f}),i==="pw"&&e.jsx(T,{t:r,busy:g,placeholder:r("projects.passwordPlaceholder"),onSet:h=>P(()=>ce(t.id,h)),onClear:()=>P(()=>ne(t.id))}),i==="config"&&e.jsx(pe,{p:t,onRefresh:a,t:r}),i==="setup"&&e.jsx(je,{p:t,busyOp:u,run:N,result:m,t:r})]})}function me({gateway:t,onRefresh:d,t:a}){const[r,i]=o.useState(t.identity.icon),[s,g]=o.useState(!1),[p,u]=o.useState(null);o.useEffect(()=>{i(t.identity.icon)},[t.identity.icon]);const l=async f=>{if(s||!t.revision)return!1;const k=r;i(f),g(!0),u(null);const m=await ae(f,t.revision);return g(!1),m.ok?(i(m.gateway.identity.icon),d(),!0):(i(k),u(m.error==="network"?a("projects.actionFailed"):m.error),!1)};return e.jsxs("div",{className:"proj-gateway-identity",children:[e.jsx(D,{value:r,onChange:l,label:a("projects.gatewayIcon"),editLabel:a("projects.editGatewayIcon"),name:"gateway-icon",fallback:"gateway",disabled:s||!t.revision}),p&&e.jsx("span",{className:"proj-err",children:p})]})}function Ne(){const t=M(),[d,a]=o.useState({kind:"loading"}),[r,i]=o.useState({}),[s,g]=o.useState(null),[p,u]=o.useState(!1),[l,f]=o.useState(!1),[k,m]=o.useState(null),[E,v]=o.useState(1),C=o.useRef(0),x=o.useCallback(async()=>{const n=++C.current,b=await q();n===C.current&&(b.state==="ok"?(a({kind:"ok",adminGated:b.adminGated,gateway:b.gateway,projects:b.projects}),b.projects.filter(w=>w.online!==!1).forEach(w=>{K(w.id).then(F=>{n===C.current&&i(j=>({...j,[w.id]:F}))})})):b.state==="denied"?a({kind:"denied",reason:b.reason}):a(w=>w.kind==="ok"?w:{kind:"absent"}))},[]);o.useEffect(()=>{x();const n=setInterval(x,U),b=()=>{document.hidden||x()};return document.addEventListener("visibilitychange",b),()=>{clearInterval(n),document.removeEventListener("visibilitychange",b)}},[x]);const P=async n=>{f(!0),m(null);const b=await n();f(!1),b.ok?g(null):m(b.error||t("projects.actionFailed")),x()},N=V(d.kind==="ok"?d.projects:[],E);o.useEffect(()=>{N.page!==E&&v(N.page)},[N.page,E]);const h=d.kind==="loading"?e.jsx("div",{className:"loading",children:t("hud.loading")}):d.kind==="denied"?e.jsx(Q,{scope:"admin",locked:d.reason==="locked",onUnlocked:x}):d.kind==="absent"?e.jsx("div",{className:"proj-empty",children:e.jsx("p",{children:t("projects.absent")})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"proj-head",children:[e.jsx("span",{className:"proj-count",children:t("projects.count",{n:d.projects.length})}),e.jsxs("button",{className:p?"proj-act on":"proj-act",onClick:()=>u(!0),children:[e.jsx(L,{name:"plus",size:12})," ",t("projects.add")]}),e.jsxs("button",{className:s==="admin"?"proj-act on":"proj-act",onClick:()=>{g(n=>n==="admin"?null:"admin"),m(null)},children:[e.jsx(L,{name:"lock",size:12})," ",t("projects.adminPassword")]})]}),!d.adminGated&&e.jsx("div",{className:"proj-hint",children:t("projects.adminUngated")}),s==="admin"&&e.jsxs("div",{className:"proj-admin-pw",children:[e.jsx(T,{t,busy:l,placeholder:t("projects.adminPasswordPlaceholder"),onSet:n=>P(()=>X(n)),onClear:()=>P(()=>W())}),k&&e.jsx("div",{className:"proj-err",children:k})]}),d.projects.length?e.jsx("ul",{className:"proj-list",children:N.items.map(n=>e.jsx(ue,{p:n,health:r[n.id],onRefresh:x,t},n.id))}):e.jsx("div",{className:"proj-empty",children:e.jsx("p",{children:t("projects.empty")})}),N.pageCount>1&&e.jsxs("nav",{className:"proj-pagination","aria-label":t("projects.pagination"),children:[e.jsx(G,{icon:"arrow-left",label:t("projects.previousPage"),className:"proj-act icon",size:14,disabled:N.page===1,onClick:()=>v(n=>n-1)}),e.jsx("span",{className:"proj-page-label",children:t("projects.pageOf",{page:N.page,pages:N.pageCount})}),e.jsx(G,{icon:"chevron-right",label:t("projects.nextPage"),className:"proj-act icon",size:14,disabled:N.page===N.pageCount,onClick:()=>v(n=>n+1)})]}),e.jsx("div",{className:"proj-page-details","aria-label":t("projects.gatewaySettings"),children:e.jsx(me,{gateway:d.gateway,onRefresh:x,t})})]}),I=d.kind==="ok"?d.gateway.identity:{icon:"gateway"};return e.jsxs("div",{className:"page-pane page-projects",children:[e.jsx(le,{className:"page-projects-scroll",children:e.jsxs("div",{className:"proj-body",children:[e.jsxs("div",{className:"cred-brand proj-brand",children:[e.jsx(R,{icon:I.icon,fallback:"gateway",size:30}),e.jsx("span",{children:"$ spexcode"})]}),e.jsx("h1",{className:"page-title",children:t("projects.title")}),h]})}),p&&e.jsx(de,{t,onClose:()=>u(!1),onAdded:()=>{u(!1),x()}})]})}export{Ne as default};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
|
3
|
-
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
|
4
|
-
* https://github.com/chjj/term.js
|
|
5
|
-
* @license MIT
|
|
6
|
-
*
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
*
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in
|
|
15
|
-
* all copies or substantial portions of the Software.
|
|
16
|
-
*
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
23
|
-
* THE SOFTWARE.
|
|
24
|
-
*
|
|
25
|
-
* Originally forked from (with the author's permission):
|
|
26
|
-
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
27
|
-
* http://bellard.org/jslinux/
|
|
28
|
-
* Copyright (c) 2011 Fabrice Bellard
|
|
29
|
-
* The original design remains. The terminal itself
|
|
30
|
-
* has been extended to include xterm CSI codes, among
|
|
31
|
-
* other features.
|
|
32
|
-
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}
|