@coreplane/switchboard 1.267.1 → 1.267.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.
- package/dist/assets/package-lock.json +51 -4
- package/dist/assets/package.json +1 -1
- package/dist/assets/source.json +3 -3
- package/dist/assets/src/core/publicationPush.ts +31 -9
- package/dist/assets/src/core/ship/coordinator.ts +11 -1
- package/dist/assets/web/dist/.vite/manifest.json +488 -488
- package/dist/assets/web/dist/assets/AppShell-CCPwPqvc.js +1 -0
- package/dist/assets/web/dist/assets/{CostChart-4TeDdbvJ.js → CostChart-Y5BqJKLA.js} +2 -2
- package/dist/assets/web/dist/assets/CostsPage-RRggVvIx.js +1 -0
- package/dist/assets/web/dist/assets/DeliveryPage-CuIBLfup.js +1 -0
- package/dist/assets/web/dist/assets/HomePage-BQmun9kS.js +1 -0
- package/dist/assets/web/dist/assets/InputMenu-ymuqElZB.js +1 -0
- package/dist/assets/web/dist/assets/{MetricsPage-BQBuIuYU.js → MetricsPage-D2YGsI8C.js} +1 -1
- package/dist/assets/web/dist/assets/NotFoundPage-DZ6ysTXd.js +1 -0
- package/dist/assets/web/dist/assets/PendingTurnRow-BPyJ2f-i.js +1 -0
- package/dist/assets/web/dist/assets/PlanePage-C_gVx0Dg.js +1 -0
- package/dist/assets/web/dist/assets/ResidentDetailPage-CT6v9INM.js +1 -0
- package/dist/assets/web/dist/assets/ResidentsIndexPage-CWqPFf40.js +1 -0
- package/dist/assets/web/dist/assets/{RunFoldRow-BOWvSoIv.js → RunFoldRow-C1w-mwch.js} +1 -1
- package/dist/assets/web/dist/assets/RunRoutePage-zWMHTzla.js +9 -0
- package/dist/assets/web/dist/assets/RunsIndexPage-DF16D2Gg.js +1 -0
- package/dist/assets/web/dist/assets/RunsTabs-D7rsC4GR.js +1 -0
- package/dist/assets/web/dist/assets/ScheduledPage-CyRs0fXN.js +1 -0
- package/dist/assets/web/dist/assets/SettingSelect-CEkCLVWd.js +1 -0
- package/dist/assets/web/dist/assets/SettingsPage-BRuMCHSj.js +1 -0
- package/dist/assets/web/dist/assets/SilentTurn-D4MMDjWO.js +2 -0
- package/dist/assets/web/dist/assets/SlackMark-DjJTK2tD.js +1 -0
- package/dist/assets/web/dist/assets/StatusDot-BIAQN7iD.js +1 -0
- package/dist/assets/web/dist/assets/Tooltip-CxiQ7luL.js +1 -0
- package/dist/assets/web/dist/assets/UnitRoutePage-BQB5mAAl.js +1 -0
- package/dist/assets/web/dist/assets/{angular-html-BRRhsdQE.js → angular-html-DR_aiq_z.js} +1 -1
- package/dist/assets/web/dist/assets/{angular-ts-BFj-mqCm.js → angular-ts-DdAdPC99.js} +1 -1
- package/dist/assets/web/dist/assets/{apl-CsBuy1IL.js → apl-CFsVwJXV.js} +1 -1
- package/dist/assets/web/dist/assets/{astro-cVaqxBZq.js → astro-CV6XNX3T.js} +1 -1
- package/dist/assets/web/dist/assets/{blade-MEP5mWha.js → blade-BGvEqTv7.js} +1 -1
- package/dist/assets/web/dist/assets/browser-BWnzWwaT.js +6 -0
- package/dist/assets/web/dist/assets/{c-D4NGQ_Pd.js → c-ViUYuFAx.js} +1 -1
- package/dist/assets/web/dist/assets/{chapel-BkWImsIy.js → chapel-CZ7_YbfP.js} +1 -1
- package/dist/assets/web/dist/assets/{cobol-RPDSPSET.js → cobol-Dc8kYvS6.js} +1 -1
- package/dist/assets/web/dist/assets/{coffee-DZ5z7oVX.js → coffee-C0musOvn.js} +1 -1
- package/dist/assets/web/dist/assets/{cpp-CrBtIaRZ.js → cpp-ToPQGcGd.js} +1 -1
- package/dist/assets/web/dist/assets/{crystal-DJesYi6f.js → crystal-DUJIaO8W.js} +1 -1
- package/dist/assets/web/dist/assets/{css-DO9mjau-.js → css-BTcEgWyQ.js} +1 -1
- package/dist/assets/web/dist/assets/{dist-XRrc0hhm.js → dist-I2OEmPqz.js} +2 -2
- package/dist/assets/web/dist/assets/{edge-C3VzbSW0.js → edge-D8sh1uAj.js} +1 -1
- package/dist/assets/web/dist/assets/{elixir-BkD_Vhfe.js → elixir-D5vOtHrB.js} +1 -1
- package/dist/assets/web/dist/assets/{elm-KIM0mFPk.js → elm-B_5xqTuz.js} +1 -1
- package/dist/assets/web/dist/assets/{erb-D2ruCqb2.js → erb-DBEct7_l.js} +1 -1
- package/dist/assets/web/dist/assets/{eventSource-Cv0AFlMi.js → eventSource-Ds6_gjPD.js} +1 -1
- package/dist/assets/web/dist/assets/{git-rebase-CnfbQTxA.js → git-rebase-lWoTL0Qh.js} +1 -1
- package/dist/assets/web/dist/assets/{glimmer-js-CbiwFXWH.js → glimmer-js-DNfSP4GT.js} +1 -1
- package/dist/assets/web/dist/assets/{glimmer-ts-DV8ii0Pv.js → glimmer-ts-DpPeWMLs.js} +1 -1
- package/dist/assets/web/dist/assets/{glsl-CgmznWkA.js → glsl-m6Ziz8q0.js} +1 -1
- package/dist/assets/web/dist/assets/{graphql-BK-bBYfH.js → graphql-shD9521e.js} +1 -1
- package/dist/assets/web/dist/assets/{hack-DnwTTP5n.js → hack-D_Mf_2gv.js} +1 -1
- package/dist/assets/web/dist/assets/{haml-DAVJsWwT.js → haml-BuEAF47S.js} +1 -1
- package/dist/assets/web/dist/assets/{handlebars-voOVfxFL.js → handlebars-D2aiSYtv.js} +1 -1
- package/dist/assets/web/dist/assets/{html-3FTqwaPk.js → html-CRjXJZot.js} +1 -1
- package/dist/assets/web/dist/assets/{html-derivative-CSlhLDQn.js → html-derivative-CYpQX_KK.js} +1 -1
- package/dist/assets/web/dist/assets/{http-Vx4ilPfS.js → http-D6vXMpc_.js} +1 -1
- package/dist/assets/web/dist/assets/{hurl-DxyZDE3R.js → hurl-B634cMJT.js} +1 -1
- package/dist/assets/web/dist/assets/{java-nWqdjNJG.js → java-BlINdAve.js} +1 -1
- package/dist/assets/web/dist/assets/{javascript-Dr82HOwp.js → javascript-BBEMmUOu.js} +1 -1
- package/dist/assets/web/dist/assets/{jinja-BhjLrPOt.js → jinja-BIA8TYHJ.js} +1 -1
- package/dist/assets/web/dist/assets/{jison-DilGIUa8.js → jison-aepfTbzH.js} +1 -1
- package/dist/assets/web/dist/assets/{json-CrOcvmhJ.js → json-DmYZ1boG.js} +1 -1
- package/dist/assets/web/dist/assets/{jsx-BW_RX-fo.js → jsx-GkaaF4_W.js} +1 -1
- package/dist/assets/web/dist/assets/{julia-CWH071DB.js → julia-DRtMztOz.js} +1 -1
- package/dist/assets/web/dist/assets/{just-DkhhoWBy.js → just-PvoeEWoy.js} +1 -1
- package/dist/assets/web/dist/assets/{latex-cuHJ4TUT.js → latex-Bujuo3AZ.js} +1 -1
- package/dist/assets/web/dist/assets/{liquid-DG6afYQN.js → liquid-B0h0HkS3.js} +1 -1
- package/dist/assets/web/dist/assets/{lua-C5CMnCPS.js → lua-6O-O1CSO.js} +1 -1
- package/dist/assets/web/dist/assets/main-DYwKyLY5.js +28 -0
- package/dist/assets/web/dist/assets/{marko-Dy2_DuC4.js → marko-XS_tpV0N.js} +1 -1
- package/dist/assets/web/dist/assets/{mdc-BMKb_EeA.js → mdc-DxULuTS1.js} +1 -1
- package/dist/assets/web/dist/assets/{nginx-og0RgMKf.js → nginx-n2RAfCKE.js} +1 -1
- package/dist/assets/web/dist/assets/{nim-CQxTQQP0.js → nim-DJxdqD8U.js} +1 -1
- package/dist/assets/web/dist/assets/{org-b5lkq_Pl.js → org-R9yxwZ2v.js} +1 -1
- package/dist/assets/web/dist/assets/{perl-D9X5_i_J.js → perl-zKAUtl73.js} +1 -1
- package/dist/assets/web/dist/assets/{php-CwUxvLX0.js → php-Dk50x1WE.js} +1 -1
- package/dist/assets/web/dist/assets/{pug-uOIOExr0.js → pug-C3TSg8JJ.js} +1 -1
- package/dist/assets/web/dist/assets/{qml-g5RoADf-.js → qml-CL1nqvCt.js} +1 -1
- package/dist/assets/web/dist/assets/{r-5LdAopD3.js → r-Bo44Yl7y.js} +1 -1
- package/dist/assets/web/dist/assets/{razor-DwrvFLYQ.js → razor-k2Dt2qXz.js} +1 -1
- package/dist/assets/web/dist/assets/{regexp-dGtAaxC-.js → regexp-Uy_HNe6G.js} +1 -1
- package/dist/assets/web/dist/assets/{rst-wFdW0brr.js → rst-U0zcRJ60.js} +1 -1
- package/dist/assets/web/dist/assets/{ruby-DPglN6I9.js → ruby-DUyqwP37.js} +1 -1
- package/dist/assets/web/dist/assets/{sas-CUbCs40d.js → sas-CxC8bRy1.js} +1 -1
- package/dist/assets/web/dist/assets/{scss-B-DUiI1c.js → scss-DaqXj6RQ.js} +1 -1
- package/dist/assets/web/dist/assets/{shellscript-lGOV7Ram.js → shellscript-CI49IoFh.js} +1 -1
- package/dist/assets/web/dist/assets/{shellsession-BDWtAAjr.js → shellsession-DJxotIOK.js} +1 -1
- package/dist/assets/web/dist/assets/{soy-zod_dcOy.js → soy-BjVAVuCU.js} +1 -1
- package/dist/assets/web/dist/assets/{sql-BG0HSSoM.js → sql-CzxBKQd1.js} +1 -1
- package/dist/assets/web/dist/assets/{sseReplay-BsNQPLmJ.js → sseReplay-BDVyc8HX.js} +3 -3
- package/dist/assets/web/dist/assets/{stata-BVUMLp1W.js → stata-DLMv_9_X.js} +1 -1
- package/dist/assets/web/dist/assets/{surrealql-DiSUbHKF.js → surrealql-BzbVEZbO.js} +1 -1
- package/dist/assets/web/dist/assets/{svelte-DZenT45Y.js → svelte-DTSfopUt.js} +1 -1
- package/dist/assets/web/dist/assets/{templ-BWKRNM0-.js → templ-BPxFlKQj.js} +1 -1
- package/dist/assets/web/dist/assets/{tex-CbMzBlkK.js → tex-B_KndQwK.js} +1 -1
- package/dist/assets/web/dist/assets/{ts-tags-CZsVorDN.js → ts-tags-CG7tgvBl.js} +1 -1
- package/dist/assets/web/dist/assets/{tsx-R1r3mH4W.js → tsx-CN9eqIdJ.js} +1 -1
- package/dist/assets/web/dist/assets/{twig-BjPMyjKH.js → twig-CKPbB5ca.js} +1 -1
- package/dist/assets/web/dist/assets/{typescript-Bx-66VN_.js → typescript-BQAXVjHJ.js} +1 -1
- package/dist/assets/web/dist/assets/{typst-fW037Eo6.js → typst-D3EaP9Ui.js} +1 -1
- package/dist/assets/web/dist/assets/{vue-D1V_GNxW.js → vue-DuQwQ__D.js} +1 -1
- package/dist/assets/web/dist/assets/{vue-html-C-4pTZ-s.js → vue-html-UEJn5cLD.js} +1 -1
- package/dist/assets/web/dist/assets/{vue-vine-C-QsX3hR.js → vue-vine-DDdijZY2.js} +1 -1
- package/dist/assets/web/dist/assets/{wallClock-x0hjr0J_.js → wallClock-DaewxNMY.js} +1 -1
- package/dist/assets/web/dist/assets/{xml-BJTJXPgC.js → xml-BezNDynk.js} +1 -1
- package/dist/assets/web/dist/assets/{xsl-Xc9lukqe.js → xsl-Bzb2zIr8.js} +1 -1
- package/dist/assets/web/dist/assets/{yaml-Dw-FMsQa.js → yaml-DOccVRRG.js} +1 -1
- package/dist/cli.js +74 -20
- package/package.json +1 -1
- package/dist/assets/web/dist/assets/AppShell-DPJVhUGP.js +0 -1
- package/dist/assets/web/dist/assets/CostsPage-8HDgvuWB.js +0 -1
- package/dist/assets/web/dist/assets/DeliveryPage-QyS6_Q0m.js +0 -1
- package/dist/assets/web/dist/assets/HomePage-Bm40r0wF.js +0 -1
- package/dist/assets/web/dist/assets/InputMenu-BRV35UWP.js +0 -1
- package/dist/assets/web/dist/assets/NotFoundPage-CDjMfCcj.js +0 -1
- package/dist/assets/web/dist/assets/PendingTurnRow-BqY-EaZR.js +0 -1
- package/dist/assets/web/dist/assets/PlanePage-VmzjNLAz.js +0 -1
- package/dist/assets/web/dist/assets/ResidentDetailPage-hjX3tRCh.js +0 -1
- package/dist/assets/web/dist/assets/ResidentsIndexPage-BKGnlCEh.js +0 -1
- package/dist/assets/web/dist/assets/RunRoutePage-D9ztf-uE.js +0 -9
- package/dist/assets/web/dist/assets/RunsIndexPage-DTYQbhtr.js +0 -1
- package/dist/assets/web/dist/assets/RunsTabs-C7Ua3XX5.js +0 -1
- package/dist/assets/web/dist/assets/ScheduledPage-BAYR0tuv.js +0 -1
- package/dist/assets/web/dist/assets/SettingSelect-CEeA4iuC.js +0 -1
- package/dist/assets/web/dist/assets/SettingsPage-BlYBmCG9.js +0 -1
- package/dist/assets/web/dist/assets/SilentTurn-CHfzRQW8.js +0 -2
- package/dist/assets/web/dist/assets/SlackMark-DB0MGiF5.js +0 -1
- package/dist/assets/web/dist/assets/StatusDot-BMkUFVE8.js +0 -1
- package/dist/assets/web/dist/assets/Tooltip-Dfot16IA.js +0 -1
- package/dist/assets/web/dist/assets/UnitRoutePage-BdZoT-4d.js +0 -1
- package/dist/assets/web/dist/assets/browser-CCImen5O.js +0 -6
- package/dist/assets/web/dist/assets/main-B32N1vUh.js +0 -28
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,r as t,t as n}from"./AppShell-DPJVhUGP.js";import{An as r,Cn as i,Cr as a,Ft as o,Gr as s,Ii as c,Li as l,Mn as u,Pi as d,Pt as ee,Qr as f,Sn as p,Tr as m,Xr as h,_r as g,bn as _,c as v,dr as te,en as ne,hr as re,ir as ie,ji as y,kn as b,l as ae,ln as x,o as oe,sr as se,t as S,wr as ce,xi as C,xn as w,y as T,yi as E,yn as D,yr as le}from"./browser-CCImen5O.js";import{t as O}from"./Tooltip-Dfot16IA.js";import{i as ue}from"./PendingTurnRow-BqY-EaZR.js";import{b as de,x as fe}from"./main-B32N1vUh.js";import{t as pe}from"./eventSource-Cv0AFlMi.js";import{t as me}from"./wallClock-x0hjr0J_.js";import{r as he}from"./indexFormat-B-pd4r7Y.js";import{K as ge,i as _e}from"./indexRow-BGjjLnN5.js";import"./format-BldUwl_R.js";import{S as k,_ as ve,a as ye,b as be,c as A,d as j,f as xe,g as Se,h as M,i as Ce,l as we,m as N,n as Te,o as Ee,p as De,r as Oe,s as P,t as ke,u as Ae,v as je,x as Me,y as Ne}from"./SilentTurn-CHfzRQW8.js";import{t as F}from"./SlackMark-DB0MGiF5.js";import{T as Pe}from"./sseReplay-BsNQPLmJ.js";var I={class:`thread-tip flex max-w-xs flex-col gap-1 text-xs`},Fe={class:`tip-title leading-snug text-highlighted`},L={class:`flex flex-wrap items-center gap-x-1.5 gap-y-0.5 font-mono text-[0.68rem] text-muted`},Ie={class:`tip-when tabular-nums`},Le={class:`tip-source inline-flex items-center gap-1`},Re={class:`tip-runs`},ze={key:0,class:`tip-live inline-flex items-center gap-1 text-toned`},R=u({__name:`ThreadTip`,props:{row:{},now:{}},setup(e){let t=e,n=D(()=>k(t.row,t.now));return(t,r)=>(g(),i(`div`,I,[_(`p`,Fe,l(n.value.title),1),_(`p`,L,[_(`span`,Ie,l(n.value.when),1),r[1]||=_(`span`,{"aria-hidden":`true`},`·`,-1),_(`span`,Le,[e.row.surface===`slack`?(g(),w(F,{key:0})):p(``,!0),b(l(n.value.source),1)]),r[2]||=_(`span`,{"aria-hidden":`true`},`·`,-1),_(`span`,Re,l(n.value.runs),1),n.value.live?(g(),i(`span`,ze,[...r[0]||=[_(`span`,{class:`size-1.5 rounded-full bg-ok`,"aria-hidden":`true`},null,-1),b(`live`,-1)]])):p(``,!0)])]))}}),z={class:`rail flex flex-col gap-1 text-[0.8rem]`,"aria-label":`Recent threads`},B={class:`filter mb-2 flex items-center gap-2 rounded-lg border border-default px-2.5 py-1.5 transition-colors duration-150 ease-out focus-within:border-primary hover:border-accented`},V={key:0,class:`rounded border border-default px-1 font-mono text-[0.65rem] text-dimmed`},Be={key:0,class:`empty px-3 py-1 text-xs text-dimmed`},H={key:1,class:`nomatch px-3 py-1 text-xs text-dimmed`},U={key:0,class:`dot mt-px size-1.5 shrink-0 self-center rounded-full bg-ok motion-safe:animate-pulse`,"aria-label":`a run is in flight`},Ve={class:`title min-w-0 flex-1 truncate text-toned group-hover:text-highlighted group-aria-[current=page]:text-highlighted`},He={class:`when shrink-0 font-mono text-[0.7rem] tabular-nums text-dimmed`},W={class:`retention px-3 pt-1 text-[0.7rem] leading-relaxed text-dimmed`},G={class:`model px-3 pt-2 text-[0.7rem] leading-relaxed text-dimmed`,"data-testid":`what-is-a-thread`},K=500,Ue=u({__name:`ConversationRail`,props:{rows:{},current:{},now:{},retention:{}},setup(e,{expose:t}){let n=e,s=C(``),c=C(null),u=D(()=>N(n.rows,s.value));function d(){c.value?.focus(),c.value?.select()}function ee(e){e.key===`Escape`&&(s.value=``,c.value?.blur())}return t({focusFilter:d}),(t,n)=>{let d=T,v=m(`RouterLink`),te=O;return g(),i(`nav`,z,[r(v,{class:`new group mb-3 flex items-center gap-2 rounded-xl bg-inverted px-3 py-2 font-medium text-inverted no-underline transition-[transform,opacity] duration-150 ease-out hover:-translate-y-px hover:opacity-90 active:translate-y-0 active:opacity-100`,to:`/threads`,"aria-current":e.current===``?`page`:void 0,"data-testid":`new-thread`},{default:h(()=>[r(d,{name:`i-lucide-plus`,class:`size-4 shrink-0 transition-transform duration-150 ease-out group-hover:rotate-90`,"aria-hidden":`true`}),n[1]||=_(`span`,null,`New thread`,-1),n[2]||=_(`span`,{class:`kbd ml-auto flex gap-0.5 font-mono text-[0.65rem] opacity-70`,"aria-label":`shortcut shift command O`},[_(`kbd`,{class:`rounded border border-current/30 px-1`},`⇧`),_(`kbd`,{class:`rounded border border-current/30 px-1`},`⌘`),_(`kbd`,{class:`rounded border border-current/30 px-1`},`O`)],-1)]),_:1},8,[`aria-current`]),_(`label`,B,[r(d,{name:`i-lucide-search`,class:`size-3.5 shrink-0 text-dimmed`,"aria-hidden":`true`}),f(_(`input`,{ref_key:`filter`,ref:c,"onUpdate:modelValue":n[0]||=e=>s.value=e,class:`min-w-0 flex-1 bg-transparent text-[0.8rem] text-highlighted outline-none placeholder:text-dimmed`,type:`text`,placeholder:`Filter recent`,"aria-label":`Filter recent threads`,autocomplete:`off`,onKeydown:ee},null,544),[[ne,s.value]]),s.value?p(``,!0):(g(),i(`kbd`,V,`⌘K`))]),n[8]||=_(`p`,{class:`label px-3 pb-1 font-mono text-[0.65rem] font-medium uppercase tracking-wider text-dimmed`},`Recent`,-1),e.rows.length===0?(g(),i(`p`,Be,`Nothing yet. Ask something.`)):u.value.length===0?(g(),i(`p`,H,`Nothing matches "`+l(s.value)+`".`,1)):p(``,!0),r(o,{name:`sb-rise`,tag:`div`,class:`rows flex flex-col gap-0.5`},{default:h(()=>[(g(!0),i(x,null,a(u.value,t=>(g(),i(`div`,{key:t.id},[r(te,{"delay-duration":K,content:{side:`right`,sideOffset:12,align:`start`},ui:{content:`h-auto max-w-xs px-2.5 py-2`}},{content:h(()=>[r(R,{row:t,now:e.now},null,8,[`row`,`now`])]),default:h(()=>[r(v,{class:`row group relative flex items-baseline gap-2 rounded-lg px-3 py-1.5 no-underline transition-colors duration-150 ease-out hover:bg-(--ui-bg-muted) aria-[current=page]:bg-(--ui-bg-accented)`,to:`/threads/${encodeURIComponent(t.id)}`,"aria-current":t.id===e.current?`page`:void 0,"data-surface":t.surface},{default:h(()=>[n[3]||=_(`span`,{class:`bar absolute left-0 top-1/2 h-4 w-0.5 -translate-y-1/2 rounded-full bg-primary opacity-0 transition-opacity duration-150 ease-out group-aria-[current=page]:opacity-100`,"aria-hidden":`true`},null,-1),t.live?(g(),i(`span`,U)):p(``,!0),_(`span`,Ve,l(t.title),1),_(`span`,He,l(y(j)(t.lastAt,e.now)),1)]),_:2},1032,[`to`,`aria-current`,`data-surface`])]),_:2},1024)]))),128))]),_:1}),r(v,{class:`all mt-3 flex items-center gap-1.5 px-3 py-1 text-xs font-medium text-muted no-underline transition-colors duration-150 ease-out hover:text-highlighted`,to:`/runs`,"data-testid":`all-runs`},{default:h(()=>[n[4]||=b(` All runs `,-1),r(d,{name:`i-lucide-arrow-right`,class:`size-3 transition-transform duration-150 ease-out group-hover:translate-x-0.5`,"aria-hidden":`true`})]),_:1}),_(`p`,W,l(e.retention),1),_(`p`,G,[n[6]||=b(` A thread holds the runs its messages start. `,-1),r(v,{class:`text-muted hover:text-highlighted`,to:`/runs`},{default:h(()=>[...n[5]||=[b(`Runs`,-1)]]),_:1}),n[7]||=b(` lists every run across everyone's threads. `,-1)])])}}}),We={class:`empty mx-auto flex w-full max-w-2xl flex-col items-center gap-5 px-3 py-6 text-center`},Ge={class:`flex flex-col gap-1.5`},Ke={class:`greeting sb-stagger text-xl font-medium tracking-tight text-highlighted`,style:{"--sb-i":`1`}},qe={class:`sb-stagger w-full text-left`,style:{"--sb-i":`3`}},q={key:0,class:`chips flex flex-wrap justify-center gap-2`,"aria-label":`Suggestions`},J=[`onClick`],Je=u({__name:`EmptyState`,props:{name:{},hour:{},suggestions:{}},emits:[`pick`],setup(e,{emit:n}){let o=n;return(n,s)=>(g(),i(`section`,We,[r(t,{draw:``,idle:``,class:`mark-lg sb-stagger text-highlighted`,style:{"font-size":`3.25rem`,"--sb-i":`0`}}),_(`div`,Ge,[_(`h2`,Ke,l(y(M)(e.hour,e.name)),1),s[0]||=_(`p`,{class:`sub sb-stagger text-[0.875rem] text-muted`,style:{"--sb-i":`2`}},` Ask in plain words. The right agent picks it up, and you watch it work here. `,-1)]),_(`div`,qe,[ce(n.$slots,`default`)]),e.suggestions.length>0?(g(),i(`ul`,q,[(g(!0),i(x,null,a(e.suggestions,(e,t)=>(g(),i(`li`,{key:e,class:`sb-stagger`,style:c({"--sb-i":t+4})},[_(`button`,{type:`button`,class:`chip rounded-full border border-default px-3 py-1 text-[0.8rem] text-toned transition-[color,border-color,background-color,transform] duration-150 ease-out hover:-translate-y-px hover:border-accented hover:bg-(--ui-bg-muted) hover:text-highlighted focus-visible:outline-2 focus-visible:outline-primary active:translate-y-0`,onClick:t=>o(`pick`,e)},l(e),9,J)],4))),128))])):p(``,!0)]))}});function Ye(){return{runs:new Map,connected:!1}}function Xe(e,t){t.type===`upsert`&&t.run?t.run.finished||!t.run.threadKey?e.runs.delete(t.run.id):e.runs.set(t.run.id,{threadKey:t.run.threadKey,startedAt:t.run.startedAt,...t.run.label===void 0?{}:{label:t.run.label},...t.run.channelId===void 0?{}:{channelId:t.run.channelId}}):t.type===`removed`&&t.id&&e.runs.delete(t.id)}function Y(e){let t=new Map;for(let n of e.runs.values()){let e=t.get(n.threadKey)??[];e.push(n),t.set(n.threadKey,e)}return t}function Ze(e,t){return t.includes(`:`)?t:`${e}:${t}`}function Qe(e){let t=e.indexOf(`:`);return t>0?e.slice(0,t):`unknown`}function $e(e,t,n){if(!t.connected)return[...e];let r=Y(t),i=new Set,a=e.map(e=>{let t=Ze(n,e.id);i.add(t);let a=r.get(t);if(!a)return e.live?{...e,live:!1}:e;let o=e.live?0:a.length;return{...e,live:!0,runs:e.runs+o,lastAt:Math.max(e.lastAt,...a.map(e=>e.startedAt))}}),o=[];for(let[e,t]of r){if(i.has(e))continue;let r=t.reduce((e,t)=>t.startedAt>e.startedAt?t:e),a=r.label?he(r.label).snippet:void 0;o.push({id:e.startsWith(`${n}:`)?e.slice(n.length+1):e,title:a??r.label??e,excerpt:a??r.label??e,lastAt:r.startedAt,runs:t.length,live:!0,surface:Qe(r.channelId??e)})}return o.sort((e,t)=>t.lastAt-e.lastAt),[...o,...a]}var et={key:0,class:`mx-auto my-12 max-w-xl text-center text-toned`},tt=[`data-rail`],nt={key:0,class:`relative hidden md:block`},rt=[`aria-valuemin`,`aria-valuemax`,`aria-valuenow`],it={class:`thread mx-auto flex min-h-[calc(100vh-8rem)] w-full max-w-3xl flex-col`},at={key:4,class:`inline text-[0.875rem] text-toned`,"data-testid":`inline`},ot={key:2,class:`elsewhere sticky bottom-0 z-10 -mx-3 mt-auto bg-default/85 px-3 py-4 text-center text-[0.8rem] text-toned backdrop-blur sm:-mx-5 sm:px-5`,"data-testid":`elsewhere`},st=[`href`],ct={key:3,class:`composer-dock sticky bottom-0 z-10 -mx-3 mt-auto bg-default/85 px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-3 backdrop-blur sm:-mx-5 sm:px-5`},X=`(min-width: 48rem)`,Z=u({__name:`HomePage`,setup(t){let u=oe(`home`),f=me(u?.now),m=u?.conversation??``,ne=v(u?.retentionDays??null),ce=0,T=e=>`${e}-${++ce}`,O=E([]);for(let e of u?.turns??[]){if(`kind`in e){e.kind===`receipt`?O.push({key:T(`s`),kind:`silent`,reason:e.reason,at:e.decidedAt}):O.push({key:T(`w`),kind:`parent`,turn:e});continue}O.push({key:T(`p`),kind:`person`,text:e.request,at:e.receivedAt??e.startedAt,pending:!1});let t=!e.finished&&e.token?{eventsUrl:`/runs/${encodeURIComponent(e.id)}/events?t=${e.token}`,stopUrl:`/runs/${encodeURIComponent(e.id)}/stop?t=${e.token}`,serverNow:u?.now}:null;O.push({key:T(`a`),kind:`assistant`,turn:e,live:t,ended:e.finished})}let he=D(()=>{for(let e=O.length-1;e>=0;e--){let t=O[e];if(t.kind===`assistant`&&t.live&&!t.ended&&t.turn.hosted!==!0)return t}return null}),k=C(null),j=C(0);le(e,j);let M=C(``),N=C(void 0),F=D(()=>xe(he.value!==null,M.value)),I=C(!1);s(M,()=>{N.value&&M.value===``&&(N.value=void 0)});function Fe(e){M.value=e,L()}async function L(){if(!u||I.value)return;let e=Ee(M.value.trim(),u.commands);if(e===``)return;let t=E({key:T(`p`),kind:`person`,text:e,at:f.value,pending:!0});O.push(t),M.value=``,N.value=void 0,I.value=!0,j.value++;try{let n=await fetch(u.sendUrl,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`},body:JSON.stringify({text:e})}),r=await n.json().catch(()=>({}));if(n.status===202&&typeof r.viewPath==`string`&&typeof r.runId==`string`){let n=Se(r.viewPath);if(!n)throw Error(`the run's view path was not one`);t.pending=!1,S.pathname()===`/threads`&&S.replaceUrl(`/threads/${encodeURIComponent(m)}`),O.push({key:T(`a`),kind:`assistant`,turn:{id:r.runId,request:e,startedAt:f.value,receivedAt:f.value,finished:!1,eventCount:0},live:{eventsUrl:n.eventsUrl,stopUrl:n.stopUrl},ended:!1});return}if(n.ok&&r.offer&&typeof r.offer.line==`string`){t.pending=!1;let e=je({line:r.offer.line,...r.offer});M.value=e.command,N.value=e.hint;return}if(n.ok&&typeof r.reply==`string`){t.pending=!1;let e=Ae(r.reply);e.kind===`inline`&&O.push({key:T(`i`),kind:`inline`,text:e.text});return}throw Error(r.error??`HTTP ${n.status}`)}catch(e){t.pending=!1,t.failed=`not sent: ${e instanceof Error?e.message:`error`}`}finally{I.value=!1}}function Ie(){let e=k.value;e&&fetch(`${e}${e.includes(`?`)?`&`:`?`}mode=soft`,{method:`POST`,credentials:`same-origin`})}function Le(e,t,n){let r=O.filter(e=>e.kind===`person`),i=ve(r.map(e=>({text:e.text,folded:e.folded!==void 0,ref:e})),t);if(!i)return;let a=e.turn.receivedAt??e.turn.startedAt;i.ref.folded=n===void 0?``:`at ${ge(Math.max(0,n-a),`clock`)}`}function Re(e){e.ended=!0,k.value=null}let ze=Ne({width:S.readPref(P.width),collapsed:S.readPref(P.collapsed)}),R=C(ze.width),z=C(ze.collapsed),B=C(!1),V=C(S.mediaMatches(X)),Be=S.onMediaChange(X,e=>{V.value=e}),H=C(null),U=C(null),Ve=D(()=>V.value?z.value?`Show recent threads`:`Hide recent threads`:`Recent threads`);function He(){if(V.value=S.mediaMatches(X),V.value){z.value=!z.value,S.writePref(P.collapsed,z.value?`1`:`0`);return}B.value=!0}function W(e,t){R.value=we(e),t&&S.writePref(P.width,String(R.value))}let G=null;function K(e){G&&W(G.startWidth+(e.clientX-G.startX),!1)}function We(){window.removeEventListener(`pointermove`,K),G&&(G=null,S.writePref(P.width,String(R.value)))}function Ge(e){e.button===0&&(e.preventDefault(),G={startX:e.clientX,startWidth:R.value},e.currentTarget?.setPointerCapture?.(e.pointerId),window.addEventListener(`pointermove`,K),window.addEventListener(`pointerup`,We,{once:!0}))}function Ke(e){if(e.key===`ArrowRight`)W(R.value+A.step,!0);else if(e.key===`ArrowLeft`)W(R.value-A.step,!0);else if(e.key===`Home`)W(A.min,!0);else if(e.key===`End`)W(A.max,!0);else return;e.preventDefault()}se(()=>{window.removeEventListener(`pointermove`,K),window.removeEventListener(`pointerup`,We),Be()});function qe(e){let t=be(e);if(t){if(e.preventDefault(),t===`newThread`){S.navigate(`/threads`);return}if(H.value){H.value.focusFilter();return}if(z.value&&S.mediaMatches(X)){z.value=!1,S.writePref(P.collapsed,`0`),ie().then(()=>H.value?.focusFilter());return}B.value=!0,ie().then(()=>U.value?.focusFilter())}}let q=C(null),J=C(!1);function Y(){return document.body.scrollHeight-(window.innerHeight+window.scrollY)}s(()=>O.length,()=>{let e=Me(Y());ie().then(()=>{e?q.value?.scrollIntoView?.({block:`end`}):J.value=!0})});function Ze(){Me(Y())&&(J.value=!1)}function Qe(){q.value?.scrollIntoView?.({block:`end`,behavior:`smooth`}),J.value=!1}te(()=>{window.addEventListener(`scroll`,Ze,{passive:!0}),window.addEventListener(`keydown`,qe),u&&ft()}),re(()=>{window.removeEventListener(`scroll`,Ze),window.removeEventListener(`keydown`,qe),Q?.close()});let Z=E(Ye()),lt=D(()=>$e(u?.conversations??[],Z,u?.lane??``)),ut=D(()=>{let e=he.value?.turn.id;return Z.runs.size+(e&&!Z.runs.has(e)?1:0)}),dt=pe(),Q=null;function ft(){Q=dt(`/runs?stream=1&mine=1`);let e=!1;Q.onopen=()=>{e&&Z.runs.clear(),e=!0,Z.connected=!0},Q.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}Xe(Z,t)}}let pt=D(()=>{let e=O.find(e=>e.kind===`person`);return e?De(e.text):`Switchboard`});s([pt,ut],([e,t])=>{S.setTitle(t>0?`(${t}) ${e}`:e),S.setFavicon(t>0?fe:de)},{immediate:!0});let mt=D(()=>new Date(f.value).getHours()),ht=D(()=>O.length===0),$=u?.elsewhere,gt=$?$.surface===`web`?`This thread is another person's conversation. You can read it here.`:`This thread lives in ${_e[$.surface]??$.surface}.`:``;return(e,t)=>{let s=ae,v=ue;return g(),w(n,{title:`Threads`,nav:`home`},{leading:h(()=>[r(s,{class:`rail-toggle -ml-1`,size:`xs`,color:`neutral`,variant:`ghost`,icon:V.value&&!z.value?`i-lucide-panel-left-close`:`i-lucide-panel-left`,"aria-label":Ve.value,"aria-expanded":V.value?!z.value:void 0,onClick:He},null,8,[`icon`,`aria-label`,`aria-expanded`])]),default:h(()=>[y(u)?(g(),i(`div`,{key:1,class:d([`home gap-8 md:grid`,z.value?`md:grid-cols-[minmax(0,1fr)]`:`md:grid-cols-[var(--rail-w)_minmax(0,1fr)]`]),style:c({"--rail-w":`${R.value}px`}),"data-rail":z.value?`hidden`:`shown`},[z.value?p(``,!0):(g(),i(`aside`,nt,[r(Ue,{ref_key:`rail`,ref:H,class:`sticky top-20`,rows:lt.value,current:y(m),now:y(f),retention:y(ne)},null,8,[`rows`,`current`,`now`,`retention`]),_(`div`,{class:`handle group/handle absolute inset-y-0 -right-5 flex w-3 cursor-col-resize touch-none select-none justify-center outline-none`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the recent threads column`,"aria-valuemin":y(A).min,"aria-valuemax":y(A).max,"aria-valuenow":R.value,tabindex:`0`,"data-testid":`rail-handle`,onPointerdown:Ge,onKeydown:Ke,onDblclick:t[0]||=e=>W(y(A).default,!0)},[...t[5]||=[_(`span`,{class:`w-px rounded-full bg-(--ui-border-accented) opacity-0 transition-opacity duration-150 ease-out group-hover/handle:opacity-100 group-focus-visible/handle:opacity-100`,"aria-hidden":`true`},null,-1)]],40,rt)])),r(v,{open:B.value,"onUpdate:open":t[1]||=e=>B.value=e,side:`left`,title:`Recent threads`,ui:{content:`max-w-xs`}},{body:h(()=>[r(Ue,{ref_key:`sheetRail`,ref:U,rows:lt.value,current:y(m),now:y(f),retention:y(ne)},null,8,[`rows`,`current`,`now`,`retention`])]),_:1},8,[`open`]),_(`section`,it,[ht.value?(g(),w(Je,{key:0,class:`mb-auto mt-[clamp(1.5rem,14vh,9rem)]`,name:y(u).viewer.name,hour:mt.value,suggestions:y(u).suggestions,onPick:Fe},{default:h(()=>[r(ye,{modelValue:M.value,"onUpdate:modelValue":t[2]||=e=>M.value=e,mode:F.value,hint:N.value,commands:y(u).commands,autofocus:``,"sweep-on-mount":``,onSubmit:L,onStop:Ie},null,8,[`modelValue`,`mode`,`hint`,`commands`])]),_:1},8,[`name`,`hour`,`suggestions`])):(g(),w(o,{key:1,name:`sb-rise`,"move-class":`sb-move-move`,tag:`ol`,class:`transcript m-0 flex list-none flex-col gap-6 p-0 pb-32 pt-2`},{default:h(()=>[(g(!0),i(x,null,a(O,e=>(g(),i(`li`,{key:e.key},[e.kind===`person`?(g(),w(Ce,{key:0,text:e.text,at:e.at,now:y(f),pending:e.pending,folded:e.folded,failed:e.failed},null,8,[`text`,`at`,`now`,`pending`,`folded`,`failed`])):e.kind===`assistant`?(g(),w(Oe,{key:1,turn:e.turn,live:e.live,now:y(f),onInput:(t,n)=>Le(e,t,n),onEnded:t=>Re(e),onStop:t[3]||=e=>k.value=e},null,8,[`turn`,`live`,`now`,`onInput`,`onEnded`])):e.kind===`silent`?(g(),w(ke,{key:2,reason:e.reason,"decided-at":e.at,now:y(f)},null,8,[`reason`,`decided-at`,`now`])):e.kind===`parent`?(g(),w(Te,{key:3,turn:e.turn,now:y(f)},null,8,[`turn`,`now`])):(g(),i(`div`,at,[r(Pe,{text:e.text},null,8,[`text`])]))]))),128))]),_:1})),_(`div`,{ref_key:`end`,ref:q,class:`end`,"aria-hidden":`true`},null,512),!ht.value&&y($)?(g(),i(`p`,ot,[b(l(y(gt))+` `,1),y($).url?(g(),i(`a`,{key:0,href:y($).url,target:`_blank`,rel:`noopener`,class:`text-highlighted`},`Reply there ↗`,8,st)):y($).surface===`web`?p(``,!0):(g(),i(x,{key:1},[b(`Reply there.`)],64))])):ht.value?p(``,!0):(g(),i(`div`,ct,[r(ee,{name:`sb-rise`},{default:h(()=>[J.value?(g(),i(`button`,{key:0,type:`button`,class:`new-pill absolute -top-9 left-1/2 -translate-x-1/2 rounded-full border border-default bg-(--ui-bg-elevated) px-3 py-1 font-mono text-[0.7rem] text-toned shadow-sm hover:text-highlighted`,onClick:Qe},` ↓ new `)):p(``,!0)]),_:1}),r(ye,{modelValue:M.value,"onUpdate:modelValue":t[4]||=e=>M.value=e,mode:F.value,hint:N.value,commands:y(u).commands,autofocus:``,onSubmit:L,onStop:Ie},null,8,[`modelValue`,`mode`,`hint`,`commands`])]))])],14,tt)):(g(),i(`div`,et,`This page needs its seed.`))]),_:1})}}});export{Z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,D as t,F as n,M as r,N as i,c as a,l as o,u as s,x as c}from"./AppShell-DPJVhUGP.js";import{$ as l,An as u,Br as d,Cn as f,Cr as p,Ct as m,Di as h,E as g,Ei as ee,Fi as _,Gr as v,Hn as te,I as y,Ir as ne,J as re,K as b,Li as x,Mn as S,Oi as C,Pi as w,Q as T,Rr as ie,S as ae,Sn as E,St as oe,Vr as se,X as D,Xr as O,Y as ce,Z as le,_ as ue,_r as k,b as de,bn as A,dr as fe,dt as j,g as pe,gi as me,gt as M,h as he,ir as N,it as ge,ji as P,kn as F,l as _e,ln as I,m as ve,nn as L,nr as R,nt as ye,p as be,rn as z,rr as B,rt as xe,tt as Se,v as Ce,w as we,wr as V,x as Te,xi as Ee,xn as H,y as U,yn as W,z as G}from"./browser-CCImen5O.js";var[K,De]=b(`TagsInputRoot`),Oe=S({__name:`TagsInputRoot`,props:{modelValue:{type:[Array,null],required:!1},defaultValue:{type:Array,required:!1,default:()=>[]},addOnPaste:{type:Boolean,required:!1},addOnTab:{type:Boolean,required:!1},addOnBlur:{type:Boolean,required:!1},duplicate:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},delimiter:{type:null,required:!1,default:`,`},dir:{type:String,required:!1},max:{type:Number,required:!1,default:0},id:{type:String,required:!1},convertValue:{type:Function,required:!1},displayValue:{type:Function,required:!1,default:e=>e.toString()},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`invalid`,`addTag`,`removeTag`],setup(t,{emit:i}){let a=t,o=i,{addOnPaste:s,disabled:l,delimiter:d,max:f,id:p,dir:m,addOnBlur:h,addOnTab:ee}=C(a),_=r(m),v=M(a,`modelValue`,o,{defaultValue:a.defaultValue,passive:!0,deep:!0}),{forwardRef:te,currentElement:ne}=G(),{focused:re}=j(ne),b=e(ne),{getItems:x,CollectionSlot:S}=g({isProvider:!0}),w=Ee(),T=Ee(!1),ie=W(()=>Array.isArray(v.value)?[...v.value]:[]);function ae(e){if(e!==-1){let t=v.value[e];v.value=v.value.filter((t,n)=>n!==e),o(`removeTag`,t)}}return De({modelValue:v,onAddValue:e=>{let t=[...ie.value],n=t.length>0&&typeof t[0]==`object`,r=t.length>0&&typeof a.defaultValue[0]==`object`;if((n||r)&&typeof a.convertValue!=`function`)throw Error("You must provide a `convertValue` function when using objects as values.");let i=a.convertValue?a.convertValue(e):e;if(t.length>=f.value&&f.value)return o(`invalid`,i),!1;if(a.duplicate)return v.value=[...t,i],o(`addTag`,i),!0;if(t.includes(i))T.value=!0;else return v.value=[...t,i],o(`addTag`,i),!0;return o(`invalid`,i),!1},onRemoveValue:ae,onInputKeydown:e=>{if(e.isComposing)return;let t=e.target,r=x().map(e=>e.ref).filter(e=>e.dataset.disabled!==``);if(!r.length)return;let i=r.at(-1);switch(e.key){case`Delete`:case`Backspace`:if(t.selectionStart!==0||t.selectionEnd!==0)break;if(w.value){let t=r.findIndex(e=>e===w.value),n=x().find(e=>e.ref===w.value);ae(n?v.value.findIndex(e=>Se(e,n.value)):-1),w.value=w.value===i?r.at(t-1):r.at(t+1),e.preventDefault()}else e.key===`Backspace`&&(w.value=i,e.preventDefault());break;case`Home`:case`End`:case`ArrowRight`:case`ArrowLeft`:{let a=e.key===`ArrowRight`&&_.value===`ltr`||e.key===`ArrowLeft`&&_.value===`rtl`,o=!a;if(t.selectionStart!==0||t.selectionEnd!==0)break;if(o&&!w.value)w.value=i,e.preventDefault();else if(a&&i&&w.value===i)w.value=void 0,e.preventDefault();else if(w.value){let t=n(e,w.value,void 0,{itemsArray:r,loop:!1,dir:_.value});t&&(w.value=t),e.preventDefault()}break}case`ArrowUp`:case`ArrowDown`:w.value&&e.preventDefault();break;default:w.value=void 0}},selectedElement:w,isInvalidInput:T,addOnPaste:s,addOnBlur:h,addOnTab:ee,dir:_,disabled:l,delimiter:d,max:f,id:p,displayValue:a.displayValue}),(e,t)=>(k(),H(P(S),null,{default:O(()=>[u(P(y),{ref:P(te),dir:P(_),as:e.as,"as-child":e.asChild,"data-invalid":T.value?``:void 0,"data-disabled":P(l)?``:void 0,"data-focused":P(re)?``:void 0},{default:O(()=>[V(e.$slots,`default`,{modelValue:P(v)}),P(b)&&e.name?(k(),H(P(c),{key:0,name:e.name,value:P(v),required:e.required,disabled:P(l)},null,8,[`name`,`value`,`required`,`disabled`])):E(`v-if`,!0)]),_:3},8,[`dir`,`as`,`as-child`,`data-invalid`,`data-disabled`,`data-focused`])]),_:3}))}}),ke=S({__name:`TagsInputInput`,props:{placeholder:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},maxLength:{type:Number,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},setup(e){let t=e,n=K(),{forwardRef:r,currentElement:a}=G();function o(e){if(n.selectedElement.value=void 0,!n.addOnBlur.value)return;let t=e.target,r=e.relatedTarget,i=t.getAttribute(`aria-controls`);i&&r?.closest(`#${CSS.escape(i)}`)||t.value&&n.onAddValue(t.value)&&(t.value=``)}function s(e){n.addOnTab.value&&d(e)}let{isComposing:c,handleCompositionStart:l,handleCompositionEnd:u}=i();async function d(e){if(c.value||(await N(),e.defaultPrevented))return;let t=e.target;t.value&&(n.onAddValue(t.value)&&(t.value=``),e.preventDefault())}function f(e){if(c.value||(n.isInvalidInput.value=!1,e.data===null))return;let t=n.delimiter.value;if(t===e.data||t instanceof RegExp&&t.test(e.data)){let r=e.target;if(r.value=r.value.replace(t,``),r.value.trim()===``){r.value=``;return}n.onAddValue(r.value)&&(r.value=``)}}function p(e){c.value||n.onInputKeydown(e)}function m(e){if(n.addOnPaste.value){e.preventDefault();let t=e.clipboardData;if(!t)return;let r=t.getData(`text`);n.delimiter.value?r.split(n.delimiter.value).forEach(e=>{n.onAddValue(e)}):n.onAddValue(r)}}return fe(()=>{let e=a.value.nodeName===`INPUT`?a.value:a.value.querySelector(`input`);e&&setTimeout(()=>{t.autoFocus&&e?.focus()},1)}),(e,t)=>(k(),H(P(y),{id:P(n).id?.value,ref:P(r),type:`text`,autocomplete:`off`,autocorrect:`off`,autocapitalize:`off`,as:e.as,"as-child":e.asChild,maxlength:e.maxLength,placeholder:e.placeholder,disabled:P(n).disabled.value,"data-invalid":P(n).isInvalidInput.value?``:void 0,onInput:f,onKeydown:[L(d,[`enter`]),L(s,[`tab`]),p],onBlur:o,onCompositionstart:P(l),onCompositionend:P(u),onPaste:m},{default:O(()=>[V(e.$slots,`default`)]),_:3},8,[`id`,`as`,`as-child`,`maxlength`,`placeholder`,`disabled`,`data-invalid`,`onCompositionstart`,`onCompositionend`]))}}),[Ae,je]=b(`TagsInputItem`),Me=S({__name:`TagsInputItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{value:n}=C(t),r=K(),{forwardRef:i,currentElement:a}=G(),{CollectionItem:o}=g(),s=W(()=>r.selectedElement.value===a.value),c=W(()=>t.disabled||r.disabled.value),l=je({value:n,isSelected:s,disabled:c,textId:``,displayValue:W(()=>r.displayValue(n.value))});return(e,t)=>(k(),H(P(o),{value:P(n)},{default:O(()=>[u(P(y),{ref:P(i),as:e.as,"as-child":e.asChild,"aria-labelledby":P(l).textId,"aria-current":s.value,"data-disabled":c.value?``:void 0,"data-state":s.value?`active`:`inactive`},{default:O(()=>[V(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-labelledby`,`aria-current`,`data-disabled`,`data-state`])]),_:3},8,[`value`]))}}),Ne=S({__name:`TagsInputItemDelete`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;G();let n=K(),r=Ae(),i=W(()=>r.disabled?.value||n.disabled.value);function a(){if(i.value)return;let e=n.modelValue.value.findIndex(e=>Se(e,r.value.value));n.onRemoveValue(e)}return(e,n)=>(k(),H(P(y),B({tabindex:`-1`},t,{"aria-labelledby":P(r).textId,"aria-current":P(r).isSelected.value,"data-state":P(r).isSelected.value?`active`:`inactive`,"data-disabled":i.value?``:void 0,type:e.as===`button`?`button`:void 0,onClick:a}),{default:O(()=>[V(e.$slots,`default`)]),_:3},16,[`aria-labelledby`,`aria-current`,`data-state`,`data-disabled`,`type`]))}}),Pe=S({__name:`TagsInputItemText`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let n=e,r=Ae();return G(),r.textId||=t(void 0,`reka-tags-input-item-text`),(e,t)=>(k(),H(P(y),B(n,{id:P(r).textId}),{default:O(()=>[V(e.$slots,`default`,{},()=>[F(x(P(r).displayValue.value),1)])]),_:3},16,[`id`]))}});function Fe(e,t){if(typeof e!=`object`||!e)return!1;let n=D(e,t);return n!=null&&n!==``}function Ie(e,t){return t?{xs:44,sm:48,md:52,lg:56,xl:60}[e]:{xs:24,sm:28,md:32,lg:36,xl:40}[e]}function Le(e,t,n,r){let i=Ie(t,!0),a=Ie(t,!1);return r?()=>i:n?t=>Fe(e[t],n)?i:a:()=>a}var Re={slots:{root:`relative inline-flex items-center`,base:[`rounded-md`,`transition-colors`],leading:`absolute inset-y-0 start-0 flex items-center`,leadingIcon:`shrink-0 text-dimmed`,leadingAvatar:`shrink-0`,leadingAvatarSize:``,trailing:`group absolute inset-y-0 end-0 flex items-center disabled:cursor-not-allowed disabled:opacity-75 focus:outline-none`,trailingIcon:`shrink-0 text-dimmed`,trailingClear:`p-0`,arrow:`fill-bg stroke-default`,content:`max-h-[min(15rem,var(--reka-combobox-content-available-height,15rem))] w-(--reka-combobox-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_var(--ease-out)] data-[state=closed]:animate-[scale-out_100ms_var(--ease-out)] origin-(--reka-combobox-content-transform-origin) pointer-events-auto flex flex-col`,viewport:`relative scroll-py-1 overflow-y-auto flex-1`,group:`p-1 isolate`,empty:`text-center text-muted`,label:`font-semibold text-highlighted`,separator:`-mx-1 my-1 h-px bg-border`,item:[`group relative w-full flex items-start gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50`,`transition-colors before:transition-colors`],itemLeadingIcon:[`shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default`,`transition-colors`],itemLeadingAvatar:`shrink-0`,itemLeadingAvatarSize:``,itemLeadingChip:`shrink-0`,itemLeadingChipSize:``,itemTrailing:`ms-auto inline-flex gap-1.5 items-center`,itemTrailingIcon:`shrink-0`,itemWrapper:`flex-1 flex flex-col min-w-0`,itemLabel:`truncate`,itemDescription:`truncate text-muted`,tagsItem:`px-1.5 py-0.5 rounded-sm font-medium inline-flex items-center gap-0.5 ring ring-inset ring-accented bg-elevated text-default data-disabled:cursor-not-allowed data-disabled:opacity-75`,tagsItemText:`truncate`,tagsItemDelete:[`inline-flex items-center rounded-xs text-dimmed hover:text-default hover:bg-accented/75 disabled:pointer-events-none`,`transition-colors`],tagsItemDeleteIcon:`shrink-0`,tagsInput:`flex-1 border-0 bg-transparent placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75`},variants:{fieldGroup:{horizontal:{root:`group has-focus-visible:z-[1]`,base:`group-not-only:group-first:rounded-e-none group-not-only:group-last:rounded-s-none group-not-last:group-not-first:rounded-none`},vertical:{root:`group has-focus-visible:z-[1]`,base:`group-not-only:group-first:rounded-b-none group-not-only:group-last:rounded-t-none group-not-last:group-not-first:rounded-none`}},size:{xs:{base:`px-2 py-1 text-sm/4 gap-1`,leading:`ps-2`,trailing:`pe-2`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`,trailingIcon:`size-4`,label:`p-1 text-[10px]/3 gap-1`,item:`p-1 text-xs gap-1`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailingIcon:`size-4`,tagsItem:`text-[10px]/3`,tagsItemDeleteIcon:`size-3`,empty:`p-2 text-xs`},sm:{base:`px-2.5 py-1.5 text-sm/4 gap-1.5`,leading:`ps-2.5`,trailing:`pe-2.5`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`,trailingIcon:`size-4`,label:`p-1.5 text-[10px]/3 gap-1.5`,item:`p-1.5 text-xs gap-1.5`,itemLeadingIcon:`size-4`,itemLeadingAvatarSize:`3xs`,itemLeadingChip:`size-4`,itemLeadingChipSize:`sm`,itemTrailingIcon:`size-4`,tagsItem:`text-[10px]/3`,tagsItemDeleteIcon:`size-3`,empty:`p-2.5 text-xs`},md:{base:`px-2.5 py-1.5 text-base/5 gap-1.5`,leading:`ps-2.5`,trailing:`pe-2.5`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`,trailingIcon:`size-5`,label:`p-1.5 text-xs gap-1.5`,item:`p-1.5 text-sm gap-1.5`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailingIcon:`size-5`,tagsItem:`text-xs`,tagsItemDeleteIcon:`size-3.5`,empty:`p-2.5 text-sm`},lg:{base:`px-3 py-2 text-base/5 gap-2`,leading:`ps-3`,trailing:`pe-3`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`,trailingIcon:`size-5`,label:`p-2 text-xs gap-2`,item:`p-2 text-sm gap-2`,itemLeadingIcon:`size-5`,itemLeadingAvatarSize:`2xs`,itemLeadingChip:`size-5`,itemLeadingChipSize:`md`,itemTrailingIcon:`size-5`,tagsItem:`text-xs`,tagsItemDeleteIcon:`size-3.5`,empty:`p-3 text-sm`},xl:{base:`px-3 py-2 text-base gap-2`,leading:`ps-3`,trailing:`pe-3`,leadingIcon:`size-6`,leadingAvatarSize:`xs`,trailingIcon:`size-6`,label:`p-2 text-sm gap-2`,item:`p-2 text-base gap-2`,itemLeadingIcon:`size-6`,itemLeadingAvatarSize:`xs`,itemLeadingChip:`size-6`,itemLeadingChipSize:`lg`,itemTrailingIcon:`size-6`,tagsItem:`text-sm`,tagsItemDeleteIcon:`size-4`,empty:`p-3 text-base`}},variant:{outline:`text-highlighted bg-default ring ring-inset ring-accented`,soft:`text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50`,subtle:`text-highlighted bg-elevated ring ring-inset ring-accented`,ghost:`text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent`,none:`text-highlighted bg-transparent focus:outline-none`},color:{primary:``,secondary:``,success:``,info:``,warning:``,error:``,neutral:``},leading:{true:``},trailing:{true:``},loading:{true:``},highlight:{true:``},fixed:{false:``},type:{file:`file:me-1.5 file:font-medium file:text-muted file:outline-none`},virtualize:{true:{viewport:`p-1 isolate`},false:{viewport:`divide-y divide-default`}},multiple:{true:{root:`flex-wrap`},false:{base:`w-full border-0 placeholder:text-dimmed disabled:cursor-not-allowed disabled:opacity-75`}}},compoundVariants:[{variant:`soft`,multiple:!0,class:`has-focus:bg-elevated has-focus-visible:outline-3`},{variant:`ghost`,multiple:!0,class:`has-focus:bg-elevated has-focus-visible:outline-3`},{color:`primary`,multiple:!0,variant:[`outline`,`subtle`],class:`has-focus-visible:outline-3 has-focus-visible:ring-primary`},{color:`secondary`,multiple:!0,variant:[`outline`,`subtle`],class:`has-focus-visible:outline-3 has-focus-visible:ring-secondary`},{color:`success`,multiple:!0,variant:[`outline`,`subtle`],class:`has-focus-visible:outline-3 has-focus-visible:ring-success`},{color:`info`,multiple:!0,variant:[`outline`,`subtle`],class:`has-focus-visible:outline-3 has-focus-visible:ring-info`},{color:`warning`,multiple:!0,variant:[`outline`,`subtle`],class:`has-focus-visible:outline-3 has-focus-visible:ring-warning`},{color:`error`,multiple:!0,variant:[`outline`,`subtle`],class:`has-focus-visible:outline-3 has-focus-visible:ring-error`},{color:`neutral`,multiple:!0,variant:[`outline`,`subtle`],class:`has-focus-visible:outline-3 has-focus-visible:ring-inverted`},{color:`primary`,variant:[`outline`,`subtle`],class:`outline-primary/25 focus-visible:outline-3 focus-visible:ring-primary`},{color:`secondary`,variant:[`outline`,`subtle`],class:`outline-secondary/25 focus-visible:outline-3 focus-visible:ring-secondary`},{color:`success`,variant:[`outline`,`subtle`],class:`outline-success/25 focus-visible:outline-3 focus-visible:ring-success`},{color:`info`,variant:[`outline`,`subtle`],class:`outline-info/25 focus-visible:outline-3 focus-visible:ring-info`},{color:`warning`,variant:[`outline`,`subtle`],class:`outline-warning/25 focus-visible:outline-3 focus-visible:ring-warning`},{color:`error`,variant:[`outline`,`subtle`],class:`outline-error/25 focus-visible:outline-3 focus-visible:ring-error`},{color:`primary`,variant:[`soft`,`ghost`],class:`outline-primary/25 focus-visible:outline-3`},{color:`secondary`,variant:[`soft`,`ghost`],class:`outline-secondary/25 focus-visible:outline-3`},{color:`success`,variant:[`soft`,`ghost`],class:`outline-success/25 focus-visible:outline-3`},{color:`info`,variant:[`soft`,`ghost`],class:`outline-info/25 focus-visible:outline-3`},{color:`warning`,variant:[`soft`,`ghost`],class:`outline-warning/25 focus-visible:outline-3`},{color:`error`,variant:[`soft`,`ghost`],class:`outline-error/25 focus-visible:outline-3`},{color:`primary`,highlight:!0,class:`ring ring-inset ring-primary`},{color:`secondary`,highlight:!0,class:`ring ring-inset ring-secondary`},{color:`success`,highlight:!0,class:`ring ring-inset ring-success`},{color:`info`,highlight:!0,class:`ring ring-inset ring-info`},{color:`warning`,highlight:!0,class:`ring ring-inset ring-warning`},{color:`error`,highlight:!0,class:`ring ring-inset ring-error`},{color:`neutral`,variant:[`outline`,`subtle`],class:`outline-inverted/25 focus-visible:outline-3 focus-visible:ring-inverted`},{color:`neutral`,variant:[`soft`,`ghost`],class:`outline-inverted/25 focus-visible:outline-3`},{color:`neutral`,highlight:!0,class:`ring ring-inset ring-inverted`},{leading:!0,size:`xs`,class:`ps-7`},{leading:!0,size:`sm`,class:`ps-8`},{leading:!0,size:`md`,class:`ps-9`},{leading:!0,size:`lg`,class:`ps-10`},{leading:!0,size:`xl`,class:`ps-11`},{trailing:!0,size:`xs`,class:`pe-7`},{trailing:!0,size:`sm`,class:`pe-8`},{trailing:!0,size:`md`,class:`pe-9`},{trailing:!0,size:`lg`,class:`pe-10`},{trailing:!0,size:`xl`,class:`pe-11`},{loading:!0,leading:!0,class:{leadingIcon:`animate-spin`}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:`animate-spin`}},{fixed:!1,size:`xs`,class:`md:text-xs`},{fixed:!1,size:`sm`,class:`md:text-xs`},{fixed:!1,size:`md`,class:`md:text-sm`},{fixed:!1,size:`lg`,class:`md:text-sm`}],defaultVariants:{size:`md`,color:`primary`,variant:`outline`}},ze=Object.assign({inheritAttrs:!1},{__name:`InputMenu`,props:R({as:{type:null,required:!1},id:{type:String,required:!1},type:{type:null,required:!1,default:`text`},placeholder:{type:String,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},deleteIcon:{type:null,required:!1},clear:{type:[Boolean,Object],required:!1},clearIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:`label`},descriptionKey:{type:null,required:!1,default:`description`},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:null,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},mode:{type:String,required:!1,default:`combobox`},createItem:{type:[Boolean,String,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},resetModelValueOnClear:{type:Boolean,required:!1,default:!0},highlightOnHover:{type:Boolean,required:!1},openOnClick:{type:Boolean,required:!1},openOnFocus:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:``},searchTermModifiers:{}}),emits:R([`change`,`blur`,`focus`,`create`,`clear`,`highlight`,`remove-tag`,`update:modelValue`,`update:open`],[`update:searchTerm`]),setup(e,{expose:t,emit:n}){let r=e,i=n,c=d(),g=ae(`inputMenu`,r),y=ie(e,`searchTerm`,{type:String,default:``}),{t:b}=re(),S=xe(),{filterGroups:C}=a(),j=W(()=>g.mode===`autocomplete`),M=m(g,`as`,`modelValue`,`defaultValue`,`open`,`defaultOpen`,`required`,`multiple`,`resetSearchTermOnBlur`,`resetSearchTermOnSelect`,`resetModelValueOnClear`,`highlightOnHover`,`openOnClick`,`openOnFocus`,`by`),L=oe(M,`multiple`,`resetSearchTermOnSelect`,`resetModelValueOnClear`,`by`),R=Te(W(()=>j.value?L:M),i),G=W(()=>j.value?o:s),K=ne(),De=W(()=>g.multiple&&!j.value?K[`data-slot`]??`base`:`base`),Ae=we(h(()=>g.portal)),je=h(()=>ye(g.content,{side:`bottom`,sideOffset:8,collisionPadding:8,position:`popper`})),Fe=h(()=>ye(g.arrow,{rounded:!0})),Ie=W(()=>typeof g.clear==`object`?g.clear:{}),ze=h(()=>g.virtualize?ye(typeof g.virtualize==`boolean`?{}:g.virtualize,{estimateSize:Le(Y.value,at.value??`md`,g.descriptionKey,!!c[`item-description`])}):!1),{emitFormBlur:Be,emitFormFocus:Ve,emitFormChange:He,emitFormInput:Ue,size:We,color:Ge,id:Ke,name:qe,highlight:Je,disabled:Ye,ariaAttrs:Xe}=be(r),{orientation:Ze,size:Qe}=he(r),{isLeading:$e,isTrailing:et,leadingIconName:tt,trailingIconName:nt}=pe(W(()=>({icon:g.icon,leading:g.leading,leadingIcon:g.leadingIcon,trailing:g.trailing,trailingIcon:g.trailingIcon??S.ui.icons.chevronDown,loading:g.loading,loadingIcon:g.loadingIcon}))),rt=W(()=>Ge.value??g.color),it=W(()=>Je.value??g.highlight),at=W(()=>Qe.value??We.value??g.size),ot=W(()=>Ye.value??g.disabled),[st,q]=ge(),[ct,lt]=ge({props:{item:{type:[Object,String,Number,Boolean],required:!0},index:{type:Number,required:!1}}}),J=W(()=>de({extend:Re,...S.ui?.inputMenu||{}})({color:rt.value,variant:g.variant,size:at.value,loading:g.loading,highlight:it.value,fixed:g.fixed,leading:$e.value||!!g.avatar||!!c.leading,trailing:et.value||!!c.trailing,multiple:g.multiple,fieldGroup:Ze.value,virtualize:!!g.virtualize})),ut=W(()=>ft.value.flatMap(e=>e));function dt(e){return le(ut.value,e,{labelKey:g.labelKey,valueKey:g.valueKey,by:g.by})??``}let ft=W(()=>g.items?.length?T(g.items)?g.items:[g.items]:[]),pt=W(()=>{if(g.ignoreFilter||!y.value)return ft.value;let e=Array.isArray(g.filterFields)?g.filterFields:[g.labelKey];return C(ft.value,y.value,{fields:e,isStructural:e=>$(e)&&!!e.type&&[`label`,`separator`].includes(e.type)})}),Y=W(()=>pt.value.flatMap(e=>e)),X=W(()=>{if(!g.createItem||!y.value)return!1;let e=g.valueKey?{[g.valueKey]:y.value}:y.value;return typeof g.createItem==`object`&&g.createItem.when===`always`||g.createItem===`always`?!Y.value.find(t=>ce(t,e,g.by??g.valueKey)):!Y.value.length}),Z=W(()=>typeof g.createItem==`object`?g.createItem.position:`bottom`),Q=se(`inputRef`);function mt(){g.autofocus&&Q.value?.$el?.focus()}let ht;fe(()=>{N(()=>{j.value?y.value=String(g.modelValue??g.defaultValue??``):y.value=``}),ht=setTimeout(()=>{mt()},g.autofocusDelay)}),me(()=>clearTimeout(ht)),v(()=>g.modelValue,e=>{j.value&&(y.value=String(e??``))});function gt(e){if(ee(g.modelValue)===e)return;g.modelModifiers?.trim&&(typeof e==`string`||e==null)&&(e=e?.trim()??null),g.modelModifiers?.number&&(e=l(e)),g.modelModifiers?.nullable&&(e??=null),g.modelModifiers?.optional&&!g.modelModifiers?.nullable&&e!==null&&(e??=void 0);let t=new Event(`change`,{target:{value:e}});i(`change`,t),He(),Ue(),j.value?y.value=String(e??``):g.resetSearchTermOnSelect&&(y.value=``)}function _t(e){j.value||(y.value=e)}function vt(e){i(`blur`,e),Be()}function yt(e){i(`focus`,e),Ve()}let bt=Ee(!1),xt;me(()=>clearTimeout(xt));function St(e){if(bt.value=e,e){let e=new FocusEvent(`focus`);i(`focus`,e),Ve(),clearTimeout(xt)}else{let e=new FocusEvent(`blur`);i(`blur`,e),Be(),!j.value&&g.resetSearchTermOnBlur&&(xt=setTimeout(()=>{y.value=``},100))}}function Ct(e,t){if(g.multiple){let n=t.filter(t=>!Se(t,e));i(`update:modelValue`,n),i(`remove-tag`,e),gt(n)}}function wt(e){e.preventDefault(),e.stopPropagation(),i(`create`,y.value)}function Tt(e,t){if($(t)){if(t.disabled){e.preventDefault();return}t.onSelect?.(e)}}function $(e){return typeof e==`object`&&!!e}function Et(e){return g.multiple&&Array.isArray(e)?e.length===0:e==null||e===``}function Dt(){i(`clear`)}let Ot=se(`viewportRef`),kt=se(`comboboxRootRef`);return v(()=>g.items,async()=>{bt.value&&g.createItem&&(await N(),kt.value?.highlightFirstItem?.())},{flush:`post`}),t({inputRef:h(()=>Q.value?.$el),viewportRef:h(()=>Ot.value)}),(e,t)=>(k(),f(I,null,[u(P(st),null,{default:O(()=>[u(P(G).Item,{"data-slot":`item`,class:w(J.value.item({class:P(g).ui?.item})),value:y.value,onSelect:wt},{default:O(()=>[A(`span`,{"data-slot":`itemLabel`,class:w(J.value.itemLabel({class:P(g).ui?.itemLabel}))},[V(e.$slots,`create-item-label`,{item:y.value},()=>[F(x(P(b)(`inputMenu.create`,{label:y.value})),1)])],2)]),_:3},8,[`class`,`value`])]),_:3}),u(P(ct),null,{default:O(({item:t,index:n})=>[$(t)&&t.type===`label`?(k(),H(P(G).Label,{key:0,"data-slot":`label`,class:w(J.value.label({class:[P(g).ui?.label,t.ui?.label,t.class]}))},{default:O(()=>[F(x(P(D)(t,P(g).labelKey)),1)]),_:2},1032,[`class`])):$(t)&&t.type===`separator`?(k(),H(P(G).Separator,{key:1,"data-slot":`separator`,class:w(J.value.separator({class:[P(g).ui?.separator,t.ui?.separator,t.class]}))},null,8,[`class`])):(k(),H(P(G).Item,{key:2,"data-slot":`item`,class:w(J.value.item({class:[P(g).ui?.item,$(t)&&t.ui?.item,$(t)&&t.class]})),disabled:$(t)&&t.disabled,value:P(g).valueKey&&$(t)?P(D)(t,P(g).valueKey):t,onSelect:e=>Tt(e,t)},{default:O(()=>[V(e.$slots,`item`,{item:t,index:n,ui:J.value},()=>[V(e.$slots,`item-leading`,{item:t,index:n,ui:J.value},()=>[$(t)&&t.icon?(k(),H(U,{key:0,name:t.icon,"data-slot":`itemLeadingIcon`,class:w(J.value.itemLeadingIcon({class:[P(g).ui?.itemLeadingIcon,t.ui?.itemLeadingIcon]}))},null,8,[`name`,`class`])):$(t)&&t.avatar?(k(),H(ue,B({key:1,size:t.ui?.itemLeadingAvatarSize||P(g).ui?.itemLeadingAvatarSize||J.value.itemLeadingAvatarSize()},t.avatar,{"data-slot":`itemLeadingAvatar`,class:J.value.itemLeadingAvatar({class:[P(g).ui?.itemLeadingAvatar,t.ui?.itemLeadingAvatar]})}),null,16,[`size`,`class`])):$(t)&&t.chip?(k(),H(Ce,B({key:2,size:t.ui?.itemLeadingChipSize||P(g).ui?.itemLeadingChipSize||J.value.itemLeadingChipSize(),inset:``,standalone:``},t.chip,{"data-slot":`itemLeadingChip`,class:J.value.itemLeadingChip({class:[P(g).ui?.itemLeadingChip,t.ui?.itemLeadingChip]})}),null,16,[`size`,`class`])):E(``,!0)]),A(`span`,{"data-slot":`itemWrapper`,class:w(J.value.itemWrapper({class:[P(g).ui?.itemWrapper,$(t)&&t.ui?.itemWrapper]}))},[A(`span`,{"data-slot":`itemLabel`,class:w(J.value.itemLabel({class:[P(g).ui?.itemLabel,$(t)&&t.ui?.itemLabel]}))},[V(e.$slots,`item-label`,{item:t,index:n},()=>[F(x($(t)?P(D)(t,P(g).labelKey):t),1)])],2),$(t)&&(P(D)(t,P(g).descriptionKey)||c[`item-description`])?(k(),f(`span`,{key:0,"data-slot":`itemDescription`,class:w(J.value.itemDescription({class:[P(g).ui?.itemDescription,$(t)&&t.ui?.itemDescription]}))},[V(e.$slots,`item-description`,{item:t,index:n},()=>[F(x(P(D)(t,P(g).descriptionKey)),1)])],2)):E(``,!0)],2),A(`span`,{"data-slot":`itemTrailing`,class:w(J.value.itemTrailing({class:[P(g).ui?.itemTrailing,$(t)&&t.ui?.itemTrailing]}))},[V(e.$slots,`item-trailing`,{item:t,index:n,ui:J.value}),j.value?E(``,!0):(k(),H(P(G).ItemIndicator,{key:0,"as-child":``},{default:O(()=>[u(U,{name:P(g).selectedIcon||P(S).ui.icons.check,"data-slot":`itemTrailingIcon`,class:w(J.value.itemTrailingIcon({class:[P(g).ui?.itemTrailingIcon,$(t)&&t.ui?.itemTrailingIcon]}))},null,8,[`name`,`class`])]),_:2},1024))],2)])]),_:2},1032,[`class`,`disabled`,`value`,`onSelect`]))]),_:3}),u(P(G).Root,B({ref_key:`comboboxRootRef`,ref:kt},P(R),{name:P(qe),disabled:ot.value,"data-slot":e.$attrs[`data-slot`]??`root`,class:J.value.root({class:[P(g).ui?.root,P(g).class]}),"as-child":!!P(g).multiple&&!j.value,"ignore-filter":``,"onUpdate:modelValue":gt,"onUpdate:open":St}),{default:O(({modelValue:n,open:r})=>[u(P(G).Anchor,{"as-child":!P(g).multiple,"data-slot":De.value,class:w(J.value.base({class:P(g).ui?.base}))},{default:O(()=>[P(g).multiple&&!j.value?(k(),H(P(Oe),{key:0,"model-value":n,disabled:ot.value,required:P(g).required,delimiter:``,"as-child":``,onBlur:vt,onFocus:yt,onRemoveTag:e=>Ct(e,n)},{default:O(({modelValue:n})=>[(k(!0),f(I,null,p(n,(t,n)=>(k(),H(P(Me),{key:n,value:t,"data-slot":`tagsItem`,class:w(J.value.tagsItem({class:[P(g).ui?.tagsItem,$(t)&&t.ui?.tagsItem]}))},{default:O(()=>[u(P(Pe),{"data-slot":`tagsItemText`,class:w(J.value.tagsItemText({class:[P(g).ui?.tagsItemText,$(t)&&t.ui?.tagsItemText]}))},{default:O(()=>[V(e.$slots,`tags-item-text`,{item:t,index:n},()=>[F(x(dt(t)),1)])]),_:2},1032,[`class`]),u(P(Ne),{"data-slot":`tagsItemDelete`,class:w(J.value.tagsItemDelete({class:[P(g).ui?.tagsItemDelete,$(t)&&t.ui?.tagsItemDelete]})),disabled:ot.value},{default:O(()=>[V(e.$slots,`tags-item-delete`,{item:t,index:n,ui:J.value},()=>[u(U,{name:P(g).deleteIcon||P(S).ui.icons.close,"data-slot":`tagsItemDeleteIcon`,class:w(J.value.tagsItemDeleteIcon({class:[P(g).ui?.tagsItemDeleteIcon,$(t)&&t.ui?.tagsItemDeleteIcon]}))},null,8,[`name`,`class`])])]),_:2},1032,[`class`,`disabled`])]),_:2},1032,[`value`,`class`]))),128)),u(P(G).Input,{modelValue:y.value,"onUpdate:modelValue":t[1]||=e=>y.value=e,"as-child":``},{default:O(()=>[u(P(ke),B({id:P(Ke),ref_key:`inputRef`,ref:Q},{...e.$attrs,...P(Xe)},{placeholder:P(g).placeholder,"data-slot":`tagsInput`,class:J.value.tagsInput({class:P(g).ui?.tagsInput}),onChange:t[0]||=z(()=>{},[`stop`])}),null,16,[`id`,`placeholder`,`class`])]),_:1},8,[`modelValue`])]),_:3},8,[`model-value`,`disabled`,`required`,`onRemoveTag`])):(k(),H(P(G).Input,B({key:1,id:P(Ke),ref_key:`inputRef`,ref:Q},{...j.value?{}:{displayValue:dt},...e.$attrs,...P(Xe)},{"data-slot":P(g).multiple?void 0:`base`,type:P(g).type,placeholder:P(g).placeholder,required:P(g).required,onBlur:vt,onFocus:yt,onChange:t[2]||=z(()=>{},[`stop`]),"onUpdate:modelValue":_t}),null,16,[`id`,`data-slot`,`type`,`placeholder`,`required`])),P($e)||P(g).avatar||c.leading?(k(),f(`span`,{key:2,"data-slot":`leading`,class:w(J.value.leading({class:P(g).ui?.leading}))},[V(e.$slots,`leading`,{modelValue:n,open:r,ui:J.value},()=>[P($e)&&P(tt)?(k(),H(U,{key:0,name:P(tt),"data-slot":`leadingIcon`,class:w(J.value.leadingIcon({class:P(g).ui?.leadingIcon}))},null,8,[`name`,`class`])):P(g).avatar?(k(),H(ue,B({key:1,size:P(g).ui?.itemLeadingAvatarSize||J.value.itemLeadingAvatarSize()},P(g).avatar,{"data-slot":`itemLeadingAvatar`,class:J.value.itemLeadingAvatar({class:P(g).ui?.itemLeadingAvatar})}),null,16,[`size`,`class`])):E(``,!0)])],2)):E(``,!0),P(et)||c.trailing||P(g).clear?(k(),H(P(G).Trigger,{key:3,"data-slot":`trailing`,class:w(J.value.trailing({class:P(g).ui?.trailing}))},{default:O(()=>[V(e.$slots,`trailing`,{modelValue:n,open:r,ui:J.value},()=>[P(g).clear&&!Et(n)?(k(),H(P(G).Cancel,{key:0,"as-child":``},{default:O(()=>[u(_e,B({as:`span`,icon:P(g).clearIcon||P(S).ui.icons.close,size:at.value,variant:`link`,color:`neutral`,tabindex:`-1`},Ie.value,{"data-slot":`trailingClear`,class:J.value.trailingClear({class:P(g).ui?.trailingClear}),onClick:z(Dt,[`stop`])}),null,16,[`icon`,`size`,`class`])]),_:1})):P(nt)?(k(),H(U,{key:1,name:P(nt),"data-slot":`trailingIcon`,class:w(J.value.trailingIcon({class:P(g).ui?.trailingIcon}))},null,8,[`name`,`class`])):E(``,!0)])]),_:2},1032,[`class`])):E(``,!0)]),_:2},1032,[`as-child`,`data-slot`,`class`]),u(P(G).Portal,_(te(P(Ae))),{default:O(()=>[u(P(ve),null,{default:O(()=>[u(P(G).Content,B({"data-slot":`content`,class:J.value.content({class:P(g).ui?.content})},je.value,{onFocusOutside:t[3]||=z(()=>{},[`prevent`])}),{default:O(()=>[V(e.$slots,`content-top`),u(P(G).Empty,{"data-slot":`empty`,class:w(J.value.empty({class:P(g).ui?.empty}))},{default:O(()=>[V(e.$slots,`empty`,{searchTerm:y.value},()=>[F(x(y.value?P(b)(`inputMenu.noMatch`,{searchTerm:y.value}):P(b)(`inputMenu.noData`)),1)])]),_:3},8,[`class`]),A(`div`,{ref_key:`viewportRef`,ref:Ot,role:`presentation`,"data-slot":`viewport`,class:w(J.value.viewport({class:P(g).ui?.viewport}))},[P(g).virtualize?(k(),f(I,{key:0},[X.value&&Z.value===`top`?(k(),H(P(q),{key:0})):E(``,!0),u(P(G).Virtualizer,B({options:Y.value,"text-content":e=>$(e)?P(D)(e,P(g).labelKey):String(e)},ze.value),{default:O(({option:e,virtualItem:t})=>[u(P(lt),{item:e,index:t.index},null,8,[`item`,`index`])]),_:1},16,[`options`,`text-content`]),X.value&&Z.value===`bottom`?(k(),H(P(q),{key:1})):E(``,!0)],64)):(k(),f(I,{key:1},[X.value&&Z.value===`top`?(k(),H(P(G).Group,{key:0,"data-slot":`group`,class:w(J.value.group({class:P(g).ui?.group}))},{default:O(()=>[u(P(q))]),_:1},8,[`class`])):E(``,!0),(k(!0),f(I,null,p(pt.value,(e,t)=>(k(),H(P(G).Group,{key:`group-${t}`,"data-slot":`group`,class:w(J.value.group({class:P(g).ui?.group}))},{default:O(()=>[(k(!0),f(I,null,p(e,(e,n)=>(k(),H(P(lt),{key:`group-${t}-${n}`,item:e,index:n},null,8,[`item`,`index`]))),128))]),_:2},1032,[`class`]))),128)),X.value&&Z.value===`bottom`?(k(),H(P(G).Group,{key:1,"data-slot":`group`,class:w(J.value.group({class:P(g).ui?.group}))},{default:O(()=>[u(P(q))]),_:1},8,[`class`])):E(``,!0)],64))],2),V(e.$slots,`content-bottom`),P(g).arrow?(k(),H(P(G).Arrow,B({key:0},Fe.value,{"data-slot":`arrow`,class:J.value.arrow({class:P(g).ui?.arrow})}),null,16,[`class`])):E(``,!0)]),_:3},16,[`class`])]),_:3})]),_:3},16)]),_:3},16,[`name`,`disabled`,`data-slot`,`class`,`as-child`])],64))}});export{ze as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{L as e,t}from"./AppShell-DPJVhUGP.js";import{An as n,Li as r,Mn as i,Xr as a,_r as o,bn as s,c,ji as l,l as u,o as d,xn as f}from"./browser-CCImen5O.js";import{t as p}from"./RunsTabs-C7Ua3XX5.js";var m={class:`notfound mx-auto my-12 max-w-xl text-center text-toned`},h={class:`why text-[0.8rem] text-muted`},g=i({__name:`NotFoundPage`,setup(e){let i=d(`runNotFound`),g=c(i?.retentionDays??null);return(e,i)=>{let c=u;return o(),f(t,{title:`Run not found`,nav:`runs`},{default:a(()=>[n(p,{current:`runs`}),s(`section`,m,[i[0]||=s(`p`,{class:`code mb-3 font-mono text-4xl font-medium tracking-wide text-dimmed`},`404`,-1),i[1]||=s(`h2`,{class:`mb-3 text-lg font-medium tracking-tight text-highlighted`},`That run isn't here.`,-1),i[2]||=s(`p`,{class:`mb-2.5 leading-relaxed`},` It may have finished and aged out, the link may be missing its token, or it never existed — this page says the same thing in every case. `,-1),s(`p`,h,r(l(g)),1),n(c,{class:`back mt-4`,color:`neutral`,variant:`outline`,to:`/runs`,label:`← All runs`})])]),_:1})}}}),_=e({default:()=>v}),v=g;export{_ as n,v as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as e,D as t,O as n,P as r,T as i,w as a}from"./AppShell-DPJVhUGP.js";import{An as o,B as s,Br as c,Cn as l,Ct as u,D as d,Di as f,Dr as p,Fi as m,G as h,Gr as g,Hn as _,I as v,J as y,K as b,L as x,Li as S,Mn as C,Oi as ee,Pi as w,Pr as T,Qr as E,S as D,Sn as O,T as k,Xr as A,_r as j,b as te,bn as M,dr as N,gt as P,ji as F,kn as I,l as ne,m as re,rn as ie,rr as L,rt as ae,tn as R,w as oe,wr as z,x as B,xi as V,xn as H,yn as U,z as W}from"./browser-CCImen5O.js";import{K as G}from"./indexRow-BGjjLnN5.js";import"./format-BldUwl_R.js";import{d as K,f as q,m as se,p as ce}from"./sseReplay-BsNQPLmJ.js";var[J,le]=b(`DialogRoot`),ue=C({inheritAttrs:!1,__name:`DialogRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=P(n,`open`,t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=V(),a=V(),{modal:o,unmountOnHide:s}=ee(n);return le({open:r,modal:o,unmountOnHide:s,openModal:()=>{r.value=!0},onOpenChange:e=>{r.value=e},onOpenToggle:()=>{r.value=!r.value},contentId:``,titleId:``,descriptionId:``,triggerElement:i,contentElement:a}),(e,t)=>z(e.$slots,`default`,{open:F(r),close:()=>r.value=!1})}}),de=C({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;W();let n=J();return(e,r)=>(j(),H(F(v),L(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>F(n).onOpenChange(!1)}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`type`]))}}),Y=C({__name:`DialogContentImpl`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(n,{emit:r}){let s=n,c=r,l=J(),{forwardRef:u,currentElement:d}=W();return l.titleId||=t(void 0,`reka-dialog-title`),l.descriptionId||=t(void 0,`reka-dialog-description`),N(()=>{l.contentElement=d,h()!==document.body&&(l.triggerElement.value=h())}),(t,n)=>(j(),H(F(a),{"as-child":``,loop:``,trapped:s.trapFocus,present:s.present,onMountAutoFocus:n[5]||=e=>c(`openAutoFocus`,e),onUnmountAutoFocus:n[6]||=e=>c(`closeAutoFocus`,e)},{default:A(()=>[o(F(i),L({id:F(l).contentId,ref:F(u),as:t.as,"as-child":t.asChild,present:s.present,"disable-outside-pointer-events":t.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":F(l).descriptionId,"aria-labelledby":F(l).titleId,"data-state":F(e)(F(l).open.value)},t.$attrs,{onDismiss:n[0]||=e=>F(l).onOpenChange(!1),onEscapeKeyDown:n[1]||=e=>c(`escapeKeyDown`,e),onFocusOutside:n[2]||=e=>c(`focusOutside`,e),onInteractOutside:n[3]||=e=>c(`interactOutside`,e),onPointerDownOutside:n[4]||=e=>c(`pointerDownOutside`,e)}),{default:A(()=>[z(t.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`present`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`,`present`]))}}),fe=C({__name:`DialogContentModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let r=e,i=t,a=J(),o=s(i),{forwardRef:c,currentElement:l}=W(),u=U(()=>r.present?l.value:void 0);n(u);let d=U(()=>{let{present:e,...t}=r;return t});return g(()=>r.present,(e,t)=>{!e&&t&&a.triggerElement.value?.focus()}),(e,t)=>(j(),H(Y,L({...d.value,...F(o)},{ref:F(c),present:e.present,"trap-focus":F(a).open.value,"disable-outside-pointer-events":r.disableOutsidePointerEvents,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(e.preventDefault(),F(a).triggerElement.value?.focus())},onPointerDownOutside:t[1]||=e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},onFocusOutside:t[2]||=e=>{e.preventDefault()}}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`present`,`trap-focus`,`disable-outside-pointer-events`]))}}),pe=C({__name:`DialogContentNonModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=s(t);W();let i=J(),a=V(!1),o=V(!1),c=U(()=>{let{present:e,...t}=n;return t});return g(()=>n.present,(e,t)=>{!e&&t&&(a.value||i.triggerElement.value?.focus(),a.value=!1,o.value=!1)}),(e,t)=>(j(),H(Y,L({...c.value,...F(r)},{present:e.present,"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(a.value||F(i).triggerElement.value?.focus(),e.preventDefault()),a.value=!1,o.value=!1},onInteractOutside:t[1]||=e=>{e.defaultPrevented||(a.value=!0,e.detail.originalEvent.type===`pointerdown`&&(o.value=!0));let t=e.target;F(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`present`]))}}),me=C({__name:`DialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:void 0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=J(),a=s(r),{forwardRef:o}=W();return(e,t)=>(j(),H(F(x),{present:e.forceMount||F(i).open.value,"force-mount":e.forceMount||!F(i).unmountOnHide.value},{default:A(({present:t})=>[F(i).modal.value?E((j(),H(fe,L({key:0,ref:F(o),present:F(i).unmountOnHide.value||t},{...n,...F(a),...e.$attrs}),{default:A(()=>[z(e.$slots,`default`)]),_:2},1040,[`present`])),[[R,F(i).unmountOnHide.value||t]]):E((j(),H(pe,L({key:1,ref:F(o),present:F(i).unmountOnHide.value||t},{...n,...F(a),...e.$attrs}),{default:A(()=>[z(e.$slots,`default`)]),_:2},1040,[`present`])),[[R,F(i).unmountOnHide.value||t]])]),_:3},8,[`present`,`force-mount`]))}}),X=C({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;W();let n=J();return(e,r)=>(j(),H(F(v),L(t,{id:F(n).descriptionId}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`id`]))}}),he=C({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},setup(e){let t=e,n=J(),i=r(t.present);return g(()=>t.present,e=>i.value=e),W(),(e,t)=>(j(),H(F(v),{as:e.as,"as-child":e.asChild,"data-state":F(n).open.value?`open`:`closed`,style:{"pointer-events":`auto`},onPointerdown:t[0]||=ie(()=>{},[`left`,`self`,`prevent`])},{default:A(()=>[z(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),ge=C({__name:`DialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=J(),{forwardRef:n}=W();return(e,r)=>F(t)?.modal.value?(j(),H(F(x),{key:0,present:e.forceMount||F(t).open.value,"force-mount":e.forceMount||!F(t).unmountOnHide.value},{default:A(({present:r})=>[E(o(he,L(e.$attrs,{ref:F(n),as:e.as,"as-child":e.asChild,present:F(t).unmountOnHide.value||r}),{default:A(()=>[z(e.$slots,`default`)]),_:2},1040,[`as`,`as-child`,`present`]),[[R,F(t).unmountOnHide.value||r]])]),_:3},8,[`present`,`force-mount`])):O(`v-if`,!0)}}),_e=C({__name:`DialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(j(),H(F(d),m(_(t)),{default:A(()=>[z(e.$slots,`default`)]),_:3},16))}}),Z=C({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let t=e,n=J();return W(),(e,r)=>(j(),H(F(v),L(t,{id:F(n).titleId}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`id`]))}}),ve=C({__name:`DialogTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let n=e,r=J(),{forwardRef:i,currentElement:a}=W();return r.contentId||=t(void 0,`reka-dialog-content`),N(()=>{r.triggerElement.value=a.value}),(e,t)=>(j(),H(F(v),L(n,{ref:F(i),type:e.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":F(r).open.value||!1,"aria-controls":F(r).open.value?F(r).contentId:void 0,"data-state":F(r).open.value?`open`:`closed`,onClick:F(r).onOpenToggle}),{default:A(()=>[z(e.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`onClick`]))}});function ye(e,t={}){let n=e.detail.originalEvent,r=n.target;if(!r?.isConnected){e.preventDefault();return}t.scrollable&&(n.offsetX>r.clientWidth||n.offsetY>r.clientHeight)&&e.preventDefault()}var be={slots:{overlay:`fixed inset-0 bg-elevated/75`,content:`fixed bg-default divide-y divide-default sm:ring ring-default sm:shadow-lg flex flex-col focus:outline-none`,header:`flex items-center gap-1.5 p-4 sm:px-6 min-h-(--ui-header-height)`,wrapper:``,body:`flex-1 overflow-y-auto p-4 sm:p-6`,footer:`flex items-center gap-1.5 p-4 sm:px-6`,title:`text-highlighted font-semibold`,description:`mt-1 text-muted text-sm`,close:`absolute top-4 end-4`},variants:{side:{top:{content:``},right:{content:`max-w-md`},bottom:{content:``},left:{content:`max-w-md`}},inset:{true:{content:`rounded-lg`}},transition:{true:{overlay:`data-[state=open]:animate-[fade-in_200ms_var(--ease-out)] data-[state=closed]:animate-[fade-out_200ms_var(--ease-out)]`}}},compoundVariants:[{side:`top`,inset:!0,class:{content:`max-h-[calc(100%-2rem)] inset-x-4 top-4`}},{side:`top`,inset:!1,class:{content:`max-h-full inset-x-0 top-0`}},{side:`right`,inset:!0,class:{content:`w-[calc(100%-2rem)] inset-y-4 right-4`}},{side:`right`,inset:!1,class:{content:`w-full inset-y-0 right-0`}},{side:`bottom`,inset:!0,class:{content:`max-h-[calc(100%-2rem)] inset-x-4 bottom-4`}},{side:`bottom`,inset:!1,class:{content:`max-h-full inset-x-0 bottom-0`}},{side:`left`,inset:!0,class:{content:`w-[calc(100%-2rem)] inset-y-4 left-4`}},{side:`left`,inset:!1,class:{content:`w-full inset-y-0 left-0`}},{transition:!0,side:`top`,class:{content:`data-[state=open]:animate-[slide-in-from-top_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-top_200ms_var(--ease-out)]`}},{transition:!0,side:`right`,class:{content:`data-[state=open]:animate-[slide-in-from-right_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-right_200ms_var(--ease-out)]`}},{transition:!0,side:`bottom`,class:{content:`data-[state=open]:animate-[slide-in-from-bottom_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-bottom_200ms_var(--ease-out)]`}},{transition:!0,side:`left`,class:{content:`data-[state=open]:animate-[slide-in-from-left_200ms_var(--ease-out)] data-[state=closed]:animate-[slide-out-to-left_200ms_var(--ease-out)]`}}]},xe={__name:`Slideover`,props:{title:{type:String,required:!1},description:{type:String,required:!1},content:{type:Object,required:!1},overlay:{type:Boolean,required:!1,default:!0},transition:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1,default:`right`},inset:{type:Boolean,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},close:{type:[Boolean,Object],required:!1,default:!0},closeIcon:{type:null,required:!1},dismissible:{type:Boolean,required:!1,default:!0},class:{type:null,required:!1},ui:{type:Object,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0},unmountOnHide:{type:Boolean,required:!1}},emits:[`leave`,`after:leave`,`enter`,`after:enter`,`close:prevent`,`update:open`],setup(e,{emit:t}){let n=e,r=t,i=c(),a=D(`slideover`,n),{t:s}=y(),d=ae(),p=B(u(a,`open`,`defaultOpen`,`modal`,`unmountOnHide`),r),h=oe(f(()=>a.portal)),g=f(()=>a.content),v=U(()=>a.dismissible?{pointerDownOutside:ye}:[`interactOutside`,`escapeKeyDown`].reduce((e,t)=>(e[t]=e=>{e.preventDefault(),r(`close:prevent`)},e),{})),b=U(()=>te({extend:be,...d.ui?.slideover||{}})({transition:a.transition,side:a.side,inset:a.inset}));return(e,t)=>(j(),H(F(ue),m(_(F(p))),{default:A(({open:n,close:c})=>[i.default?(j(),H(F(ve),{key:0,"as-child":``,class:w(F(a).class)},{default:A(()=>[z(e.$slots,`default`,{open:n})]),_:2},1032,[`class`])):O(``,!0),o(F(_e),L(F(h),{"force-mount":F(h).disabled&&F(a).unmountOnHide===!1||void 0}),{default:A(()=>[o(F(re),null,{default:A(()=>[F(a).overlay?(j(),H(F(ge),{key:0,"data-slot":`overlay`,class:w(b.value.overlay({class:F(a).ui?.overlay}))},null,8,[`class`])):O(``,!0),o(F(me),L({"data-side":F(a).side,"data-slot":`content`,class:b.value.content({class:[!i.default&&F(a).class,F(a).ui?.content]})},g.value,{onEnter:t[0]||=e=>r(`enter`),onAfterEnter:t[1]||=e=>r(`after:enter`),onLeave:t[2]||=e=>r(`leave`),onAfterLeave:t[3]||=e=>r(`after:leave`)},T(v.value)),{default:A(()=>[!F(a).title&&!i.title||!F(a).description&&!i.description||i.content?(j(),H(F(k),{key:0},{default:A(()=>[!F(a).title&&!i.title?(j(),H(F(Z),{key:0})):i.content?(j(),H(F(Z),{key:1},{default:A(()=>[z(e.$slots,`title`,{},()=>[I(S(F(a).title),1)])]),_:3})):O(``,!0),!F(a).description&&!i.description?(j(),H(F(X),{key:2})):i.content?(j(),H(F(X),{key:3},{default:A(()=>[z(e.$slots,`description`,{},()=>[I(S(F(a).description),1)])]),_:3})):O(``,!0)]),_:3})):O(``,!0),z(e.$slots,`content`,{close:c},()=>[i.header||F(a).title||i.title||F(a).description||i.description||F(a).close||i.close?(j(),l(`div`,{key:0,"data-slot":`header`,class:w(b.value.header({class:F(a).ui?.header}))},[z(e.$slots,`header`,{close:c},()=>[F(a).title||i.title||F(a).description||i.description?(j(),l(`div`,{key:0,"data-slot":`wrapper`,class:w(b.value.wrapper({class:F(a).ui?.wrapper}))},[F(a).title||i.title?(j(),H(F(Z),{key:0,"data-slot":`title`,class:w(b.value.title({class:F(a).ui?.title}))},{default:A(()=>[z(e.$slots,`title`,{},()=>[I(S(F(a).title),1)])]),_:3},8,[`class`])):O(``,!0),F(a).description||i.description?(j(),H(F(X),{key:1,"data-slot":`description`,class:w(b.value.description({class:F(a).ui?.description}))},{default:A(()=>[z(e.$slots,`description`,{},()=>[I(S(F(a).description),1)])]),_:3},8,[`class`])):O(``,!0)],2)):O(``,!0),z(e.$slots,`actions`),F(a).close||i.close?(j(),H(F(de),{key:1,"as-child":``},{default:A(()=>[z(e.$slots,`close`,{ui:b.value},()=>[F(a).close?(j(),H(ne,L({key:0,icon:F(a).closeIcon||F(d).ui.icons.close,color:`neutral`,variant:`ghost`,"aria-label":F(s)(`slideover.close`)},typeof F(a).close==`object`?F(a).close:{},{"data-slot":`close`,class:b.value.close({class:F(a).ui?.close})}),null,16,[`icon`,`aria-label`,`class`])):O(``,!0)])]),_:2},1024)):O(``,!0)])],2)):O(``,!0),M(`div`,{"data-slot":`body`,class:w(b.value.body({class:F(a).ui?.body}))},[z(e.$slots,`body`,{close:c})],2),i.footer?(j(),l(`div`,{key:1,"data-slot":`footer`,class:w(b.value.footer({class:F(a).ui?.footer}))},[z(e.$slots,`footer`,{close:c})],2)):O(``,!0)])]),_:2},1040,[`data-side`,`class`])]),_:2},1024)]),_:2},1040,[`force-mount`])]),_:3},16))}};function Q(e){let t=V(`connecting`),n=e.factory(e.url);n.onopen=()=>{t.value===`connecting`&&!e.model.state.stopMode&&(t.value=`running`)};let r=0;return n.onmessage=t=>{let n;try{n=JSON.parse(t.data)}catch{return}if(n.type!==`replay_note`){let e=Number(t.lastEventId);if(e>0){if(e<=r)return;r=e}}e.handle(n)},n.addEventListener(`replay_elided`,t=>{let n=se(t);n&&e.model.noteElided(n)}),n.addEventListener(`finished`,n=>{e.onFinished?.(ce(n)),(t.value===`connecting`||t.value===`running`)&&(t.value=`finished`)}),n.addEventListener(`end`,r=>{e.model.flushPendingTurn(`the run ended here`),e.model.closePhases(),t.value=`ended`,n.close(),e.onEnd?.(q(r))}),n.onerror=()=>{n.readyState===2&&(t.value=`disconnected`,e.onDisconnected?.())},{phase:t,close:()=>n.close()}}var $=[`Thinking`,`Pondering`,`Mulling it over`,`Reasoning`,`Cogitating`,`Weighing options`,`Puzzling`,`Deliberating`,`Noodling`,`Chewing on it`,`Ruminating`,`Reticulating splines`];function Se(e){return $[Math.floor(Math.max(0,e)/6e3)%$.length]}var Ce=[`title`],we={class:`verb min-w-0 truncate text-toned`},Te=C({__name:`PendingTurnRow`,props:{verb:{},elapsedMs:{},slow:{type:Boolean},model:{},tag:{},id:{}},setup(e){return(t,n)=>(j(),H(p(e.tag??`li`),{id:e.id,class:`pending flex items-center gap-3 rounded-md border border-dashed border-accented pl-3 pr-[calc(var(--sb-gutter)-1px)] py-2 text-sm`,"aria-live":`off`,title:`the model is working on its next turn — nothing back yet (since the last event, runner clock)`,"data-testid":`pending`},{default:A(()=>[n[0]||=M(`span`,{class:`pulse text-[1.1em] leading-none text-info motion-safe:animate-pulse`},`∿`,-1),e.model?(j(),l(`span`,{key:0,class:`badge shrink-0 rounded bg-accented px-1.5 font-mono text-[0.68rem] font-medium leading-normal tracking-wider text-muted`,title:e.model},S(F(K)(e.model)),9,Ce)):O(``,!0),M(`span`,we,S(e.verb)+`…`,1),M(`span`,{class:w([`since ml-auto shrink-0 font-mono text-xs tabular-nums`,e.slow?`text-warn`:`text-dimmed`])},S(F(G)(e.elapsedMs,`clock`)),3)]),_:1},8,[`id`]))}});export{xe as i,Se as n,Q as r,Te as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-DPJVhUGP.js";import{An as t,Cn as n,Cr as r,Gr as i,Ii as a,Li as o,Mn as s,Pi as c,Sn as l,Tr as u,Xr as d,_r as f,bn as p,ir as m,ji as h,kn as g,l as _,ln as v,o as y,sr as b,t as x,xi as S,xn as C,yi as w,yn as T}from"./browser-CCImen5O.js";import{i as E}from"./PendingTurnRow-BqY-EaZR.js";import{t as D}from"./wallClock-x0hjr0J_.js";import{C as O,D as ee,G as te,K as k,N as ne,T as A,j as re,v as ie,x as ae,y as oe}from"./indexRow-BGjjLnN5.js";import"./format-BldUwl_R.js";import{_ as j,a as M,f as N,g as P,i as F,n as I,o as L,r as R,t as z,u as B,v as V,x as H}from"./SilentTurn-CHfzRQW8.js";import{T as U}from"./sseReplay-BsNQPLmJ.js";var W=[`data-conversation`],G={key:0,class:`mt-6 text-center text-sm text-toned`,"data-testid":`chat-empty`},K={key:1,class:`m-0 flex list-none flex-col gap-5 p-0 pb-4 pt-2`},q={key:4,class:`inline text-[0.875rem] text-toned`,"data-testid":`inline`},J={class:`pt-2`},Y=s({__name:`PlaneChat`,props:{chat:{},at:{},now:{}},setup(e){let a=e,o=0,s=e=>`${e}-${++o}`,c=w([]);for(let e of a.chat.turns){if(`kind`in e){e.kind===`receipt`?c.push({key:s(`s`),kind:`silent`,reason:e.reason,at:e.decidedAt}):c.push({key:s(`w`),kind:`parent`,turn:e});continue}c.push({key:s(`p`),kind:`person`,text:e.request,at:e.receivedAt??e.startedAt,pending:!1});let t=!e.finished&&e.token?{eventsUrl:`/runs/${encodeURIComponent(e.id)}/events?t=${e.token}`,stopUrl:`/runs/${encodeURIComponent(e.id)}/stop?t=${e.token}`,serverNow:a.at}:null;c.push({key:s(`a`),kind:`assistant`,turn:e,live:t,ended:e.finished})}let l=T(()=>{for(let e=c.length-1;e>=0;e--){let t=c[e];if(t.kind===`assistant`&&t.live&&!t.ended&&t.turn.hosted!==!0)return t}return null}),u=S(null),d=S(``),h=S(void 0),g=T(()=>N(l.value!==null,d.value)),_=S(!1);i(d,()=>{h.value&&d.value===``&&(h.value=void 0)});async function y(){if(_.value)return;let e=L(d.value.trim(),a.chat.commands);if(e===``)return;let t=w({key:s(`p`),kind:`person`,text:e,at:a.now,pending:!0});c.push(t),d.value=``,h.value=void 0,_.value=!0;try{let n=await fetch(a.chat.sendUrl,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`},body:JSON.stringify({text:e})}),r=await n.json().catch(()=>({}));if(n.status===202&&typeof r.viewPath==`string`&&typeof r.runId==`string`){let n=P(r.viewPath);if(!n)throw Error(`the run's view path was not one`);t.pending=!1,c.push({key:s(`a`),kind:`assistant`,turn:{id:r.runId,request:e,startedAt:a.now,receivedAt:a.now,finished:!1,eventCount:0},live:{eventsUrl:n.eventsUrl,stopUrl:n.stopUrl},ended:!1});return}if(n.ok&&r.offer&&typeof r.offer.line==`string`){t.pending=!1;let e=V({line:r.offer.line,...r.offer});d.value=e.command,h.value=e.hint;return}if(n.ok&&typeof r.reply==`string`){t.pending=!1;let e=B(r.reply);e.kind===`inline`&&c.push({key:s(`i`),kind:`inline`,text:e.text});return}throw Error(r.error??`HTTP ${n.status}`)}catch(e){t.pending=!1,t.failed=`not sent: ${e instanceof Error?e.message:`error`}`}finally{_.value=!1}}function b(){let e=u.value;e&&fetch(`${e}${e.includes(`?`)?`&`:`?`}mode=soft`,{method:`POST`,credentials:`same-origin`})}function x(e,t,n){let r=c.filter(e=>e.kind===`person`),i=j(r.map(e=>({text:e.text,folded:e.folded!==void 0,ref:e})),t);if(!i)return;let a=e.turn.receivedAt??e.turn.startedAt;i.ref.folded=n===void 0?``:`at ${k(Math.max(0,n-a),`clock`)}`}function E(e){e.ended=!0,u.value=null}let D=S(null);return i(()=>c.length,()=>{let e=D.value,t=!e||H(e.scrollHeight-(e.clientHeight+e.scrollTop));m().then(()=>{let e=D.value;t&&e&&(e.scrollTop=e.scrollHeight)})}),(i,a)=>(f(),n(`div`,{class:`plane-chat flex h-full min-h-0 flex-col`,"data-plane-chat":``,"data-conversation":e.chat.conversation},[p(`div`,{ref_key:`scroller`,ref:D,class:`min-h-0 flex-1 overflow-y-auto pr-1`,"data-testid":`chat-scroller`},[c.length===0?(f(),n(`p`,G,` Ask about the fleet — the rows on this page are what it reads. `)):(f(),n(`ol`,K,[(f(!0),n(v,null,r(c,r=>(f(),n(`li`,{key:r.key},[r.kind===`person`?(f(),C(F,{key:0,text:r.text,at:r.at,now:e.now,pending:r.pending,folded:r.folded,failed:r.failed},null,8,[`text`,`at`,`now`,`pending`,`folded`,`failed`])):r.kind===`assistant`?(f(),C(R,{key:1,turn:r.turn,live:r.live,now:e.now,onInput:(e,t)=>x(r,e,t),onEnded:e=>E(r),onStop:a[0]||=e=>u.value=e},null,8,[`turn`,`live`,`now`,`onInput`,`onEnded`])):r.kind===`silent`?(f(),C(z,{key:2,reason:r.reason,"decided-at":r.at,now:e.now},null,8,[`reason`,`decided-at`,`now`])):r.kind===`parent`?(f(),C(I,{key:3,turn:r.turn,now:e.now},null,8,[`turn`,`now`])):(f(),n(`div`,q,[t(U,{text:r.text},null,8,[`text`])]))]))),128))]))],512),p(`div`,J,[t(M,{modelValue:d.value,"onUpdate:modelValue":a[1]||=e=>d.value=e,mode:g.value,hint:h.value,commands:e.chat.commands,onSubmit:y,onStop:b},null,8,[`modelValue`,`mode`,`hint`,`commands`])])],8,W))}}),se=[`data-chat`],ce={class:`panels min-w-0`},le={class:`mb-4 font-mono text-sm tabular-nums text-muted`,"data-plane-head":``},ue={class:`mb-6`,"aria-labelledby":`plane-runs`},de={key:0,class:`text-sm text-muted`},fe={key:1,class:`divide-y divide-default rounded-md border border-default`},pe=[`data-run`,`data-health`],me={class:`text-muted`},he={class:`font-mono tabular-nums`},ge={class:`font-mono tabular-nums text-muted`},_e={key:0,class:`font-mono text-xs tabular-nums text-muted`},ve={class:`text-muted`,"data-owner":``},ye=[`href`],be=[`data-flag`],xe={class:`mb-6`,"aria-labelledby":`plane-units`},Se={key:0,class:`text-sm text-muted`},Ce={key:1,class:`divide-y divide-default rounded-md border border-default`},we=[`data-unit`,`data-health`],Te={class:`text-muted`},Ee=[`href`],De=[`data-flag`],Oe={"aria-labelledby":`plane-prs`},ke={key:0,class:`text-sm text-muted`},Ae={key:1,class:`divide-y divide-default rounded-md border border-default`},je=[`data-pr`,`data-health`],Me=[`href`],Ne={key:1,class:`font-mono text-highlighted`},Pe={key:2,class:`truncate text-muted`},Fe={class:`text-xs text-dimmed`,"data-owner":``},Ie=[`data-flag`],Le={key:0,class:`chat-column relative hidden lg:block`,"data-testid":`chat-column`},Re=[`aria-valuemin`,`aria-valuemax`,`aria-valuenow`],X=`sb.plane.chat.width`,ze=`(min-width: 64rem)`,Be=s({__name:`PlanePage`,setup(i){let s=y(`plane`),m=T(()=>s?.table??null),w=D(s?.table.at,3e4),j=s?.chat??null,M={min:320,default:400,max:640,step:16};function N(e){let t=Math.round(Number(e));return Number.isFinite(t)?Math.min(M.max,Math.max(M.min,t)):M.default}let P=x.readPref(X),F=S(P===null?M.default:N(P)),I=S(!1),L=S(x.mediaMatches(ze)),R=x.onMediaChange(ze,e=>{L.value=e,e&&(I.value=!1)});function z(e,t){F.value=N(e),t&&x.writePref(X,String(F.value))}let B=null;function V(e){B&&z(B.startWidth-(e.clientX-B.startX),!1)}function H(){window.removeEventListener(`pointermove`,V),B&&(B=null,x.writePref(X,String(F.value)))}function U(e){e.button===0&&(e.preventDefault(),B={startX:e.clientX,startWidth:F.value},e.currentTarget?.setPointerCapture?.(e.pointerId),window.addEventListener(`pointermove`,V),window.addEventListener(`pointerup`,H,{once:!0}))}function W(e){if(e.key===`ArrowLeft`)z(F.value+M.step,!0);else if(e.key===`ArrowRight`)z(F.value-M.step,!0);else if(e.key===`Home`)z(M.max,!0);else if(e.key===`End`)z(M.min,!0);else return;e.preventDefault()}b(()=>{window.removeEventListener(`pointermove`,V),window.removeEventListener(`pointerup`,H),R()});let G=e=>({...e.run,...s?.tokens[e.run.id]?{token:s.tokens[e.run.id]}:{}}),K=T(()=>m.value?.runs.filter(e=>!e.run.finished).length??0),q=T(()=>m.value?m.value.runs.length-K.value:0),J=e=>{let t=e.owner.name??ne(G(e))??e.owner.id??``;return e.owner.generation?`${t||`run`} · on ${e.owner.generation}`:t},Be=e=>{let t=e.run;return k(te({startedAt:t.startedAt,receivedAt:t.receivedAt,finishedAt:t.finishedAt},w.value),`clock`)},Ve=e=>ie(G(e),w.value)??oe(G(e),w.value),He=e=>`/runs/unit/${encodeURIComponent(e.unit.unit)}`,Z=e=>`${e.pr.repo}#${e.pr.number}`,Ue=e=>e.owner.unitKey??(e.owner.runId?`run ${O(e.owner.runId)}`:`a person`),We={stalled:`stalled`,"bound-exceeded":`past its bound`,"no-signal":`no signal`,provisional:`unfinished`,interrupted:`interrupted`,failed:`failed`,approved:`approved`,dirty:`conflicts`,red:`checks red`,pending:`checks pending`,mistitled:`title fails the rule`,merged:`merged`,closed:`closed`,unknown:`unread`,live:`live`,waiting:`waiting`,idle:`idle`,"merge-ready":`merge-ready`,ended:`ended`,"owner-gap":`approved, open, nobody's`},Q=e=>We[e]??e,$=e=>[`stalled`,`bound-exceeded`,`red`,`dirty`,`mistitled`,`owner-gap`,`failed`,`interrupted`].includes(e)?`border-error/40 text-error`:[`pending`,`idle`,`waiting`,`no-signal`,`provisional`,`unknown`].includes(e)?`border-warning/40 text-warning`:`border-default text-muted`;return(i,s)=>{let y=u(`RouterLink`),b=_,x=E;return m.value?(f(),C(e,{key:0,title:`Plane`,nav:`plane`},{default:d(()=>[p(`div`,{class:c([`plane`,h(j)?`lg:grid lg:grid-cols-[minmax(0,1fr)_var(--chat-w)] lg:gap-10`:``]),style:a(h(j)?{"--chat-w":`${F.value}px`}:void 0),"data-chat":h(j)?`shown`:void 0},[p(`div`,ce,[p(`p`,le,o(K.value)+` live · `+o(q.value)+` recent · `+o(m.value.units.length)+` units · `+o(m.value.pullRequests.length)+` pull requests `,1),p(`section`,ue,[s[3]||=p(`h2`,{id:`plane-runs`,class:`mb-2 text-xs font-medium uppercase tracking-wide text-dimmed`},`Runs`,-1),m.value.runs.length===0?(f(),n(`p`,de,`No run is live or ended in the last hour.`)):(f(),n(`ul`,fe,[(f(!0),n(v,null,r(m.value.runs,e=>(f(),n(`li`,{key:e.run.id,class:`flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm`,"data-run":e.run.id,"data-health":e.health.join(` `)},[p(`span`,{class:c([`inline-block size-2 rounded-full`,{"bg-success":h(A)(G(e))===`green`,"bg-error":h(A)(G(e))===`red`,"bg-warning":h(A)(G(e))===`amber`,"bg-dimmed":h(A)(G(e))===`grey`}]),"aria-hidden":`true`},null,2),t(y,{class:`font-mono text-highlighted`,to:h(ae)(G(e))},{default:d(()=>[g(o(h(O)(e.run.id)),1)]),_:2},1032,[`to`]),p(`span`,me,o(e.run.agent??`-`),1),p(`span`,he,o(h(ee)(G(e))),1),p(`span`,ge,o(Be(e)),1),Ve(e)?(f(),n(`span`,_e,o(Ve(e)),1)):l(``,!0),p(`span`,ve,o(J(e)),1),e.unit?(f(),C(y,{key:1,class:`font-mono text-xs text-muted`,to:`/runs/unit/${encodeURIComponent(e.unit.key)}`},{default:d(()=>[g(o(e.unit.key),1)]),_:2},1032,[`to`])):l(``,!0),e.run.threadKey?(f(),n(`a`,{key:2,class:`text-xs text-dimmed`,href:h(re)(e.run.threadKey),target:`_blank`,rel:`noreferrer`},`thread`,8,ye)):l(``,!0),(f(!0),n(v,null,r(e.health,e=>(f(),n(`span`,{key:e,class:c([`rounded border px-1.5 py-0.5 text-xs`,$(e)]),"data-flag":e},o(Q(e)),11,be))),128))],8,pe))),128))]))]),p(`section`,xe,[s[4]||=p(`h2`,{id:`plane-units`,class:`mb-2 text-xs font-medium uppercase tracking-wide text-dimmed`},`Units`,-1),m.value.units.length===0?(f(),n(`p`,Se,`No ship unit has a run on the table.`)):(f(),n(`ul`,Ce,[(f(!0),n(v,null,r(m.value.units,e=>(f(),n(`li`,{key:e.unit.unit,class:`flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm`,"data-unit":e.unit.unit,"data-health":e.health.join(` `)},[t(y,{class:`font-mono text-highlighted`,to:He(e)},{default:d(()=>[g(o(e.unit.unit),1)]),_:2},1032,[`to`]),p(`span`,Te,o(e.instance.repo),1),p(`span`,null,o(e.unit.title??e.unit.id),1),e.unit.pr?(f(),n(`a`,{key:0,class:`font-mono text-xs text-muted`,href:e.unit.pr.url,target:`_blank`,rel:`noreferrer`},`#`+o(e.unit.pr.number),9,Ee)):l(``,!0),(f(!0),n(v,null,r(e.health,e=>(f(),n(`span`,{key:e,class:c([`rounded border px-1.5 py-0.5 text-xs`,$(e)]),"data-flag":e},o(Q(e)),11,De))),128))],8,we))),128))]))]),p(`section`,Oe,[s[5]||=p(`h2`,{id:`plane-prs`,class:`mb-2 text-xs font-medium uppercase tracking-wide text-dimmed`},`Pull requests`,-1),m.value.pullRequests.length===0?(f(),n(`p`,ke,`No pull request is tracked.`)):(f(),n(`ul`,Ae,[(f(!0),n(v,null,r(m.value.pullRequests,e=>(f(),n(`li`,{key:Z(e),class:`flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm`,"data-pr":Z(e),"data-health":e.health.join(` `)},[e.pr.url?(f(),n(`a`,{key:0,class:`font-mono text-highlighted`,href:e.pr.url,target:`_blank`,rel:`noreferrer`},o(Z(e)),9,Me)):(f(),n(`span`,Ne,o(Z(e)),1)),e.pr.title?(f(),n(`span`,Pe,o(e.pr.title),1)):l(``,!0),p(`span`,Fe,o(Ue(e)),1),(f(!0),n(v,null,r(e.health,e=>(f(),n(`span`,{key:e,class:c([`rounded border px-1.5 py-0.5 text-xs`,$(e)]),"data-flag":e},o(Q(e)),11,Ie))),128))],8,je))),128))]))])]),h(j)&&L.value?(f(),n(`aside`,Le,[p(`div`,{class:`handle group/handle absolute inset-y-0 -left-6 flex w-3 cursor-col-resize touch-none select-none justify-center outline-none`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the chat column`,"aria-valuemin":M.min,"aria-valuemax":M.max,"aria-valuenow":F.value,tabindex:`0`,"data-testid":`chat-handle`,onPointerdown:U,onKeydown:W,onDblclick:s[0]||=e=>z(M.default,!0)},[...s[6]||=[p(`span`,{class:`w-px rounded-full bg-(--ui-border-accented) opacity-0 transition-opacity duration-150 ease-out group-hover/handle:opacity-100 group-focus-visible/handle:opacity-100`,"aria-hidden":`true`},null,-1)]],40,Re),t(Y,{class:`sticky top-20 h-[calc(100vh-7rem)]`,chat:h(j),at:m.value.at,now:h(w)},null,8,[`chat`,`at`,`now`])])):l(``,!0)],14,se),h(j)&&!L.value?(f(),n(v,{key:0},[t(b,{class:`chat-fab fixed bottom-5 right-5 z-20 rounded-full shadow-lg lg:hidden`,size:`lg`,icon:`i-lucide-message-circle`,"aria-label":`Open the chat`,"data-testid":`chat-fab`,onClick:s[1]||=e=>I.value=!0}),t(x,{open:I.value,"onUpdate:open":s[2]||=e=>I.value=e,side:`right`,title:`Chat`,ui:{content:`max-w-md`}},{body:d(()=>[t(Y,{class:`h-full`,chat:h(j),at:m.value.at,now:h(w)},null,8,[`chat`,`at`,`now`])]),_:1},8,[`open`])],64)):l(``,!0)]),_:1})):(f(),C(e,{key:1,title:`Plane`,nav:`plane`},{default:d(()=>[...s[7]||=[p(`p`,{class:`text-sm text-muted`},`The table could not be read.`,-1)]]),_:1}))}}});export{Be as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-DPJVhUGP.js";import{An as t,Cn as n,Cr as r,Li as i,Mn as ee,Sn as te,Tr as ne,Xr as a,_r as o,bn as s,ji as c,kn as l,ln as u,o as d,xn as f,yn as p}from"./browser-CCImen5O.js";import{_ as m,a as re,c as ie,d as ae,g as oe,l as se,m as h,n as ce,o as g,s as le,u as ue,v as _}from"./main-B32N1vUh.js";import{t as v}from"./StatusDot-BMkUFVE8.js";var de={class:`mt-4 first:mt-0`},fe={class:`w-full border-collapse font-mono text-[0.8125rem]`},pe={class:`border-t border-muted`},me={class:`px-2 py-1 align-top`},y={class:`ml-1.5 font-medium`},b={class:`border-t border-muted`},x={class:`break-all px-2 py-1 align-top`},S={key:0},C={key:1,class:`text-dimmed`},w={class:`border-t border-muted`},T={class:`break-all px-2 py-1 align-top`},E={key:0},D={key:1,class:`text-dimmed`},O={class:`border-t border-muted`},k={class:`break-all px-2 py-1 align-top`},A={key:0},j={key:1,class:`text-dimmed`},M={class:`border-t border-muted`},N={class:`break-all px-2 py-1 align-top`},P={key:0},F={key:1,class:`text-dimmed`},I={class:`border-t border-muted`},L={class:`break-all px-2 py-1 align-top`},R={key:1,class:`text-dimmed`},z={class:`mt-4`},he={class:`w-full border-collapse font-mono text-[0.8125rem]`},ge={class:`border-t border-muted`},_e={class:`break-all px-2 py-1 align-top`},ve=[`href`],ye={key:1},be={class:`border-t border-muted`},xe={class:`break-all px-2 py-1 align-top`},Se={class:`border-t border-muted`},Ce={class:`break-all px-2 py-1 align-top`},we=[`href`],Te={key:1},Ee={key:2,class:`text-dimmed`},De={class:`border-t border-muted`},Oe={class:`break-all px-2 py-1 align-top`},ke={key:0},Ae={key:1,class:`text-dimmed`},je={class:`border-t border-muted`},Me={class:`break-all px-2 py-1 align-top`},Ne={key:0},Pe={key:1,class:`text-dimmed`},Fe={class:`border-t border-muted`},Ie={class:`break-all px-2 py-1 align-top`},Le={key:0},Re={key:1,class:`text-dimmed`},ze={class:`mt-4`},Be={class:`w-full border-collapse font-mono text-[0.8125rem]`},Ve={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},He={class:`break-all px-2 py-1 align-top`},Ue={class:`w-full border-collapse font-mono text-[0.8125rem]`},We={class:`w-32 break-all px-2 py-1 align-top text-muted sm:w-96 sm:break-words`},Ge={class:`px-2 py-1 align-top`},Ke={key:1,class:`text-xs text-muted`},qe={class:`mt-4`},Je={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Ye={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},B={class:`break-all px-2 py-1 align-top`},Xe={key:0},Ze={key:1,class:`text-dimmed`},Qe={key:1,class:`text-xs text-muted`},$e={class:`mt-4`},et={class:`mb-1 text-xs text-muted`},tt={class:`overflow-x-auto`},nt={class:`w-full border-collapse font-mono text-[0.8125rem]`},rt={class:`break-all px-2 py-1 align-top`},it={key:0,class:`text-xs text-muted`},at={class:`break-all px-2 py-1 align-top`},ot=[`href`],st={key:1},ct={key:2,class:`text-dimmed`},lt={class:`break-all px-2 py-1 align-top`},ut={key:0},dt={key:1,class:`text-dimmed`},ft={key:2},pt={key:3,class:`text-dimmed`},mt={class:`break-all px-2 py-1 align-top`},ht={key:0},gt={key:1,class:`text-dimmed`},_t={key:2},vt={key:3,class:`text-dimmed`},yt={key:1,class:`text-xs text-muted`},bt={class:`mt-4`},xt={class:`w-full border-collapse font-mono text-[0.8125rem]`},St={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ct={class:`px-2 py-1 align-top`},wt={class:`mt-4`},Tt={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Et={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Dt={class:`break-all px-2 py-1 align-top`},Ot={class:`text-xs text-muted`},kt={key:1,class:`text-xs text-muted`},At={class:`mt-4`},jt={class:`w-full border-collapse font-mono text-[0.8125rem]`},Mt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Nt={class:`break-all px-2 py-1 align-top`},Pt={key:0},Ft={key:1,class:`text-dimmed`},It={class:`mt-4 text-xs text-muted`},Lt={class:`rounded bg-elevated px-1 py-0.5`},Rt={class:`rounded bg-elevated px-1 py-0.5`},zt={class:`rounded bg-elevated px-1 py-0.5`},V=ee({__name:`ResidentDetailPage`,setup(ee){let V=d(`resident`),H=p(()=>V?.record??{}),U=p(()=>ie(H.value)),W=p(()=>se(H.value)||(V?.slug??``)),G=p(()=>h(U.value.sha)),K=p(()=>ce.test(W.value)?`https://github.com/${W.value}`:void 0),q=p(()=>K.value&&/^[0-9a-f]{7,40}$/.test(G.value)?`${K.value}/commit/${G.value}`:void 0),J=p(()=>{let e=U.value.snapshot;return e&&typeof e==`object`?g(e):void 0}),Bt=p(()=>g(U.value.schedules)),Y=p(()=>{let e=g(H.value.commands),t=g(H.value.effects);return Object.keys(e).sort().map(n=>({name:n,command:h(e[n]),effect:h(t[n])||`readonly`}))}),X=p(()=>ae(H.value).map(e=>({...e,threadKey:e.threadKey||`?`,ref:e.ref||`?`,sha:e.sha?e.sha.slice(0,8):``,commitHref:K.value&&/^[0-9a-f]{7,40}$/.test(e.sha)?`${K.value}/commit/${e.sha}`:void 0}))),Z=p(()=>X.value.filter(e=>!e.evicted).length),Q=p(()=>{let e=U.value.lastRestore;return e?JSON.stringify(e):``}),$=p(()=>le(H.value)),Vt=p(()=>typeof H.value.diskBudgetMb==`number`?H.value.diskBudgetMb:void 0),Ht=p(()=>{let e=$.value;if(!e)return[];let t=re(e,Vt.value),n=n=>{let r=t.room[n];return r===null?_(e.parts,n)===null?`? (checkout not measured)`:`?`:`${r} more (${m(_(e.parts,n))} each)`};return[[`used / total`,oe(e)],[`free`,`${m(t.freeKiB)}${t.capped?` under the ${m(t.capacityKiB)} diskBudgetMb cap`:``}`],[`reserve`,`${m(t.reserve.totalKiB)} (snapshot staging ${m(t.reserve.stagingKiB)} + floor ${m(t.reserve.floorKiB)})`],[`headroom`,`${m(t.headroomKiB)} — room for ${n(`hardlink`)} hardlinked trees, ${n(`reconcile`)} lockfile-diverged (reconciling)`],[`measured`,e.at||`—`]]}),Ut=p(()=>{let e=$.value;if(!e)return[];let t=[[`mirror`,m(e.parts.mirror)],[`checkout deps (node_modules)`,m(e.parts.deps)],[`checkout (history + tree + build)`,m(e.parts.checkout)]];for(let[n,r]of Object.entries(e.parts.threads).sort((e,t)=>t[1]-e[1]))t.push([`thread ${n}`,m(r)]);for(let[n,r]of Object.entries(e.parts.homes).sort((e,t)=>t[1]-e[1]))r>=1024&&t.push([`home ${n}`,m(r)]);return t.push([`other (image, /tmp, …)`,m(e.parts.other)]),t});return(ee,d)=>{let p=ne(`RouterLink`);return o(),f(e,{title:W.value||`Resident`,nav:`residents`},{leading:a(()=>[t(p,{class:`back text-sm text-muted no-underline hover:text-primary`,to:`/residents`},{default:a(()=>[...d[0]||=[l(`← All residents`,-1)]]),_:1})]),default:a(()=>[s(`section`,de,[d[8]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Lifecycle`,-1),s(`table`,fe,[s(`tbody`,null,[s(`tr`,pe,[d[1]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state`,-1),s(`td`,me,[t(v,{tone:c(ue)(U.value.state),label:U.value.state},null,8,[`tone`,`label`]),s(`span`,y,i(U.value.state),1)])]),s(`tr`,b,[d[2]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`reason`,-1),s(`td`,x,[U.value.reason?(o(),n(`span`,S,i(U.value.reason),1)):(o(),n(`span`,C,`—`))])]),s(`tr`,w,[d[3]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh error`,-1),s(`td`,T,[c(h)(U.value.lastRefreshError)?(o(),n(`span`,E,i(c(h)(U.value.lastRefreshError)),1)):(o(),n(`span`,D,`—`))])]),s(`tr`,O,[d[4]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last restore`,-1),s(`td`,k,[Q.value?(o(),n(`span`,A,i(Q.value),1)):(o(),n(`span`,j,`—`))])]),s(`tr`,M,[d[5]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state updated`,-1),s(`td`,N,[c(h)(U.value.updatedAt)?(o(),n(`span`,P,i(c(h)(U.value.updatedAt)),1)):(o(),n(`span`,F,`—`))])]),s(`tr`,I,[d[7]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`idle since`,-1),s(`td`,L,[c(h)(U.value.idleSince)?(o(),n(u,{key:0},[l(i(c(h)(U.value.idleSince))+` `,1),d[6]||=s(`span`,{class:`text-xs text-muted`},`(refresh parked; container may sleep)`,-1)],64)):(o(),n(`span`,R,`awake`))])])])])]),s(`section`,z,[d[15]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pinned facts`,-1),s(`table`,he,[s(`tbody`,null,[s(`tr`,ge,[d[9]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`repository`,-1),s(`td`,_e,[K.value?(o(),n(`a`,{key:0,class:`text-primary`,href:K.value},i(K.value),9,ve)):(o(),n(`span`,ye,i(c(h)(H.value.resource)||`—`),1))])]),s(`tr`,be,[d[10]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`default ref`,-1),s(`td`,xe,i(c(h)(U.value.defaultRef)||c(h)(H.value.defaultRef)||`—`),1)]),s(`tr`,Se,[d[11]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`pinned sha`,-1),s(`td`,Ce,[q.value?(o(),n(`a`,{key:0,class:`text-primary`,href:q.value},i(G.value),9,we)):G.value?(o(),n(`span`,Te,i(G.value),1)):(o(),n(`span`,Ee,`—`))])]),s(`tr`,De,[d[12]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`lockfile hash`,-1),s(`td`,Oe,[c(h)(U.value.lockfileHash)?(o(),n(`span`,ke,i(c(h)(U.value.lockfileHash)),1)):(o(),n(`span`,Ae,`—`))])]),s(`tr`,je,[d[13]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`provisioned`,-1),s(`td`,Me,[c(h)(U.value.provisionedAt)?(o(),n(`span`,Ne,i(c(h)(U.value.provisionedAt)),1)):(o(),n(`span`,Pe,`—`))])]),s(`tr`,Fe,[d[14]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh`,-1),s(`td`,Ie,[c(h)(U.value.lastRefreshAt)?(o(),n(`span`,Le,i(c(h)(U.value.lastRefreshAt)),1)):(o(),n(`span`,Re,`—`))])])])])]),s(`section`,ze,[d[17]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Disk`,-1),$.value?(o(),n(u,{key:0},[s(`table`,Be,[s(`tbody`,null,[(o(!0),n(u,null,r(Ht.value,([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Ve,i(e),1),s(`td`,He,i(t),1)]))),128))])]),d[16]||=s(`p`,{class:`mb-1 mt-2 text-xs text-muted`},` components (one du, hardlinks counted once — a thread tree shows only what it does not share with the checkout) `,-1),s(`table`,Ue,[s(`tbody`,null,[(o(!0),n(u,null,r(Ut.value,([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,We,i(e),1),s(`td`,Ge,i(t),1)]))),128))])])],64)):(o(),n(`p`,Ke,` not measured yet — the first refresh cycle or attach of this container measures it `))]),s(`section`,qe,[d[18]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Snapshot stamp`,-1),J.value?(o(),n(`table`,Je,[s(`tbody`,null,[(o(),n(u,null,r([`ref`,`sha`,`lockfileHash`,`createdAt`,`mirrorBackupId`,`checkoutBackupId`],e=>s(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Ye,i(e),1),s(`td`,B,[c(h)(J.value[e])?(o(),n(`span`,Xe,i(c(h)(J.value[e])),1)):(o(),n(`span`,Ze,`—`))])])),64))])])):(o(),n(`p`,Qe,`no snapshot recorded`))]),s(`section`,$e,[d[22]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Thread worktrees`,-1),X.value.length>0?(o(),n(u,{key:0},[s(`p`,et,i(Z.value)+` live · `+i(X.value.length-Z.value)+` evicted`,1),s(`div`,tt,[s(`table`,nt,[s(`tbody`,null,[d[21]||=s(`tr`,{class:`text-xs text-muted`},[s(`td`,{class:`px-2 py-1`},`thread`),s(`td`,{class:`px-2 py-1`},`ref · sha`),s(`td`,{class:`px-2 py-1`},`user · deps`),s(`td`,{class:`px-2 py-1`},`bound · last attach`)],-1),(o(!0),n(u,null,r(X.value,e=>(o(),n(`tr`,{key:e.threadKey,class:`border-t border-muted`},[s(`td`,rt,[e.evicted?(o(),n(`span`,it,[l(`evicted `+i(e.evictedAt||`—`),1),e.evictedWhy?(o(),n(u,{key:0},[l(` · `+i(e.evictedWhy),1)],64)):te(``,!0)])):(o(),f(v,{key:1,tone:`green`,label:`live`,tip:`live`})),l(` `+i(e.threadKey),1)]),s(`td`,at,[l(i(e.ref)+` · `,1),e.commitHref?(o(),n(`a`,{key:0,class:`text-primary`,href:e.commitHref},i(e.sha),9,ot)):e.sha?(o(),n(`span`,st,i(e.sha),1)):(o(),n(`span`,ct,`—`))]),s(`td`,lt,[e.user?(o(),n(`span`,ut,i(e.user),1)):(o(),n(`span`,dt,`—`)),d[19]||=l(` · `,-1),e.deps?(o(),n(`span`,ft,i(e.deps),1)):(o(),n(`span`,pt,`—`))]),s(`td`,mt,[e.boundAt?(o(),n(`span`,ht,i(e.boundAt),1)):(o(),n(`span`,gt,`—`)),d[20]||=l(` · `,-1),e.lastAttachAt?(o(),n(`span`,_t,i(e.lastAttachAt),1)):(o(),n(`span`,vt,`—`))])]))),128))])])])],64)):(o(),n(`p`,yt,`no thread worktrees`))]),s(`section`,bt,[d[23]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pending schedules`,-1),s(`table`,xt,[s(`tbody`,null,[(o(),n(u,null,r([[`refresh`,`refresh`],[`provision run`,`provisionRun`],[`provision deadline`,`provisionDeadline`]],([e,t])=>s(`tr`,{key:t,class:`border-t border-muted`},[s(`td`,St,i(e),1),s(`td`,Ct,i(c(h)(Bt.value[t]??0)||`0`),1)])),64))])])]),s(`section`,wt,[d[25]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Command table`,-1),Y.value.length>0?(o(),n(`table`,Tt,[s(`tbody`,null,[(o(!0),n(u,null,r(Y.value,e=>(o(),n(`tr`,{key:e.name,class:`border-t border-muted`},[s(`td`,Et,i(e.name),1),s(`td`,Dt,[s(`code`,null,i(e.command),1),d[24]||=l(),s(`span`,Ot,i(e.effect),1)])]))),128))])])):(o(),n(`p`,kt,`no command table`))]),s(`section`,At,[d[26]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Registry settings`,-1),s(`table`,jt,[s(`tbody`,null,[(o(!0),n(u,null,r([[`onboarded`,c(h)(H.value.onboardedAt)],[`record updated`,c(h)(H.value.updatedAt)],[`provisioning timeout (ms)`,c(h)(H.value.provisioningTimeoutMs)],[`disk budget (MB)`,c(h)(H.value.diskBudgetMb)],[`worktree TTL (days)`,c(h)(H.value.worktreeTtlDays??7)]],([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Mt,i(e),1),s(`td`,Nt,[t?(o(),n(`span`,Pt,i(t),1)):(o(),n(`span`,Ft,`—`))])]))),128))])])]),s(`p`,It,[d[27]||=l(` Manage from chat: `,-1),s(`code`,Lt,`repo rebuild `+i(W.value),1),d[28]||=l(` · `,-1),s(`code`,Rt,`repo reconfigure `+i(W.value)+` …`,1),d[29]||=l(` · `,-1),s(`code`,zt,`repo offboard `+i(W.value)+` --dry-run`,1)])]),_:1},8,[`title`])}}});export{V as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-DPJVhUGP.js";import{An as t,Cn as n,Cr as r,Gr as i,Li as a,Mn as o,Pi as s,Sn as c,Tr as l,Xr as u,_r as d,bn as f,dr as p,hr as m,ji as h,kn as g,ln as _,o as v,rn as y,t as b,xi as x,xn as S,yi as C,yn as w}from"./browser-CCImen5O.js";import{t as T}from"./Tooltip-Dfot16IA.js";import{_ as E,a as D,c as O,d as k,f as A,g as j,h as M,i as N,l as P,m as F,n as I,p as L,r as R,s as ee,u as te,y as z}from"./main-B32N1vUh.js";import{t as B}from"./eventSource-Cv0AFlMi.js";import{t as V}from"./wallClock-x0hjr0J_.js";import{n as ne,r as re}from"./indexFormat-B-pd4r7Y.js";import{A as ie,C as H,D as ae,S as oe,a as se,c as ce,i as le,l as ue,t as de,x as fe}from"./indexRow-BGjjLnN5.js";import"./format-BldUwl_R.js";import{t as U}from"./StatusDot-BMkUFVE8.js";var pe=[`data-slug`,`data-running`],me=[`open`],he={class:`row flex cursor-pointer list-none flex-wrap items-baseline gap-x-2.5 gap-y-1 rounded-md px-2 py-2 hover:bg-elevated [&::-webkit-details-marker]:hidden`},ge={class:`self-center`},_e={class:`font-mono text-[0.9375rem] font-medium text-highlighted`},ve={class:`text-sm text-toned`},ye={key:0,class:`running shrink-0 rounded border border-ok/25 bg-ok/8 px-1.5 font-mono text-[0.68rem] font-medium tabular-nums text-ok`},be=[`title`],xe={key:2,class:`basis-full pl-[1.9rem] text-xs text-warn`},Se={class:`fold pb-3 pl-[1.9rem] pr-2 pt-0.5`},Ce={key:0,class:`m-0 list-none divide-y divide-(--ui-border-muted) p-0`},we=[`data-run-id`,`data-thread`],Te={class:`pt-[0.3rem]`},Ee={class:`what min-w-0`},De={class:`flex min-w-0 items-baseline gap-2`},Oe=[`title`],ke={key:0,class:`who block truncate text-xs text-dimmed`},Ae=[`href`],je={key:1,class:`who block text-xs text-dimmed`},Me={class:`min-w-0 font-mono text-xs max-sm:col-span-2 max-sm:col-start-2 max-sm:row-start-2`},Ne=[`title`],Pe=[`href`],Fe={key:1},Ie={key:1,class:`font-sans text-dimmed`},Le={key:0,class:`facts-tree block truncate text-dimmed`},Re={class:`user`},ze={class:`deps`},Be=[`title`],Ve={class:`flex items-baseline gap-3 justify-self-end max-sm:col-start-3 max-sm:row-start-1`},He=[`title`],Ue={key:1,class:`py-1 text-xs text-dimmed`},We=[`data-idle`],Ge={key:1},W=o({__name:`ResidentRow`,props:{record:{},runs:{},now:{},open:{type:Boolean}},setup(e){let o=e,p=x(o.open===!0);i(()=>o.open,e=>{e&&(p.value=!0)});function m(e){p.value=e.target.open}let v=w(()=>P(o.record)),b=w(()=>v.value||F(o.record.resource)||`?`),C=w(()=>O(o.record)),T=w(()=>te(C.value.state)),A=w(()=>I.test(v.value)?`/residents/${v.value}`:null),L=w(()=>I.test(v.value)?`https://github.com/${v.value}`:void 0),R=e=>L.value&&/^[0-9a-f]{7,40}$/.test(e)?`${L.value}/commit/${e}`:void 0,z=w(()=>F(o.record.defaultRef)||`?`),B=w(()=>F(C.value.sha).slice(0,8)),V=w(()=>F(C.value.lastRefreshAt)),W=e=>{let t=e?Date.parse(e):NaN;return Number.isFinite(t)?ne(t,o.now):e||`—`},G=w(()=>V.value?W(V.value):``),K=w(()=>ee(o.record)),q=w(()=>K.value?j(K.value):``),J=w(()=>{let e=K.value;if(!e)return null;let t=typeof o.record.diskBudgetMb==`number`?o.record.diskBudgetMb:void 0;return D(e,t)}),Y=w(()=>[`ref ${z.value}`,B.value,G.value?`refreshed ${G.value}`:``,q.value?`disk ${q.value}`:``].filter(Boolean).join(` · `)),X=w(()=>[V.value?`refreshed ${V.value}`:``,K.value?.at?`disk measured ${K.value.at}`:``].filter(Boolean).join(` · `)),Z=w(()=>{let e=K.value,t=J.value;if(!e||!t)return``;let n=t.room.hardlink===null?`room not projected (checkout not measured)`:`room for ${t.room.hardlink} more ${t.room.hardlink===1?`tree`:`trees`}`;return[`${E(t.freeKiB)} free${t.capped?` under the ${E(t.capacityKiB)} cap`:``}`,n,`measured ${W(e.at)}`].join(` · `)}),Q=w(()=>k(o.record)),$=w(()=>{let e=o.runs.map(e=>{let t=re(e.label||H(e.id)),n=N(Q.value,e.threadKey),r=ie(e);return{key:`run:${e.id}`,run:e,agent:t.agent,text:t.snippet??t.scope,who:r.identity,surface:le[r.kind]??r.kind,threadUrl:oe(e),href:fe(e),elapsed:ue(e,o.now),binding:n,treeKiB:n?M(K.value,n.threadKey):null}}),t=new Set(o.runs.map(e=>e.threadKey));for(let n of Q.value)n.evicted||t.has(n.threadKey)||e.push({key:`idle:${n.threadKey}`,text:`idle`,who:``,surface:``,threadUrl:``,href:``,elapsed:``,binding:n,treeKiB:M(K.value,n.threadKey)});return e}),Ke=w(()=>$.value.filter(e=>!e.run).length);return(i,o)=>{let x=l(`RouterLink`);return d(),n(`li`,{class:`resident border-b border-muted first:border-t`,"data-slug":v.value,"data-running":e.runs.length},[f(`details`,{class:`group/fold`,open:p.value,onToggle:m},[f(`summary`,he,[o[2]||=f(`span`,{class:`chev w-3 select-none self-center text-xs text-dimmed transition-transform group-open/fold:rotate-90 motion-reduce:transition-none`,"aria-hidden":`true`},`❯`,-1),f(`span`,ge,[t(U,{tone:T.value,label:C.value.state,tip:C.value.state},null,8,[`tone`,`label`,`tip`])]),f(`span`,_e,a(b.value),1),f(`span`,ve,a(C.value.state),1),e.runs.length>0?(d(),n(`span`,ye,a(e.runs.length)+` running`,1)):c(``,!0),f(`span`,{class:`facts font-mono text-xs text-muted max-sm:basis-full max-sm:pl-[1.9rem] sm:ml-2`,title:X.value||void 0},a(Y.value),9,be),A.value?(d(),S(x,{key:1,class:`detail ml-auto shrink-0 text-xs text-muted no-underline hover:text-highlighted hover:underline`,to:A.value,onClick:o[0]||=y(()=>{},[`stop`])},{default:u(()=>[...o[1]||=[g(`detail ↗`,-1)]]),_:1},8,[`to`])):c(``,!0),C.value.reason?(d(),n(`span`,xe,a(C.value.reason),1)):c(``,!0)]),f(`div`,Se,[$.value.length>0?(d(),n(`ul`,Ce,[(d(!0),n(_,null,r($.value,t=>(d(),n(`li`,{key:t.key,class:s([`grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-3 gap-y-1 py-2 sm:grid-cols-[auto_minmax(0,1fr)_minmax(14rem,22rem)_auto]`,t.run?`run`:`idle`]),"data-run-id":t.run?.id,"data-thread":t.run?void 0:t.binding?.threadKey},[f(`span`,Te,[t.run?(d(),S(U,{key:0,tone:`green`,label:h(ae)(t.run),tip:h(ce)(t.run),pulse:``},null,8,[`label`,`tip`])):(d(),S(U,{key:1,tone:`grey`,label:`idle`,tip:`no run is using this tree`}))]),f(`span`,Ee,[f(`span`,De,[t.agent?(d(),n(`span`,{key:0,class:s([`agent shrink-0 rounded border px-1.5 font-mono text-[0.65rem] font-medium uppercase tracking-wider`,h(de)[h(se)(t.agent)]])},a(t.agent),3)):c(``,!0),f(`span`,{class:s([`text min-w-0 truncate text-[0.8125rem]`,t.run?`text-highlighted`:`text-dimmed`]),title:t.run?t.text:void 0},a(t.text),11,Oe)]),t.run?(d(),n(`span`,ke,[t.who?(d(),n(_,{key:0},[g(`by `+a(t.who),1)],64)):c(``,!0),t.who&&(t.threadUrl||t.surface)?(d(),n(_,{key:1},[g(a(` · `))],64)):c(``,!0),t.threadUrl?(d(),n(`a`,{key:2,class:`text-muted no-underline hover:text-highlighted hover:underline`,href:t.threadUrl,target:`_blank`,rel:`noopener noreferrer`},a(t.surface)+` thread ↗`,9,Ae)):t.surface?(d(),n(_,{key:3},[g(`via `+a(t.surface),1)],64)):c(``,!0)])):t.binding?(d(),n(`span`,je,`last used `+a(W(t.binding.lastAttachAt)),1)):c(``,!0)]),f(`span`,Me,[f(`span`,{class:`tree block truncate text-toned`,title:t.binding&&t.binding.ref||void 0},[t.binding?(d(),n(_,{key:0},[g(a(t.binding.ref||`?`),1),t.binding.sha?(d(),n(_,{key:0},[o[3]||=g(a(` `),-1),o[4]||=f(`span`,{class:`text-dimmed`},`@`,-1),o[5]||=g(a(` `)+` `,-1),R(t.binding.sha)?(d(),n(`a`,{key:0,class:`text-highlighted no-underline hover:underline`,href:R(t.binding.sha)},a(t.binding.sha.slice(0,8)),9,Pe)):(d(),n(`span`,Fe,a(t.binding.sha.slice(0,8)),1))],64)):c(``,!0)],64)):(d(),n(`span`,Ie,`no worktree bound yet`))],8,Ne),t.binding?(d(),n(`span`,Le,[f(`span`,Re,a(t.binding.user||`—`),1),o[6]||=g(` `+a(` · `),-1),f(`span`,ze,a(t.binding.deps||`—`),1),o[7]||=g(` `+a(` · `),-1),f(`span`,{class:s([`size`,t.treeKiB===null?``:`text-muted`]),title:t.treeKiB===null?`size not measured yet`:`on disk`},a(t.treeKiB===null?`—`:h(E)(t.treeKiB)),11,Be)])):c(``,!0)]),f(`span`,Ve,[t.run?(d(),n(`span`,{key:0,class:`elapsed whitespace-nowrap font-mono text-xs tabular-nums text-ok`,title:`running for · started ${h(ne)(t.run.startedAt,e.now)}`},a(t.elapsed),9,He)):c(``,!0),t.run?(d(),S(x,{key:1,class:`open text-xs text-muted no-underline hover:text-highlighted hover:underline`,to:t.href,"aria-label":`open run ${t.run.label||h(H)(t.run.id)}`},{default:u(()=>[...o[8]||=[g(`open ↗`,-1)]]),_:1},8,[`to`,`aria-label`])):c(``,!0)])],10,we))),128))])):(d(),n(`p`,Ue,`nothing on this resident — no run, no worktree`)),f(`p`,{class:`disk mt-2 font-mono text-xs text-dimmed`,"data-idle":Ke.value},[Z.value?(d(),n(_,{key:0},[g(a(Z.value),1)],64)):(d(),n(`span`,Ge,`disk not measured yet`))],8,We)])],40,me)],8,pe)}}}),G={class:`conn flex items-center gap-1.5`},K={id:`state`,class:`text-xs text-muted`},q={class:`mb-2 text-xs text-muted`},J={id:`running`,class:`font-mono tabular-nums`},Y={id:`residents`,class:`m-0 list-none p-0`},X={key:1,class:`px-2 py-1.5 text-muted`},Z=`Resident repos`,Q=o({__name:`ResidentsIndexPage`,setup(o){let s=v(`residents`),c=C({cap:s?.cap,count:s?.count,residents:s?.residents??[],runs:new Map((s?.runs??[]).map(e=>[e.id,e]))}),l=V(s?.now),y=x({tone:`amber`,text:`connecting…`}),E=typeof window<`u`?new URLSearchParams(window.location.search).get(`open`):null,D=w(()=>c.residents.map((e,t)=>{let n=e,r=P(n);return{key:`${r||`?`}-${t}`,record:n,slug:r,runs:L(c.runs.values(),r)}})),O=w(()=>F(c.cap)||`?`),k=w(()=>F(c.count)||String(D.value.length)),j=w(()=>D.value.reduce((e,t)=>e+t.runs.length,0));i([j,()=>c.residents],([e,t])=>{b.setTitle((e>0?`(${e}) `:``)+Z),b.setFavicon(z[A(t)])},{immediate:!0});let M=B(),N=null;return p(()=>{N=M(`/residents?stream=1`);let e=!1;N.onopen=()=>{if(e){b.reload();return}e=!0,y.value={tone:`green`,text:`live`}},N.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}R(c,t)},N.onerror=()=>{N&&N.readyState===2?y.value={tone:`red`,text:`disconnected`}:y.value={tone:`amber`,text:`connecting…`}}}),m(()=>{N?.close()}),(i,o)=>{let s=T;return d(),S(e,{title:Z,nav:`residents`},{status:u(()=>[t(s,{text:`runs arrive from the registry feed; the listing is re-read when a run attaches or ends`},{default:u(()=>[f(`span`,G,[t(U,{tone:y.value.tone,label:y.value.text},null,8,[`tone`,`label`]),f(`span`,K,a(y.value.text),1)])]),_:1})]),default:u(()=>[D.value.length>0?(d(),n(_,{key:0},[f(`p`,q,[g(a(`${k.value}/${O.value} resident slots in use · `),1),f(`span`,J,a(j.value)+` running`,1)]),f(`ul`,Y,[(d(!0),n(_,null,r(D.value,e=>(d(),S(W,{key:e.key,record:e.record,runs:e.runs,now:h(l),open:h(E)!==null&&h(E)===e.slug},null,8,[`record`,`runs`,`now`,`open`]))),128))])],64)):(d(),n(`p`,X,[g(` No repos onboarded (0/`+a(O.value)+`). Onboard one from chat: `,1),o[0]||=f(`code`,{class:`rounded bg-elevated px-1.5 py-0.5`},`repo onboard <owner/name>`,-1),o[1]||=g(`. `,-1)]))]),_:1})}}});export{Q as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-XRrc0hhm.js","assets/AppShell-DPJVhUGP.js","assets/browser-CCImen5O.js","assets/main-B32N1vUh.js","assets/main-DPB0UO1-.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{D as e,M as t,b as n,d as r,f as i,t as a,v as o,y as s}from"./AppShell-DPJVhUGP.js";import{An as c,Br as l,Cn as u,Cr as d,Ct as f,E as p,Gr as m,I as h,Ii as g,K as _,L as v,Li as y,Mn as b,Oi as x,Pi as S,S as C,Sn as w,Tr as ee,Vr as T,X as E,Xr as D,Zn as O,_ as k,_r as A,b as te,bn as j,dr as M,ft as ne,g as re,gt as ie,h as ae,hr as oe,ht as se,ir as ce,ji as N,kn as P,l as le,ln as F,lt as ue,nn as de,o as fe,qr as pe,r as me,rn as he,rr as I,rt as ge,sr as L,st as _e,t as ve,wi as ye,wr as R,x as z,xi as B,xn as V,y as H,yi as be,yn as U,yr as xe,z as W}from"./browser-CCImen5O.js";import{t as Se}from"./Tooltip-Dfot16IA.js";import{i as Ce,n as we,r as Te,t as Ee}from"./PendingTurnRow-BqY-EaZR.js";import{b as De,t as Oe,x as ke}from"./main-B32N1vUh.js";import{t as Ae}from"./eventSource-Cv0AFlMi.js";import{t as je}from"./wallClock-x0hjr0J_.js";import{t as Me}from"./indexFormat-B-pd4r7Y.js";import{E as Ne,F as Pe,K as Fe,j as Ie}from"./indexRow-BGjjLnN5.js";import{i as Le,n as Re,r as ze}from"./format-BldUwl_R.js";import{a as Be,i as Ve,n as He,o as Ue,r as We,s as Ge,t as G}from"./RunFoldRow-BOWvSoIv.js";import{n as Ke,t as qe}from"./SlackMark-DB0MGiF5.js";import{C as Je,S as Ye,T as K,_ as Xe,a as Ze,b as Qe,c as $e,d as et,g as tt,h as nt,i as rt,l as it,n as at,o as ot,r as st,s as ct,u as lt,v as ut,x as dt,y as ft}from"./sseReplay-BsNQPLmJ.js";import{n as pt,t as mt}from"./durationTone-CVpX_yIk.js";import{t as ht}from"./NotFoundPage-CDjMfCcj.js";var gt=b({__name:`RovingFocusItem`,props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(t){let r=t,a=i(),l=e(),u=U(()=>r.tabStopId||l),d=U(()=>a.currentTabStopId.value===u.value),{getItems:f,CollectionItem:g}=p();M(()=>{r.focusable&&a.onFocusableItemAdd()}),oe(()=>{r.focusable&&a.onFocusableItemRemove()}),m(()=>r.focusable,(e,t)=>{e!==t&&(e?a.onFocusableItemAdd():a.onFocusableItemRemove())});function _(e){if(e.key===`Tab`&&e.shiftKey){a.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=s(e,a.orientation.value,a.dir.value);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||!r.allowShiftKey&&e.shiftKey)return;e.preventDefault();let i=[...f().map(e=>e.ref).filter(e=>e.dataset.disabled!==``)];if(t===`last`)i.reverse();else if(t===`prev`||t===`next`){t===`prev`&&i.reverse();let r=i.indexOf(e.currentTarget);i=a.loop.value?n(i,r+1):i.slice(r+1)}ce(()=>o(i))}}return(e,t)=>(A(),V(N(g),null,{default:D(()=>[c(N(h),{tabindex:d.value?0:-1,"data-orientation":N(a).orientation.value,"data-active":e.active?``:void 0,"data-disabled":e.focusable?void 0:``,as:e.as,"as-child":e.asChild,onMousedown:t[0]||=t=>{e.focusable?N(a).onItemFocus(u.value):t.preventDefault()},onFocus:t[1]||=e=>N(a).onItemFocus(u.value),onKeydown:_},{default:D(()=>[R(e.$slots,`default`)]),_:3},8,[`tabindex`,`data-orientation`,`data-active`,`data-disabled`,`as`,`as-child`])]),_:3}))}}),[q,_t]=_(`TabsRoot`),vt=b({__name:`TabsRoot`,props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:`horizontal`},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:`automatic`},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`update:modelValue`],setup(n,{emit:r}){let i=n,a=r,{orientation:o,unmountOnHide:s,dir:c}=x(i),l=t(c);W();let u=ie(i,`modelValue`,a,{defaultValue:i.defaultValue,passive:i.modelValue===void 0}),d=B(),f=ye(new Set);return _t({modelValue:u,changeModelValue:e=>{u.value=e},orientation:o,dir:l,unmountOnHide:s,activationMode:i.activationMode,baseId:e(void 0,`reka-tabs`),tabsList:d,contentIds:f,registerContent:e=>{f.value=new Set([...f.value,e])},unregisterContent:e=>{let t=new Set(f.value);t.delete(e),f.value=t}}),(e,t)=>(A(),V(N(h),{dir:N(l),"data-orientation":N(o),"as-child":e.asChild,as:e.as},{default:D(()=>[R(e.$slots,`default`,{modelValue:N(u)})]),_:3},8,[`dir`,`data-orientation`,`as-child`,`as`]))}});function J(e,t){return`${e}-trigger-${t}`}function yt(e,t){return`${e}-content-${t}`}var bt=b({__name:`TabsContent`,props:{value:{type:[String,Number],required:!0},forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{forwardRef:n}=W(),r=q(),i=U(()=>J(r.baseId,t.value)),a=U(()=>yt(r.baseId,t.value)),o=U(()=>t.value===r.modelValue.value),s=B(o.value);return M(()=>{r.registerContent(t.value),requestAnimationFrame(()=>{s.value=!1})}),L(()=>{r.unregisterContent(t.value)}),(e,t)=>(A(),V(N(v),{present:e.forceMount||o.value,"force-mount":``},{default:D(({present:t})=>[c(N(h),{id:a.value,ref:N(n),"as-child":e.asChild,as:e.as,role:`tabpanel`,"data-state":o.value?`active`:`inactive`,"data-orientation":N(r).orientation.value,"aria-labelledby":i.value,hidden:!t,tabindex:`0`,style:g({animationDuration:s.value?`0s`:void 0})},{default:D(()=>[!N(r).unmountOnHide.value||t?R(e.$slots,`default`,{key:0}):w(`v-if`,!0)]),_:2},1032,[`id`,`as-child`,`as`,`data-state`,`data-orientation`,`aria-labelledby`,`hidden`,`style`])]),_:3},8,[`present`]))}}),xt=b({__name:`TabsIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){let n=e,r=q();t({updateIndicatorStyle:s}),W();let i=ne(),a=B({size:null,thickness:null,position:null}),o=B([]);m(()=>[r.modelValue.value,r?.dir.value],()=>{s()},{immediate:!0,flush:`post`}),pe(()=>{o.value=Array.from(r.tabsList.value?.querySelectorAll(`[role="tab"]`)||[])}),se(U(()=>[r.tabsList.value,...o.value]),s);function s(){let e=r.tabsList.value?.querySelector(`[role="tab"][data-state="active"]`);e&&(r.orientation.value===`horizontal`?a.value={size:e.offsetWidth,thickness:e.offsetHeight,position:e.offsetLeft}:a.value={size:e.offsetHeight,thickness:e.offsetWidth,position:e.offsetTop})}return(e,t)=>N(i)&&typeof a.value.size==`number`?(A(),V(N(h),I({key:0},n,{style:{"--reka-tabs-indicator-size":`${a.value.size}px`,"--reka-tabs-indicator-thickness":`${a.value.thickness}px`,"--reka-tabs-indicator-position":`${a.value.position}px`}}),{default:D(()=>[R(e.$slots,`default`)]),_:3},16,[`style`])):w(`v-if`,!0)}}),St=b({__name:`TabsList`,props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{loop:t}=x(e),{forwardRef:n,currentElement:i}=W(),a=q();return a.tabsList=i,(e,i)=>(A(),V(N(r),{"as-child":``,orientation:N(a).orientation.value,dir:N(a).dir.value,loop:N(t)},{default:D(()=>[c(N(h),{ref:N(n),role:`tablist`,"as-child":e.asChild,as:e.as,"aria-orientation":N(a).orientation.value},{default:D(()=>[R(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`aria-orientation`])]),_:3},8,[`orientation`,`dir`,`loop`]))}}),Ct=b({__name:`TabsTrigger`,props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,{forwardRef:n}=W(),r=q(),i=U(()=>J(r.baseId,t.value)),a=U(()=>r.contentIds.value.has(t.value)?yt(r.baseId,t.value):void 0),o=U(()=>t.value===r.modelValue.value);return(e,t)=>(A(),V(N(gt),{"as-child":``,focusable:!e.disabled,active:o.value},{default:D(()=>[c(N(h),{id:i.value,ref:N(n),role:`tab`,type:e.as===`button`?`button`:void 0,as:e.as,"as-child":e.asChild,"aria-selected":o.value?`true`:`false`,"aria-controls":a.value,"data-state":o.value?`active`:`inactive`,disabled:e.disabled,"data-disabled":e.disabled?``:void 0,"data-orientation":N(r).orientation.value,onMousedown:t[0]||=he(t=>{!e.disabled&&t.ctrlKey===!1?N(r).changeModelValue(e.value):t.preventDefault()},[`left`]),onKeydown:t[1]||=de(t=>N(r).changeModelValue(e.value),[`enter`,`space`]),onFocus:t[2]||=()=>{let t=N(r).activationMode!==`manual`;!o.value&&!e.disabled&&t&&N(r).changeModelValue(e.value)}},{default:D(()=>[R(e.$slots,`default`)]),_:3},8,[`id`,`type`,`as`,`as-child`,`aria-selected`,`aria-controls`,`data-state`,`disabled`,`data-disabled`,`data-orientation`])]),_:3},8,[`focusable`,`active`]))}}),wt=[`data-expanded`,`data-overflowing`],Tt={key:0,class:`fade pointer-events-none absolute inset-x-0 bottom-6 h-10`},Et={key:1,class:`mt-1 flex justify-start`},Y=[`aria-expanded`],Dt=Ke(b({__name:`ExpandableText`,props:{lines:{default:5}},setup(e){let t=e,n=B(!1),r=B(!1),i=B(null),a=`expandable-${Math.random().toString(36).slice(2,8)}`;function o(){let e=i.value;e&&!n.value&&(r.value=e.scrollHeight>e.clientHeight+1)}let s=null;M(()=>{o(),typeof ResizeObserver<`u`&&i.value&&(s=new ResizeObserver(()=>o()),s.observe(i.value))}),L(()=>s?.disconnect()),m(n,e=>{e||Promise.resolve().then(o)});function c(){n.value=!n.value}function l(e){!n.value&&r.value&&(e.target?.closest?.(`a`)||(n.value=!0))}return(e,o)=>(A(),u(`div`,{class:S([`expandable group relative`,!n.value&&r.value?`cursor-pointer`:``]),"data-expanded":n.value?`1`:`0`,"data-overflowing":r.value?`1`:`0`,onClick:l},[j(`div`,{id:a,ref_key:`body`,ref:i,class:S([`body`,n.value?``:`clamped`]),style:g(n.value?void 0:{"--expandable-lines":String(t.lines)})},[R(e.$slots,`default`,{},void 0,!0)],6),!n.value&&r.value?(A(),u(`div`,Tt)):w(``,!0),r.value||n.value?(A(),u(`div`,Et,[j(`button`,{type:`button`,class:`more cursor-pointer text-xs text-dimmed group-hover:text-primary hover:underline focus-visible:outline-2 focus-visible:outline-primary`,"aria-expanded":n.value?`true`:`false`,"aria-controls":a,onClick:he(c,[`stop`])},y(n.value?`Show less`:`Show more`),9,Y)])):w(``,!0)],10,wt))}}),[[`__scopeId`,`data-v-ce3bfa89`]]),Ot=[`id`],kt={class:`what`},X={key:0,class:`text-dimmed`},At={key:1,class:`dur tabular-nums text-dimmed`},jt=[`title`],Mt=b({__name:`SpanRow`,props:{item:{}},setup(e){return(t,n)=>(A(),u(`li`,{id:`span-${e.item.spanId}`,class:`span flex items-baseline gap-2 py-0.5 pr-(--sb-gutter) font-mono text-xs text-muted`},[j(`span`,{class:S([`glyph select-none`,e.item.status===`error`?`text-bad`:`text-dimmed`])},y(e.item.open?`◌`:e.item.status===`error`?`✗`:`◷`),3),j(`span`,kt,y(e.item.text),1),e.item.open?(A(),u(`span`,X,`…`)):e.item.durationMs===void 0?w(``,!0):(A(),u(`span`,At,y(N(Fe)(e.item.durationMs,`precise`)),1)),e.item.at===void 0?w(``,!0):(A(),u(`span`,{key:2,class:`ts ml-auto select-none text-dimmed`,title:N(Le)(e.item.at)},y(N(Re)(e.item.at)),9,jt))],8,Ot))}}),Z=[`data-position`],Q={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-ok`},Nt=[`href`],Pt={key:1,class:`caption font-normal normal-case tracking-normal text-dimmed`},Ft=[`title`],It=b({__name:`ReplyBlock`,props:{text:{},caption:{},when:{},whenTitle:{},position:{},files:{}},setup(e){return(t,n)=>(A(),u(`section`,{id:`reply`,class:S([`block rounded-lg border border-ok/40 bg-(--ui-bg-muted) px-(--sb-gutter) py-3`,e.position===`first`?`mb-4`:`mt-6`]),"data-position":e.position},[j(`h2`,Q,[n[0]||=j(`span`,null,`Reply`,-1),e.caption.href?(A(),u(`a`,{key:0,class:`caption font-normal normal-case tracking-normal text-dimmed no-underline hover:text-primary hover:underline`,href:e.caption.href,target:`_blank`,rel:`noopener noreferrer`},y(e.caption.text),9,Nt)):(A(),u(`span`,Pt,y(e.caption.text),1)),j(`span`,{class:`ts ml-auto select-none text-xs font-normal normal-case tracking-normal text-dimmed`,title:e.whenTitle},y(e.when),9,Ft)]),c(K,{text:e.text},null,8,[`text`]),e.files.length>0?(A(),V(st,{key:0,files:e.files},null,8,[`files`])):w(``,!0)],10,Z))}}),Lt={id:`units`,class:`block mb-4 rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-3`},Rt={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},zt={class:`count font-normal normal-case tracking-normal text-dimmed`},Bt={class:`m-0 list-none p-0`},Vt=[`data-unit`],Ht=[`href`],Ut=b({__name:`RunUnitsBlock`,props:{units:{}},setup(e){let t={merged:`border-ok/30 text-ok`,merge_ready:`border-ok/30 text-ok`,done:`border-ok/30 text-ok`};function n(e){return e.ending?Ge(e.ending.kind):e.idle?`idle · ${Ge(e.idle.why)}`:e.threads.coding===void 0?`not started`:`round ${e.rounds.at(-1)?.index??0} · ${e.rounds.at(-1)?.agent??`in flight`}`}return(r,i)=>{let a=ee(`RouterLink`);return A(),u(`section`,Lt,[j(`h2`,Rt,[i[0]||=j(`span`,null,`Units`,-1),j(`span`,zt,`· `+y(e.units.length)+` unit`+y(e.units.length===1?``:`s`)+` — each opens to its runs in round order`,1)]),j(`ol`,Bt,[(A(!0),u(F,null,d(e.units,e=>(A(),u(`li`,{key:e.unit,class:`unit flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5 border-t border-default py-1.5 first:border-t-0`,"data-unit":e.unit},[c(a,{class:`key shrink-0 rounded border border-accented px-1.5 font-mono text-[0.72rem] font-medium text-toned no-underline hover:border-primary hover:text-primary`,to:`/runs/unit/${encodeURIComponent(e.unit)}`},{default:D(()=>[P(y(e.id),1)]),_:2},1032,[`to`]),c(a,{class:`title min-w-0 flex-1 truncate text-sm text-highlighted no-underline hover:underline`,to:`/runs/unit/${encodeURIComponent(e.unit)}`},{default:D(()=>[P(y(e.title??e.branch),1)]),_:2},1032,[`to`]),j(`span`,{class:S([`standing shrink-0 rounded border px-1.5 font-mono text-[0.7rem]`,t[e.ending?.kind??``]??`border-accented text-muted`])},y(n(e)),3),e.pr?(A(),u(`a`,{key:0,class:`prlink shrink-0 whitespace-nowrap font-mono text-xs text-primary no-underline hover:underline`,href:e.pr.url,target:`_blank`,rel:`noopener noreferrer`},[c(Ue,{class:`mr-1 align-[-0.125em]`}),P(`#`+y(e.pr.number),1)],8,Ht)):w(``,!0)],8,Vt))),128))])])}}}),Wt={id:`children`,class:`block mb-4 px-(--sb-gutter)`},Gt={class:`mb-1 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},Kt={class:`count font-normal normal-case tracking-normal text-dimmed`},qt={class:`m-0 list-none border-t border-muted p-0`},Jt=b({__name:`RunChildrenBlock`,props:{children:{},now:{}},setup(e){return(t,n)=>(A(),u(`section`,Wt,[j(`h2`,Gt,[n[0]||=j(`span`,null,`Spawned runs`,-1),j(`span`,Kt,`· `+y(e.children.length)+` run`+y(e.children.length===1?``:`s`)+`, in the order they started`,1)]),j(`ol`,qt,[(A(!0),u(F,null,d(e.children,t=>(A(),V(G,{key:t.id,run:t,now:e.now},null,8,[`run`,`now`]))),128))])]))}});function Yt(e){return e.description?.title?e.description.title:e.pr.repo&&e.pr.number!==void 0?`${e.pr.repo}#${e.pr.number}`:e.pr.repo??`PR review`}var Xt=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/,Zt=/^[0-9a-f]{7,40}$/;function Qt(e){if(!e.repo||!Xt.test(e.repo))return{};let t=`https://github.com/${e.repo}`,n={};return e.number!==void 0&&Number.isInteger(e.number)&&e.number>0&&(n.pr=`${t}/pull/${e.number}`,n.files=`${t}/pull/${e.number}/files`),e.headSha&&Zt.test(e.headSha)&&(n.commit=e.number!==void 0&&n.pr?`${t}/pull/${e.number}/commits/${e.headSha}`:`${t}/commit/${e.headSha}`),n}function $t(e){return e.find(e=>e.poweredBy===`meat`)??e.find(e=>e.poweredBy===`git`)??null}function en(e){return e===`meat`?`An abridged reading of the change: a model dropped what a reviewer need not read (style, imports, boilerplate) and kept the concepts`:`The complete change, base…head, as git reports it`}function tn(e){return`The recorded diff was cut at ${e.toLocaleString(`en-US`)} characters; open the full diff on GitHub for the rest`}function nn(e){return e===`meat`?`reading diff · meat`:`full diff · git`}function rn(e){let t=[];return e.origin===`parsed`&&!e.complete&&t.push(`read back from the PR body`),e.truncated&&t.push(`the body was cut before it was read`),t.length>0?t.join(`; `):void 0}var an=e=>typeof e==`object`&&!!e,$=e=>typeof e==`string`&&e!==``,on=e=>typeof e==`number`&&Number.isInteger(e)&&e>0;function sn(e){for(let t of e.split(/\n\s*\n/)){let e=t.split(`
|
|
3
|
-
`).map(e=>e.trim()).filter(e=>e!==``);if(!(e.length===0||e.every(e=>e.startsWith(`#`))))return e.join(`
|
|
4
|
-
`)}}function cn(e,t){let n=t.trim().toLowerCase(),r=[],i=!1,a=!1;for(let t of e.split(`
|
|
5
|
-
`)){/^\s*```/.test(t)&&(i=!i);let e=i?null:/^##\s+(.+?)\s*$/.exec(t);if(e){if(a)break;a=e[1].toLowerCase()===n;continue}a&&r.push(t)}let o=r.join(`
|
|
6
|
-
`).trim();return o===``?void 0:o}function ln(e,t){let n=t.trim().toLowerCase(),r=[],i=!1,a=!1;for(let t of e.split(`
|
|
7
|
-
`)){/^\s*```/.test(t)&&(i=!i);let e=t.trim();if(!i&&a&&e===`<details>`)break;let o=i?null:/^\*\*([^*]+?):?\*\*\s*(.*)$/.exec(e);if(o){let e=o[1].trim().toLowerCase(),t=[`why`,`where to look`,`feedback wanted`,`risk`,`verified`].includes(e);if(a&&t)break;if(e===n){a=!0,o[2]&&r.push(o[2]);continue}}a&&r.push(t)}let o=r.join(`
|
|
8
|
-
`).trim();return o===``?void 0:o}function un(e){if(!$(e.title)||e.origin!==`submitted`&&e.origin!==`parsed`)return;let t=typeof e.body==`string`?e.body:``,n=$(e.tldr)?e.tldr:sn(t),r=$(e.why)?e.why:ln(t,`Why`)??cn(t,`What & why`);return{title:e.title,...n===void 0?{}:{tldr:n},...r===void 0?{}:{why:r},origin:e.origin,complete:e.complete===!0,truncated:e.truncated===!0}}function dn(){let e=be({pr:{},readingDiffs:[],ready:!1});return{state:e,handle(t){if(!an(t))return;let n=t;if(n.type===`run_meta`)$(n.repo)&&(e.pr.repo=n.repo),on(n.pr)&&(e.pr.number=n.pr),typeof n.headSha==`string`&&Zt.test(n.headSha)&&(e.pr.headSha=n.headSha);else if(n.type===`review_artifact`&&n.artifact===`reading_diff`){if(!$(n.diff)||n.poweredBy!==`git`&&n.poweredBy!==`meat`)return;let t={poweredBy:n.poweredBy,baseRef:$(n.baseRef)?n.baseRef:`HEAD`,diff:n.diff,truncated:n.truncated===!0,...$(n.summary)?{summary:n.summary}:{}},r=e.readingDiffs.findIndex(e=>e.poweredBy===t.poweredBy);r>=0?e.readingDiffs.splice(r,1,t):e.readingDiffs.push(t),e.ready=!0}else if(n.type===`review_artifact`&&n.artifact===`pr_description`){let t=un(n);t&&(e.description=t)}}}}var fn=3e3,pn={fetch:(...e)=>globalThis.fetch(...e),delay:e=>new Promise(t=>setTimeout(t,e))};function mn(e,t,n={}){let{fetch:r,delay:i}={...pn,...n},a=be({state:{state:`absent`}}),o=!1,s=!1;async function c(t){let n=await r(`/api/review.abridge`,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`},body:JSON.stringify({id:e,...t?{force:!0}:{}})}),i=await n.json().catch(()=>null);if(!n.ok)throw Error(typeof i?.error==`string`?i.error:`HTTP ${n.status}`);return i??{}}async function l(){let n=!1,i;for(let a=0;a<50;a++){let a=`id=${encodeURIComponent(e)}${i===void 0?``:`&after-seq=${i}`}`,s=await r(`/api/runs.events?${a}`,{credentials:`same-origin`});if(o)return`disposed`;if(!s.ok)throw Error(`HTTP ${s.status}`);let c=await s.json();if(o)return`disposed`;for(let e of c.events??[]){t(e);let r=e;r.type===`review_artifact`&&r.artifact===`reading_diff`&&r.poweredBy===`meat`&&(n=!0)}if(typeof c.nextAfterSeq!=`number`)return n?`found`:`missing`;if(i!==void 0&&c.nextAfterSeq<=i)return`stuck`;i=c.nextAfterSeq}return`stuck`}async function u(e){try{let t=await c(e);for(let e=0;t.state===`running`;e++){if(e>=200){s=!1,a.state={state:`failed`,reason:`still running after the page stopped waiting; ask again later`};return}if(await i(fn),o)return;t=await c(!1)}if(o)return;if(t.state===`failed`)s=!0,a.state={state:`failed`,reason:typeof t.reason==`string`?t.reason:`unknown reason`};else if(t.state===`done`){let e=await l();if(e===`disposed`)return;s=!1,a.state=e===`found`?{state:`done`}:{state:`failed`,reason:e===`stuck`?`the run's record did not page to its end`:`the abridged diff did not appear on the run's record`}}else s=!1,a.state={state:`failed`,reason:`unexpected answer: ${String(t.state)}`}}catch(e){if(o)return;s=!1,a.state={state:`failed`,reason:e instanceof Error?e.message:String(e)}}}return{get state(){return a.state},start(){if(a.state.state===`running`||o)return;let e=a.state.state===`failed`&&s;a.state={state:`running`},u(e)},dispose(){o=!0}}}var hn={slots:{base:`font-medium inline-flex items-center`,label:`truncate`,leadingIcon:`shrink-0`,leadingAvatar:`shrink-0`,leadingAvatarSize:``,trailingIcon:`shrink-0`},variants:{fieldGroup:{horizontal:`not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]`,vertical:`not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]`},color:{primary:``,secondary:``,success:``,info:``,warning:``,error:``,neutral:``},variant:{solid:``,outline:``,soft:``,subtle:``},size:{xs:{base:`text-[8px]/3 px-1 py-0.5 gap-1 rounded-sm`,leadingIcon:`size-3`,leadingAvatarSize:`3xs`,trailingIcon:`size-3`},sm:{base:`text-[10px]/3 px-1.5 py-1 gap-1 rounded-sm`,leadingIcon:`size-3`,leadingAvatarSize:`3xs`,trailingIcon:`size-3`},md:{base:`text-xs px-2 py-1 gap-1 rounded-md`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`,trailingIcon:`size-4`},lg:{base:`text-sm px-2 py-1 gap-1.5 rounded-md`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`,trailingIcon:`size-5`},xl:{base:`text-base px-2.5 py-1 gap-1.5 rounded-md`,leadingIcon:`size-6`,leadingAvatarSize:`2xs`,trailingIcon:`size-6`}},square:{true:``}},compoundVariants:[{color:`primary`,variant:`solid`,class:`bg-primary text-inverted`},{color:`secondary`,variant:`solid`,class:`bg-secondary text-inverted`},{color:`success`,variant:`solid`,class:`bg-success text-inverted`},{color:`info`,variant:`solid`,class:`bg-info text-inverted`},{color:`warning`,variant:`solid`,class:`bg-warning text-inverted`},{color:`error`,variant:`solid`,class:`bg-error text-inverted`},{color:`primary`,variant:`outline`,class:`text-primary ring ring-inset ring-primary/50`},{color:`secondary`,variant:`outline`,class:`text-secondary ring ring-inset ring-secondary/50`},{color:`success`,variant:`outline`,class:`text-success ring ring-inset ring-success/50`},{color:`info`,variant:`outline`,class:`text-info ring ring-inset ring-info/50`},{color:`warning`,variant:`outline`,class:`text-warning ring ring-inset ring-warning/50`},{color:`error`,variant:`outline`,class:`text-error ring ring-inset ring-error/50`},{color:`primary`,variant:`soft`,class:`bg-primary/10 text-primary`},{color:`secondary`,variant:`soft`,class:`bg-secondary/10 text-secondary`},{color:`success`,variant:`soft`,class:`bg-success/10 text-success`},{color:`info`,variant:`soft`,class:`bg-info/10 text-info`},{color:`warning`,variant:`soft`,class:`bg-warning/10 text-warning`},{color:`error`,variant:`soft`,class:`bg-error/10 text-error`},{color:`primary`,variant:`subtle`,class:`bg-primary/10 text-primary ring ring-inset ring-primary/25`},{color:`secondary`,variant:`subtle`,class:`bg-secondary/10 text-secondary ring ring-inset ring-secondary/25`},{color:`success`,variant:`subtle`,class:`bg-success/10 text-success ring ring-inset ring-success/25`},{color:`info`,variant:`subtle`,class:`bg-info/10 text-info ring ring-inset ring-info/25`},{color:`warning`,variant:`subtle`,class:`bg-warning/10 text-warning ring ring-inset ring-warning/25`},{color:`error`,variant:`subtle`,class:`bg-error/10 text-error ring ring-inset ring-error/25`},{color:`neutral`,variant:`solid`,class:`text-inverted bg-inverted`},{color:`neutral`,variant:`outline`,class:`ring ring-inset ring-accented text-default bg-default`},{color:`neutral`,variant:`soft`,class:`text-default bg-elevated`},{color:`neutral`,variant:`subtle`,class:`ring ring-inset ring-accented text-default bg-elevated`},{size:`xs`,square:!0,class:`p-0.5`},{size:`sm`,square:!0,class:`p-1`},{size:`md`,square:!0,class:`p-1`},{size:`lg`,square:!0,class:`p-1`},{size:`xl`,square:!0,class:`p-1`}],defaultVariants:{color:`primary`,variant:`solid`,size:`md`}},gn={__name:`Badge`,props:{as:{type:null,required:!1,default:`span`},label:{type:[String,Number],required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},square:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1}},setup(e){let t=e,n=l(),r=C(`badge`,t),i=ge(),{orientation:a,size:o}=ae(t),{isLeading:s,isTrailing:c,leadingIconName:d,trailingIconName:f}=re(r),p=U(()=>te({extend:hn,...i.ui?.badge||{}})({color:r.color,variant:r.variant,size:o.value??r.size,square:r.square||!n.default&&!r.label,fieldGroup:a.value}));return(e,t)=>(A(),V(N(h),{as:N(r).as,"data-slot":`base`,class:S(p.value.base({class:[N(r).ui?.base,N(r).class]}))},{default:D(()=>[R(e.$slots,`leading`,{ui:p.value},()=>[N(s)&&N(d)?(A(),V(H,{key:0,name:N(d),"data-slot":`leadingIcon`,class:S(p.value.leadingIcon({class:N(r).ui?.leadingIcon}))},null,8,[`name`,`class`])):N(r).avatar?(A(),V(k,I({key:1,size:N(r).ui?.leadingAvatarSize||p.value.leadingAvatarSize()},N(r).avatar,{"data-slot":`leadingAvatar`,class:p.value.leadingAvatar({class:N(r).ui?.leadingAvatar})}),null,16,[`size`,`class`])):w(``,!0)]),R(e.$slots,`default`,{ui:p.value},()=>[N(r).label!==void 0&&N(r).label!==null?(A(),u(`span`,{key:0,"data-slot":`label`,class:S(p.value.label({class:N(r).ui?.label}))},y(N(r).label),3)):w(``,!0)]),R(e.$slots,`trailing`,{ui:p.value},()=>[N(c)&&N(f)?(A(),V(H,{key:0,name:N(f),"data-slot":`trailingIcon`,class:S(p.value.trailingIcon({class:N(r).ui?.trailingIcon}))},null,8,[`name`,`class`])):w(``,!0)])]),_:3},8,[`as`,`class`]))}},_n={slots:{root:`flex items-center gap-2`,list:`relative flex p-1 group`,indicator:`absolute transition-[translate,width] duration-200 ease-out motion-reduce:transition-none`,trigger:[`group relative inline-flex items-center min-w-0 data-[state=inactive]:text-muted hover:data-[state=inactive]:not-disabled:text-default font-medium rounded-md disabled:cursor-not-allowed disabled:opacity-75`,`transition-colors`],leadingIcon:`shrink-0`,leadingAvatar:`shrink-0`,leadingAvatarSize:``,label:`truncate`,trailingBadge:`shrink-0`,trailingBadgeSize:`sm`,content:`w-full rounded-md focus-visible:outline-3`},variants:{color:{primary:{content:`outline-primary/25`},secondary:{content:`outline-secondary/25`},success:{content:`outline-success/25`},info:{content:`outline-info/25`},warning:{content:`outline-warning/25`},error:{content:`outline-error/25`},neutral:{content:`outline-inverted/25`}},variant:{pill:{list:`bg-elevated rounded-lg`,trigger:[`grow`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:content-[''] in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:absolute in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:inset-0 in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:rounded-md in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:shadow-xs in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:-z-10 in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:isolate`],indicator:`rounded-md shadow-xs`},link:{list:`border-default`,indicator:`rounded-full`,trigger:`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:content-[''] in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:absolute in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:rounded-full`}},orientation:{horizontal:{root:`flex-col`,list:`w-full`,indicator:`left-0 w-(--reka-tabs-indicator-size) translate-x-(--reka-tabs-indicator-position)`,trigger:`justify-center`},vertical:{list:`flex-col`,indicator:`top-0 h-(--reka-tabs-indicator-size) translate-y-(--reka-tabs-indicator-position)`}},size:{xs:{trigger:`px-2 py-1 text-xs gap-1`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`},sm:{trigger:`px-2.5 py-1.5 text-xs gap-1.5`,leadingIcon:`size-4`,leadingAvatarSize:`3xs`},md:{trigger:`px-3 py-1.5 text-sm gap-1.5`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`},lg:{trigger:`px-3 py-2 text-sm gap-2`,leadingIcon:`size-5`,leadingAvatarSize:`2xs`},xl:{trigger:`px-3 py-2 text-base gap-2`,leadingIcon:`size-6`,leadingAvatarSize:`xs`}}},compoundVariants:[{orientation:`horizontal`,variant:`pill`,class:{indicator:`inset-y-1`}},{orientation:`horizontal`,variant:`link`,class:{list:`border-b -mb-px`,indicator:`-bottom-px h-px`,trigger:`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:inset-x-0 in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:-bottom-[calc(var(--spacing)+1px)] in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:h-px`}},{orientation:`vertical`,variant:`pill`,class:{indicator:`inset-x-1`,list:`items-center`,trigger:`w-full justify-center`}},{orientation:`vertical`,variant:`link`,class:{list:`border-s -ms-px`,indicator:`-start-px w-px`,trigger:`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:inset-y-0 in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:-start-[calc(var(--spacing)+1px)] in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:w-px`}},{color:`primary`,variant:`pill`,class:{indicator:`bg-primary`,trigger:[`data-[state=active]:text-inverted outline-primary/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:bg-primary`]}},{color:`secondary`,variant:`pill`,class:{indicator:`bg-secondary`,trigger:[`data-[state=active]:text-inverted outline-secondary/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:bg-secondary`]}},{color:`success`,variant:`pill`,class:{indicator:`bg-success`,trigger:[`data-[state=active]:text-inverted outline-success/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:bg-success`]}},{color:`info`,variant:`pill`,class:{indicator:`bg-info`,trigger:[`data-[state=active]:text-inverted outline-info/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:bg-info`]}},{color:`warning`,variant:`pill`,class:{indicator:`bg-warning`,trigger:[`data-[state=active]:text-inverted outline-warning/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:bg-warning`]}},{color:`error`,variant:`pill`,class:{indicator:`bg-error`,trigger:[`data-[state=active]:text-inverted outline-error/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:bg-error`]}},{color:`neutral`,variant:`pill`,class:{indicator:`bg-inverted`,trigger:[`data-[state=active]:text-inverted outline-inverted/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:before:bg-inverted`]}},{color:`primary`,variant:`link`,class:{indicator:`bg-primary`,trigger:[`data-[state=active]:text-primary outline-primary/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:bg-primary`]}},{color:`secondary`,variant:`link`,class:{indicator:`bg-secondary`,trigger:[`data-[state=active]:text-secondary outline-secondary/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:bg-secondary`]}},{color:`success`,variant:`link`,class:{indicator:`bg-success`,trigger:[`data-[state=active]:text-success outline-success/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:bg-success`]}},{color:`info`,variant:`link`,class:{indicator:`bg-info`,trigger:[`data-[state=active]:text-info outline-info/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:bg-info`]}},{color:`warning`,variant:`link`,class:{indicator:`bg-warning`,trigger:[`data-[state=active]:text-warning outline-warning/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:bg-warning`]}},{color:`error`,variant:`link`,class:{indicator:`bg-error`,trigger:[`data-[state=active]:text-error outline-error/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:bg-error`]}},{color:`neutral`,variant:`link`,class:{indicator:`bg-inverted`,trigger:[`data-[state=active]:text-highlighted outline-inverted/25 focus-visible:outline-3`,`in-[[data-slot=list]:not(:has([data-slot=indicator]))]:data-[state=active]:after:bg-inverted`]}}],defaultVariants:{color:`primary`,variant:`pill`,size:`md`}},vn={__name:`Tabs`,props:{as:{type:null,required:!1},items:{type:Array,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},orientation:{type:null,required:!1,default:`horizontal`},content:{type:Boolean,required:!1,default:!0},valueKey:{type:null,required:!1,default:`value`},labelKey:{type:null,required:!1,default:`label`},class:{type:null,required:!1},ui:{type:Object,required:!1},defaultValue:{type:[String,Number],required:!1,default:`0`},modelValue:{type:[String,Number],required:!1},activationMode:{type:String,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0}},emits:[`update:modelValue`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=l(),o=C(`tabs`,r),s=ge(),p=z(f(o,`as`,`unmountOnHide`),i),m=U(()=>te({extend:_n,...s.ui?.tabs||{}})({color:o.color,variant:o.variant,size:o.size,orientation:o.orientation})),h=B([]);function g(e,t){h.value[e]=t}return t({triggersRef:h}),(e,t)=>(A(),V(N(vt),I(N(p),{"model-value":N(o).modelValue,"default-value":N(o).defaultValue,orientation:N(o).orientation,"activation-mode":N(o).activationMode,"data-slot":`root`,class:m.value.root({class:[N(o).ui?.root,N(o).class]})}),{default:D(()=>[c(N(St),{"data-slot":`list`,class:S(m.value.list({class:N(o).ui?.list}))},{default:D(()=>[c(N(xt),{"data-slot":`indicator`,class:S(m.value.indicator({class:N(o).ui?.indicator}))},null,8,[`class`]),R(e.$slots,`list-leading`),(A(!0),u(F,null,d(N(o).items,(t,n)=>(A(),V(N(Ct),{key:N(E)(t,N(o).valueKey)??n,ref_for:!0,ref:e=>g(n,e),value:N(E)(t,N(o).valueKey)??String(n),disabled:t.disabled,"data-slot":`trigger`,class:S(m.value.trigger({class:[N(o).ui?.trigger,t.ui?.trigger]}))},{default:D(()=>[R(e.$slots,`leading`,{item:t,index:n,ui:m.value},()=>[t.icon?(A(),V(H,{key:0,name:t.icon,"data-slot":`leadingIcon`,class:S(m.value.leadingIcon({class:[N(o).ui?.leadingIcon,t.ui?.leadingIcon]}))},null,8,[`name`,`class`])):t.avatar?(A(),V(k,I({key:1,size:t.ui?.leadingAvatarSize||N(o).ui?.leadingAvatarSize||m.value.leadingAvatarSize()},{ref_for:!0},t.avatar,{"data-slot":`leadingAvatar`,class:m.value.leadingAvatar({class:[N(o).ui?.leadingAvatar,t.ui?.leadingAvatar]})}),null,16,[`size`,`class`])):w(``,!0)]),N(E)(t,N(o).labelKey)||a.default?(A(),u(`span`,{key:0,"data-slot":`label`,class:S(m.value.label({class:[N(o).ui?.label,t.ui?.label]}))},[R(e.$slots,`default`,{item:t,index:n},()=>[P(y(N(E)(t,N(o).labelKey)),1)])],2)):w(``,!0),R(e.$slots,`trailing`,{item:t,index:n,ui:m.value},()=>[t.badge||t.badge===0?(A(),V(gn,I({key:0,color:`neutral`,variant:`outline`,size:t.ui?.trailingBadgeSize||N(o).ui?.trailingBadgeSize||m.value.trailingBadgeSize()},{ref_for:!0},typeof t.badge==`string`||typeof t.badge==`number`?{label:t.badge}:t.badge,{"data-slot":`trailingBadge`,class:m.value.trailingBadge({class:[N(o).ui?.trailingBadge,t.ui?.trailingBadge]})}),null,16,[`size`,`class`])):w(``,!0)])]),_:2},1032,[`value`,`disabled`,`class`]))),128)),R(e.$slots,`list-trailing`)]),_:3},8,[`class`]),N(o).content?(A(!0),u(F,{key:0},d(N(o).items,(t,n)=>(A(),V(N(bt),{key:N(E)(t,N(o).valueKey)??n,value:N(E)(t,N(o).valueKey)??String(n),"data-slot":`content`,class:S(m.value.content({class:[N(o).ui?.content,t.ui?.content,t.class]}))},{default:D(()=>[R(e.$slots,t.slot||`content`,{item:t,index:n,ui:m.value},()=>[P(y(t.content),1)])]),_:2},1032,[`value`,`class`]))),128)):w(``,!0)]),_:3},16,[`model-value`,`default-value`,`orientation`,`activation-mode`,`class`]))}},yn;function bn(){return yn??=Oe(()=>import(`./dist-XRrc0hhm.js`),__vite__mapDeps([0,1,2,3,4])),yn}var xn={key:0,class:`overflow-x-auto rounded-lg border border-(--ui-border) p-3 font-mono text-xs whitespace-pre text-(--ui-text)`,"data-testid":`diff-raw`},Sn=b({__name:`FileDiffs`,props:{diff:{},theme:{},diffStyle:{}},setup(e){let t=e,n=B(null),r=B(!1),i=[],a=0;function o(){for(let e of i)try{e.cleanUp()}catch{}i=[],n.value&&(n.value.innerHTML=``)}async function s(){let e=++a;r.value=!1;try{let{FileDiff:r,parsePatchFiles:s}=await bn();if(e!==a||!n.value)return;o();let c=s(t.diff).flatMap(e=>e.files);for(let e of c){let a=document.createElement(`diffs-container`);a.dataset.file=e.name,n.value.appendChild(a);let o=new r({themeType:t.theme,diffStyle:t.diffStyle??`unified`});o.render({fileDiff:e,fileContainer:a}),i.push(o)}}catch{e===a&&(r.value=!0)}}return M(s),m(()=>t.diff,s),m(()=>t.theme,s),m(()=>t.diffStyle,s),oe(()=>{a++,o()}),(t,i)=>r.value?(A(),u(`pre`,xn,y(e.diff),1)):(A(),u(`div`,{key:1,ref_key:`container`,ref:n,class:`space-y-4`,"data-testid":`file-diffs`},null,512))}});async function Cn(e){let{parsePatchFiles:t}=await bn(),n=t(e).flatMap(e=>e.files).map(e=>({path:e.name,additions:e.hunks.reduce((e,t)=>e+t.additionLines,0),deletions:e.hunks.reduce((e,t)=>e+t.deletionLines,0)}));return{files:n,additions:n.reduce((e,t)=>e+t.additions,0),deletions:n.reduce((e,t)=>e+t.deletions,0)}}function wn(e,t){if(e.length<=t)return e;let n=Math.max(1,t-1),r=Math.ceil(n/2),i=Math.floor(n/2);return`${e.slice(0,r)}…${e.slice(e.length-i)}`}var Tn={dockerfile:`docker`,makefile:`makefile`,"go.mod":`go`,"go.sum":`go`,".gitignore":`gitignore`,".dockerignore":`dockerignore`},En={ts:`typescript`,tsx:`tsx`,js:`javascript`,jsx:`jsx`,mjs:`javascript`,cjs:`javascript`,vue:`vue`,svelte:`svelte`,py:`python`,rb:`ruby`,go:`go`,rs:`rust`,java:`java`,kt:`kotlin`,swift:`swift`,c:`c`,h:`c`,cpp:`cpp`,cc:`cpp`,hpp:`cpp`,cs:`csharp`,php:`php`,scala:`scala`,ex:`elixir`,exs:`elixir`,json:`json`,jsonc:`json`,yaml:`yaml`,yml:`yaml`,toml:`toml`,xml:`xml`,html:`html`,css:`css`,scss:`scss`,sass:`sass`,less:`less`,md:`markdown`,mdx:`mdx`,sh:`bash`,bash:`bash`,zsh:`zsh`,sql:`sql`,tf:`terraform`,hcl:`hcl`,dockerfile:`docker`};function Dn(e){let t=(e.split(`/`).pop()||e).toLowerCase(),n=Tn[t];if(n)return n;let r=t.lastIndexOf(`.`);return r===-1?`text`:En[t.slice(r+1)]??`text`}var On={javascript:`i-simple-icons-javascript`,typescript:`i-simple-icons-typescript`,vue:`i-simple-icons-vuedotjs`,jsx:`i-simple-icons-react`,tsx:`i-simple-icons-react`,svelte:`i-simple-icons-svelte`,html:`i-simple-icons-html5`,css:`i-simple-icons-css`,scss:`i-simple-icons-sass`,sass:`i-simple-icons-sass`,less:`i-simple-icons-less`,python:`i-simple-icons-python`,go:`i-simple-icons-go`,rust:`i-simple-icons-rust`,java:`i-simple-icons-openjdk`,c:`i-simple-icons-c`,cpp:`i-simple-icons-cplusplus`,csharp:`i-simple-icons-csharp`,php:`i-simple-icons-php`,ruby:`i-simple-icons-ruby`,elixir:`i-simple-icons-elixir`,scala:`i-simple-icons-scala`,swift:`i-simple-icons-swift`,kotlin:`i-simple-icons-kotlin`,json:`i-simple-icons-json`,yaml:`i-simple-icons-yaml`,toml:`i-simple-icons-toml`,xml:`i-simple-icons-xml`,sql:`i-lucide-database`,markdown:`i-simple-icons-markdown`,mdx:`i-simple-icons-mdx`,bash:`i-simple-icons-gnubash`,zsh:`i-simple-icons-gnubash`,docker:`i-simple-icons-docker`,dockerignore:`i-simple-icons-docker`,terraform:`i-simple-icons-terraform`,hcl:`i-simple-icons-terraform`,makefile:`i-lucide-hammer`,gitignore:`i-simple-icons-git`,text:`i-lucide-file-text`};function kn(e){return On[e]??On.text}function An(e){return kn(Dn(e))}var jn={key:0,class:`flex items-center gap-2 p-4 text-sm text-(--ui-text-muted) sm:p-5`,"data-testid":`files-loading`},Mn={key:1,class:`p-4 text-sm text-(--ui-text-muted) sm:p-5`,"data-testid":`no-files`},Nn={class:`shrink-0 border-b border-(--ui-border) @2xl:w-72 @2xl:border-b-0 @2xl:border-r`,"data-testid":`file-list`},Pn={class:`@2xl:sticky @2xl:top-0 @2xl:max-h-[calc(100dvh-11rem)] @2xl:overflow-y-auto @2xl:py-3`},Fn=[`aria-expanded`],In={class:`ml-auto tabular-nums`,"data-testid":`pr-totals`},Ln={class:`text-(--ui-success)`},Rn={class:`text-(--ui-error)`},zn={key:1,class:`flex items-center justify-between gap-2 px-3 pb-2 text-xs text-(--ui-text-dimmed)`},Bn={"data-testid":`file-count`},Vn={class:`tabular-nums`,"data-testid":`pr-totals`},Hn={class:`text-(--ui-success)`},Un={class:`text-(--ui-error)`},Wn=[`title`,`aria-current`,`onClick`],Gn={class:`min-w-0 flex-1 whitespace-nowrap`},Kn={class:`shrink-0 text-[11px] tabular-nums`},qn={class:`text-(--ui-success)`},Jn={class:`text-(--ui-error)`},Yn=34,Xn=b({__name:`FilesChanged`,props:{diff:{},notes:{},diffStyle:{}},setup(e){let t=e,n=_e(),r=U(()=>n.value===`dark`?`dark`:`light`),i=B([]),a=B(!0),o=B(null),s=T(`panel`),l=T(`root`),{width:f}=ue(l);m(l,e=>{e&&(f.value=e.getBoundingClientRect().width)});let p=U(()=>f.value>0&&f.value<672),h=B(!1),g=U(()=>p.value?`unified`:t.diffStyle??`unified`),_=0;async function v(){let e=++_;a.value=!0;let n=await Cn(t.diff);e===_&&(i.value=n.files,o.value=null,a.value=!1)}m(()=>t.diff,v,{immediate:!0});let b=U(()=>i.value.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0}));function x(e){o.value=e,p.value&&(h.value=!1);let t=s.value?.querySelectorAll(`[data-file]`)??[];Array.from(t).find(t=>t.dataset.file===e)?.scrollIntoView({block:`start`,behavior:`smooth`})}return(t,n)=>{let f=H;return a.value?(A(),u(`div`,jn,[c(f,{name:`i-lucide-loader-circle`,class:`size-4 animate-spin`}),n[1]||=j(`span`,null,`Loading diff…`,-1)])):i.value.length===0?(A(),u(`p`,Mn,` Nothing in this diff parsed as a file. `)):(A(),u(`div`,{key:2,ref_key:`root`,ref:l,class:`@container flex min-h-full flex-col @2xl:flex-row`,"data-testid":`files-changed`},[j(`aside`,Nn,[j(`div`,Pn,[p.value?(A(),u(`button`,{key:0,type:`button`,class:`flex w-full items-center gap-2 px-3 py-2.5 text-xs text-(--ui-text-muted)`,"aria-expanded":h.value,"data-testid":`files-fold`,onClick:n[0]||=e=>h.value=!h.value},[c(f,{name:h.value?`i-lucide-chevron-down`:`i-lucide-chevron-right`,class:`size-3.5 shrink-0 text-(--ui-text-dimmed)`},null,8,[`name`]),j(`span`,null,y(i.value.length)+` `+y(i.value.length===1?`file`:`files`)+` changed`,1),j(`span`,In,[j(`span`,Ln,`+`+y(b.value.additions),1),j(`span`,Rn,`−`+y(b.value.deletions),1)])],8,Fn)):(A(),u(`div`,zn,[j(`span`,Bn,y(i.value.length)+` `+y(i.value.length===1?`file`:`files`),1),j(`span`,Vn,[j(`span`,Hn,`+`+y(b.value.additions),1),j(`span`,Un,`−`+y(b.value.deletions),1)])])),!p.value||h.value?(A(),u(`ul`,{key:2,class:S([`flex flex-col`,p.value?`pb-2`:``])},[(A(!0),u(F,null,d(i.value,e=>(A(),u(`li`,{key:e.path},[j(`button`,{type:`button`,class:S([`flex w-full min-w-0 items-center gap-2 px-3 py-1.5 text-left text-xs transition-colors hover:bg-accented/50 dark:hover:bg-(--ui-bg)`,o.value===e.path?`bg-accented/50 text-(--ui-text) dark:bg-(--ui-bg)`:`text-(--ui-text-muted)`]),title:e.path,"aria-current":o.value===e.path?`true`:void 0,"data-testid":`file-entry`,onClick:t=>x(e.path)},[c(f,{name:N(An)(e.path),class:`size-3.5 shrink-0`},null,8,[`name`]),j(`span`,Gn,y(N(wn)(e.path,Yn)),1),j(`span`,Kn,[j(`span`,qn,`+`+y(e.additions),1),j(`span`,Jn,`−`+y(e.deletions),1)])],10,Wn)]))),128))],2)):w(``,!0)])]),j(`div`,{ref_key:`panel`,ref:s,class:`min-w-0 flex-1 overflow-x-auto`,"data-testid":`diff-column`},[(A(!0),u(F,null,d(e.notes,e=>(A(),u(`p`,{key:e,class:`px-3 pt-3 text-xs text-(--ui-text-muted)`,"data-testid":`diff-note`},y(e),1))),128)),c(Sn,{diff:e.diff,theme:r.value,"diff-style":g.value},null,8,[`diff`,`theme`,`diff-style`])],512)],512))}}}),Zn=b({__name:`LabelTip`,props:{text:{},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>{let r=Se;return A(),V(r,{text:e.text,disabled:e.disabled,"delay-duration":250,content:{side:`bottom`,align:`end`,sideOffset:6,collisionPadding:8},ui:{content:`h-auto max-w-[28rem] px-2.5 py-1.5`,text:`text-clip whitespace-normal leading-snug`}},{default:D(()=>[R(t.$slots,`default`)]),_:3},8,[`text`,`disabled`])}}}),Qn={class:`pr-review-panel @container flex h-full min-h-0 min-w-0 flex-col`,"data-testid":`pr-review-panel`},$n={class:`shrink-0 border-b border-(--ui-border) px-4 pt-5 pb-4 sm:px-6`},er={class:`flex flex-col gap-3 @2xl:flex-row @2xl:items-start @2xl:justify-between @2xl:gap-4`},tr={class:`min-w-0`},nr={class:`line-clamp-2 text-lg leading-snug font-semibold text-(--ui-text) @2xl:line-clamp-none @2xl:truncate`,"data-testid":`pr-title`},rr={class:`mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-(--ui-text-muted)`,"data-testid":`pr-facts`},ir=[`href`],ar={key:1,class:`inline-flex items-center gap-1.5`},or=[`href`],sr={title:`the base the diff is against`},cr={"data-testid":`producer-label`},lr={class:`inline-flex items-center gap-1 text-(--ui-warning)`,"data-testid":`truncated-label`},ur={class:`flex shrink-0 flex-wrap items-center gap-2`},dr={key:1,class:`inline-flex shrink-0 items-center gap-1.5 text-xs text-(--ui-text-muted)`,"data-testid":`abridge-running`},fr={key:2,class:`inline-flex min-w-0 shrink items-center gap-1.5 text-xs text-(--ui-error)`,"data-testid":`abridge-failed`},pr=[`title`],mr={key:0,class:`flex shrink-0 items-center justify-between gap-3 border-b border-(--ui-border) px-4 py-2 sm:px-6`},hr={class:`tabs-scroll min-w-0 overflow-x-auto`},gr={class:`min-h-0 flex-1 overflow-y-auto`},_r={key:1,class:`mx-auto max-w-3xl p-4 sm:p-6`,"data-testid":`pr-description`},vr={key:2,class:`mt-4 text-xs text-(--ui-text-dimmed) italic`,"data-testid":`description-origin`},yr={key:2,class:`px-4 py-3 text-sm text-(--ui-text-muted) sm:px-6`,"data-testid":`no-diff`},br=`switchboard:diffStyle`,xr=`Abridge the full diff with meat.dev: a model keeps the concepts and drops what a reviewer need not read. One model call; usually a minute or three.`,Sr=b({__name:`PrReviewPanel`,props:{data:{},closable:{type:Boolean,default:!1},abridge:{default:void 0}},emits:[`close`],setup(e,{emit:t}){let n=e,r=t,i=U(()=>Qt(n.data.pr)),a=U(()=>Yt(n.data)),o=U(()=>n.data.readingDiffs),s=U(()=>n.data.description),l=U(()=>o.value.find(e=>e.poweredBy===`git`)),d=U(()=>o.value.find(e=>e.poweredBy===`meat`)),f=U(()=>n.data.pr.headSha?.slice(0,7)),p=U(()=>{let e=[];return l.value&&e.push({label:`Files changed`,value:`files`}),d.value&&e.push({label:`Reading diff`,value:`reading`}),(s.value?.tldr||s.value?.why)&&e.push({label:`Description`,value:`description`}),e}),h=()=>$t(o.value)?.poweredBy===`meat`?`reading`:`files`,g=B(h());m(()=>$t(o.value),()=>g.value=h()),m(p,e=>{e.some(e=>e.value===g.value)||(g.value=e[0]?.value??`files`)},{immediate:!0});let _=U(()=>g.value===`files`?l.value:g.value===`reading`?d.value:void 0),v=U(()=>{let e=_.value;if(!e)return[];let t=[];return e.summary&&t.push(e.summary),e.truncated&&t.push(`${tn(e.diff.length)}.`),t}),b=U(()=>s.value?rn(s.value):void 0),x=[{label:`Inline`,value:`unified`,icon:`i-lucide-rows-3`},{label:`Side by side`,value:`split`,icon:`i-lucide-columns-2`}],S=B(`unified`);M(()=>{try{localStorage.getItem(br)===`split`&&(S.value=`split`)}catch{}});function C(e){S.value=e===`split`?`split`:`unified`;try{localStorage.setItem(br,S.value)}catch{}}let ee=U(()=>n.abridge!==void 0&&n.abridge.state.state!==`done`&&l.value!==void 0&&!d.value);return(t,n)=>{let o=H,l=le,d=vn;return A(),u(`div`,Qn,[j(`header`,$n,[j(`div`,er,[j(`div`,tr,[j(`h1`,nr,y(a.value),1),j(`div`,rr,[i.value.pr?(A(),u(`a`,{key:0,href:i.value.pr,target:`_blank`,rel:`noopener noreferrer`,class:`inline-flex items-center gap-1.5 hover:text-(--ui-text)`,"data-testid":`pr-link`},[c(o,{name:`i-simple-icons-github`,class:`size-3.5 shrink-0`}),j(`span`,null,y(e.data.pr.repo)+`#`+y(e.data.pr.number),1)],8,ir)):e.data.pr.repo?(A(),u(`span`,ar,[c(o,{name:`i-simple-icons-github`,class:`size-3.5 shrink-0`}),j(`span`,null,y(e.data.pr.repo),1)])):w(``,!0),i.value.commit?(A(),u(`a`,{key:2,href:i.value.commit,target:`_blank`,rel:`noopener noreferrer`,class:`font-mono hover:text-(--ui-text)`,"data-testid":`commit-link`},y(f.value),9,or)):w(``,!0),_.value?(A(),u(F,{key:3},[j(`span`,sr,`against origin/`+y(_.value.baseRef),1),c(Zn,{text:N(en)(_.value.poweredBy)},{default:D(()=>[j(`span`,cr,y(N(nn)(_.value.poweredBy)),1)]),_:1},8,[`text`]),_.value.truncated?(A(),V(Zn,{key:0,text:N(tn)(_.value.diff.length)},{default:D(()=>[j(`span`,lr,[c(o,{name:`i-lucide-scissors`,class:`size-3.5`}),n[4]||=P(`truncated `,-1)])]),_:1},8,[`text`])):w(``,!0)],64)):w(``,!0)])]),j(`div`,ur,[i.value.pr?(A(),V(l,{key:0,label:`View on GitHub`,icon:`i-simple-icons-github`,color:`neutral`,variant:`ghost`,size:`sm`,to:i.value.pr,target:`_blank`,"data-testid":`github-button`},null,8,[`to`])):w(``,!0),ee.value&&e.abridge?(A(),u(F,{key:1},[e.abridge.state.state===`absent`?(A(),V(Zn,{key:0,text:xr},{default:D(()=>[c(l,{label:`Abridge with meat`,icon:`i-lucide-scissors`,size:`sm`,"data-testid":`abridge-button`,onClick:n[0]||=t=>e.abridge.start()})]),_:1})):e.abridge.state.state===`running`?(A(),u(`span`,dr,[c(o,{name:`i-lucide-loader-circle`,class:`size-3.5 animate-spin`}),n[5]||=P(` Abridging… usually 1–3 minutes `,-1)])):e.abridge.state.state===`failed`?(A(),u(`span`,fr,[c(o,{name:`i-lucide-circle-alert`,class:`size-3.5 shrink-0`}),j(`span`,{class:`truncate`,title:e.abridge.state.reason},`Abridging failed: `+y(e.abridge.state.reason),9,pr),c(l,{size:`xs`,color:`neutral`,variant:`outline`,label:`Retry`,"data-testid":`abridge-retry`,onClick:n[1]||=t=>e.abridge.start()})])):w(``,!0)],64)):w(``,!0),e.closable?(A(),V(l,{key:2,icon:`i-lucide-x`,color:`neutral`,variant:`ghost`,size:`sm`,"aria-label":`Close`,"data-testid":`panel-close`,onClick:n[2]||=e=>r(`close`)})):w(``,!0)])])]),p.value.length>0?(A(),u(`div`,mr,[j(`div`,hr,[c(d,{modelValue:g.value,"onUpdate:modelValue":n[3]||=e=>g.value=e,items:p.value,size:`sm`,class:`w-fit gap-0`,content:!1,"data-testid":`panel-tabs`},null,8,[`modelValue`,`items`])]),_.value?(A(),V(d,{key:0,"model-value":S.value,items:x,color:`neutral`,size:`xs`,content:!1,class:`hidden w-fit @2xl:flex`,"data-testid":`diff-style`,"onUpdate:modelValue":C},null,8,[`model-value`])):w(``,!0)])):w(``,!0),j(`div`,gr,[_.value?(A(),V(Xn,{key:_.value.poweredBy,diff:_.value.diff,notes:v.value,"diff-style":S.value},null,8,[`diff`,`notes`,`diff-style`])):g.value===`description`&&s.value?(A(),u(`div`,_r,[n[7]||=j(`div`,{class:`mb-2 text-xs font-medium text-(--ui-text-dimmed)`},`What the pull request says about itself`,-1),s.value.tldr?(A(),V(K,{key:0,text:s.value.tldr,class:`text-sm`,"data-testid":`description-tldr`},null,8,[`text`])):w(``,!0),s.value.why?(A(),u(F,{key:1},[n[6]||=j(`div`,{class:`mt-4 mb-2 text-xs font-medium text-(--ui-text-dimmed)`},`Why`,-1),c(K,{text:s.value.why,class:`text-sm`,"data-testid":`description-why`},null,8,[`text`])],64)):w(``,!0),b.value?(A(),u(`p`,vr,y(b.value),1)):w(``,!0)])):(A(),u(`p`,yr,` No reading diff was produced for this review. `))])])}}}),Cr={class:`conn flex items-center gap-2 font-mono`},wr={key:0,class:`ok text-ok`,role:`img`,"aria-label":`succeeded`},Tr=[`data-heat`],Er=[`title`],Dr={key:3,id:`delivery`,class:`text-xs text-muted`},Or=[`title`],kr={key:0,id:`actions`,class:`actions flex gap-1.5`},Ar={class:`mx-auto max-w-6xl`},jr={key:0,id:`lineage`,class:`lineage facts mb-2 flex flex-wrap items-baseline gap-x-3 gap-y-1 px-(--sb-gutter) font-mono text-xs text-dimmed`},Mr={key:2,class:`threadkind`},Nr={key:1,id:`runmeta`,class:`runmeta facts mb-3 flex flex-wrap items-baseline gap-x-3 gap-y-1.5 px-(--sb-gutter) font-mono text-xs text-dimmed`},Pr={class:`agent text-[0.68rem] font-medium uppercase tracking-wider text-toned`},Fr={class:`model`},Ir={key:0,class:`effort`},Lr={key:1,class:`harness`},Rr=[`href`],zr={key:3,class:`repo`},Br=[`href`],Vr={key:5,class:`reftag rounded border border-accented px-1.5 text-[0.75rem] text-toned`},Hr=[`href`,`title`],Ur=[`href`],Wr={key:2,id:`request`,class:`block mb-4 rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-3`},Gr={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},Kr={key:0,class:`source flex items-center gap-2 font-normal normal-case tracking-normal text-dimmed`},qr=[`href`],Jr={key:1},Yr={key:1},Xr=[`href`],Zr=[`title`],Qr={key:6,id:`references`,class:`group mb-4 px-(--sb-gutter)`},$r={class:`flex min-h-6 cursor-pointer list-none items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted hover:text-toned [&::-webkit-details-marker]:hidden`},ei={class:`count font-normal normal-case tracking-normal text-dimmed`},ti={id:`referencedthreads`,class:`pb-1 pl-5`},ni={class:`flex items-baseline gap-2 font-mono text-xs text-dimmed`},ri=[`href`],ii=[`title`],ai={class:`quoted mt-1 whitespace-pre-wrap break-words font-mono text-xs opacity-85`},oi={key:7,id:`context`,class:`group mb-4 px-(--sb-gutter)`},si={class:`flex min-h-6 cursor-pointer list-none items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted hover:text-toned [&::-webkit-details-marker]:hidden`},ci={class:`count font-normal normal-case tracking-normal text-dimmed`},li={id:`contextturns`,class:`pb-1 pl-5`},ui=[`title`],di={id:`thisrun`,class:`mb-2 flex items-baseline gap-2.5 px-(--sb-gutter) font-mono text-xs font-medium uppercase tracking-wider text-muted`},fi={key:0,class:`count font-normal normal-case tracking-normal text-dimmed`},pi=[`aria-pressed`,`data-open`,`title`],mi={id:`log`,class:`m-0 list-none p-0`},hi={key:0,id:`placeholder`,class:`empty text-muted`},gi=[`id`],_i={class:`meta flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5 pr-(--sb-gutter) font-mono text-xs tabular-nums text-dimmed`},vi=[`title`],yi=[`title`],bi=[`title`],xi=[`href`],Si={key:3,class:`nonar font-sans italic`},Ci=[`title`],wi=[`data-phase`],Ti=[`aria-expanded`,`onClick`],Ei={class:`glyph select-none text-dimmed`},Di={class:`what`},Oi={key:0,class:`m-0 list-none p-0 pl-4`},ki={key:4,class:`followup block mt-5 rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-3`},Ai={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},ji={key:0,class:`source flex items-center gap-2 font-normal normal-case tracking-normal text-dimmed`},Mi=[`href`],Ni={key:1},Pi=[`title`],Fi={key:5,class:`mt-5`},Ii=[`open`],Li={class:`flex min-h-6 cursor-pointer list-none items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted hover:text-toned [&::-webkit-details-marker]:hidden`},Ri={key:0,class:`font-normal normal-case tracking-normal text-dimmed`},zi=[`title`],Bi=[`title`],Vi=b({__name:`RunPage`,setup(e){let t=fe(`run`),n=t?.mode===`history`,r=n?`Run`:`Live run`,i=n,o=t?.artifacts??null,s=t?.children??[],l=(t?.mode===`history`?t.units:void 0)??[],f=t?.mode===`history`?t.findingsLedger:void 0,p=U(()=>f?`/runs/unit/${encodeURIComponent(f.unit)}#findings`:void 0),h=typeof window<`u`?new URLSearchParams(window.location.search).get(`open`):null,_=$e({openTags:h?h.split(`,`).map(e=>e.trim()).filter(Boolean):void 0});t?.mode===`live`&&_.seedClock(t.serverNow);let v=_.state,b=B(n?`ended`:`connecting`),x=B(``),C=je(),T=t?.mode===`live`?ct(t,C.value):null,E=B(void 0),O=B({}),k=U(()=>{if(n&&t?.mode===`history`)return t.queued?{ok:!1,cls:`amber`,word:t.queued.state===`waiting`?`queued at position ${t.queued.position} — waiting on ${t.queued.waiting}`:t.queued.state}:t.status===`completed`?{ok:!0,cls:``,word:`succeeded`}:t.provisional?{ok:!1,cls:`amber`,word:Pe}:{ok:!1,cls:t.status===`failed`||t.status===`stopped_hard`||t.status===`interrupted`?`red`:t.status===`stopped_soft`?`amber`:`grey`,word:t.status?Ne(t.status):`ended`};let e=v.stopMode;return{ok:!1,cls:e===`hard`?`red`:e===`soft`?`amber`:`grey`,word:e===`hard`?`killed`:e===`soft`?`stopped early`:`ended`}}),te=U(()=>n&&t?.mode===`history`?t.durationMs:E.value),ne=U(()=>it(n&&t?.mode===`history`?{finishedAt:t.finishedAt,sealedAt:t.sealedAt,replyOk:t.replyOk}:O.value)),re=U(()=>te.value===void 0?``:Fe(te.value,`clock`)),ie=U(()=>n&&t?.mode===`history`?t.cost:void 0),ae=e=>e===null?`unpriced`:ze(e),se=U(()=>ie.value?ae(ie.value.usd):``),ue=U(()=>ie.value?Object.entries(ie.value.byModel).map(([e,t])=>`${e} ${ae(t.usd)}`).join(`
|
|
9
|
-
`):void 0),de=U(()=>mt(te.value,`run`)),pe=U(()=>pt(de.value)),me={red:`border-bad/30 text-bad`,amber:`border-warn/30 text-warn`,grey:`border-accented text-muted`},I=U(()=>x.value?x.value:b.value===`connecting`?`connecting…`:b.value===`disconnected`?`disconnected`:b.value===`stopping`?`stopping (${v.stopMode??`soft`})`:b.value===`finished`?E.value===void 0?`delivering…`:`delivering… · ${Fe(E.value,`clock`)}`:T?`running · ${Fe(T.elapsedMs(C.value),`clock`)}`:`running`),ge=U(()=>x.value||b.value===`disconnected`?`text-bad`:b.value===`running`?`text-ok motion-safe:animate-pulse`:b.value===`finished`?`text-ok`:`text-warn motion-safe:animate-pulse`),L=U(()=>{if(!t||t.mode!==`live`&&t.mode!==`history`)return null;v.traceVersion;let e=t.receivedAt??t.startedAt,n=He(v.meta?.agent);if(t.mode===`history`){let r=t.durationMs??(t.finishedAt===void 0?0:Math.max(0,t.finishedAt-e));return We({spans:_.spanSet(),losses:_.losses(e),window:{start:e,end:e+r},owner:n,totalMs:r,phase:`ended`,delivery:{finishedAt:t.finishedAt,sealedAt:t.sealedAt,replyOk:t.replyOk},...t.status?{endedBy:t.status}:{},...t.truncated===void 0?{}:{truncated:t.truncated},...t.untimed?{untimed:!0}:{},callTitle:_.callHeadline})}if(!T)return null;let r=b.value===`ended`?`ended`:b.value===`finished`?`delivering`:`live`,i=r===`live`?T.elapsedMs(C.value):E.value??T.elapsedMs(C.value);return We({spans:_.spanSet(),losses:_.losses(e),window:{start:e,end:e+i},owner:n,totalMs:i,phase:r,delivery:O.value,...r===`ended`&&v.stopMode?{endedBy:`stopped_${v.stopMode}`}:{},callTitle:_.callHeadline})}),_e=n&&t?.mode===`history`?`/runs/${encodeURIComponent(t.id)}/events`:void 0;function ye(e){_.reveal(e)&&ce().then(()=>{let t=document.getElementById(e);t&&(t.scrollIntoView?.({block:`center`}),t.classList.add(`revealed`),setTimeout(()=>t.classList.remove(`revealed`),1500))})}let R=B(n||t?.mode!==`live`||t.stopUrl===void 0),z=B(!1);function be(e){t?.mode===`live`&&t.stopUrl!==void 0&&(e!==`hard`||ve.confirm(`Hard stop: abort the run now with no summary and free its sandbox?`))&&(z.value=!0,fetch(`${t.stopUrl}&mode=${encodeURIComponent(e)}`,{method:`POST`,credentials:`same-origin`}).then(async t=>{if(!t.ok){let e=await t.json?.().catch(()=>null);throw Error(typeof e?.message==`string`?e.message:`HTTP ${t.status}`)}W(e)}).catch(e=>{z.value=!1,x.value=`stop failed: ${e instanceof Error?e.message:`error`}`}))}function W(e){_.markStopping(e),R.value=!0,(b.value===`connecting`||b.value===`running`)&&(b.value=`stopping`)}m(()=>v.stopMode,e=>{e&&b.value!==`ended`&&b.value!==`disconnected`&&b.value!==`finished`&&W(e)}),n||m(b,e=>ve.setFavicon(e===`ended`||e===`disconnected`||e===`finished`?De:ke),{immediate:!0});let Oe=U(()=>!n&&b.value!==`ended`&&b.value!==`disconnected`&&b.value!==`finished`),Ge=U(()=>Oe.value?ut(v,C.value):null);xe(ot,Ge),xe(rt,o),xe(Ze,U(()=>v.reply!==null));let G=U(()=>Oe.value?lt(v,_.pendingCall(),C.value):null),Ke=U(()=>G.value?.kind===`thinking`?L.value?.openStep||we(G.value.elapsedMs):``);function ht(){_.setAllOpen(!v.allOpen)}let gt=U(()=>v.log.filter(e=>e.kind===`step`).length),q=U(()=>{for(let e=v.log.length-1;e>=0;e--){let t=v.log[e];if(t.kind===`note`&&t.noteKind===`notes`)return t.key}}),_t=B(null);function vt(){return window.innerHeight+window.scrollY>=document.body.scrollHeight-60}let J=dn(),yt=B(!1),bt=t?.mode===`history`&&t.capabilities.readingDiffAbridge?mn(t.id,e=>J.handle(e)):void 0;oe(()=>bt?.dispose());function xt(e){let t=vt();_.handle(e),J.handle(e),t&&requestAnimationFrame(()=>_t.value?.scrollIntoView?.({block:`nearest`}))}let St=Ae(),Ct=null;if(t?.mode===`history`){for(let e of t.events)_.handle(e),J.handle(e);_.closePhases()}M(()=>{t?.mode===`live`&&(Ct=Te({url:t.eventsUrl,factory:St,model:_,handle:xt,onFinished:e=>{R.value=!0,e&&(T&&(E.value=T.elapsedAt(e.finishedAt)),O.value={...O.value,finishedAt:e.finishedAt})},onEnd:e=>{R.value=!0,E.value??=T?.elapsedMs(C.value),O.value={...O.value,...e}}}),m(Ct.phase,e=>{(b.value!==`stopping`||e!==`running`&&e!==`connecting`)&&(b.value=e)},{immediate:!0}))}),oe(()=>{Ct?.close()});function wt(e){return e&&/^https?:\/\//.test(e)?e:``}let Tt=U(()=>wt(v.request?.source?.url)),Et=U(()=>t&&(t.mode===`live`||t.mode===`history`)&&t.threadKey?Ie(t.threadKey):null),Y=t&&(t.mode===`live`||t.mode===`history`)?t.lineage??null:null,Ot=Y?.parent?`/runs/${encodeURIComponent(Y.parent.id)}${Y.parent.token?`?t=${encodeURIComponent(Y.parent.token)}`:``}`:``,kt=Y?.unit?`/runs/unit/${encodeURIComponent(Y.unit.key)}`:``,X=U(()=>{let e=v.meta;return{repo:dt(e?.repo),tree:Ye(e?.repo,e?.ref),commit:ft(e?.repo,e?.headSha),pr:Qe(e?.repo,e?.pr)}}),At=U(()=>{let e=v.meta;if(!e?.harness)return``;let t=e.harnessScope===`defaults`?`defaults`:e.harnessScope?`${e.harnessScope} scope`:``;return t?`${e.harness} harness (${t})`:`${e.harness} harness`}),jt=U(()=>Xe({meta:v.meta,requestText:v.request?.text??``,prOpened:v.prOpened}));function Z(e){return typeof e==`number`?Me(e,C.value):``}function Q(e){return typeof e==`number`?Le(e):void 0}return(e,t)=>{let n=ee(`RouterLink`),o=le,m=Se,h=H,T=Ce;return A(),V(a,{title:N(r),nav:`runs`},{leading:D(()=>[c(n,{class:`back text-sm text-primary no-underline hover:underline`,to:`/runs`},{default:D(()=>[...t[4]||=[P(`← All runs`,-1)]]),_:1})]),status:D(()=>[j(`span`,Cr,[b.value===`ended`?(A(),u(F,{key:0},[k.value.ok?(A(),u(`span`,wr,`✓`)):(A(),u(`span`,{key:1,class:S([`chip rounded border px-1.5 text-[0.7rem]`,me[k.value.cls]])},y(k.value.word),3)),j(`span`,{id:`state`,class:S([`dur text-xs tabular-nums`,[pe.value?`heat`:`text-muted`,de.value.level>=2?`font-medium`:``]]),style:g(pe.value),"data-heat":de.value.level},y(re.value),15,Tr),se.value?(A(),u(`span`,{key:2,id:`cost`,class:`cost text-xs tabular-nums text-muted`,title:ue.value},`· `+y(se.value),9,Er)):w(``,!0),ne.value?(A(),u(`span`,Dr,`· `+y(ne.value),1)):w(``,!0)],64)):(A(),u(F,{key:1},[j(`span`,{id:`statedot`,class:S([`pulse text-[1.1em] leading-none`,ge.value])},`∿`,2),j(`span`,{id:`state`,class:S([`text-xs tabular-nums`,x.value?`text-bad`:`text-muted`]),title:b.value===`running`&&!x.value?`the whole run, since we received the message`:b.value===`finished`?`the agent stopped; the reply is being posted`:void 0},y(I.value),11,Or)],64))])]),actions:D(()=>[R.value?w(``,!0):(A(),u(`span`,kr,[c(m,{text:`Soft stop: no new steps, the agent writes up what it has`},{default:D(()=>[c(o,{size:`xs`,color:`neutral`,variant:`outline`,label:`Stop`,disabled:z.value,onClick:t[0]||=e=>be(`soft`)},null,8,[`disabled`])]),_:1}),c(m,{text:`Hard stop: abort now, no summary, free the sandbox`},{default:D(()=>[c(o,{size:`xs`,color:`error`,variant:`outline`,label:`Kill`,disabled:z.value,onClick:t[1]||=e=>be(`hard`)},null,8,[`disabled`])]),_:1})]))]),default:D(()=>[j(`div`,Ar,[N(Y)?(A(),u(`div`,jr,[t[5]||=j(`span`,{class:`text-[0.68rem] font-medium uppercase tracking-wider`},`part of`,-1),N(Ot)&&N(Y).parent?(A(),V(n,{key:0,class:`parent text-primary no-underline hover:underline`,to:N(Ot),"data-testid":`lineage-parent`,title:N(Y).unit?`the pipeline this run belongs to`:`the run that spawned this one`},{default:D(()=>[P(y(N(Y).unit?`pipeline`:`parent run`)+` ›`,1)]),_:1},8,[`to`,`title`])):w(``,!0),N(kt)&&N(Y).unit?(A(),V(n,{key:1,class:`unit text-primary no-underline hover:underline`,to:N(kt),"data-testid":`lineage-unit`,title:`the unit this run's thread belongs to`},{default:D(()=>[P(`unit `+y(N(Y).unit.id)+y(N(Y).unit.title?` · ${N(Y).unit.title}`:``)+` ›`,1)]),_:1},8,[`to`])):w(``,!0),N(Y).unit?.thread?(A(),u(`span`,Mr,y(N(Y).unit.thread)+` thread`,1)):w(``,!0)])):w(``,!0),N(v).meta?(A(),u(`div`,Nr,[j(`span`,Pr,y(N(v).meta.agent),1),j(`span`,Fr,y(N(v).meta.model),1),N(v).meta.effort?(A(),u(`span`,Ir,y(N(v).meta.effort)+` effort`,1)):w(``,!0),At.value?(A(),u(`span`,Lr,y(At.value),1)):w(``,!0),X.value.repo?(A(),u(`a`,{key:2,class:`text-primary no-underline hover:underline`,href:X.value.repo,target:`_blank`,rel:`noopener noreferrer`},y(N(v).meta.repo),9,Rr)):N(v).meta.repo?(A(),u(`span`,zr,y(N(v).meta.repo),1)):w(``,!0),X.value.tree?(A(),u(`a`,{key:4,class:`reftag rounded border border-accented px-1.5 text-[0.75rem] text-toned no-underline hover:border-primary hover:text-primary`,href:X.value.tree,target:`_blank`,rel:`noopener noreferrer`,title:`the branch on GitHub`},y(N(v).meta.ref),9,Br)):N(v).meta.ref?(A(),u(`span`,Vr,y(N(v).meta.ref),1)):w(``,!0),X.value.commit&&N(v).meta.headSha?(A(),u(`a`,{key:6,class:`sha tabular-nums text-toned no-underline hover:text-primary hover:underline`,href:X.value.commit,target:`_blank`,rel:`noopener noreferrer`,title:`the head commit ${N(v).meta.headSha}`},y(N(Je)(N(v).meta.headSha)),9,Hr)):w(``,!0),X.value.pr?(A(),u(`a`,{key:7,class:`prlink whitespace-nowrap text-primary no-underline hover:underline`,href:X.value.pr,target:`_blank`,rel:`noopener noreferrer`},[c(Ue,{class:`mr-1 align-[-0.125em]`}),P(`#`+y(N(v).meta.pr),1)],8,Ur)):w(``,!0),p.value&&N(f)?(A(),V(n,{key:8,class:`findings whitespace-nowrap text-primary no-underline hover:underline`,to:p.value,title:`the pull request's findings ledger on its unit's page`},{default:D(()=>[P(`Findings · `+y(N(f).rows),1)]),_:1},8,[`to`])):w(``,!0),N(J).state.ready?(A(),u(`button`,{key:9,type:`button`,class:`reading-diff ml-auto inline-flex cursor-pointer items-center gap-1 whitespace-nowrap text-primary hover:underline focus-visible:outline-2 focus-visible:outline-primary`,"data-testid":`reading-diff-button`,onClick:t[2]||=e=>yt.value=!0},[c(h,{name:`i-lucide-git-compare`,class:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[6]||=P(` Reading diff `,-1)])):w(``,!0)])):w(``,!0),N(v).request?(A(),u(`section`,Wr,[j(`h2`,Gr,[t[7]||=j(`span`,null,`Request`,-1),N(v).request.source?(A(),u(`span`,Kr,[N(v).request.source.channel?(A(),u(F,{key:0},[c(qe),Tt.value?(A(),u(`a`,{key:0,class:`text-muted no-underline hover:text-primary hover:underline`,href:Tt.value,target:`_blank`,rel:`noopener noreferrer`,title:`open the thread`},`#`+y(N(v).request.source.channel),9,qr)):(A(),u(`span`,Jr,`#`+y(N(v).request.source.channel),1))],64)):w(``,!0),N(v).request.source.user?(A(),u(`span`,Yr,y(N(v).request.source.user),1)):w(``,!0)])):w(``,!0),Et.value?(A(),u(`a`,{key:1,class:`thread font-normal normal-case tracking-normal text-muted no-underline hover:text-primary hover:underline`,href:Et.value,title:`the thread this run is a turn of`,"data-testid":`thread-link`},`in thread ›`,8,Xr)):w(``,!0),j(`span`,{class:`ts ml-auto select-none text-xs font-normal normal-case tracking-normal text-dimmed`,title:Q(N(v).request.at)},y(Z(N(v).request.at)),9,Zr)]),c(Dt,{lines:3},{default:D(()=>[c(K,{text:N(v).request.text},null,8,[`text`])]),_:1}),N(v).request.files.length>0?(A(),V(st,{key:0,files:N(v).request.files},null,8,[`files`])):w(``,!0)])):w(``,!0),N(v).reply&&N(i)?(A(),V(It,{key:3,position:`first`,text:N(v).reply.text,caption:jt.value,when:Z(N(v).reply.at),"when-title":Q(N(v).reply.at),files:N(v).reply.files},null,8,[`text`,`caption`,`when`,`when-title`,`files`])):w(``,!0),N(l).length>0?(A(),V(Ut,{key:4,units:N(l)},null,8,[`units`])):w(``,!0),N(s).length>0?(A(),V(Jt,{key:5,children:N(s),now:N(C)},null,8,[`children`,`now`])):w(``,!0),N(v).references.length>0?(A(),u(`details`,Qr,[j(`summary`,$r,[t[8]||=j(`span`,{class:`chev select-none text-xs text-dimmed transition-transform group-open:rotate-90 motion-reduce:transition-none`},`❯`,-1),j(`span`,null,`Referenced thread`+y(N(v).references.length===1?``:`s`),1),j(`span`,ei,`· `+y(N(v).references.length)+` thread`+y(N(v).references.length===1?``:`s`),1)]),j(`div`,ti,[(A(!0),u(F,null,d(N(v).references,e=>(A(),u(`div`,{key:e.key,class:`reference border-t border-default py-1.5 first-of-type:border-t-0`},[j(`div`,ni,[j(`a`,{class:`text-muted no-underline hover:text-primary hover:underline`,href:e.url,target:`_blank`,rel:`noopener noreferrer`},`#`+y(e.channelName),9,ri),j(`span`,null,`· `+y(e.messages)+` message`+y(e.messages===1?``:`s`),1),j(`span`,{class:`ts ml-auto shrink-0 select-none`,title:Q(e.at)},y(Z(e.at)),9,ii)]),j(`div`,ai,[(A(!0),u(F,null,d(N(tt)(e.text),(e,t)=>(A(),u(`div`,{key:t},y(e),1))),128))])]))),128))])])):w(``,!0),N(v).context.length>0?(A(),u(`details`,oi,[j(`summary`,si,[t[9]||=j(`span`,{class:`chev select-none text-xs text-dimmed transition-transform group-open:rotate-90 motion-reduce:transition-none`},`❯`,-1),t[10]||=j(`span`,null,`Earlier in this thread`,-1),j(`span`,ci,`· `+y(N(v).context.length)+` turn`+y(N(v).context.length===1?``:`s`),1)]),j(`div`,li,[(A(!0),u(F,null,d(N(v).context,e=>(A(),u(`div`,{key:e.key,class:`turn flex items-baseline gap-3 border-t border-default py-1.5 opacity-85 first-of-type:border-t-0`},[c(K,{text:e.text},null,8,[`text`]),j(`span`,{class:`ts ml-auto shrink-0 select-none font-mono text-xs text-dimmed`,title:Q(e.at)},y(Z(e.at)),9,ui)]))),128))])])):w(``,!0),j(`h2`,di,[t[11]||=j(`span`,null,`This run`,-1),gt.value>0?(A(),u(`span`,fi,`· `+y(gt.value)+` step`+y(gt.value===1?``:`s`),1)):w(``,!0),j(`button`,{id:`fold`,type:`button`,class:`ml-auto cursor-pointer font-normal normal-case tracking-normal text-dimmed hover:text-toned focus-visible:outline-2 focus-visible:outline-primary`,"aria-pressed":N(v).allOpen?`true`:`false`,"data-open":N(v).allOpen?`1`:`0`,title:N(v).allOpen?`Close every call card`:`Open every call card`,onClick:ht},y(N(v).allOpen?`Collapse all`:`Expand all`),9,pi)]),L.value?(A(),V(Ve,{key:8,vm:L.value,"events-href":N(_e),onReveal:ye},null,8,[`vm`,`events-href`])):w(``,!0),j(`ol`,mi,[N(v).placeholder?(A(),u(`li`,hi,`Waiting for activity…`)):w(``,!0),(A(!0),u(F,null,d(N(v).log,e=>(A(),u(F,{key:e.key},[e.kind===`step`?(A(),V(at,{key:0,step:e,class:`mt-5 first:mt-0`,onToggleGroup:t=>N(_).toggleGroup(e)},null,8,[`step`,`onToggleGroup`])):e.kind===`turn`?(A(),u(`li`,{key:1,id:`span-${e.turn.spanId}`,class:`turn mt-5 border-l-2 border-(--ui-border-accented)/50 pb-3 pl-3 pt-2`},[j(`div`,_i,[j(`span`,{class:S([`thought`,e.turn.quick?``:`text-warn`]),title:e.turn.label},`thought `+y(e.turn.chip),11,vi),e.turn.switched?(A(),u(`span`,{key:0,class:`model-switch order-first rounded border border-warn/40 bg-warn/10 px-1.5 font-medium text-warn`,title:`model changed: this turn ran on ${e.turn.model}`},`⇄ `+y(N(et)(e.turn.model)),9,yi)):e.turn.showModel?(A(),u(`span`,{key:1,class:`model-badge order-first rounded bg-accented px-1.5 text-[0.68rem] font-medium leading-normal tracking-wider text-muted`,title:e.turn.model},y(N(et)(e.turn.model)),9,bi)):w(``,!0),(A(!0),u(F,null,d(e.turn.facts,(e,t)=>(A(),u(`span`,{key:t,class:`fact`},y(e),1))),128)),e.note&&e.noteHref?(A(),u(`a`,{key:2,class:`nonar font-sans italic text-dimmed no-underline hover:text-primary hover:underline`,href:e.noteHref},y(e.note),9,xi)):e.note?(A(),u(`span`,Si,y(e.note),1)):w(``,!0),e.turn.at===void 0?w(``,!0):(A(),u(`span`,{key:4,class:`ts ml-auto select-none`,title:N(Le)(e.turn.at)},y(N(Re)(e.turn.at)),9,Ci))])],8,gi)):e.kind===`span`?(A(),V(Mt,{key:2,item:e},null,8,[`item`])):e.kind===`phase`?(A(),u(`li`,{key:3,class:`phase py-0.5 font-mono text-xs`,"data-phase":e.phase},[j(`button`,{type:`button`,class:`phase-head flex w-full cursor-pointer items-baseline gap-2 text-left text-muted hover:text-toned`,"aria-expanded":e.open,onClick:he(t=>N(_).togglePhase(e),[`prevent`])},[j(`span`,Ei,y(e.open?`▾`:`▸`),1),j(`span`,{class:S([`swatch inline-block size-2 shrink-0 self-center rounded-[2px]`,N(Be)(e.phase)]),"aria-hidden":`true`},null,2),j(`span`,Di,y(N(nt)(e)),1)],8,Ti),e.open?(A(),u(`ul`,Oi,[(A(!0),u(F,null,d(e.rows,e=>(A(),V(Mt,{key:e.key,item:e},null,8,[`item`]))),128))])):w(``,!0)],8,wi)):e.kind===`followup`?(A(),u(`li`,ki,[j(`h2`,Ai,[t[12]||=j(`span`,null,`↪ Follow-up`,-1),e.input.source?.user?(A(),u(`span`,ji,[wt(e.input.source.url)?(A(),u(`a`,{key:0,class:`text-muted no-underline hover:text-primary hover:underline`,href:e.input.source.url,target:`_blank`,rel:`noopener noreferrer`,title:`open the message`},y(e.input.source.user),9,Mi)):(A(),u(`span`,Ni,y(e.input.source.user),1))])):w(``,!0),j(`span`,{class:`ts ml-auto select-none text-xs font-normal normal-case tracking-normal text-dimmed`,title:Q(e.input.at)},y(Z(e.input.at)),9,Pi)]),c(K,{text:e.input.text},null,8,[`text`]),e.input.files.length>0?(A(),V(st,{key:0,files:e.input.files},null,8,[`files`])):w(``,!0)])):e.noteKind===`notes`?(A(),u(`li`,Fi,[j(`details`,{class:`notepad group rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-2`,open:e.key===q.value},[j(`summary`,Li,[t[13]||=j(`span`,{class:`chev select-none text-xs text-dimmed transition-transform group-open:rotate-90 motion-reduce:transition-none`},`❯`,-1),t[14]||=j(`span`,null,`📝 Notes for this thread`,-1),e.key===q.value?w(``,!0):(A(),u(`span`,Ri,`· superseded`)),e.at===void 0?w(``,!0):(A(),u(`span`,{key:1,class:`ts ml-auto select-none font-normal normal-case tracking-normal text-dimmed`,title:N(Le)(e.at)},y(N(Re)(e.at)),9,zi))]),c(K,{text:e.text,class:`mt-1 [&_h1]:mb-1.5 [&_h1]:mt-4 [&_h1]:font-mono [&_h1]:text-xs [&_h1]:font-medium [&_h1]:uppercase [&_h1]:tracking-wider [&_h1]:text-muted [&_h2]:mb-1.5 [&_h2]:mt-4 [&_h2]:font-mono [&_h2]:text-xs [&_h2]:font-medium [&_h2]:uppercase [&_h2]:tracking-wider [&_h2]:text-muted [&_h3]:mb-1.5 [&_h3]:mt-4 [&_h3]:font-mono [&_h3]:text-xs [&_h3]:font-medium [&_h3]:uppercase [&_h3]:tracking-wider [&_h3]:text-muted [&>:first-child]:mt-1`},null,8,[`text`])],8,Ii)])):(A(),u(`li`,{key:6,class:S([`note mt-4 flex items-baseline gap-3 rounded-md pl-3 pr-(--sb-gutter) py-1.5`,e.replay?`text-dimmed`:`bg-warn/10 text-warn`])},[j(`span`,null,y((e.replay?`… `:`⏱ `)+e.text),1),e.at===void 0?w(``,!0):(A(),u(`span`,{key:0,class:`ts ml-auto select-none font-mono text-xs text-dimmed`,title:N(Le)(e.at)},y(N(Re)(e.at)),9,Bi))],2))],64))),128)),G.value?.kind===`thinking`?(A(),V(Ee,{key:1,id:`thinking`,class:`ml-3.5 mt-5 first:mt-0`,verb:Ke.value,"elapsed-ms":G.value.elapsedMs,slow:G.value.slow,model:N(v).model},null,8,[`verb`,`elapsed-ms`,`slow`,`model`])):w(``,!0),j(`li`,{ref_key:`logEnd`,ref:_t,"aria-hidden":`true`},null,512)]),N(v).reply&&!N(i)?(A(),V(It,{key:9,position:`last`,text:N(v).reply.text,caption:jt.value,when:Z(N(v).reply.at),"when-title":Q(N(v).reply.at),files:N(v).reply.files},null,8,[`text`,`caption`,`when`,`when-title`,`files`])):w(``,!0)]),c(T,{open:yt.value,"onUpdate:open":t[3]||=e=>yt.value=e,title:N(Yt)(N(J).state),ui:{overlay:`z-30`,content:`z-30 w-[min(96vw,90rem)] max-w-none`}},{content:D(({close:e})=>[c(Sr,{data:N(J).state,abridge:N(bt),closable:``,onClose:t=>e()},null,8,[`data`,`abridge`,`onClose`])]),_:1},8,[`open`,`title`])]),_:1},8,[`title`])}}}),Hi=b({__name:`RunRoutePage`,setup(e){let t=O(me,null);return(e,n)=>!N(t)||N(t).page===`runNotFound`?(A(),V(ht,{key:0})):(A(),V(Vi,{key:1}))}});export{Hi as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,o as t,t as n}from"./AppShell-DPJVhUGP.js";import{An as r,Cn as i,Cr as a,Gr as o,Ii as s,Li as c,Mn as l,Pi as u,Qr as d,Sn as f,Tr as ee,Xr as p,Xt as m,_r as h,bn as g,c as _,dr as v,hr as y,ji as b,kn as x,l as S,ln as C,o as w,t as T,xi as E,xn as D,yi as te,yn as O}from"./browser-CCImen5O.js";import{t as k}from"./Tooltip-Dfot16IA.js";import{t as A}from"./InputMenu-BRV35UWP.js";import{b as j,x as M}from"./main-B32N1vUh.js";import{t as N}from"./eventSource-Cv0AFlMi.js";import{t as P}from"./wallClock-x0hjr0J_.js";import{n as ne,r as F,t as re}from"./indexFormat-B-pd4r7Y.js";import{A as I,C as L,D as R,E as z,M as B,N as V,O as H,S as U,T as W,_ as G,a as K,b as q,c as J,d as ie,f as Y,g as ae,h as X,i as oe,j as se,k as ce,l as Z,m as le,o as ue,p as de,r as Q,s as fe,t as pe,u as me,v as he,w as ge,x as _e,y as ve}from"./indexRow-BGjjLnN5.js";import{i as ye}from"./format-BldUwl_R.js";import{t as be}from"./SlackMark-DB0MGiF5.js";import{n as xe,t as Se}from"./durationTone-CVpX_yIk.js";import{t as Ce}from"./RunsTabs-C7Ua3XX5.js";import{t as we}from"./StatusDot-BMkUFVE8.js";var Te={class:`flex items-baseline gap-1.5 whitespace-pre-line px-2 py-1 text-xs`},Ee=[`data-kind`,`aria-label`,`href`],De=[`data-kind`],Oe=l({__name:`SourceMark`,props:{kind:{},tip:{},url:{}},setup(e){let t=e,n=()=>oe[t.kind]??t.kind;return(t,r)=>{let a=k;return e.url?(h(),D(a,{key:0},{content:p(()=>[g(`span`,Te,[e.kind===`slack`?(h(),D(be,{key:0})):f(``,!0),g(`span`,null,c(e.tip),1)])]),default:p(()=>[g(`a`,{class:`source linked pointer-events-auto w-[1.6em] shrink-0 rounded border border-transparent text-center text-[0.8rem] text-toned opacity-0 transition-opacity hover:border-primary/30 hover:bg-primary/10 hover:text-primary focus-visible:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none`,"data-kind":e.kind,"aria-label":`open the ${n()} thread (new tab)`,href:e.url,target:`_blank`,rel:`noopener noreferrer`},`↗`,8,Ee)]),_:1})):(h(),i(`span`,{key:1,class:`source w-[1.6em] shrink-0`,"data-kind":e.kind,"aria-hidden":`true`},null,8,De))}}}),ke=[`data-run-id`,`data-parent-id`,`data-started-at`,`data-persisted`,`data-stalled`,`data-expires-at`],Ae={class:`pointer-events-auto flex items-center max-sm:order-1`},je=[`data-user-id`,`data-surface`],Me={class:`surface mr-1.5 inline-block w-[3.6em] rounded border border-accented text-center font-mono text-[0.62rem] text-dimmed`},Ne={class:`name`},Pe={key:1,class:`who shrink-0 max-sm:hidden sm:w-[14em]`,"aria-hidden":`true`},Fe=[`data-agent-hue`],Ie=[`href`],Le={class:`owner font-normal text-dimmed`},Re={class:`name`},ze={key:5,class:`snippet min-w-0 truncate text-muted max-sm:order-6 max-sm:basis-full max-sm:whitespace-normal max-sm:pl-5 max-sm:text-[0.8rem] max-sm:leading-snug max-sm:line-clamp-2 sm:flex-1`},Be={class:`hidden sm:contents`},Ve={class:`expires pointer-events-auto shrink-0 font-mono text-xs tabular-nums text-warn max-sm:order-11`},He=[`data-heat`],Ue={class:`count shrink-0 text-right font-mono text-xs tabular-nums max-sm:order-9 max-sm:text-dimmed sm:min-w-[6em] sm:text-muted`},We=[`data-inherited`],Ge={class:`actions flex shrink-0 justify-end max-sm:order-5 sm:w-[2em]`},$=l({__name:`RunRow`,props:{run:{},now:{},retentionMs:{},nestedUnder:{},children:{}},setup(e){let n=e,a=O(()=>F(n.run.label||L(n.run.id))),o=O(()=>G(n.run,a.value.scope)),l=O(()=>W(n.run)),d=O(()=>_e(n.run)),m=O(()=>I(n.run)),_=O(()=>V(n.run)),v=O(()=>U(n.run)),y=O(()=>n.run.threadKey?se(n.run.threadKey):null),x=O(()=>me(n.run,n.retentionMs)),C=O(()=>x.value!==void 0&&x.value-n.now<=864e5),w=O(()=>!n.run.finished&&!n.run.stop),E=O(()=>Se(n.run.finished&&typeof n.run.finishedAt==`number`?n.run.finishedAt-n.run.startedAt:void 0,`run`)),A=O(()=>xe(E.value)),j=O(()=>n.run.finished&&n.run.status&&n.run.status!==`completed`?z(n.run.status):``),M=O(()=>n.run.stop&&!(n.run.finished&&n.run.status)?ce(n.run.stop):``),N=O(()=>he(n.run,n.now)),P=O(()=>n.run.hosted&&n.children!==void 0?de({head:n.run,children:n.children},n.now):void 0),ie=O(()=>N.value??P.value?.text??ve(n.run,n.now)),Y=O(()=>q(n.run,n.now)),X=te({soft:!1,hard:!1}),Q=O(()=>[...y.value?[{label:`Open thread`,icon:`i-lucide-messages-square`,to:y.value}]:[],...v.value?[{label:`Open in ${oe[m.value.kind]??m.value.kind}`,icon:`i-lucide-external-link`,to:v.value,target:`_blank`}]:[],...w.value?[{label:`Stop (soft)`,icon:`i-lucide-octagon-pause`,disabled:X.soft,onSelect:()=>be(`soft`)},{label:`Kill (hard)`,icon:`i-lucide-octagon-x`,color:`error`,disabled:X.hard,onSelect:()=>be(`hard`)}]:[]]);function be(e){(e!==`hard`||T.confirm(`Hard stop: abort this run now with no summary and free its sandbox?`))&&(X[e]=!0,fetch(H(n.run,e),{method:`POST`,credentials:`same-origin`}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`)}).catch(()=>{X[e]=!1}))}function Ce(e){e.target?.closest(`a, button`)||T.navigate(d.value)}return(n,y)=>{let w=ee(`RouterLink`),T=k,te=S,O=t;return h(),i(`li`,{class:u([`run group relative isolate rounded-md border-b border-muted hover:bg-(--ui-bg-muted) focus-within:bg-(--ui-bg-muted)`,[e.run.finished?`finished`:`live`,C.value?`leaving`:``,e.nestedUnder?`nested ml-4 border-l-2 border-accented sm:ml-6`:``]]),"data-run-id":e.run.id,"data-parent-id":e.nestedUnder,"data-started-at":String(e.run.startedAt),"data-persisted":e.run.persisted?`1`:void 0,"data-stalled":Y.value?`1`:void 0,"data-expires-at":x.value===void 0?void 0:String(x.value),onClick:Ce},[r(w,{class:`row absolute inset-0 rounded-md focus-visible:outline-2 focus-visible:outline-primary`,to:d.value,"aria-label":`open run ${e.run.label||b(L)(e.run.id)}`},null,8,[`to`,`aria-label`]),g(`div`,{class:u([`body pointer-events-none relative z-[1] flex min-w-0 flex-wrap items-center gap-x-2.5 px-2 max-sm:gap-y-1.5 max-sm:py-3 sm:flex-nowrap sm:py-2`,[e.run.finished?`text-muted`:``,C.value?`opacity-85`:``]])},[g(`span`,Ae,[r(we,{tone:l.value,label:b(R)(e.run),tip:b(J)(e.run),pulse:!e.run.finished},null,8,[`tone`,`label`,`tip`,`pulse`])]),r(T,{text:b(B)(e.run),ui:{text:`whitespace-pre-line`}},{default:p(()=>[g(`span`,{class:u([`when pointer-events-auto shrink-0 font-mono tabular-nums max-sm:order-7 max-sm:pl-5 max-sm:text-xs max-sm:text-dimmed sm:min-w-[8.5em] sm:text-[0.8rem]`,e.run.finished?`text-dimmed`:`text-muted`])},c(b(ne)(e.run.startedAt,e.now)),3)]),_:1},8,[`text`]),_.value?(h(),D(T,{key:0,text:b(ge)(e.run)},{default:p(()=>[g(`span`,{class:u([`who pointer-events-auto min-w-0 shrink-0 truncate text-[0.8rem] max-sm:order-7 max-sm:text-xs sm:w-[14em]`,e.run.finished?`text-dimmed`:`text-muted`]),"data-user-id":e.run.userId,"data-surface":m.value.kind},[g(`span`,Me,c(m.value.kind),1),g(`span`,Ne,c(_.value),1)],10,je)]),_:1},8,[`text`])):(h(),i(`span`,Pe)),a.value.agent?(h(),i(`span`,{key:2,class:u([`agent shrink-0 rounded border px-1.5 font-mono text-[0.68rem] font-medium uppercase tracking-wider max-sm:order-2`,[b(pe)[b(K)(a.value.agent)],e.run.finished?`opacity-55`:``]]),"data-agent-hue":b(K)(a.value.agent)},c(a.value.agent),11,Fe)):f(``,!0),o.value?(h(),D(T,{key:3,text:o.value},{default:p(()=>[g(`a`,{class:`repo pointer-events-auto min-w-0 shrink-0 rounded border border-accented bg-accented/50 px-1.5 font-mono text-[0.72rem] font-medium leading-normal text-toned no-underline hover:border-(--ui-text-dimmed) hover:text-highlighted max-sm:order-3`,href:`https://github.com/${o.value}`,target:`_blank`,rel:`noopener noreferrer`},[g(`span`,Le,c(o.value.slice(0,o.value.indexOf(`/`)+1)),1),g(`span`,Re,c(o.value.slice(o.value.indexOf(`/`)+1)),1)],8,Ie)]),_:1},8,[`text`])):(h(),i(`span`,{key:4,class:u([`scope min-w-0 shrink-0 truncate font-medium max-sm:order-3`,e.run.finished?`text-toned`:`text-highlighted`])},c(a.value.scope),3)),a.value.snippet===void 0?f(``,!0):(h(),i(`span`,ze,c(a.value.snippet),1)),j.value?(h(),i(`span`,{key:6,class:u([`outcome shrink-0 rounded border px-1.5 font-mono text-[0.7rem] max-sm:order-10`,l.value===`red`?`border-bad/30 text-bad`:`border-warn/30 text-warn`])},c(j.value),3)):f(``,!0),M.value?(h(),i(`span`,{key:7,class:u([`stopbadge shrink-0 rounded border px-1.5 font-mono text-[0.7rem] max-sm:order-10`,e.run.stop?.state===`stopped`?`border-accented text-muted`:`border-warn/30 text-warn`])},c(M.value),3)):f(``,!0),Y.value?(h(),i(`span`,{key:8,class:u([`stalled shrink-0 rounded border px-1.5 font-mono text-[0.7rem] max-sm:order-10`,N.value?`border-bad/30 text-bad`:`border-warn/30 text-warn`])},`stalled`,2)):f(``,!0),g(`span`,Be,[r(Oe,{kind:m.value.kind,tip:b(ge)(e.run),url:v.value||void 0},null,8,[`kind`,`tip`,`url`])]),C.value&&x.value!==void 0?(h(),D(T,{key:9,text:`removed at ${b(ye)(x.value)}`},{default:p(()=>[g(`span`,Ve,`gone `+c(b(re)(x.value,e.now)),1)]),_:1},8,[`text`])):f(``,!0),r(T,{text:e.run.finished?`start to finish`:`running for`},{default:p(()=>[g(`span`,{class:u([`elapsed pointer-events-auto ml-auto shrink-0 text-right font-mono text-xs tabular-nums max-sm:order-4 sm:min-w-[4.5em]`,e.run.finished?[A.value?`heat`:`text-muted`,E.value.level>=2?`font-medium`:``]:`text-ok`]),style:s(e.run.finished?A.value:void 0),"data-heat":e.run.finished?E.value.level:void 0},c(b(Z)(e.run,e.now)),15,He)]),_:1},8,[`text`]),y[0]||=g(`span`,{class:`hidden text-xs text-dimmed max-sm:order-8 max-sm:inline`,"aria-hidden":`true`},`·`,-1),r(T,{text:b(fe)(e.run)},{default:p(()=>[g(`span`,Ue,c(b(ue)(e.run)),1)]),_:1},8,[`text`]),ie.value?(h(),D(T,{key:10,text:P.value&&!N.value?b(le)(P.value):b(ae)(e.run,e.now)},{default:p(()=>[g(`span`,{class:u([`pace pointer-events-auto shrink-0 text-right font-mono text-xs tabular-nums max-sm:order-9`,N.value?`text-bad font-medium`:Y.value?`text-warn`:`text-dimmed`]),"data-inherited":P.value&&!N.value?P.value.child?`child`:`waiting`:void 0},c(ie.value),11,We)]),_:1},8,[`text`])):f(``,!0),g(`span`,Ge,[Q.value.length>0?(h(),D(O,{key:0,items:Q.value,content:{align:`end`}},{default:p(()=>[r(te,{class:`pointer-events-auto -my-1.5 -mr-1`,size:`sm`,color:`neutral`,variant:`ghost`,icon:`i-lucide-ellipsis-vertical`,"aria-label":`Run actions`})]),_:1},8,[`items`])):f(``,!0)])],2)],10,ke)}}}),Ke={class:`view-as-picker inline-flex items-center gap-2`},qe={key:0,class:`ml-2 truncate font-mono text-[0.6875rem] text-dimmed`},Je={class:`font-mono`},Ye={key:0,class:`text-bad`},Xe=l({__name:`ViewAsPicker`,props:{people:{}},setup(t){let n=t,a=E(!1),o=E(``),s=O(()=>n.people.map(e=>({label:e.name??e.id,value:e.id,...e.name?{suffix:e.id}:{}})));async function l(t){let n=typeof t==`string`?t.trim():``;if(!n)return;a.value=!0,o.value=``;let r=await e(n);r.ok||(a.value=!1,o.value=r.message)}return(e,t)=>{let n=A;return h(),i(`span`,Ke,[r(n,{id:`view-as-pick`,"model-value":``,items:s.value,"value-key":`value`,"filter-fields":[`label`,`value`],"create-item":``,placeholder:`View as…`,"aria-label":`view the dashboard as a person`,disabled:a.value,size:`xs`,class:`w-60 text-xs`,ui:{itemTrailing:`min-w-0`},"onUpdate:modelValue":l,onCreate:l},{"item-trailing":p(({item:e})=>[e.suffix?(h(),i(`span`,qe,c(e.suffix),1)):f(``,!0)]),"create-item-label":p(({item:e})=>[t[0]||=x(` View as `,-1),g(`span`,Je,c(e),1)]),_:1},8,[`items`,`disabled`]),o.value?(h(),i(`span`,Ye,c(o.value),1)):f(``,!0)])}}}),Ze={class:`conn flex items-center gap-1.5`},Qe={id:`state`,class:`text-xs text-muted`},$e={class:`toolbar mb-1.5 flex items-center gap-4 px-2 text-xs text-muted`},et={id:`livecount`,class:`count font-mono tabular-nums`},tt={class:`filter ml-auto inline-flex items-center gap-4`},nt={class:`toggle inline-flex cursor-pointer select-none items-center gap-1.5 text-toned hover:text-highlighted`},rt={class:`toggle inline-flex cursor-pointer select-none items-center gap-1.5 text-toned hover:text-highlighted`},it=[`checked`],at={id:`minehint`,class:`sr-only`},ot={class:`toggle inline-flex cursor-pointer select-none items-center gap-1.5 text-toned hover:text-highlighted`},st=[`checked`],ct={id:`retention`,class:`sr-only`},lt={key:0,class:`banner mb-3 rounded-md border border-warn px-2.5 py-1.5 text-[0.8rem] text-warn`,role:`status`},ut={id:`runs`,class:`m-0 list-none border-t border-muted p-0`},dt={key:0,id:`leaving`,class:`divider flex items-baseline gap-2 border-b border-dashed border-warn/40 px-2 pb-1.5 pt-3 font-mono text-[0.72rem] uppercase tracking-wider text-warn`,role:`separator`},ft={key:1,id:`empty`,class:`empty px-2 py-2 text-muted`},pt={key:1,class:`pager mt-3 flex items-baseline gap-2 px-2 text-[0.8rem] text-muted`,"aria-label":`Completed runs pages`},mt={class:`range font-mono tabular-nums text-dimmed`},ht=l({__name:`RunsIndexPage`,setup(e){let t=w(`runs`),s=t?.all??!1,l=t?.mine??!1,u=new URLSearchParams(T.search());if(!u.has(`mine`)&&!u.has(`all`)&&t){let e=T.readPref(Q.mine)===`1`,t=T.readPref(Q.all)===`1`;(e||t)&&T.navigate(A(t,e))}let S=t?.asUser?`Only the runs ${t.asUser.name??`you`} requested`:`Only the runs this session requested from Threads. Sign in with the email of your Slack account to see your Slack runs too.`;function A(e,t){let n=[e?`all=1`:``,t?`mine=1`:``].filter(Boolean).join(`&`);return n?`/runs?${n}`:`/runs`}let ne=t?.olderThan!==void 0,F=t?.retentionDays??null,I=F===null?void 0:F*864e5,L=_(F),R=te(new Map);for(let e of t?.rows??[])R.set(e.id,e);let z=P(t?.now),B=E({tone:`amber`,text:`connecting…`}),V=E(!1),H=O(()=>[...R.values()].filter(e=>V.value||e.agent!==`command`&&e.agent!==`door`)),U=O(()=>Y(H.value,z.value)),W=O(()=>H.value.filter(e=>!e.finished).length),G=O(()=>I===void 0?-1:U.value.findIndex(e=>{let t=me(e.head,I);return t!==void 0&&t-z.value<=864e5})),K=O(()=>G.value===-1?U.value:U.value.slice(0,G.value)),q=O(()=>G.value===-1?[]:U.value.slice(G.value)),J=s?`All runs`:`Live runs`;o(W,e=>{T.setTitle((e>0?`(${e}) `:``)+J),T.setFavicon(e>0?M:j)},{immediate:!0});function ae(e){let t=e.target.checked;T.writePref(Q.all,t?`1`:`0`),T.navigate(A(t,l))}function oe(e){let t=e.target.checked;T.writePref(Q.mine,t?`1`:`0`),T.navigate(A(s,t))}let se=O(()=>t?.olderThan===void 0?``:re(t.olderThan,z.value)),ce=N(),Z=null;return v(()=>{Z=ce(`/runs?stream=1${s?`&all=1`:``}${l?`&mine=1`:``}`);let e=!1;Z.onopen=()=>{if(e){T.reload();return}e=!0,B.value={tone:`green`,text:`connected`}},Z.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}let n=t.type===`removed`?t.id:t.run?.id,r=n?R.get(n):void 0;if(ne&&!r)return;let i=ie(t,s,r?.persisted===!0);i.op===`upsert`?R.set(i.run.id,X(R.get(i.run.id),i.run)):i.op===`remove`&&R.delete(i.id)},Z.onerror=()=>{Z&&Z.readyState===2?B.value={tone:`red`,text:`disconnected`}:B.value={tone:`amber`,text:`connecting…`}}}),y(()=>{Z?.close()}),(e,o)=>{let u=k,_=ee(`RouterLink`);return h(),D(n,{title:b(J),nav:`runs`},{status:p(()=>[g(`span`,Ze,[r(we,{tone:B.value.tone,label:B.value.text},null,8,[`tone`,`label`]),g(`span`,Qe,c(B.value.text),1)])]),default:p(()=>[r(Ce,{current:`runs`}),g(`div`,$e,[g(`span`,et,c(W.value)+` running`,1),g(`span`,tt,[b(t)?.viewAs?(h(),D(Xe,{key:0,people:b(t).viewAs.people},null,8,[`people`])):f(``,!0),g(`label`,nt,[d(g(`input`,{id:`showbookkeeping`,"onUpdate:modelValue":o[0]||=e=>V.value=e,type:`checkbox`,class:`accent-(--ui-bg-inverted)`,"aria-label":`Show bookkeeping runs`,"aria-controls":`runs`},null,512),[[m,V.value]]),o[1]||=x(` Show bookkeeping runs `,-1)]),r(u,{text:b(S)},{default:p(()=>[g(`label`,rt,[g(`input`,{id:`showmine`,type:`checkbox`,class:`accent-(--ui-bg-inverted)`,checked:b(l),"aria-describedby":`minehint`,onChange:oe},null,40,it),o[2]||=x(` Show only mine `,-1)])]),_:1},8,[`text`]),g(`span`,at,c(b(S)),1),g(`label`,ot,[g(`input`,{id:`showdone`,type:`checkbox`,class:`accent-(--ui-bg-inverted)`,checked:b(s),"aria-describedby":`retention`,onChange:ae},null,40,st),o[3]||=x(` Show completed `,-1)]),r(u,{text:b(L)},{default:p(()=>[...o[4]||=[g(`span`,{class:`help inline-flex size-[1.1em] cursor-help items-center justify-center rounded-full border border-accented text-[0.7rem] leading-none text-dimmed hover:border-(--ui-text-dimmed) hover:text-toned`,tabindex:`0`},`?`,-1)]]),_:1},8,[`text`]),g(`span`,ct,c(b(L)),1)])]),b(t)?.storeUnavailable?(h(),i(`p`,lt,c(b(t).storeUnavailable),1)):f(``,!0),g(`ul`,ut,[(h(!0),i(C,null,a(K.value,e=>(h(),i(C,{key:e.head.id},[r($,{run:e.head,now:b(z),"retention-ms":b(I),children:e.children},null,8,[`run`,`now`,`retention-ms`,`children`]),(h(!0),i(C,null,a(e.children,t=>(h(),D($,{key:t.id,run:t,now:b(z),"retention-ms":b(I),"nested-under":e.head.id},null,8,[`run`,`now`,`retention-ms`,`nested-under`]))),128))],64))),128)),q.value.length>0?(h(),i(`li`,dt,[...o[5]||=[g(`span`,{"aria-hidden":`true`,class:`text-sm tracking-normal`},`⏳`,-1),g(`span`,{class:`whitespace-nowrap`},`Leaving within a day`,-1),g(`span`,{class:`normal-case tracking-normal text-dimmed max-sm:hidden`},`— each row says when it is removed`,-1)]])):f(``,!0),(h(!0),i(C,null,a(q.value,e=>(h(),i(C,{key:e.head.id},[r($,{run:e.head,now:b(z),"retention-ms":b(I),children:e.children},null,8,[`run`,`now`,`retention-ms`,`children`]),(h(!0),i(C,null,a(e.children,t=>(h(),D($,{key:t.id,run:t,now:b(z),"retention-ms":b(I),"nested-under":e.head.id},null,8,[`run`,`now`,`retention-ms`,`nested-under`]))),128))],64))),128)),U.value.length===0?(h(),i(`li`,ft,c(b(l)?b(s)?`No runs of yours.`:`No active runs of yours.`:b(s)?`No runs.`:`No active runs.`),1)):f(``,!0)]),b(s)&&(b(t)?.olderHref||b(t)?.olderThan!==void 0)?(h(),i(`nav`,pt,[b(t)?.olderThan===void 0?f(``,!0):(h(),i(C,{key:0},[r(_,{class:`text-primary hover:underline`,to:A(!0,b(l))},{default:p(()=>[...o[6]||=[x(`← Newest runs`,-1)]]),_:1},8,[`to`]),g(`span`,mt,`· runs finished before `+c(se.value),1)],64)),b(t)?.olderHref?(h(),D(_,{key:1,class:`older ml-auto text-primary hover:underline`,to:b(t).olderHref},{default:p(()=>[...o[7]||=[x(`Older runs →`,-1)]]),_:1},8,[`to`])):f(``,!0)])):f(``,!0)]),_:1},8,[`title`])}}});export{ht as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./AppShell-DPJVhUGP.js";import{Cn as t,Cr as n,Li as r,Mn as i,Sn as a,Tr as o,Xr as s,_r as c,kn as l,ln as u,xn as d,yn as f}from"./browser-CCImen5O.js";var p={key:0,class:`tabs mb-3.5 flex gap-5 border-b border-muted px-2 text-[0.8rem]`,"aria-label":`Runs views`},m=[{id:`runs`,href:`/runs`,label:`Runs`},{id:`scheduled`,href:`/runs/scheduled`,label:`Scheduled`,on:e=>e.schedules}];function h(e,t){return m.filter(n=>n.id===t||n.on===void 0||e!==null&&n.on(e))}var g=i({__name:`RunsTabs`,props:{current:{}},setup(i){let m=i,g=e(),_=f(()=>h(g,m.current));return(e,f)=>{let m=o(`RouterLink`);return _.value.length>1?(c(),t(`nav`,p,[(c(!0),t(u,null,n(_.value,e=>(c(),d(m,{key:e.id,to:e.href,"aria-current":e.id===i.current?`page`:void 0,class:`-mb-px border-b border-transparent pb-2 pt-1.5 text-muted no-underline hover:text-highlighted aria-[current=page]:border-(--ui-text-highlighted) aria-[current=page]:font-medium aria-[current=page]:text-highlighted`},{default:s(()=>[l(r(e.label),1)]),_:2},1032,[`to`,`aria-current`]))),128))])):a(``,!0)}}});export{g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-DPJVhUGP.js";import{An as t,Cn as n,Cr as r,Li as i,Mn as a,Pi as o,Sn as s,Tr as c,Xr as l,_r as u,bn as d,ji as f,kn as p,ln as m,o as h,xn as g,yn as _}from"./browser-CCImen5O.js";import{t as v}from"./Tooltip-Dfot16IA.js";import{n as y}from"./wallClock-x0hjr0J_.js";import{t as ee}from"./indexFormat-B-pd4r7Y.js";import{i as b}from"./format-BldUwl_R.js";import{t as x}from"./RunsTabs-C7Ua3XX5.js";function S(e,t){return{kind:`schedule`,id:`schedule:${e}`,grants:t}}S(`self-improvement`,Object.freeze({actions:new Set([`friction:read`,`friction:write`]),channels:`all`,repos:new Set}));function C(e,t){let n=e-t,r=Math.floor(Math.abs(n)/6e4),i=Math.floor(r/60),a=Math.floor(i/24),o=a>0?`${a}d ${i%24}h`:i>0?`${i}h ${r%60}m`:r>0?`${r}m`:`<1m`;return n>=0?`in ${o}`:`${o} ago`}var w={healthz:`container health check`,watchdog:`resident watchdog`},T={completed:`succeeded`,failed:`failed`,stopped_soft:`stopped early`,stopped_hard:`killed`,"no-run":`no run created`,"ingress-error":`ingress error`,misconfigured:`misconfigured — nothing ran`},E={completed:`ok`,failed:`bad`,stopped_soft:`warn`,stopped_hard:`warn`,"no-run":`warn`,"ingress-error":`bad`,misconfigured:`bad`},D=120;function O(e){let t=e.replace(/\s+/g,` `).trim();return t=t.replace(/^[^\p{L}\p{N}*_`<[(]+/u,``),t=t.replace(/^\*[^*]{1,60}\*\s+[—–-]\s+/,``),t=t.replace(/^[^\p{L}\p{N}]+/u,``).trim(),t.length>D?`${t.slice(0,D)}…`:t}var k={key:0,class:`px-2 py-1.5 text-muted`},A={key:1,id:`scheduled`,"aria-label":`Scheduled jobs`},j={class:`m-0 list-none p-0`},M=[`data-schedule`],N={class:`def flex flex-wrap items-baseline gap-x-2 gap-y-1.5 text-[0.8rem] text-toned`},P={class:`name font-medium text-highlighted max-sm:text-[0.9rem]`},F={class:`max-sm:ml-auto`},I={class:`rounded-xs bg-accented px-1.5 py-0.5 text-toned`},L={class:`max-sm:flex max-sm:basis-full max-sm:flex-wrap max-sm:items-baseline max-sm:gap-2 sm:contents`},R={class:`rounded-xs bg-accented px-1.5 py-0.5 text-toned`},z={class:`rounded-xs bg-accented px-1.5 py-0.5 text-toned`},te={key:1,class:`text-dimmed`},B={class:`max-sm:flex max-sm:basis-full max-sm:flex-wrap max-sm:items-baseline max-sm:gap-2 sm:contents`},V={class:`rounded-xs bg-accented px-1.5 py-0.5 text-toned`},H=[`title`],U={class:`max-sm:hidden`},W={class:`font-medium text-highlighted`},G={class:`text-dimmed`},K={class:`text-toned sm:hidden`},q={key:1,class:`text-dimmed`},J={class:`fire mt-1.5 font-mono text-xs text-muted max-sm:flex max-sm:flex-wrap max-sm:items-baseline max-sm:gap-x-1.5 max-sm:gap-y-1 sm:overflow-hidden sm:text-ellipsis sm:whitespace-nowrap`},Y=[`title`],X=[`title`],Z=[`title`],Q={key:1,class:`text-dimmed`},ne={key:0,class:`mt-2.5 px-2 text-xs text-muted`},$=a({__name:`ScheduledPage`,setup(a){let S=h(`scheduled`),D=_(()=>S?.now??y()),$=_(()=>S?.rows??null),re={ok:`text-ok`,bad:`text-bad`,warn:`text-warn`};return(a,h)=>{let _=v,y=c(`RouterLink`);return u(),g(e,{title:`Scheduled runs`,nav:`runs`},{default:l(()=>[t(x,{current:`scheduled`}),$.value===null?(u(),n(`p`,k,`No schedule registry configured.`)):(u(),n(`section`,A,[d(`ul`,j,[(u(!0),n(m,null,r($.value,e=>(u(),n(`li`,{key:e.name,class:`border-b border-muted px-2 pb-3 pt-2.5`,"data-schedule":e.name},[d(`div`,N,[t(_,{text:e.description},{default:l(()=>[d(`span`,P,i(e.name),1)]),_:2},1032,[`text`]),h[5]||=d(`span`,{class:`hidden text-accented sm:inline`,"aria-hidden":`true`},`·`,-1),d(`span`,F,[h[0]||=d(`span`,{class:`mr-1 font-mono text-[0.62rem] uppercase tracking-wider text-dimmed`},`on`,-1),d(`code`,I,i(e.worker),1)]),h[6]||=d(`span`,{class:`hidden text-accented sm:inline`,"aria-hidden":`true`},`·`,-1),d(`span`,L,[e.action.type===`run`?(u(),n(m,{key:0},[d(`code`,R,i(e.action.command),1),h[1]||=d(`span`,{class:`text-dimmed`},`as`,-1),d(`code`,z,i(e.action.identity),1)],64)):(u(),n(`span`,te,i(f(w)[e.action.type])+` — not a run`,1))]),h[7]||=d(`span`,{class:`hidden text-accented sm:inline`,"aria-hidden":`true`},`·`,-1),d(`span`,B,[d(`code`,V,i(e.cron),1),h[3]||=d(`span`,{class:`text-dimmed`},`UTC`,-1),h[4]||=d(`span`,{class:`hidden text-accented sm:inline`,"aria-hidden":`true`},`·`,-1),d(`span`,{class:`next font-mono tabular-nums max-sm:ml-auto`,title:e.nextFireAt===void 0?void 0:f(b)(e.nextFireAt)},[h[2]||=d(`span`,{class:`mr-1 font-mono text-[0.62rem] uppercase tracking-wider text-dimmed`},`next`,-1),e.nextFireAt===void 0?(u(),n(`span`,q,`never`)):(u(),n(m,{key:0},[d(`span`,U,[d(`b`,W,i(f(ee)(e.nextFireAt,D.value)),1),d(`span`,G,` (`+i(f(C)(e.nextFireAt,D.value))+`)`,1)]),d(`span`,K,i(f(C)(e.nextFireAt,D.value)),1)],64))],8,H)])]),d(`div`,J,[h[12]||=d(`span`,{class:`mr-1 font-mono text-[0.62rem] uppercase tracking-wider text-dimmed`},`last`,-1),e.last?(u(),n(m,{key:0},[d(`span`,{class:o([`outcome`,re[f(E)[e.last.outcome]]])},i(f(T)[e.last.outcome]),3),h[11]||=d(`span`,{class:`mx-1.5 text-accented max-sm:mx-0`,"aria-hidden":`true`},`·`,-1),d(`span`,{class:`when text-toned`,title:f(b)(e.last.firedAt)},i(f(C)(e.last.firedAt,D.value)),9,Y),e.last.runId?(u(),n(m,{key:0},[h[8]||=d(`span`,{class:`mx-1.5 text-accented max-sm:mx-0`,"aria-hidden":`true`},`·`,-1),e.last.runHref?(u(),g(y,{key:0,class:`text-primary hover:underline`,to:e.last.runHref},{default:l(()=>[p(`run `+i(e.last.runId.slice(0,8)),1)]),_:2},1032,[`to`])):(u(),n(m,{key:1},[p(`run `+i(e.last.runId.slice(0,8)),1)],64))],64)):s(``,!0),e.last.traceId?(u(),n(m,{key:1},[h[9]||=d(`span`,{class:`mx-1.5 text-accented max-sm:mx-0`,"aria-hidden":`true`},`·`,-1),d(`span`,{class:`trace text-dimmed`,title:`trace ${e.last.traceId}`},`trace `+i(e.last.traceId.slice(0,8)),9,X)],64)):s(``,!0),e.last.detail&&f(O)(e.last.detail)?(u(),n(m,{key:2},[h[10]||=d(`span`,{class:`mx-1.5 text-accented max-sm:hidden`,"aria-hidden":`true`},`·`,-1),d(`span`,{class:`detail font-sans max-sm:line-clamp-2 max-sm:basis-full max-sm:whitespace-normal`,title:e.last.detail},i(f(O)(e.last.detail)),9,Z)],64)):s(``,!0)],64)):(u(),n(`span`,Q,i(f(S)?.firingsUnavailable?`unknown`:`never fired`),1))])],8,M))),128))]),f(S)?.firingsUnavailable?(u(),n(`p`,ne,` Firing history unavailable: `+i(f(S).firingsUnavailable),1)):s(``,!0)]))]),_:1})}}});export{$ as default};
|