@wjarka/cezarion 0.14.1 → 0.14.2

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.
Files changed (32) hide show
  1. package/package.json +3 -3
  2. package/web/dist/assets/{agent-accounts-MT-jtwOU.js → agent-accounts-BP0XBzQP.js} +1 -1
  3. package/web/dist/assets/alert-dialog-Bv9zV9w1.js +43 -0
  4. package/web/dist/assets/{collapsible-CkSaP6_n.js → collapsible-D7QXWXZq.js} +1 -1
  5. package/web/dist/assets/{commit-list-B47VXJez.js → commit-list-AwLNQE91.js} +1 -1
  6. package/web/dist/assets/{compare-variants-DNqtPFUv.js → compare-variants-CBggabVc.js} +1 -1
  7. package/web/dist/assets/{diff-controls-D5b8ocJ0.js → diff-controls-74Z0C3ay.js} +1 -1
  8. package/web/dist/assets/{dropdown-menu-xYcDecNM.js → dropdown-menu-DkzcT6aO.js} +1 -1
  9. package/web/dist/assets/{git-toolbar-C4zVVSpl.js → git-toolbar-Dntzprrr.js} +1 -1
  10. package/web/dist/assets/{github-D97-DHsF.js → github-CBYawanT.js} +1 -1
  11. package/web/dist/assets/{index-ujHRHX5o.js → index-BpI26cbM.js} +3 -3
  12. package/web/dist/assets/{index-hcgmKBPj.css → index-CG0CPeOx.css} +1 -1
  13. package/web/dist/assets/{markdown-CIi0LXvU.js → markdown-BssEOroY.js} +1 -1
  14. package/web/dist/assets/pill-C7gWe96Z.js +1 -0
  15. package/web/dist/assets/{project-router-BOglfKgF.js → project-router-a1gx3dfP.js} +1 -1
  16. package/web/dist/assets/{prompt-templates-DTSPmJP-.js → prompt-templates-B4eJ8kQZ.js} +1 -1
  17. package/web/dist/assets/{repo-git-DvxUSPot.js → repo-git-D8GN9ork.js} +1 -1
  18. package/web/dist/assets/{run-diff-DEVs-zV1.js → run-diff-CHDwMBEQ.js} +1 -1
  19. package/web/dist/assets/{run-header-Dvb1P3Ge.js → run-header-BlqnTQeP.js} +1 -1
  20. package/web/dist/assets/{skills-DJ06RZbi.js → skills-CkWBfIfQ.js} +1 -1
  21. package/web/dist/assets/{tab-link-ChqeHA8K.js → tab-link-DRP4FV8D.js} +1 -1
  22. package/web/dist/assets/{task-changes-CIN0MkJE.js → task-changes-CEyHhiK1.js} +1 -1
  23. package/web/dist/assets/{task-commits-BRZshVHV.js → task-commits-DTdRtZur.js} +1 -1
  24. package/web/dist/assets/{task-files-BZTNbpcP.js → task-files-Cr2qKUk2.js} +1 -1
  25. package/web/dist/assets/{task-thread-D_N6ELtr.js → task-thread-C8XeQXO4.js} +1 -1
  26. package/web/dist/assets/{textarea-DdKiIORK.js → textarea-DAHMUyAp.js} +1 -1
  27. package/web/dist/assets/{thread-loading-BRM8kyKz.js → thread-loading-OtvWGq9Y.js} +1 -1
  28. package/web/dist/assets/{token-metrics-DDvhrHmK.js → token-metrics-Q0paVq5n.js} +1 -1
  29. package/web/dist/assets/{workflows-CplF7YNk.js → workflows-uDL1z3Qp.js} +1 -1
  30. package/web/dist/index.html +12 -12
  31. package/web/dist/assets/alert-dialog-KUiPIBmb.js +0 -43
  32. package/web/dist/assets/pill-DDhByAhe.js +0 -1
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{$ as r,B as i,Gr as a,Jt as o,Ln as s,Ot as c,Pn as l,Q as u,Vn as d,Xr as ee,Z as f,Zr as p,_t as m,aa as h,bt as g,d as _,ei as v,et as y,la as b,pn as x,tt as S,ur as C,vt as w,yt as T}from"./alert-dialog-KUiPIBmb.js";import{n as E,t as D}from"./utils-CG8vWc5K.js";import{c as te,i as ne,l as re,r as ie,t as ae}from"./dropdown-menu-xYcDecNM.js";import{a as oe,i as se,r as ce}from"./agent-accounts-MT-jtwOU.js";import{t as O}from"./createLucideIcon-BHp8sXmF.js";import{t as k}from"./external-link-BE6y205O.js";import{t as le}from"./square-terminal-B6RYYieR.js";var ue=O(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),A=O(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),de=O(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),fe=O(`braces`,[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]]),pe=O(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),me=O(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),he=O(`diamond`,[[`path`,{d:`M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z`,key:`1f1r0c`}]]),ge=O(`feather`,[[`path`,{d:`M12.67 19a2 2 0 0 0 1.416-.588l6.154-6.172a6 6 0 0 0-8.49-8.49L5.586 9.914A2 2 0 0 0 5 11.328V18a1 1 0 0 0 1 1z`,key:`18jl4k`}],[`path`,{d:`M16 8 2 22`,key:`vp34q`}],[`path`,{d:`M17.5 15H9`,key:`1oz8nu`}]]),j=O(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),_e=O(`gem`,[[`path`,{d:`M10.5 3 8 9l4 13 4-13-2.5-6`,key:`b3dvk1`}],[`path`,{d:`M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z`,key:`7w4byz`}],[`path`,{d:`M2 9h20`,key:`16fsjt`}]]),M=O(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),ve=O(`hammer`,[[`path`,{d:`m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9`,key:`1hayfq`}],[`path`,{d:`m18 15 4-4`,key:`16gjal`}],[`path`,{d:`m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5`,key:`15ts47`}]]),ye=O(`hexagon`,[[`path`,{d:`M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z`,key:`yt0hxn`}]]),be=O(`mouse-pointer-2`,[[`path`,{d:`M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z`,key:`edeuup`}]]),xe=O(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Se=O(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),Ce=O(`shapes`,[[`path`,{d:`M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z`,key:`1bo67w`}],[`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`,key:`1bkyp8`}],[`circle`,{cx:`17.5`,cy:`17.5`,r:`3.5`,key:`w3z12y`}]]),we=O(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),Te=O(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Ee=O(`waves-horizontal`,[[`path`,{d:`M2 12q2.5 2 5 0t5 0 5 0 5 0`,key:`8ddzzs`}],[`path`,{d:`M2 19q2.5 2 5 0t5 0 5 0 5 0`,key:`1wj4st`}],[`path`,{d:`M2 5q2.5 2 5 0t5 0 5 0 5 0`,key:`69x50u`}]]),De=O(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),N=e(t(),1),P=n(),Oe=i(`inline-block size-[7px] shrink-0 rounded-full`,{variants:{tone:{success:`bg-success`,pending:`bg-pending-strong`,danger:`bg-danger`,accent:`bg-accent-strong`,neutral:`bg-soft-foreground`},pulse:{true:`animate-pulse motion-reduce:animate-none`,false:``}},defaultVariants:{tone:`neutral`,pulse:!1}});function ke({className:e,tone:t=`neutral`,pulse:n=!1,...r}){return(0,P.jsx)(`span`,{"data-slot":`status-dot`,"data-tone":t,className:D(Oe({tone:t,pulse:n,className:e})),...r})}var Ae=[`done`,`failed`,`cancelled`],je=[`done`,`failed`];function F(e){return e.status===`failed`&&e.autoResumeAt!==void 0}function Me(e){return Ae.includes(e)}function I(e){return e.archived||F(e)||!je.includes(e.status)?!1:e.finishedAt!==void 0}function L(e){let t=e.finishedAt;return t===void 0||!I(e)?!1:e.seenAt===void 0||e.seenAt<t}function Ne(e){return!F(e)&&Me(e.status)&&!L(e)}function Pe(e){return e.reduce((e,t)=>L(t)?e+1:e,0)}var R=(0,N.createContext)(null);function Fe({children:e}){let[t,n]=(0,N.useState)(()=>new Map),r=(0,N.useCallback)((e,t)=>{n(n=>{let r=new Map(n);return r.set(e,t),r})},[]),i=(0,N.useCallback)(e=>{n(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),a=d((0,N.useMemo)(()=>[...t.values()].flat(),[t])),o=(0,N.useMemo)(()=>({publish:r,retract:i,lookup:a}),[r,i,a]);return(0,P.jsx)(R.Provider,{value:o,children:e})}var z=(0,N.createContext)(null);function Ie({projectId:e,requests:t,children:n}){let r=(0,N.useContext)(R),i=(0,N.useId)();(0,N.useEffect)(()=>{if(r)return r.publish(i,t),()=>r.retract(i)},[r,i,t.map(e=>`${e.projectId} ${e.kind}#${e.number}`).sort().join(`|`)]);let a=d(r?Le:t),o=r?.lookup??a,s=(0,N.useMemo)(()=>({lookup:o,projectId:e}),[o,e]);return(0,P.jsx)(z.Provider,{value:s,children:n})}var Le=[];function Re(e,t,n){let r=(0,N.useContext)(z),i=n??r?.projectId;return!r||!i||t===void 0?ze:r.lookup({projectId:i,kind:e,number:t})}var ze=Object.freeze({state:`idle`}),Be={success:`border-success/40 text-success`,danger:`border-danger/40 text-danger`,accent:`border-accent-strong/35 text-accent-text`,merged:`border-merged-strong/35 text-merged-text`,info:`border-info/40 text-info`,neutral:`border-border text-muted-foreground`,pending:`border-pending-strong/45 text-pending-strong`,conflict:`border-conflict/45 text-conflict`},Ve={success:`hover:bg-success/10`,danger:`hover:bg-danger/10`,accent:`hover:bg-accent-strong/10`,merged:`hover:bg-merged-strong/10`,info:`hover:bg-info/10`,neutral:`hover:bg-muted`,pending:`hover:bg-pending-strong/10`,conflict:`hover:bg-conflict/10`},He={draft:T,"review-required":g,"changes-requested":c,"checks-pending":null,"checks-failing":S,ready:f,merged:m,closed:w,open:u,completed:f,"not-planned":y};function B({reference:e,taskTitle:t,status:n,conflicting:r,conflictAction:i,projectId:a,className:s,compact:c=!1}){let{kind:l,number:u,url:d}=e,f=Re(l,u,a),m=n??f.status,h=p(m),g=l===`PR`&&(r??f.conflicting)===!0,_=g?ee:h,v=D(`inline-flex h-[22px] items-center gap-1 rounded-md border px-1.5 font-mono text-[10px] font-normal`,Be[_?.tone??`accent`],s),y=Ke(f,_,g?h:void 0),b=u?`${!c&&l===`Issue`?`Issue `:``}#${u}`:l,x=l===`PR`?`pull request`:`issue`,S=`Open the ${x} for ${t}${_?` — ${_.label}`:``}`,C=(0,P.jsxs)(P.Fragment,{children:[g?(0,P.jsx)(o,{className:`size-2.5 shrink-0`,"aria-hidden":`true`}):(0,P.jsx)(Je,{status:_?m:void 0}),b]}),w=!d||!E(d)?(0,P.jsx)(`span`,{"data-slot":l===`PR`?`pr-chip`:`issue-chip`,"data-status":m,...g?{"data-conflicting":`true`}:{},"aria-label":_?`${x} ${b} — ${_.label}`:void 0,className:v,children:C}):(0,P.jsx)(`a`,{"data-slot":l===`PR`?`pr-chip`:`issue-chip`,"data-status":m,...g?{"data-conflicting":`true`}:{},href:d,target:`_blank`,rel:`noopener noreferrer`,title:y?void 0:d,"aria-label":S,className:D(v,Ve[_?.tone??`accent`]),children:C});if(!y)return w;let T=(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`span`,{className:`block font-medium`,children:[l===`PR`?`Pull request`:`Issue`,u?` #${u}`:``,` · `,y.headline]}),(0,P.jsx)(`span`,{className:`block`,children:y.detail}),y.also?(0,P.jsx)(`span`,{className:`block opacity-70`,children:y.also}):null,d&&E(d)?(0,P.jsx)(`span`,{className:`block opacity-70`,children:d.replace(/^https?:\/\//,``)}):null]});return(0,P.jsx)(Ge,{chip:w,action:g?i:void 0,state:f.state,children:T})}var V=(0,N.createContext)(()=>{});function Ue(){return(0,N.useContext)(V)}var We=150,H=120;function Ge({chip:e,action:t,state:n,children:r}){let[i,a]=(0,N.useState)(!1),o=(0,N.useRef)(null),s=(0,N.useRef)(null),c=(0,N.useRef)(void 0),l=(0,N.useCallback)((e,t)=>{clearTimeout(c.current),c.current=setTimeout(()=>a(e),t)},[]),u=(0,N.useCallback)(()=>{clearTimeout(c.current),a(!1)},[]);(0,N.useEffect)(()=>()=>clearTimeout(c.current),[]);let d=e=>e instanceof Node&&(s.current?.contains(e)||o.current?.contains(e));return(0,P.jsxs)(ce,{open:i,onOpenChange:e=>e?a(!0):u(),children:[(0,P.jsx)(se,{asChild:!0,ref:o,onPointerEnter:e=>{e.pointerType!==`touch`&&l(!0,We)},onPointerLeave:e=>{e.pointerType!==`touch`&&l(!1,H)},onFocus:()=>a(!0),onBlur:e=>{d(e.relatedTarget)||u()},onKeyDown:e=>{if(e.key===`Escape`)return u();if(e.key!==`Tab`||e.shiftKey||!t)return;let n=s.current?.querySelector(`button:not([disabled]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])`);n&&(e.preventDefault(),n.focus())},...t?{"aria-haspopup":`dialog`,"aria-expanded":i}:{},children:e}),(0,P.jsxs)(oe,{ref:s,side:`top`,role:t?`dialog`:`tooltip`,"data-slot":`reference-status-card`,"data-tooltip-state":n,className:`w-64 space-y-2 p-3 text-xs`,onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:e=>{e.preventDefault(),d(document.activeElement)&&o.current?.focus()},onPointerEnter:()=>clearTimeout(c.current),onPointerLeave:e=>{e.pointerType!==`touch`&&l(!1,H)},children:[(0,P.jsx)(`div`,{className:`space-y-0.5`,children:r}),t?(0,P.jsx)(V.Provider,{value:u,children:t}):null]})]})}function Ke(e,t,n){if(t){let{label:r,hint:i}=t,a=n?`also ${qe(n.label)} — ${n.hint}`:void 0;return e.state===`unavailable`?{headline:r,detail:`last known — GitHub is unreachable${e.reason?` (${e.reason})`:``}`,...a?{also:a}:{}}:{headline:r,detail:i,...a?{also:a}:{}}}switch(e.state){case`loading`:return{headline:`Checking GitHub…`,detail:`the status of this reference is on its way`};case`unavailable`:return{headline:`Status unavailable`,detail:e.reason??`GitHub could not be reached — the chip says nothing rather than guessing`};case`unknown`:return{headline:`Not found on this repository`,detail:`GitHub has no such number here — the reference may point at another repo`};default:return null}}function qe(e){return e.charAt(0).toLowerCase()+e.slice(1)}function Je({status:e}){if(!e)return null;if(e===`checks-pending`)return(0,P.jsx)(r,{"data-slot":`status-dot`,"data-tone":`pending`,className:`size-3 animate-pulse motion-reduce:animate-none`,"aria-hidden":`true`});let t=He[e];return t?(0,P.jsx)(t,{className:`size-2.5 shrink-0`,"aria-hidden":`true`}):null}var U={claude:`Claude Code`,codex:`Codex`,opencode:`OpenCode`,pi:`pi`,cursor:`Cursor`};function W(e){let t=e.currentStepId?e.steps.find(t=>t.id===e.currentStepId):void 0;if(t?.backend)return t.backend;if(e.runner)return e.runner;for(let t=e.steps.length-1;t>=0;--t){let n=e.steps[t]?.backend;if(n)return n}return`claude`}function G(e){return e.runner??`claude`}function K(e,t){let n=b(t,e);return n?.enabled===!1?{provider:e,usable:!1,reason:`${U[e]} is disabled. Enable it in Settings → Agents → Providers.`}:n?.status===`connected`?{provider:e,usable:!0}:{provider:e,usable:!1,reason:`${U[e]} credentials are unavailable. Authorize it in Settings → Agents → Providers.`}}function Ye(e,t){return K(W(e),t)}function Xe(e,t){return K(G(e),t)}function q(e){let t=s(),n=W(e);return t.isSuccess&&t.data?Ye(e,t.data):{provider:n,usable:!0}}function Ze(e){let t=s(),n=G(e);return t.isSuccess&&t.data?Xe(e,t.data):t.isError?{provider:n,usable:!1,reason:`Provider authentication could not be verified.`}:{provider:n,usable:!1,reason:`Checking agent providers…`}}var Qe={folder:j,terminal:le,vscode:pe,cursor:be,zed:De,windsurf:Ee,sublime:ge,idea:he,pycharm:ye,webstorm:M,goland:Ce,rubymine:_e,phpstorm:fe,clion:me,rider:de,"android-studio":we,xcode:ve,warp:Se,claude:A,codex:Te,opencode:A,pi:A};function J(e){return e.icon&&Qe[e.icon]||k}function Y(e){let t=/^cli:(claude|codex|opencode|pi|cursor)$/.exec(e);return t?t[1]:void 0}function $e({choices:e,onPick:t,label:n=`Open in…`,title:r,triggerVariant:i=`ghost`,disabled:a=!1,leading:o,trailing:s,slot:c}){return(0,P.jsxs)(ae,{children:[(0,P.jsx)(re,{asChild:!0,children:(0,P.jsxs)(_,{variant:i,size:`sm`,title:r,disabled:a,"data-slot":c,children:[(0,P.jsx)(k,{"aria-hidden":`true`}),n]})}),(0,P.jsxs)(ie,{align:`end`,children:[o,o&&e.length>0?(0,P.jsx)(te,{}):null,e.map(({target:e,suffix:n,title:r})=>{let i=J(e);return(0,P.jsxs)(ne,{"data-target":e.id,title:r,onSelect:()=>t(e.id),children:[(0,P.jsx)(i,{"aria-hidden":`true`}),e.label,n??``]},e.id)}),s]})]})}function X(e){return e===`running`||e===`queued`||e===`waiting`}function Z(e){return[...e.steps].reverse().find(e=>e.sessionId)?.sessionId}function Q(e){return[...e.steps].reverse().find(e=>e.sessionId)?.backend??e.runner??`claude`}var et=/^[A-Za-z0-9._][A-Za-z0-9._-]{0,199}$/;function tt(e,t){if(et.test(t))switch(e){case`codex`:return`codex resume ${t}`;case`cursor`:return;case`opencode`:return`opencode --session ${t}`;default:return`claude --resume ${t}`}}function nt(e){if(X(e.status))return;let t=Z(e);if(t===void 0||!et.test(t))return;let n=Q(e),r=n===`cursor`?e.cliResumeCommand:tt(n,t);if(r!==void 0)return e.worktreePath?`cd ${e.worktreePath} && ${r}`:r}function rt(e,t){let n=Y(t);return!n||X(e.status)?!1:n===Q(e)&&Z(e)!==void 0}function it(e){return e.status===`cancelled`&&e.startedAt===void 0&&e.workflowDef!==void 0&&e.steps.every(e=>e.status===`pending`&&e.startedAt===void 0&&!e.sessionId)}function at(e){let t=X(e.status),n=Z(e)!==void 0;return{finish:e.status===`waiting`||e.status===`review`,continueRun:!t&&!e.stopping&&e.delegation?.role!==`invalid`&&!(e.delegation?.role===`worker`&&e.delegation.destroy)&&(n||it(e)),terminal:!t&&n,notes:!0,archive:!t,pin:!e.archived,markUnread:I(e)&&!L(e),cancel:t,deleteRun:!t}}function ot(e){return`Merge head branch and resolve conflicts in ${e?`PR number ${e}`:`this pull request`}`}function st(e){return e===`review`?`Accept the changes without a PR`:`Close the session`}function ct(e,t){let n=e.filter(e=>!e.archived&&e.status===`queued`).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)).findIndex(e=>e.id===t);return n>=0?n+1:void 0}var lt=[50,100,200,400,800,1e3,1e3,1e3,1e3],ut=e=>new Promise(t=>setTimeout(t,e));function dt(e){return e instanceof v&&e.status===409&&e.message===`run is still active`}async function ft(e,t=ut){for(let n=0;;n+=1)try{return await e()}catch(e){let r=lt[n];if(!dt(e)||r===void 0)throw e;await t(r)}}function pt(e){return X(e.status)?`live`:at(e).continueRun?`resume`:`unavailable`}function mt(e,t){let n=C(e.id,t),r=x(e.id,t),i=q(e),a=Ze(e),[o,s]=(0,N.useState)(void 0),[c,l]=(0,N.useState)(!1),u=(0,N.useRef)(!1),d=pt(e),ee=d===`resume`?!a.usable:d===`live`&&!i.usable,f=d===`unavailable`?`no-session`:ee?`provider`:void 0,p=f===`no-session`?`This session has ended and no agent session was recorded, so the answer cannot be delivered.`:f===`provider`?d===`resume`?a.reason:i.reason:void 0,m=(e,t)=>a.usable?r.mutateAsync({text:e,...t===void 0?{}:{images:t}}):Promise.reject(Error(a.reason??`The run provider is unavailable.`));return{mode:d,blockedBy:f,reason:p,isPending:c||n.isPending||r.isPending,error:o,send:async(t,r)=>{if(f||u.current)return p;u.current=!0,l(!0),s(void 0);try{if(d===`resume`){await ft(()=>m(t,r));return}try{await n.mutateAsync({text:t,...r===void 0?{}:{images:r}})}catch(n){if(n instanceof v&&n.status===409&&Z(e)!==void 0){try{await ft(()=>m(t,r))}catch(e){let t=e instanceof Error?e.message:String(e);throw Error(`Session closed. Retry to reopen the session. ${t}`)}return}throw n}return}catch(e){let t=e instanceof Error?e.message:String(e);return s(t),t}finally{u.current=!1,l(!1)}}}}function $({run:e,projectId:t,prNumber:n}){let r=mt(e,t),i=Ue(),[a,o]=(0,N.useState)(!1),s=a||r.isPending,c=!!r.blockedBy,l=async()=>{if(s||c)return;let e=r.mode===`resume`;o(!0);try{let t=await r.send(ot(n));t?h(t,{tone:`danger`}):(h(`${e?`Task reopened`:`Sent to the task`} — resolving conflicts${n?` in PR #${n}`:``}`),i())}finally{o(!1)}};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(_,{type:`button`,size:`sm`,"data-slot":`reference-conflict-action`,disabled:c||s,onClick:()=>void l(),className:`h-7 w-full text-xs`,children:s?`Sending…`:`Resolve conflicts`}),c&&r.reason?(0,P.jsx)(`span`,{className:`block opacity-70`,children:r.reason}):null]})}function ht({projectId:e,runId:t,prNumber:n}){let r=l(e,t);return r.data?(0,P.jsx)($,{run:r.data,projectId:e,prNumber:n}):(0,P.jsx)(_,{type:`button`,size:`sm`,disabled:!0,className:`h-7 w-full text-xs`,children:r.isError?`Unavailable`:`Loading…`})}function gt({run:e,reference:t,className:n,compact:r=!1}){return(0,P.jsx)(B,{reference:t,taskTitle:a(e),conflictAction:(0,P.jsx)($,{run:e,prNumber:t.number}),className:n,compact:r})}function _t(e,t){let[n,r]=(0,N.useState)(!1),[i,a]=(0,N.useState)(``),o=(0,N.useRef)(!1);return{editing:n,draft:i,setDraft:a,begin:()=>{a(e),o.current=!1,r(!0)},commit:()=>{if(o.current)return;o.current=!0,r(!1);let n=i.trim();n.length===0||n===e||t(n)},cancel:()=>{o.current=!0,r(!1)}}}function vt({editor:e,className:t}){return(0,P.jsx)(`input`,{"data-slot":`title-input`,"aria-label":`Task title`,autoFocus:!0,value:e.draft,onChange:t=>e.setDraft(t.target.value),onBlur:e.commit,onKeyDown:t=>{t.key===`Enter`?(t.preventDefault(),e.commit()):t.key===`Escape`&&(t.preventDefault(),e.cancel())},className:D(`w-full min-w-0 rounded-sm border border-border bg-card px-1.5 py-0.5 outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50`,t)})}function yt({className:e,dot:t,pulse:n=!1,children:r,...i}){return(0,P.jsxs)(`span`,{"data-slot":`pill`,className:D(`inline-flex items-center gap-1.5 rounded-full bg-muted px-2.5 py-[3px] text-xs font-medium whitespace-nowrap text-muted-foreground`,e),...i,children:[t?(0,P.jsx)(ke,{tone:t,pulse:n}):null,r]})}export{M as A,Fe as C,Pe as D,L as E,ue as M,ke as O,Ie as S,Ne as T,$e as _,ht as a,q as b,rt as c,it as d,Q as f,at as g,nt as h,$ as i,j,xe as k,st as l,ct as m,vt as n,gt as o,Z as p,_t as r,mt as s,yt as t,X as u,Y as v,I as w,B as x,J as y};