@coreplane/switchboard 1.233.0 → 1.234.0
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/deploy/cloudflare-resident/worker.ts +200 -214
- package/dist/assets/package-lock.json +3 -3
- package/dist/assets/package.json +1 -1
- package/dist/assets/source.json +3 -3
- package/dist/assets/src/agents/registry.ts +13 -7
- package/dist/assets/src/core/provider.ts +9 -6
- package/dist/assets/src/core/runEvents.ts +18 -0
- package/dist/assets/src/execution/residentCleanliness.ts +45 -5
- package/dist/assets/src/execution/residentRebind.ts +92 -77
- package/dist/assets/src/execution/residentReuse.ts +7 -18
- package/dist/assets/src/execution/residentSteps.ts +0 -1
- package/dist/assets/web/dist/.vite/manifest.json +67 -28
- package/dist/assets/web/dist/assets/{ResidentDetailPage-V4K35SYX.js → ResidentDetailPage-C_WNBUao.js} +1 -1
- package/dist/assets/web/dist/assets/{ResidentsIndexPage-3HuYaDwD.js → ResidentsIndexPage-D1sTyaZ_.js} +1 -1
- package/dist/assets/web/dist/assets/RunFoldRow-C_bcTSjA.js +5 -0
- package/dist/assets/web/dist/assets/RunRoutePage-BWTi_6PG.js +10 -0
- package/dist/assets/web/dist/assets/RunsIndexPage-H6GkSv0a.js +1 -0
- package/dist/assets/web/dist/assets/{ScheduledPage-dfrjQ5E9.js → ScheduledPage-BLcPzm1S.js} +1 -1
- package/dist/assets/web/dist/assets/{StatusDot-DexKtvUC.js → StatusDot-Ct6AtHhS.js} +1 -1
- package/dist/assets/web/dist/assets/{Tooltip-DGQ2gu9M.js → Tooltip-qol5Boof.js} +1 -1
- package/dist/assets/web/dist/assets/UnitRoutePage-CIhTEwN7.js +1 -0
- package/dist/assets/web/dist/assets/{dist-boTdDLF4.js → dist-DwtJj-ou.js} +1 -1
- package/dist/assets/web/dist/assets/favicon-BQsePYv5.js +1 -0
- package/dist/assets/web/dist/assets/indexRow-Bnj883ii.js +1 -0
- package/dist/assets/web/dist/assets/{main-BHhLVMQh.js → main-CRtlGxRm.js} +2 -2
- package/dist/assets/web/dist/assets/main-Dm11o0hc.css +1 -0
- package/dist/cli.js +1156 -570
- package/package.json +1 -1
- package/dist/assets/web/dist/assets/RunRoutePage-Dr867-Ha.js +0 -13
- package/dist/assets/web/dist/assets/RunsIndexPage-D_lpXsr8.js +0 -1
- package/dist/assets/web/dist/assets/favicon-CWPcvWvp.js +0 -1
- package/dist/assets/web/dist/assets/main-CAVqMbiX.css +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coreplane/switchboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.234.0",
|
|
4
4
|
"description": "Mention it in Slack and an agent reviews the PR, ships the fix, or answers the question — on the model you choose, with its tools running where you decide.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://openswitchboard.dev",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-boTdDLF4.js","assets/AppShell-lYVcj-k7.js","assets/seed-DeKSHrt2.js","assets/main-BHhLVMQh.js","assets/main-CAVqMbiX.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{C as e,S as t,_ as n,b as r,c as i,g as a,h as o,m as s,n as c,p as l,r as u,s as d,t as f,v as p,y as m}from"./AppShell-lYVcj-k7.js";import{A as h,B as g,Ci as _,Dr as v,Gn as y,H as b,Ht as ee,J as te,Jn as ne,Lr as x,Mr as S,N as C,Or as re,P as ie,Pr as ae,Q as w,Qn as T,Rn as oe,Si as se,U as E,Ut as D,Wn as O,Wt as ce,Xt as k,_ as le,_n as A,a as ue,at as de,b as fe,ci as j,cn as M,d as pe,di as me,dr as N,et as he,f as ge,ft as _e,g as ve,gn as P,h as ye,hi as F,ir as I,it as be,j as xe,kn as Se,ln as L,m as Ce,mi as we,nr as Te,nt as R,oi as z,on as B,or as Ee,p as De,r as Oe,sn as V,t as H,u as ke,un as U,ur as W,vi as G,wi as K,x as q,xi as J,xr as Ae,y as je,yn as Y,z as Me,zr as Ne}from"./seed-DeKSHrt2.js";import{t as Pe}from"./Tooltip-DGQ2gu9M.js";import{r as Fe,t as Ie}from"./main-BHhLVMQh.js";import{n as Le,t as Re}from"./wallClock-61NpVkY6.js";import{t as ze}from"./NotFoundPage-BzWS4Ca1.js";import{t as Be}from"./indexFormat-B-pd4r7Y.js";import{A as Ve,D as He,E as Ue,M as X,O as We,b as Ge,j as Ke,k as qe,n as Je,t as Ye}from"./favicon-CWPcvWvp.js";import{t as Z}from"./localIso-L06jV29p.js";var[Q,Xe]=g(`DialogRoot`),Ze=Y({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=de(n,`open`,t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=j(),a=j(),{modal:o,unmountOnHide:s}=F(n);return Xe({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)=>N(e.$slots,`default`,{open:G(r),close:()=>r.value=!1})}}),Qe=Y({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;C();let n=Q();return(e,r)=>(I(),M(G(h),O(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>G(n).onOpenChange(!1)}),{default:x(()=>[N(e.$slots,`default`)]),_:3},16,[`type`]))}}),$e=Y({__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(e,{emit:t}){let r=e,i=t,o=Q(),{forwardRef:s,currentElement:c}=C();return o.titleId||=m(void 0,`reka-dialog-title`),o.descriptionId||=m(void 0,`reka-dialog-description`),T(()=>{o.contentElement=c,Me()!==document.body&&(o.triggerElement.value=Me())}),(e,t)=>(I(),M(G(n),{"as-child":``,loop:``,trapped:r.trapFocus,present:r.present,onMountAutoFocus:t[5]||=e=>i(`openAutoFocus`,e),onUnmountAutoFocus:t[6]||=e=>i(`closeAutoFocus`,e)},{default:x(()=>[A(G(p),O({id:G(o).contentId,ref:G(s),as:e.as,"as-child":e.asChild,present:r.present,"disable-outside-pointer-events":e.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":G(o).descriptionId,"aria-labelledby":G(o).titleId,"data-state":G(a)(G(o).open.value)},e.$attrs,{onDismiss:t[0]||=e=>G(o).onOpenChange(!1),onEscapeKeyDown:t[1]||=e=>i(`escapeKeyDown`,e),onFocusOutside:t[2]||=e=>i(`focusOutside`,e),onInteractOutside:t[3]||=e=>i(`interactOutside`,e),onPointerDownOutside:t[4]||=e=>i(`pointerDownOutside`,e)}),{default:x(()=>[N(e.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`present`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`,`present`]))}}),et=Y({__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 n=e,i=t,a=Q(),o=ie(i),{forwardRef:s,currentElement:c}=C(),l=B(()=>n.present?c.value:void 0);r(l);let u=B(()=>{let{present:e,...t}=n;return t});return S(()=>n.present,(e,t)=>{!e&&t&&a.triggerElement.value?.focus()}),(e,t)=>(I(),M($e,O({...u.value,...G(o)},{ref:G(s),present:e.present,"trap-focus":G(a).open.value,"disable-outside-pointer-events":n.disableOutsidePointerEvents,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(e.preventDefault(),G(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:x(()=>[N(e.$slots,`default`)]),_:3},16,[`present`,`trap-focus`,`disable-outside-pointer-events`]))}}),tt=Y({__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=ie(t);C();let i=Q(),a=j(!1),o=j(!1),s=B(()=>{let{present:e,...t}=n;return t});return S(()=>n.present,(e,t)=>{!e&&t&&(a.value||i.triggerElement.value?.focus(),a.value=!1,o.value=!1)}),(e,t)=>(I(),M($e,O({...s.value,...G(r)},{present:e.present,"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(a.value||G(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;G(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:x(()=>[N(e.$slots,`default`)]),_:3},16,[`present`]))}}),nt=Y({__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=Q(),a=ie(r),{forwardRef:o}=C();return(e,t)=>(I(),M(G(xe),{present:e.forceMount||G(i).open.value,"force-mount":e.forceMount||!G(i).unmountOnHide.value},{default:x(({present:t})=>[G(i).modal.value?Ne((I(),M(et,O({key:0,ref:G(o),present:G(i).unmountOnHide.value||t},{...n,...G(a),...e.$attrs}),{default:x(()=>[N(e.$slots,`default`)]),_:2},1040,[`present`])),[[ee,G(i).unmountOnHide.value||t]]):Ne((I(),M(tt,O({key:1,ref:G(o),present:G(i).unmountOnHide.value||t},{...n,...G(a),...e.$attrs}),{default:x(()=>[N(e.$slots,`default`)]),_:2},1040,[`present`])),[[ee,G(i).unmountOnHide.value||t]])]),_:3},8,[`present`,`force-mount`]))}}),rt=Y({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;C();let n=Q();return(e,r)=>(I(),M(G(h),O(t,{id:G(n).descriptionId}),{default:x(()=>[N(e.$slots,`default`)]),_:3},16,[`id`]))}}),it=Y({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},setup(t){let n=t,r=Q(),i=e(n.present);return S(()=>n.present,e=>i.value=e),C(),(e,t)=>(I(),M(G(h),{as:e.as,"as-child":e.asChild,"data-state":G(r).open.value?`open`:`closed`,style:{"pointer-events":`auto`},onPointerdown:t[0]||=ce(()=>{},[`left`,`self`,`prevent`])},{default:x(()=>[N(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),at=Y({__name:`DialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=Q(),{forwardRef:n}=C();return(e,r)=>G(t)?.modal.value?(I(),M(G(xe),{key:0,present:e.forceMount||G(t).open.value,"force-mount":e.forceMount||!G(t).unmountOnHide.value},{default:x(({present:r})=>[Ne(A(it,O(e.$attrs,{ref:G(n),as:e.as,"as-child":e.asChild,present:G(t).unmountOnHide.value||r}),{default:x(()=>[N(e.$slots,`default`)]),_:2},1040,[`as`,`as-child`,`present`]),[[ee,G(t).unmountOnHide.value||r]])]),_:3},8,[`present`,`force-mount`])):L(`v-if`,!0)}}),ot=Y({__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)=>(I(),M(G(q),se(Se(t)),{default:x(()=>[N(e.$slots,`default`)]),_:3},16))}}),st=Y({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let t=e,n=Q();return C(),(e,r)=>(I(),M(G(h),O(t,{id:G(n).titleId}),{default:x(()=>[N(e.$slots,`default`)]),_:3},16,[`id`]))}}),ct=Y({__name:`DialogTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=Q(),{forwardRef:r,currentElement:i}=C();return n.contentId||=m(void 0,`reka-dialog-content`),T(()=>{n.triggerElement.value=i.value}),(e,i)=>(I(),M(G(h),O(t,{ref:G(r),type:e.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":G(n).open.value||!1,"aria-controls":G(n).open.value?G(n).contentId:void 0,"data-state":G(n).open.value?`open`:`closed`,onClick:G(n).onOpenToggle}),{default:x(()=>[N(e.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`onClick`]))}}),lt=Y({__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(e){let t=e,n=i(),r=m(),a=B(()=>t.tabStopId||r),c=B(()=>n.currentTabStopId.value===a.value),{getItems:u,CollectionItem:d}=fe();T(()=>{t.focusable&&n.onFocusableItemAdd()}),Te(()=>{t.focusable&&n.onFocusableItemRemove()}),S(()=>t.focusable,(e,t)=>{e!==t&&(e?n.onFocusableItemAdd():n.onFocusableItemRemove())});function f(e){if(e.key===`Tab`&&e.shiftKey){n.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let r=s(e,n.orientation.value,n.dir.value);if(r!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||!t.allowShiftKey&&e.shiftKey)return;e.preventDefault();let i=[...u().map(e=>e.ref).filter(e=>e.dataset.disabled!==``)];if(r===`last`)i.reverse();else if(r===`prev`||r===`next`){r===`prev`&&i.reverse();let t=i.indexOf(e.currentTarget);i=n.loop.value?o(i,t+1):i.slice(t+1)}y(()=>l(i))}}return(e,t)=>(I(),M(G(d),null,{default:x(()=>[A(G(h),{tabindex:c.value?0:-1,"data-orientation":G(n).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?G(n).onItemFocus(a.value):t.preventDefault()},onFocus:t[1]||=e=>G(n).onItemFocus(a.value),onKeydown:f},{default:x(()=>[N(e.$slots,`default`)]),_:3},8,[`tabindex`,`data-orientation`,`data-active`,`data-disabled`,`as`,`as-child`])]),_:3}))}}),[ut,dt]=g(`TabsRoot`),ft=Y({__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(e,{emit:n}){let r=e,i=n,{orientation:a,unmountOnHide:o,dir:s}=F(r),c=t(s);C();let l=de(r,`modelValue`,i,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),u=j(),d=me(new Set);return dt({modelValue:l,changeModelValue:e=>{l.value=e},orientation:a,dir:c,unmountOnHide:o,activationMode:r.activationMode,baseId:m(void 0,`reka-tabs`),tabsList:u,contentIds:d,registerContent:e=>{d.value=new Set([...d.value,e])},unregisterContent:e=>{let t=new Set(d.value);t.delete(e),d.value=t}}),(e,t)=>(I(),M(G(h),{dir:G(c),"data-orientation":G(a),"as-child":e.asChild,as:e.as},{default:x(()=>[N(e.$slots,`default`,{modelValue:G(l)})]),_:3},8,[`dir`,`data-orientation`,`as-child`,`as`]))}});function pt(e,t){return`${e}-trigger-${t}`}function mt(e,t){return`${e}-content-${t}`}var ht=Y({__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}=C(),r=ut(),i=B(()=>pt(r.baseId,t.value)),a=B(()=>mt(r.baseId,t.value)),o=B(()=>t.value===r.modelValue.value),s=j(o.value);return T(()=>{r.registerContent(t.value),requestAnimationFrame(()=>{s.value=!1})}),ne(()=>{r.unregisterContent(t.value)}),(e,t)=>(I(),M(G(xe),{present:e.forceMount||o.value,"force-mount":``},{default:x(({present:t})=>[A(G(h),{id:a.value,ref:G(n),"as-child":e.asChild,as:e.as,role:`tabpanel`,"data-state":o.value?`active`:`inactive`,"data-orientation":G(r).orientation.value,"aria-labelledby":i.value,hidden:!t,tabindex:`0`,style:_({animationDuration:s.value?`0s`:void 0})},{default:x(()=>[!G(r).unmountOnHide.value||t?N(e.$slots,`default`,{key:0}):L(`v-if`,!0)]),_:2},1032,[`id`,`as-child`,`as`,`data-state`,`data-orientation`,`aria-labelledby`,`hidden`,`style`])]),_:3},8,[`present`]))}}),gt=Y({__name:`TabsIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e,{expose:t}){let n=e,r=ut();t({updateIndicatorStyle:s}),C();let i=R(),a=j({size:null,thickness:null,position:null}),o=j([]);S(()=>[r.modelValue.value,r?.dir.value],()=>{s()},{immediate:!0,flush:`post`}),ae(()=>{o.value=Array.from(r.tabsList.value?.querySelectorAll(`[role="tab"]`)||[])}),be(B(()=>[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)=>G(i)&&typeof a.value.size==`number`?(I(),M(G(h),O({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:x(()=>[N(e.$slots,`default`)]),_:3},16,[`style`])):L(`v-if`,!0)}}),_t=Y({__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}=F(e),{forwardRef:n,currentElement:r}=C(),i=ut();return i.tabsList=r,(e,r)=>(I(),M(G(d),{"as-child":``,orientation:G(i).orientation.value,dir:G(i).dir.value,loop:G(t)},{default:x(()=>[A(G(h),{ref:G(n),role:`tablist`,"as-child":e.asChild,as:e.as,"aria-orientation":G(i).orientation.value},{default:x(()=>[N(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`aria-orientation`])]),_:3},8,[`orientation`,`dir`,`loop`]))}}),vt=Y({__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}=C(),r=ut(),i=B(()=>pt(r.baseId,t.value)),a=B(()=>r.contentIds.value.has(t.value)?mt(r.baseId,t.value):void 0),o=B(()=>t.value===r.modelValue.value);return(e,t)=>(I(),M(G(lt),{"as-child":``,focusable:!e.disabled,active:o.value},{default:x(()=>[A(G(h),{id:i.value,ref:G(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":G(r).orientation.value,onMousedown:t[0]||=ce(t=>{!e.disabled&&t.ctrlKey===!1?G(r).changeModelValue(e.value):t.preventDefault()},[`left`]),onKeydown:t[1]||=D(t=>G(r).changeModelValue(e.value),[`enter`,`space`]),onFocus:t[2]||=()=>{let t=G(r).activationMode!==`manual`;!o.value&&!e.disabled&&t&&G(r).changeModelValue(e.value)}},{default:x(()=>[N(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`]))}});function yt(e){let t=new Date(e),n=t.getHours(),r=e=>String(e).padStart(2,`0`),i=new Intl.DateTimeFormat(void 0,{timeZoneName:`short`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value;return`${n%12==0?12:n%12}:${r(t.getMinutes())}:${r(t.getSeconds())} ${n<12?`AM`:`PM`}${i?` ${i}`:``}`}function bt(e){return e>0?e<1024?`${e} B`:e<1048576?`${(Math.round(e/102.4)/10).toFixed(1)} KB`:e<1073741824?`${(Math.round(e/104857.6)/10).toFixed(1)} MB`:`${(Math.round(e/107374182.4)/10).toFixed(1)} GB`:`0 B`}function xt(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 St={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)]`}}]},Ct={__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=v(),a=le(`slideover`,n),{t:o}=b(),s=te(),c=ve(_e(a,`open`,`defaultOpen`,`modal`,`unmountOnHide`),r),l=je(we(()=>a.portal)),u=we(()=>a.content),d=B(()=>a.dismissible?{pointerDownOutside:xt}:[`interactOutside`,`escapeKeyDown`].reduce((e,t)=>(e[t]=e=>{e.preventDefault(),r(`close:prevent`)},e),{})),f=B(()=>ye({extend:St,...s.ui?.slideover||{}})({transition:a.transition,side:a.side,inset:a.inset}));return(e,t)=>(I(),M(G(Ze),se(Se(G(c))),{default:x(({open:n,close:c})=>[i.default?(I(),M(G(ct),{key:0,"as-child":``,class:J(G(a).class)},{default:x(()=>[N(e.$slots,`default`,{open:n})]),_:2},1032,[`class`])):L(``,!0),A(G(ot),O(G(l),{"force-mount":G(l).disabled&&G(a).unmountOnHide===!1||void 0}),{default:x(()=>[A(G(ke),null,{default:x(()=>[G(a).overlay?(I(),M(G(at),{key:0,"data-slot":`overlay`,class:J(f.value.overlay({class:G(a).ui?.overlay}))},null,8,[`class`])):L(``,!0),A(G(nt),O({"data-side":G(a).side,"data-slot":`content`,class:f.value.content({class:[!i.default&&G(a).class,G(a).ui?.content]})},u.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`)},Ae(d.value)),{default:x(()=>[!G(a).title&&!i.title||!G(a).description&&!i.description||i.content?(I(),M(G(Fe),{key:0},{default:x(()=>[!G(a).title&&!i.title?(I(),M(G(st),{key:0})):i.content?(I(),M(G(st),{key:1},{default:x(()=>[N(e.$slots,`title`,{},()=>[P(K(G(a).title),1)])]),_:3})):L(``,!0),!G(a).description&&!i.description?(I(),M(G(rt),{key:2})):i.content?(I(),M(G(rt),{key:3},{default:x(()=>[N(e.$slots,`description`,{},()=>[P(K(G(a).description),1)])]),_:3})):L(``,!0)]),_:3})):L(``,!0),N(e.$slots,`content`,{close:c},()=>[i.header||G(a).title||i.title||G(a).description||i.description||G(a).close||i.close?(I(),U(`div`,{key:0,"data-slot":`header`,class:J(f.value.header({class:G(a).ui?.header}))},[N(e.$slots,`header`,{close:c},()=>[G(a).title||i.title||G(a).description||i.description?(I(),U(`div`,{key:0,"data-slot":`wrapper`,class:J(f.value.wrapper({class:G(a).ui?.wrapper}))},[G(a).title||i.title?(I(),M(G(st),{key:0,"data-slot":`title`,class:J(f.value.title({class:G(a).ui?.title}))},{default:x(()=>[N(e.$slots,`title`,{},()=>[P(K(G(a).title),1)])]),_:3},8,[`class`])):L(``,!0),G(a).description||i.description?(I(),M(G(rt),{key:1,"data-slot":`description`,class:J(f.value.description({class:G(a).ui?.description}))},{default:x(()=>[N(e.$slots,`description`,{},()=>[P(K(G(a).description),1)])]),_:3},8,[`class`])):L(``,!0)],2)):L(``,!0),N(e.$slots,`actions`),G(a).close||i.close?(I(),M(G(Qe),{key:1,"as-child":``},{default:x(()=>[N(e.$slots,`close`,{ui:f.value},()=>[G(a).close?(I(),M(ue,O({key:0,icon:G(a).closeIcon||G(s).ui.icons.close,color:`neutral`,variant:`ghost`,"aria-label":G(o)(`slideover.close`)},typeof G(a).close==`object`?G(a).close:{},{"data-slot":`close`,class:f.value.close({class:G(a).ui?.close})}),null,16,[`icon`,`aria-label`,`class`])):L(``,!0)])]),_:2},1024)):L(``,!0)])],2)):L(``,!0),V(`div`,{"data-slot":`body`,class:J(f.value.body({class:G(a).ui?.body}))},[N(e.$slots,`body`,{close:c})],2),i.footer?(I(),U(`div`,{key:1,"data-slot":`footer`,class:J(f.value.footer({class:G(a).ui?.footer}))},[N(e.$slots,`footer`,{close:c})],2)):L(``,!0)])]),_:2},1040,[`data-side`,`class`])]),_:2},1024)]),_:2},1040,[`force-mount`])]),_:3},16))}},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`},Dt=[`aria-expanded`],Ot=u(Y({__name:`ExpandableText`,props:{lines:{default:5}},setup(e){let t=e,n=j(!1),r=j(!1),i=j(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;T(()=>{o(),typeof ResizeObserver<`u`&&i.value&&(s=new ResizeObserver(()=>o()),s.observe(i.value))}),ne(()=>s?.disconnect()),S(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)=>(I(),U(`div`,{class:J([`expandable group relative`,!n.value&&r.value?`cursor-pointer`:``]),"data-expanded":n.value?`1`:`0`,"data-overflowing":r.value?`1`:`0`,onClick:l},[V(`div`,{id:a,ref_key:`body`,ref:i,class:J([`body`,n.value?``:`clamped`]),style:_(n.value?void 0:{"--expandable-lines":String(t.lines)})},[N(e.$slots,`default`,{},void 0,!0)],6),!n.value&&r.value?(I(),U(`div`,Tt)):L(``,!0),r.value||n.value?(I(),U(`div`,Et,[V(`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:ce(c,[`stop`])},K(n.value?`Show less`:`Show more`),9,Dt)])):L(``,!0)],10,wt))}}),[[`__scopeId`,`data-v-ce3bfa89`]]);function kt(e,t){let n=e.ownerDocument;e.textContent=``;let r=String(t??``).replace(/\r\n?/g,`
|
|
3
|
-
`).split(`
|
|
4
|
-
`),i=/^(\s*)([-*]|\d+[.)])\s+(.*)$/,a=/^(```|#{1,6}\s|>)/;function o(e,t){let r=n.createElement(t);return e.appendChild(r),r}function s(e,t){t&&e.appendChild(n.createTextNode(t))}function c(e){let t=e.trim();return t[0]===`|`&&(t=t.slice(1)),t[t.length-1]===`|`&&(t=t.slice(0,-1)),t.split(`|`).map(e=>e.trim())}function l(e){let t=e.trim();return t.indexOf(`|`)<0||!/^[\s:|-]+$/.test(t)?!1:c(t).every(e=>/^:?-+:?$/.test(e))}function u(e,t){let n=e[t];return n.indexOf(`|`)<0||l(n)||t+1>=e.length||!l(e[t+1])?!1:c(n).length===c(e[t+1]).length}function d(e,t){let n=0,r=``,i=()=>{s(e,r),r=``};for(;n<t.length;){let a=t[n];if(a==="`"){let r=t.indexOf("`",n+1);if(r>n+1){i(),o(e,`code`).textContent=t.slice(n+1,r),n=r+1;continue}}else if(a===`*`&&t[n+1]===`*`){let r=t.indexOf(`**`,n+2);if(r>n+2){i(),d(o(e,`strong`),t.slice(n+2,r)),n=r+2;continue}}else if(a===`*`||a===`_`){let r=n>0?t[n-1]:``;if(/\S/.test(t[n+1]||``)&&!/\w/.test(r)){let r=-1;for(let e=n+2;e<t.length;e++)if(t[e]===a&&/\S/.test(t[e-1])&&!/\w/.test(t[e+1]||``)){r=e;break}if(r>0){i(),d(o(e,`em`),t.slice(n+1,r)),n=r+1;continue}}}else if(a===`[`){let r=/^\[([^\]\n]+)\]\(([^)\s]+)\)/.exec(t.slice(n));if(r&&/^https?:\/\//i.test(r[2])){i();let t=o(e,`a`);t.setAttribute(`href`,r[2]),t.setAttribute(`rel`,`noopener noreferrer`),t.setAttribute(`target`,`_blank`),d(t,r[1]),n+=r[0].length;continue}}r+=a,n++}i()}function f(e,t,n=0){let r=0;for(;r<t.length;){let s=t[r];if(/^\s*$/.test(s)){r++;continue}if(/^```/.test(s)){let n=[];for(r++;r<t.length&&!/^```\s*$/.test(t[r]);)n.push(t[r++]);r++,o(o(e,`pre`),`code`).textContent=n.join(`
|
|
5
|
-
`);continue}let l=/^(#{1,6})\s+(\S.*?)\s*$/.exec(s);if(l){d(o(e,`h`+l[1].length),l[2]),r++;continue}if(s[0]===`>`&&n<8){let i=[];for(;r<t.length&&t[r][0]===`>`;)i.push(t[r++].replace(/^>\s?/,``));f(o(e,`blockquote`),i,n+1);continue}if(u(t,r)){let n=c(s),i=o(e,`table`),a=o(o(i,`thead`),`tr`);for(let e of n)d(o(a,`th`),e);r+=2;let l=null;for(;r<t.length&&t[r].indexOf(`|`)>=0&&!u(t,r);){l||=o(i,`tbody`);let e=c(t[r]),a=o(l,`tr`);for(let t=0;t<n.length;t++)d(o(a,`td`),t<e.length?e[t]:``);r++}continue}if(i.test(s)){let n=[],a;for(;r<t.length&&(a=i.exec(t[r]))!==null;)n.push({indent:a[1].length,ordered:/^\d/.test(a[2]),text:a[3]}),r++;let s=n[0].indent,c=o(e,n[0].ordered?`ol`:`ul`),l=null,u=null;for(let e of n)e.indent>s&&l?(u||=o(l,e.ordered?`ol`:`ul`),d(o(u,`li`),e.text)):(l=o(c,`li`),u=null,d(l,e.text));continue}let p=[];for(;r<t.length&&!/^\s*$/.test(t[r])&&!a.test(t[r])&&!i.test(t[r])&&!u(t,r);)p.push(t[r++]);p.length===0&&p.push(t[r++]),d(o(e,`p`),p.join(`
|
|
6
|
-
`))}}f(e,r)}var $=Y({__name:`MarkdownText`,props:{text:{}},setup(e){let t=e,n=j(null);function r(){let e=n.value;if(e)try{kt(e,t.text)}catch{e.textContent=t.text}}return T(r),S(()=>t.text,r),(e,t)=>(I(),U(`div`,{ref_key:`root`,ref:n,class:`md prose prose-sm prose-neutral dark:prose-invert min-w-0 max-w-none flex-1 whitespace-pre-wrap break-words font-sans text-[0.875rem] leading-normal [&_a]:font-medium [&_a]:decoration-(--ui-text-dimmed) [&_a]:underline-offset-[3px] [&_a:hover]:decoration-current [&_blockquote]:my-1.5 [&_h1]:font-medium [&_h1]:tracking-tight [&_h2]:font-medium [&_h2]:tracking-tight [&_h3]:font-medium [&_h3]:tracking-tight [&_h4]:font-medium [&_strong]:font-medium [&_li>ol]:my-0.5 [&_li>ul]:my-0.5 [&_li]:my-0.5 [&_li]:whitespace-pre-wrap [&_ol]:my-1.5 [&_ol]:whitespace-normal [&_p]:my-1.5 [&_pre]:my-2 [&_pre]:whitespace-pre [&_table]:whitespace-normal [&_ul]:my-1.5 [&_ul]:whitespace-normal`},null,512))}}),At={},jt={viewBox:`0 0 16 16`,class:`inline-block size-[1em] shrink-0`,"aria-hidden":`true`};function Mt(e,t){return I(),U(`svg`,jt,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8z`},null,-1)]])}var Nt=u(At,[[`render`,Mt]]);function Pt(){let e=[],t=null,n=0,r=[];function i(e){return typeof e==`number`&&isFinite(e)?e:void 0}function a(e){return typeof e==`string`?e:``}function o(n){let r={index:e.length,calls:[]};return n&&(r.narration=n),e.push(r),t=r,r}function s(e){return e<1e3?String(e):e<1e6?(Math.round(e/100)/10).toFixed(1)+`k`:(Math.round(e/1e5)/10).toFixed(1)+`M`}function c(e){let t=/\((\d+) chars(?:, (\d+) lines)?\)$/.exec(e.summary);if(t)return t[2]?Number(t[2]):1;if(e.output)return e.output.split(`
|
|
7
|
-
`).length}function l(e){let t=[],n=e.result;if(!n)return t;n.infra?t.push(`sandbox error`):e.shell?t.push(n.exitCode===void 0?n.ok?`exit 0`:`error`:`exit `+n.exitCode):n.ok||t.push(`error`);let r=c(n);return r!==void 0&&r>1&&t.push(r+` lines`),e.durationMs!==void 0&&t.push(X(e.durationMs,`precise`)),t}function u(e,t){let n={ok:t.ok===!0,infra:t.infra===!0,summary:a(t.summary),output:a(t.output),at:i(t.at)},o=i(t.exitCode);o!==void 0&&(n.exitCode=o),e.result=n;let s=r.indexOf(e);s!==-1&&r.splice(s,1),e.status=n.infra?`infra`:n.ok?`ok`:`failed`,e.status!==`ok`&&(e.tags=e.tags.concat(e.status)),e.startedAt!==void 0&&n.at!==void 0&&n.at>=e.startedAt&&(e.durationMs=n.at-e.startedAt),e.facts=l(e)}let d=[[`tests`,/\b(npm|pnpm|yarn|bun)\s+(run\s+)?test\b|\b(vitest|jest|pytest|mocha|go test|cargo test)\b/],[`build`,/\b(npm|pnpm|yarn|bun)\s+run\s+(build|typecheck|lint)\b|\b(tsc|make|cargo build|go build|eslint|prettier)\b/],[`install`,/\b(npm|pnpm|yarn|bun)\s+(i|install|ci|add)\b|\bpip3?\s+install\b|\bapt(-get)?\s+install\b|\bbrew\s+install\b/],[`git`,/(^|[\s;&|(])(git|gh)\s/],[`network`,/(^|[\s;&|(])(curl|wget)\s/],[`read`,/(^|[\s;&|(])(cat|sed|head|tail|less|ls|find|grep|rg|wc|tree|pwd|echo|env|which|stat|file|diff)\b/]];function f(e){let t=e.replace(/^(\s*cd\s+("[^"]*"|'[^']*'|\S+)\s*(&&|;)\s*)+/,``);return t.trim()?t:e}function p(e){let t=f(e);for(let[e,n]of d)if(n.test(t))return e;return`shell`}function m(e,t){let n=t?f(e):e,r=n.indexOf(`
|
|
8
|
-
`),i=r===-1?n:n.slice(0,r).trimEnd();return i.length<e.length?i+` …`:i}function h(e,t){let o=a(e.tool),s=o===`bash`,c=t||o,l=s&&c.startsWith(`$ `)?c.slice(2):!s&&c.startsWith(o+` `)?c.slice(o.length+1):c,u={id:a(e.callId)||`c`+ ++n,tool:o,title:l,headline:m(l,s),shell:s,quiet:o===`update_status`,tags:[s?p(l):o],status:`running`,startedAt:i(e.at),facts:[]};return r.push(u),u}function g(t){for(let n=e.length-1;n>=0;n--)for(let r of e[n].calls)if(r.id===t)return{step:e[n],call:r};return null}function _(t){let n=a(t.callId);if(!n)return null;for(let t=e.length-1;t>=0;t--)for(let r of e[t].calls)if(r.id===n&&!r.result)return{step:e[t],call:r};return null}function v(e){if(!e||typeof e!=`object`)return[];let n=e;switch(n.type){case`input`:{let e={kind:`input`,text:a(n.text),messageId:a(n.messageId),at:i(n.at)},t=n.source;if(t&&typeof t==`object`){let n=t,r={};a(n.url)&&(r.url=a(n.url)),a(n.channel)&&(r.channel=a(n.channel)),a(n.user)&&(r.user=a(n.user)),a(n.run)&&(r.run=a(n.run)),Object.keys(r).length>0&&(e.source=r)}return[e]}case`answer`:return[{kind:`answer`,text:a(n.text),at:i(n.at)}];case`pr_opened`:{let e=i(n.number);return!a(n.url)||e===void 0||!Number.isInteger(e)||e<=0?[]:[{kind:`pr_opened`,url:a(n.url),number:e,created:n.created===!0,at:i(n.at)}]}case`run_meta`:{if(!a(n.agent))return[];let e={kind:`meta`,agent:a(n.agent),model:a(n.model),at:i(n.at)};return a(n.effort)&&(e.effort=a(n.effort)),a(n.repo)&&(e.repo=a(n.repo)),a(n.ref)&&(e.ref=a(n.ref)),i(n.pr)!==void 0&&Number.isInteger(n.pr)&&n.pr>0&&(e.pr=n.pr),/^[0-9a-f]{7,40}$/i.test(a(n.headSha))&&(e.headSha=a(n.headSha)),[e]}case`context`:return[{kind:`context`,text:a(n.text),at:i(n.at)}];case`reference`:{let e=i(n.messages);return!a(n.url)||!a(n.channelName)||e===void 0?[]:[{kind:`reference`,url:a(n.url),channelName:a(n.channelName),messages:e,text:a(n.text),at:i(n.at)}]}case`notes`:return[{kind:`note`,text:a(n.text),noteKind:`notes`,at:i(n.at)}];case`replay_note`:return[{kind:`replay_note`,text:a(n.summary)}];case`run_note`:return[{kind:`note`,text:a(n.summary),noteKind:a(n.kind),mode:a(n.mode)||void 0,at:i(n.at)}];case`assistant`:return[{kind:`step`,step:o({text:a(n.text),at:i(n.at)})}];case`review_artifact`:return[];case`span_start`:{let e=a(n.name),t=a(n.spanId);return!e||!t||e.startsWith(`tool.`)||e.startsWith(`mcp.`)||e===`model.turn`?[]:[{kind:`span`,spanId:t,name:e,open:!0,at:i(n.at)}]}case`span_end`:{let e=a(n.name),r=a(n.spanId),o=i(n.durationMs);if(!e||!r||o===void 0)return[];let c=n.status===`error`?`error`:`ok`,u=typeof n.attrs==`object`&&n.attrs!==null?n.attrs:{};if(e===`model.turn`){t=null;let e=[],c=i(u.inputTokens),l=i(u.outputTokens),d=i(u.cacheReadTokens);c!==void 0&&e.push(s(c)+` in`),l!==void 0&&e.push(s(l)+` out`),d!==void 0&&e.push(s(d)+` cached`);let f=i(u.ttftMs);f!==void 0&&e.push(`first token `+X(f,`precise`));let p=i(u.thinkingMs);p!==void 0&&e.push(`thinking `+X(p,`precise`));let m=i(u.textMs);m!==void 0&&e.push(`writing `+X(m,`precise`));let h=a(u.model);return[{kind:`turn`,spanId:r,label:`Thought for `+X(o,`precise`),facts:e,durationMs:o,...h?{model:h}:{},at:i(n.at)}]}if(e.startsWith(`tool.`)||e.startsWith(`mcp.`)){if(!e.startsWith(`tool.`))return[];let t=a(u.callId);if(!t)return[];let n=g(t);return!n||n.call.durationMs!==void 0?[]:(n.call.durationMs=o,n.call.facts=l(n.call),[{kind:`result`,step:n.step,call:n.call}])}let d=i(n.startedAt);return[{kind:`span`,spanId:r,name:e,open:!1,durationMs:o,status:c,at:i(n.at),...d===void 0?{}:{startedAt:d}}]}case`artifact`:{let e=a(n.key),t=a(n.name);if(!e||!t)return[];let r={key:e,name:t,size:i(n.size)??0,contentType:a(n.contentType),at:i(n.at)},o=a(n.messageId),s=a(n.callId),c=n.direction===`in`&&o?{...r,direction:`in`,messageId:o}:n.direction===`out`&&s?{...r,direction:`out`,callId:s}:void 0;return c?[{kind:`artifact`,artifact:c}]:[]}case`skill_use`:{let e=a(n.skill);if(!e)return[];let r=[];t||r.push({kind:`step`,step:o()});let s=a(n.source),c={name:e,description:a(n.description),agent:a(n.agent),bodyBytes:i(n.bodyBytes)??0,at:i(n.at)};return/^https?:\/\//.test(s)&&(c.source=s),r.push({kind:`skill`,step:t,skill:c}),r}case`tool_call`:{let e=[];t||e.push({kind:`step`,step:o()});let r=h(n,a(n.summary));return t.calls.push(r),e.push({kind:`call`,step:t,call:r}),e}case`tool_result`:{let e=_(n);if(e)return u(e.call,n),[{kind:`result`,step:e.step,call:e.call}];let r=[];t||r.push({kind:`step`,step:o()});let i=h(n,``);return i.startedAt=void 0,u(i,n),t.calls.push(i),r.push({kind:`call`,step:t,call:i}),r}default:return[]}}function y(){return r.length>0?r[0]:null}return{push:v,pending:y,steps:()=>e}}new Set(`request,slack.receive,dispatch.history,dispatch.admission,dispatch.ack_card,dispatch.gate.repo,dispatch.gate.pr_head,dispatch.workspace.attach,dispatch.gate.attached_head,dispatch.mcp_discovery,dispatch.compose,dispatch.channel_visibility,dispatch.repo_context,dispatch.memory_read,dispatch.refuse,dispatch.ship_preflight,dispatch.ledger_claim,dispatch.route,run.agent,run.command,run.reading_diff,run.settle_reviewed_head,run.description_turn,run.verdict_turn,run.observe_workspace,run.pr_post_step,run.review_post_step,run.reading_diff_join,run.pr_description_join,model.turn,ship.round,post.card_close,post.reply`.split(`,`));var Ft=new Set([`slack.receive`,`dispatch.history`,`dispatch.admission`,`dispatch.ack_card`,`dispatch.gate.repo`,`dispatch.gate.pr_head`,`dispatch.workspace.attach`,`dispatch.gate.attached_head`,`dispatch.mcp_discovery`,`dispatch.compose`,`dispatch.channel_visibility`,`dispatch.repo_context`,`dispatch.memory_read`,`dispatch.refuse`,`dispatch.ship_preflight`,`dispatch.ledger_claim`,`dispatch.route`]),It=new Set([`run.observe_workspace`,`run.pr_post_step`,`run.review_post_step`,`run.reading_diff_join`,`run.pr_description_join`]),Lt=new Set([`request`,`run.agent`,`ship.round`,`run.settle_reviewed_head`,`run.description_turn`,`run.verdict_turn`,`post.card_close`,`post.reply`]),Rt=new Set([`run.reading_diff`]);function zt(e,t){if(Rt.has(e))return{kind:`background`};if(Lt.has(e))return{kind:`uncounted`};if(e===`model.turn`)return{kind:`counted`,bucket:`thinking`};if(e===`run.command`||e.startsWith(`run.command.`))return{kind:`counted`,bucket:t===`command`?`tools`:`getting_ready`};if(Ft.has(e)||e.startsWith(`dispatch.workspace.attach.`))return{kind:`counted`,bucket:`getting_ready`};if(It.has(e))return{kind:`counted`,bucket:`finishing_up`};if(e.startsWith(`tool.`)||e.startsWith(`mcp.`))return{kind:`counted`,bucket:`tools`}}var Bt={clone:`cloning the repo`,"checkout-clone":`cloning the checkout`,"worktree-clone":`cloning the worktree`,"worktree-detach":`checking out the expected commit`,"op-clone":`cloning the op tree`,fetch:`fetching the branch`,"wake-fetch":`fetching the latest commits`,"reclaim-fetch":`fetching to reclaim the mirror`,"for-each-ref":`listing the branches`,checkout:`checking out the branch`,"checkout-update":`updating the checkout`,"rebind-checkout":`checking out the thread's own branch`,"rev-parse":`reading the commit`,"cat-file":`checking the mirror for the commit`,"show-ref":`reading the branch tip`,"detect-default-branch":`detecting the default branch`,git:`a git command`,"git-setup":`configuring git`,"stage-perms":`securing the credential stage`,install:`installing dependencies`,build:`building`,test:`running the tests`,"clear-markers":`clearing the build markers`,"lockfile-key":`hashing the lockfile`,"deps-store-dir":`preparing the dependency store`,"deps-scratch":`cloning a scratch tree for the dependency install`,"deps-install":`installing the dependency store`,"deps-harden":`locking down the installed dependencies`,"deps-commit":`recording the installed dependencies`,"deps-adopt":`adopting the dependency store`,"deps-restore-scratch":`restoring dependencies to scratch`,"deps-restore-chown":`setting the restored dependencies' owner`,"deps-restore-commit":`recording the restored dependencies`,"deps-scratch-chown":`setting the dependency scratch owner`,"deps-evict":`evicting an old dependency store`,"unlink-deps-view":`unlinking the dependency view`,"clear-installing-marker":`clearing the install marker`,chown:`setting the workspace owner`,"worktree-chown":`setting the worktree owner`,"op-chown":`setting the op tree's owner`,"worktree-clean":`cleaning the worktree`,"clean-workspace":`cleaning the workspace`,"clean-before-restore":`cleaning before the restore`,"unmount-restores":`unmounting earlier restores`,"mirror-restore-extract":`extracting the mirror snapshot`,"checkout-restore-extract":`extracting the checkout snapshot`,"deps-restore-extract":`extracting the dependency snapshot`,evict:`evicting a stale tree`,"thread-dir":`preparing a directory`,"threads-dir":`preparing a directory`,"op-dir":`preparing a directory`,"ops-dir":`preparing a directory`,"stage-dir":`preparing a directory`,stat:`checking a file`,"boot-id":`reading the container's identity`,touch:`touching a marker`,nproc:`counting CPUs`,mutex_wait:`waiting for the workspace`,kill:`stopping the previous step`};Object.keys(Bt);function Vt(e){return Object.prototype.hasOwnProperty.call(Bt,e)?e:void 0}function Ht(e){let t=Vt(e);if(t!==void 0)return Bt[t];if(e.endsWith(`-stale-sweep`)){let t=Vt(e.slice(0,-12));if(t!==void 0)return`clearing leftovers before ${Bt[t]}`}}var Ut={request:`the request`,"slack.receive":`receiving`,"dispatch.history":`reading the thread`,"dispatch.admission":`checking the thread`,"dispatch.ack_card":`posting the status card`,"dispatch.gate.repo":`checking the repo`,"dispatch.gate.pr_head":`checking the PR`,"dispatch.workspace.attach":`attaching the workspace`,"dispatch.gate.attached_head":`checking out the branch`,"dispatch.mcp_discovery":`loading tools`,"dispatch.compose":`preparing the prompt`,"dispatch.channel_visibility":`checking the channel`,"dispatch.repo_context":`reading the repo's context`,"dispatch.memory_read":`recalling memory`,"dispatch.refuse":`refusing`,"dispatch.ship_preflight":`checking the ship request`,"dispatch.ledger_claim":`claiming the run's row`,"dispatch.route":`picking the preset`,"run.agent":`the agent loop`,"run.command":`the command`,"run.reading_diff":`reading the diff (in parallel)`,"run.settle_reviewed_head":`re-checking the moved branch`,"run.description_turn":`asking for the PR description`,"run.verdict_turn":`asking for the verdict`,"run.observe_workspace":`checking the workspace`,"run.pr_post_step":`posting the PR`,"run.review_post_step":`posting the review`,"run.reading_diff_join":`waiting for the diff`,"run.pr_description_join":`waiting for the PR description`,"model.turn":`a model turn`,"ship.round":`a ship round`,"post.card_close":`closing the card`,"post.reply":`posting the reply`},Wt=`a Switchboard step`;function Gt(e){if(e in Ut)return Ut[e];if(e.startsWith(`tool.`))return e.slice(5)||`a Switchboard step`;if(e.startsWith(`mcp.`)){let t=e.slice(e.lastIndexOf(`.`)+1);return t&&t!==`mcp`?t:Wt}for(let t of[`dispatch.workspace.attach.`,`run.command.`])if(e.startsWith(t))return Ht(e.slice(t.length))??`a Switchboard step`;return Wt}var Kt=`A-Za-z0-9:@._-`;RegExp(`^[${Kt}]{1,128}$`),RegExp(`[^${Kt}]`,`g`);function qt(e){return e.type===`span_start`||e.type===`span_end`}function Jt(e,t,n){let r=e.get(t.spanId);if(t.type===`span_start`){if(r)return;e.set(t.spanId,{traceId:n,spanId:t.spanId,...t.parentSpanId===void 0?{}:{parentSpanId:t.parentSpanId},name:t.name,startedAt:t.at??0,attrs:t.attrs??{}});return}e.set(t.spanId,{traceId:n,spanId:t.spanId,...t.parentSpanId===void 0?r?.parentSpanId===void 0?{}:{parentSpanId:r.parentSpanId}:{parentSpanId:t.parentSpanId},name:t.name,startedAt:t.startedAt,endedAt:t.startedAt+t.durationMs,durationMs:t.durationMs,status:t.status,...t.error===void 0?{}:{errorMessage:t.error},attrs:{...r?.attrs??{},...t.attrs??{}}})}function Yt(){let e,t,n=[];return{push(r){e?t&&r.seq!==void 0&&t.seq!==void 0&&r.seq>t.seq+1&&t.at!==void 0&&r.at!==void 0&&n.push({kind:`gap`,fromSeq:t.seq+1,toSeq:r.seq-1,from:Math.min(t.at,r.at),to:Math.max(t.at,r.at)}):e={seq:r.seq??1,at:r.at},r.type===`run_note`&&r.kind===`spans_dropped`&&r.from!==void 0&&r.to!==void 0&&r.to>=r.from&&n.push({kind:`note`,from:r.from,to:r.to}),t={seq:r.seq,at:r.at}},losses(t={}){let r=t.elided??[],i=(e,t)=>r.some(n=>n.fromSeq<=e&&t<=n.toSeq),a=[];e&&e.seq>1&&t.windowStart!==void 0&&e.at!==void 0&&e.at>t.windowStart&&a.push({from:t.windowStart,to:e.at,kind:`lost`});for(let e of n)a.push(e.kind===`note`?{from:e.from,to:e.to,kind:`lost`}:{from:e.from,to:e.to,kind:i(e.fromSeq,e.toSeq)?`elided`:`lost`});return a}}}var Xt=[/\bslack[\s-]?only\b/i,/\bpost\s*[:=]\s*(?:off|no|false|none)\b/i,/\bno[\s-]post\b/i,/\b(?:don['’]?t|do\s+not|never|skip|without)\s+(?:\w+\s+){0,2}?(?:post|comment)(?:ing|s)?\b/i,/\bno\s+need\s+to\s+(?:post|comment)\b/i];function Zt(e){return Xt.some(t=>t.test(e))}var Qt=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/,$t=/^[0-9a-f]{7,40}$/,en=/^(?![.-])(?!.*\.\.)(?!.*\/\/)(?!.*@\{)(?!.*\.lock$)(?!.*[./]$)[\w][\w./-]*$/;function tn(e){return e&&Qt.test(e)?`https://github.com/${e}`:void 0}function nn(e,t){let n=tn(e);if(!(!n||t===void 0||!Number.isInteger(t)||t<=0))return`${n}/pull/${t}`}function rn(e,t){let n=tn(e);if(n&&t&&en.test(t))return`${n}/tree/${t.split(`/`).map(encodeURIComponent).join(`/`)}`}function an(e,t){let n=tn(e);if(n&&t&&$t.test(t))return`${n}/commit/${t}`}function on(e){return e.slice(0,7)}function sn(e){if(e===`slack.receive`||e.startsWith(`dispatch.`))return`getting_ready`;let t=zt(e,`agent`);return t?.kind===`counted`&&t.bucket===`finishing_up`?`finishing_up`:void 0}function cn(e){return e===`request`||e===`run.agent`}var ln={getting_ready:`Getting ready`,finishing_up:`Finishing up`};function un(e){let t=e.rows.length,n=`${t} step${t===1?``:`s`}`,r=ln[e.phase];if(t===0||e.rows.some(e=>e.open||e.at===void 0||e.durationMs===void 0))return`${r} · ${n}`;let i=Math.min(...e.rows.map(e=>e.at)),a=Math.max(...e.rows.map(e=>e.at+e.durationMs));return`${r} · ${n} · ${X(Math.max(0,a-i),`precise`)}`}function dn(e){let t=e.split(`
|
|
9
|
-
`),n=t.indexOf(`<<<UNTRUSTED`),r=t.lastIndexOf(`UNTRUSTED>>>`);return(n>=0&&r>n?t.slice(n+1,r):t.slice(1)).filter(e=>e.length>0)}function fn(e,t){let n=t.split(`/`).map(encodeURIComponent).join(`/`);return`${e.urlBase}${n}${e.token?`?t=${encodeURIComponent(e.token)}`:``}`}function pn(e){if(typeof e!=`string`)return null;let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t)return null;let{fromSeq:n,toSeq:r}=t,i=e=>typeof e==`number`&&Number.isInteger(e)&&e>0;return!i(n)||!i(r)||n>r?null:{fromSeq:n,toSeq:r}}function mn(e){let t=e.toSeq-e.fromSeq+1,n=t===1?`event ${e.fromSeq}`:`events ${e.fromSeq}–${e.toSeq}`;return`${t} ${t===1?`event`:`events`} not loaded (${n}) — the record has them`}function hn(e,t,n){let r=!!e.model&&t!==null&&On(e.model,t),i=r?t:e.model??t??void 0,a=!!e.model&&t!==null&&!r;return{spanId:e.spanId,label:e.label,chip:e.label.replace(/^Thought for /,``),quick:e.durationMs<6e4,durationMs:e.durationMs,facts:e.facts,...i?{model:i}:{},switched:a,showModel:!!i&&(!n||a),at:e.at}}function gn(e){let t=`${e.n} tool call${e.n===1?``:`s`}`;if(e.n===0)return`no tool calls`;if(e.ok===e.n)return`${t}, all succeeded`;if(e.running===e.n)return`${t}, all running`;let n=[];return e.bad&&n.push(`${e.bad} failed`),e.infra&&n.push(`${e.infra} sandbox error${e.infra===1?``:`s`}`),e.running&&n.push(`${e.running} still running`),`${t}, ${n.join(`, `)}`}function _n(e){let{meta:t,prOpened:n}=e,r=t?.repo&&tn(t.repo)?t.repo:void 0;if(t?.agent===`review`){if(Zt(e.requestText))return{text:`verdict, Slack only`};if(r&&t.pr!==void 0){let e=nn(r,t.pr);return e?{text:`verdict for ${r}#${t.pr}`,href:e}:{text:`verdict`}}return{text:`verdict`}}if(t?.agent===`coding`&&n){let e=n.created?`pull request opened`:`pull request updated`,t=r?nn(r,n.number):void 0;return t?{text:`${e} ${r}#${n.number}`,href:t}:{text:e}}return t?.agent===`command`?{text:`output`}:{text:`answer`}}function vn(e,t){return{id:e.id,tool:e.tool,title:e.title,headline:e.headline,shell:e.shell,status:e.status,facts:[...e.facts],startedAt:e.startedAt,output:e.result?e.result.output||e.result.summary:``,hasResult:e.result!==void 0,chipOnly:!e.shell&&e.title===e.tool,durationMs:e.durationMs,exitCode:e.result?.exitCode,timedOut:Ve(e.result?.exitCode),open:t}}function yn(e={}){let t=e.openTags&&e.openTags.length>0?e.openTags:[`failed`,`infra`],n=Pt(),r=z({request:null,meta:null,context:[],references:[],log:[],reply:null,prOpened:null,placeholder:!0,allOpen:!1,stopMode:null,model:null,firstAt:null,lastAt:null,lastAtWall:null,elided:[],traceVersion:0}),i=Yt(),a=new Map,o=new Map,s=new Map,c=new Map,l=new Map,u=new Map,d=new Map,f=new Set,p=null,m=!1,h=-1,g=0,_=e=>`${e}-${g++}`;function v(e){return t.includes(`all`)?!0:e.some(e=>t.includes(e))}function y(e){let t=0,n=0,r=0;for(let i of e.items)i.kind===`call`&&(i.call.status===`failed`?t++:i.call.status===`infra`?n++:i.call.status===`running`&&r++);return{bad:t,infra:n,running:r}}function b(e){let{bad:t,infra:n,running:r}=y(e);(t||n||r)&&(e.groupOpen=!0)}function ee(e){let t=o.get(h);t&&(t.live=!1),h=e.index;let n=p;p=null;let i=z({kind:`step`,key:_(`step`),index:e.index,at:e.narration?e.narration.at:n?.at,turn:n,narration:e.narration?e.narration.text:null,note:`no commentary`,items:[],live:!0,manual:!1,groupOpen:!0});return o.set(e.index,i),r.log.push(i),i}function te(e){return o.get(e.index)??ee(e)}function ne(e,t){let n=te(e);if(t.quiet){f.add(t.id),n.items.push({kind:`quiet`,at:t.startedAt,text:`✎ ${t.tool===`update_status`?`status checklist updated`:t.title}`}),b(n);return}let i=z(vn(t,r.allOpen||v(t.tags)));u.set(t.id,i),d.set(t.id,n),n.items.push({kind:`call`,call:i}),b(n)}function x(e,t){if(f.has(t.id)){let t=o.get(e.index);t&&b(t);return}let n=u.get(t.id);if(!n){ne(e,t);return}Object.assign(n,vn(t,n.open)),v(t.tags)&&(n.open=!0);let r=o.get(e.index);r&&b(r)}function S(e,t){p&&=(r.log.push({kind:`turn`,key:_(`turn`),turn:p,note:e,...t===void 0?{}:{noteHref:t}}),null)}let C=new Map,re=z([]);function ie(e){if(e.direction===`in`){C.get(e.messageId)?.files.push(e);return}re.push(e);let t=u.get(e.callId);t&&((t.files??=[]).push(e),t.open=!0)}function ae(e){switch(r.placeholder=!1,e.kind){case`input`:{let t={text:e.text,messageId:e.messageId,at:e.at,...e.source?{source:e.source}:{},files:[]};r.request?r.log.push({kind:`followup`,key:_(`followup`),input:t}):r.request=t,C.set(t.messageId,t);return}case`step`:ee(e.step);return;case`call`:ne(e.step,e.call);return;case`result`:x(e.step,e.call);return;case`turn`:S(``),p=hn(e,r.model,m),p.model&&(m=!0),e.model&&!(r.model!==null&&On(e.model,r.model))&&(r.model=e.model);return;case`meta`:r.model===null&&e.model&&(r.model=e.model),r.meta={agent:e.agent,model:e.model,...e.effort?{effort:e.effort}:{},...e.repo?{repo:e.repo}:{},...e.ref?{ref:e.ref}:{},...e.pr===void 0?{}:{pr:e.pr},...e.headSha?{headSha:e.headSha}:{}};return;case`pr_opened`:r.prOpened={url:e.url,number:e.number,created:e.created};return;case`skill`:te(e.step).items.push({kind:`skill`,skill:e.skill});return;case`artifact`:ie(e.artifact);return;case`context`:r.context.push({key:_(`ctx`),at:e.at,text:e.text});return;case`reference`:r.references.push({key:_(`ref`),at:e.at,url:e.url,channelName:e.channelName,messages:e.messages,text:e.text});return;case`note`:if(e.noteKind===`follow_up`)return;r.log.push({kind:`note`,key:_(`note`),at:e.at,replay:!1,text:e.text,noteKind:e.noteKind}),(e.noteKind===`stop_requested`||e.noteKind===`stopped`)&&(e.mode===`soft`||e.mode===`hard`)&&D(e.mode);return;case`replay_note`:r.log.push({kind:`note`,key:_(`note`),replay:!0,text:e.text});return;case`span`:{if(cn(e.name)){e.name===`run.agent`&&e.open&&w(`getting_ready`);return}e.name.startsWith(`post.`)&&e.open&&w(`finishing_up`);let t=s.get(e.spanId);if(t){t.open=e.open,e.durationMs!==void 0&&(t.durationMs=e.durationMs),e.status&&(t.status=e.status);return}let n=z({kind:`span`,key:_(`span`),spanId:e.spanId,text:Gt(e.name),open:e.open,...e.durationMs===void 0?{}:{durationMs:e.durationMs},...e.status?{status:e.status}:{},at:e.open?e.at:e.startedAt??e.at});s.set(e.spanId,n);let i=sn(e.name);if(i){let t=l.get(i);t||(t={group:z({kind:`phase`,phase:i,key:_(i),rows:[],open:!0}),toggled:!1},l.set(i,t),r.log.push(t.group)),t.group.rows.push(n),c.set(e.spanId,t.group);return}r.log.push(n);return}case`answer`:S(`wrote the reply`,`#reply`),r.reply={text:e.text,at:e.at,files:re};return}}function w(e){let t=l.get(e);t&&!t.toggled&&(t.group.open=!1)}function T(e){let t=e,o=t?.type===`span_start`||t?.type===`span_end`;if(t&&typeof t.type==`string`){let t=e;i.push(t),qt(t)&&Jt(a,t,``),r.traceVersion++}t&&!o&&typeof t.at==`number`&&((r.firstAt===null||t.at<r.firstAt)&&(r.firstAt=t.at),(r.lastAt===null||t.at>=r.lastAt)&&(r.lastAt=t.at,r.lastAtWall=Le()));for(let t of n.push(e))ae(t)}function oe(){for(let e of u.values())if(e.status===`running`)return e;return null}function se(e){r.allOpen=e;for(let t of l.values())t.group.open=e,t.toggled=!0;for(let t of u.values())t.open=e}function E(e){if(e.startsWith(`call-`)){let t=e.slice(5),n=d.get(t);return!n||!u.has(t)?!1:(n.manual=!0,n.groupOpen=!0,!0)}if(e.startsWith(`span-`)){let t=e.slice(5),n=c.get(t);if(n){n.open=!0;let e=l.get(n.phase);return e&&(e.toggled=!0),!0}if(s.has(t))return!0;for(let e of r.log)if(e.kind===`step`&&e.turn?.spanId===t||e.kind===`turn`&&e.turn.spanId===t)return!0}return!1}function D(e){r.stopMode=e}function O(e){r.elided.push(e),r.log.push({kind:`note`,key:_(`note`),replay:!0,text:mn(e)}),r.placeholder=!1,r.traceVersion++}return{state:r,handle:T,noteElided:O,spanSet:()=>[...a.values()],losses:e=>i.losses({windowStart:e,elided:r.elided}),pendingCall:oe,flushPendingTurn:S,closePhases(){w(`getting_ready`),w(`finishing_up`)},setAllOpen:se,togglePhase(e){e.open=!e.open;let t=l.get(e.phase);t&&(t.toggled=!0)},reveal:E,callHeadline:e=>u.get(e)?.headline,toggleGroup(e){e.manual=!0,e.groupOpen=!e.groupOpen},toggleCall(e){e.open=!e.open},markStopping:D,opensByDefault:v}}function bn(e,t){return e.lastAt===null||e.lastAtWall===null?null:e.lastAt+(t-e.lastAtWall)}function xn(e,t){return{now:n=>e.serverNow+(n-t),elapsedMs(t){return He(e,this.now(t))??0},elapsedAt(t){return He({receivedAt:e.receivedAt,startedAt:e.startedAt,finishedAt:t})??0}}}function Sn(e){if(typeof e!=`string`)return{};let t;try{t=JSON.parse(e)}catch{return{}}if(typeof t!=`object`||!t)return{};let{sealedAt:n,replyOk:r}=t;return{...typeof n==`number`&&Number.isFinite(n)&&n>0?{sealedAt:n}:{},...typeof r==`boolean`?{replyOk:r}:{}}}function Cn(e){return e.replyOk===!1?`reply failed`:e.replyOk!==!0||e.finishedAt===void 0||e.sealedAt===void 0?``:`delivered in ${X(Math.max(0,e.sealedAt-e.finishedAt),`clock`)}`}function wn(e){if(typeof e!=`string`)return null;let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t)return null;let{finishedAt:n}=t;return typeof n==`number`&&Number.isFinite(n)&&n>0?{finishedAt:n}:null}var Tn=Symbol(`sb-runner-clock`),En=Symbol(`sb-artifact-links`),Dn=Symbol(`sb-reply-landed`);function On(e,t){return e===t||!e.includes(`/`)!=!t.includes(`/`)&&kn(e)===kn(t)}function kn(e){if(!e)return`model`;let t=e.lastIndexOf(`/`);return(t===-1?e:e.slice(t+1))||e}var An=6e4;function jn(e,t,n){let r=bn(e,n);if(r===null||e.lastAt===null)return{kind:`starting`};if(t)return{kind:`call`,call:t,elapsedMs:Math.max(0,r-(t.startedAt??e.lastAt))};let i=Math.max(0,r-e.lastAt);return{kind:`thinking`,elapsedMs:i,slow:i>=An}}var Mn=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]),Nn=65536,Pn=new Set([`application/json`,`application/x-ndjson`,`application/xml`,`application/yaml`]);function Fn(e){return Mn.has(e)?`image`:e.startsWith(`video/`)?`video`:e.startsWith(`audio/`)?`audio`:e.startsWith(`text/`)||Pn.has(e)?`text`:`other`}var In=[`data-open-images`],Ln={class:`mb-1.5 flex items-baseline gap-2 font-mono text-[0.68rem] font-medium uppercase tracking-wider text-dimmed`},Rn={class:`count font-normal normal-case tracking-normal`},zn={class:`m-0 flex list-none flex-col gap-1.5 p-0`},Bn=[`data-direction`,`data-kind`,`data-open`,`data-expired`],Vn={class:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5 font-mono text-xs`},Hn=[`title`],Un=[`aria-expanded`,`aria-controls`,`onClick`],Wn={key:1,class:`name font-medium text-toned`},Gn={class:`fact text-dimmed`},Kn={class:`fact text-dimmed`},qn={key:2,class:`expired text-warn`},Jn=[`id`,`aria-hidden`],Yn={class:`min-h-0 overflow-hidden`},Xn=[`src`,`alt`,`onError`],Zn=[`src`,`onError`],Qn=[`src`,`onError`],$n={key:3,class:`mt-1.5`},er={key:0,class:`text max-h-96 overflow-auto rounded border border-(--ui-border) bg-elevated p-2.5 font-mono text-xs whitespace-pre-wrap break-words text-toned`},tr={key:1,class:`text-xs text-bad`},nr={key:2,class:`mt-1 text-xs text-dimmed`},rr={key:4,class:`other mt-1.5 flex flex-wrap items-baseline gap-x-3 gap-y-1 font-mono text-xs text-dimmed`},ir=[`href`,`download`],ar=0,or=Y({__name:`MessageFiles`,props:{files:{},openImages:{type:Boolean,default:!0}},setup(e){let t=e,n=oe(En,null),r=z(new Set),i=z(new Set),a=z(new Set),o=z(new Map);function s(){for(let e of t.files)t.openImages&&Fn(e.contentType)===`image`&&!i.has(e.key)&&!a.has(e.key)&&(i.add(e.key),a.add(e.key))}s(),S(()=>[t.files,t.files.length],s),ar+=1;let c=`files-${ar}`,l=B(()=>t.files.map((e,t)=>({...e,href:n?fn(n,e.key):null,kind:Fn(e.contentType),open:i.has(e.key),mounted:a.has(e.key),expired:r.has(e.key),panelId:`${c}-file-${t}`})));function u(e){if(e.href&&!e.expired){if(i.has(e.key)){i.delete(e.key);return}i.add(e.key),a.add(e.key),e.kind===`text`&&!o.has(e.key)&&d(e.key,e.href)}}async function d(e,t){o.set(e,{text:``,truncated:!1});try{let n=await fetch(t,{credentials:`same-origin`});if(n.status===410){r.add(e),o.delete(e);return}if(!n.ok||!n.body)throw Error(`HTTP ${n.status}`);let i=n.body.getReader(),a=new TextDecoder,s=``,c=0,l=!1;for(;;){let{value:e,done:t}=await i.read();if(t)break;let n=Nn-c,r=e.byteLength>n?e.subarray(0,n):e;if(s+=a.decode(r,{stream:!0}),c+=r.byteLength,c>=65536){l=e.byteLength>n||!(await i.read()).done,await i.cancel();break}}o.set(e,{text:s,truncated:l})}catch(t){o.set(e,{text:``,truncated:!1,error:t instanceof Error?t.message:String(t)})}}function f(e){r.add(e),i.delete(e)}let p=e=>e===`out`?`↑ sent`:`↓ received`,m=e=>e===`out`?`sent by the run`:`received from the thread`;return(t,r)=>(I(),U(`div`,{class:`files mt-3 border-t border-(--ui-border) pt-2`,"data-open-images":e.openImages?`1`:`0`},[V(`h3`,Ln,[r[0]||=V(`span`,null,`Files`,-1),V(`span`,Rn,`· `+K(e.files.length)+` file`+K(e.files.length===1?``:`s`),1)]),V(`ul`,zn,[(I(!0),U(k,null,W(l.value,e=>(I(),U(`li`,{key:e.key,class:`artifact`,"data-direction":e.direction,"data-kind":e.kind,"data-open":e.open?`1`:`0`,"data-expired":e.expired?`1`:`0`},[V(`div`,Vn,[V(`span`,{class:`dir shrink-0 select-none text-dimmed`,title:m(e.direction)},K(p(e.direction)),9,Hn),e.href&&!e.expired?(I(),U(`button`,{key:0,type:`button`,class:`name flex cursor-pointer items-baseline gap-1.5 border-0 bg-transparent p-0 font-mono text-xs font-medium text-primary hover:underline focus-visible:outline-2 focus-visible:outline-primary`,"aria-expanded":e.open?`true`:`false`,"aria-controls":e.panelId,onClick:t=>u(e)},[V(`span`,{class:J([`chev inline-block select-none text-[0.65rem] text-dimmed transition-transform motion-reduce:transition-none`,e.open?`rotate-90`:``]),"aria-hidden":`true`},`❯`,2),V(`span`,null,K(e.name),1)],8,Un)):(I(),U(`span`,Wn,K(e.name),1)),V(`span`,Gn,K(G(bt)(e.size)),1),V(`span`,Kn,K(e.contentType),1),e.expired&&G(n)?(I(),U(`span`,qn,`expired after `+K(G(n).retentionDays)+` days`,1)):L(``,!0)]),e.href&&!e.expired?(I(),U(`div`,{key:0,id:e.panelId,class:`panel grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none`,style:_({gridTemplateRows:e.open?`1fr`:`0fr`}),"aria-hidden":e.open?`false`:`true`},[V(`div`,Yn,[e.mounted?(I(),U(k,{key:0},[e.kind===`image`?(I(),U(`img`,{key:0,class:`preview mt-1.5 max-h-96 max-w-full rounded border border-(--ui-border)`,src:e.href,alt:e.name,loading:`lazy`,onError:t=>f(e.key)},null,40,Xn)):e.kind===`video`?(I(),U(`video`,{key:1,class:`preview mt-1.5 max-h-96 max-w-full rounded border border-(--ui-border) bg-black`,src:e.href,controls:``,playsinline:``,preload:`auto`,onError:t=>f(e.key)},null,40,Zn)):e.kind===`audio`?(I(),U(`audio`,{key:2,class:`preview mt-1.5 w-full max-w-xl`,src:e.href,controls:``,preload:`auto`,onError:t=>f(e.key)},null,40,Qn)):e.kind===`text`?(I(),U(`div`,$n,[o.get(e.key)&&!o.get(e.key).error?(I(),U(`pre`,er,K(o.get(e.key).text),1)):L(``,!0),o.get(e.key)?.error?(I(),U(`p`,tr,` could not read the file: `+K(o.get(e.key).error),1)):o.get(e.key)?.truncated?(I(),U(`p`,nr,` showing the first `+K(G(bt)(G(Nn)))+` of `+K(G(bt)(e.size)),1)):L(``,!0)])):(I(),U(`div`,rr,[V(`span`,null,`no preview for `+K(e.contentType),1),V(`a`,{class:`download inline-block rounded border border-default px-2 py-0.5 font-medium text-toned no-underline hover:bg-accented hover:text-primary focus-visible:outline-2 focus-visible:outline-primary`,href:e.href,download:e.name},`Download `+K(G(bt)(e.size)),9,ir)]))],64)):L(``,!0)])],12,Jn)):L(``,!0)],8,Bn))),128))])],8,In))}}),sr=[`id`,`open`,`title`,`data-status`,`data-heat`],cr={key:0,class:`spin inline-block size-[0.7em] shrink-0 animate-spin self-center rounded-full border-2 border-accented border-t-info motion-reduce:animate-none`,role:`img`,"aria-label":`running`},lr={key:2,class:`dollar shrink-0 select-none text-dimmed`},ur={key:3,class:`tool shrink-0 rounded bg-accented px-1.5 text-xs leading-normal text-muted`},dr={key:0,class:`cmd brief min-w-0 flex-1 truncate text-info`},fr={key:1,class:`cmd full min-w-0 flex-1 whitespace-pre-wrap break-words text-info max-sm:order-last max-sm:basis-full`},pr={key:5,class:`cmd min-w-0 flex-1`},mr={class:`facts ml-auto flex shrink-0 gap-2.5 text-xs tabular-nums text-muted`},hr={key:0,class:`fact elapsed`,title:`since this call started (runner clock)`},gr={key:0,class:`over rounded bg-bad/15 px-1 font-medium text-bad`},_r={key:1,class:`over rounded bg-bad/15 px-1 font-medium text-bad`},vr={class:`body`},yr={key:1,class:`none px-3 py-1.5 text-xs italic text-dimmed`},br={key:2,class:`none px-3 py-1.5 text-xs italic text-dimmed`},xr=Y({__name:`CallCard`,props:{call:{}},setup(e){let t=e,n=oe(Tn,null),r=oe(Dn,null),i=B(()=>{let e=n?.value;return t.call.status!==`running`||typeof e!=`number`||t.call.startedAt===void 0?``:X(Math.max(0,e-t.call.startedAt),`clock`)}),a=B(()=>We(t.call.durationMs,`tool`,t.call.timedOut)),o=B(()=>qe(a.value)),s=B(()=>t.call.durationMs===void 0?-1:t.call.facts.length-1);function c(){t.call.open=!t.call.open}return(t,n)=>(I(),U(`details`,{id:`call-${e.call.id}`,class:J([`call rounded-lg border border-default bg-elevated font-mono open:bg-accented`,e.call.status]),open:e.call.open,title:typeof e.call.startedAt==`number`?`started ${G(Z)(e.call.startedAt)}`:void 0,"data-status":e.call.status,"data-heat":a.value.level},[V(`summary`,{class:J([`flex min-w-0 cursor-pointer list-none items-baseline gap-3 rounded-lg pl-3 pr-[calc(var(--sb-gutter)-1px)] py-2 hover:bg-accented/60 focus-visible:outline-2 focus-visible:outline-primary max-sm:flex-wrap [&::-webkit-details-marker]:hidden`,e.call.open?`rounded-b-none border-b border-default`:``]),onClick:ce(c,[`prevent`])},[V(`span`,{class:J([`chev shrink-0 select-none text-xs text-dimmed transition-transform motion-reduce:transition-none`,e.call.open?`rotate-90`:``])},`❯`,2),e.call.status===`running`?(I(),U(`span`,cr)):(I(),U(`span`,{key:1,class:J([`glyph w-[1em] shrink-0 text-center font-medium`,e.call.status===`ok`?`text-ok`:e.call.status===`failed`?`text-bad`:`text-warn`])},K(e.call.status===`ok`?`✓`:e.call.status===`failed`?`✗`:`⚠`),3)),e.call.shell?(I(),U(`span`,lr,`$`)):(I(),U(`span`,ur,K(e.call.tool),1)),e.call.chipOnly?(I(),U(`span`,pr)):(I(),U(k,{key:4},[e.call.open?(I(),U(`code`,fr,K(e.call.title),1)):(I(),U(`code`,dr,K(e.call.headline),1))],64)),V(`span`,mr,[i.value?(I(),U(`span`,hr,K(i.value),1)):L(``,!0),(I(!0),U(k,null,W(e.call.facts,(t,n)=>(I(),U(k,{key:n},[n===s.value&&a.value.over?(I(),U(`span`,gr,`timed out`)):L(``,!0),V(`span`,{class:J([`fact`,[e.call.status!==`ok`&&n===0?`text-bad`:``,n===s.value&&a.value.over?`font-medium text-bad`:``,n===s.value&&o.value?`heat`:``,n===s.value&&a.value.level>=2&&!a.value.over?`font-medium`:``]]),style:_(n===s.value?o.value:void 0)},K(t),7)],64))),128)),a.value.over&&s.value===-1?(I(),U(`span`,_r,`timed out`)):L(``,!0)])],2),V(`div`,vr,[e.call.hasResult&&e.call.output?(I(),U(`pre`,{key:0,class:J([`out max-h-[28rem] overflow-auto whitespace-pre-wrap break-words px-3.5 py-2.5 font-mono leading-normal`,e.call.status===`failed`?`text-bad`:`text-toned`])},K(e.call.output),3)):e.call.hasResult?(I(),U(`div`,yr,`no output`)):(I(),U(`div`,br,`no output yet`)),e.call.files&&e.call.files.length>0?(I(),M(or,{key:3,class:`mx-3.5 mb-2.5`,files:e.call.files,"open-images":!G(r)},null,8,[`files`,`open-images`])):L(``,!0)])],10,sr))}}),Sr=[`title`],Cr=[`title`],wr={class:`skillname whitespace-nowrap font-mono font-medium text-skill`},Tr={key:0,class:`skilldesc min-w-0 flex-1 truncate text-xs text-muted`},Er={class:`facts ml-auto flex shrink-0 gap-2.5 font-mono text-xs text-muted`},Dr=[`href`],Or={class:`fact`},kr=Y({__name:`StepItems`,props:{items:{}},setup(e){return(t,n)=>(I(!0),U(k,null,W(e.items,(e,t)=>(I(),U(k,{key:t},[e.kind===`call`?(I(),M(xr,{key:0,call:e.call},null,8,[`call`])):e.kind===`quiet`?(I(),U(`div`,{key:1,class:`quiet flex items-baseline gap-3 pl-3 pr-(--sb-gutter) py-0.5 font-mono text-xs text-dimmed`,title:e.at===void 0?void 0:G(Z)(e.at)},[V(`span`,null,K(e.text),1)],8,Sr)):(I(),U(`div`,{key:2,class:`skill flex items-baseline gap-2.5 pl-3 pr-(--sb-gutter) py-0.5`,title:e.skill.at===void 0?void 0:G(Z)(e.skill.at)},[n[0]||=V(`span`,{class:`skillmark shrink-0 select-none text-xs`},`📚`,-1),V(`span`,wr,`skill `+K(e.skill.name),1),e.skill.description?(I(),U(`span`,Tr,K(e.skill.description),1)):L(``,!0),V(`span`,Er,[e.skill.source?(I(),U(`a`,{key:0,class:`fact text-primary hover:underline`,href:e.skill.source,target:`_blank`,rel:`noopener noreferrer`},`source`,8,Dr)):L(``,!0),V(`span`,Or,K(G(bt)(e.skill.bodyBytes))+` into context`,1)])],8,Cr))],64))),128))}}),Ar=[`id`,`data-live`],jr={class:`head flex items-baseline gap-x-6 pb-1.5 pr-(--sb-gutter)`},Mr={class:`min-w-0 flex-1`},Nr={key:0,class:`meta flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5 font-mono text-xs tabular-nums text-dimmed`},Pr=[`data-heat`,`title`],Fr=[`title`],Ir=[`title`],Lr={key:2,class:`nonar font-sans text-sm italic text-dimmed`},Rr=[`title`],zr={key:0,class:`narration flex items-baseline gap-3 pb-1.5 pr-(--sb-gutter)`},Br={key:1,class:`narration flex items-baseline gap-3 pb-1.5 pr-(--sb-gutter)`},Vr={class:`nonar flex-1 font-sans text-sm italic text-dimmed`},Hr={class:`calls flex flex-col gap-2`},Ur=[`open`,`data-group-open`],Wr=[`title`],Gr=[`data-ok`,`data-bad`,`data-infra`,`data-running`],Kr=[`data-heat`],qr={class:`gbody flex flex-col gap-2 pb-1 pt-1.5`},Jr=Y({__name:`StepBlock`,props:{step:{}},emits:[`toggleGroup`],setup(e,{emit:t}){let n=e,r=t,i=B(()=>n.step.items.filter(e=>e.kind===`call`)),a=B(()=>i.value.length>=2),o=B(()=>{let e=0,t=0,n=0,r=0,a=0;for(let o of i.value){if(o.kind!==`call`)continue;let i=o.call;i.status===`ok`?e++:i.status===`failed`?t++:i.status===`infra`?n++:r++,typeof i.durationMs==`number`&&(a+=i.durationMs)}return{n:e+t+n+r,ok:e,bad:t,infra:n,running:r,ms:a}}),s=B(()=>gn(o.value)),c=B(()=>i.value.some(e=>e.kind===`call`&&e.call.timedOut)),l=B(()=>We(o.value.ms,`tool`,c.value)),u=B(()=>qe(l.value)),d=B(()=>n.step.turn?We(n.step.turn.durationMs,`turn`):void 0),f=B(()=>d.value?qe(d.value):void 0),p=B(()=>{let e=i.value[0];return e?.kind===`call`?e.call.startedAt:void 0});return(t,n)=>(I(),U(`li`,{id:e.step.turn?`span-${e.step.turn.spanId}`:void 0,class:J([`step relative border-l-2 pb-3 pl-3 pt-2`,e.step.live?`border-ok/40`:`border-(--ui-border-accented)/50`]),"data-live":e.step.live?`1`:void 0},[V(`div`,jr,[V(`div`,Mr,[e.step.turn?(I(),U(`div`,Nr,[V(`span`,{class:J([`thought`,[f.value?`heat`:``,d.value&&d.value.level>=2?`font-medium`:``]]),style:_(f.value),"data-heat":d.value?.level,title:e.step.turn.label},`thought `+K(e.step.turn.chip),15,Pr),e.step.turn.switched?(I(),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.step.turn.model}`},`⇄ `+K(G(kn)(e.step.turn.model)),9,Fr)):e.step.turn.showModel?(I(),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.step.turn.model},K(G(kn)(e.step.turn.model)),9,Ir)):L(``,!0),(I(!0),U(k,null,W(e.step.turn.facts,(e,t)=>(I(),U(`span`,{key:t,class:`fact`},K(e),1))),128))])):e.step.narration===null?(I(),U(`span`,Lr,K(e.step.note),1)):(I(),M($,{key:1,text:e.step.narration},null,8,[`text`]))]),e.step.at===void 0?L(``,!0):(I(),U(`span`,{key:0,class:`ts shrink-0 select-none font-mono text-xs tabular-nums text-dimmed`,title:G(Z)(e.step.at)},K(G(yt)(e.step.at)),9,Rr))]),e.step.turn&&e.step.narration!==null?(I(),U(`div`,zr,[A($,{text:e.step.narration},null,8,[`text`])])):e.step.turn&&e.step.narration===null&&!e.step.turn.facts.length?(I(),U(`div`,Br,[V(`span`,Vr,K(e.step.note),1)])):L(``,!0),V(`div`,Hr,[a.value?(I(),U(`details`,{key:1,class:`grp`,open:e.step.groupOpen,"data-group-open":e.step.groupOpen?`1`:`0`},[V(`summary`,{class:`gsummary flex cursor-pointer list-none items-baseline gap-3 rounded-md pl-3 pr-(--sb-gutter) py-1 font-mono text-xs text-dimmed hover:bg-accented/40 hover:text-muted focus-visible:outline-2 focus-visible:outline-primary [&::-webkit-details-marker]:hidden`,title:typeof p.value==`number`?`calls began ${G(Z)(p.value)}`:void 0,onClick:n[0]||=ce(e=>r(`toggleGroup`),[`prevent`])},[V(`span`,{class:J([`gchev shrink-0 select-none transition-transform motion-reduce:transition-none`,e.step.groupOpen?`rotate-90`:``])},`❯`,2),V(`span`,{class:J([`gcount`,o.value.bad||o.value.infra?`text-bad`:``]),"data-ok":o.value.ok,"data-bad":o.value.bad,"data-infra":o.value.infra,"data-running":o.value.running},K(s.value),11,Gr),o.value.ms>0?(I(),U(`span`,{key:0,class:J([`gtime ml-auto tabular-nums`,[u.value?`heat`:``,l.value.over?`font-medium text-bad`:l.value.level>=2?`font-medium`:``]]),style:_(u.value),"data-heat":l.value.level},[l.value.over?(I(),U(k,{key:0},[P(`timed out · `)],64)):L(``,!0),P(K(G(X)(o.value.ms,`clock`)),1)],14,Kr)):L(``,!0)],8,Wr),V(`div`,qr,[A(kr,{items:e.step.items},null,8,[`items`])])],8,Ur)):(I(),M(kr,{key:0,items:e.step.items},null,8,[`items`]))])],10,Ar))}}),Yr=[`id`],Xr={class:`what`},Zr={key:0,class:`text-dimmed`},Qr={key:1,class:`dur tabular-nums text-dimmed`},$r=[`title`],ei=Y({__name:`SpanRow`,props:{item:{}},setup(e){return(t,n)=>(I(),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`},[V(`span`,{class:J([`glyph select-none`,e.item.status===`error`?`text-bad`:`text-dimmed`])},K(e.item.open?`◌`:e.item.status===`error`?`✗`:`◷`),3),V(`span`,Xr,K(e.item.text),1),e.item.open?(I(),U(`span`,Zr,`…`)):e.item.durationMs===void 0?L(``,!0):(I(),U(`span`,Qr,K(G(X)(e.item.durationMs,`precise`)),1)),e.item.at===void 0?L(``,!0):(I(),U(`span`,{key:2,class:`ts ml-auto select-none text-dimmed`,title:G(Z)(e.item.at)},K(G(yt)(e.item.at)),9,$r))],8,Yr))}}),ti={"getting ready":`paint-ready`,thinking:`paint-thinking`,"in tools":`paint-tools`,"finishing up":`paint-finishing`,"Switchboard overhead":`paint-overhead`,"not recorded":`paint-lost`,"not loaded":`paint-elided`},ni={getting_ready:`getting ready`,finishing_up:`finishing up`};function ri(e){return ti[ni[e]]}var ii={id:`timeline`,class:`block mb-4 rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-3`,"data-testid":`timeline`},ai={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},oi={class:`ml-auto flex items-baseline gap-3 font-normal normal-case tracking-normal`},si=[`href`],ci={class:`lede font-mono text-sm text-toned`},li={class:`shape tabular-nums`},ui={key:0,class:`current text-muted`},di={key:0,class:`note mt-0.5 text-xs text-muted`},fi=[`aria-label`],pi=[`title`,`data-term`],mi={class:`legend mt-2 flex flex-wrap gap-x-4 gap-y-1 font-mono text-xs`},hi=[`title`,`data-term`],gi={class:`term text-muted`},_i={class:`ms tabular-nums text-toned`},vi=[`title`],yi={class:`ranked mt-1 flex flex-col gap-1 font-mono text-xs`},bi={class:`ms w-14 shrink-0 tabular-nums text-toned`},xi=[`href`,`data-anchor`,`onClick`],Si=Y({__name:`TimelineSection`,props:{vm:{},eventsHref:{}},emits:[`reveal`],setup(e,{emit:t}){let n=e,r=t;function i(e){return`${X(e.ms,`clock`)} ${e.term}${e.hatched?` (in flight)`:``}`}function a(){c.copyText(JSON.stringify(n.vm.debug,null,2))}return(t,n)=>(I(),U(`section`,ii,[V(`h2`,ai,[n[0]||=V(`span`,null,`Where the time went`,-1),V(`span`,oi,[e.eventsHref?(I(),U(`a`,{key:0,class:`text-dimmed no-underline hover:text-primary hover:underline`,href:e.eventsHref,title:`the stored events, as JSON lines`},`raw events`,8,si)):L(``,!0),V(`button`,{type:`button`,class:`debug cursor-pointer text-dimmed hover:text-toned`,title:`the partition and the raw span names, for a bug report`,onClick:a},` Copy debug JSON `)])]),V(`p`,ci,[V(`span`,li,K(e.vm.shown?e.vm.total:e.vm.lede),1),e.vm.current?(I(),U(`span`,ui,` · `+K(e.vm.current),1)):L(``,!0)]),(I(!0),U(k,null,W(e.vm.captions,e=>(I(),U(`p`,{key:e,class:`caption mt-0.5 text-xs text-muted`},K(e),1))),128)),e.vm.note?(I(),U(`p`,di,K(e.vm.note),1)):L(``,!0),e.vm.shown?(I(),U(k,{key:1},[V(`div`,{class:`bar mt-2.5 flex h-2 w-full overflow-hidden rounded-sm`,role:`img`,"aria-label":e.vm.lede},[(I(!0),U(k,null,W(e.vm.bar,(e,t)=>(I(),U(`div`,{key:t,class:J([`seg h-full`,[G(ti)[e.term],e.hatched?`paint-hatched hatched`:``]]),style:_({width:`${e.pct}%`}),title:i(e),"data-term":e.term},null,14,pi))),128))],8,fi),V(`ul`,mi,[(I(!0),U(k,null,W(e.vm.legend,e=>(I(),U(`li`,{key:e.term,class:`flex items-baseline gap-1.5 cursor-help`,title:e.definition,"data-term":e.term},[V(`span`,{class:J([`swatch inline-block size-2 shrink-0 self-center rounded-[2px]`,G(ti)[e.term]])},null,2),V(`span`,gi,K(e.term),1),V(`span`,_i,K(e.text),1)],8,hi))),128))]),e.vm.ranked.length>0?(I(),U(k,{key:0},[V(`h3`,{class:`ranked-head mt-3 inline-block cursor-help text-xs font-medium text-muted underline decoration-dotted decoration-(--ui-border-accented) underline-offset-2`,title:e.vm.rankedNote},` Longest steps `,8,vi),V(`ol`,yi,[(I(!0),U(k,null,W(e.vm.ranked,(e,t)=>(I(),U(`li`,{key:t,class:`flex items-baseline gap-2`},[V(`span`,bi,K(G(X)(e.ms,`clock`)),1),V(`a`,{class:`label min-w-0 truncate text-muted no-underline hover:text-primary hover:underline`,href:`#${e.anchor}`,"data-anchor":e.anchor,title:`scroll to this step`,onClick:ce(t=>r(`reveal`,e.anchor),[`prevent`])},K(e.label),9,xi),(I(!0),U(k,null,W(e.facts,e=>(I(),U(`span`,{key:e,class:`fact shrink-0 rounded border border-accented px-1 text-dimmed`},K(e),1))),128))]))),128))])],64)):L(``,!0)],64)):L(``,!0)]))}}),Ci=[`data-position`],wi={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-ok`},Ti=[`href`],Ei={key:1,class:`caption font-normal normal-case tracking-normal text-dimmed`},Di=[`title`],Oi=Y({__name:`ReplyBlock`,props:{text:{},caption:{},when:{},whenTitle:{},position:{},files:{}},setup(e){return(t,n)=>(I(),U(`section`,{id:`reply`,class:J([`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},[V(`h2`,wi,[n[0]||=V(`span`,null,`Reply`,-1),e.caption.href?(I(),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`},K(e.caption.text),9,Ti)):(I(),U(`span`,Ei,K(e.caption.text),1)),V(`span`,{class:`ts ml-auto select-none text-xs font-normal normal-case tracking-normal text-dimmed`,title:e.whenTitle},K(e.when),9,Di)]),A($,{text:e.text},null,8,[`text`]),e.files.length>0?(I(),M(or,{key:0,files:e.files},null,8,[`files`])):L(``,!0)],10,Ci))}});function ki(e,t){let{window:n,owner:r,finished:i}=t,a=Math.max(0,n.end-n.start),o=new Map(e.map(e=>[e.spanId,e])),s=new Map,c=e=>{let t=s.get(e.spanId);if(t!==void 0)return t;s.set(e.spanId,1);let n=e.parentSpanId?o.get(e.parentSpanId):void 0,r=n?c(n)+1:1;return s.set(e.spanId,r),r},l=e=>{let t=e,n=new Set;for(;t&&!n.has(t.spanId);){if(n.add(t.spanId),zt(t.name,r)?.kind===`background`)return!0;t=t.parentSpanId?o.get(t.parentSpanId):void 0}return!1},u=t.losses.map(e=>Math.max(n.start,e.from)).sort((e,t)=>e-t),d=e=>{if(e.endedAt!==void 0)return Math.min(n.end,e.endedAt);if(!i)return n.end;let t=u.find(t=>t>e.startedAt);return t===void 0?n.end:Math.min(n.end,t)},f=[],p=[];for(let t of e){let e=zt(t.name,r);if(!e)continue;let i=Math.max(n.start,t.startedAt);if(e.kind===`background`){let e=Math.min(n.end,t.endedAt??n.end);e>i&&p.push([i,e]);continue}if(e.kind!==`counted`||l(t))continue;let a=d(t);a<=i||f.push({start:i,end:a,bucket:e.bucket,depth:c(t),startedAt:t.startedAt,spanId:t.spanId})}f.sort((e,t)=>t.depth-e.depth||e.startedAt-t.startedAt||(e.spanId<t.spanId?-1:+(e.spanId>t.spanId)));let m=new Set([n.start,n.end]);for(let e of f)m.add(e.start),m.add(e.end);for(let e of t.losses)m.add(Ai(e.from,n)),m.add(Ai(e.to,n));for(let[e,t]of p)m.add(e),m.add(t);let h=[...m].filter(e=>e>=n.start&&e<=n.end).sort((e,t)=>e-t),g={getting_ready:0,thinking:0,tools:0,finishing_up:0},_=0,v=0,y=0;for(let e=0;e+1<h.length;e++){let r=h[e],i=h[e+1],a=i-r;if(a<=0)continue;let o=f.find(e=>e.start<=r&&e.end>=i);if(o){g[o.bucket]+=a;continue}if(t.losses.some(e=>e.kind===`lost`&&Ai(e.from,n)<=r&&Ai(e.to,n)>=i)){_+=a;continue}if(t.losses.some(e=>e.kind===`elided`&&Ai(e.from,n)<=r&&Ai(e.to,n)>=i)){v+=a;continue}p.some(([e,t])=>e<=r&&t>=i)&&(y+=a)}let b=g.getting_ready+g.thinking+g.tools+g.finishing_up;return{windowMs:a,gettingReadyMs:g.getting_ready,thinkingMs:g.thinking,toolsMs:g.tools,finishingUpMs:g.finishing_up,overheadMs:Math.max(0,a-b-_-v),notRecordedMs:_,notLoadedMs:v,backgroundOnlyMs:y}}function Ai(e,t){return Math.min(t.end,Math.max(t.start,e))}function ji(e){let t=Math.floor(e.windowMs/1e3),n=[[`getting ready`,Math.floor(e.gettingReadyMs/1e3)],[`thinking`,Math.floor(e.thinkingMs/1e3)],[`in tools`,Math.floor(e.toolsMs/1e3)],[`finishing up`,Math.floor(e.finishingUpMs/1e3)],[`not recorded`,Math.floor(e.notRecordedMs/1e3)],[`not loaded`,Math.floor(e.notLoadedMs/1e3)]],r=n.reduce((e,[,t])=>e+t,0),i=n.filter(([,e])=>e>0).map(([e,t])=>({term:e,s:t})),a=t-r;a>0&&i.push({term:`Switchboard overhead`,s:a});let o=[`getting ready`,`thinking`,`in tools`,`finishing up`,`Switchboard overhead`,`not recorded`,`not loaded`];return i.sort((e,t)=>o.indexOf(e.term)-o.indexOf(t.term)),{totalS:t,items:i}}function Mi(e){return[e.gettingReadyMs,e.thinkingMs,e.toolsMs,e.finishingUpMs,e.overheadMs,e.notRecordedMs,e.notLoadedMs].filter(t=>t>=2e3||e.windowMs>0&&t/e.windowMs>=.05).length>=2}function Ni(e,t){if(t===void 0||t<6e4)return;let n=X(t,`clock`);return e===`before`?`queued ${n} before we saw it`:`queued ${n} behind the previous run`}var Pi={"getting ready":`before the agent's first turn: reading the thread, finding the repo, checking out, loading tools`,thinking:`the model's turns — from a request to the model until its reply came back`,"in tools":`the commands and tool calls the model ran`,"finishing up":`after the agent's last turn: posting the PR, checking the workspace`,"Switchboard overhead":`orchestration between steps, and moments when only a background read was running — the time no step claims`,"not recorded":`a stretch of the run the record does not carry`,"not loaded":`a stretch of the run this page did not load — the record has the full shape`},Fi=`Ranked by each step's own time, its children excluded — the bar counts every instant once.`,Ii=`currently delivering`,Li=`getting ready: not recorded (too large)`,Ri=`no timing data`,zi=`not loaded (the record has the full shape)`,Bi={getting_ready:`getting ready`,thinking:`thinking`,tools:`in tools`,finishing_up:`finishing up`};function Vi(e){let{spans:t,window:n,owner:r}=e,i=e.phase!==`live`,a=ki(t,{window:n,owner:r,finished:i,losses:e.losses}),o=ji(a),s=X(o.totalS*1e3,`clock`),c=t.find(e=>e.name===`request`&&e.parentSpanId===void 0),l=e.phase===`live`?Ui(t,r,n):void 0,u=Gi(e,l),d=l?Gt(l.name):``,f={window:n,owner:r,phase:e.phase,partition:a,spans:t.map(e=>({spanId:e.spanId,parentSpanId:e.parentSpanId,name:e.name,startedAt:e.startedAt,endedAt:e.endedAt,status:e.status,attrs:e.attrs}))};if(e.untimed)return{total:s,current:u,openStep:d,captions:[],rankedNote:Fi,debug:f,lede:s,shown:!1,bar:[],legend:[],ranked:[],note:Ri};let p={total:s,current:u,openStep:d,captions:[Ni(`before`,Hi(c,`queuedBeforeMs`)),Ni(`behind`,Hi(c,`queuedBehindMs`))].filter(e=>e!==void 0),rankedNote:Fi,debug:f};if(!c)return{...p,lede:s,shown:!1,bar:[],legend:[],ranked:[],note:i?Li:``};let m=t=>t===`not recorded`?`not recorded${e.truncated?` (too large)`:``}`:t===`not loaded`?zi:t,h=Mi(a)&&o.items.length>0,g=h?`${s} — ${o.items.map(({term:e,s:t})=>`${X(t*1e3,`clock`)} ${m(e)}`).join(` · `)}`:a.windowMs>0?`${s} — ${m(qi(a))}`:s,_=h?o.items.map(({term:t,s:n})=>({term:t,text:X(n*1e3,`clock`),definition:t===`not recorded`&&e.truncated?`${Pi[t]} (too large)`:Pi[t]})):[];return{...p,lede:g,shown:h,bar:h?Ji(a,l):[],legend:_,ranked:h?Yi(t,c,r,n,e.callTitle):[],note:``}}function Hi(e,t){let n=e?.attrs[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function Ui(e,t,n){let r=new Map(e.map(e=>[e.spanId,e])),i=e=>{let t=1,n=new Set([e.spanId]),i=e.parentSpanId?r.get(e.parentSpanId):void 0;for(;i&&!n.has(i.spanId);)n.add(i.spanId),t++,i=i.parentSpanId?r.get(i.parentSpanId):void 0;return t},a;for(let o of e){if(o.endedAt!==void 0||o.startedAt>=n.end)continue;let e=zt(o.name,t);if(e?.kind!==`counted`||Wi(o,r,t))continue;let s=i(o);(!a||s>a.depth||s===a.depth&&o.startedAt>a.span.startedAt)&&(a={span:o,depth:s,bucket:e.bucket})}if(a)return{bucket:a.bucket,name:a.span.name,elapsedMs:Math.max(0,n.end-Math.max(n.start,a.span.startedAt))}}function Wi(e,t,n){let r=e,i=new Set;for(;r&&!i.has(r.spanId);){if(i.add(r.spanId),zt(r.name,n)?.kind===`background`)return!0;r=r.parentSpanId?t.get(r.parentSpanId):void 0}return!1}function Gi(e,t){return e.phase===`delivering`?Ii:e.phase===`ended`?Cn(e.delivery??{}):t?`currently ${Bi[t.bucket]} ${X(t.elapsedMs,`clock`)}`:``}function Ki(e){return[[`getting ready`,e.gettingReadyMs],[`thinking`,e.thinkingMs],[`in tools`,e.toolsMs],[`finishing up`,e.finishingUpMs],[`Switchboard overhead`,e.overheadMs],[`not recorded`,e.notRecordedMs],[`not loaded`,e.notLoadedMs]]}function qi(e){let t=[`getting ready`,-1];for(let n of Ki(e))n[1]>t[1]&&(t=n);return t[0]}function Ji(e,t){let n=[],r=t=>e.windowMs>0?t/e.windowMs*100:0;for(let[i,a]of Ki(e))if(!(a<=0)){if(t&&Bi[t.bucket]===i){let e=Math.min(t.elapsedMs,a);a-e>0&&n.push({term:i,ms:a-e,pct:r(a-e),hatched:!1}),e>0&&n.push({term:i,ms:e,pct:r(e),hatched:!0});continue}n.push({term:i,ms:a,pct:r(a),hatched:!1})}return n}function Yi(e,t,n,r,i){let a=new Map(e.map(e=>[e.spanId,e])),o=new Map;for(let t of e){if(t.parentSpanId===void 0)continue;let e=o.get(t.parentSpanId);e?e.push(t):o.set(t.parentSpanId,[t])}let s=e=>[Math.max(r.start,e.startedAt),Math.min(r.end,e.endedAt??r.end)],c=[];for(let r of e){if(r===t||r.name===`run.agent`||zt(r.name,n)===void 0||Wi(r,a,n))continue;let[e,l]=s(r);if(l<=e)continue;let u=(o.get(r.spanId)??[]).map(s).map(([t,n])=>[Math.max(e,t),Math.min(l,n)]).filter(([e,t])=>t>e),d=l-e-Xi(u);if(d<=0)continue;let f=r.name.startsWith(`tool.`)&&typeof r.attrs.callId==`string`?r.attrs.callId:void 0,p=f?i?.(f):void 0;c.push({label:p??Gt(r.name),ms:d,facts:Zi(r),anchor:f?`call-${f}`:`span-${r.spanId}`,startedAt:r.startedAt})}return c.sort((e,t)=>t.ms-e.ms||e.startedAt-t.startedAt),c.slice(0,3).map(({label:e,ms:t,facts:n,anchor:r})=>({label:e,ms:t,facts:n,anchor:r}))}function Xi(e){let t=[...e].sort((e,t)=>e[0]-t[0]),n=0,r;for(let[e,i]of t)!r||e>r[1]?(r&&(n+=r[1]-r[0]),r=[e,i]):i>r[1]&&(r[1]=i);return r&&(n+=r[1]-r[0]),n}function Zi(e){let t=e.attrs,n=[];return(t.token===`expired`||t.token===`expiring`)&&n.push(`token ${t.token}`),t.budget===`clipped`&&n.push(`budget clipped`),typeof t.timeoutMs==`number`&&n.push(`timeout ${X(t.timeoutMs,`clock`)}`),typeof t.waitedMs==`number`&&n.push(`waited ${X(t.waitedMs,`clock`)}`),typeof t.exitCode==`number`&&t.exitCode!==0&&n.push(`exit ${t.exitCode}`),t.timedOut===!0&&n.push(`timed out`),typeof t.attempts==`number`&&t.attempts>1&&n.push(`${t.attempts} attempts`),e.status===`error`&&n.length===0&&n.push(`failed`),n}function Qi(e){return e===`command`?`command`:`agent`}function $i(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 ea=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/,ta=/^[0-9a-f]{7,40}$/;function na(e){if(!e.repo||!ea.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&&ta.test(e.headSha)&&(n.commit=e.number!==void 0&&n.pr?`${t}/pull/${e.number}/commits/${e.headSha}`:`${t}/commit/${e.headSha}`),n}function ra(e){return e.find(e=>e.poweredBy===`meat`)??e.find(e=>e.poweredBy===`git`)??null}function ia(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 aa(e){return`The recorded diff was cut at ${e.toLocaleString(`en-US`)} characters; open the full diff on GitHub for the rest`}function oa(e){return e===`meat`?`reading diff · meat`:`full diff · git`}function sa(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 ca=e=>typeof e==`object`&&!!e,la=e=>typeof e==`string`&&e!==``,ua=e=>typeof e==`number`&&Number.isInteger(e)&&e>0;function da(e){for(let t of e.split(/\n\s*\n/)){let e=t.split(`
|
|
10
|
-
`).map(e=>e.trim()).filter(e=>e!==``);if(!(e.length===0||e.every(e=>e.startsWith(`#`))))return e.join(`
|
|
11
|
-
`)}}function fa(e,t){let n=t.trim().toLowerCase(),r=[],i=!1,a=!1;for(let t of e.split(`
|
|
12
|
-
`)){/^\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(`
|
|
13
|
-
`).trim();return o===``?void 0:o}function pa(e){if(!la(e.title)||e.origin!==`submitted`&&e.origin!==`parsed`)return;let t=typeof e.body==`string`?e.body:``,n=la(e.tldr)?e.tldr:da(t),r=fa(t,`What & why`);return{title:e.title,...n===void 0?{}:{tldr:n},...r===void 0?{}:{whatWhy:r},origin:e.origin,complete:e.complete===!0,truncated:e.truncated===!0}}function ma(){let e=z({pr:{},readingDiffs:[],ready:!1});return{state:e,handle(t){if(!ca(t))return;let n=t;if(n.type===`run_meta`)la(n.repo)&&(e.pr.repo=n.repo),ua(n.pr)&&(e.pr.number=n.pr),typeof n.headSha==`string`&&ta.test(n.headSha)&&(e.pr.headSha=n.headSha);else if(n.type===`review_artifact`&&n.artifact===`reading_diff`){if(!la(n.diff)||n.poweredBy!==`git`&&n.poweredBy!==`meat`)return;let t={poweredBy:n.poweredBy,baseRef:la(n.baseRef)?n.baseRef:`HEAD`,diff:n.diff,truncated:n.truncated===!0,...la(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=pa(n);t&&(e.description=t)}}}}var ha=3e3,ga={fetch:(...e)=>globalThis.fetch(...e),delay:e=>new Promise(t=>setTimeout(t,e))};function _a(e,t,n={}){let{fetch:r,delay:i}={...ga,...n},a=z({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(ha),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 va={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`}},ya={__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=v(),r=le(`badge`,t),i=te(),{orientation:a,size:o}=pe(t),{isLeading:s,isTrailing:c,leadingIconName:l,trailingIconName:u}=ge(r),d=B(()=>ye({extend:va,...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)=>(I(),M(G(h),{as:G(r).as,"data-slot":`base`,class:J(d.value.base({class:[G(r).ui?.base,G(r).class]}))},{default:x(()=>[N(e.$slots,`leading`,{ui:d.value},()=>[G(s)&&G(l)?(I(),M(Ce,{key:0,name:G(l),"data-slot":`leadingIcon`,class:J(d.value.leadingIcon({class:G(r).ui?.leadingIcon}))},null,8,[`name`,`class`])):G(r).avatar?(I(),M(De,O({key:1,size:G(r).ui?.leadingAvatarSize||d.value.leadingAvatarSize()},G(r).avatar,{"data-slot":`leadingAvatar`,class:d.value.leadingAvatar({class:G(r).ui?.leadingAvatar})}),null,16,[`size`,`class`])):L(``,!0)]),N(e.$slots,`default`,{ui:d.value},()=>[G(r).label!==void 0&&G(r).label!==null?(I(),U(`span`,{key:0,"data-slot":`label`,class:J(d.value.label({class:G(r).ui?.label}))},K(G(r).label),3)):L(``,!0)]),N(e.$slots,`trailing`,{ui:d.value},()=>[G(c)&&G(u)?(I(),M(Ce,{key:0,name:G(u),"data-slot":`trailingIcon`,class:J(d.value.trailingIcon({class:G(r).ui?.trailingIcon}))},null,8,[`name`,`class`])):L(``,!0)])]),_:3},8,[`as`,`class`]))}},ba={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`}},xa={__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=v(),o=le(`tabs`,r),s=te(),c=ve(_e(o,`as`,`unmountOnHide`),i),l=B(()=>ye({extend:ba,...s.ui?.tabs||{}})({color:o.color,variant:o.variant,size:o.size,orientation:o.orientation})),u=j([]);function d(e,t){u.value[e]=t}return t({triggersRef:u}),(e,t)=>(I(),M(G(ft),O(G(c),{"model-value":G(o).modelValue,"default-value":G(o).defaultValue,orientation:G(o).orientation,"activation-mode":G(o).activationMode,"data-slot":`root`,class:l.value.root({class:[G(o).ui?.root,G(o).class]})}),{default:x(()=>[A(G(_t),{"data-slot":`list`,class:J(l.value.list({class:G(o).ui?.list}))},{default:x(()=>[A(G(gt),{"data-slot":`indicator`,class:J(l.value.indicator({class:G(o).ui?.indicator}))},null,8,[`class`]),N(e.$slots,`list-leading`),(I(!0),U(k,null,W(G(o).items,(t,n)=>(I(),M(G(vt),{key:G(E)(t,G(o).valueKey)??n,ref_for:!0,ref:e=>d(n,e),value:G(E)(t,G(o).valueKey)??String(n),disabled:t.disabled,"data-slot":`trigger`,class:J(l.value.trigger({class:[G(o).ui?.trigger,t.ui?.trigger]}))},{default:x(()=>[N(e.$slots,`leading`,{item:t,index:n,ui:l.value},()=>[t.icon?(I(),M(Ce,{key:0,name:t.icon,"data-slot":`leadingIcon`,class:J(l.value.leadingIcon({class:[G(o).ui?.leadingIcon,t.ui?.leadingIcon]}))},null,8,[`name`,`class`])):t.avatar?(I(),M(De,O({key:1,size:t.ui?.leadingAvatarSize||G(o).ui?.leadingAvatarSize||l.value.leadingAvatarSize()},{ref_for:!0},t.avatar,{"data-slot":`leadingAvatar`,class:l.value.leadingAvatar({class:[G(o).ui?.leadingAvatar,t.ui?.leadingAvatar]})}),null,16,[`size`,`class`])):L(``,!0)]),G(E)(t,G(o).labelKey)||a.default?(I(),U(`span`,{key:0,"data-slot":`label`,class:J(l.value.label({class:[G(o).ui?.label,t.ui?.label]}))},[N(e.$slots,`default`,{item:t,index:n},()=>[P(K(G(E)(t,G(o).labelKey)),1)])],2)):L(``,!0),N(e.$slots,`trailing`,{item:t,index:n,ui:l.value},()=>[t.badge||t.badge===0?(I(),M(ya,O({key:0,color:`neutral`,variant:`outline`,size:t.ui?.trailingBadgeSize||G(o).ui?.trailingBadgeSize||l.value.trailingBadgeSize()},{ref_for:!0},typeof t.badge==`string`||typeof t.badge==`number`?{label:t.badge}:t.badge,{"data-slot":`trailingBadge`,class:l.value.trailingBadge({class:[G(o).ui?.trailingBadge,t.ui?.trailingBadge]})}),null,16,[`size`,`class`])):L(``,!0)])]),_:2},1032,[`value`,`disabled`,`class`]))),128)),N(e.$slots,`list-trailing`)]),_:3},8,[`class`]),G(o).content?(I(!0),U(k,{key:0},W(G(o).items,(t,n)=>(I(),M(G(ht),{key:G(E)(t,G(o).valueKey)??n,value:G(E)(t,G(o).valueKey)??String(n),"data-slot":`content`,class:J(l.value.content({class:[G(o).ui?.content,t.ui?.content,t.class]}))},{default:x(()=>[N(e.$slots,t.slot||`content`,{item:t,index:n,ui:l.value},()=>[P(K(t.content),1)])]),_:2},1032,[`value`,`class`]))),128)):L(``,!0)]),_:3},16,[`model-value`,`default-value`,`orientation`,`activation-mode`,`class`]))}},Sa;function Ca(){return Sa??=Ie(()=>import(`./dist-boTdDLF4.js`),__vite__mapDeps([0,1,2,3,4])),Sa}var wa={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`},Ta=Y({__name:`FileDiffs`,props:{diff:{},theme:{},diffStyle:{}},setup(e){let t=e,n=j(null),r=j(!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 Ca();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 T(s),S(()=>t.diff,s),S(()=>t.theme,s),S(()=>t.diffStyle,s),Te(()=>{a++,o()}),(t,i)=>r.value?(I(),U(`pre`,wa,K(e.diff),1)):(I(),U(`div`,{key:1,ref_key:`container`,ref:n,class:`space-y-4`,"data-testid":`file-diffs`},null,512))}});async function Ea(e){let{parsePatchFiles:t}=await Ca(),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 Da(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 Oa={dockerfile:`docker`,makefile:`makefile`,"go.mod":`go`,"go.sum":`go`,".gitignore":`gitignore`,".dockerignore":`dockerignore`},ka={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 Aa(e){let t=(e.split(`/`).pop()||e).toLowerCase(),n=Oa[t];if(n)return n;let r=t.lastIndexOf(`.`);return r===-1?`text`:ka[t.slice(r+1)]??`text`}var ja={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 Ma(e){return ja[e]??ja.text}function Na(e){return Ma(Aa(e))}var Pa={key:0,class:`flex items-center gap-2 p-4 text-sm text-(--ui-text-muted) sm:p-5`,"data-testid":`files-loading`},Fa={key:1,class:`p-4 text-sm text-(--ui-text-muted) sm:p-5`,"data-testid":`no-files`},Ia={class:`shrink-0 border-b border-(--ui-border) @2xl:w-72 @2xl:border-b-0 @2xl:border-r`,"data-testid":`file-list`},La={class:`@2xl:sticky @2xl:top-0 @2xl:max-h-[calc(100dvh-11rem)] @2xl:overflow-y-auto @2xl:py-3`},Ra=[`aria-expanded`],za={class:`ml-auto tabular-nums`,"data-testid":`pr-totals`},Ba={class:`text-(--ui-success)`},Va={class:`text-(--ui-error)`},Ha={key:1,class:`flex items-center justify-between gap-2 px-3 pb-2 text-xs text-(--ui-text-dimmed)`},Ua={"data-testid":`file-count`},Wa={class:`tabular-nums`,"data-testid":`pr-totals`},Ga={class:`text-(--ui-success)`},Ka={class:`text-(--ui-error)`},qa=[`title`,`aria-current`,`onClick`],Ja={class:`min-w-0 flex-1 whitespace-nowrap`},Ya={class:`shrink-0 text-[11px] tabular-nums`},Xa={class:`text-(--ui-success)`},Za={class:`text-(--ui-error)`},Qa=34,$a=Y({__name:`FilesChanged`,props:{diff:{},notes:{},diffStyle:{}},setup(e){let t=e,n=w(),r=B(()=>n.value===`dark`?`dark`:`light`),i=j([]),a=j(!0),o=j(null),s=re(`panel`),c=re(`root`),{width:l}=he(c);S(c,e=>{e&&(l.value=e.getBoundingClientRect().width)});let u=B(()=>l.value>0&&l.value<672),d=j(!1),f=B(()=>u.value?`unified`:t.diffStyle??`unified`),p=0;async function m(){let e=++p;a.value=!0;let n=await Ea(t.diff);e===p&&(i.value=n.files,o.value=null,a.value=!1)}S(()=>t.diff,m,{immediate:!0});let h=B(()=>i.value.reduce((e,t)=>({additions:e.additions+t.additions,deletions:e.deletions+t.deletions}),{additions:0,deletions:0}));function g(e){o.value=e,u.value&&(d.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 l=Ce;return a.value?(I(),U(`div`,Pa,[A(l,{name:`i-lucide-loader-circle`,class:`size-4 animate-spin`}),n[1]||=V(`span`,null,`Loading diff…`,-1)])):i.value.length===0?(I(),U(`p`,Fa,` Nothing in this diff parsed as a file. `)):(I(),U(`div`,{key:2,ref_key:`root`,ref:c,class:`@container flex min-h-full flex-col @2xl:flex-row`,"data-testid":`files-changed`},[V(`aside`,Ia,[V(`div`,La,[u.value?(I(),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":d.value,"data-testid":`files-fold`,onClick:n[0]||=e=>d.value=!d.value},[A(l,{name:d.value?`i-lucide-chevron-down`:`i-lucide-chevron-right`,class:`size-3.5 shrink-0 text-(--ui-text-dimmed)`},null,8,[`name`]),V(`span`,null,K(i.value.length)+` `+K(i.value.length===1?`file`:`files`)+` changed`,1),V(`span`,za,[V(`span`,Ba,`+`+K(h.value.additions),1),V(`span`,Va,`−`+K(h.value.deletions),1)])],8,Ra)):(I(),U(`div`,Ha,[V(`span`,Ua,K(i.value.length)+` `+K(i.value.length===1?`file`:`files`),1),V(`span`,Wa,[V(`span`,Ga,`+`+K(h.value.additions),1),V(`span`,Ka,`−`+K(h.value.deletions),1)])])),!u.value||d.value?(I(),U(`ul`,{key:2,class:J([`flex flex-col`,u.value?`pb-2`:``])},[(I(!0),U(k,null,W(i.value,e=>(I(),U(`li`,{key:e.path},[V(`button`,{type:`button`,class:J([`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=>g(e.path)},[A(l,{name:G(Na)(e.path),class:`size-3.5 shrink-0`},null,8,[`name`]),V(`span`,Ja,K(G(Da)(e.path,Qa)),1),V(`span`,Ya,[V(`span`,Xa,`+`+K(e.additions),1),V(`span`,Za,`−`+K(e.deletions),1)])],10,qa)]))),128))],2)):L(``,!0)])]),V(`div`,{ref_key:`panel`,ref:s,class:`min-w-0 flex-1 overflow-x-auto`,"data-testid":`diff-column`},[(I(!0),U(k,null,W(e.notes,e=>(I(),U(`p`,{key:e,class:`px-3 pt-3 text-xs text-(--ui-text-muted)`,"data-testid":`diff-note`},K(e),1))),128)),A(Ta,{diff:e.diff,theme:r.value,"diff-style":f.value},null,8,[`diff`,`theme`,`diff-style`])],512)],512))}}}),eo=Y({__name:`LabelTip`,props:{text:{},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>{let r=Pe;return I(),M(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:x(()=>[N(t.$slots,`default`)]),_:3},8,[`text`,`disabled`])}}}),to={class:`pr-review-panel @container flex h-full min-h-0 min-w-0 flex-col`,"data-testid":`pr-review-panel`},no={class:`shrink-0 border-b border-(--ui-border) px-4 pt-5 pb-4 sm:px-6`},ro={class:`flex flex-col gap-3 @2xl:flex-row @2xl:items-start @2xl:justify-between @2xl:gap-4`},io={class:`min-w-0`},ao={class:`line-clamp-2 text-lg leading-snug font-semibold text-(--ui-text) @2xl:line-clamp-none @2xl:truncate`,"data-testid":`pr-title`},oo={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`},so=[`href`],co={key:1,class:`inline-flex items-center gap-1.5`},lo=[`href`],uo={title:`the base the diff is against`},fo={"data-testid":`producer-label`},po={class:`inline-flex items-center gap-1 text-(--ui-warning)`,"data-testid":`truncated-label`},mo={class:`flex shrink-0 flex-wrap items-center gap-2`},ho={key:1,class:`inline-flex shrink-0 items-center gap-1.5 text-xs text-(--ui-text-muted)`,"data-testid":`abridge-running`},go={key:2,class:`inline-flex min-w-0 shrink items-center gap-1.5 text-xs text-(--ui-error)`,"data-testid":`abridge-failed`},_o=[`title`],vo={key:0,class:`flex shrink-0 items-center justify-between gap-3 border-b border-(--ui-border) px-4 py-2 sm:px-6`},yo={class:`tabs-scroll min-w-0 overflow-x-auto`},bo={class:`min-h-0 flex-1 overflow-y-auto`},xo={key:1,class:`mx-auto max-w-3xl p-4 sm:p-6`,"data-testid":`pr-description`},So={key:2,class:`mt-4 text-xs text-(--ui-text-dimmed) italic`,"data-testid":`description-origin`},Co={key:2,class:`px-4 py-3 text-sm text-(--ui-text-muted) sm:px-6`,"data-testid":`no-diff`},wo=`switchboard:diffStyle`,To=`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.`,Eo=Y({__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=B(()=>na(n.data.pr)),a=B(()=>$i(n.data)),o=B(()=>n.data.readingDiffs),s=B(()=>n.data.description),c=B(()=>o.value.find(e=>e.poweredBy===`git`)),l=B(()=>o.value.find(e=>e.poweredBy===`meat`)),u=B(()=>n.data.pr.headSha?.slice(0,7)),d=B(()=>{let e=[];return c.value&&e.push({label:`Files changed`,value:`files`}),l.value&&e.push({label:`Reading diff`,value:`reading`}),(s.value?.tldr||s.value?.whatWhy)&&e.push({label:`Description`,value:`description`}),e}),f=()=>ra(o.value)?.poweredBy===`meat`?`reading`:`files`,p=j(f());S(()=>ra(o.value),()=>p.value=f()),S(d,e=>{e.some(e=>e.value===p.value)||(p.value=e[0]?.value??`files`)},{immediate:!0});let m=B(()=>p.value===`files`?c.value:p.value===`reading`?l.value:void 0),h=B(()=>{let e=m.value;if(!e)return[];let t=[];return e.summary&&t.push(e.summary),e.truncated&&t.push(`${aa(e.diff.length)}.`),t}),g=B(()=>s.value?sa(s.value):void 0),_=[{label:`Inline`,value:`unified`,icon:`i-lucide-rows-3`},{label:`Side by side`,value:`split`,icon:`i-lucide-columns-2`}],v=j(`unified`);T(()=>{try{localStorage.getItem(wo)===`split`&&(v.value=`split`)}catch{}});function y(e){v.value=e===`split`?`split`:`unified`;try{localStorage.setItem(wo,v.value)}catch{}}let b=B(()=>n.abridge!==void 0&&n.abridge.state.state!==`done`&&c.value!==void 0&&!l.value);return(t,n)=>{let o=Ce,c=ue,l=xa;return I(),U(`div`,to,[V(`header`,no,[V(`div`,ro,[V(`div`,io,[V(`h1`,ao,K(a.value),1),V(`div`,oo,[i.value.pr?(I(),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`},[A(o,{name:`i-simple-icons-github`,class:`size-3.5 shrink-0`}),V(`span`,null,K(e.data.pr.repo)+`#`+K(e.data.pr.number),1)],8,so)):e.data.pr.repo?(I(),U(`span`,co,[A(o,{name:`i-simple-icons-github`,class:`size-3.5 shrink-0`}),V(`span`,null,K(e.data.pr.repo),1)])):L(``,!0),i.value.commit?(I(),U(`a`,{key:2,href:i.value.commit,target:`_blank`,rel:`noopener noreferrer`,class:`font-mono hover:text-(--ui-text)`,"data-testid":`commit-link`},K(u.value),9,lo)):L(``,!0),m.value?(I(),U(k,{key:3},[V(`span`,uo,`against origin/`+K(m.value.baseRef),1),A(eo,{text:G(ia)(m.value.poweredBy)},{default:x(()=>[V(`span`,fo,K(G(oa)(m.value.poweredBy)),1)]),_:1},8,[`text`]),m.value.truncated?(I(),M(eo,{key:0,text:G(aa)(m.value.diff.length)},{default:x(()=>[V(`span`,po,[A(o,{name:`i-lucide-scissors`,class:`size-3.5`}),n[4]||=P(`truncated `,-1)])]),_:1},8,[`text`])):L(``,!0)],64)):L(``,!0)])]),V(`div`,mo,[i.value.pr?(I(),M(c,{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`])):L(``,!0),b.value&&e.abridge?(I(),U(k,{key:1},[e.abridge.state.state===`absent`?(I(),M(eo,{key:0,text:To},{default:x(()=>[A(c,{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`?(I(),U(`span`,ho,[A(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`?(I(),U(`span`,go,[A(o,{name:`i-lucide-circle-alert`,class:`size-3.5 shrink-0`}),V(`span`,{class:`truncate`,title:e.abridge.state.reason},`Abridging failed: `+K(e.abridge.state.reason),9,_o),A(c,{size:`xs`,color:`neutral`,variant:`outline`,label:`Retry`,"data-testid":`abridge-retry`,onClick:n[1]||=t=>e.abridge.start()})])):L(``,!0)],64)):L(``,!0),e.closable?(I(),M(c,{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`)})):L(``,!0)])])]),d.value.length>0?(I(),U(`div`,vo,[V(`div`,yo,[A(l,{modelValue:p.value,"onUpdate:modelValue":n[3]||=e=>p.value=e,items:d.value,size:`sm`,class:`w-fit gap-0`,content:!1,"data-testid":`panel-tabs`},null,8,[`modelValue`,`items`])]),m.value?(I(),M(l,{key:0,"model-value":v.value,items:_,color:`neutral`,size:`xs`,content:!1,class:`hidden w-fit @2xl:flex`,"data-testid":`diff-style`,"onUpdate:modelValue":y},null,8,[`model-value`])):L(``,!0)])):L(``,!0),V(`div`,bo,[m.value?(I(),M($a,{key:m.value.poweredBy,diff:m.value.diff,notes:h.value,"diff-style":v.value},null,8,[`diff`,`notes`,`diff-style`])):p.value===`description`&&s.value?(I(),U(`div`,xo,[n[7]||=V(`div`,{class:`mb-2 text-xs font-medium text-(--ui-text-dimmed)`},`What the pull request says about itself`,-1),s.value.tldr?(I(),M($,{key:0,text:s.value.tldr,class:`text-sm`,"data-testid":`description-tldr`},null,8,[`text`])):L(``,!0),s.value.whatWhy?(I(),U(k,{key:1},[n[6]||=V(`div`,{class:`mt-4 mb-2 text-xs font-medium text-(--ui-text-dimmed)`},`What & why`,-1),A($,{text:s.value.whatWhy,class:`text-sm`,"data-testid":`description-what-why`},null,8,[`text`])],64)):L(``,!0),g.value?(I(),U(`p`,So,K(g.value),1)):L(``,!0)])):(I(),U(`p`,Co,` No reading diff was produced for this review. `))])])}}}),Do={class:`conn flex items-center gap-2 font-mono`},Oo={key:0,class:`ok text-ok`,role:`img`,"aria-label":`succeeded`},ko=[`data-heat`],Ao={key:2,id:`delivery`,class:`text-xs text-muted`},jo=[`title`],Mo={key:0,id:`actions`,class:`actions flex gap-1.5`},No={class:`mx-auto max-w-6xl`},Po={key:0,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`},Fo={class:`agent text-[0.68rem] font-medium uppercase tracking-wider text-toned`},Io={class:`model`},Lo={key:0,class:`effort`},Ro=[`href`],zo={key:2,class:`repo`},Bo=[`href`],Vo={key:4,class:`reftag rounded border border-accented px-1.5 text-[0.75rem] text-toned`},Ho=[`href`,`title`],Uo=[`href`],Wo={key:1,id:`request`,class:`block mb-4 rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-3`},Go={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},Ko={key:0,class:`source flex items-center gap-2 font-normal normal-case tracking-normal text-dimmed`},qo=[`href`],Jo={key:1},Yo={key:1},Xo=[`title`],Zo={key:3,id:`references`,class:`group mb-4 px-(--sb-gutter)`},Qo={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`},$o={class:`count font-normal normal-case tracking-normal text-dimmed`},es={id:`referencedthreads`,class:`pb-1 pl-5`},ts={class:`flex items-baseline gap-2 font-mono text-xs text-dimmed`},ns=[`href`],rs=[`title`],is={class:`quoted mt-1 whitespace-pre-wrap break-words font-mono text-xs opacity-85`},as={key:4,id:`context`,class:`group mb-4 px-(--sb-gutter)`},os={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`},ss={class:`count font-normal normal-case tracking-normal text-dimmed`},cs={id:`contextturns`,class:`pb-1 pl-5`},ls=[`title`],us={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`},ds={key:0,class:`count font-normal normal-case tracking-normal text-dimmed`},fs=[`aria-pressed`,`data-open`,`title`],ps={id:`log`,class:`m-0 list-none p-0`},ms={key:0,id:`placeholder`,class:`empty text-muted`},hs=[`id`],gs={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`},_s=[`title`],vs=[`title`],ys=[`title`],bs=[`href`],xs={key:3,class:`nonar font-sans italic`},Ss=[`title`],Cs=[`data-phase`],ws=[`aria-expanded`,`onClick`],Ts={class:`glyph select-none text-dimmed`},Es={class:`what`},Ds={key:0,class:`m-0 list-none p-0 pl-4`},Os={key:4,class:`followup block mt-5 rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-3`},ks={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},As={key:0,class:`source flex items-center gap-2 font-normal normal-case tracking-normal text-dimmed`},js=[`href`],Ms={key:1},Ns=[`title`],Ps={key:5,class:`mt-5`},Fs=[`open`],Is={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`},Ls={key:0,class:`font-normal normal-case tracking-normal text-dimmed`},Rs=[`title`],zs=[`title`],Bs={key:1,id:`thinking`,class:`pending ml-3.5 mt-5 flex items-center gap-3 rounded-md border border-dashed border-accented pl-3 pr-[calc(var(--sb-gutter)-1px)] py-2 text-sm first:mt-0`,"aria-live":`off`,title:`the model is working on its next turn — nothing back yet (since the last event, runner clock)`},Vs=[`title`],Hs={class:`verb min-w-0 truncate text-toned`},Us=Y({__name:`RunPage`,setup(e){let t=Oe(`run`),n=t?.mode===`history`,r=n?`Run`:`Live run`,i=n,a=t?.artifacts??null,o=typeof window<`u`?new URLSearchParams(window.location.search).get(`open`):null,s=yn({openTags:o?o.split(`,`).map(e=>e.trim()).filter(Boolean):void 0}),l=s.state,u=j(n?`ended`:`connecting`),d=j(``),p=Re(),m=t?.mode===`live`?xn(t,p.value):null,h=j(void 0),g=j({}),v=B(()=>{if(n&&t?.mode===`history`)return t.status===`completed`?{ok:!0,cls:``,word:`succeeded`}:{ok:!1,cls:t.status===`failed`||t.status===`stopped_hard`||t.status===`interrupted`?`red`:t.status===`stopped_soft`?`amber`:`grey`,word:t.status?Ge(t.status):`ended`};let e=l.stopMode;return{ok:!1,cls:e===`hard`?`red`:e===`soft`?`amber`:`grey`,word:e===`hard`?`killed`:e===`soft`?`stopped early`:`ended`}}),b=B(()=>n&&t?.mode===`history`?t.durationMs:h.value),ee=B(()=>Cn(n&&t?.mode===`history`?{finishedAt:t.finishedAt,sealedAt:t.sealedAt,replyOk:t.replyOk}:g.value)),te=B(()=>b.value===void 0?``:X(b.value,`clock`)),ne=B(()=>We(b.value,`run`)),C=B(()=>qe(ne.value)),re={red:`border-bad/30 text-bad`,amber:`border-warn/30 text-warn`,grey:`border-accented text-muted`},ie=B(()=>d.value?d.value:u.value===`connecting`?`connecting…`:u.value===`disconnected`?`disconnected`:u.value===`stopping`?`stopping (${l.stopMode??`soft`})`:u.value===`finished`?h.value===void 0?`delivering…`:`delivering… · ${X(h.value,`clock`)}`:m?`running · ${X(m.elapsedMs(p.value),`clock`)}`:`running`),ae=B(()=>d.value||u.value===`disconnected`?`text-bad`:u.value===`running`?`text-ok motion-safe:animate-pulse`:u.value===`finished`?`text-ok`:`text-warn motion-safe:animate-pulse`),w=B(()=>{if(!t||t.mode!==`live`&&t.mode!==`history`)return null;l.traceVersion;let e=t.receivedAt??t.startedAt,n=Qi(l.meta?.agent);if(t.mode===`history`){let r=t.durationMs??(t.finishedAt===void 0?0:Math.max(0,t.finishedAt-e));return Vi({spans:s.spanSet(),losses:s.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.truncated===void 0?{}:{truncated:t.truncated},...t.untimed?{untimed:!0}:{},callTitle:s.callHeadline})}if(!m)return null;let r=u.value===`ended`?`ended`:u.value===`finished`?`delivering`:`live`,i=r===`live`?m.elapsedMs(p.value):h.value??m.elapsedMs(p.value);return Vi({spans:s.spanSet(),losses:s.losses(e),window:{start:e,end:e+i},owner:n,totalMs:i,phase:r,delivery:g.value,callTitle:s.callHeadline})}),oe=n&&t?.mode===`history`?`/runs/${encodeURIComponent(t.id)}/events`:void 0;function se(e){s.reveal(e)&&y().then(()=>{let t=document.getElementById(e);t&&(t.scrollIntoView?.({block:`center`}),t.classList.add(`revealed`),setTimeout(()=>t.classList.remove(`revealed`),1500))})}let E=j(n),D=j(!1);function O(e){t?.mode===`live`&&(e!==`hard`||c.confirm(`Hard stop: abort the run now with no summary and free its sandbox?`))&&(D.value=!0,fetch(`${t.stopUrl}&mode=${encodeURIComponent(e)}`,{method:`POST`,credentials:`same-origin`}).then(t=>{if(!t.ok)throw Error(`HTTP ${t.status}`);le(e)}).catch(e=>{D.value=!1,d.value=`stop failed: ${e instanceof Error?e.message:`error`}`}))}function le(e){s.markStopping(e),E.value=!0,(u.value===`connecting`||u.value===`running`)&&(u.value=`stopping`)}S(()=>l.stopMode,e=>{e&&u.value!==`ended`&&u.value!==`disconnected`&&u.value!==`finished`&&le(e)}),n||S(u,e=>c.setFavicon(e===`ended`||e===`disconnected`||e===`finished`?Ye:Je),{immediate:!0});let de=B(()=>!n&&u.value!==`ended`&&u.value!==`disconnected`&&u.value!==`finished`),fe=B(()=>de.value?bn(l,p.value):null);Ee(Tn,fe),Ee(En,a),Ee(Dn,B(()=>l.reply!==null));let pe=B(()=>de.value?jn(l,s.pendingCall(),p.value):null),me=[`Thinking`,`Pondering`,`Mulling it over`,`Reasoning`,`Cogitating`,`Weighing options`,`Puzzling`,`Deliberating`,`Noodling`,`Chewing on it`,`Ruminating`,`Reticulating splines`],N=B(()=>pe.value?.kind===`thinking`?w.value?.openStep||me[Math.floor(pe.value.elapsedMs/6e3)%me.length]:``);function he(){s.setAllOpen(!l.allOpen)}let ge=B(()=>l.log.filter(e=>e.kind===`step`).length),_e=B(()=>{for(let e=l.log.length-1;e>=0;e--){let t=l.log[e];if(t.kind===`note`&&t.noteKind===`notes`)return t.key}}),ve=j(null);function ye(){return window.innerHeight+window.scrollY>=document.body.scrollHeight-60}let F=ma(),be=j(!1),xe=t?.mode===`history`&&t.capabilities.readingDiffAbridge?_a(t.id,e=>F.handle(e)):void 0;Te(()=>xe?.dispose());function Se(e){let t=ye();s.handle(e),F.handle(e),t&&requestAnimationFrame(()=>ve.value?.scrollIntoView?.({block:`nearest`}))}let we=Ue(),R=null;if(t?.mode===`history`){for(let e of t.events)s.handle(e),F.handle(e);s.closePhases()}T(()=>{if(t?.mode!==`live`)return;R=we(t.eventsUrl),R.onopen=()=>{l.stopMode||(u.value=`running`)};let e=0;R.onmessage=t=>{let n;try{n=JSON.parse(t.data)}catch{return}if(n.type!==`replay_note`){let n=Number(t.lastEventId);if(n>0){if(n<=e)return;e=n}}Se(n)},R.addEventListener(`replay_elided`,e=>{let t=pn(e);t&&s.noteElided(t)}),R.addEventListener(`finished`,e=>{let t=wn(e);t&&m&&(h.value=m.elapsedAt(t.finishedAt)),t&&(g.value={...g.value,finishedAt:t.finishedAt}),E.value=!0,(u.value===`connecting`||u.value===`running`)&&(u.value=`finished`)}),R.addEventListener(`end`,e=>{s.flushPendingTurn(`the run ended here`),s.closePhases(),E.value=!0,h.value??=m?.elapsedMs(p.value),g.value={...g.value,...Sn(e)},u.value=`ended`,R?.close()}),R.onerror=()=>{R&&R.readyState===2&&(u.value=`disconnected`)}}),Te(()=>{R?.close()});function z(e){return e&&/^https?:\/\//.test(e)?e:``}let De=B(()=>z(l.request?.source?.url)),H=B(()=>{let e=l.meta;return{repo:tn(e?.repo),tree:rn(e?.repo,e?.ref),commit:an(e?.repo,e?.headSha),pr:nn(e?.repo,e?.pr)}}),ke=B(()=>_n({meta:l.meta,requestText:l.request?.text??``,prOpened:l.prOpened}));function q(e){return typeof e==`number`?Be(e,p.value):``}function Ae(e){return typeof e==`number`?Z(e):void 0}return(e,t)=>{let n=ue,a=Pe,o=Ce,c=Ct;return I(),M(f,{title:G(r),nav:`runs`},{leading:x(()=>[...t[4]||=[V(`a`,{class:`back text-sm text-primary no-underline hover:underline`,href:`/runs`},`← All runs`,-1)]]),status:x(()=>[V(`span`,Do,[u.value===`ended`?(I(),U(k,{key:0},[v.value.ok?(I(),U(`span`,Oo,`✓`)):(I(),U(`span`,{key:1,class:J([`chip rounded border px-1.5 text-[0.7rem]`,re[v.value.cls]])},K(v.value.word),3)),V(`span`,{id:`state`,class:J([`dur text-xs tabular-nums`,[C.value?`heat`:`text-muted`,ne.value.level>=2?`font-medium`:``]]),style:_(C.value),"data-heat":ne.value.level},K(te.value),15,ko),ee.value?(I(),U(`span`,Ao,`· `+K(ee.value),1)):L(``,!0)],64)):(I(),U(k,{key:1},[V(`span`,{id:`statedot`,class:J([`pulse text-[1.1em] leading-none`,ae.value])},`∿`,2),V(`span`,{id:`state`,class:J([`text-xs tabular-nums`,d.value?`text-bad`:`text-muted`]),title:u.value===`running`&&!d.value?`the whole run, since we received the message`:u.value===`finished`?`the agent stopped; the reply is being posted`:void 0},K(ie.value),11,jo)],64))])]),actions:x(()=>[E.value?L(``,!0):(I(),U(`span`,Mo,[A(a,{text:`Soft stop: no new steps, the agent writes up what it has`},{default:x(()=>[A(n,{size:`xs`,color:`neutral`,variant:`outline`,label:`Stop`,disabled:D.value,onClick:t[0]||=e=>O(`soft`)},null,8,[`disabled`])]),_:1}),A(a,{text:`Hard stop: abort now, no summary, free the sandbox`},{default:x(()=>[A(n,{size:`xs`,color:`error`,variant:`outline`,label:`Kill`,disabled:D.value,onClick:t[1]||=e=>O(`hard`)},null,8,[`disabled`])]),_:1})]))]),default:x(()=>[V(`div`,No,[G(l).meta?(I(),U(`div`,Po,[V(`span`,Fo,K(G(l).meta.agent),1),V(`span`,Io,K(G(l).meta.model),1),G(l).meta.effort?(I(),U(`span`,Lo,K(G(l).meta.effort)+` effort`,1)):L(``,!0),H.value.repo?(I(),U(`a`,{key:1,class:`text-primary no-underline hover:underline`,href:H.value.repo,target:`_blank`,rel:`noopener noreferrer`},K(G(l).meta.repo),9,Ro)):G(l).meta.repo?(I(),U(`span`,zo,K(G(l).meta.repo),1)):L(``,!0),H.value.tree?(I(),U(`a`,{key:3,class:`reftag rounded border border-accented px-1.5 text-[0.75rem] text-toned no-underline hover:border-primary hover:text-primary`,href:H.value.tree,target:`_blank`,rel:`noopener noreferrer`,title:`the branch on GitHub`},K(G(l).meta.ref),9,Bo)):G(l).meta.ref?(I(),U(`span`,Vo,K(G(l).meta.ref),1)):L(``,!0),H.value.commit&&G(l).meta.headSha?(I(),U(`a`,{key:5,class:`sha tabular-nums text-toned no-underline hover:text-primary hover:underline`,href:H.value.commit,target:`_blank`,rel:`noopener noreferrer`,title:`the head commit ${G(l).meta.headSha}`},K(G(on)(G(l).meta.headSha)),9,Ho)):L(``,!0),H.value.pr?(I(),U(`a`,{key:6,class:`prlink whitespace-nowrap text-primary no-underline hover:underline`,href:H.value.pr,target:`_blank`,rel:`noopener noreferrer`},[A(Nt,{class:`mr-1 align-[-0.125em]`}),P(`#`+K(G(l).meta.pr),1)],8,Uo)):L(``,!0),G(F).state.ready?(I(),U(`button`,{key:7,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=>be.value=!0},[A(o,{name:`i-lucide-git-compare`,class:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[5]||=P(` Reading diff `,-1)])):L(``,!0)])):L(``,!0),G(l).request?(I(),U(`section`,Wo,[V(`h2`,Go,[t[6]||=V(`span`,null,`Request`,-1),G(l).request.source?(I(),U(`span`,Ko,[G(l).request.source.channel?(I(),U(k,{key:0},[A(Ke),De.value?(I(),U(`a`,{key:0,class:`text-muted no-underline hover:text-primary hover:underline`,href:De.value,target:`_blank`,rel:`noopener noreferrer`,title:`open the thread`},`#`+K(G(l).request.source.channel),9,qo)):(I(),U(`span`,Jo,`#`+K(G(l).request.source.channel),1))],64)):L(``,!0),G(l).request.source.user?(I(),U(`span`,Yo,K(G(l).request.source.user),1)):L(``,!0)])):L(``,!0),V(`span`,{class:`ts ml-auto select-none text-xs font-normal normal-case tracking-normal text-dimmed`,title:Ae(G(l).request.at)},K(q(G(l).request.at)),9,Xo)]),A(Ot,{lines:3},{default:x(()=>[A($,{text:G(l).request.text},null,8,[`text`])]),_:1}),G(l).request.files.length>0?(I(),M(or,{key:0,files:G(l).request.files},null,8,[`files`])):L(``,!0)])):L(``,!0),G(l).reply&&G(i)?(I(),M(Oi,{key:2,position:`first`,text:G(l).reply.text,caption:ke.value,when:q(G(l).reply.at),"when-title":Ae(G(l).reply.at),files:G(l).reply.files},null,8,[`text`,`caption`,`when`,`when-title`,`files`])):L(``,!0),G(l).references.length>0?(I(),U(`details`,Zo,[V(`summary`,Qo,[t[7]||=V(`span`,{class:`chev select-none text-xs text-dimmed transition-transform group-open:rotate-90 motion-reduce:transition-none`},`❯`,-1),V(`span`,null,`Referenced thread`+K(G(l).references.length===1?``:`s`),1),V(`span`,$o,`· `+K(G(l).references.length)+` thread`+K(G(l).references.length===1?``:`s`),1)]),V(`div`,es,[(I(!0),U(k,null,W(G(l).references,e=>(I(),U(`div`,{key:e.key,class:`reference border-t border-default py-1.5 first-of-type:border-t-0`},[V(`div`,ts,[V(`a`,{class:`text-muted no-underline hover:text-primary hover:underline`,href:e.url,target:`_blank`,rel:`noopener noreferrer`},`#`+K(e.channelName),9,ns),V(`span`,null,`· `+K(e.messages)+` message`+K(e.messages===1?``:`s`),1),V(`span`,{class:`ts ml-auto shrink-0 select-none`,title:Ae(e.at)},K(q(e.at)),9,rs)]),V(`div`,is,[(I(!0),U(k,null,W(G(dn)(e.text),(e,t)=>(I(),U(`div`,{key:t},K(e),1))),128))])]))),128))])])):L(``,!0),G(l).context.length>0?(I(),U(`details`,as,[V(`summary`,os,[t[8]||=V(`span`,{class:`chev select-none text-xs text-dimmed transition-transform group-open:rotate-90 motion-reduce:transition-none`},`❯`,-1),t[9]||=V(`span`,null,`Earlier in this thread`,-1),V(`span`,ss,`· `+K(G(l).context.length)+` turn`+K(G(l).context.length===1?``:`s`),1)]),V(`div`,cs,[(I(!0),U(k,null,W(G(l).context,e=>(I(),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`},[A($,{text:e.text},null,8,[`text`]),V(`span`,{class:`ts ml-auto shrink-0 select-none font-mono text-xs text-dimmed`,title:Ae(e.at)},K(q(e.at)),9,ls)]))),128))])])):L(``,!0),V(`h2`,us,[t[10]||=V(`span`,null,`This run`,-1),ge.value>0?(I(),U(`span`,ds,`· `+K(ge.value)+` step`+K(ge.value===1?``:`s`),1)):L(``,!0),V(`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":G(l).allOpen?`true`:`false`,"data-open":G(l).allOpen?`1`:`0`,title:G(l).allOpen?`Close every call card`:`Open every call card`,onClick:he},K(G(l).allOpen?`Collapse all`:`Expand all`),9,fs)]),w.value?(I(),M(Si,{key:5,vm:w.value,"events-href":G(oe),onReveal:se},null,8,[`vm`,`events-href`])):L(``,!0),V(`ol`,ps,[G(l).placeholder?(I(),U(`li`,ms,`Waiting for activity…`)):L(``,!0),(I(!0),U(k,null,W(G(l).log,e=>(I(),U(k,{key:e.key},[e.kind===`step`?(I(),M(Jr,{key:0,step:e,class:`mt-5 first:mt-0`,onToggleGroup:t=>G(s).toggleGroup(e)},null,8,[`step`,`onToggleGroup`])):e.kind===`turn`?(I(),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`},[V(`div`,gs,[V(`span`,{class:J([`thought`,e.turn.quick?``:`text-warn`]),title:e.turn.label},`thought `+K(e.turn.chip),11,_s),e.turn.switched?(I(),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}`},`⇄ `+K(G(kn)(e.turn.model)),9,vs)):e.turn.showModel?(I(),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},K(G(kn)(e.turn.model)),9,ys)):L(``,!0),(I(!0),U(k,null,W(e.turn.facts,(e,t)=>(I(),U(`span`,{key:t,class:`fact`},K(e),1))),128)),e.note&&e.noteHref?(I(),U(`a`,{key:2,class:`nonar font-sans italic text-dimmed no-underline hover:text-primary hover:underline`,href:e.noteHref},K(e.note),9,bs)):e.note?(I(),U(`span`,xs,K(e.note),1)):L(``,!0),e.turn.at===void 0?L(``,!0):(I(),U(`span`,{key:4,class:`ts ml-auto select-none`,title:G(Z)(e.turn.at)},K(G(yt)(e.turn.at)),9,Ss))])],8,hs)):e.kind===`span`?(I(),M(ei,{key:2,item:e},null,8,[`item`])):e.kind===`phase`?(I(),U(`li`,{key:3,class:`phase py-0.5 font-mono text-xs`,"data-phase":e.phase},[V(`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:ce(t=>G(s).togglePhase(e),[`prevent`])},[V(`span`,Ts,K(e.open?`▾`:`▸`),1),V(`span`,{class:J([`swatch inline-block size-2 shrink-0 self-center rounded-[2px]`,G(ri)(e.phase)]),"aria-hidden":`true`},null,2),V(`span`,Es,K(G(un)(e)),1)],8,ws),e.open?(I(),U(`ul`,Ds,[(I(!0),U(k,null,W(e.rows,e=>(I(),M(ei,{key:e.key,item:e},null,8,[`item`]))),128))])):L(``,!0)],8,Cs)):e.kind===`followup`?(I(),U(`li`,Os,[V(`h2`,ks,[t[11]||=V(`span`,null,`↪ Follow-up`,-1),e.input.source?.user?(I(),U(`span`,As,[z(e.input.source.url)?(I(),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`},K(e.input.source.user),9,js)):(I(),U(`span`,Ms,K(e.input.source.user),1))])):L(``,!0),V(`span`,{class:`ts ml-auto select-none text-xs font-normal normal-case tracking-normal text-dimmed`,title:Ae(e.input.at)},K(q(e.input.at)),9,Ns)]),A($,{text:e.input.text},null,8,[`text`]),e.input.files.length>0?(I(),M(or,{key:0,files:e.input.files},null,8,[`files`])):L(``,!0)])):e.noteKind===`notes`?(I(),U(`li`,Ps,[V(`details`,{class:`notepad group rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-2`,open:e.key===_e.value},[V(`summary`,Is,[t[12]||=V(`span`,{class:`chev select-none text-xs text-dimmed transition-transform group-open:rotate-90 motion-reduce:transition-none`},`❯`,-1),t[13]||=V(`span`,null,`📝 Notes for this thread`,-1),e.key===_e.value?L(``,!0):(I(),U(`span`,Ls,`· superseded`)),e.at===void 0?L(``,!0):(I(),U(`span`,{key:1,class:`ts ml-auto select-none font-normal normal-case tracking-normal text-dimmed`,title:G(Z)(e.at)},K(G(yt)(e.at)),9,Rs))]),A($,{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,Fs)])):(I(),U(`li`,{key:6,class:J([`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`])},[V(`span`,null,K((e.replay?`… `:`⏱ `)+e.text),1),e.at===void 0?L(``,!0):(I(),U(`span`,{key:0,class:`ts ml-auto select-none font-mono text-xs text-dimmed`,title:G(Z)(e.at)},K(G(yt)(e.at)),9,zs))],2))],64))),128)),pe.value?.kind===`thinking`?(I(),U(`li`,Bs,[t[14]||=V(`span`,{class:`pulse text-[1.1em] leading-none text-info motion-safe:animate-pulse`},`∿`,-1),V(`span`,{class:`badge shrink-0 rounded bg-accented px-1.5 font-mono text-[0.68rem] font-medium leading-normal tracking-wider text-muted`,title:G(l).model??void 0},K(G(kn)(G(l).model)),9,Vs),V(`span`,Hs,K(N.value)+`…`,1),V(`span`,{class:J([`since ml-auto shrink-0 font-mono text-xs tabular-nums`,pe.value.slow?`text-warn`:`text-dimmed`])},K(G(X)(pe.value.elapsedMs,`clock`)),3)])):L(``,!0),V(`li`,{ref_key:`logEnd`,ref:ve,"aria-hidden":`true`},null,512)]),G(l).reply&&!G(i)?(I(),M(Oi,{key:6,position:`last`,text:G(l).reply.text,caption:ke.value,when:q(G(l).reply.at),"when-title":Ae(G(l).reply.at),files:G(l).reply.files},null,8,[`text`,`caption`,`when`,`when-title`,`files`])):L(``,!0)]),A(c,{open:be.value,"onUpdate:open":t[3]||=e=>be.value=e,title:G($i)(G(F).state),ui:{overlay:`z-30`,content:`z-30 w-[min(96vw,90rem)] max-w-none`}},{content:x(({close:e})=>[A(Eo,{data:G(F).state,abridge:G(xe),closable:``,onClose:t=>e()},null,8,[`data`,`abridge`,`onClose`])]),_:1},8,[`open`,`title`])]),_:1},8,[`title`])}}}),Ws=Y({__name:`RunRoutePage`,setup(e){let t=oe(H,null);return(e,n)=>!G(t)||G(t).page===`runNotFound`?(I(),M(ze,{key:0})):(I(),M(Us,{key:1}))}});export{Ws as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,t as n}from"./AppShell-lYVcj-k7.js";import{Ci as r,Lr as i,Mr as a,Qn as o,Xt as s,_n as c,a as l,ci as u,cn as d,gn as f,i as p,ir as m,ln as h,nr as g,oi as _,on as v,r as y,sn as b,un as x,ur as S,vi as C,wi as w,xi as T,yn as E}from"./seed-DeKSHrt2.js";import{t as D}from"./Tooltip-DGQ2gu9M.js";import{t as O}from"./wallClock-61NpVkY6.js";import{t as k}from"./RunsTabs-DEICQ4FY.js";import{t as A}from"./StatusDot-DexKtvUC.js";import{n as j,r as M,t as N}from"./indexFormat-B-pd4r7Y.js";import{C as P,E as F,O as I,S as L,T as R,_ as z,a as B,b as V,c as H,d as U,f as W,g as G,h as K,i as q,j as J,k as Y,l as ee,m as te,n as X,o as Z,p as Q,s as ne,t as $,u as re,v as ie,w as ae,x as oe,y as se}from"./favicon-CWPcvWvp.js";import{t as ce}from"./localIso-L06jV29p.js";var le={class:`flex items-baseline gap-1.5 whitespace-pre-line px-2 py-1 text-xs`},ue={key:1,class:`text-dimmed`},de=[`data-kind`,`aria-label`,`href`],fe=[`data-kind`,`aria-label`],pe=E({__name:`SourceMark`,props:{kind:{},tip:{},url:{}},setup(e){let t=e,n=()=>q[t.kind]??`○`,r=()=>B[t.kind]??t.kind;return(t,a)=>{let o=D;return m(),d(o,null,{content:i(()=>[b(`span`,le,[e.kind===`slack`?(m(),d(J,{key:0})):C(q)[e.kind]?(m(),x(`span`,ue,w(n()),1)):h(``,!0),b(`span`,null,w(e.tip),1)])]),default:i(()=>[e.url?(m(),x(`a`,{key:0,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 ${r()} thread (new tab)`,href:e.url,target:`_blank`,rel:`noopener noreferrer`},`↗`,8,de)):(m(),x(`span`,{key:1,class:T([`source pointer-events-auto w-[1.6em] shrink-0 text-center text-[0.8rem] text-dimmed opacity-0 transition-opacity focus-visible:opacity-100 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none`,e.kind===`cli`?`text-[0.7rem]`:``]),"data-kind":e.kind,"aria-label":`source: ${r()}`},w(n()),11,fe))]),_:1})}}}),me=[`data-run-id`,`data-started-at`,`data-persisted`,`data-expires-at`],he=[`href`,`aria-label`],ge={class:`pointer-events-auto flex items-center max-sm:order-1`},_e=[`data-agent-hue`],ve=[`href`],ye={key:3,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`},xe={class:`expires pointer-events-auto shrink-0 font-mono text-xs tabular-nums text-warn max-sm:order-11`},Se=[`data-heat`],Ce={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={class:`actions hidden min-w-[7.6em] shrink-0 justify-end gap-1.5 whitespace-nowrap sm:flex`},Te=E({__name:`RunRow`,props:{run:{},now:{},retentionMs:{}},setup(n){let a=n,o=v(()=>M(a.run.label||z(a.run.id))),u=v(()=>te(a.run,o.value.scope)),f=v(()=>se(a.run)),p=v(()=>K(a.run)),g=v(()=>ae(a.run)),y=v(()=>G(a.run)),S=v(()=>U(a.run,a.retentionMs)),E=v(()=>S.value!==void 0&&S.value-a.now<=864e5),O=v(()=>!a.run.finished&&!a.run.stop),k=v(()=>I(a.run.finished&&typeof a.run.finishedAt==`number`?a.run.finishedAt-a.run.startedAt:void 0,`run`)),F=v(()=>Y(k.value)),W=v(()=>a.run.finished&&a.run.status&&a.run.status!==`completed`?V(a.run.status):``),q=v(()=>a.run.stop&&!(a.run.finished&&a.run.status)?P(a.run.stop):``),J={coding:`text-ok bg-ok/8 border-ok/25`,review:`text-review bg-review/8 border-review/25`,research:`text-research bg-research/8 border-research/25`,general:`text-info bg-info/8 border-info/25`,other:`text-toned bg-accented/60 border-accented`},X=_({soft:!1,hard:!1}),Q=v(()=>[...y.value?[{label:`Open ${B[g.value.kind]??g.value.kind} thread`,icon:`i-lucide-external-link`,to:y.value,target:`_blank`}]:[],...O.value?[{label:`Stop (soft)`,icon:`i-lucide-octagon-pause`,onSelect:()=>$(`soft`)},{label:`Kill (hard)`,icon:`i-lucide-octagon-x`,color:`error`,onSelect:()=>$(`hard`)}]:[]]);function $(e){(e!==`hard`||t.confirm(`Hard stop: abort this run now with no summary and free its sandbox?`))&&(X[e]=!0,fetch(L(a.run,e),{method:`POST`,credentials:`same-origin`}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`)}).catch(()=>{X[e]=!1}))}function le(e){e.target?.closest(`a, button`)||t.navigate(p.value)}return(t,a)=>{let _=D,v=l,M=e;return m(),x(`li`,{class:T([`run group relative rounded-md border-b border-muted hover:bg-(--ui-bg-muted) focus-within:bg-(--ui-bg-muted)`,[n.run.finished?`finished`:`live`,E.value?`leaving`:``]]),"data-run-id":n.run.id,"data-started-at":String(n.run.startedAt),"data-persisted":n.run.persisted?`1`:void 0,"data-expires-at":S.value===void 0?void 0:String(S.value),onClick:le},[b(`a`,{class:`row absolute inset-0 rounded-md focus-visible:outline-2 focus-visible:outline-primary`,href:p.value,"aria-label":`open run ${n.run.label||C(z)(n.run.id)}`},null,8,he),b(`div`,{class:T([`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`,[n.run.finished?`text-muted`:``,E.value?`opacity-85`:``]])},[b(`span`,ge,[c(A,{tone:f.value,label:C(oe)(n.run),tip:C(ee)(n.run),pulse:!n.run.finished},null,8,[`tone`,`label`,`tip`,`pulse`])]),c(_,{text:C(R)(n.run),ui:{text:`whitespace-pre-line`}},{default:i(()=>[b(`span`,{class:T([`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]`,n.run.finished?`text-dimmed`:`text-muted`])},w(C(j)(n.run.startedAt,n.now)),3)]),_:1},8,[`text`]),o.value.agent?(m(),x(`span`,{key:0,class:T([`agent shrink-0 rounded border px-1.5 font-mono text-[0.68rem] font-medium uppercase tracking-wider max-sm:order-2`,[J[C(Z)(o.value.agent)],n.run.finished?`opacity-55`:``]]),"data-agent-hue":C(Z)(o.value.agent)},w(o.value.agent),11,_e)):h(``,!0),u.value?(m(),d(_,{key:1,text:u.value},{default:i(()=>[b(`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/${u.value}`,target:`_blank`,rel:`noopener noreferrer`},w(u.value.slice(u.value.indexOf(`/`)+1)),9,ve)]),_:1},8,[`text`])):(m(),x(`span`,{key:2,class:T([`scope min-w-0 shrink-0 truncate font-medium max-sm:order-3`,n.run.finished?`text-toned`:`text-highlighted`])},w(o.value.scope),3)),o.value.snippet===void 0?h(``,!0):(m(),x(`span`,ye,w(o.value.snippet),1)),W.value?(m(),x(`span`,{key:4,class:T([`outcome shrink-0 rounded border px-1.5 font-mono text-[0.7rem] max-sm:order-10`,f.value===`red`?`border-bad/30 text-bad`:`border-warn/30 text-warn`])},w(W.value),3)):h(``,!0),q.value?(m(),x(`span`,{key:5,class:T([`stopbadge shrink-0 rounded border px-1.5 font-mono text-[0.7rem] max-sm:order-10`,n.run.stop?.state===`stopped`?`border-accented text-muted`:`border-warn/30 text-warn`])},w(q.value),3)):h(``,!0),b(`span`,be,[c(pe,{kind:g.value.kind,tip:C(ie)(n.run),url:y.value||void 0},null,8,[`kind`,`tip`,`url`])]),E.value&&S.value!==void 0?(m(),d(_,{key:6,text:`removed at ${C(ce)(S.value)}`},{default:i(()=>[b(`span`,xe,`gone `+w(C(N)(S.value,n.now)),1)]),_:1},8,[`text`])):h(``,!0),c(_,{text:n.run.finished?`start to finish`:`running for`},{default:i(()=>[b(`span`,{class:T([`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]`,n.run.finished?[F.value?`heat`:`text-muted`,k.value.level>=2?`font-medium`:``]:`text-ok`]),style:r(n.run.finished?F.value:void 0),"data-heat":n.run.finished?k.value.level:void 0},w(C(re)(n.run,n.now)),15,Se)]),_:1},8,[`text`]),a[2]||=b(`span`,{class:`hidden text-xs text-dimmed max-sm:order-8 max-sm:inline`,"aria-hidden":`true`},`·`,-1),c(_,{text:C(H)(n.run)},{default:i(()=>[b(`span`,Ce,w(C(ne)(n.run)),1)]),_:1},8,[`text`]),b(`span`,we,[O.value?(m(),x(s,{key:0},[c(_,{text:`Soft stop: no new steps, the agent writes up what it has`},{default:i(()=>[c(v,{class:`pointer-events-auto`,size:`xs`,color:`neutral`,variant:`outline`,label:`Stop`,disabled:X.soft,onClick:a[0]||=e=>$(`soft`)},null,8,[`disabled`])]),_:1}),c(_,{text:`Hard stop: abort now, no summary, free the sandbox`},{default:i(()=>[c(v,{class:`pointer-events-auto`,size:`xs`,color:`error`,variant:`outline`,label:`Kill`,disabled:X.hard,onClick:a[1]||=e=>$(`hard`)},null,8,[`disabled`])]),_:1})],64)):h(``,!0)]),Q.value.length>0?(m(),d(M,{key:7,items:Q.value,content:{align:`end`}},{default:i(()=>[c(v,{class:`pointer-events-auto -my-1.5 -mr-1 max-sm:order-5 sm:hidden`,size:`md`,color:`neutral`,variant:`ghost`,icon:`i-lucide-ellipsis-vertical`,"aria-label":`Run actions`})]),_:1},8,[`items`])):h(``,!0)],2)],10,me)}}}),Ee={class:`conn flex items-center gap-1.5`},De={id:`state`,class:`text-xs text-muted`},Oe={class:`toolbar mb-1.5 flex items-center gap-4 px-2 text-xs text-muted`},ke={id:`livecount`,class:`count font-mono tabular-nums`},Ae={class:`filter ml-auto inline-flex items-center gap-1.5`},je={class:`toggle inline-flex cursor-pointer select-none items-center gap-1.5 text-toned hover:text-highlighted`},Me=[`checked`],Ne={id:`retention`,class:`sr-only`},Pe={key:0,class:`banner mb-3 rounded-md border border-warn px-2.5 py-1.5 text-[0.8rem] text-warn`,role:`status`},Fe={id:`runs`,class:`m-0 list-none border-t border-muted p-0`},Ie={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`},Le={key:1,id:`empty`,class:`empty px-2 py-2 text-muted`},Re={key:1,class:`pager mt-3 flex items-baseline gap-2 px-2 text-[0.8rem] text-muted`,"aria-label":`Completed runs pages`},ze={class:`range font-mono tabular-nums text-dimmed`},Be=[`href`],Ve=E({__name:`RunsIndexPage`,setup(e){let r=y(`runs`),l=r?.all??!1,T=r?.olderThan!==void 0,E=r?.retentionDays??null,j=E===null?void 0:E*864e5,M=p(E),P=_(new Map);for(let e of r?.rows??[])P.set(e.id,e);let I=O(r?.now),L=u({tone:`amber`,text:`connecting…`}),R=v(()=>[...P.values()].sort((e,t)=>t.startedAt-e.startedAt)),z=v(()=>R.value.filter(e=>!e.finished).length),B=v(()=>j===void 0?-1:R.value.findIndex(e=>{let t=U(e,j);return t!==void 0&&t-I.value<=864e5})),V=v(()=>B.value===-1?R.value:R.value.slice(0,B.value)),H=v(()=>B.value===-1?[]:R.value.slice(B.value)),G=l?`All runs`:`Live runs`;a(z,e=>{t.setTitle((e>0?`(${e}) `:``)+G),t.setFavicon(e>0?X:$)},{immediate:!0});function K(e){t.navigate(e.target.checked?`/runs?all=1`:`/runs`)}let q=v(()=>r?.olderThan===void 0?``:N(r.olderThan,I.value)),J=F(),Y=null;return o(()=>{Y=J(l?`/runs?stream=1&all=1`:`/runs?stream=1`);let e=!1;Y.onopen=()=>{if(e){t.reload();return}e=!0,L.value={tone:`green`,text:`connected`}},Y.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}let n=t.type===`removed`?t.id:t.run?.id,r=n?P.get(n):void 0;if(T&&!r)return;let i=W(t,l,r?.persisted===!0);i.op===`upsert`?P.set(i.run.id,Q(P.get(i.run.id),i.run)):i.op===`remove`&&P.delete(i.id)},Y.onerror=()=>{Y&&Y.readyState===2?L.value={tone:`red`,text:`disconnected`}:L.value={tone:`amber`,text:`connecting…`}}}),g(()=>{Y?.close()}),(e,t)=>{let a=D;return m(),d(n,{title:C(G),nav:`runs`},{status:i(()=>[b(`span`,Ee,[c(A,{tone:L.value.tone,label:L.value.text},null,8,[`tone`,`label`]),b(`span`,De,w(L.value.text),1)])]),default:i(()=>[c(k,{current:`runs`}),b(`div`,Oe,[b(`span`,ke,w(z.value)+` running`,1),b(`span`,Ae,[b(`label`,je,[b(`input`,{id:`showdone`,type:`checkbox`,class:`accent-(--ui-bg-inverted)`,checked:C(l),"aria-describedby":`retention`,onChange:K},null,40,Me),t[0]||=f(` Show completed `,-1)]),c(a,{text:C(M)},{default:i(()=>[...t[1]||=[b(`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`]),b(`span`,Ne,w(C(M)),1)])]),C(r)?.storeUnavailable?(m(),x(`p`,Pe,w(C(r).storeUnavailable),1)):h(``,!0),b(`ul`,Fe,[(m(!0),x(s,null,S(V.value,e=>(m(),d(Te,{key:e.id,run:e,now:C(I),"retention-ms":C(j)},null,8,[`run`,`now`,`retention-ms`]))),128)),H.value.length>0?(m(),x(`li`,Ie,[...t[2]||=[b(`span`,{"aria-hidden":`true`,class:`text-sm tracking-normal`},`⏳`,-1),b(`span`,{class:`whitespace-nowrap`},`Leaving within a day`,-1),b(`span`,{class:`normal-case tracking-normal text-dimmed max-sm:hidden`},`— each row says when it is removed`,-1)]])):h(``,!0),(m(!0),x(s,null,S(H.value,e=>(m(),d(Te,{key:e.id,run:e,now:C(I),"retention-ms":C(j)},null,8,[`run`,`now`,`retention-ms`]))),128)),R.value.length===0?(m(),x(`li`,Le,w(C(l)?`No runs.`:`No active runs.`),1)):h(``,!0)]),C(l)&&(C(r)?.olderHref||C(r)?.olderThan!==void 0)?(m(),x(`nav`,Re,[C(r)?.olderThan===void 0?h(``,!0):(m(),x(s,{key:0},[t[3]||=b(`a`,{class:`text-primary hover:underline`,href:`/runs?all=1`},`← Newest runs`,-1),b(`span`,ze,`· runs finished before `+w(q.value),1)],64)),C(r)?.olderHref?(m(),x(`a`,{key:1,class:`older ml-auto text-primary hover:underline`,href:C(r).olderHref},`Older runs →`,8,Be)):h(``,!0)])):h(``,!0)]),_:1},8,[`title`])}}});export{Ve as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./AppShell-lYVcj-k7.js";import{Rn as t,ir as n,sn as r,un as i}from"./seed-DeKSHrt2.js";import{t as a}from"./localIso-L06jV29p.js";function o(e,t){if(e===void 0)return``;switch(t){case`precise`:return s(e);case`clock`:return c(e);case`report`:return l(e)}}function s(e){if(!(e>=0))return`0ms`;if(e<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100);if(t<600)return`${(t/10).toFixed(1)}s`;let n=Math.round(e/1e3);return`${Math.floor(n/60)}m ${u(n%60)}s`}function c(e){if(!(e>0))return`0s`;let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m ${u(t%60)}s`:`${Math.floor(n/60)}h ${u(n%60)}m`}function l(e){if(!(e>=0))return`0ms`;if(e<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m ${u(t%60)}s`:`${Math.floor(n/60)}h ${u(n%60)}m`}function u(e){return e<10?`0${e}`:String(e)}var d={},f={viewBox:`0 0 24 24`,class:`inline-block size-[1em] shrink-0 align-[-0.1em]`,"aria-label":`Slack`,role:`img`};function p(e,t){return n(),i(`svg`,f,[...t[0]||=[r(`rect`,{x:`2`,y:`13`,width:`9`,height:`3`,rx:`1.5`,fill:`#e01e5a`},null,-1),r(`rect`,{x:`13`,y:`2`,width:`3`,height:`9`,rx:`1.5`,fill:`#36c5f0`},null,-1),r(`rect`,{x:`13`,y:`13`,width:`9`,height:`3`,rx:`1.5`,fill:`#ecb22e`},null,-1),r(`rect`,{x:`9`,y:`13`,width:`3`,height:`9`,rx:`1.5`,fill:`#2eb67d`},null,-1)]])}var m=e(d,[[`render`,p]]),h={tool:{floorMs:2e3,ceilingMs:12e5},turn:{floorMs:15e3,ceilingMs:3e5},run:{floorMs:6e4,ceilingMs:27e5}};function g(e){return e===124}function _(e,t){let{floorMs:n,ceilingMs:r}=h[t];if(!(e>n))return 0;let i=Math.log(e/n)/Math.log(r/n);return i>=1?1:i}function v(e){return e<=0?0:e<.4?1:e<.7?2:3}function y(e,t,n=!1){if(n)return{level:4,over:!0,t:1};if(e===void 0)return{level:0,over:!1,t:0};let r=_(e,t);return{level:v(r),over:!1,t:r}}function b(e){return e.level>=1&&e.level<=3?{"--heat-t":e.t.toFixed(3)}:void 0}function x(e,t){let n=e.finishedAt??t;if(n!==void 0)return Math.max(0,n-(e.receivedAt??e.startedAt))}var S=Symbol(`sb-event-source`);function C(e){return{get onopen(){return e.onopen},set onopen(t){e.onopen=t},get onmessage(){return e.onmessage},set onmessage(t){e.onmessage=t},get onerror(){return e.onerror},set onerror(t){e.onerror=t},addEventListener(t,n){e.addEventListener(t,e=>n(typeof e.data==`string`?e.data:void 0))},close(){e.close()},get readyState(){return e.readyState}}}function w(){return t(S,e=>C(new EventSource(e)))}function T(e){return e===`completed`?`succeeded`:e===`stopped_soft`?`stopped early`:e===`stopped_hard`?`killed`:e}function E(e){return e.state===`stopped`?T(`stopped_${e.mode}`):`${e.state} (${e.mode})`}function D(e){return e.finished?e.status?T(e.status):`finished`:`live`}function O(e){return e.finished&&!e.persisted&&e.sealedAt===void 0}function k(e){return e.finished?O(e)?`amber`:e.status===`failed`||e.status===`stopped_hard`||e.status===`interrupted`?`red`:e.status===`stopped_soft`?`amber`:`grey`:`green`}function A(e){return e===`coding`||e===`review`||e===`research`||e===`general`?e:`other`}function j(e){let t=e.stepCount??e.eventCount;return`${t} event${t===1?``:`s`}`}function M(e){return e.stepCount===void 0?`events published, span records included`:`content events; span records excluded`}function ee(e){return`/runs/${encodeURIComponent(e.id)}${!e.finished&&e.token?`?t=${encodeURIComponent(e.token)}`:``}`}function N(e,t){return`/runs/${encodeURIComponent(e.id)}/stop?t=${encodeURIComponent(e.token??``)}&mode=${encodeURIComponent(t)}`}function P(e){return e.length>8?`${e.slice(0,8)}…`:e}function F(e,t){let n=x(e,e.finished?void 0:t);return n===void 0?``:o(n,`clock`)}function I(e){return typeof e.receivedAt==`number`?` (received to finish)`:``}function L(e){let t=e.channelId??``,n=t.indexOf(`:`),r=n===-1?`unknown`:t.slice(0,n);if(e.userName)return{kind:r,identity:e.userName};let i=e.userId??``,a=i.indexOf(`:`);return{kind:r,identity:a===-1?i:i.slice(a+1)}}var R={slack:`⁙`,http:`⌁`,mcp:`◈`,cli:`>_`},z={slack:`Slack`,http:`HTTP ingress`,mcp:`MCP`,cli:`CLI`};function B(e){if(!e.finished)return e.activity?`now: ${e.activity}`:`starting…`;let t=D(e),n=x(e);return n!==void 0&&(t+=` in ${o(n,`clock`)}${I(e)}`),O(e)&&(t+=` · delivering the reply`),e.status&&e.status!==`completed`&&e.activity&&(t+=`\n${e.activity}`),t}function V(e){let t=typeof e.receivedAt==`number`?`received ${a(e.receivedAt)}\n`:``;return t+=`started ${a(e.startedAt)}`,e.finished&&typeof e.finishedAt==`number`&&(t+=`\nfinished ${a(e.finishedAt)}`),t}function H(e){let t=L(e);return`via ${z[t.kind]??t.kind}${t.identity?` · ${t.identity}`:``}`}function U(e,t){return e.repo??(/^[\w.-]+\/[\w.-]+$/.test(t)?t:``)}function W(e){return e.sourceUrl&&/^https?:\/\//.test(e.sourceUrl)?e.sourceUrl:``}function G(e,t,n){return e.type===`upsert`&&e.run?!t&&e.run.finished?{op:`remove`,id:e.run.id}:{op:`upsert`,run:e.run}:e.type===`removed`&&e.id?t&&n?{op:`keep`}:{op:`remove`,id:e.id}:{op:`keep`}}function K(e,t){if(!e||!e.finished)return t;let n={...t};return n.finishedAt===void 0&&e.finishedAt!==void 0&&(n.finishedAt=e.finishedAt),n.status===void 0&&e.status!==void 0&&(n.status=e.status),n.receivedAt===void 0&&e.receivedAt!==void 0&&(n.receivedAt=e.receivedAt),n.sealedAt===void 0&&e.sealedAt!==void 0&&(n.sealedAt=e.sealedAt),n.replyOk===void 0&&e.replyOk!==void 0&&(n.replyOk=e.replyOk),n}function q(e,t){return e.finished&&typeof e.finishedAt==`number`&&typeof t==`number`?e.finishedAt+t:void 0}var J=864e5;function Y(e){return`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><circle cx='8' cy='8' r='6' fill='${e}'/></svg>`}var X=`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><g transform='translate(0 2)' stroke-linejoin='round' stroke-linecap='round' stroke-width='5'><polygon points='32,30 59,43 32,56 5,43' fill='none' stroke='#15151a'/><polygon points='32,17 59,30 32,43 5,30' fill='#15151a' stroke='#15151a'/><polygon points='32,4 59,17 32,30 5,17' fill='#fafaf7' stroke='#15151a'/><path d='M32 17 L32 30 L19 37 M32 30 L45 37' fill='none' stroke='#1a7f37'/><circle cx='32' cy='17' r='5' fill='#1a7f37' stroke='#fafaf7' stroke-width='3'/><circle cx='19' cy='37' r='5' fill='#1a7f37' stroke='#15151a' stroke-width='3'/><circle cx='45' cy='37' r='5' fill='#1a7f37' stroke='#15151a' stroke-width='3'/></g></svg>`,Z=e=>`data:image/svg+xml,${encodeURIComponent(e)}`,Q=Z(Y(`#2ea043`));Z(Y(`#d29922`)),Z(Y(`#f85149`));var $=Z(Y(`#6e7681`));Z(X);export{g as A,E as C,x as D,w as E,o as M,y as O,N as S,V as T,P as _,z as a,T as b,M as c,q as d,G as f,W as g,ee as h,R as i,m as j,b as k,B as l,U as m,Q as n,A as o,K as p,J as r,j as s,$ as t,F as u,H as v,L as w,D as x,k as y};
|