@coreplane/switchboard 1.223.0 → 1.224.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/package-lock.json +3 -3
- package/dist/assets/package.json +1 -1
- package/dist/assets/source.json +3 -3
- package/dist/assets/web/dist/.vite/manifest.json +19 -19
- package/dist/assets/web/dist/assets/{ResidentDetailPage-BTg4oFcn.js → ResidentDetailPage-BXwWQRJt.js} +1 -1
- package/dist/assets/web/dist/assets/{ResidentsIndexPage-Dr2qkjKI.js → ResidentsIndexPage-CwVN-3tl.js} +1 -1
- package/dist/assets/web/dist/assets/RunRoutePage-C0-RUb8o.js +12 -0
- package/dist/assets/web/dist/assets/{RunsIndexPage-DEkZXNnw.js → RunsIndexPage-Tx5P767G.js} +1 -1
- package/dist/assets/web/dist/assets/{ScheduledPage-wA7HE6UW.js → ScheduledPage-C80zFu3G.js} +1 -1
- package/dist/assets/web/dist/assets/{StatusDot-7ojvQlTS.js → StatusDot-BaGkjYs1.js} +1 -1
- package/dist/assets/web/dist/assets/{Tooltip-Cx88lWUW.js → Tooltip-BL-Cwe59.js} +1 -1
- package/dist/assets/web/dist/assets/{dist-B85zXO-d.js → dist-DZgVjemt.js} +1 -1
- package/dist/assets/web/dist/assets/main-43n8Y5qO.css +1 -0
- package/dist/assets/web/dist/assets/{main-BdoqEBpN.js → main-BB6FMkeU.js} +2 -2
- package/dist/cli.js +91 -34
- package/package.json +1 -1
- package/dist/assets/web/dist/assets/RunRoutePage-CTbnfyBQ.js +0 -12
- package/dist/assets/web/dist/assets/main-C1tNx19B.css +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "switchboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.224.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "switchboard",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.224.0",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"workspaces": [
|
|
12
12
|
"web",
|
|
@@ -16710,7 +16710,7 @@
|
|
|
16710
16710
|
},
|
|
16711
16711
|
"packages/switchboard": {
|
|
16712
16712
|
"name": "@coreplane/switchboard",
|
|
16713
|
-
"version": "1.
|
|
16713
|
+
"version": "1.224.0",
|
|
16714
16714
|
"license": "Apache-2.0",
|
|
16715
16715
|
"dependencies": {
|
|
16716
16716
|
"@anthropic-ai/sdk": "^0.124.0",
|
package/dist/assets/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "switchboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.224.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"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.",
|
|
6
6
|
"license": "Apache-2.0",
|
package/dist/assets/source.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"src": "../node_modules/@fontsource-variable/jetbrains-mono/files/jetbrains-mono-vietnamese-wght-normal.woff2"
|
|
29
29
|
},
|
|
30
30
|
"../node_modules/@pierre/diffs/dist/index.js": {
|
|
31
|
-
"file": "assets/dist-
|
|
31
|
+
"file": "assets/dist-DZgVjemt.js",
|
|
32
32
|
"name": "dist",
|
|
33
33
|
"src": "../node_modules/@pierre/diffs/dist/index.js",
|
|
34
34
|
"isDynamicEntry": true,
|
|
@@ -2562,16 +2562,16 @@
|
|
|
2562
2562
|
"_seed-DeKSHrt2.js"
|
|
2563
2563
|
]
|
|
2564
2564
|
},
|
|
2565
|
-
"_StatusDot-
|
|
2566
|
-
"file": "assets/StatusDot-
|
|
2565
|
+
"_StatusDot-BaGkjYs1.js": {
|
|
2566
|
+
"file": "assets/StatusDot-BaGkjYs1.js",
|
|
2567
2567
|
"name": "StatusDot",
|
|
2568
2568
|
"imports": [
|
|
2569
2569
|
"_seed-DeKSHrt2.js",
|
|
2570
|
-
"_Tooltip-
|
|
2570
|
+
"_Tooltip-BL-Cwe59.js"
|
|
2571
2571
|
]
|
|
2572
2572
|
},
|
|
2573
|
-
"_Tooltip-
|
|
2574
|
-
"file": "assets/Tooltip-
|
|
2573
|
+
"_Tooltip-BL-Cwe59.js": {
|
|
2574
|
+
"file": "assets/Tooltip-BL-Cwe59.js",
|
|
2575
2575
|
"name": "Tooltip",
|
|
2576
2576
|
"imports": [
|
|
2577
2577
|
"_AppShell-lYVcj-k7.js",
|
|
@@ -2789,7 +2789,7 @@
|
|
|
2789
2789
|
]
|
|
2790
2790
|
},
|
|
2791
2791
|
"src/main.ts": {
|
|
2792
|
-
"file": "assets/main-
|
|
2792
|
+
"file": "assets/main-BB6FMkeU.js",
|
|
2793
2793
|
"name": "main",
|
|
2794
2794
|
"src": "src/main.ts",
|
|
2795
2795
|
"isEntry": true,
|
|
@@ -2807,7 +2807,7 @@
|
|
|
2807
2807
|
"_NotFoundPage-BzWS4Ca1.js"
|
|
2808
2808
|
],
|
|
2809
2809
|
"css": [
|
|
2810
|
-
"assets/main-
|
|
2810
|
+
"assets/main-43n8Y5qO.css"
|
|
2811
2811
|
],
|
|
2812
2812
|
"assets": [
|
|
2813
2813
|
"assets/instrument-sans-latin-ext-wght-normal-B5bTHO_g.woff2",
|
|
@@ -2841,19 +2841,19 @@
|
|
|
2841
2841
|
]
|
|
2842
2842
|
},
|
|
2843
2843
|
"src/pages/ResidentDetailPage.vue": {
|
|
2844
|
-
"file": "assets/ResidentDetailPage-
|
|
2844
|
+
"file": "assets/ResidentDetailPage-BXwWQRJt.js",
|
|
2845
2845
|
"name": "ResidentDetailPage",
|
|
2846
2846
|
"src": "src/pages/ResidentDetailPage.vue",
|
|
2847
2847
|
"isDynamicEntry": true,
|
|
2848
2848
|
"imports": [
|
|
2849
2849
|
"_AppShell-lYVcj-k7.js",
|
|
2850
2850
|
"_seed-DeKSHrt2.js",
|
|
2851
|
-
"_StatusDot-
|
|
2851
|
+
"_StatusDot-BaGkjYs1.js",
|
|
2852
2852
|
"_residentDiskBudget-BMBKlYRH.js"
|
|
2853
2853
|
]
|
|
2854
2854
|
},
|
|
2855
2855
|
"src/pages/ResidentsIndexPage.vue": {
|
|
2856
|
-
"file": "assets/ResidentsIndexPage-
|
|
2856
|
+
"file": "assets/ResidentsIndexPage-CwVN-3tl.js",
|
|
2857
2857
|
"name": "ResidentsIndexPage",
|
|
2858
2858
|
"src": "src/pages/ResidentsIndexPage.vue",
|
|
2859
2859
|
"isDynamicEntry": true,
|
|
@@ -2861,20 +2861,20 @@
|
|
|
2861
2861
|
"_AppShell-lYVcj-k7.js",
|
|
2862
2862
|
"_seed-DeKSHrt2.js",
|
|
2863
2863
|
"_wallClock-61NpVkY6.js",
|
|
2864
|
-
"_StatusDot-
|
|
2864
|
+
"_StatusDot-BaGkjYs1.js",
|
|
2865
2865
|
"_residentDiskBudget-BMBKlYRH.js",
|
|
2866
2866
|
"_indexFormat-B-pd4r7Y.js"
|
|
2867
2867
|
]
|
|
2868
2868
|
},
|
|
2869
2869
|
"src/pages/RunRoutePage.vue": {
|
|
2870
|
-
"file": "assets/RunRoutePage-
|
|
2870
|
+
"file": "assets/RunRoutePage-C0-RUb8o.js",
|
|
2871
2871
|
"name": "RunRoutePage",
|
|
2872
2872
|
"src": "src/pages/RunRoutePage.vue",
|
|
2873
2873
|
"isDynamicEntry": true,
|
|
2874
2874
|
"imports": [
|
|
2875
2875
|
"_AppShell-lYVcj-k7.js",
|
|
2876
2876
|
"_seed-DeKSHrt2.js",
|
|
2877
|
-
"_Tooltip-
|
|
2877
|
+
"_Tooltip-BL-Cwe59.js",
|
|
2878
2878
|
"src/main.ts",
|
|
2879
2879
|
"_wallClock-61NpVkY6.js",
|
|
2880
2880
|
"_NotFoundPage-BzWS4Ca1.js",
|
|
@@ -2890,31 +2890,31 @@
|
|
|
2890
2890
|
]
|
|
2891
2891
|
},
|
|
2892
2892
|
"src/pages/RunsIndexPage.vue": {
|
|
2893
|
-
"file": "assets/RunsIndexPage-
|
|
2893
|
+
"file": "assets/RunsIndexPage-Tx5P767G.js",
|
|
2894
2894
|
"name": "RunsIndexPage",
|
|
2895
2895
|
"src": "src/pages/RunsIndexPage.vue",
|
|
2896
2896
|
"isDynamicEntry": true,
|
|
2897
2897
|
"imports": [
|
|
2898
2898
|
"_AppShell-lYVcj-k7.js",
|
|
2899
2899
|
"_seed-DeKSHrt2.js",
|
|
2900
|
-
"_Tooltip-
|
|
2900
|
+
"_Tooltip-BL-Cwe59.js",
|
|
2901
2901
|
"_wallClock-61NpVkY6.js",
|
|
2902
2902
|
"_RunsTabs-DEICQ4FY.js",
|
|
2903
|
-
"_StatusDot-
|
|
2903
|
+
"_StatusDot-BaGkjYs1.js",
|
|
2904
2904
|
"_indexFormat-B-pd4r7Y.js",
|
|
2905
2905
|
"_favicon-CWPcvWvp.js",
|
|
2906
2906
|
"_localIso-L06jV29p.js"
|
|
2907
2907
|
]
|
|
2908
2908
|
},
|
|
2909
2909
|
"src/pages/ScheduledPage.vue": {
|
|
2910
|
-
"file": "assets/ScheduledPage-
|
|
2910
|
+
"file": "assets/ScheduledPage-C80zFu3G.js",
|
|
2911
2911
|
"name": "ScheduledPage",
|
|
2912
2912
|
"src": "src/pages/ScheduledPage.vue",
|
|
2913
2913
|
"isDynamicEntry": true,
|
|
2914
2914
|
"imports": [
|
|
2915
2915
|
"_AppShell-lYVcj-k7.js",
|
|
2916
2916
|
"_seed-DeKSHrt2.js",
|
|
2917
|
-
"_Tooltip-
|
|
2917
|
+
"_Tooltip-BL-Cwe59.js",
|
|
2918
2918
|
"_wallClock-61NpVkY6.js",
|
|
2919
2919
|
"_RunsTabs-DEICQ4FY.js",
|
|
2920
2920
|
"_indexFormat-B-pd4r7Y.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-lYVcj-k7.js";import{Lr as t,Xt as n,_n as r,cn as i,gn as a,ir as o,ln as ee,on as s,r as c,sn as l,un as u,ur as d,vi as f,wi as p,yn as te}from"./seed-DeKSHrt2.js";import{t as m}from"./StatusDot-7ojvQlTS.js";import{a as ne,c as re,d as ie,f as h,i as g,l as ae,n as oe,o as se,r as ce,s as _,t as le,u as ue}from"./residentDiskBudget-BMBKlYRH.js";var de={class:`mt-4 first:mt-0`},fe={class:`w-full border-collapse font-mono text-[0.8125rem]`},pe={class:`border-t border-muted`},me={class:`px-2 py-1 align-top`},v={class:`ml-1.5 font-medium`},y={class:`border-t border-muted`},b={class:`break-all px-2 py-1 align-top`},x={key:0},S={key:1,class:`text-dimmed`},C={class:`border-t border-muted`},w={class:`break-all px-2 py-1 align-top`},T={key:0},E={key:1,class:`text-dimmed`},D={class:`border-t border-muted`},O={class:`break-all px-2 py-1 align-top`},k={key:0},A={key:1,class:`text-dimmed`},j={class:`border-t border-muted`},M={class:`break-all px-2 py-1 align-top`},N={key:0},P={key:1,class:`text-dimmed`},F={class:`border-t border-muted`},I={class:`break-all px-2 py-1 align-top`},L={key:1,class:`text-dimmed`},R={class:`mt-4`},z={class:`w-full border-collapse font-mono text-[0.8125rem]`},he={class:`border-t border-muted`},ge={class:`break-all px-2 py-1 align-top`},_e=[`href`],ve={key:1},ye={class:`border-t border-muted`},be={class:`break-all px-2 py-1 align-top`},xe={class:`border-t border-muted`},Se={class:`break-all px-2 py-1 align-top`},Ce=[`href`],we={key:1},Te={key:2,class:`text-dimmed`},Ee={class:`border-t border-muted`},De={class:`break-all px-2 py-1 align-top`},Oe={key:0},ke={key:1,class:`text-dimmed`},Ae={class:`border-t border-muted`},je={class:`break-all px-2 py-1 align-top`},Me={key:0},Ne={key:1,class:`text-dimmed`},Pe={class:`border-t border-muted`},Fe={class:`break-all px-2 py-1 align-top`},Ie={key:0},Le={key:1,class:`text-dimmed`},Re={class:`mt-4`},ze={class:`w-full border-collapse font-mono text-[0.8125rem]`},Be={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ve={class:`break-all px-2 py-1 align-top`},He={class:`w-full border-collapse font-mono text-[0.8125rem]`},Ue={class:`w-32 break-all px-2 py-1 align-top text-muted sm:w-96 sm:break-words`},We={class:`px-2 py-1 align-top`},Ge={key:1,class:`text-xs text-muted`},Ke={class:`mt-4`},qe={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Je={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ye={class:`break-all px-2 py-1 align-top`},Xe={key:0},B={key:1,class:`text-dimmed`},Ze={key:1,class:`text-xs text-muted`},Qe={class:`mt-4`},$e={class:`mb-1 text-xs text-muted`},et={class:`overflow-x-auto`},tt={class:`w-full border-collapse font-mono text-[0.8125rem]`},nt={class:`break-all px-2 py-1 align-top`},rt={key:0,class:`text-xs text-muted`},it={class:`break-all px-2 py-1 align-top`},at=[`href`],ot={key:1},st={key:2,class:`text-dimmed`},ct={class:`break-all px-2 py-1 align-top`},lt={key:0},ut={key:1,class:`text-dimmed`},dt={key:2},ft={key:3,class:`text-dimmed`},pt={class:`break-all px-2 py-1 align-top`},mt={key:0},ht={key:1,class:`text-dimmed`},gt={key:2},_t={key:3,class:`text-dimmed`},vt={key:1,class:`text-xs text-muted`},yt={class:`mt-4`},bt={class:`w-full border-collapse font-mono text-[0.8125rem]`},xt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},St={class:`px-2 py-1 align-top`},Ct={class:`mt-4`},wt={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Tt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Et={class:`break-all px-2 py-1 align-top`},Dt={class:`text-xs text-muted`},Ot={key:1,class:`text-xs text-muted`},kt={class:`mt-4`},At={class:`w-full border-collapse font-mono text-[0.8125rem]`},jt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Mt={class:`break-all px-2 py-1 align-top`},Nt={key:0},Pt={key:1,class:`text-dimmed`},Ft={class:`mt-4 text-xs text-muted`},It={class:`rounded bg-elevated px-1 py-0.5`},Lt={class:`rounded bg-elevated px-1 py-0.5`},Rt={class:`rounded bg-elevated px-1 py-0.5`},V=te({__name:`ResidentDetailPage`,setup(te){let V=c(`resident`),H=s(()=>V?.record??{}),U=s(()=>ae(H.value)),W=s(()=>ue(H.value)||(V?.slug??``)),G=s(()=>h(U.value.sha)),K=s(()=>se.test(W.value)?`https://github.com/${W.value}`:void 0),q=s(()=>K.value&&/^[0-9a-f]{7,40}$/.test(G.value)?`${K.value}/commit/${G.value}`:void 0),J=s(()=>{let e=U.value.snapshot;return e&&typeof e==`object`?_(e):void 0}),zt=s(()=>_(U.value.schedules)),Y=s(()=>{let e=_(H.value.commands),t=_(H.value.effects);return Object.keys(e).sort().map(n=>({name:n,command:h(e[n]),effect:h(t[n])||`readonly`}))}),X=s(()=>{let e=U.value.threads;return(Array.isArray(e)?e.map(_):[]).map(e=>{let t=h(e.sha);return{threadKey:h(e.threadKey)||`?`,ref:h(e.ref)||`?`,sha:t?t.slice(0,8):``,commitHref:K.value&&/^[0-9a-f]{7,40}$/.test(t)?`${K.value}/commit/${t}`:void 0,user:h(e.user),deps:h(e.deps),boundAt:h(e.boundAt),lastAttachAt:h(e.lastAttachAt),evicted:e.evicted===!0,evictedAt:h(e.evictedAt),evictedWhy:h(e.evictedWhy)}}).sort((e,t)=>t.lastAttachAt.localeCompare(e.lastAttachAt))}),Z=s(()=>X.value.filter(e=>!e.evicted).length),Q=s(()=>{let e=U.value.lastRestore;return e?JSON.stringify(e):``}),$=s(()=>re(H.value)),Bt=s(()=>typeof H.value.diskBudgetMb==`number`?H.value.diskBudgetMb:void 0),Vt=s(()=>{let e=$.value;if(!e)return[];let t=le(e),{freeKiB:n,capped:r,capacityKiB:i}=oe(e,Bt.value),a=n-t.totalKiB,o=t=>{let n=ne(e.parts,t);return n===null?`? (checkout not measured)`:n===0?`?`:`${Math.max(0,Math.floor(a/n))} more (${g(n)} each)`};return[[`used / total`,ce(e)],[`free`,`${g(n)}${r?` under the ${g(i)} diskBudgetMb cap`:``}`],[`reserve`,`${g(t.totalKiB)} (snapshot staging ${g(t.stagingKiB)} + floor ${g(t.floorKiB)})`],[`headroom`,`${g(Math.max(0,a))} — room for ${o(`hardlink`)} hardlinked trees, ${o(`reconcile`)} lockfile-diverged (reconciling)`],[`measured`,e.at||`—`]]}),Ht=s(()=>{let e=$.value;if(!e)return[];let t=[[`mirror`,g(e.parts.mirror)],[`checkout deps (node_modules)`,g(e.parts.deps)],[`checkout (history + tree + build)`,g(e.parts.checkout)]];for(let[n,r]of Object.entries(e.parts.threads).sort((e,t)=>t[1]-e[1]))t.push([`thread ${n}`,g(r)]);for(let[n,r]of Object.entries(e.parts.homes).sort((e,t)=>t[1]-e[1]))r>=1024&&t.push([`home ${n}`,g(r)]);return t.push([`other (image, /tmp, …)`,g(e.parts.other)]),t});return(s,c)=>(o(),i(e,{title:W.value||`Resident`,nav:`residents`},{leading:t(()=>[...c[0]||=[l(`a`,{class:`back text-sm text-muted no-underline hover:text-primary`,href:`/residents`},`← All residents`,-1)]]),default:t(()=>[l(`section`,de,[c[8]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Lifecycle`,-1),l(`table`,fe,[l(`tbody`,null,[l(`tr`,pe,[c[1]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state`,-1),l(`td`,me,[r(m,{tone:f(ie)(U.value.state),label:U.value.state},null,8,[`tone`,`label`]),l(`span`,v,p(U.value.state),1)])]),l(`tr`,y,[c[2]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`reason`,-1),l(`td`,b,[U.value.reason?(o(),u(`span`,x,p(U.value.reason),1)):(o(),u(`span`,S,`—`))])]),l(`tr`,C,[c[3]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh error`,-1),l(`td`,w,[f(h)(U.value.lastRefreshError)?(o(),u(`span`,T,p(f(h)(U.value.lastRefreshError)),1)):(o(),u(`span`,E,`—`))])]),l(`tr`,D,[c[4]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last restore`,-1),l(`td`,O,[Q.value?(o(),u(`span`,k,p(Q.value),1)):(o(),u(`span`,A,`—`))])]),l(`tr`,j,[c[5]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state updated`,-1),l(`td`,M,[f(h)(U.value.updatedAt)?(o(),u(`span`,N,p(f(h)(U.value.updatedAt)),1)):(o(),u(`span`,P,`—`))])]),l(`tr`,F,[c[7]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`idle since`,-1),l(`td`,I,[f(h)(U.value.idleSince)?(o(),u(n,{key:0},[a(p(f(h)(U.value.idleSince))+` `,1),c[6]||=l(`span`,{class:`text-xs text-muted`},`(refresh parked; container may sleep)`,-1)],64)):(o(),u(`span`,L,`awake`))])])])])]),l(`section`,R,[c[15]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pinned facts`,-1),l(`table`,z,[l(`tbody`,null,[l(`tr`,he,[c[9]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`repository`,-1),l(`td`,ge,[K.value?(o(),u(`a`,{key:0,class:`text-primary`,href:K.value},p(K.value),9,_e)):(o(),u(`span`,ve,p(f(h)(H.value.resource)||`—`),1))])]),l(`tr`,ye,[c[10]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`default ref`,-1),l(`td`,be,p(f(h)(U.value.defaultRef)||f(h)(H.value.defaultRef)||`—`),1)]),l(`tr`,xe,[c[11]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`pinned sha`,-1),l(`td`,Se,[q.value?(o(),u(`a`,{key:0,class:`text-primary`,href:q.value},p(G.value),9,Ce)):G.value?(o(),u(`span`,we,p(G.value),1)):(o(),u(`span`,Te,`—`))])]),l(`tr`,Ee,[c[12]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`lockfile hash`,-1),l(`td`,De,[f(h)(U.value.lockfileHash)?(o(),u(`span`,Oe,p(f(h)(U.value.lockfileHash)),1)):(o(),u(`span`,ke,`—`))])]),l(`tr`,Ae,[c[13]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`provisioned`,-1),l(`td`,je,[f(h)(U.value.provisionedAt)?(o(),u(`span`,Me,p(f(h)(U.value.provisionedAt)),1)):(o(),u(`span`,Ne,`—`))])]),l(`tr`,Pe,[c[14]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh`,-1),l(`td`,Fe,[f(h)(U.value.lastRefreshAt)?(o(),u(`span`,Ie,p(f(h)(U.value.lastRefreshAt)),1)):(o(),u(`span`,Le,`—`))])])])])]),l(`section`,Re,[c[17]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Disk`,-1),$.value?(o(),u(n,{key:0},[l(`table`,ze,[l(`tbody`,null,[(o(!0),u(n,null,d(Vt.value,([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Be,p(e),1),l(`td`,Ve,p(t),1)]))),128))])]),c[16]||=l(`p`,{class:`mb-1 mt-2 text-xs text-muted`},` components (one du, hardlinks counted once — a thread tree shows only what it does not share with the checkout) `,-1),l(`table`,He,[l(`tbody`,null,[(o(!0),u(n,null,d(Ht.value,([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Ue,p(e),1),l(`td`,We,p(t),1)]))),128))])])],64)):(o(),u(`p`,Ge,` not measured yet — the first refresh cycle or attach of this container measures it `))]),l(`section`,Ke,[c[18]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Snapshot stamp`,-1),J.value?(o(),u(`table`,qe,[l(`tbody`,null,[(o(),u(n,null,d([`ref`,`sha`,`lockfileHash`,`createdAt`,`mirrorBackupId`,`checkoutBackupId`],e=>l(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Je,p(e),1),l(`td`,Ye,[f(h)(J.value[e])?(o(),u(`span`,Xe,p(f(h)(J.value[e])),1)):(o(),u(`span`,B,`—`))])])),64))])])):(o(),u(`p`,Ze,`no snapshot recorded`))]),l(`section`,Qe,[c[22]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Thread worktrees`,-1),X.value.length>0?(o(),u(n,{key:0},[l(`p`,$e,p(Z.value)+` live · `+p(X.value.length-Z.value)+` evicted`,1),l(`div`,et,[l(`table`,tt,[l(`tbody`,null,[c[21]||=l(`tr`,{class:`text-xs text-muted`},[l(`td`,{class:`px-2 py-1`},`thread`),l(`td`,{class:`px-2 py-1`},`ref · sha`),l(`td`,{class:`px-2 py-1`},`user · deps`),l(`td`,{class:`px-2 py-1`},`bound · last attach`)],-1),(o(!0),u(n,null,d(X.value,e=>(o(),u(`tr`,{key:e.threadKey,class:`border-t border-muted`},[l(`td`,nt,[e.evicted?(o(),u(`span`,rt,[a(`evicted `+p(e.evictedAt||`—`),1),e.evictedWhy?(o(),u(n,{key:0},[a(` · `+p(e.evictedWhy),1)],64)):ee(``,!0)])):(o(),i(m,{key:1,tone:`green`,label:`live`,tip:`live`})),a(` `+p(e.threadKey),1)]),l(`td`,it,[a(p(e.ref)+` · `,1),e.commitHref?(o(),u(`a`,{key:0,class:`text-primary`,href:e.commitHref},p(e.sha),9,at)):e.sha?(o(),u(`span`,ot,p(e.sha),1)):(o(),u(`span`,st,`—`))]),l(`td`,ct,[e.user?(o(),u(`span`,lt,p(e.user),1)):(o(),u(`span`,ut,`—`)),c[19]||=a(` · `,-1),e.deps?(o(),u(`span`,dt,p(e.deps),1)):(o(),u(`span`,ft,`—`))]),l(`td`,pt,[e.boundAt?(o(),u(`span`,mt,p(e.boundAt),1)):(o(),u(`span`,ht,`—`)),c[20]||=a(` · `,-1),e.lastAttachAt?(o(),u(`span`,gt,p(e.lastAttachAt),1)):(o(),u(`span`,_t,`—`))])]))),128))])])])],64)):(o(),u(`p`,vt,`no thread worktrees`))]),l(`section`,yt,[c[23]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pending schedules`,-1),l(`table`,bt,[l(`tbody`,null,[(o(),u(n,null,d([[`refresh`,`refresh`],[`provision run`,`provisionRun`],[`provision deadline`,`provisionDeadline`]],([e,t])=>l(`tr`,{key:t,class:`border-t border-muted`},[l(`td`,xt,p(e),1),l(`td`,St,p(f(h)(zt.value[t]??0)||`0`),1)])),64))])])]),l(`section`,Ct,[c[25]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Command table`,-1),Y.value.length>0?(o(),u(`table`,wt,[l(`tbody`,null,[(o(!0),u(n,null,d(Y.value,e=>(o(),u(`tr`,{key:e.name,class:`border-t border-muted`},[l(`td`,Tt,p(e.name),1),l(`td`,Et,[l(`code`,null,p(e.command),1),c[24]||=a(),l(`span`,Dt,p(e.effect),1)])]))),128))])])):(o(),u(`p`,Ot,`no command table`))]),l(`section`,kt,[c[26]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Registry settings`,-1),l(`table`,At,[l(`tbody`,null,[(o(!0),u(n,null,d([[`onboarded`,f(h)(H.value.onboardedAt)],[`record updated`,f(h)(H.value.updatedAt)],[`provisioning timeout (ms)`,f(h)(H.value.provisioningTimeoutMs)],[`disk budget (MB)`,f(h)(H.value.diskBudgetMb)],[`worktree TTL (days)`,f(h)(H.value.worktreeTtlDays??7)]],([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,jt,p(e),1),l(`td`,Mt,[t?(o(),u(`span`,Nt,p(t),1)):(o(),u(`span`,Pt,`—`))])]))),128))])])]),l(`p`,Ft,[c[27]||=a(` Manage from chat: `,-1),l(`code`,It,`repo rebuild `+p(W.value),1),c[28]||=a(` · `,-1),l(`code`,Lt,`repo reconfigure `+p(W.value)+` …`,1),c[29]||=a(` · `,-1),l(`code`,Rt,`repo offboard `+p(W.value)+` --dry-run`,1)])]),_:1},8,[`title`]))}});export{V as default};
|
|
1
|
+
import{t as e}from"./AppShell-lYVcj-k7.js";import{Lr as t,Xt as n,_n as r,cn as i,gn as a,ir as o,ln as ee,on as s,r as c,sn as l,un as u,ur as d,vi as f,wi as p,yn as te}from"./seed-DeKSHrt2.js";import{t as m}from"./StatusDot-BaGkjYs1.js";import{a as ne,c as re,d as ie,f as h,i as g,l as ae,n as oe,o as se,r as ce,s as _,t as le,u as ue}from"./residentDiskBudget-BMBKlYRH.js";var de={class:`mt-4 first:mt-0`},fe={class:`w-full border-collapse font-mono text-[0.8125rem]`},pe={class:`border-t border-muted`},me={class:`px-2 py-1 align-top`},v={class:`ml-1.5 font-medium`},y={class:`border-t border-muted`},b={class:`break-all px-2 py-1 align-top`},x={key:0},S={key:1,class:`text-dimmed`},C={class:`border-t border-muted`},w={class:`break-all px-2 py-1 align-top`},T={key:0},E={key:1,class:`text-dimmed`},D={class:`border-t border-muted`},O={class:`break-all px-2 py-1 align-top`},k={key:0},A={key:1,class:`text-dimmed`},j={class:`border-t border-muted`},M={class:`break-all px-2 py-1 align-top`},N={key:0},P={key:1,class:`text-dimmed`},F={class:`border-t border-muted`},I={class:`break-all px-2 py-1 align-top`},L={key:1,class:`text-dimmed`},R={class:`mt-4`},z={class:`w-full border-collapse font-mono text-[0.8125rem]`},he={class:`border-t border-muted`},ge={class:`break-all px-2 py-1 align-top`},_e=[`href`],ve={key:1},ye={class:`border-t border-muted`},be={class:`break-all px-2 py-1 align-top`},xe={class:`border-t border-muted`},Se={class:`break-all px-2 py-1 align-top`},Ce=[`href`],we={key:1},Te={key:2,class:`text-dimmed`},Ee={class:`border-t border-muted`},De={class:`break-all px-2 py-1 align-top`},Oe={key:0},ke={key:1,class:`text-dimmed`},Ae={class:`border-t border-muted`},je={class:`break-all px-2 py-1 align-top`},Me={key:0},Ne={key:1,class:`text-dimmed`},Pe={class:`border-t border-muted`},Fe={class:`break-all px-2 py-1 align-top`},Ie={key:0},Le={key:1,class:`text-dimmed`},Re={class:`mt-4`},ze={class:`w-full border-collapse font-mono text-[0.8125rem]`},Be={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ve={class:`break-all px-2 py-1 align-top`},He={class:`w-full border-collapse font-mono text-[0.8125rem]`},Ue={class:`w-32 break-all px-2 py-1 align-top text-muted sm:w-96 sm:break-words`},We={class:`px-2 py-1 align-top`},Ge={key:1,class:`text-xs text-muted`},Ke={class:`mt-4`},qe={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Je={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ye={class:`break-all px-2 py-1 align-top`},Xe={key:0},B={key:1,class:`text-dimmed`},Ze={key:1,class:`text-xs text-muted`},Qe={class:`mt-4`},$e={class:`mb-1 text-xs text-muted`},et={class:`overflow-x-auto`},tt={class:`w-full border-collapse font-mono text-[0.8125rem]`},nt={class:`break-all px-2 py-1 align-top`},rt={key:0,class:`text-xs text-muted`},it={class:`break-all px-2 py-1 align-top`},at=[`href`],ot={key:1},st={key:2,class:`text-dimmed`},ct={class:`break-all px-2 py-1 align-top`},lt={key:0},ut={key:1,class:`text-dimmed`},dt={key:2},ft={key:3,class:`text-dimmed`},pt={class:`break-all px-2 py-1 align-top`},mt={key:0},ht={key:1,class:`text-dimmed`},gt={key:2},_t={key:3,class:`text-dimmed`},vt={key:1,class:`text-xs text-muted`},yt={class:`mt-4`},bt={class:`w-full border-collapse font-mono text-[0.8125rem]`},xt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},St={class:`px-2 py-1 align-top`},Ct={class:`mt-4`},wt={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Tt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Et={class:`break-all px-2 py-1 align-top`},Dt={class:`text-xs text-muted`},Ot={key:1,class:`text-xs text-muted`},kt={class:`mt-4`},At={class:`w-full border-collapse font-mono text-[0.8125rem]`},jt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Mt={class:`break-all px-2 py-1 align-top`},Nt={key:0},Pt={key:1,class:`text-dimmed`},Ft={class:`mt-4 text-xs text-muted`},It={class:`rounded bg-elevated px-1 py-0.5`},Lt={class:`rounded bg-elevated px-1 py-0.5`},Rt={class:`rounded bg-elevated px-1 py-0.5`},V=te({__name:`ResidentDetailPage`,setup(te){let V=c(`resident`),H=s(()=>V?.record??{}),U=s(()=>ae(H.value)),W=s(()=>ue(H.value)||(V?.slug??``)),G=s(()=>h(U.value.sha)),K=s(()=>se.test(W.value)?`https://github.com/${W.value}`:void 0),q=s(()=>K.value&&/^[0-9a-f]{7,40}$/.test(G.value)?`${K.value}/commit/${G.value}`:void 0),J=s(()=>{let e=U.value.snapshot;return e&&typeof e==`object`?_(e):void 0}),zt=s(()=>_(U.value.schedules)),Y=s(()=>{let e=_(H.value.commands),t=_(H.value.effects);return Object.keys(e).sort().map(n=>({name:n,command:h(e[n]),effect:h(t[n])||`readonly`}))}),X=s(()=>{let e=U.value.threads;return(Array.isArray(e)?e.map(_):[]).map(e=>{let t=h(e.sha);return{threadKey:h(e.threadKey)||`?`,ref:h(e.ref)||`?`,sha:t?t.slice(0,8):``,commitHref:K.value&&/^[0-9a-f]{7,40}$/.test(t)?`${K.value}/commit/${t}`:void 0,user:h(e.user),deps:h(e.deps),boundAt:h(e.boundAt),lastAttachAt:h(e.lastAttachAt),evicted:e.evicted===!0,evictedAt:h(e.evictedAt),evictedWhy:h(e.evictedWhy)}}).sort((e,t)=>t.lastAttachAt.localeCompare(e.lastAttachAt))}),Z=s(()=>X.value.filter(e=>!e.evicted).length),Q=s(()=>{let e=U.value.lastRestore;return e?JSON.stringify(e):``}),$=s(()=>re(H.value)),Bt=s(()=>typeof H.value.diskBudgetMb==`number`?H.value.diskBudgetMb:void 0),Vt=s(()=>{let e=$.value;if(!e)return[];let t=le(e),{freeKiB:n,capped:r,capacityKiB:i}=oe(e,Bt.value),a=n-t.totalKiB,o=t=>{let n=ne(e.parts,t);return n===null?`? (checkout not measured)`:n===0?`?`:`${Math.max(0,Math.floor(a/n))} more (${g(n)} each)`};return[[`used / total`,ce(e)],[`free`,`${g(n)}${r?` under the ${g(i)} diskBudgetMb cap`:``}`],[`reserve`,`${g(t.totalKiB)} (snapshot staging ${g(t.stagingKiB)} + floor ${g(t.floorKiB)})`],[`headroom`,`${g(Math.max(0,a))} — room for ${o(`hardlink`)} hardlinked trees, ${o(`reconcile`)} lockfile-diverged (reconciling)`],[`measured`,e.at||`—`]]}),Ht=s(()=>{let e=$.value;if(!e)return[];let t=[[`mirror`,g(e.parts.mirror)],[`checkout deps (node_modules)`,g(e.parts.deps)],[`checkout (history + tree + build)`,g(e.parts.checkout)]];for(let[n,r]of Object.entries(e.parts.threads).sort((e,t)=>t[1]-e[1]))t.push([`thread ${n}`,g(r)]);for(let[n,r]of Object.entries(e.parts.homes).sort((e,t)=>t[1]-e[1]))r>=1024&&t.push([`home ${n}`,g(r)]);return t.push([`other (image, /tmp, …)`,g(e.parts.other)]),t});return(s,c)=>(o(),i(e,{title:W.value||`Resident`,nav:`residents`},{leading:t(()=>[...c[0]||=[l(`a`,{class:`back text-sm text-muted no-underline hover:text-primary`,href:`/residents`},`← All residents`,-1)]]),default:t(()=>[l(`section`,de,[c[8]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Lifecycle`,-1),l(`table`,fe,[l(`tbody`,null,[l(`tr`,pe,[c[1]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state`,-1),l(`td`,me,[r(m,{tone:f(ie)(U.value.state),label:U.value.state},null,8,[`tone`,`label`]),l(`span`,v,p(U.value.state),1)])]),l(`tr`,y,[c[2]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`reason`,-1),l(`td`,b,[U.value.reason?(o(),u(`span`,x,p(U.value.reason),1)):(o(),u(`span`,S,`—`))])]),l(`tr`,C,[c[3]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh error`,-1),l(`td`,w,[f(h)(U.value.lastRefreshError)?(o(),u(`span`,T,p(f(h)(U.value.lastRefreshError)),1)):(o(),u(`span`,E,`—`))])]),l(`tr`,D,[c[4]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last restore`,-1),l(`td`,O,[Q.value?(o(),u(`span`,k,p(Q.value),1)):(o(),u(`span`,A,`—`))])]),l(`tr`,j,[c[5]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state updated`,-1),l(`td`,M,[f(h)(U.value.updatedAt)?(o(),u(`span`,N,p(f(h)(U.value.updatedAt)),1)):(o(),u(`span`,P,`—`))])]),l(`tr`,F,[c[7]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`idle since`,-1),l(`td`,I,[f(h)(U.value.idleSince)?(o(),u(n,{key:0},[a(p(f(h)(U.value.idleSince))+` `,1),c[6]||=l(`span`,{class:`text-xs text-muted`},`(refresh parked; container may sleep)`,-1)],64)):(o(),u(`span`,L,`awake`))])])])])]),l(`section`,R,[c[15]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pinned facts`,-1),l(`table`,z,[l(`tbody`,null,[l(`tr`,he,[c[9]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`repository`,-1),l(`td`,ge,[K.value?(o(),u(`a`,{key:0,class:`text-primary`,href:K.value},p(K.value),9,_e)):(o(),u(`span`,ve,p(f(h)(H.value.resource)||`—`),1))])]),l(`tr`,ye,[c[10]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`default ref`,-1),l(`td`,be,p(f(h)(U.value.defaultRef)||f(h)(H.value.defaultRef)||`—`),1)]),l(`tr`,xe,[c[11]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`pinned sha`,-1),l(`td`,Se,[q.value?(o(),u(`a`,{key:0,class:`text-primary`,href:q.value},p(G.value),9,Ce)):G.value?(o(),u(`span`,we,p(G.value),1)):(o(),u(`span`,Te,`—`))])]),l(`tr`,Ee,[c[12]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`lockfile hash`,-1),l(`td`,De,[f(h)(U.value.lockfileHash)?(o(),u(`span`,Oe,p(f(h)(U.value.lockfileHash)),1)):(o(),u(`span`,ke,`—`))])]),l(`tr`,Ae,[c[13]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`provisioned`,-1),l(`td`,je,[f(h)(U.value.provisionedAt)?(o(),u(`span`,Me,p(f(h)(U.value.provisionedAt)),1)):(o(),u(`span`,Ne,`—`))])]),l(`tr`,Pe,[c[14]||=l(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh`,-1),l(`td`,Fe,[f(h)(U.value.lastRefreshAt)?(o(),u(`span`,Ie,p(f(h)(U.value.lastRefreshAt)),1)):(o(),u(`span`,Le,`—`))])])])])]),l(`section`,Re,[c[17]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Disk`,-1),$.value?(o(),u(n,{key:0},[l(`table`,ze,[l(`tbody`,null,[(o(!0),u(n,null,d(Vt.value,([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Be,p(e),1),l(`td`,Ve,p(t),1)]))),128))])]),c[16]||=l(`p`,{class:`mb-1 mt-2 text-xs text-muted`},` components (one du, hardlinks counted once — a thread tree shows only what it does not share with the checkout) `,-1),l(`table`,He,[l(`tbody`,null,[(o(!0),u(n,null,d(Ht.value,([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Ue,p(e),1),l(`td`,We,p(t),1)]))),128))])])],64)):(o(),u(`p`,Ge,` not measured yet — the first refresh cycle or attach of this container measures it `))]),l(`section`,Ke,[c[18]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Snapshot stamp`,-1),J.value?(o(),u(`table`,qe,[l(`tbody`,null,[(o(),u(n,null,d([`ref`,`sha`,`lockfileHash`,`createdAt`,`mirrorBackupId`,`checkoutBackupId`],e=>l(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,Je,p(e),1),l(`td`,Ye,[f(h)(J.value[e])?(o(),u(`span`,Xe,p(f(h)(J.value[e])),1)):(o(),u(`span`,B,`—`))])])),64))])])):(o(),u(`p`,Ze,`no snapshot recorded`))]),l(`section`,Qe,[c[22]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Thread worktrees`,-1),X.value.length>0?(o(),u(n,{key:0},[l(`p`,$e,p(Z.value)+` live · `+p(X.value.length-Z.value)+` evicted`,1),l(`div`,et,[l(`table`,tt,[l(`tbody`,null,[c[21]||=l(`tr`,{class:`text-xs text-muted`},[l(`td`,{class:`px-2 py-1`},`thread`),l(`td`,{class:`px-2 py-1`},`ref · sha`),l(`td`,{class:`px-2 py-1`},`user · deps`),l(`td`,{class:`px-2 py-1`},`bound · last attach`)],-1),(o(!0),u(n,null,d(X.value,e=>(o(),u(`tr`,{key:e.threadKey,class:`border-t border-muted`},[l(`td`,nt,[e.evicted?(o(),u(`span`,rt,[a(`evicted `+p(e.evictedAt||`—`),1),e.evictedWhy?(o(),u(n,{key:0},[a(` · `+p(e.evictedWhy),1)],64)):ee(``,!0)])):(o(),i(m,{key:1,tone:`green`,label:`live`,tip:`live`})),a(` `+p(e.threadKey),1)]),l(`td`,it,[a(p(e.ref)+` · `,1),e.commitHref?(o(),u(`a`,{key:0,class:`text-primary`,href:e.commitHref},p(e.sha),9,at)):e.sha?(o(),u(`span`,ot,p(e.sha),1)):(o(),u(`span`,st,`—`))]),l(`td`,ct,[e.user?(o(),u(`span`,lt,p(e.user),1)):(o(),u(`span`,ut,`—`)),c[19]||=a(` · `,-1),e.deps?(o(),u(`span`,dt,p(e.deps),1)):(o(),u(`span`,ft,`—`))]),l(`td`,pt,[e.boundAt?(o(),u(`span`,mt,p(e.boundAt),1)):(o(),u(`span`,ht,`—`)),c[20]||=a(` · `,-1),e.lastAttachAt?(o(),u(`span`,gt,p(e.lastAttachAt),1)):(o(),u(`span`,_t,`—`))])]))),128))])])])],64)):(o(),u(`p`,vt,`no thread worktrees`))]),l(`section`,yt,[c[23]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pending schedules`,-1),l(`table`,bt,[l(`tbody`,null,[(o(),u(n,null,d([[`refresh`,`refresh`],[`provision run`,`provisionRun`],[`provision deadline`,`provisionDeadline`]],([e,t])=>l(`tr`,{key:t,class:`border-t border-muted`},[l(`td`,xt,p(e),1),l(`td`,St,p(f(h)(zt.value[t]??0)||`0`),1)])),64))])])]),l(`section`,Ct,[c[25]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Command table`,-1),Y.value.length>0?(o(),u(`table`,wt,[l(`tbody`,null,[(o(!0),u(n,null,d(Y.value,e=>(o(),u(`tr`,{key:e.name,class:`border-t border-muted`},[l(`td`,Tt,p(e.name),1),l(`td`,Et,[l(`code`,null,p(e.command),1),c[24]||=a(),l(`span`,Dt,p(e.effect),1)])]))),128))])])):(o(),u(`p`,Ot,`no command table`))]),l(`section`,kt,[c[26]||=l(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Registry settings`,-1),l(`table`,At,[l(`tbody`,null,[(o(!0),u(n,null,d([[`onboarded`,f(h)(H.value.onboardedAt)],[`record updated`,f(h)(H.value.updatedAt)],[`provisioning timeout (ms)`,f(h)(H.value.provisioningTimeoutMs)],[`disk budget (MB)`,f(h)(H.value.diskBudgetMb)],[`worktree TTL (days)`,f(h)(H.value.worktreeTtlDays??7)]],([e,t])=>(o(),u(`tr`,{key:e,class:`border-t border-muted`},[l(`td`,jt,p(e),1),l(`td`,Mt,[t?(o(),u(`span`,Nt,p(t),1)):(o(),u(`span`,Pt,`—`))])]))),128))])])]),l(`p`,Ft,[c[27]||=a(` Manage from chat: `,-1),l(`code`,It,`repo rebuild `+p(W.value),1),c[28]||=a(` · `,-1),l(`code`,Lt,`repo reconfigure `+p(W.value)+` …`,1),c[29]||=a(` · `,-1),l(`code`,Rt,`repo offboard `+p(W.value)+` --dry-run`,1)])]),_:1},8,[`title`]))}});export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-lYVcj-k7.js";import{Lr as t,Xt as n,_n as r,cn as i,gn as a,ir as o,ln as s,mr as c,on as l,r as u,sn as d,un as f,ur as p,wi as m,xi as h,yn as g}from"./seed-DeKSHrt2.js";import{n as _}from"./wallClock-61NpVkY6.js";import{t as v}from"./StatusDot-
|
|
1
|
+
import{t as e}from"./AppShell-lYVcj-k7.js";import{Lr as t,Xt as n,_n as r,cn as i,gn as a,ir as o,ln as s,mr as c,on as l,r as u,sn as d,un as f,ur as p,wi as m,xi as h,yn as g}from"./seed-DeKSHrt2.js";import{n as _}from"./wallClock-61NpVkY6.js";import{t as v}from"./StatusDot-BaGkjYs1.js";import{c as y,d as b,f as x,l as S,o as C,r as w,u as T}from"./residentDiskBudget-BMBKlYRH.js";import{n as E}from"./indexFormat-B-pd4r7Y.js";var D={class:`mb-2 text-xs text-muted`},O={class:`m-0 list-none p-0`},k={class:`font-mono font-medium text-primary`},A={class:`font-medium`},j=[`title`],M=[`title`],N={key:0,class:`basis-full pl-5 text-xs text-warn`},P={key:1,class:`px-2 py-1.5 text-muted`},F=g({__name:`ResidentsIndexPage`,setup(g){let F=u(`residents`),I=_(),L=l(()=>(F?.residents??[]).map((e,t)=>{let n=e,r=T(n),i=S(n),a=x(i.sha),o=x(i.lastRefreshAt),s=o?Date.parse(o):NaN,c=y(n);return{key:`${r||`?`}-${t}`,display:r||x(n.resource)||`?`,state:i.state,tone:b(i.state),reason:i.reason,ref:x(n.defaultRef)||`?`,sha:a?a.slice(0,8):``,refreshed:o,refreshedLabel:Number.isFinite(s)?E(s,I):o,disk:c?w(c):``,diskAt:c?.at??``,href:C.test(r)?`/residents/${r}`:null}})),R=l(()=>x(F?.cap)||`?`),z=l(()=>x(F?.count)||String(L.value.length));return(l,u)=>(o(),i(e,{title:`Resident repos`,nav:`residents`},{default:t(()=>[L.value.length>0?(o(),f(n,{key:0},[d(`p`,D,m(z.value)+`/`+m(R.value)+` resident slots in use · live registry read, not cached `,1),d(`ul`,O,[(o(!0),f(n,null,p(L.value,e=>(o(),f(`li`,{key:e.key,class:`border-b border-muted first:border-t`},[(o(),i(c(e.href?`a`:`span`),{class:h([`row flex flex-wrap items-center gap-2.5 rounded-md px-2 py-1.5 text-inherit no-underline`,e.href?`hover:bg-elevated`:``]),href:e.href??void 0},{default:t(()=>[r(v,{tone:e.tone,label:e.state,tip:e.state},null,8,[`tone`,`label`,`tip`]),d(`span`,k,m(e.display),1),d(`span`,A,m(e.state),1),d(`span`,{class:`font-mono text-xs text-muted max-sm:basis-full max-sm:pl-5`,title:e.refreshed||void 0},[a(` ref `+m(e.ref),1),e.sha?(o(),f(n,{key:0},[a(` · sha `+m(e.sha),1)],64)):s(``,!0),e.refreshedLabel?(o(),f(n,{key:1},[a(` · refreshed `+m(e.refreshedLabel),1)],64)):s(``,!0),e.disk?(o(),f(n,{key:2},[u[0]||=a(` · `,-1),d(`span`,{title:e.diskAt?`measured ${e.diskAt}`:void 0},`disk `+m(e.disk),9,M)],64)):s(``,!0)],8,j),e.reason?(o(),f(`span`,N,m(e.reason),1)):s(``,!0)]),_:2},1032,[`class`,`href`]))]))),128))])],64)):(o(),f(`p`,P,[a(` No repos onboarded (0/`+m(R.value)+`). Onboard one from chat: `,1),u[1]||=d(`code`,{class:`rounded bg-elevated px-1.5 py-0.5`},`repo onboard <owner/name>`,-1),u[2]||=a(`. `,-1)]))]),_:1}))}});export{F as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-DZgVjemt.js","assets/AppShell-lYVcj-k7.js","assets/seed-DeKSHrt2.js","assets/main-BB6FMkeU.js","assets/main-43n8Y5qO.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 x,J as ee,Jn as S,Lr as C,Mr as w,N as T,Or as te,P as ne,Pr as re,Q as ie,Qn as E,Rn as ae,Si as oe,U as D,Ut as se,Wn as O,Wt as k,Xt as A,_ as ce,_n as j,a as le,at as ue,b as de,ci as M,cn as N,d as fe,di as pe,dr as P,et as me,f as he,ft as ge,g as _e,gn as F,h as I,hi as ve,ir as L,it as ye,j as be,kn as xe,ln as R,m as Se,mi as z,nr as Ce,nt as we,oi as B,on as V,or as Te,p as H,r as Ee,sn as U,t as De,u as Oe,un as W,ur as G,vi as K,wi as q,x as ke,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-BL-Cwe59.js";import{r as Fe,t as Ie}from"./main-BB6FMkeU.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=ue(n,`open`,t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=M(),a=M(),{modal:o,unmountOnHide:s}=ve(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)=>P(e.$slots,`default`,{open:K(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;T();let n=Q();return(e,r)=>(L(),N(K(h),O(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>K(n).onOpenChange(!1)}),{default:C(()=>[P(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}=T();return o.titleId||=m(void 0,`reka-dialog-title`),o.descriptionId||=m(void 0,`reka-dialog-description`),E(()=>{o.contentElement=c,Me()!==document.body&&(o.triggerElement.value=Me())}),(e,t)=>(L(),N(K(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:C(()=>[j(K(p),O({id:K(o).contentId,ref:K(s),as:e.as,"as-child":e.asChild,present:r.present,"disable-outside-pointer-events":e.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":K(o).descriptionId,"aria-labelledby":K(o).titleId,"data-state":K(a)(K(o).open.value)},e.$attrs,{onDismiss:t[0]||=e=>K(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:C(()=>[P(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=ne(i),{forwardRef:s,currentElement:c}=T(),l=V(()=>n.present?c.value:void 0);r(l);let u=V(()=>{let{present:e,...t}=n;return t});return w(()=>n.present,(e,t)=>{!e&&t&&a.triggerElement.value?.focus()}),(e,t)=>(L(),N($e,O({...u.value,...K(o)},{ref:K(s),present:e.present,"trap-focus":K(a).open.value,"disable-outside-pointer-events":n.disableOutsidePointerEvents,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(e.preventDefault(),K(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:C(()=>[P(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=ne(t);T();let i=Q(),a=M(!1),o=M(!1),s=V(()=>{let{present:e,...t}=n;return t});return w(()=>n.present,(e,t)=>{!e&&t&&(a.value||i.triggerElement.value?.focus(),a.value=!1,o.value=!1)}),(e,t)=>(L(),N($e,O({...s.value,...K(r)},{present:e.present,"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(a.value||K(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;K(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:C(()=>[P(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=ne(r),{forwardRef:o}=T();return(e,t)=>(L(),N(K(be),{present:e.forceMount||K(i).open.value,"force-mount":e.forceMount||!K(i).unmountOnHide.value},{default:C(({present:t})=>[K(i).modal.value?Ne((L(),N(et,O({key:0,ref:K(o),present:K(i).unmountOnHide.value||t},{...n,...K(a),...e.$attrs}),{default:C(()=>[P(e.$slots,`default`)]),_:2},1040,[`present`])),[[x,K(i).unmountOnHide.value||t]]):Ne((L(),N(tt,O({key:1,ref:K(o),present:K(i).unmountOnHide.value||t},{...n,...K(a),...e.$attrs}),{default:C(()=>[P(e.$slots,`default`)]),_:2},1040,[`present`])),[[x,K(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;T();let n=Q();return(e,r)=>(L(),N(K(h),O(t,{id:K(n).descriptionId}),{default:C(()=>[P(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 w(()=>n.present,e=>i.value=e),T(),(e,t)=>(L(),N(K(h),{as:e.as,"as-child":e.asChild,"data-state":K(r).open.value?`open`:`closed`,style:{"pointer-events":`auto`},onPointerdown:t[0]||=k(()=>{},[`left`,`self`,`prevent`])},{default:C(()=>[P(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}=T();return(e,r)=>K(t)?.modal.value?(L(),N(K(be),{key:0,present:e.forceMount||K(t).open.value,"force-mount":e.forceMount||!K(t).unmountOnHide.value},{default:C(({present:r})=>[Ne(j(it,O(e.$attrs,{ref:K(n),as:e.as,"as-child":e.asChild,present:K(t).unmountOnHide.value||r}),{default:C(()=>[P(e.$slots,`default`)]),_:2},1040,[`as`,`as-child`,`present`]),[[x,K(t).unmountOnHide.value||r]])]),_:3},8,[`present`,`force-mount`])):R(`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)=>(L(),N(K(ke),oe(xe(t)),{default:C(()=>[P(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 T(),(e,r)=>(L(),N(K(h),O(t,{id:K(n).titleId}),{default:C(()=>[P(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}=T();return n.contentId||=m(void 0,`reka-dialog-content`),E(()=>{n.triggerElement.value=i.value}),(e,i)=>(L(),N(K(h),O(t,{ref:K(r),type:e.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":K(n).open.value||!1,"aria-controls":K(n).open.value?K(n).contentId:void 0,"data-state":K(n).open.value?`open`:`closed`,onClick:K(n).onOpenToggle}),{default:C(()=>[P(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=V(()=>t.tabStopId||r),c=V(()=>n.currentTabStopId.value===a.value),{getItems:u,CollectionItem:d}=de();E(()=>{t.focusable&&n.onFocusableItemAdd()}),Ce(()=>{t.focusable&&n.onFocusableItemRemove()}),w(()=>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)=>(L(),N(K(d),null,{default:C(()=>[j(K(h),{tabindex:c.value?0:-1,"data-orientation":K(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?K(n).onItemFocus(a.value):t.preventDefault()},onFocus:t[1]||=e=>K(n).onItemFocus(a.value),onKeydown:f},{default:C(()=>[P(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}=ve(r),c=t(s);T();let l=ue(r,`modelValue`,i,{defaultValue:r.defaultValue,passive:r.modelValue===void 0}),u=M(),d=pe(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)=>(L(),N(K(h),{dir:K(c),"data-orientation":K(a),"as-child":e.asChild,as:e.as},{default:C(()=>[P(e.$slots,`default`,{modelValue:K(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}=T(),r=ut(),i=V(()=>pt(r.baseId,t.value)),a=V(()=>mt(r.baseId,t.value)),o=V(()=>t.value===r.modelValue.value),s=M(o.value);return E(()=>{r.registerContent(t.value),requestAnimationFrame(()=>{s.value=!1})}),S(()=>{r.unregisterContent(t.value)}),(e,t)=>(L(),N(K(be),{present:e.forceMount||o.value,"force-mount":``},{default:C(({present:t})=>[j(K(h),{id:a.value,ref:K(n),"as-child":e.asChild,as:e.as,role:`tabpanel`,"data-state":o.value?`active`:`inactive`,"data-orientation":K(r).orientation.value,"aria-labelledby":i.value,hidden:!t,tabindex:`0`,style:_({animationDuration:s.value?`0s`:void 0})},{default:C(()=>[!K(r).unmountOnHide.value||t?P(e.$slots,`default`,{key:0}):R(`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}),T();let i=we(),a=M({size:null,thickness:null,position:null}),o=M([]);w(()=>[r.modelValue.value,r?.dir.value],()=>{s()},{immediate:!0,flush:`post`}),re(()=>{o.value=Array.from(r.tabsList.value?.querySelectorAll(`[role="tab"]`)||[])}),ye(V(()=>[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)=>K(i)&&typeof a.value.size==`number`?(L(),N(K(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:C(()=>[P(e.$slots,`default`)]),_:3},16,[`style`])):R(`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}=ve(e),{forwardRef:n,currentElement:r}=T(),i=ut();return i.tabsList=r,(e,r)=>(L(),N(K(d),{"as-child":``,orientation:K(i).orientation.value,dir:K(i).dir.value,loop:K(t)},{default:C(()=>[j(K(h),{ref:K(n),role:`tablist`,"as-child":e.asChild,as:e.as,"aria-orientation":K(i).orientation.value},{default:C(()=>[P(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}=T(),r=ut(),i=V(()=>pt(r.baseId,t.value)),a=V(()=>r.contentIds.value.has(t.value)?mt(r.baseId,t.value):void 0),o=V(()=>t.value===r.modelValue.value);return(e,t)=>(L(),N(K(lt),{"as-child":``,focusable:!e.disabled,active:o.value},{default:C(()=>[j(K(h),{id:i.value,ref:K(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":K(r).orientation.value,onMousedown:t[0]||=k(t=>{!e.disabled&&t.ctrlKey===!1?K(r).changeModelValue(e.value):t.preventDefault()},[`left`]),onKeydown:t[1]||=se(t=>K(r).changeModelValue(e.value),[`enter`,`space`]),onFocus:t[2]||=()=>{let t=K(r).activationMode!==`manual`;!o.value&&!e.disabled&&t&&K(r).changeModelValue(e.value)}},{default:C(()=>[P(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=ce(`slideover`,n),{t:o}=b(),s=ee(),c=_e(ge(a,`open`,`defaultOpen`,`modal`,`unmountOnHide`),r),l=je(z(()=>a.portal)),u=z(()=>a.content),d=V(()=>a.dismissible?{pointerDownOutside:xt}:[`interactOutside`,`escapeKeyDown`].reduce((e,t)=>(e[t]=e=>{e.preventDefault(),r(`close:prevent`)},e),{})),f=V(()=>I({extend:St,...s.ui?.slideover||{}})({transition:a.transition,side:a.side,inset:a.inset}));return(e,t)=>(L(),N(K(Ze),oe(xe(K(c))),{default:C(({open:n,close:c})=>[i.default?(L(),N(K(ct),{key:0,"as-child":``,class:J(K(a).class)},{default:C(()=>[P(e.$slots,`default`,{open:n})]),_:2},1032,[`class`])):R(``,!0),j(K(ot),O(K(l),{"force-mount":K(l).disabled&&K(a).unmountOnHide===!1||void 0}),{default:C(()=>[j(K(Oe),null,{default:C(()=>[K(a).overlay?(L(),N(K(at),{key:0,"data-slot":`overlay`,class:J(f.value.overlay({class:K(a).ui?.overlay}))},null,8,[`class`])):R(``,!0),j(K(nt),O({"data-side":K(a).side,"data-slot":`content`,class:f.value.content({class:[!i.default&&K(a).class,K(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:C(()=>[!K(a).title&&!i.title||!K(a).description&&!i.description||i.content?(L(),N(K(Fe),{key:0},{default:C(()=>[!K(a).title&&!i.title?(L(),N(K(st),{key:0})):i.content?(L(),N(K(st),{key:1},{default:C(()=>[P(e.$slots,`title`,{},()=>[F(q(K(a).title),1)])]),_:3})):R(``,!0),!K(a).description&&!i.description?(L(),N(K(rt),{key:2})):i.content?(L(),N(K(rt),{key:3},{default:C(()=>[P(e.$slots,`description`,{},()=>[F(q(K(a).description),1)])]),_:3})):R(``,!0)]),_:3})):R(``,!0),P(e.$slots,`content`,{close:c},()=>[i.header||K(a).title||i.title||K(a).description||i.description||K(a).close||i.close?(L(),W(`div`,{key:0,"data-slot":`header`,class:J(f.value.header({class:K(a).ui?.header}))},[P(e.$slots,`header`,{close:c},()=>[K(a).title||i.title||K(a).description||i.description?(L(),W(`div`,{key:0,"data-slot":`wrapper`,class:J(f.value.wrapper({class:K(a).ui?.wrapper}))},[K(a).title||i.title?(L(),N(K(st),{key:0,"data-slot":`title`,class:J(f.value.title({class:K(a).ui?.title}))},{default:C(()=>[P(e.$slots,`title`,{},()=>[F(q(K(a).title),1)])]),_:3},8,[`class`])):R(``,!0),K(a).description||i.description?(L(),N(K(rt),{key:1,"data-slot":`description`,class:J(f.value.description({class:K(a).ui?.description}))},{default:C(()=>[P(e.$slots,`description`,{},()=>[F(q(K(a).description),1)])]),_:3},8,[`class`])):R(``,!0)],2)):R(``,!0),P(e.$slots,`actions`),K(a).close||i.close?(L(),N(K(Qe),{key:1,"as-child":``},{default:C(()=>[P(e.$slots,`close`,{ui:f.value},()=>[K(a).close?(L(),N(le,O({key:0,icon:K(a).closeIcon||K(s).ui.icons.close,color:`neutral`,variant:`ghost`,"aria-label":K(o)(`slideover.close`)},typeof K(a).close==`object`?K(a).close:{},{"data-slot":`close`,class:f.value.close({class:K(a).ui?.close})}),null,16,[`icon`,`aria-label`,`class`])):R(``,!0)])]),_:2},1024)):R(``,!0)])],2)):R(``,!0),U(`div`,{"data-slot":`body`,class:J(f.value.body({class:K(a).ui?.body}))},[P(e.$slots,`body`,{close:c})],2),i.footer?(L(),W(`div`,{key:1,"data-slot":`footer`,class:J(f.value.footer({class:K(a).ui?.footer}))},[P(e.$slots,`footer`,{close:c})],2)):R(``,!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=M(!1),r=M(!1),i=M(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;E(()=>{o(),typeof ResizeObserver<`u`&&i.value&&(s=new ResizeObserver(()=>o()),s.observe(i.value))}),S(()=>s?.disconnect()),w(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)=>(L(),W(`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},[U(`div`,{id:a,ref_key:`body`,ref:i,class:J([`body`,n.value?``:`clamped`]),style:_(n.value?void 0:{"--expandable-lines":String(t.lines)})},[P(e.$slots,`default`,{},void 0,!0)],6),!n.value&&r.value?(L(),W(`div`,Tt)):R(``,!0),r.value||n.value?(L(),W(`div`,Et,[U(`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:k(c,[`stop`])},q(n.value?`Show less`:`Show more`),9,Dt)])):R(``,!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=M(null);function r(){let e=n.value;if(e)try{kt(e,t.text)}catch{e.textContent=t.text}}return E(r),w(()=>t.text,r),(e,t)=>(L(),W(`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 L(),W(`svg`,jt,[...t[0]||=[U(`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),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`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);return!e||!t||n.direction!==`in`&&n.direction!==`out`?[]:[{kind:`artifact`,artifact:{direction:n.direction,key:e,name:t,size:i(n.size)??0,contentType:a(n.contentType),at:i(n.at)}}]}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.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`,`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`,"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.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,t){let n=t.split(`/`).map(encodeURIComponent).join(`/`);return`${e.urlBase}${n}${e.token?`?t=${encodeURIComponent(e.token)}`:``}`}function fn(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 pn(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 mn(e,t,n){let r=!!e.model&&t!==null&&Dn(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 hn(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 gn(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 _n(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 vn(e={}){let t=e.openTags&&e.openTags.length>0?e.openTags:[`failed`,`infra`],n=Pt(),r=B({request:null,meta:null,context:[],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 x(e){let t=o.get(h);t&&(t.live=!1),h=e.index;let n=p;p=null;let i=B({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 ee(e){return o.get(e.index)??x(e)}function S(e,t){let n=ee(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=B(_n(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 C(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){S(e,t);return}Object.assign(n,_n(t,n.open)),v(t.tags)&&(n.open=!0);let r=o.get(e.index);r&&b(r)}function w(e){p&&=(r.log.push({kind:`turn`,key:_(`turn`),turn:p,note:e}),null)}let T=null,te=[],ne=B([]);function re(e){if(e.direction===`in`){T?T.files.push(e):te.push(e);return}ne.push(e);let t=[...u.values()].filter(e=>e.tool===`attach_file`),n=t.reverse().find(t=>t.headline.endsWith(`/${e.name}`)||t.headline.endsWith(` ${e.name}`))??t[0];n&&((n.files??=[]).push(e),n.open=!0)}function ie(e){switch(r.placeholder=!1,e.kind){case`input`:{let t={text:e.text,at:e.at,...e.source?{source:e.source}:{},files:te.splice(0)};r.request?r.log.push({kind:`followup`,key:_(`followup`),input:t}):r.request=t,T=t;return}case`step`:x(e.step);return;case`call`:S(e.step,e.call);return;case`result`:C(e.step,e.call);return;case`turn`:w(``),p=mn(e,r.model,m),p.model&&(m=!0),e.model&&!(r.model!==null&&Dn(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`:ee(e.step).items.push({kind:`skill`,skill:e.skill});return;case`artifact`:re(e.artifact);return;case`context`:r.context.push({key:_(`ctx`),at:e.at,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}),(e.noteKind===`stop_requested`||e.noteKind===`stopped`)&&(e.mode===`soft`||e.mode===`hard`)&&O(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&&E(`getting_ready`);return}e.name.startsWith(`post.`)&&e.open&&E(`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=B({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:B({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`:w(`wrote the reply below`),r.reply={text:e.text,at:e.at,files:ne};return}}function E(e){let t=l.get(e);t&&!t.toggled&&(t.group.open=!1)}function ae(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))ie(t)}function oe(){for(let e of u.values())if(e.status===`running`)return e;return null}function D(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 se(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 O(e){r.stopMode=e}function k(e){r.elided.push(e),r.log.push({kind:`note`,key:_(`note`),replay:!0,text:pn(e)}),r.placeholder=!1,r.traceVersion++}return{state:r,handle:ae,noteElided:k,spanSet:()=>[...a.values()],losses:e=>i.losses({windowStart:e,elided:r.elided}),pendingCall:oe,flushPendingTurn:w,closePhases(){E(`getting_ready`),E(`finishing_up`)},setAllOpen:D,togglePhase(e){e.open=!e.open;let t=l.get(e.phase);t&&(t.toggled=!0)},reveal:se,callHeadline:e=>u.get(e)?.headline,toggleGroup(e){e.manual=!0,e.groupOpen=!e.groupOpen},toggleCall(e){e.open=!e.open},markStopping:O,opensByDefault:v}}function yn(e,t){return e.lastAt===null||e.lastAtWall===null?null:e.lastAt+(t-e.lastAtWall)}function bn(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 xn(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 Sn(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 Cn(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 wn=Symbol(`sb-runner-clock`),Tn=Symbol(`sb-artifact-links`),En=Symbol(`sb-reply-landed`);function Dn(e,t){return e===t||!e.includes(`/`)!=!t.includes(`/`)&&On(e)===On(t)}function On(e){if(!e)return`model`;let t=e.lastIndexOf(`/`);return(t===-1?e:e.slice(t+1))||e}var kn=6e4;function An(e,t,n){let r=yn(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>=kn}}var jn=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]),Mn=[`data-preview`],Nn={class:`mb-1.5 flex items-baseline gap-2 font-mono text-[0.68rem] font-medium uppercase tracking-wider text-dimmed`},Pn={class:`count font-normal normal-case tracking-normal`},Fn={class:`m-0 flex list-none flex-col gap-1.5 p-0`},In=[`data-direction`,`data-expired`],Ln={class:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5 font-mono text-xs`},Rn=[`title`],zn=[`href`],Bn={key:1,class:`name font-medium text-toned`},Vn={class:`fact text-dimmed`},Hn={class:`fact text-dimmed`},Un={key:2,class:`expired text-warn`},Wn=[`src`,`alt`,`onError`],Gn=Y({__name:`MessageFiles`,props:{files:{},preview:{type:Boolean,default:!0}},setup(e){let t=e,n=ae(Tn,null),r=B(new Set),i=V(()=>t.files.map(e=>({...e,href:n?dn(n,e.key):null,inline:t.preview&&jn.has(e.contentType),expired:r.has(e.key)})));return(t,a)=>(L(),W(`div`,{class:`files mt-3 border-t border-(--ui-border) pt-2`,"data-preview":e.preview?`1`:`0`},[U(`h3`,Nn,[a[0]||=U(`span`,null,`Files`,-1),U(`span`,Pn,`· `+q(e.files.length)+` file`+q(e.files.length===1?``:`s`),1)]),U(`ul`,Fn,[(L(!0),W(A,null,G(i.value,e=>(L(),W(`li`,{key:e.key,class:`artifact`,"data-direction":e.direction,"data-expired":e.expired?`1`:`0`},[U(`div`,Ln,[U(`span`,{class:`dir shrink-0 select-none text-dimmed`,title:e.direction===`out`?`sent by the run`:`received from the thread`},q(e.direction===`out`?`↑ sent`:`↓ received`),9,Rn),e.href&&!e.expired?(L(),W(`a`,{key:0,class:`name font-medium text-primary no-underline hover:underline`,href:e.href,target:`_blank`,rel:`noopener noreferrer`},q(e.name),9,zn)):(L(),W(`span`,Bn,q(e.name),1)),U(`span`,Vn,q(K(bt)(e.size)),1),U(`span`,Hn,q(e.contentType),1),e.expired&&K(n)?(L(),W(`span`,Un,`expired after `+q(K(n).retentionDays)+` days`,1)):R(``,!0)]),e.inline&&e.href&&!e.expired?(L(),W(`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=>r.add(e.key)},null,40,Wn)):R(``,!0)],8,In))),128))])],8,Mn))}}),Kn=[`id`,`open`,`title`,`data-status`,`data-heat`],qn={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`},Jn={key:2,class:`dollar shrink-0 select-none text-dimmed`},Yn={key:3,class:`tool shrink-0 rounded bg-accented px-1.5 text-xs leading-normal text-muted`},Xn={key:0,class:`cmd brief min-w-0 flex-1 truncate text-info`},Zn={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`},Qn={key:5,class:`cmd min-w-0 flex-1`},$n={class:`facts ml-auto flex shrink-0 gap-2.5 text-xs tabular-nums text-muted`},er={key:0,class:`fact elapsed`,title:`since this call started (runner clock)`},tr={key:0,class:`over rounded bg-bad/15 px-1 font-medium text-bad`},nr={key:1,class:`over rounded bg-bad/15 px-1 font-medium text-bad`},rr={class:`body`},ir={key:1,class:`none px-3 py-1.5 text-xs italic text-dimmed`},ar={key:2,class:`none px-3 py-1.5 text-xs italic text-dimmed`},or=Y({__name:`CallCard`,props:{call:{}},setup(e){let t=e,n=ae(wn,null),r=ae(En,null),i=V(()=>{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=V(()=>We(t.call.durationMs,`tool`,t.call.timedOut)),o=V(()=>qe(a.value)),s=V(()=>t.call.durationMs===void 0?-1:t.call.facts.length-1);function c(){t.call.open=!t.call.open}return(t,n)=>(L(),W(`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 ${K(Z)(e.call.startedAt)}`:void 0,"data-status":e.call.status,"data-heat":a.value.level},[U(`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:k(c,[`prevent`])},[U(`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`?(L(),W(`span`,qn)):(L(),W(`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`])},q(e.call.status===`ok`?`✓`:e.call.status===`failed`?`✗`:`⚠`),3)),e.call.shell?(L(),W(`span`,Jn,`$`)):(L(),W(`span`,Yn,q(e.call.tool),1)),e.call.chipOnly?(L(),W(`span`,Qn)):(L(),W(A,{key:4},[e.call.open?(L(),W(`code`,Zn,q(e.call.title),1)):(L(),W(`code`,Xn,q(e.call.headline),1))],64)),U(`span`,$n,[i.value?(L(),W(`span`,er,q(i.value),1)):R(``,!0),(L(!0),W(A,null,G(e.call.facts,(t,n)=>(L(),W(A,{key:n},[n===s.value&&a.value.over?(L(),W(`span`,tr,`timed out`)):R(``,!0),U(`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)},q(t),7)],64))),128)),a.value.over&&s.value===-1?(L(),W(`span`,nr,`timed out`)):R(``,!0)])],2),U(`div`,rr,[e.call.hasResult&&e.call.output?(L(),W(`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`])},q(e.call.output),3)):e.call.hasResult?(L(),W(`div`,ir,`no output`)):(L(),W(`div`,ar,`no output yet`)),e.call.files&&e.call.files.length>0?(L(),N(Gn,{key:3,class:`mx-3.5 mb-2.5`,files:e.call.files,preview:!K(r)},null,8,[`files`,`preview`])):R(``,!0)])],10,Kn))}}),sr=[`title`],cr=[`title`],lr={class:`skillname whitespace-nowrap font-mono font-medium text-skill`},ur={key:0,class:`skilldesc min-w-0 flex-1 truncate text-xs text-muted`},dr={class:`facts ml-auto flex shrink-0 gap-2.5 font-mono text-xs text-muted`},fr=[`href`],pr={class:`fact`},mr=Y({__name:`StepItems`,props:{items:{}},setup(e){return(t,n)=>(L(!0),W(A,null,G(e.items,(e,t)=>(L(),W(A,{key:t},[e.kind===`call`?(L(),N(or,{key:0,call:e.call},null,8,[`call`])):e.kind===`quiet`?(L(),W(`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:K(Z)(e.at)},[U(`span`,null,q(e.text),1)],8,sr)):(L(),W(`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:K(Z)(e.skill.at)},[n[0]||=U(`span`,{class:`skillmark shrink-0 select-none text-xs`},`📚`,-1),U(`span`,lr,`skill `+q(e.skill.name),1),e.skill.description?(L(),W(`span`,ur,q(e.skill.description),1)):R(``,!0),U(`span`,dr,[e.skill.source?(L(),W(`a`,{key:0,class:`fact text-primary hover:underline`,href:e.skill.source,target:`_blank`,rel:`noopener noreferrer`},`source`,8,fr)):R(``,!0),U(`span`,pr,q(K(bt)(e.skill.bodyBytes))+` into context`,1)])],8,cr))],64))),128))}}),hr=[`id`,`data-live`],gr={class:`head flex items-baseline gap-x-6 pb-1.5 pr-(--sb-gutter)`},_r={class:`min-w-0 flex-1`},vr={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`},yr=[`data-heat`,`title`],br=[`title`],xr=[`title`],Sr={key:2,class:`nonar font-sans text-sm italic text-dimmed`},Cr=[`title`],wr={key:0,class:`narration flex items-baseline gap-3 pb-1.5 pr-(--sb-gutter)`},Tr={key:1,class:`narration flex items-baseline gap-3 pb-1.5 pr-(--sb-gutter)`},Er={class:`nonar flex-1 font-sans text-sm italic text-dimmed`},Dr={class:`calls flex flex-col gap-2`},Or=[`open`,`data-group-open`],kr=[`title`],Ar=[`data-ok`,`data-bad`,`data-infra`,`data-running`],jr=[`data-heat`],Mr={class:`gbody flex flex-col gap-2 pb-1 pt-1.5`},Nr=Y({__name:`StepBlock`,props:{step:{}},emits:[`toggleGroup`],setup(e,{emit:t}){let n=e,r=t,i=V(()=>n.step.items.filter(e=>e.kind===`call`)),a=V(()=>i.value.length>=2),o=V(()=>{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=V(()=>hn(o.value)),c=V(()=>i.value.some(e=>e.kind===`call`&&e.call.timedOut)),l=V(()=>We(o.value.ms,`tool`,c.value)),u=V(()=>qe(l.value)),d=V(()=>n.step.turn?We(n.step.turn.durationMs,`turn`):void 0),f=V(()=>d.value?qe(d.value):void 0),p=V(()=>{let e=i.value[0];return e?.kind===`call`?e.call.startedAt:void 0});return(t,n)=>(L(),W(`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},[U(`div`,gr,[U(`div`,_r,[e.step.turn?(L(),W(`div`,vr,[U(`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 `+q(e.step.turn.chip),15,yr),e.step.turn.switched?(L(),W(`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}`},`⇄ `+q(K(On)(e.step.turn.model)),9,br)):e.step.turn.showModel?(L(),W(`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},q(K(On)(e.step.turn.model)),9,xr)):R(``,!0),(L(!0),W(A,null,G(e.step.turn.facts,(e,t)=>(L(),W(`span`,{key:t,class:`fact`},q(e),1))),128))])):e.step.narration===null?(L(),W(`span`,Sr,q(e.step.note),1)):(L(),N($,{key:1,text:e.step.narration},null,8,[`text`]))]),e.step.at===void 0?R(``,!0):(L(),W(`span`,{key:0,class:`ts shrink-0 select-none font-mono text-xs tabular-nums text-dimmed`,title:K(Z)(e.step.at)},q(K(yt)(e.step.at)),9,Cr))]),e.step.turn&&e.step.narration!==null?(L(),W(`div`,wr,[j($,{text:e.step.narration},null,8,[`text`])])):e.step.turn&&e.step.narration===null&&!e.step.turn.facts.length?(L(),W(`div`,Tr,[U(`span`,Er,q(e.step.note),1)])):R(``,!0),U(`div`,Dr,[a.value?(L(),W(`details`,{key:1,class:`grp`,open:e.step.groupOpen,"data-group-open":e.step.groupOpen?`1`:`0`},[U(`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 ${K(Z)(p.value)}`:void 0,onClick:n[0]||=k(e=>r(`toggleGroup`),[`prevent`])},[U(`span`,{class:J([`gchev shrink-0 select-none transition-transform motion-reduce:transition-none`,e.step.groupOpen?`rotate-90`:``])},`❯`,2),U(`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},q(s.value),11,Ar),o.value.ms>0?(L(),W(`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?(L(),W(A,{key:0},[F(`timed out · `)],64)):R(``,!0),F(q(K(X)(o.value.ms,`clock`)),1)],14,jr)):R(``,!0)],8,kr),U(`div`,Mr,[j(mr,{items:e.step.items},null,8,[`items`])])],8,Or)):(L(),N(mr,{key:0,items:e.step.items},null,8,[`items`]))])],10,hr))}}),Pr=[`id`],Fr={class:`what`},Ir={key:0,class:`text-dimmed`},Lr={key:1,class:`dur tabular-nums text-dimmed`},Rr=[`title`],zr=Y({__name:`SpanRow`,props:{item:{}},setup(e){return(t,n)=>(L(),W(`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`},[U(`span`,{class:J([`glyph select-none`,e.item.status===`error`?`text-bad`:`text-dimmed`])},q(e.item.open?`◌`:e.item.status===`error`?`✗`:`◷`),3),U(`span`,Fr,q(e.item.text),1),e.item.open?(L(),W(`span`,Ir,`…`)):e.item.durationMs===void 0?R(``,!0):(L(),W(`span`,Lr,q(K(X)(e.item.durationMs,`precise`)),1)),e.item.at===void 0?R(``,!0):(L(),W(`span`,{key:2,class:`ts ml-auto select-none text-dimmed`,title:K(Z)(e.item.at)},q(K(yt)(e.item.at)),9,Rr))],8,Pr))}}),Br={"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`},Vr={getting_ready:`getting ready`,finishing_up:`finishing up`};function Hr(e){return Br[Vr[e]]}var Ur={id:`timeline`,class:`block mb-4 rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-3`,"data-testid":`timeline`},Wr={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},Gr={class:`ml-auto flex items-baseline gap-3 font-normal normal-case tracking-normal`},Kr=[`href`],qr={class:`lede font-mono text-sm text-toned`},Jr={class:`shape tabular-nums`},Yr={key:0,class:`current text-muted`},Xr={key:0,class:`note mt-0.5 text-xs text-muted`},Zr=[`aria-label`],Qr=[`title`,`data-term`],$r={class:`legend mt-2 flex flex-wrap gap-x-4 gap-y-1 font-mono text-xs`},ei=[`title`,`data-term`],ti={class:`term text-muted`},ni={class:`ms tabular-nums text-toned`},ri=[`title`],ii={class:`ranked mt-1 flex flex-col gap-1 font-mono text-xs`},ai={class:`ms w-14 shrink-0 tabular-nums text-toned`},oi=[`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)=>(L(),W(`section`,Ur,[U(`h2`,Wr,[n[0]||=U(`span`,null,`Where the time went`,-1),U(`span`,Gr,[e.eventsHref?(L(),W(`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,Kr)):R(``,!0),U(`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 `)])]),U(`p`,qr,[U(`span`,Jr,q(e.vm.shown?e.vm.total:e.vm.lede),1),e.vm.current?(L(),W(`span`,Yr,` · `+q(e.vm.current),1)):R(``,!0)]),(L(!0),W(A,null,G(e.vm.captions,e=>(L(),W(`p`,{key:e,class:`caption mt-0.5 text-xs text-muted`},q(e),1))),128)),e.vm.note?(L(),W(`p`,Xr,q(e.vm.note),1)):R(``,!0),e.vm.shown?(L(),W(A,{key:1},[U(`div`,{class:`bar mt-2.5 flex h-2 w-full overflow-hidden rounded-sm`,role:`img`,"aria-label":e.vm.lede},[(L(!0),W(A,null,G(e.vm.bar,(e,t)=>(L(),W(`div`,{key:t,class:J([`seg h-full`,[K(Br)[e.term],e.hatched?`paint-hatched hatched`:``]]),style:_({width:`${e.pct}%`}),title:i(e),"data-term":e.term},null,14,Qr))),128))],8,Zr),U(`ul`,$r,[(L(!0),W(A,null,G(e.vm.legend,e=>(L(),W(`li`,{key:e.term,class:`flex items-baseline gap-1.5 cursor-help`,title:e.definition,"data-term":e.term},[U(`span`,{class:J([`swatch inline-block size-2 shrink-0 self-center rounded-[2px]`,K(Br)[e.term]])},null,2),U(`span`,ti,q(e.term),1),U(`span`,ni,q(e.text),1)],8,ei))),128))]),e.vm.ranked.length>0?(L(),W(A,{key:0},[U(`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,ri),U(`ol`,ii,[(L(!0),W(A,null,G(e.vm.ranked,(e,t)=>(L(),W(`li`,{key:t,class:`flex items-baseline gap-2`},[U(`span`,ai,q(K(X)(e.ms,`clock`)),1),U(`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:k(t=>r(`reveal`,e.anchor),[`prevent`])},q(e.label),9,oi),(L(!0),W(A,null,G(e.facts,e=>(L(),W(`span`,{key:e,class:`fact shrink-0 rounded border border-accented px-1 text-dimmed`},q(e),1))),128))]))),128))])],64)):R(``,!0)],64)):R(``,!0)]))}}),ci=[`data-position`],li={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-ok`},ui=[`href`],di={key:1,class:`caption font-normal normal-case tracking-normal text-dimmed`},fi=[`title`],pi=Y({__name:`ReplyBlock`,props:{text:{},caption:{},when:{},whenTitle:{},position:{},files:{}},setup(e){return(t,n)=>(L(),W(`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},[U(`h2`,li,[n[0]||=U(`span`,null,`Reply`,-1),e.caption.href?(L(),W(`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`},q(e.caption.text),9,ui)):(L(),W(`span`,di,q(e.caption.text),1)),U(`span`,{class:`ts ml-auto select-none text-xs font-normal normal-case tracking-normal text-dimmed`,title:e.whenTitle},q(e.when),9,fi)]),j($,{text:e.text},null,8,[`text`]),e.files.length>0?(L(),N(Gn,{key:0,files:e.files},null,8,[`files`])):R(``,!0)],10,ci))}});function mi(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(hi(e.from,n)),m.add(hi(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`&&hi(e.from,n)<=r&&hi(e.to,n)>=i)){_+=a;continue}if(t.losses.some(e=>e.kind===`elided`&&hi(e.from,n)<=r&&hi(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 hi(e,t){return Math.min(t.end,Math.max(t.start,e))}function gi(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 _i(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 vi(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 yi={"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`},bi=`Ranked by each step's own time, its children excluded — the bar counts every instant once.`,xi=`currently delivering`,Si=`getting ready: not recorded (too large)`,Ci=`no timing data`,wi=`not loaded (the record has the full shape)`,Ti={getting_ready:`getting ready`,thinking:`thinking`,tools:`in tools`,finishing_up:`finishing up`};function Ei(e){let{spans:t,window:n,owner:r}=e,i=e.phase!==`live`,a=mi(t,{window:n,owner:r,finished:i,losses:e.losses}),o=gi(a),s=X(o.totalS*1e3,`clock`),c=t.find(e=>e.name===`request`&&e.parentSpanId===void 0),l=e.phase===`live`?Oi(t,r,n):void 0,u=Ai(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:bi,debug:f,lede:s,shown:!1,bar:[],legend:[],ranked:[],note:Ci};let p={total:s,current:u,openStep:d,captions:[vi(`before`,Di(c,`queuedBeforeMs`)),vi(`behind`,Di(c,`queuedBehindMs`))].filter(e=>e!==void 0),rankedNote:bi,debug:f};if(!c)return{...p,lede:s,shown:!1,bar:[],legend:[],ranked:[],note:i?Si:``};let m=t=>t===`not recorded`?`not recorded${e.truncated?` (too large)`:``}`:t===`not loaded`?wi:t,h=_i(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(Mi(a))}`:s,_=h?o.items.map(({term:t,s:n})=>({term:t,text:X(n*1e3,`clock`),definition:t===`not recorded`&&e.truncated?`${yi[t]} (too large)`:yi[t]})):[];return{...p,lede:g,shown:h,bar:h?Ni(a,l):[],legend:_,ranked:h?Pi(t,c,r,n,e.callTitle):[],note:``}}function Di(e,t){let n=e?.attrs[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function Oi(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`||ki(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 ki(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 Ai(e,t){return e.phase===`delivering`?xi:e.phase===`ended`?Sn(e.delivery??{}):t?`currently ${Ti[t.bucket]} ${X(t.elapsedMs,`clock`)}`:``}function ji(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 Mi(e){let t=[`getting ready`,-1];for(let n of ji(e))n[1]>t[1]&&(t=n);return t[0]}function Ni(e,t){let n=[],r=t=>e.windowMs>0?t/e.windowMs*100:0;for(let[i,a]of ji(e))if(!(a<=0)){if(t&&Ti[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 Pi(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||ki(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-Fi(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:Ii(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 Fi(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 Ii(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 Li(e){return e===`command`?`command`:`agent`}function Ri(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 zi=/^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/,Bi=/^[0-9a-f]{7,40}$/;function Vi(e){if(!e.repo||!zi.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&&Bi.test(e.headSha)&&(n.commit=e.number!==void 0&&n.pr?`${t}/pull/${e.number}/commits/${e.headSha}`:`${t}/commit/${e.headSha}`),n}function Hi(e){return e.find(e=>e.poweredBy===`meat`)??e.find(e=>e.poweredBy===`git`)??null}function Ui(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 Wi(e){return`The recorded diff was cut at ${e.toLocaleString(`en-US`)} characters; open the full diff on GitHub for the rest`}function Gi(e){return e===`meat`?`reading diff · meat`:`full diff · git`}function Ki(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 qi=e=>typeof e==`object`&&!!e,Ji=e=>typeof e==`string`&&e!==``,Yi=e=>typeof e==`number`&&Number.isInteger(e)&&e>0;function Xi(e){for(let t of e.split(/\n\s*\n/)){let e=t.split(`
|
|
9
|
+
`).map(e=>e.trim()).filter(e=>e!==``);if(!(e.length===0||e.every(e=>e.startsWith(`#`))))return e.join(`
|
|
10
|
+
`)}}function Zi(e,t){let n=t.trim().toLowerCase(),r=[],i=!1,a=!1;for(let t of e.split(`
|
|
11
|
+
`)){/^\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(`
|
|
12
|
+
`).trim();return o===``?void 0:o}function Qi(e){if(!Ji(e.title)||e.origin!==`submitted`&&e.origin!==`parsed`)return;let t=typeof e.body==`string`?e.body:``,n=Ji(e.tldr)?e.tldr:Xi(t),r=Zi(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 $i(){let e=B({pr:{},readingDiffs:[],ready:!1});return{state:e,handle(t){if(!qi(t))return;let n=t;if(n.type===`run_meta`)Ji(n.repo)&&(e.pr.repo=n.repo),Yi(n.pr)&&(e.pr.number=n.pr),typeof n.headSha==`string`&&Bi.test(n.headSha)&&(e.pr.headSha=n.headSha);else if(n.type===`review_artifact`&&n.artifact===`reading_diff`){if(!Ji(n.diff)||n.poweredBy!==`git`&&n.poweredBy!==`meat`)return;let t={poweredBy:n.poweredBy,baseRef:Ji(n.baseRef)?n.baseRef:`HEAD`,diff:n.diff,truncated:n.truncated===!0,...Ji(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=Qi(n);t&&(e.description=t)}}}}var ea=3e3,ta={fetch:(...e)=>globalThis.fetch(...e),delay:e=>new Promise(t=>setTimeout(t,e))};function na(e,t,n={}){let{fetch:r,delay:i}={...ta,...n},a=B({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(ea),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 ra={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`}},ia={__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=ce(`badge`,t),i=ee(),{orientation:a,size:o}=fe(t),{isLeading:s,isTrailing:c,leadingIconName:l,trailingIconName:u}=he(r),d=V(()=>I({extend:ra,...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)=>(L(),N(K(h),{as:K(r).as,"data-slot":`base`,class:J(d.value.base({class:[K(r).ui?.base,K(r).class]}))},{default:C(()=>[P(e.$slots,`leading`,{ui:d.value},()=>[K(s)&&K(l)?(L(),N(Se,{key:0,name:K(l),"data-slot":`leadingIcon`,class:J(d.value.leadingIcon({class:K(r).ui?.leadingIcon}))},null,8,[`name`,`class`])):K(r).avatar?(L(),N(H,O({key:1,size:K(r).ui?.leadingAvatarSize||d.value.leadingAvatarSize()},K(r).avatar,{"data-slot":`leadingAvatar`,class:d.value.leadingAvatar({class:K(r).ui?.leadingAvatar})}),null,16,[`size`,`class`])):R(``,!0)]),P(e.$slots,`default`,{ui:d.value},()=>[K(r).label!==void 0&&K(r).label!==null?(L(),W(`span`,{key:0,"data-slot":`label`,class:J(d.value.label({class:K(r).ui?.label}))},q(K(r).label),3)):R(``,!0)]),P(e.$slots,`trailing`,{ui:d.value},()=>[K(c)&&K(u)?(L(),N(Se,{key:0,name:K(u),"data-slot":`trailingIcon`,class:J(d.value.trailingIcon({class:K(r).ui?.trailingIcon}))},null,8,[`name`,`class`])):R(``,!0)])]),_:3},8,[`as`,`class`]))}},aa={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`}},oa={__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=ce(`tabs`,r),s=ee(),c=_e(ge(o,`as`,`unmountOnHide`),i),l=V(()=>I({extend:aa,...s.ui?.tabs||{}})({color:o.color,variant:o.variant,size:o.size,orientation:o.orientation})),u=M([]);function d(e,t){u.value[e]=t}return t({triggersRef:u}),(e,t)=>(L(),N(K(ft),O(K(c),{"model-value":K(o).modelValue,"default-value":K(o).defaultValue,orientation:K(o).orientation,"activation-mode":K(o).activationMode,"data-slot":`root`,class:l.value.root({class:[K(o).ui?.root,K(o).class]})}),{default:C(()=>[j(K(_t),{"data-slot":`list`,class:J(l.value.list({class:K(o).ui?.list}))},{default:C(()=>[j(K(gt),{"data-slot":`indicator`,class:J(l.value.indicator({class:K(o).ui?.indicator}))},null,8,[`class`]),P(e.$slots,`list-leading`),(L(!0),W(A,null,G(K(o).items,(t,n)=>(L(),N(K(vt),{key:K(D)(t,K(o).valueKey)??n,ref_for:!0,ref:e=>d(n,e),value:K(D)(t,K(o).valueKey)??String(n),disabled:t.disabled,"data-slot":`trigger`,class:J(l.value.trigger({class:[K(o).ui?.trigger,t.ui?.trigger]}))},{default:C(()=>[P(e.$slots,`leading`,{item:t,index:n,ui:l.value},()=>[t.icon?(L(),N(Se,{key:0,name:t.icon,"data-slot":`leadingIcon`,class:J(l.value.leadingIcon({class:[K(o).ui?.leadingIcon,t.ui?.leadingIcon]}))},null,8,[`name`,`class`])):t.avatar?(L(),N(H,O({key:1,size:t.ui?.leadingAvatarSize||K(o).ui?.leadingAvatarSize||l.value.leadingAvatarSize()},{ref_for:!0},t.avatar,{"data-slot":`leadingAvatar`,class:l.value.leadingAvatar({class:[K(o).ui?.leadingAvatar,t.ui?.leadingAvatar]})}),null,16,[`size`,`class`])):R(``,!0)]),K(D)(t,K(o).labelKey)||a.default?(L(),W(`span`,{key:0,"data-slot":`label`,class:J(l.value.label({class:[K(o).ui?.label,t.ui?.label]}))},[P(e.$slots,`default`,{item:t,index:n},()=>[F(q(K(D)(t,K(o).labelKey)),1)])],2)):R(``,!0),P(e.$slots,`trailing`,{item:t,index:n,ui:l.value},()=>[t.badge||t.badge===0?(L(),N(ia,O({key:0,color:`neutral`,variant:`outline`,size:t.ui?.trailingBadgeSize||K(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:[K(o).ui?.trailingBadge,t.ui?.trailingBadge]})}),null,16,[`size`,`class`])):R(``,!0)])]),_:2},1032,[`value`,`disabled`,`class`]))),128)),P(e.$slots,`list-trailing`)]),_:3},8,[`class`]),K(o).content?(L(!0),W(A,{key:0},G(K(o).items,(t,n)=>(L(),N(K(ht),{key:K(D)(t,K(o).valueKey)??n,value:K(D)(t,K(o).valueKey)??String(n),"data-slot":`content`,class:J(l.value.content({class:[K(o).ui?.content,t.ui?.content,t.class]}))},{default:C(()=>[P(e.$slots,t.slot||`content`,{item:t,index:n,ui:l.value},()=>[F(q(t.content),1)])]),_:2},1032,[`value`,`class`]))),128)):R(``,!0)]),_:3},16,[`model-value`,`default-value`,`orientation`,`activation-mode`,`class`]))}},sa;function ca(){return sa??=Ie(()=>import(`./dist-DZgVjemt.js`),__vite__mapDeps([0,1,2,3,4])),sa}var la={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`},ua=Y({__name:`FileDiffs`,props:{diff:{},theme:{},diffStyle:{}},setup(e){let t=e,n=M(null),r=M(!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 E(s),w(()=>t.diff,s),w(()=>t.theme,s),w(()=>t.diffStyle,s),Ce(()=>{a++,o()}),(t,i)=>r.value?(L(),W(`pre`,la,q(e.diff),1)):(L(),W(`div`,{key:1,ref_key:`container`,ref:n,class:`space-y-4`,"data-testid":`file-diffs`},null,512))}});async function da(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 fa(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 pa={dockerfile:`docker`,makefile:`makefile`,"go.mod":`go`,"go.sum":`go`,".gitignore":`gitignore`,".dockerignore":`dockerignore`},ma={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 ha(e){let t=(e.split(`/`).pop()||e).toLowerCase(),n=pa[t];if(n)return n;let r=t.lastIndexOf(`.`);return r===-1?`text`:ma[t.slice(r+1)]??`text`}var ga={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 _a(e){return ga[e]??ga.text}function va(e){return _a(ha(e))}var ya={key:0,class:`flex items-center gap-2 p-4 text-sm text-(--ui-text-muted) sm:p-5`,"data-testid":`files-loading`},ba={key:1,class:`p-4 text-sm text-(--ui-text-muted) sm:p-5`,"data-testid":`no-files`},xa={class:`shrink-0 border-b border-(--ui-border) @2xl:w-72 @2xl:border-b-0 @2xl:border-r`,"data-testid":`file-list`},Sa={class:`@2xl:sticky @2xl:top-0 @2xl:max-h-[calc(100dvh-11rem)] @2xl:overflow-y-auto @2xl:py-3`},Ca=[`aria-expanded`],wa={class:`ml-auto tabular-nums`,"data-testid":`pr-totals`},Ta={class:`text-(--ui-success)`},Ea={class:`text-(--ui-error)`},Da={key:1,class:`flex items-center justify-between gap-2 px-3 pb-2 text-xs text-(--ui-text-dimmed)`},Oa={"data-testid":`file-count`},ka={class:`tabular-nums`,"data-testid":`pr-totals`},Aa={class:`text-(--ui-success)`},ja={class:`text-(--ui-error)`},Ma=[`title`,`aria-current`,`onClick`],Na={class:`min-w-0 flex-1 whitespace-nowrap`},Pa={class:`shrink-0 text-[11px] tabular-nums`},Fa={class:`text-(--ui-success)`},Ia={class:`text-(--ui-error)`},La=34,Ra=Y({__name:`FilesChanged`,props:{diff:{},notes:{},diffStyle:{}},setup(e){let t=e,n=ie(),r=V(()=>n.value===`dark`?`dark`:`light`),i=M([]),a=M(!0),o=M(null),s=te(`panel`),c=te(`root`),{width:l}=me(c);w(c,e=>{e&&(l.value=e.getBoundingClientRect().width)});let u=V(()=>l.value>0&&l.value<672),d=M(!1),f=V(()=>u.value?`unified`:t.diffStyle??`unified`),p=0;async function m(){let e=++p;a.value=!0;let n=await da(t.diff);e===p&&(i.value=n.files,o.value=null,a.value=!1)}w(()=>t.diff,m,{immediate:!0});let h=V(()=>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=Se;return a.value?(L(),W(`div`,ya,[j(l,{name:`i-lucide-loader-circle`,class:`size-4 animate-spin`}),n[1]||=U(`span`,null,`Loading diff…`,-1)])):i.value.length===0?(L(),W(`p`,ba,` Nothing in this diff parsed as a file. `)):(L(),W(`div`,{key:2,ref_key:`root`,ref:c,class:`@container flex min-h-full flex-col @2xl:flex-row`,"data-testid":`files-changed`},[U(`aside`,xa,[U(`div`,Sa,[u.value?(L(),W(`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},[j(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`]),U(`span`,null,q(i.value.length)+` `+q(i.value.length===1?`file`:`files`)+` changed`,1),U(`span`,wa,[U(`span`,Ta,`+`+q(h.value.additions),1),U(`span`,Ea,`−`+q(h.value.deletions),1)])],8,Ca)):(L(),W(`div`,Da,[U(`span`,Oa,q(i.value.length)+` `+q(i.value.length===1?`file`:`files`),1),U(`span`,ka,[U(`span`,Aa,`+`+q(h.value.additions),1),U(`span`,ja,`−`+q(h.value.deletions),1)])])),!u.value||d.value?(L(),W(`ul`,{key:2,class:J([`flex flex-col`,u.value?`pb-2`:``])},[(L(!0),W(A,null,G(i.value,e=>(L(),W(`li`,{key:e.path},[U(`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)},[j(l,{name:K(va)(e.path),class:`size-3.5 shrink-0`},null,8,[`name`]),U(`span`,Na,q(K(fa)(e.path,La)),1),U(`span`,Pa,[U(`span`,Fa,`+`+q(e.additions),1),U(`span`,Ia,`−`+q(e.deletions),1)])],10,Ma)]))),128))],2)):R(``,!0)])]),U(`div`,{ref_key:`panel`,ref:s,class:`min-w-0 flex-1 overflow-x-auto`,"data-testid":`diff-column`},[(L(!0),W(A,null,G(e.notes,e=>(L(),W(`p`,{key:e,class:`px-3 pt-3 text-xs text-(--ui-text-muted)`,"data-testid":`diff-note`},q(e),1))),128)),j(ua,{diff:e.diff,theme:r.value,"diff-style":f.value},null,8,[`diff`,`theme`,`diff-style`])],512)],512))}}}),za=Y({__name:`LabelTip`,props:{text:{},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>{let r=Pe;return L(),N(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:C(()=>[P(t.$slots,`default`)]),_:3},8,[`text`,`disabled`])}}}),Ba={class:`pr-review-panel @container flex h-full min-h-0 min-w-0 flex-col`,"data-testid":`pr-review-panel`},Va={class:`shrink-0 border-b border-(--ui-border) px-4 pt-5 pb-4 sm:px-6`},Ha={class:`flex flex-col gap-3 @2xl:flex-row @2xl:items-start @2xl:justify-between @2xl:gap-4`},Ua={class:`min-w-0`},Wa={class:`line-clamp-2 text-lg leading-snug font-semibold text-(--ui-text) @2xl:line-clamp-none @2xl:truncate`,"data-testid":`pr-title`},Ga={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`},Ka=[`href`],qa={key:1,class:`inline-flex items-center gap-1.5`},Ja=[`href`],Ya={title:`the base the diff is against`},Xa={"data-testid":`producer-label`},Za={class:`inline-flex items-center gap-1 text-(--ui-warning)`,"data-testid":`truncated-label`},Qa={class:`flex shrink-0 flex-wrap items-center gap-2`},$a={key:1,class:`inline-flex shrink-0 items-center gap-1.5 text-xs text-(--ui-text-muted)`,"data-testid":`abridge-running`},eo={key:2,class:`inline-flex min-w-0 shrink items-center gap-1.5 text-xs text-(--ui-error)`,"data-testid":`abridge-failed`},to=[`title`],no={key:0,class:`flex shrink-0 items-center justify-between gap-3 border-b border-(--ui-border) px-4 py-2 sm:px-6`},ro={class:`tabs-scroll min-w-0 overflow-x-auto`},io={class:`min-h-0 flex-1 overflow-y-auto`},ao={key:1,class:`mx-auto max-w-3xl p-4 sm:p-6`,"data-testid":`pr-description`},oo={key:2,class:`mt-4 text-xs text-(--ui-text-dimmed) italic`,"data-testid":`description-origin`},so={key:2,class:`px-4 py-3 text-sm text-(--ui-text-muted) sm:px-6`,"data-testid":`no-diff`},co=`switchboard:diffStyle`,lo=`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.`,uo=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=V(()=>Vi(n.data.pr)),a=V(()=>Ri(n.data)),o=V(()=>n.data.readingDiffs),s=V(()=>n.data.description),c=V(()=>o.value.find(e=>e.poweredBy===`git`)),l=V(()=>o.value.find(e=>e.poweredBy===`meat`)),u=V(()=>n.data.pr.headSha?.slice(0,7)),d=V(()=>{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=()=>Hi(o.value)?.poweredBy===`meat`?`reading`:`files`,p=M(f());w(()=>Hi(o.value),()=>p.value=f()),w(d,e=>{e.some(e=>e.value===p.value)||(p.value=e[0]?.value??`files`)},{immediate:!0});let m=V(()=>p.value===`files`?c.value:p.value===`reading`?l.value:void 0),h=V(()=>{let e=m.value;if(!e)return[];let t=[];return e.summary&&t.push(e.summary),e.truncated&&t.push(`${Wi(e.diff.length)}.`),t}),g=V(()=>s.value?Ki(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=M(`unified`);E(()=>{try{localStorage.getItem(co)===`split`&&(v.value=`split`)}catch{}});function y(e){v.value=e===`split`?`split`:`unified`;try{localStorage.setItem(co,v.value)}catch{}}let b=V(()=>n.abridge!==void 0&&n.abridge.state.state!==`done`&&c.value!==void 0&&!l.value);return(t,n)=>{let o=Se,c=le,l=oa;return L(),W(`div`,Ba,[U(`header`,Va,[U(`div`,Ha,[U(`div`,Ua,[U(`h1`,Wa,q(a.value),1),U(`div`,Ga,[i.value.pr?(L(),W(`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`},[j(o,{name:`i-simple-icons-github`,class:`size-3.5 shrink-0`}),U(`span`,null,q(e.data.pr.repo)+`#`+q(e.data.pr.number),1)],8,Ka)):e.data.pr.repo?(L(),W(`span`,qa,[j(o,{name:`i-simple-icons-github`,class:`size-3.5 shrink-0`}),U(`span`,null,q(e.data.pr.repo),1)])):R(``,!0),i.value.commit?(L(),W(`a`,{key:2,href:i.value.commit,target:`_blank`,rel:`noopener noreferrer`,class:`font-mono hover:text-(--ui-text)`,"data-testid":`commit-link`},q(u.value),9,Ja)):R(``,!0),m.value?(L(),W(A,{key:3},[U(`span`,Ya,`against origin/`+q(m.value.baseRef),1),j(za,{text:K(Ui)(m.value.poweredBy)},{default:C(()=>[U(`span`,Xa,q(K(Gi)(m.value.poweredBy)),1)]),_:1},8,[`text`]),m.value.truncated?(L(),N(za,{key:0,text:K(Wi)(m.value.diff.length)},{default:C(()=>[U(`span`,Za,[j(o,{name:`i-lucide-scissors`,class:`size-3.5`}),n[4]||=F(`truncated `,-1)])]),_:1},8,[`text`])):R(``,!0)],64)):R(``,!0)])]),U(`div`,Qa,[i.value.pr?(L(),N(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`])):R(``,!0),b.value&&e.abridge?(L(),W(A,{key:1},[e.abridge.state.state===`absent`?(L(),N(za,{key:0,text:lo},{default:C(()=>[j(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`?(L(),W(`span`,$a,[j(o,{name:`i-lucide-loader-circle`,class:`size-3.5 animate-spin`}),n[5]||=F(` Abridging… usually 1–3 minutes `,-1)])):e.abridge.state.state===`failed`?(L(),W(`span`,eo,[j(o,{name:`i-lucide-circle-alert`,class:`size-3.5 shrink-0`}),U(`span`,{class:`truncate`,title:e.abridge.state.reason},`Abridging failed: `+q(e.abridge.state.reason),9,to),j(c,{size:`xs`,color:`neutral`,variant:`outline`,label:`Retry`,"data-testid":`abridge-retry`,onClick:n[1]||=t=>e.abridge.start()})])):R(``,!0)],64)):R(``,!0),e.closable?(L(),N(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`)})):R(``,!0)])])]),d.value.length>0?(L(),W(`div`,no,[U(`div`,ro,[j(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?(L(),N(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`])):R(``,!0)])):R(``,!0),U(`div`,io,[m.value?(L(),N(Ra,{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?(L(),W(`div`,ao,[n[7]||=U(`div`,{class:`mb-2 text-xs font-medium text-(--ui-text-dimmed)`},`What the pull request says about itself`,-1),s.value.tldr?(L(),N($,{key:0,text:s.value.tldr,class:`text-sm`,"data-testid":`description-tldr`},null,8,[`text`])):R(``,!0),s.value.whatWhy?(L(),W(A,{key:1},[n[6]||=U(`div`,{class:`mt-4 mb-2 text-xs font-medium text-(--ui-text-dimmed)`},`What & why`,-1),j($,{text:s.value.whatWhy,class:`text-sm`,"data-testid":`description-what-why`},null,8,[`text`])],64)):R(``,!0),g.value?(L(),W(`p`,oo,q(g.value),1)):R(``,!0)])):(L(),W(`p`,so,` No reading diff was produced for this review. `))])])}}}),fo={class:`conn flex items-center gap-2 font-mono`},po={key:0,class:`ok text-ok`,role:`img`,"aria-label":`succeeded`},mo=[`data-heat`],ho={key:2,id:`delivery`,class:`text-xs text-muted`},go=[`title`],_o={key:0,id:`actions`,class:`actions flex gap-1.5`},vo={class:`mx-auto max-w-6xl`},yo={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`},bo={class:`agent text-[0.68rem] font-medium uppercase tracking-wider text-toned`},xo={class:`model`},So={key:0,class:`effort`},Co=[`href`],wo={key:2,class:`repo`},To=[`href`],Eo={key:4,class:`reftag rounded border border-accented px-1.5 text-[0.75rem] text-toned`},Do=[`href`,`title`],Oo=[`href`],ko={key:1,id:`request`,class:`block mb-4 rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-3`},Ao={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},jo={key:0,class:`source flex items-center gap-2 font-normal normal-case tracking-normal text-dimmed`},Mo=[`href`],No={key:1},Po={key:1},Fo=[`title`],Io={key:3,id:`context`,class:`group mb-4 px-(--sb-gutter)`},Lo={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`},Ro={class:`count font-normal normal-case tracking-normal text-dimmed`},zo={id:`contextturns`,class:`pb-1 pl-5`},Bo=[`title`],Vo={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`},Ho={key:0,class:`count font-normal normal-case tracking-normal text-dimmed`},Uo=[`aria-pressed`,`data-open`,`title`],Wo={id:`log`,class:`m-0 list-none p-0`},Go={key:0,id:`placeholder`,class:`empty text-muted`},Ko=[`id`],qo={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`},Jo=[`title`],Yo=[`title`],Xo=[`title`],Zo={key:2,class:`nonar font-sans italic`},Qo=[`title`],$o=[`data-phase`],es=[`aria-expanded`,`onClick`],ts={class:`glyph select-none text-dimmed`},ns={class:`what`},rs={key:0,class:`m-0 list-none p-0 pl-4`},is={key:4,class:`followup block mt-5 rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-3`},as={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},os={key:0,class:`source flex items-center gap-2 font-normal normal-case tracking-normal text-dimmed`},ss=[`href`],cs={key:1},ls=[`title`],us=[`title`],ds={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)`},fs=[`title`],ps={class:`verb min-w-0 truncate text-toned`},ms=Y({__name:`RunPage`,setup(e){let t=Ee(`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=vn({openTags:o?o.split(`,`).map(e=>e.trim()).filter(Boolean):void 0}),l=s.state,u=M(n?`ended`:`connecting`),d=M(``),p=Re(),m=t?.mode===`live`?bn(t,p.value):null,h=M(void 0),g=M({}),v=V(()=>{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=V(()=>n&&t?.mode===`history`?t.durationMs:h.value),x=V(()=>Sn(n&&t?.mode===`history`?{finishedAt:t.finishedAt,sealedAt:t.sealedAt,replyOk:t.replyOk}:g.value)),ee=V(()=>b.value===void 0?``:X(b.value,`clock`)),S=V(()=>We(b.value,`run`)),T=V(()=>qe(S.value)),te={red:`border-bad/30 text-bad`,amber:`border-warn/30 text-warn`,grey:`border-accented text-muted`},ne=V(()=>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`),re=V(()=>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`),ie=V(()=>{if(!t||t.mode!==`live`&&t.mode!==`history`)return null;l.traceVersion;let e=t.receivedAt??t.startedAt,n=Li(l.meta?.agent);if(t.mode===`history`){let r=t.durationMs??(t.finishedAt===void 0?0:Math.max(0,t.finishedAt-e));return Ei({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 Ei({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})}),ae=n&&t?.mode===`history`?`/runs/${encodeURIComponent(t.id)}/events`:void 0;function oe(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 D=M(n),se=M(!1);function O(e){t?.mode===`live`&&(e!==`hard`||c.confirm(`Hard stop: abort the run now with no summary and free its sandbox?`))&&(se.value=!0,fetch(`${t.stopUrl}&mode=${encodeURIComponent(e)}`,{method:`POST`,credentials:`same-origin`}).then(t=>{if(!t.ok)throw Error(`HTTP ${t.status}`);ce(e)}).catch(e=>{se.value=!1,d.value=`stop failed: ${e instanceof Error?e.message:`error`}`}))}function ce(e){s.markStopping(e),D.value=!0,(u.value===`connecting`||u.value===`running`)&&(u.value=`stopping`)}w(()=>l.stopMode,e=>{e&&u.value!==`ended`&&u.value!==`disconnected`&&u.value!==`finished`&&ce(e)}),n||w(u,e=>c.setFavicon(e===`ended`||e===`disconnected`||e===`finished`?Ye:Je),{immediate:!0});let ue=V(()=>!n&&u.value!==`ended`&&u.value!==`disconnected`&&u.value!==`finished`),de=V(()=>ue.value?yn(l,p.value):null);Te(wn,de),Te(Tn,a),Te(En,V(()=>l.reply!==null));let fe=V(()=>ue.value?An(l,s.pendingCall(),p.value):null),pe=[`Thinking`,`Pondering`,`Mulling it over`,`Reasoning`,`Cogitating`,`Weighing options`,`Puzzling`,`Deliberating`,`Noodling`,`Chewing on it`,`Ruminating`,`Reticulating splines`],P=V(()=>fe.value?.kind===`thinking`?ie.value?.openStep||pe[Math.floor(fe.value.elapsedMs/6e3)%pe.length]:``);function me(){s.setAllOpen(!l.allOpen)}let he=V(()=>l.log.filter(e=>e.kind===`step`).length),ge=M(null);function _e(){return window.innerHeight+window.scrollY>=document.body.scrollHeight-60}let I=$i(),ve=M(!1),ye=t?.mode===`history`&&t.capabilities.readingDiffAbridge?na(t.id,e=>I.handle(e)):void 0;Ce(()=>ye?.dispose());function be(e){let t=_e();s.handle(e),I.handle(e),t&&requestAnimationFrame(()=>ge.value?.scrollIntoView?.({block:`nearest`}))}let xe=Ue(),z=null;if(t?.mode===`history`){for(let e of t.events)s.handle(e),I.handle(e);s.closePhases()}E(()=>{if(t?.mode!==`live`)return;z=xe(t.eventsUrl),z.onopen=()=>{l.stopMode||(u.value=`running`)};let e=0;z.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}}be(n)},z.addEventListener(`replay_elided`,e=>{let t=fn(e);t&&s.noteElided(t)}),z.addEventListener(`finished`,e=>{let t=Cn(e);t&&m&&(h.value=m.elapsedAt(t.finishedAt)),t&&(g.value={...g.value,finishedAt:t.finishedAt}),D.value=!0,(u.value===`connecting`||u.value===`running`)&&(u.value=`finished`)}),z.addEventListener(`end`,e=>{s.flushPendingTurn(`the run ended here`),s.closePhases(),D.value=!0,h.value??=m?.elapsedMs(p.value),g.value={...g.value,...xn(e)},u.value=`ended`,z?.close()}),z.onerror=()=>{z&&z.readyState===2&&(u.value=`disconnected`)}}),Ce(()=>{z?.close()});function we(e){return e&&/^https?:\/\//.test(e)?e:``}let B=V(()=>we(l.request?.source?.url)),H=V(()=>{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)}}),De=V(()=>gn({meta:l.meta,requestText:l.request?.text??``,prOpened:l.prOpened}));function Oe(e){return typeof e==`number`?Be(e,p.value):``}function ke(e){return typeof e==`number`?Z(e):void 0}return(e,t)=>{let n=le,a=Pe,o=Se,c=Ct;return L(),N(f,{title:K(r),nav:`runs`},{leading:C(()=>[...t[4]||=[U(`a`,{class:`back text-sm text-primary no-underline hover:underline`,href:`/runs`},`← All runs`,-1)]]),status:C(()=>[U(`span`,fo,[u.value===`ended`?(L(),W(A,{key:0},[v.value.ok?(L(),W(`span`,po,`✓`)):(L(),W(`span`,{key:1,class:J([`chip rounded border px-1.5 text-[0.7rem]`,te[v.value.cls]])},q(v.value.word),3)),U(`span`,{id:`state`,class:J([`dur text-xs tabular-nums`,[T.value?`heat`:`text-muted`,S.value.level>=2?`font-medium`:``]]),style:_(T.value),"data-heat":S.value.level},q(ee.value),15,mo),x.value?(L(),W(`span`,ho,`· `+q(x.value),1)):R(``,!0)],64)):(L(),W(A,{key:1},[U(`span`,{id:`statedot`,class:J([`pulse text-[1.1em] leading-none`,re.value])},`∿`,2),U(`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},q(ne.value),11,go)],64))])]),actions:C(()=>[D.value?R(``,!0):(L(),W(`span`,_o,[j(a,{text:`Soft stop: no new steps, the agent writes up what it has`},{default:C(()=>[j(n,{size:`xs`,color:`neutral`,variant:`outline`,label:`Stop`,disabled:se.value,onClick:t[0]||=e=>O(`soft`)},null,8,[`disabled`])]),_:1}),j(a,{text:`Hard stop: abort now, no summary, free the sandbox`},{default:C(()=>[j(n,{size:`xs`,color:`error`,variant:`outline`,label:`Kill`,disabled:se.value,onClick:t[1]||=e=>O(`hard`)},null,8,[`disabled`])]),_:1})]))]),default:C(()=>[U(`div`,vo,[K(l).meta?(L(),W(`div`,yo,[U(`span`,bo,q(K(l).meta.agent),1),U(`span`,xo,q(K(l).meta.model),1),K(l).meta.effort?(L(),W(`span`,So,q(K(l).meta.effort)+` effort`,1)):R(``,!0),H.value.repo?(L(),W(`a`,{key:1,class:`text-primary no-underline hover:underline`,href:H.value.repo,target:`_blank`,rel:`noopener noreferrer`},q(K(l).meta.repo),9,Co)):K(l).meta.repo?(L(),W(`span`,wo,q(K(l).meta.repo),1)):R(``,!0),H.value.tree?(L(),W(`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`},q(K(l).meta.ref),9,To)):K(l).meta.ref?(L(),W(`span`,Eo,q(K(l).meta.ref),1)):R(``,!0),H.value.commit&&K(l).meta.headSha?(L(),W(`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 ${K(l).meta.headSha}`},q(K(on)(K(l).meta.headSha)),9,Do)):R(``,!0),H.value.pr?(L(),W(`a`,{key:6,class:`prlink whitespace-nowrap text-primary no-underline hover:underline`,href:H.value.pr,target:`_blank`,rel:`noopener noreferrer`},[j(Nt,{class:`mr-1 align-[-0.125em]`}),F(`#`+q(K(l).meta.pr),1)],8,Oo)):R(``,!0),K(I).state.ready?(L(),W(`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=>ve.value=!0},[j(o,{name:`i-lucide-git-compare`,class:`size-3.5 shrink-0`,"aria-hidden":`true`}),t[5]||=F(` Reading diff `,-1)])):R(``,!0)])):R(``,!0),K(l).request?(L(),W(`section`,ko,[U(`h2`,Ao,[t[6]||=U(`span`,null,`Request`,-1),K(l).request.source?(L(),W(`span`,jo,[K(l).request.source.channel?(L(),W(A,{key:0},[j(Ke),B.value?(L(),W(`a`,{key:0,class:`text-muted no-underline hover:text-primary hover:underline`,href:B.value,target:`_blank`,rel:`noopener noreferrer`,title:`open the thread`},`#`+q(K(l).request.source.channel),9,Mo)):(L(),W(`span`,No,`#`+q(K(l).request.source.channel),1))],64)):R(``,!0),K(l).request.source.user?(L(),W(`span`,Po,q(K(l).request.source.user),1)):R(``,!0)])):R(``,!0),U(`span`,{class:`ts ml-auto select-none text-xs font-normal normal-case tracking-normal text-dimmed`,title:ke(K(l).request.at)},q(Oe(K(l).request.at)),9,Fo)]),j(Ot,{lines:3},{default:C(()=>[j($,{text:K(l).request.text},null,8,[`text`])]),_:1}),K(l).request.files.length>0?(L(),N(Gn,{key:0,files:K(l).request.files},null,8,[`files`])):R(``,!0)])):R(``,!0),K(l).reply&&K(i)?(L(),N(pi,{key:2,position:`first`,text:K(l).reply.text,caption:De.value,when:Oe(K(l).reply.at),"when-title":ke(K(l).reply.at),files:K(l).reply.files},null,8,[`text`,`caption`,`when`,`when-title`,`files`])):R(``,!0),K(l).context.length>0?(L(),W(`details`,Io,[U(`summary`,Lo,[t[7]||=U(`span`,{class:`chev select-none text-xs text-dimmed transition-transform group-open:rotate-90 motion-reduce:transition-none`},`❯`,-1),t[8]||=U(`span`,null,`Earlier in this thread`,-1),U(`span`,Ro,`· `+q(K(l).context.length)+` turn`+q(K(l).context.length===1?``:`s`),1)]),U(`div`,zo,[(L(!0),W(A,null,G(K(l).context,e=>(L(),W(`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`},[j($,{text:e.text},null,8,[`text`]),U(`span`,{class:`ts ml-auto shrink-0 select-none font-mono text-xs text-dimmed`,title:ke(e.at)},q(Oe(e.at)),9,Bo)]))),128))])])):R(``,!0),U(`h2`,Vo,[t[9]||=U(`span`,null,`This run`,-1),he.value>0?(L(),W(`span`,Ho,`· `+q(he.value)+` step`+q(he.value===1?``:`s`),1)):R(``,!0),U(`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":K(l).allOpen?`true`:`false`,"data-open":K(l).allOpen?`1`:`0`,title:K(l).allOpen?`Close every call card`:`Open every call card`,onClick:me},q(K(l).allOpen?`Collapse all`:`Expand all`),9,Uo)]),ie.value?(L(),N(si,{key:4,vm:ie.value,"events-href":K(ae),onReveal:oe},null,8,[`vm`,`events-href`])):R(``,!0),U(`ol`,Wo,[K(l).placeholder?(L(),W(`li`,Go,`Waiting for activity…`)):R(``,!0),(L(!0),W(A,null,G(K(l).log,e=>(L(),W(A,{key:e.key},[e.kind===`step`?(L(),N(Nr,{key:0,step:e,class:`mt-5 first:mt-0`,onToggleGroup:t=>K(s).toggleGroup(e)},null,8,[`step`,`onToggleGroup`])):e.kind===`turn`?(L(),W(`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`},[U(`div`,qo,[U(`span`,{class:J([`thought`,e.turn.quick?``:`text-warn`]),title:e.turn.label},`thought `+q(e.turn.chip),11,Jo),e.turn.switched?(L(),W(`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}`},`⇄ `+q(K(On)(e.turn.model)),9,Yo)):e.turn.showModel?(L(),W(`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},q(K(On)(e.turn.model)),9,Xo)):R(``,!0),(L(!0),W(A,null,G(e.turn.facts,(e,t)=>(L(),W(`span`,{key:t,class:`fact`},q(e),1))),128)),e.note?(L(),W(`span`,Zo,q(e.note),1)):R(``,!0),e.turn.at===void 0?R(``,!0):(L(),W(`span`,{key:3,class:`ts ml-auto select-none`,title:K(Z)(e.turn.at)},q(K(yt)(e.turn.at)),9,Qo))])],8,Ko)):e.kind===`span`?(L(),N(zr,{key:2,item:e},null,8,[`item`])):e.kind===`phase`?(L(),W(`li`,{key:3,class:`phase py-0.5 font-mono text-xs`,"data-phase":e.phase},[U(`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:k(t=>K(s).togglePhase(e),[`prevent`])},[U(`span`,ts,q(e.open?`▾`:`▸`),1),U(`span`,{class:J([`swatch inline-block size-2 shrink-0 self-center rounded-[2px]`,K(Hr)(e.phase)]),"aria-hidden":`true`},null,2),U(`span`,ns,q(K(un)(e)),1)],8,es),e.open?(L(),W(`ul`,rs,[(L(!0),W(A,null,G(e.rows,e=>(L(),N(zr,{key:e.key,item:e},null,8,[`item`]))),128))])):R(``,!0)],8,$o)):e.kind===`followup`?(L(),W(`li`,is,[U(`h2`,as,[t[10]||=U(`span`,null,`↪ Follow-up`,-1),e.input.source?.user?(L(),W(`span`,os,[we(e.input.source.url)?(L(),W(`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`},q(e.input.source.user),9,ss)):(L(),W(`span`,cs,q(e.input.source.user),1))])):R(``,!0),U(`span`,{class:`ts ml-auto select-none text-xs font-normal normal-case tracking-normal text-dimmed`,title:ke(e.input.at)},q(Oe(e.input.at)),9,ls)]),j($,{text:e.input.text},null,8,[`text`]),e.input.files.length>0?(L(),N(Gn,{key:0,files:e.input.files},null,8,[`files`])):R(``,!0)])):(L(),W(`li`,{key:5,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`])},[U(`span`,null,q((e.replay?`… `:`⏱ `)+e.text),1),e.at===void 0?R(``,!0):(L(),W(`span`,{key:0,class:`ts ml-auto select-none font-mono text-xs text-dimmed`,title:K(Z)(e.at)},q(K(yt)(e.at)),9,us))],2))],64))),128)),fe.value?.kind===`thinking`?(L(),W(`li`,ds,[t[11]||=U(`span`,{class:`pulse text-[1.1em] leading-none text-info motion-safe:animate-pulse`},`∿`,-1),U(`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:K(l).model??void 0},q(K(On)(K(l).model)),9,fs),U(`span`,ps,q(P.value)+`…`,1),U(`span`,{class:J([`since ml-auto shrink-0 font-mono text-xs tabular-nums`,fe.value.slow?`text-warn`:`text-dimmed`])},q(K(X)(fe.value.elapsedMs,`clock`)),3)])):R(``,!0),U(`li`,{ref_key:`logEnd`,ref:ge,"aria-hidden":`true`},null,512)]),K(l).reply&&!K(i)?(L(),N(pi,{key:5,position:`last`,text:K(l).reply.text,caption:De.value,when:Oe(K(l).reply.at),"when-title":ke(K(l).reply.at),files:K(l).reply.files},null,8,[`text`,`caption`,`when`,`when-title`,`files`])):R(``,!0)]),j(c,{open:ve.value,"onUpdate:open":t[3]||=e=>ve.value=e,title:K(Ri)(K(I).state),ui:{overlay:`z-30`,content:`z-30 w-[min(96vw,90rem)] max-w-none`}},{content:C(({close:e})=>[j(uo,{data:K(I).state,abridge:K(ye),closable:``,onClose:t=>e()},null,8,[`data`,`abridge`,`onClose`])]),_:1},8,[`open`,`title`])]),_:1},8,[`title`])}}}),hs=Y({__name:`RunRoutePage`,setup(e){let t=ae(De,null);return(e,n)=>!K(t)||K(t).page===`runNotFound`?(L(),N(ze,{key:0})):(L(),N(ms,{key:1}))}});export{hs as default};
|