@coreplane/switchboard 1.265.0 → 1.266.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/.env.example +6 -0
- package/dist/assets/deploy/cloudflare/depotCi.ts +246 -0
- package/dist/assets/deploy/cloudflare/worker.ts +16 -0
- package/dist/assets/deploy/secrets.manifest.json +13 -1
- package/dist/assets/package-lock.json +3 -3
- package/dist/assets/package.json +1 -1
- package/dist/assets/source.json +3 -3
- package/dist/assets/src/core/depotCi.ts +72 -0
- package/dist/assets/src/core/publicationPush.ts +173 -0
- package/dist/assets/src/core/refusal.ts +1 -0
- package/dist/assets/src/core/runEvents.ts +11 -0
- package/dist/assets/web/dist/.vite/manifest.json +30 -30
- package/dist/assets/web/dist/assets/{HomePage-CBQpcnaW.js → HomePage-B2Y-Fa9V.js} +1 -1
- package/dist/assets/web/dist/assets/{ResidentDetailPage-C-SgOUTl.js → ResidentDetailPage-DRNwx2--.js} +1 -1
- package/dist/assets/web/dist/assets/{ResidentsIndexPage-CiDhvXok.js → ResidentsIndexPage-EHKMtX69.js} +1 -1
- package/dist/assets/web/dist/assets/{RunFoldRow-DZ8huwUU.js → RunFoldRow-CAdpX4Gn.js} +1 -1
- package/dist/assets/web/dist/assets/{RunRoutePage-Cp6wicYc.js → RunRoutePage-DppLhu79.js} +3 -3
- package/dist/assets/web/dist/assets/{RunsIndexPage-BPXtfwwx.js → RunsIndexPage-C7hx5O1X.js} +1 -1
- package/dist/assets/web/dist/assets/{ScheduledPage-DbvP48HI.js → ScheduledPage-Dk2kMnYT.js} +1 -1
- package/dist/assets/web/dist/assets/{SettingsPage-B87lZaiN.js → SettingsPage-DAf6R383.js} +1 -1
- package/dist/assets/web/dist/assets/{StatusDot-CFLn-DZ2.js → StatusDot-IkfsHGXg.js} +1 -1
- package/dist/assets/web/dist/assets/{Tooltip-Dx9YBVEx.js → Tooltip-CmQVfAl2.js} +1 -1
- package/dist/assets/web/dist/assets/{UnitRoutePage-d4A2X_o7.js → UnitRoutePage-BjfuZVWr.js} +1 -1
- package/dist/assets/web/dist/assets/{dist-Cn51vWpw.js → dist-Dg6HTzpQ.js} +1 -1
- package/dist/assets/web/dist/assets/main-Bk1L-bNk.js +28 -0
- package/dist/assets/web/dist/assets/main-DPB0UO1-.css +1 -0
- package/dist/cli.js +1396 -679
- package/package.json +1 -1
- package/dist/assets/web/dist/assets/main-DGC6WFqS.css +0 -1
- package/dist/assets/web/dist/assets/main-DYwRHh0F.js +0 -28
|
@@ -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-Dg6HTzpQ.js",
|
|
32
32
|
"name": "dist",
|
|
33
33
|
"src": "../node_modules/@pierre/diffs/dist/index.js",
|
|
34
34
|
"isDynamicEntry": true,
|
|
@@ -2581,8 +2581,8 @@
|
|
|
2581
2581
|
"_sseReplay-DGRDRLua.js"
|
|
2582
2582
|
]
|
|
2583
2583
|
},
|
|
2584
|
-
"_RunFoldRow-
|
|
2585
|
-
"file": "assets/RunFoldRow-
|
|
2584
|
+
"_RunFoldRow-CAdpX4Gn.js": {
|
|
2585
|
+
"file": "assets/RunFoldRow-CAdpX4Gn.js",
|
|
2586
2586
|
"name": "RunFoldRow",
|
|
2587
2587
|
"imports": [
|
|
2588
2588
|
"_browser-CCImen5O.js",
|
|
@@ -2592,7 +2592,7 @@
|
|
|
2592
2592
|
"_SlackMark-DB0MGiF5.js",
|
|
2593
2593
|
"_sseReplay-DGRDRLua.js",
|
|
2594
2594
|
"_durationTone-CVpX_yIk.js",
|
|
2595
|
-
"_StatusDot-
|
|
2595
|
+
"_StatusDot-IkfsHGXg.js"
|
|
2596
2596
|
]
|
|
2597
2597
|
},
|
|
2598
2598
|
"_RunsTabs-C7Ua3XX5.js": {
|
|
@@ -2632,16 +2632,16 @@
|
|
|
2632
2632
|
"_browser-CCImen5O.js"
|
|
2633
2633
|
]
|
|
2634
2634
|
},
|
|
2635
|
-
"_StatusDot-
|
|
2636
|
-
"file": "assets/StatusDot-
|
|
2635
|
+
"_StatusDot-IkfsHGXg.js": {
|
|
2636
|
+
"file": "assets/StatusDot-IkfsHGXg.js",
|
|
2637
2637
|
"name": "StatusDot",
|
|
2638
2638
|
"imports": [
|
|
2639
2639
|
"_browser-CCImen5O.js",
|
|
2640
|
-
"_Tooltip-
|
|
2640
|
+
"_Tooltip-CmQVfAl2.js"
|
|
2641
2641
|
]
|
|
2642
2642
|
},
|
|
2643
|
-
"_Tooltip-
|
|
2644
|
-
"file": "assets/Tooltip-
|
|
2643
|
+
"_Tooltip-CmQVfAl2.js": {
|
|
2644
|
+
"file": "assets/Tooltip-CmQVfAl2.js",
|
|
2645
2645
|
"name": "Tooltip",
|
|
2646
2646
|
"imports": [
|
|
2647
2647
|
"_AppShell-DPJVhUGP.js",
|
|
@@ -2888,7 +2888,7 @@
|
|
|
2888
2888
|
]
|
|
2889
2889
|
},
|
|
2890
2890
|
"src/main.ts": {
|
|
2891
|
-
"file": "assets/main-
|
|
2891
|
+
"file": "assets/main-Bk1L-bNk.js",
|
|
2892
2892
|
"name": "main",
|
|
2893
2893
|
"src": "src/main.ts",
|
|
2894
2894
|
"isEntry": true,
|
|
@@ -2911,7 +2911,7 @@
|
|
|
2911
2911
|
"_NotFoundPage-CDjMfCcj.js"
|
|
2912
2912
|
],
|
|
2913
2913
|
"css": [
|
|
2914
|
-
"assets/main-
|
|
2914
|
+
"assets/main-DPB0UO1-.css"
|
|
2915
2915
|
],
|
|
2916
2916
|
"assets": [
|
|
2917
2917
|
"assets/instrument-sans-latin-ext-wght-normal-B5bTHO_g.woff2",
|
|
@@ -2951,14 +2951,14 @@
|
|
|
2951
2951
|
]
|
|
2952
2952
|
},
|
|
2953
2953
|
"src/pages/HomePage.vue": {
|
|
2954
|
-
"file": "assets/HomePage-
|
|
2954
|
+
"file": "assets/HomePage-B2Y-Fa9V.js",
|
|
2955
2955
|
"name": "HomePage",
|
|
2956
2956
|
"src": "src/pages/HomePage.vue",
|
|
2957
2957
|
"isDynamicEntry": true,
|
|
2958
2958
|
"imports": [
|
|
2959
2959
|
"_AppShell-DPJVhUGP.js",
|
|
2960
2960
|
"_browser-CCImen5O.js",
|
|
2961
|
-
"_Tooltip-
|
|
2961
|
+
"_Tooltip-CmQVfAl2.js",
|
|
2962
2962
|
"_PendingTurnRow-DIC86uWA.js",
|
|
2963
2963
|
"src/main.ts",
|
|
2964
2964
|
"_eventSource-Cv0AFlMi.js",
|
|
@@ -2999,7 +2999,7 @@
|
|
|
2999
2999
|
]
|
|
3000
3000
|
},
|
|
3001
3001
|
"src/pages/ResidentDetailPage.vue": {
|
|
3002
|
-
"file": "assets/ResidentDetailPage-
|
|
3002
|
+
"file": "assets/ResidentDetailPage-DRNwx2--.js",
|
|
3003
3003
|
"name": "ResidentDetailPage",
|
|
3004
3004
|
"src": "src/pages/ResidentDetailPage.vue",
|
|
3005
3005
|
"isDynamicEntry": true,
|
|
@@ -3007,36 +3007,36 @@
|
|
|
3007
3007
|
"_AppShell-DPJVhUGP.js",
|
|
3008
3008
|
"_browser-CCImen5O.js",
|
|
3009
3009
|
"src/main.ts",
|
|
3010
|
-
"_StatusDot-
|
|
3010
|
+
"_StatusDot-IkfsHGXg.js"
|
|
3011
3011
|
]
|
|
3012
3012
|
},
|
|
3013
3013
|
"src/pages/ResidentsIndexPage.vue": {
|
|
3014
|
-
"file": "assets/ResidentsIndexPage-
|
|
3014
|
+
"file": "assets/ResidentsIndexPage-EHKMtX69.js",
|
|
3015
3015
|
"name": "ResidentsIndexPage",
|
|
3016
3016
|
"src": "src/pages/ResidentsIndexPage.vue",
|
|
3017
3017
|
"isDynamicEntry": true,
|
|
3018
3018
|
"imports": [
|
|
3019
3019
|
"_AppShell-DPJVhUGP.js",
|
|
3020
3020
|
"_browser-CCImen5O.js",
|
|
3021
|
-
"_Tooltip-
|
|
3021
|
+
"_Tooltip-CmQVfAl2.js",
|
|
3022
3022
|
"src/main.ts",
|
|
3023
3023
|
"_eventSource-Cv0AFlMi.js",
|
|
3024
3024
|
"_wallClock-x0hjr0J_.js",
|
|
3025
3025
|
"_indexFormat-B-pd4r7Y.js",
|
|
3026
3026
|
"_indexRow-BsWcHHVh.js",
|
|
3027
3027
|
"_format-BldUwl_R.js",
|
|
3028
|
-
"_StatusDot-
|
|
3028
|
+
"_StatusDot-IkfsHGXg.js"
|
|
3029
3029
|
]
|
|
3030
3030
|
},
|
|
3031
3031
|
"src/pages/RunRoutePage.vue": {
|
|
3032
|
-
"file": "assets/RunRoutePage-
|
|
3032
|
+
"file": "assets/RunRoutePage-DppLhu79.js",
|
|
3033
3033
|
"name": "RunRoutePage",
|
|
3034
3034
|
"src": "src/pages/RunRoutePage.vue",
|
|
3035
3035
|
"isDynamicEntry": true,
|
|
3036
3036
|
"imports": [
|
|
3037
3037
|
"_AppShell-DPJVhUGP.js",
|
|
3038
3038
|
"_browser-CCImen5O.js",
|
|
3039
|
-
"_Tooltip-
|
|
3039
|
+
"_Tooltip-CmQVfAl2.js",
|
|
3040
3040
|
"_PendingTurnRow-DIC86uWA.js",
|
|
3041
3041
|
"src/main.ts",
|
|
3042
3042
|
"_eventSource-Cv0AFlMi.js",
|
|
@@ -3044,7 +3044,7 @@
|
|
|
3044
3044
|
"_indexFormat-B-pd4r7Y.js",
|
|
3045
3045
|
"_indexRow-BsWcHHVh.js",
|
|
3046
3046
|
"_format-BldUwl_R.js",
|
|
3047
|
-
"_RunFoldRow-
|
|
3047
|
+
"_RunFoldRow-CAdpX4Gn.js",
|
|
3048
3048
|
"_SlackMark-DB0MGiF5.js",
|
|
3049
3049
|
"_sseReplay-DGRDRLua.js",
|
|
3050
3050
|
"_durationTone-CVpX_yIk.js",
|
|
@@ -3058,14 +3058,14 @@
|
|
|
3058
3058
|
]
|
|
3059
3059
|
},
|
|
3060
3060
|
"src/pages/RunsIndexPage.vue": {
|
|
3061
|
-
"file": "assets/RunsIndexPage-
|
|
3061
|
+
"file": "assets/RunsIndexPage-C7hx5O1X.js",
|
|
3062
3062
|
"name": "RunsIndexPage",
|
|
3063
3063
|
"src": "src/pages/RunsIndexPage.vue",
|
|
3064
3064
|
"isDynamicEntry": true,
|
|
3065
3065
|
"imports": [
|
|
3066
3066
|
"_AppShell-DPJVhUGP.js",
|
|
3067
3067
|
"_browser-CCImen5O.js",
|
|
3068
|
-
"_Tooltip-
|
|
3068
|
+
"_Tooltip-CmQVfAl2.js",
|
|
3069
3069
|
"_InputMenu-BRV35UWP.js",
|
|
3070
3070
|
"src/main.ts",
|
|
3071
3071
|
"_eventSource-Cv0AFlMi.js",
|
|
@@ -3076,18 +3076,18 @@
|
|
|
3076
3076
|
"_SlackMark-DB0MGiF5.js",
|
|
3077
3077
|
"_durationTone-CVpX_yIk.js",
|
|
3078
3078
|
"_RunsTabs-C7Ua3XX5.js",
|
|
3079
|
-
"_StatusDot-
|
|
3079
|
+
"_StatusDot-IkfsHGXg.js"
|
|
3080
3080
|
]
|
|
3081
3081
|
},
|
|
3082
3082
|
"src/pages/ScheduledPage.vue": {
|
|
3083
|
-
"file": "assets/ScheduledPage-
|
|
3083
|
+
"file": "assets/ScheduledPage-Dk2kMnYT.js",
|
|
3084
3084
|
"name": "ScheduledPage",
|
|
3085
3085
|
"src": "src/pages/ScheduledPage.vue",
|
|
3086
3086
|
"isDynamicEntry": true,
|
|
3087
3087
|
"imports": [
|
|
3088
3088
|
"_AppShell-DPJVhUGP.js",
|
|
3089
3089
|
"_browser-CCImen5O.js",
|
|
3090
|
-
"_Tooltip-
|
|
3090
|
+
"_Tooltip-CmQVfAl2.js",
|
|
3091
3091
|
"_wallClock-x0hjr0J_.js",
|
|
3092
3092
|
"_indexFormat-B-pd4r7Y.js",
|
|
3093
3093
|
"_format-BldUwl_R.js",
|
|
@@ -3095,7 +3095,7 @@
|
|
|
3095
3095
|
]
|
|
3096
3096
|
},
|
|
3097
3097
|
"src/pages/SettingsPage.vue": {
|
|
3098
|
-
"file": "assets/SettingsPage-
|
|
3098
|
+
"file": "assets/SettingsPage-DAf6R383.js",
|
|
3099
3099
|
"name": "SettingsPage",
|
|
3100
3100
|
"src": "src/pages/SettingsPage.vue",
|
|
3101
3101
|
"isDynamicEntry": true,
|
|
@@ -3103,14 +3103,14 @@
|
|
|
3103
3103
|
"_AppShell-DPJVhUGP.js",
|
|
3104
3104
|
"_browser-CCImen5O.js",
|
|
3105
3105
|
"_SettingSelect-CEeA4iuC.js",
|
|
3106
|
-
"_Tooltip-
|
|
3106
|
+
"_Tooltip-CmQVfAl2.js",
|
|
3107
3107
|
"_InputMenu-BRV35UWP.js",
|
|
3108
3108
|
"_settingsApi-Dm6eaQcu.js",
|
|
3109
3109
|
"_indexRow-BsWcHHVh.js"
|
|
3110
3110
|
]
|
|
3111
3111
|
},
|
|
3112
3112
|
"src/pages/UnitRoutePage.vue": {
|
|
3113
|
-
"file": "assets/UnitRoutePage-
|
|
3113
|
+
"file": "assets/UnitRoutePage-BjfuZVWr.js",
|
|
3114
3114
|
"name": "UnitRoutePage",
|
|
3115
3115
|
"src": "src/pages/UnitRoutePage.vue",
|
|
3116
3116
|
"isDynamicEntry": true,
|
|
@@ -3122,7 +3122,7 @@
|
|
|
3122
3122
|
"_indexFormat-B-pd4r7Y.js",
|
|
3123
3123
|
"_indexRow-BsWcHHVh.js",
|
|
3124
3124
|
"_format-BldUwl_R.js",
|
|
3125
|
-
"_RunFoldRow-
|
|
3125
|
+
"_RunFoldRow-CAdpX4Gn.js",
|
|
3126
3126
|
"_SlackMark-DB0MGiF5.js",
|
|
3127
3127
|
"_sseReplay-DGRDRLua.js",
|
|
3128
3128
|
"_NotFoundPage-CDjMfCcj.js"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,r as t,t as n}from"./AppShell-DPJVhUGP.js";import{An as r,Cn as i,Cr as a,Ft as o,Gr as s,Ii as c,Li as l,Mn as u,Pi as d,Pt as ee,Qr as f,Sn as p,Tr as m,Xr as h,_r as g,bn as _,c as v,dr as te,en as ne,hr as re,ir as ie,ji as y,kn as b,l as ae,ln as x,o as oe,sr as se,t as S,wr as ce,xi as C,xn as w,y as T,yi as E,yn as D,yr as le}from"./browser-CCImen5O.js";import{t as O}from"./Tooltip-Dx9YBVEx.js";import{i as ue}from"./PendingTurnRow-DIC86uWA.js";import{b as de,x as fe}from"./main-DYwRHh0F.js";import{t as pe}from"./eventSource-Cv0AFlMi.js";import{t as me}from"./wallClock-x0hjr0J_.js";import{r as he}from"./indexFormat-B-pd4r7Y.js";import{K as ge,i as _e}from"./indexRow-BsWcHHVh.js";import"./format-BldUwl_R.js";import{S as k,_ as ve,a as ye,b as be,c as A,d as j,f as xe,g as Se,h as M,i as Ce,l as we,m as N,n as Te,o as Ee,p as De,r as Oe,s as P,t as ke,u as Ae,v as je,x as Me,y as Ne}from"./SilentTurn-CPED_XCV.js";import{t as F}from"./SlackMark-DB0MGiF5.js";import{T as Pe}from"./sseReplay-DGRDRLua.js";var I={class:`thread-tip flex max-w-xs flex-col gap-1 text-xs`},Fe={class:`tip-title leading-snug text-highlighted`},L={class:`flex flex-wrap items-center gap-x-1.5 gap-y-0.5 font-mono text-[0.68rem] text-muted`},Ie={class:`tip-when tabular-nums`},Le={class:`tip-source inline-flex items-center gap-1`},Re={class:`tip-runs`},ze={key:0,class:`tip-live inline-flex items-center gap-1 text-toned`},R=u({__name:`ThreadTip`,props:{row:{},now:{}},setup(e){let t=e,n=D(()=>k(t.row,t.now));return(t,r)=>(g(),i(`div`,I,[_(`p`,Fe,l(n.value.title),1),_(`p`,L,[_(`span`,Ie,l(n.value.when),1),r[1]||=_(`span`,{"aria-hidden":`true`},`·`,-1),_(`span`,Le,[e.row.surface===`slack`?(g(),w(F,{key:0})):p(``,!0),b(l(n.value.source),1)]),r[2]||=_(`span`,{"aria-hidden":`true`},`·`,-1),_(`span`,Re,l(n.value.runs),1),n.value.live?(g(),i(`span`,ze,[...r[0]||=[_(`span`,{class:`size-1.5 rounded-full bg-ok`,"aria-hidden":`true`},null,-1),b(`live`,-1)]])):p(``,!0)])]))}}),z={class:`rail flex flex-col gap-1 text-[0.8rem]`,"aria-label":`Recent threads`},B={class:`filter mb-2 flex items-center gap-2 rounded-lg border border-default px-2.5 py-1.5 transition-colors duration-150 ease-out focus-within:border-primary hover:border-accented`},V={key:0,class:`rounded border border-default px-1 font-mono text-[0.65rem] text-dimmed`},Be={key:0,class:`empty px-3 py-1 text-xs text-dimmed`},H={key:1,class:`nomatch px-3 py-1 text-xs text-dimmed`},U={key:0,class:`dot mt-px size-1.5 shrink-0 self-center rounded-full bg-ok motion-safe:animate-pulse`,"aria-label":`a run is in flight`},Ve={class:`title min-w-0 flex-1 truncate text-toned group-hover:text-highlighted group-aria-[current=page]:text-highlighted`},He={class:`when shrink-0 font-mono text-[0.7rem] tabular-nums text-dimmed`},W={class:`retention px-3 pt-1 text-[0.7rem] leading-relaxed text-dimmed`},G={class:`model px-3 pt-2 text-[0.7rem] leading-relaxed text-dimmed`,"data-testid":`what-is-a-thread`},K=500,Ue=u({__name:`ConversationRail`,props:{rows:{},current:{},now:{},retention:{}},setup(e,{expose:t}){let n=e,s=C(``),c=C(null),u=D(()=>N(n.rows,s.value));function d(){c.value?.focus(),c.value?.select()}function ee(e){e.key===`Escape`&&(s.value=``,c.value?.blur())}return t({focusFilter:d}),(t,n)=>{let d=T,v=m(`RouterLink`),te=O;return g(),i(`nav`,z,[r(v,{class:`new group mb-3 flex items-center gap-2 rounded-xl bg-inverted px-3 py-2 font-medium text-inverted no-underline transition-[transform,opacity] duration-150 ease-out hover:-translate-y-px hover:opacity-90 active:translate-y-0 active:opacity-100`,to:`/threads`,"aria-current":e.current===``?`page`:void 0,"data-testid":`new-thread`},{default:h(()=>[r(d,{name:`i-lucide-plus`,class:`size-4 shrink-0 transition-transform duration-150 ease-out group-hover:rotate-90`,"aria-hidden":`true`}),n[1]||=_(`span`,null,`New thread`,-1),n[2]||=_(`span`,{class:`kbd ml-auto flex gap-0.5 font-mono text-[0.65rem] opacity-70`,"aria-label":`shortcut shift command O`},[_(`kbd`,{class:`rounded border border-current/30 px-1`},`⇧`),_(`kbd`,{class:`rounded border border-current/30 px-1`},`⌘`),_(`kbd`,{class:`rounded border border-current/30 px-1`},`O`)],-1)]),_:1},8,[`aria-current`]),_(`label`,B,[r(d,{name:`i-lucide-search`,class:`size-3.5 shrink-0 text-dimmed`,"aria-hidden":`true`}),f(_(`input`,{ref_key:`filter`,ref:c,"onUpdate:modelValue":n[0]||=e=>s.value=e,class:`min-w-0 flex-1 bg-transparent text-[0.8rem] text-highlighted outline-none placeholder:text-dimmed`,type:`text`,placeholder:`Filter recent`,"aria-label":`Filter recent threads`,autocomplete:`off`,onKeydown:ee},null,544),[[ne,s.value]]),s.value?p(``,!0):(g(),i(`kbd`,V,`⌘K`))]),n[8]||=_(`p`,{class:`label px-3 pb-1 font-mono text-[0.65rem] font-medium uppercase tracking-wider text-dimmed`},`Recent`,-1),e.rows.length===0?(g(),i(`p`,Be,`Nothing yet. Ask something.`)):u.value.length===0?(g(),i(`p`,H,`Nothing matches "`+l(s.value)+`".`,1)):p(``,!0),r(o,{name:`sb-rise`,tag:`div`,class:`rows flex flex-col gap-0.5`},{default:h(()=>[(g(!0),i(x,null,a(u.value,t=>(g(),i(`div`,{key:t.id},[r(te,{"delay-duration":K,content:{side:`right`,sideOffset:12,align:`start`},ui:{content:`h-auto max-w-xs px-2.5 py-2`}},{content:h(()=>[r(R,{row:t,now:e.now},null,8,[`row`,`now`])]),default:h(()=>[r(v,{class:`row group relative flex items-baseline gap-2 rounded-lg px-3 py-1.5 no-underline transition-colors duration-150 ease-out hover:bg-(--ui-bg-muted) aria-[current=page]:bg-(--ui-bg-accented)`,to:`/threads/${encodeURIComponent(t.id)}`,"aria-current":t.id===e.current?`page`:void 0,"data-surface":t.surface},{default:h(()=>[n[3]||=_(`span`,{class:`bar absolute left-0 top-1/2 h-4 w-0.5 -translate-y-1/2 rounded-full bg-primary opacity-0 transition-opacity duration-150 ease-out group-aria-[current=page]:opacity-100`,"aria-hidden":`true`},null,-1),t.live?(g(),i(`span`,U)):p(``,!0),_(`span`,Ve,l(t.title),1),_(`span`,He,l(y(j)(t.lastAt,e.now)),1)]),_:2},1032,[`to`,`aria-current`,`data-surface`])]),_:2},1024)]))),128))]),_:1}),r(v,{class:`all mt-3 flex items-center gap-1.5 px-3 py-1 text-xs font-medium text-muted no-underline transition-colors duration-150 ease-out hover:text-highlighted`,to:`/runs`,"data-testid":`all-runs`},{default:h(()=>[n[4]||=b(` All runs `,-1),r(d,{name:`i-lucide-arrow-right`,class:`size-3 transition-transform duration-150 ease-out group-hover:translate-x-0.5`,"aria-hidden":`true`})]),_:1}),_(`p`,W,l(e.retention),1),_(`p`,G,[n[6]||=b(` A thread holds the runs its messages start. `,-1),r(v,{class:`text-muted hover:text-highlighted`,to:`/runs`},{default:h(()=>[...n[5]||=[b(`Runs`,-1)]]),_:1}),n[7]||=b(` lists every run across everyone's threads. `,-1)])])}}}),We={class:`empty mx-auto flex w-full max-w-2xl flex-col items-center gap-5 px-3 py-6 text-center`},Ge={class:`flex flex-col gap-1.5`},Ke={class:`greeting sb-stagger text-xl font-medium tracking-tight text-highlighted`,style:{"--sb-i":`1`}},qe={class:`sb-stagger w-full text-left`,style:{"--sb-i":`3`}},q={key:0,class:`chips flex flex-wrap justify-center gap-2`,"aria-label":`Suggestions`},J=[`onClick`],Je=u({__name:`EmptyState`,props:{name:{},hour:{},suggestions:{}},emits:[`pick`],setup(e,{emit:n}){let o=n;return(n,s)=>(g(),i(`section`,We,[r(t,{draw:``,idle:``,class:`mark-lg sb-stagger text-highlighted`,style:{"font-size":`3.25rem`,"--sb-i":`0`}}),_(`div`,Ge,[_(`h2`,Ke,l(y(M)(e.hour,e.name)),1),s[0]||=_(`p`,{class:`sub sb-stagger text-[0.875rem] text-muted`,style:{"--sb-i":`2`}},` Ask in plain words. The right agent picks it up, and you watch it work here. `,-1)]),_(`div`,qe,[ce(n.$slots,`default`)]),e.suggestions.length>0?(g(),i(`ul`,q,[(g(!0),i(x,null,a(e.suggestions,(e,t)=>(g(),i(`li`,{key:e,class:`sb-stagger`,style:c({"--sb-i":t+4})},[_(`button`,{type:`button`,class:`chip rounded-full border border-default px-3 py-1 text-[0.8rem] text-toned transition-[color,border-color,background-color,transform] duration-150 ease-out hover:-translate-y-px hover:border-accented hover:bg-(--ui-bg-muted) hover:text-highlighted focus-visible:outline-2 focus-visible:outline-primary active:translate-y-0`,onClick:t=>o(`pick`,e)},l(e),9,J)],4))),128))])):p(``,!0)]))}});function Ye(){return{runs:new Map,connected:!1}}function Xe(e,t){t.type===`upsert`&&t.run?t.run.finished||!t.run.threadKey?e.runs.delete(t.run.id):e.runs.set(t.run.id,{threadKey:t.run.threadKey,startedAt:t.run.startedAt,...t.run.label===void 0?{}:{label:t.run.label},...t.run.channelId===void 0?{}:{channelId:t.run.channelId}}):t.type===`removed`&&t.id&&e.runs.delete(t.id)}function Y(e){let t=new Map;for(let n of e.runs.values()){let e=t.get(n.threadKey)??[];e.push(n),t.set(n.threadKey,e)}return t}function Ze(e,t){return t.includes(`:`)?t:`${e}:${t}`}function Qe(e){let t=e.indexOf(`:`);return t>0?e.slice(0,t):`unknown`}function $e(e,t,n){if(!t.connected)return[...e];let r=Y(t),i=new Set,a=e.map(e=>{let t=Ze(n,e.id);i.add(t);let a=r.get(t);if(!a)return e.live?{...e,live:!1}:e;let o=e.live?0:a.length;return{...e,live:!0,runs:e.runs+o,lastAt:Math.max(e.lastAt,...a.map(e=>e.startedAt))}}),o=[];for(let[e,t]of r){if(i.has(e))continue;let r=t.reduce((e,t)=>t.startedAt>e.startedAt?t:e),a=r.label?he(r.label).snippet:void 0;o.push({id:e.startsWith(`${n}:`)?e.slice(n.length+1):e,title:a??r.label??e,excerpt:a??r.label??e,lastAt:r.startedAt,runs:t.length,live:!0,surface:Qe(r.channelId??e)})}return o.sort((e,t)=>t.lastAt-e.lastAt),[...o,...a]}var et={key:0,class:`mx-auto my-12 max-w-xl text-center text-toned`},tt=[`data-rail`],nt={key:0,class:`relative hidden md:block`},rt=[`aria-valuemin`,`aria-valuemax`,`aria-valuenow`],it={class:`thread mx-auto flex min-h-[calc(100vh-8rem)] w-full max-w-3xl flex-col`},at={key:4,class:`inline text-[0.875rem] text-toned`,"data-testid":`inline`},ot={key:2,class:`elsewhere sticky bottom-0 z-10 -mx-3 mt-auto bg-default/85 px-3 py-4 text-center text-[0.8rem] text-toned backdrop-blur sm:-mx-5 sm:px-5`,"data-testid":`elsewhere`},st=[`href`],ct={key:3,class:`composer-dock sticky bottom-0 z-10 -mx-3 mt-auto bg-default/85 px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-3 backdrop-blur sm:-mx-5 sm:px-5`},X=`(min-width: 48rem)`,Z=u({__name:`HomePage`,setup(t){let u=oe(`home`),f=me(u?.now),m=u?.conversation??``,ne=v(u?.retentionDays??null),ce=0,T=e=>`${e}-${++ce}`,O=E([]);for(let e of u?.turns??[]){if(`kind`in e){e.kind===`receipt`?O.push({key:T(`s`),kind:`silent`,reason:e.reason,at:e.decidedAt}):O.push({key:T(`w`),kind:`parent`,turn:e});continue}O.push({key:T(`p`),kind:`person`,text:e.request,at:e.receivedAt??e.startedAt,pending:!1});let t=!e.finished&&e.token?{eventsUrl:`/runs/${encodeURIComponent(e.id)}/events?t=${e.token}`,stopUrl:`/runs/${encodeURIComponent(e.id)}/stop?t=${e.token}`,serverNow:u?.now}:null;O.push({key:T(`a`),kind:`assistant`,turn:e,live:t,ended:e.finished})}let he=D(()=>{for(let e=O.length-1;e>=0;e--){let t=O[e];if(t.kind===`assistant`&&t.live&&!t.ended&&t.turn.hosted!==!0)return t}return null}),k=C(null),j=C(0);le(e,j);let M=C(``),N=C(void 0),F=D(()=>xe(he.value!==null,M.value)),I=C(!1);s(M,()=>{N.value&&M.value===``&&(N.value=void 0)});function Fe(e){M.value=e,L()}async function L(){if(!u||I.value)return;let e=Ee(M.value.trim(),u.commands);if(e===``)return;let t=E({key:T(`p`),kind:`person`,text:e,at:f.value,pending:!0});O.push(t),M.value=``,N.value=void 0,I.value=!0,j.value++;try{let n=await fetch(u.sendUrl,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`},body:JSON.stringify({text:e})}),r=await n.json().catch(()=>({}));if(n.status===202&&typeof r.viewPath==`string`&&typeof r.runId==`string`){let n=Se(r.viewPath);if(!n)throw Error(`the run's view path was not one`);t.pending=!1,S.pathname()===`/threads`&&S.replaceUrl(`/threads/${encodeURIComponent(m)}`),O.push({key:T(`a`),kind:`assistant`,turn:{id:r.runId,request:e,startedAt:f.value,receivedAt:f.value,finished:!1,eventCount:0},live:{eventsUrl:n.eventsUrl,stopUrl:n.stopUrl},ended:!1});return}if(n.ok&&r.offer&&typeof r.offer.line==`string`){t.pending=!1;let e=je({line:r.offer.line,...r.offer});M.value=e.command,N.value=e.hint;return}if(n.ok&&typeof r.reply==`string`){t.pending=!1;let e=Ae(r.reply);e.kind===`inline`&&O.push({key:T(`i`),kind:`inline`,text:e.text});return}throw Error(r.error??`HTTP ${n.status}`)}catch(e){t.pending=!1,t.failed=`not sent: ${e instanceof Error?e.message:`error`}`}finally{I.value=!1}}function Ie(){let e=k.value;e&&fetch(`${e}${e.includes(`?`)?`&`:`?`}mode=soft`,{method:`POST`,credentials:`same-origin`})}function Le(e,t,n){let r=O.filter(e=>e.kind===`person`),i=ve(r.map(e=>({text:e.text,folded:e.folded!==void 0,ref:e})),t);if(!i)return;let a=e.turn.receivedAt??e.turn.startedAt;i.ref.folded=n===void 0?``:`at ${ge(Math.max(0,n-a),`clock`)}`}function Re(e){e.ended=!0,k.value=null}let ze=Ne({width:S.readPref(P.width),collapsed:S.readPref(P.collapsed)}),R=C(ze.width),z=C(ze.collapsed),B=C(!1),V=C(S.mediaMatches(X)),Be=S.onMediaChange(X,e=>{V.value=e}),H=C(null),U=C(null),Ve=D(()=>V.value?z.value?`Show recent threads`:`Hide recent threads`:`Recent threads`);function He(){if(V.value=S.mediaMatches(X),V.value){z.value=!z.value,S.writePref(P.collapsed,z.value?`1`:`0`);return}B.value=!0}function W(e,t){R.value=we(e),t&&S.writePref(P.width,String(R.value))}let G=null;function K(e){G&&W(G.startWidth+(e.clientX-G.startX),!1)}function We(){window.removeEventListener(`pointermove`,K),G&&(G=null,S.writePref(P.width,String(R.value)))}function Ge(e){e.button===0&&(e.preventDefault(),G={startX:e.clientX,startWidth:R.value},e.currentTarget?.setPointerCapture?.(e.pointerId),window.addEventListener(`pointermove`,K),window.addEventListener(`pointerup`,We,{once:!0}))}function Ke(e){if(e.key===`ArrowRight`)W(R.value+A.step,!0);else if(e.key===`ArrowLeft`)W(R.value-A.step,!0);else if(e.key===`Home`)W(A.min,!0);else if(e.key===`End`)W(A.max,!0);else return;e.preventDefault()}se(()=>{window.removeEventListener(`pointermove`,K),window.removeEventListener(`pointerup`,We),Be()});function qe(e){let t=be(e);if(t){if(e.preventDefault(),t===`newThread`){S.navigate(`/threads`);return}if(H.value){H.value.focusFilter();return}if(z.value&&S.mediaMatches(X)){z.value=!1,S.writePref(P.collapsed,`0`),ie().then(()=>H.value?.focusFilter());return}B.value=!0,ie().then(()=>U.value?.focusFilter())}}let q=C(null),J=C(!1);function Y(){return document.body.scrollHeight-(window.innerHeight+window.scrollY)}s(()=>O.length,()=>{let e=Me(Y());ie().then(()=>{e?q.value?.scrollIntoView?.({block:`end`}):J.value=!0})});function Ze(){Me(Y())&&(J.value=!1)}function Qe(){q.value?.scrollIntoView?.({block:`end`,behavior:`smooth`}),J.value=!1}te(()=>{window.addEventListener(`scroll`,Ze,{passive:!0}),window.addEventListener(`keydown`,qe),u&&ft()}),re(()=>{window.removeEventListener(`scroll`,Ze),window.removeEventListener(`keydown`,qe),Q?.close()});let Z=E(Ye()),lt=D(()=>$e(u?.conversations??[],Z,u?.lane??``)),ut=D(()=>{let e=he.value?.turn.id;return Z.runs.size+(e&&!Z.runs.has(e)?1:0)}),dt=pe(),Q=null;function ft(){Q=dt(`/runs?stream=1&mine=1`);let e=!1;Q.onopen=()=>{e&&Z.runs.clear(),e=!0,Z.connected=!0},Q.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}Xe(Z,t)}}let pt=D(()=>{let e=O.find(e=>e.kind===`person`);return e?De(e.text):`Switchboard`});s([pt,ut],([e,t])=>{S.setTitle(t>0?`(${t}) ${e}`:e),S.setFavicon(t>0?fe:de)},{immediate:!0});let mt=D(()=>new Date(f.value).getHours()),ht=D(()=>O.length===0),$=u?.elsewhere,gt=$?$.surface===`web`?`This thread is another person's conversation. You can read it here.`:`This thread lives in ${_e[$.surface]??$.surface}.`:``;return(e,t)=>{let s=ae,v=ue;return g(),w(n,{title:`Threads`,nav:`home`},{leading:h(()=>[r(s,{class:`rail-toggle -ml-1`,size:`xs`,color:`neutral`,variant:`ghost`,icon:V.value&&!z.value?`i-lucide-panel-left-close`:`i-lucide-panel-left`,"aria-label":Ve.value,"aria-expanded":V.value?!z.value:void 0,onClick:He},null,8,[`icon`,`aria-label`,`aria-expanded`])]),default:h(()=>[y(u)?(g(),i(`div`,{key:1,class:d([`home gap-8 md:grid`,z.value?`md:grid-cols-[minmax(0,1fr)]`:`md:grid-cols-[var(--rail-w)_minmax(0,1fr)]`]),style:c({"--rail-w":`${R.value}px`}),"data-rail":z.value?`hidden`:`shown`},[z.value?p(``,!0):(g(),i(`aside`,nt,[r(Ue,{ref_key:`rail`,ref:H,class:`sticky top-20`,rows:lt.value,current:y(m),now:y(f),retention:y(ne)},null,8,[`rows`,`current`,`now`,`retention`]),_(`div`,{class:`handle group/handle absolute inset-y-0 -right-5 flex w-3 cursor-col-resize touch-none select-none justify-center outline-none`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the recent threads column`,"aria-valuemin":y(A).min,"aria-valuemax":y(A).max,"aria-valuenow":R.value,tabindex:`0`,"data-testid":`rail-handle`,onPointerdown:Ge,onKeydown:Ke,onDblclick:t[0]||=e=>W(y(A).default,!0)},[...t[5]||=[_(`span`,{class:`w-px rounded-full bg-(--ui-border-accented) opacity-0 transition-opacity duration-150 ease-out group-hover/handle:opacity-100 group-focus-visible/handle:opacity-100`,"aria-hidden":`true`},null,-1)]],40,rt)])),r(v,{open:B.value,"onUpdate:open":t[1]||=e=>B.value=e,side:`left`,title:`Recent threads`,ui:{content:`max-w-xs`}},{body:h(()=>[r(Ue,{ref_key:`sheetRail`,ref:U,rows:lt.value,current:y(m),now:y(f),retention:y(ne)},null,8,[`rows`,`current`,`now`,`retention`])]),_:1},8,[`open`]),_(`section`,it,[ht.value?(g(),w(Je,{key:0,class:`mb-auto mt-[clamp(1.5rem,14vh,9rem)]`,name:y(u).viewer.name,hour:mt.value,suggestions:y(u).suggestions,onPick:Fe},{default:h(()=>[r(ye,{modelValue:M.value,"onUpdate:modelValue":t[2]||=e=>M.value=e,mode:F.value,hint:N.value,commands:y(u).commands,autofocus:``,"sweep-on-mount":``,onSubmit:L,onStop:Ie},null,8,[`modelValue`,`mode`,`hint`,`commands`])]),_:1},8,[`name`,`hour`,`suggestions`])):(g(),w(o,{key:1,name:`sb-rise`,"move-class":`sb-move-move`,tag:`ol`,class:`transcript m-0 flex list-none flex-col gap-6 p-0 pb-32 pt-2`},{default:h(()=>[(g(!0),i(x,null,a(O,e=>(g(),i(`li`,{key:e.key},[e.kind===`person`?(g(),w(Ce,{key:0,text:e.text,at:e.at,now:y(f),pending:e.pending,folded:e.folded,failed:e.failed},null,8,[`text`,`at`,`now`,`pending`,`folded`,`failed`])):e.kind===`assistant`?(g(),w(Oe,{key:1,turn:e.turn,live:e.live,now:y(f),onInput:(t,n)=>Le(e,t,n),onEnded:t=>Re(e),onStop:t[3]||=e=>k.value=e},null,8,[`turn`,`live`,`now`,`onInput`,`onEnded`])):e.kind===`silent`?(g(),w(ke,{key:2,reason:e.reason,"decided-at":e.at,now:y(f)},null,8,[`reason`,`decided-at`,`now`])):e.kind===`parent`?(g(),w(Te,{key:3,turn:e.turn,now:y(f)},null,8,[`turn`,`now`])):(g(),i(`div`,at,[r(Pe,{text:e.text},null,8,[`text`])]))]))),128))]),_:1})),_(`div`,{ref_key:`end`,ref:q,class:`end`,"aria-hidden":`true`},null,512),!ht.value&&y($)?(g(),i(`p`,ot,[b(l(y(gt))+` `,1),y($).url?(g(),i(`a`,{key:0,href:y($).url,target:`_blank`,rel:`noopener`,class:`text-highlighted`},`Reply there ↗`,8,st)):y($).surface===`web`?p(``,!0):(g(),i(x,{key:1},[b(`Reply there.`)],64))])):ht.value?p(``,!0):(g(),i(`div`,ct,[r(ee,{name:`sb-rise`},{default:h(()=>[J.value?(g(),i(`button`,{key:0,type:`button`,class:`new-pill absolute -top-9 left-1/2 -translate-x-1/2 rounded-full border border-default bg-(--ui-bg-elevated) px-3 py-1 font-mono text-[0.7rem] text-toned shadow-sm hover:text-highlighted`,onClick:Qe},` ↓ new `)):p(``,!0)]),_:1}),r(ye,{modelValue:M.value,"onUpdate:modelValue":t[4]||=e=>M.value=e,mode:F.value,hint:N.value,commands:y(u).commands,autofocus:``,onSubmit:L,onStop:Ie},null,8,[`modelValue`,`mode`,`hint`,`commands`])]))])],14,tt)):(g(),i(`div`,et,`This page needs its seed.`))]),_:1})}}});export{Z as default};
|
|
1
|
+
import{i as e,r as t,t as n}from"./AppShell-DPJVhUGP.js";import{An as r,Cn as i,Cr as a,Ft as o,Gr as s,Ii as c,Li as l,Mn as u,Pi as d,Pt as ee,Qr as f,Sn as p,Tr as m,Xr as h,_r as g,bn as _,c as v,dr as te,en as ne,hr as re,ir as ie,ji as y,kn as b,l as ae,ln as x,o as oe,sr as se,t as S,wr as ce,xi as C,xn as w,y as T,yi as E,yn as D,yr as le}from"./browser-CCImen5O.js";import{t as O}from"./Tooltip-CmQVfAl2.js";import{i as ue}from"./PendingTurnRow-DIC86uWA.js";import{b as de,x as fe}from"./main-Bk1L-bNk.js";import{t as pe}from"./eventSource-Cv0AFlMi.js";import{t as me}from"./wallClock-x0hjr0J_.js";import{r as he}from"./indexFormat-B-pd4r7Y.js";import{K as ge,i as _e}from"./indexRow-BsWcHHVh.js";import"./format-BldUwl_R.js";import{S as k,_ as ve,a as ye,b as be,c as A,d as j,f as xe,g as Se,h as M,i as Ce,l as we,m as N,n as Te,o as Ee,p as De,r as Oe,s as P,t as ke,u as Ae,v as je,x as Me,y as Ne}from"./SilentTurn-CPED_XCV.js";import{t as F}from"./SlackMark-DB0MGiF5.js";import{T as Pe}from"./sseReplay-DGRDRLua.js";var I={class:`thread-tip flex max-w-xs flex-col gap-1 text-xs`},Fe={class:`tip-title leading-snug text-highlighted`},L={class:`flex flex-wrap items-center gap-x-1.5 gap-y-0.5 font-mono text-[0.68rem] text-muted`},Ie={class:`tip-when tabular-nums`},Le={class:`tip-source inline-flex items-center gap-1`},Re={class:`tip-runs`},ze={key:0,class:`tip-live inline-flex items-center gap-1 text-toned`},R=u({__name:`ThreadTip`,props:{row:{},now:{}},setup(e){let t=e,n=D(()=>k(t.row,t.now));return(t,r)=>(g(),i(`div`,I,[_(`p`,Fe,l(n.value.title),1),_(`p`,L,[_(`span`,Ie,l(n.value.when),1),r[1]||=_(`span`,{"aria-hidden":`true`},`·`,-1),_(`span`,Le,[e.row.surface===`slack`?(g(),w(F,{key:0})):p(``,!0),b(l(n.value.source),1)]),r[2]||=_(`span`,{"aria-hidden":`true`},`·`,-1),_(`span`,Re,l(n.value.runs),1),n.value.live?(g(),i(`span`,ze,[...r[0]||=[_(`span`,{class:`size-1.5 rounded-full bg-ok`,"aria-hidden":`true`},null,-1),b(`live`,-1)]])):p(``,!0)])]))}}),z={class:`rail flex flex-col gap-1 text-[0.8rem]`,"aria-label":`Recent threads`},B={class:`filter mb-2 flex items-center gap-2 rounded-lg border border-default px-2.5 py-1.5 transition-colors duration-150 ease-out focus-within:border-primary hover:border-accented`},V={key:0,class:`rounded border border-default px-1 font-mono text-[0.65rem] text-dimmed`},Be={key:0,class:`empty px-3 py-1 text-xs text-dimmed`},H={key:1,class:`nomatch px-3 py-1 text-xs text-dimmed`},U={key:0,class:`dot mt-px size-1.5 shrink-0 self-center rounded-full bg-ok motion-safe:animate-pulse`,"aria-label":`a run is in flight`},Ve={class:`title min-w-0 flex-1 truncate text-toned group-hover:text-highlighted group-aria-[current=page]:text-highlighted`},He={class:`when shrink-0 font-mono text-[0.7rem] tabular-nums text-dimmed`},W={class:`retention px-3 pt-1 text-[0.7rem] leading-relaxed text-dimmed`},G={class:`model px-3 pt-2 text-[0.7rem] leading-relaxed text-dimmed`,"data-testid":`what-is-a-thread`},K=500,Ue=u({__name:`ConversationRail`,props:{rows:{},current:{},now:{},retention:{}},setup(e,{expose:t}){let n=e,s=C(``),c=C(null),u=D(()=>N(n.rows,s.value));function d(){c.value?.focus(),c.value?.select()}function ee(e){e.key===`Escape`&&(s.value=``,c.value?.blur())}return t({focusFilter:d}),(t,n)=>{let d=T,v=m(`RouterLink`),te=O;return g(),i(`nav`,z,[r(v,{class:`new group mb-3 flex items-center gap-2 rounded-xl bg-inverted px-3 py-2 font-medium text-inverted no-underline transition-[transform,opacity] duration-150 ease-out hover:-translate-y-px hover:opacity-90 active:translate-y-0 active:opacity-100`,to:`/threads`,"aria-current":e.current===``?`page`:void 0,"data-testid":`new-thread`},{default:h(()=>[r(d,{name:`i-lucide-plus`,class:`size-4 shrink-0 transition-transform duration-150 ease-out group-hover:rotate-90`,"aria-hidden":`true`}),n[1]||=_(`span`,null,`New thread`,-1),n[2]||=_(`span`,{class:`kbd ml-auto flex gap-0.5 font-mono text-[0.65rem] opacity-70`,"aria-label":`shortcut shift command O`},[_(`kbd`,{class:`rounded border border-current/30 px-1`},`⇧`),_(`kbd`,{class:`rounded border border-current/30 px-1`},`⌘`),_(`kbd`,{class:`rounded border border-current/30 px-1`},`O`)],-1)]),_:1},8,[`aria-current`]),_(`label`,B,[r(d,{name:`i-lucide-search`,class:`size-3.5 shrink-0 text-dimmed`,"aria-hidden":`true`}),f(_(`input`,{ref_key:`filter`,ref:c,"onUpdate:modelValue":n[0]||=e=>s.value=e,class:`min-w-0 flex-1 bg-transparent text-[0.8rem] text-highlighted outline-none placeholder:text-dimmed`,type:`text`,placeholder:`Filter recent`,"aria-label":`Filter recent threads`,autocomplete:`off`,onKeydown:ee},null,544),[[ne,s.value]]),s.value?p(``,!0):(g(),i(`kbd`,V,`⌘K`))]),n[8]||=_(`p`,{class:`label px-3 pb-1 font-mono text-[0.65rem] font-medium uppercase tracking-wider text-dimmed`},`Recent`,-1),e.rows.length===0?(g(),i(`p`,Be,`Nothing yet. Ask something.`)):u.value.length===0?(g(),i(`p`,H,`Nothing matches "`+l(s.value)+`".`,1)):p(``,!0),r(o,{name:`sb-rise`,tag:`div`,class:`rows flex flex-col gap-0.5`},{default:h(()=>[(g(!0),i(x,null,a(u.value,t=>(g(),i(`div`,{key:t.id},[r(te,{"delay-duration":K,content:{side:`right`,sideOffset:12,align:`start`},ui:{content:`h-auto max-w-xs px-2.5 py-2`}},{content:h(()=>[r(R,{row:t,now:e.now},null,8,[`row`,`now`])]),default:h(()=>[r(v,{class:`row group relative flex items-baseline gap-2 rounded-lg px-3 py-1.5 no-underline transition-colors duration-150 ease-out hover:bg-(--ui-bg-muted) aria-[current=page]:bg-(--ui-bg-accented)`,to:`/threads/${encodeURIComponent(t.id)}`,"aria-current":t.id===e.current?`page`:void 0,"data-surface":t.surface},{default:h(()=>[n[3]||=_(`span`,{class:`bar absolute left-0 top-1/2 h-4 w-0.5 -translate-y-1/2 rounded-full bg-primary opacity-0 transition-opacity duration-150 ease-out group-aria-[current=page]:opacity-100`,"aria-hidden":`true`},null,-1),t.live?(g(),i(`span`,U)):p(``,!0),_(`span`,Ve,l(t.title),1),_(`span`,He,l(y(j)(t.lastAt,e.now)),1)]),_:2},1032,[`to`,`aria-current`,`data-surface`])]),_:2},1024)]))),128))]),_:1}),r(v,{class:`all mt-3 flex items-center gap-1.5 px-3 py-1 text-xs font-medium text-muted no-underline transition-colors duration-150 ease-out hover:text-highlighted`,to:`/runs`,"data-testid":`all-runs`},{default:h(()=>[n[4]||=b(` All runs `,-1),r(d,{name:`i-lucide-arrow-right`,class:`size-3 transition-transform duration-150 ease-out group-hover:translate-x-0.5`,"aria-hidden":`true`})]),_:1}),_(`p`,W,l(e.retention),1),_(`p`,G,[n[6]||=b(` A thread holds the runs its messages start. `,-1),r(v,{class:`text-muted hover:text-highlighted`,to:`/runs`},{default:h(()=>[...n[5]||=[b(`Runs`,-1)]]),_:1}),n[7]||=b(` lists every run across everyone's threads. `,-1)])])}}}),We={class:`empty mx-auto flex w-full max-w-2xl flex-col items-center gap-5 px-3 py-6 text-center`},Ge={class:`flex flex-col gap-1.5`},Ke={class:`greeting sb-stagger text-xl font-medium tracking-tight text-highlighted`,style:{"--sb-i":`1`}},qe={class:`sb-stagger w-full text-left`,style:{"--sb-i":`3`}},q={key:0,class:`chips flex flex-wrap justify-center gap-2`,"aria-label":`Suggestions`},J=[`onClick`],Je=u({__name:`EmptyState`,props:{name:{},hour:{},suggestions:{}},emits:[`pick`],setup(e,{emit:n}){let o=n;return(n,s)=>(g(),i(`section`,We,[r(t,{draw:``,idle:``,class:`mark-lg sb-stagger text-highlighted`,style:{"font-size":`3.25rem`,"--sb-i":`0`}}),_(`div`,Ge,[_(`h2`,Ke,l(y(M)(e.hour,e.name)),1),s[0]||=_(`p`,{class:`sub sb-stagger text-[0.875rem] text-muted`,style:{"--sb-i":`2`}},` Ask in plain words. The right agent picks it up, and you watch it work here. `,-1)]),_(`div`,qe,[ce(n.$slots,`default`)]),e.suggestions.length>0?(g(),i(`ul`,q,[(g(!0),i(x,null,a(e.suggestions,(e,t)=>(g(),i(`li`,{key:e,class:`sb-stagger`,style:c({"--sb-i":t+4})},[_(`button`,{type:`button`,class:`chip rounded-full border border-default px-3 py-1 text-[0.8rem] text-toned transition-[color,border-color,background-color,transform] duration-150 ease-out hover:-translate-y-px hover:border-accented hover:bg-(--ui-bg-muted) hover:text-highlighted focus-visible:outline-2 focus-visible:outline-primary active:translate-y-0`,onClick:t=>o(`pick`,e)},l(e),9,J)],4))),128))])):p(``,!0)]))}});function Ye(){return{runs:new Map,connected:!1}}function Xe(e,t){t.type===`upsert`&&t.run?t.run.finished||!t.run.threadKey?e.runs.delete(t.run.id):e.runs.set(t.run.id,{threadKey:t.run.threadKey,startedAt:t.run.startedAt,...t.run.label===void 0?{}:{label:t.run.label},...t.run.channelId===void 0?{}:{channelId:t.run.channelId}}):t.type===`removed`&&t.id&&e.runs.delete(t.id)}function Y(e){let t=new Map;for(let n of e.runs.values()){let e=t.get(n.threadKey)??[];e.push(n),t.set(n.threadKey,e)}return t}function Ze(e,t){return t.includes(`:`)?t:`${e}:${t}`}function Qe(e){let t=e.indexOf(`:`);return t>0?e.slice(0,t):`unknown`}function $e(e,t,n){if(!t.connected)return[...e];let r=Y(t),i=new Set,a=e.map(e=>{let t=Ze(n,e.id);i.add(t);let a=r.get(t);if(!a)return e.live?{...e,live:!1}:e;let o=e.live?0:a.length;return{...e,live:!0,runs:e.runs+o,lastAt:Math.max(e.lastAt,...a.map(e=>e.startedAt))}}),o=[];for(let[e,t]of r){if(i.has(e))continue;let r=t.reduce((e,t)=>t.startedAt>e.startedAt?t:e),a=r.label?he(r.label).snippet:void 0;o.push({id:e.startsWith(`${n}:`)?e.slice(n.length+1):e,title:a??r.label??e,excerpt:a??r.label??e,lastAt:r.startedAt,runs:t.length,live:!0,surface:Qe(r.channelId??e)})}return o.sort((e,t)=>t.lastAt-e.lastAt),[...o,...a]}var et={key:0,class:`mx-auto my-12 max-w-xl text-center text-toned`},tt=[`data-rail`],nt={key:0,class:`relative hidden md:block`},rt=[`aria-valuemin`,`aria-valuemax`,`aria-valuenow`],it={class:`thread mx-auto flex min-h-[calc(100vh-8rem)] w-full max-w-3xl flex-col`},at={key:4,class:`inline text-[0.875rem] text-toned`,"data-testid":`inline`},ot={key:2,class:`elsewhere sticky bottom-0 z-10 -mx-3 mt-auto bg-default/85 px-3 py-4 text-center text-[0.8rem] text-toned backdrop-blur sm:-mx-5 sm:px-5`,"data-testid":`elsewhere`},st=[`href`],ct={key:3,class:`composer-dock sticky bottom-0 z-10 -mx-3 mt-auto bg-default/85 px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-3 backdrop-blur sm:-mx-5 sm:px-5`},X=`(min-width: 48rem)`,Z=u({__name:`HomePage`,setup(t){let u=oe(`home`),f=me(u?.now),m=u?.conversation??``,ne=v(u?.retentionDays??null),ce=0,T=e=>`${e}-${++ce}`,O=E([]);for(let e of u?.turns??[]){if(`kind`in e){e.kind===`receipt`?O.push({key:T(`s`),kind:`silent`,reason:e.reason,at:e.decidedAt}):O.push({key:T(`w`),kind:`parent`,turn:e});continue}O.push({key:T(`p`),kind:`person`,text:e.request,at:e.receivedAt??e.startedAt,pending:!1});let t=!e.finished&&e.token?{eventsUrl:`/runs/${encodeURIComponent(e.id)}/events?t=${e.token}`,stopUrl:`/runs/${encodeURIComponent(e.id)}/stop?t=${e.token}`,serverNow:u?.now}:null;O.push({key:T(`a`),kind:`assistant`,turn:e,live:t,ended:e.finished})}let he=D(()=>{for(let e=O.length-1;e>=0;e--){let t=O[e];if(t.kind===`assistant`&&t.live&&!t.ended&&t.turn.hosted!==!0)return t}return null}),k=C(null),j=C(0);le(e,j);let M=C(``),N=C(void 0),F=D(()=>xe(he.value!==null,M.value)),I=C(!1);s(M,()=>{N.value&&M.value===``&&(N.value=void 0)});function Fe(e){M.value=e,L()}async function L(){if(!u||I.value)return;let e=Ee(M.value.trim(),u.commands);if(e===``)return;let t=E({key:T(`p`),kind:`person`,text:e,at:f.value,pending:!0});O.push(t),M.value=``,N.value=void 0,I.value=!0,j.value++;try{let n=await fetch(u.sendUrl,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`},body:JSON.stringify({text:e})}),r=await n.json().catch(()=>({}));if(n.status===202&&typeof r.viewPath==`string`&&typeof r.runId==`string`){let n=Se(r.viewPath);if(!n)throw Error(`the run's view path was not one`);t.pending=!1,S.pathname()===`/threads`&&S.replaceUrl(`/threads/${encodeURIComponent(m)}`),O.push({key:T(`a`),kind:`assistant`,turn:{id:r.runId,request:e,startedAt:f.value,receivedAt:f.value,finished:!1,eventCount:0},live:{eventsUrl:n.eventsUrl,stopUrl:n.stopUrl},ended:!1});return}if(n.ok&&r.offer&&typeof r.offer.line==`string`){t.pending=!1;let e=je({line:r.offer.line,...r.offer});M.value=e.command,N.value=e.hint;return}if(n.ok&&typeof r.reply==`string`){t.pending=!1;let e=Ae(r.reply);e.kind===`inline`&&O.push({key:T(`i`),kind:`inline`,text:e.text});return}throw Error(r.error??`HTTP ${n.status}`)}catch(e){t.pending=!1,t.failed=`not sent: ${e instanceof Error?e.message:`error`}`}finally{I.value=!1}}function Ie(){let e=k.value;e&&fetch(`${e}${e.includes(`?`)?`&`:`?`}mode=soft`,{method:`POST`,credentials:`same-origin`})}function Le(e,t,n){let r=O.filter(e=>e.kind===`person`),i=ve(r.map(e=>({text:e.text,folded:e.folded!==void 0,ref:e})),t);if(!i)return;let a=e.turn.receivedAt??e.turn.startedAt;i.ref.folded=n===void 0?``:`at ${ge(Math.max(0,n-a),`clock`)}`}function Re(e){e.ended=!0,k.value=null}let ze=Ne({width:S.readPref(P.width),collapsed:S.readPref(P.collapsed)}),R=C(ze.width),z=C(ze.collapsed),B=C(!1),V=C(S.mediaMatches(X)),Be=S.onMediaChange(X,e=>{V.value=e}),H=C(null),U=C(null),Ve=D(()=>V.value?z.value?`Show recent threads`:`Hide recent threads`:`Recent threads`);function He(){if(V.value=S.mediaMatches(X),V.value){z.value=!z.value,S.writePref(P.collapsed,z.value?`1`:`0`);return}B.value=!0}function W(e,t){R.value=we(e),t&&S.writePref(P.width,String(R.value))}let G=null;function K(e){G&&W(G.startWidth+(e.clientX-G.startX),!1)}function We(){window.removeEventListener(`pointermove`,K),G&&(G=null,S.writePref(P.width,String(R.value)))}function Ge(e){e.button===0&&(e.preventDefault(),G={startX:e.clientX,startWidth:R.value},e.currentTarget?.setPointerCapture?.(e.pointerId),window.addEventListener(`pointermove`,K),window.addEventListener(`pointerup`,We,{once:!0}))}function Ke(e){if(e.key===`ArrowRight`)W(R.value+A.step,!0);else if(e.key===`ArrowLeft`)W(R.value-A.step,!0);else if(e.key===`Home`)W(A.min,!0);else if(e.key===`End`)W(A.max,!0);else return;e.preventDefault()}se(()=>{window.removeEventListener(`pointermove`,K),window.removeEventListener(`pointerup`,We),Be()});function qe(e){let t=be(e);if(t){if(e.preventDefault(),t===`newThread`){S.navigate(`/threads`);return}if(H.value){H.value.focusFilter();return}if(z.value&&S.mediaMatches(X)){z.value=!1,S.writePref(P.collapsed,`0`),ie().then(()=>H.value?.focusFilter());return}B.value=!0,ie().then(()=>U.value?.focusFilter())}}let q=C(null),J=C(!1);function Y(){return document.body.scrollHeight-(window.innerHeight+window.scrollY)}s(()=>O.length,()=>{let e=Me(Y());ie().then(()=>{e?q.value?.scrollIntoView?.({block:`end`}):J.value=!0})});function Ze(){Me(Y())&&(J.value=!1)}function Qe(){q.value?.scrollIntoView?.({block:`end`,behavior:`smooth`}),J.value=!1}te(()=>{window.addEventListener(`scroll`,Ze,{passive:!0}),window.addEventListener(`keydown`,qe),u&&ft()}),re(()=>{window.removeEventListener(`scroll`,Ze),window.removeEventListener(`keydown`,qe),Q?.close()});let Z=E(Ye()),lt=D(()=>$e(u?.conversations??[],Z,u?.lane??``)),ut=D(()=>{let e=he.value?.turn.id;return Z.runs.size+(e&&!Z.runs.has(e)?1:0)}),dt=pe(),Q=null;function ft(){Q=dt(`/runs?stream=1&mine=1`);let e=!1;Q.onopen=()=>{e&&Z.runs.clear(),e=!0,Z.connected=!0},Q.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}Xe(Z,t)}}let pt=D(()=>{let e=O.find(e=>e.kind===`person`);return e?De(e.text):`Switchboard`});s([pt,ut],([e,t])=>{S.setTitle(t>0?`(${t}) ${e}`:e),S.setFavicon(t>0?fe:de)},{immediate:!0});let mt=D(()=>new Date(f.value).getHours()),ht=D(()=>O.length===0),$=u?.elsewhere,gt=$?$.surface===`web`?`This thread is another person's conversation. You can read it here.`:`This thread lives in ${_e[$.surface]??$.surface}.`:``;return(e,t)=>{let s=ae,v=ue;return g(),w(n,{title:`Threads`,nav:`home`},{leading:h(()=>[r(s,{class:`rail-toggle -ml-1`,size:`xs`,color:`neutral`,variant:`ghost`,icon:V.value&&!z.value?`i-lucide-panel-left-close`:`i-lucide-panel-left`,"aria-label":Ve.value,"aria-expanded":V.value?!z.value:void 0,onClick:He},null,8,[`icon`,`aria-label`,`aria-expanded`])]),default:h(()=>[y(u)?(g(),i(`div`,{key:1,class:d([`home gap-8 md:grid`,z.value?`md:grid-cols-[minmax(0,1fr)]`:`md:grid-cols-[var(--rail-w)_minmax(0,1fr)]`]),style:c({"--rail-w":`${R.value}px`}),"data-rail":z.value?`hidden`:`shown`},[z.value?p(``,!0):(g(),i(`aside`,nt,[r(Ue,{ref_key:`rail`,ref:H,class:`sticky top-20`,rows:lt.value,current:y(m),now:y(f),retention:y(ne)},null,8,[`rows`,`current`,`now`,`retention`]),_(`div`,{class:`handle group/handle absolute inset-y-0 -right-5 flex w-3 cursor-col-resize touch-none select-none justify-center outline-none`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the recent threads column`,"aria-valuemin":y(A).min,"aria-valuemax":y(A).max,"aria-valuenow":R.value,tabindex:`0`,"data-testid":`rail-handle`,onPointerdown:Ge,onKeydown:Ke,onDblclick:t[0]||=e=>W(y(A).default,!0)},[...t[5]||=[_(`span`,{class:`w-px rounded-full bg-(--ui-border-accented) opacity-0 transition-opacity duration-150 ease-out group-hover/handle:opacity-100 group-focus-visible/handle:opacity-100`,"aria-hidden":`true`},null,-1)]],40,rt)])),r(v,{open:B.value,"onUpdate:open":t[1]||=e=>B.value=e,side:`left`,title:`Recent threads`,ui:{content:`max-w-xs`}},{body:h(()=>[r(Ue,{ref_key:`sheetRail`,ref:U,rows:lt.value,current:y(m),now:y(f),retention:y(ne)},null,8,[`rows`,`current`,`now`,`retention`])]),_:1},8,[`open`]),_(`section`,it,[ht.value?(g(),w(Je,{key:0,class:`mb-auto mt-[clamp(1.5rem,14vh,9rem)]`,name:y(u).viewer.name,hour:mt.value,suggestions:y(u).suggestions,onPick:Fe},{default:h(()=>[r(ye,{modelValue:M.value,"onUpdate:modelValue":t[2]||=e=>M.value=e,mode:F.value,hint:N.value,commands:y(u).commands,autofocus:``,"sweep-on-mount":``,onSubmit:L,onStop:Ie},null,8,[`modelValue`,`mode`,`hint`,`commands`])]),_:1},8,[`name`,`hour`,`suggestions`])):(g(),w(o,{key:1,name:`sb-rise`,"move-class":`sb-move-move`,tag:`ol`,class:`transcript m-0 flex list-none flex-col gap-6 p-0 pb-32 pt-2`},{default:h(()=>[(g(!0),i(x,null,a(O,e=>(g(),i(`li`,{key:e.key},[e.kind===`person`?(g(),w(Ce,{key:0,text:e.text,at:e.at,now:y(f),pending:e.pending,folded:e.folded,failed:e.failed},null,8,[`text`,`at`,`now`,`pending`,`folded`,`failed`])):e.kind===`assistant`?(g(),w(Oe,{key:1,turn:e.turn,live:e.live,now:y(f),onInput:(t,n)=>Le(e,t,n),onEnded:t=>Re(e),onStop:t[3]||=e=>k.value=e},null,8,[`turn`,`live`,`now`,`onInput`,`onEnded`])):e.kind===`silent`?(g(),w(ke,{key:2,reason:e.reason,"decided-at":e.at,now:y(f)},null,8,[`reason`,`decided-at`,`now`])):e.kind===`parent`?(g(),w(Te,{key:3,turn:e.turn,now:y(f)},null,8,[`turn`,`now`])):(g(),i(`div`,at,[r(Pe,{text:e.text},null,8,[`text`])]))]))),128))]),_:1})),_(`div`,{ref_key:`end`,ref:q,class:`end`,"aria-hidden":`true`},null,512),!ht.value&&y($)?(g(),i(`p`,ot,[b(l(y(gt))+` `,1),y($).url?(g(),i(`a`,{key:0,href:y($).url,target:`_blank`,rel:`noopener`,class:`text-highlighted`},`Reply there ↗`,8,st)):y($).surface===`web`?p(``,!0):(g(),i(x,{key:1},[b(`Reply there.`)],64))])):ht.value?p(``,!0):(g(),i(`div`,ct,[r(ee,{name:`sb-rise`},{default:h(()=>[J.value?(g(),i(`button`,{key:0,type:`button`,class:`new-pill absolute -top-9 left-1/2 -translate-x-1/2 rounded-full border border-default bg-(--ui-bg-elevated) px-3 py-1 font-mono text-[0.7rem] text-toned shadow-sm hover:text-highlighted`,onClick:Qe},` ↓ new `)):p(``,!0)]),_:1}),r(ye,{modelValue:M.value,"onUpdate:modelValue":t[4]||=e=>M.value=e,mode:F.value,hint:N.value,commands:y(u).commands,autofocus:``,onSubmit:L,onStop:Ie},null,8,[`modelValue`,`mode`,`hint`,`commands`])]))])],14,tt)):(g(),i(`div`,et,`This page needs its seed.`))]),_:1})}}});export{Z as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-DPJVhUGP.js";import{An as t,Cn as n,Cr as r,Li as i,Mn as ee,Sn as te,Tr as ne,Xr as a,_r as o,bn as s,ji as c,kn as l,ln as u,o as d,xn as f,yn as p}from"./browser-CCImen5O.js";import{_ as m,a as re,c as ie,d as ae,g as oe,l as se,m as h,n as ce,o as g,s as le,u as ue,v as _}from"./main-DYwRHh0F.js";import{t as v}from"./StatusDot-CFLn-DZ2.js";var de={class:`mt-4 first:mt-0`},fe={class:`w-full border-collapse font-mono text-[0.8125rem]`},pe={class:`border-t border-muted`},me={class:`px-2 py-1 align-top`},y={class:`ml-1.5 font-medium`},b={class:`border-t border-muted`},x={class:`break-all px-2 py-1 align-top`},S={key:0},C={key:1,class:`text-dimmed`},w={class:`border-t border-muted`},T={class:`break-all px-2 py-1 align-top`},E={key:0},D={key:1,class:`text-dimmed`},O={class:`border-t border-muted`},k={class:`break-all px-2 py-1 align-top`},A={key:0},j={key:1,class:`text-dimmed`},M={class:`border-t border-muted`},N={class:`break-all px-2 py-1 align-top`},P={key:0},F={key:1,class:`text-dimmed`},I={class:`border-t border-muted`},L={class:`break-all px-2 py-1 align-top`},R={key:1,class:`text-dimmed`},z={class:`mt-4`},he={class:`w-full border-collapse font-mono text-[0.8125rem]`},ge={class:`border-t border-muted`},_e={class:`break-all px-2 py-1 align-top`},ve=[`href`],ye={key:1},be={class:`border-t border-muted`},xe={class:`break-all px-2 py-1 align-top`},Se={class:`border-t border-muted`},Ce={class:`break-all px-2 py-1 align-top`},we=[`href`],Te={key:1},Ee={key:2,class:`text-dimmed`},De={class:`border-t border-muted`},Oe={class:`break-all px-2 py-1 align-top`},ke={key:0},Ae={key:1,class:`text-dimmed`},je={class:`border-t border-muted`},Me={class:`break-all px-2 py-1 align-top`},Ne={key:0},Pe={key:1,class:`text-dimmed`},Fe={class:`border-t border-muted`},Ie={class:`break-all px-2 py-1 align-top`},Le={key:0},Re={key:1,class:`text-dimmed`},ze={class:`mt-4`},Be={class:`w-full border-collapse font-mono text-[0.8125rem]`},Ve={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},He={class:`break-all px-2 py-1 align-top`},Ue={class:`w-full border-collapse font-mono text-[0.8125rem]`},We={class:`w-32 break-all px-2 py-1 align-top text-muted sm:w-96 sm:break-words`},Ge={class:`px-2 py-1 align-top`},Ke={key:1,class:`text-xs text-muted`},qe={class:`mt-4`},Je={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Ye={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},B={class:`break-all px-2 py-1 align-top`},Xe={key:0},Ze={key:1,class:`text-dimmed`},Qe={key:1,class:`text-xs text-muted`},$e={class:`mt-4`},et={class:`mb-1 text-xs text-muted`},tt={class:`overflow-x-auto`},nt={class:`w-full border-collapse font-mono text-[0.8125rem]`},rt={class:`break-all px-2 py-1 align-top`},it={key:0,class:`text-xs text-muted`},at={class:`break-all px-2 py-1 align-top`},ot=[`href`],st={key:1},ct={key:2,class:`text-dimmed`},lt={class:`break-all px-2 py-1 align-top`},ut={key:0},dt={key:1,class:`text-dimmed`},ft={key:2},pt={key:3,class:`text-dimmed`},mt={class:`break-all px-2 py-1 align-top`},ht={key:0},gt={key:1,class:`text-dimmed`},_t={key:2},vt={key:3,class:`text-dimmed`},yt={key:1,class:`text-xs text-muted`},bt={class:`mt-4`},xt={class:`w-full border-collapse font-mono text-[0.8125rem]`},St={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ct={class:`px-2 py-1 align-top`},wt={class:`mt-4`},Tt={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Et={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Dt={class:`break-all px-2 py-1 align-top`},Ot={class:`text-xs text-muted`},kt={key:1,class:`text-xs text-muted`},At={class:`mt-4`},jt={class:`w-full border-collapse font-mono text-[0.8125rem]`},Mt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Nt={class:`break-all px-2 py-1 align-top`},Pt={key:0},Ft={key:1,class:`text-dimmed`},It={class:`mt-4 text-xs text-muted`},Lt={class:`rounded bg-elevated px-1 py-0.5`},Rt={class:`rounded bg-elevated px-1 py-0.5`},zt={class:`rounded bg-elevated px-1 py-0.5`},V=ee({__name:`ResidentDetailPage`,setup(ee){let V=d(`resident`),H=p(()=>V?.record??{}),U=p(()=>ie(H.value)),W=p(()=>se(H.value)||(V?.slug??``)),G=p(()=>h(U.value.sha)),K=p(()=>ce.test(W.value)?`https://github.com/${W.value}`:void 0),q=p(()=>K.value&&/^[0-9a-f]{7,40}$/.test(G.value)?`${K.value}/commit/${G.value}`:void 0),J=p(()=>{let e=U.value.snapshot;return e&&typeof e==`object`?g(e):void 0}),Bt=p(()=>g(U.value.schedules)),Y=p(()=>{let e=g(H.value.commands),t=g(H.value.effects);return Object.keys(e).sort().map(n=>({name:n,command:h(e[n]),effect:h(t[n])||`readonly`}))}),X=p(()=>ae(H.value).map(e=>({...e,threadKey:e.threadKey||`?`,ref:e.ref||`?`,sha:e.sha?e.sha.slice(0,8):``,commitHref:K.value&&/^[0-9a-f]{7,40}$/.test(e.sha)?`${K.value}/commit/${e.sha}`:void 0}))),Z=p(()=>X.value.filter(e=>!e.evicted).length),Q=p(()=>{let e=U.value.lastRestore;return e?JSON.stringify(e):``}),$=p(()=>le(H.value)),Vt=p(()=>typeof H.value.diskBudgetMb==`number`?H.value.diskBudgetMb:void 0),Ht=p(()=>{let e=$.value;if(!e)return[];let t=re(e,Vt.value),n=n=>{let r=t.room[n];return r===null?_(e.parts,n)===null?`? (checkout not measured)`:`?`:`${r} more (${m(_(e.parts,n))} each)`};return[[`used / total`,oe(e)],[`free`,`${m(t.freeKiB)}${t.capped?` under the ${m(t.capacityKiB)} diskBudgetMb cap`:``}`],[`reserve`,`${m(t.reserve.totalKiB)} (snapshot staging ${m(t.reserve.stagingKiB)} + floor ${m(t.reserve.floorKiB)})`],[`headroom`,`${m(t.headroomKiB)} — room for ${n(`hardlink`)} hardlinked trees, ${n(`reconcile`)} lockfile-diverged (reconciling)`],[`measured`,e.at||`—`]]}),Ut=p(()=>{let e=$.value;if(!e)return[];let t=[[`mirror`,m(e.parts.mirror)],[`checkout deps (node_modules)`,m(e.parts.deps)],[`checkout (history + tree + build)`,m(e.parts.checkout)]];for(let[n,r]of Object.entries(e.parts.threads).sort((e,t)=>t[1]-e[1]))t.push([`thread ${n}`,m(r)]);for(let[n,r]of Object.entries(e.parts.homes).sort((e,t)=>t[1]-e[1]))r>=1024&&t.push([`home ${n}`,m(r)]);return t.push([`other (image, /tmp, …)`,m(e.parts.other)]),t});return(ee,d)=>{let p=ne(`RouterLink`);return o(),f(e,{title:W.value||`Resident`,nav:`residents`},{leading:a(()=>[t(p,{class:`back text-sm text-muted no-underline hover:text-primary`,to:`/residents`},{default:a(()=>[...d[0]||=[l(`← All residents`,-1)]]),_:1})]),default:a(()=>[s(`section`,de,[d[8]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Lifecycle`,-1),s(`table`,fe,[s(`tbody`,null,[s(`tr`,pe,[d[1]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state`,-1),s(`td`,me,[t(v,{tone:c(ue)(U.value.state),label:U.value.state},null,8,[`tone`,`label`]),s(`span`,y,i(U.value.state),1)])]),s(`tr`,b,[d[2]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`reason`,-1),s(`td`,x,[U.value.reason?(o(),n(`span`,S,i(U.value.reason),1)):(o(),n(`span`,C,`—`))])]),s(`tr`,w,[d[3]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh error`,-1),s(`td`,T,[c(h)(U.value.lastRefreshError)?(o(),n(`span`,E,i(c(h)(U.value.lastRefreshError)),1)):(o(),n(`span`,D,`—`))])]),s(`tr`,O,[d[4]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last restore`,-1),s(`td`,k,[Q.value?(o(),n(`span`,A,i(Q.value),1)):(o(),n(`span`,j,`—`))])]),s(`tr`,M,[d[5]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state updated`,-1),s(`td`,N,[c(h)(U.value.updatedAt)?(o(),n(`span`,P,i(c(h)(U.value.updatedAt)),1)):(o(),n(`span`,F,`—`))])]),s(`tr`,I,[d[7]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`idle since`,-1),s(`td`,L,[c(h)(U.value.idleSince)?(o(),n(u,{key:0},[l(i(c(h)(U.value.idleSince))+` `,1),d[6]||=s(`span`,{class:`text-xs text-muted`},`(refresh parked; container may sleep)`,-1)],64)):(o(),n(`span`,R,`awake`))])])])])]),s(`section`,z,[d[15]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pinned facts`,-1),s(`table`,he,[s(`tbody`,null,[s(`tr`,ge,[d[9]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`repository`,-1),s(`td`,_e,[K.value?(o(),n(`a`,{key:0,class:`text-primary`,href:K.value},i(K.value),9,ve)):(o(),n(`span`,ye,i(c(h)(H.value.resource)||`—`),1))])]),s(`tr`,be,[d[10]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`default ref`,-1),s(`td`,xe,i(c(h)(U.value.defaultRef)||c(h)(H.value.defaultRef)||`—`),1)]),s(`tr`,Se,[d[11]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`pinned sha`,-1),s(`td`,Ce,[q.value?(o(),n(`a`,{key:0,class:`text-primary`,href:q.value},i(G.value),9,we)):G.value?(o(),n(`span`,Te,i(G.value),1)):(o(),n(`span`,Ee,`—`))])]),s(`tr`,De,[d[12]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`lockfile hash`,-1),s(`td`,Oe,[c(h)(U.value.lockfileHash)?(o(),n(`span`,ke,i(c(h)(U.value.lockfileHash)),1)):(o(),n(`span`,Ae,`—`))])]),s(`tr`,je,[d[13]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`provisioned`,-1),s(`td`,Me,[c(h)(U.value.provisionedAt)?(o(),n(`span`,Ne,i(c(h)(U.value.provisionedAt)),1)):(o(),n(`span`,Pe,`—`))])]),s(`tr`,Fe,[d[14]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh`,-1),s(`td`,Ie,[c(h)(U.value.lastRefreshAt)?(o(),n(`span`,Le,i(c(h)(U.value.lastRefreshAt)),1)):(o(),n(`span`,Re,`—`))])])])])]),s(`section`,ze,[d[17]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Disk`,-1),$.value?(o(),n(u,{key:0},[s(`table`,Be,[s(`tbody`,null,[(o(!0),n(u,null,r(Ht.value,([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Ve,i(e),1),s(`td`,He,i(t),1)]))),128))])]),d[16]||=s(`p`,{class:`mb-1 mt-2 text-xs text-muted`},` components (one du, hardlinks counted once — a thread tree shows only what it does not share with the checkout) `,-1),s(`table`,Ue,[s(`tbody`,null,[(o(!0),n(u,null,r(Ut.value,([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,We,i(e),1),s(`td`,Ge,i(t),1)]))),128))])])],64)):(o(),n(`p`,Ke,` not measured yet — the first refresh cycle or attach of this container measures it `))]),s(`section`,qe,[d[18]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Snapshot stamp`,-1),J.value?(o(),n(`table`,Je,[s(`tbody`,null,[(o(),n(u,null,r([`ref`,`sha`,`lockfileHash`,`createdAt`,`mirrorBackupId`,`checkoutBackupId`],e=>s(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Ye,i(e),1),s(`td`,B,[c(h)(J.value[e])?(o(),n(`span`,Xe,i(c(h)(J.value[e])),1)):(o(),n(`span`,Ze,`—`))])])),64))])])):(o(),n(`p`,Qe,`no snapshot recorded`))]),s(`section`,$e,[d[22]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Thread worktrees`,-1),X.value.length>0?(o(),n(u,{key:0},[s(`p`,et,i(Z.value)+` live · `+i(X.value.length-Z.value)+` evicted`,1),s(`div`,tt,[s(`table`,nt,[s(`tbody`,null,[d[21]||=s(`tr`,{class:`text-xs text-muted`},[s(`td`,{class:`px-2 py-1`},`thread`),s(`td`,{class:`px-2 py-1`},`ref · sha`),s(`td`,{class:`px-2 py-1`},`user · deps`),s(`td`,{class:`px-2 py-1`},`bound · last attach`)],-1),(o(!0),n(u,null,r(X.value,e=>(o(),n(`tr`,{key:e.threadKey,class:`border-t border-muted`},[s(`td`,rt,[e.evicted?(o(),n(`span`,it,[l(`evicted `+i(e.evictedAt||`—`),1),e.evictedWhy?(o(),n(u,{key:0},[l(` · `+i(e.evictedWhy),1)],64)):te(``,!0)])):(o(),f(v,{key:1,tone:`green`,label:`live`,tip:`live`})),l(` `+i(e.threadKey),1)]),s(`td`,at,[l(i(e.ref)+` · `,1),e.commitHref?(o(),n(`a`,{key:0,class:`text-primary`,href:e.commitHref},i(e.sha),9,ot)):e.sha?(o(),n(`span`,st,i(e.sha),1)):(o(),n(`span`,ct,`—`))]),s(`td`,lt,[e.user?(o(),n(`span`,ut,i(e.user),1)):(o(),n(`span`,dt,`—`)),d[19]||=l(` · `,-1),e.deps?(o(),n(`span`,ft,i(e.deps),1)):(o(),n(`span`,pt,`—`))]),s(`td`,mt,[e.boundAt?(o(),n(`span`,ht,i(e.boundAt),1)):(o(),n(`span`,gt,`—`)),d[20]||=l(` · `,-1),e.lastAttachAt?(o(),n(`span`,_t,i(e.lastAttachAt),1)):(o(),n(`span`,vt,`—`))])]))),128))])])])],64)):(o(),n(`p`,yt,`no thread worktrees`))]),s(`section`,bt,[d[23]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pending schedules`,-1),s(`table`,xt,[s(`tbody`,null,[(o(),n(u,null,r([[`refresh`,`refresh`],[`provision run`,`provisionRun`],[`provision deadline`,`provisionDeadline`]],([e,t])=>s(`tr`,{key:t,class:`border-t border-muted`},[s(`td`,St,i(e),1),s(`td`,Ct,i(c(h)(Bt.value[t]??0)||`0`),1)])),64))])])]),s(`section`,wt,[d[25]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Command table`,-1),Y.value.length>0?(o(),n(`table`,Tt,[s(`tbody`,null,[(o(!0),n(u,null,r(Y.value,e=>(o(),n(`tr`,{key:e.name,class:`border-t border-muted`},[s(`td`,Et,i(e.name),1),s(`td`,Dt,[s(`code`,null,i(e.command),1),d[24]||=l(),s(`span`,Ot,i(e.effect),1)])]))),128))])])):(o(),n(`p`,kt,`no command table`))]),s(`section`,At,[d[26]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Registry settings`,-1),s(`table`,jt,[s(`tbody`,null,[(o(!0),n(u,null,r([[`onboarded`,c(h)(H.value.onboardedAt)],[`record updated`,c(h)(H.value.updatedAt)],[`provisioning timeout (ms)`,c(h)(H.value.provisioningTimeoutMs)],[`disk budget (MB)`,c(h)(H.value.diskBudgetMb)],[`worktree TTL (days)`,c(h)(H.value.worktreeTtlDays??7)]],([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Mt,i(e),1),s(`td`,Nt,[t?(o(),n(`span`,Pt,i(t),1)):(o(),n(`span`,Ft,`—`))])]))),128))])])]),s(`p`,It,[d[27]||=l(` Manage from chat: `,-1),s(`code`,Lt,`repo rebuild `+i(W.value),1),d[28]||=l(` · `,-1),s(`code`,Rt,`repo reconfigure `+i(W.value)+` …`,1),d[29]||=l(` · `,-1),s(`code`,zt,`repo offboard `+i(W.value)+` --dry-run`,1)])]),_:1},8,[`title`])}}});export{V as default};
|
|
1
|
+
import{t as e}from"./AppShell-DPJVhUGP.js";import{An as t,Cn as n,Cr as r,Li as i,Mn as ee,Sn as te,Tr as ne,Xr as a,_r as o,bn as s,ji as c,kn as l,ln as u,o as d,xn as f,yn as p}from"./browser-CCImen5O.js";import{_ as m,a as re,c as ie,d as ae,g as oe,l as se,m as h,n as ce,o as g,s as le,u as ue,v as _}from"./main-Bk1L-bNk.js";import{t as v}from"./StatusDot-IkfsHGXg.js";var de={class:`mt-4 first:mt-0`},fe={class:`w-full border-collapse font-mono text-[0.8125rem]`},pe={class:`border-t border-muted`},me={class:`px-2 py-1 align-top`},y={class:`ml-1.5 font-medium`},b={class:`border-t border-muted`},x={class:`break-all px-2 py-1 align-top`},S={key:0},C={key:1,class:`text-dimmed`},w={class:`border-t border-muted`},T={class:`break-all px-2 py-1 align-top`},E={key:0},D={key:1,class:`text-dimmed`},O={class:`border-t border-muted`},k={class:`break-all px-2 py-1 align-top`},A={key:0},j={key:1,class:`text-dimmed`},M={class:`border-t border-muted`},N={class:`break-all px-2 py-1 align-top`},P={key:0},F={key:1,class:`text-dimmed`},I={class:`border-t border-muted`},L={class:`break-all px-2 py-1 align-top`},R={key:1,class:`text-dimmed`},z={class:`mt-4`},he={class:`w-full border-collapse font-mono text-[0.8125rem]`},ge={class:`border-t border-muted`},_e={class:`break-all px-2 py-1 align-top`},ve=[`href`],ye={key:1},be={class:`border-t border-muted`},xe={class:`break-all px-2 py-1 align-top`},Se={class:`border-t border-muted`},Ce={class:`break-all px-2 py-1 align-top`},we=[`href`],Te={key:1},Ee={key:2,class:`text-dimmed`},De={class:`border-t border-muted`},Oe={class:`break-all px-2 py-1 align-top`},ke={key:0},Ae={key:1,class:`text-dimmed`},je={class:`border-t border-muted`},Me={class:`break-all px-2 py-1 align-top`},Ne={key:0},Pe={key:1,class:`text-dimmed`},Fe={class:`border-t border-muted`},Ie={class:`break-all px-2 py-1 align-top`},Le={key:0},Re={key:1,class:`text-dimmed`},ze={class:`mt-4`},Be={class:`w-full border-collapse font-mono text-[0.8125rem]`},Ve={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},He={class:`break-all px-2 py-1 align-top`},Ue={class:`w-full border-collapse font-mono text-[0.8125rem]`},We={class:`w-32 break-all px-2 py-1 align-top text-muted sm:w-96 sm:break-words`},Ge={class:`px-2 py-1 align-top`},Ke={key:1,class:`text-xs text-muted`},qe={class:`mt-4`},Je={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Ye={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},B={class:`break-all px-2 py-1 align-top`},Xe={key:0},Ze={key:1,class:`text-dimmed`},Qe={key:1,class:`text-xs text-muted`},$e={class:`mt-4`},et={class:`mb-1 text-xs text-muted`},tt={class:`overflow-x-auto`},nt={class:`w-full border-collapse font-mono text-[0.8125rem]`},rt={class:`break-all px-2 py-1 align-top`},it={key:0,class:`text-xs text-muted`},at={class:`break-all px-2 py-1 align-top`},ot=[`href`],st={key:1},ct={key:2,class:`text-dimmed`},lt={class:`break-all px-2 py-1 align-top`},ut={key:0},dt={key:1,class:`text-dimmed`},ft={key:2},pt={key:3,class:`text-dimmed`},mt={class:`break-all px-2 py-1 align-top`},ht={key:0},gt={key:1,class:`text-dimmed`},_t={key:2},vt={key:3,class:`text-dimmed`},yt={key:1,class:`text-xs text-muted`},bt={class:`mt-4`},xt={class:`w-full border-collapse font-mono text-[0.8125rem]`},St={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Ct={class:`px-2 py-1 align-top`},wt={class:`mt-4`},Tt={key:0,class:`w-full border-collapse font-mono text-[0.8125rem]`},Et={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Dt={class:`break-all px-2 py-1 align-top`},Ot={class:`text-xs text-muted`},kt={key:1,class:`text-xs text-muted`},At={class:`mt-4`},jt={class:`w-full border-collapse font-mono text-[0.8125rem]`},Mt={class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},Nt={class:`break-all px-2 py-1 align-top`},Pt={key:0},Ft={key:1,class:`text-dimmed`},It={class:`mt-4 text-xs text-muted`},Lt={class:`rounded bg-elevated px-1 py-0.5`},Rt={class:`rounded bg-elevated px-1 py-0.5`},zt={class:`rounded bg-elevated px-1 py-0.5`},V=ee({__name:`ResidentDetailPage`,setup(ee){let V=d(`resident`),H=p(()=>V?.record??{}),U=p(()=>ie(H.value)),W=p(()=>se(H.value)||(V?.slug??``)),G=p(()=>h(U.value.sha)),K=p(()=>ce.test(W.value)?`https://github.com/${W.value}`:void 0),q=p(()=>K.value&&/^[0-9a-f]{7,40}$/.test(G.value)?`${K.value}/commit/${G.value}`:void 0),J=p(()=>{let e=U.value.snapshot;return e&&typeof e==`object`?g(e):void 0}),Bt=p(()=>g(U.value.schedules)),Y=p(()=>{let e=g(H.value.commands),t=g(H.value.effects);return Object.keys(e).sort().map(n=>({name:n,command:h(e[n]),effect:h(t[n])||`readonly`}))}),X=p(()=>ae(H.value).map(e=>({...e,threadKey:e.threadKey||`?`,ref:e.ref||`?`,sha:e.sha?e.sha.slice(0,8):``,commitHref:K.value&&/^[0-9a-f]{7,40}$/.test(e.sha)?`${K.value}/commit/${e.sha}`:void 0}))),Z=p(()=>X.value.filter(e=>!e.evicted).length),Q=p(()=>{let e=U.value.lastRestore;return e?JSON.stringify(e):``}),$=p(()=>le(H.value)),Vt=p(()=>typeof H.value.diskBudgetMb==`number`?H.value.diskBudgetMb:void 0),Ht=p(()=>{let e=$.value;if(!e)return[];let t=re(e,Vt.value),n=n=>{let r=t.room[n];return r===null?_(e.parts,n)===null?`? (checkout not measured)`:`?`:`${r} more (${m(_(e.parts,n))} each)`};return[[`used / total`,oe(e)],[`free`,`${m(t.freeKiB)}${t.capped?` under the ${m(t.capacityKiB)} diskBudgetMb cap`:``}`],[`reserve`,`${m(t.reserve.totalKiB)} (snapshot staging ${m(t.reserve.stagingKiB)} + floor ${m(t.reserve.floorKiB)})`],[`headroom`,`${m(t.headroomKiB)} — room for ${n(`hardlink`)} hardlinked trees, ${n(`reconcile`)} lockfile-diverged (reconciling)`],[`measured`,e.at||`—`]]}),Ut=p(()=>{let e=$.value;if(!e)return[];let t=[[`mirror`,m(e.parts.mirror)],[`checkout deps (node_modules)`,m(e.parts.deps)],[`checkout (history + tree + build)`,m(e.parts.checkout)]];for(let[n,r]of Object.entries(e.parts.threads).sort((e,t)=>t[1]-e[1]))t.push([`thread ${n}`,m(r)]);for(let[n,r]of Object.entries(e.parts.homes).sort((e,t)=>t[1]-e[1]))r>=1024&&t.push([`home ${n}`,m(r)]);return t.push([`other (image, /tmp, …)`,m(e.parts.other)]),t});return(ee,d)=>{let p=ne(`RouterLink`);return o(),f(e,{title:W.value||`Resident`,nav:`residents`},{leading:a(()=>[t(p,{class:`back text-sm text-muted no-underline hover:text-primary`,to:`/residents`},{default:a(()=>[...d[0]||=[l(`← All residents`,-1)]]),_:1})]),default:a(()=>[s(`section`,de,[d[8]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Lifecycle`,-1),s(`table`,fe,[s(`tbody`,null,[s(`tr`,pe,[d[1]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state`,-1),s(`td`,me,[t(v,{tone:c(ue)(U.value.state),label:U.value.state},null,8,[`tone`,`label`]),s(`span`,y,i(U.value.state),1)])]),s(`tr`,b,[d[2]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`reason`,-1),s(`td`,x,[U.value.reason?(o(),n(`span`,S,i(U.value.reason),1)):(o(),n(`span`,C,`—`))])]),s(`tr`,w,[d[3]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh error`,-1),s(`td`,T,[c(h)(U.value.lastRefreshError)?(o(),n(`span`,E,i(c(h)(U.value.lastRefreshError)),1)):(o(),n(`span`,D,`—`))])]),s(`tr`,O,[d[4]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last restore`,-1),s(`td`,k,[Q.value?(o(),n(`span`,A,i(Q.value),1)):(o(),n(`span`,j,`—`))])]),s(`tr`,M,[d[5]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`state updated`,-1),s(`td`,N,[c(h)(U.value.updatedAt)?(o(),n(`span`,P,i(c(h)(U.value.updatedAt)),1)):(o(),n(`span`,F,`—`))])]),s(`tr`,I,[d[7]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`idle since`,-1),s(`td`,L,[c(h)(U.value.idleSince)?(o(),n(u,{key:0},[l(i(c(h)(U.value.idleSince))+` `,1),d[6]||=s(`span`,{class:`text-xs text-muted`},`(refresh parked; container may sleep)`,-1)],64)):(o(),n(`span`,R,`awake`))])])])])]),s(`section`,z,[d[15]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pinned facts`,-1),s(`table`,he,[s(`tbody`,null,[s(`tr`,ge,[d[9]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`repository`,-1),s(`td`,_e,[K.value?(o(),n(`a`,{key:0,class:`text-primary`,href:K.value},i(K.value),9,ve)):(o(),n(`span`,ye,i(c(h)(H.value.resource)||`—`),1))])]),s(`tr`,be,[d[10]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`default ref`,-1),s(`td`,xe,i(c(h)(U.value.defaultRef)||c(h)(H.value.defaultRef)||`—`),1)]),s(`tr`,Se,[d[11]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`pinned sha`,-1),s(`td`,Ce,[q.value?(o(),n(`a`,{key:0,class:`text-primary`,href:q.value},i(G.value),9,we)):G.value?(o(),n(`span`,Te,i(G.value),1)):(o(),n(`span`,Ee,`—`))])]),s(`tr`,De,[d[12]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`lockfile hash`,-1),s(`td`,Oe,[c(h)(U.value.lockfileHash)?(o(),n(`span`,ke,i(c(h)(U.value.lockfileHash)),1)):(o(),n(`span`,Ae,`—`))])]),s(`tr`,je,[d[13]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`provisioned`,-1),s(`td`,Me,[c(h)(U.value.provisionedAt)?(o(),n(`span`,Ne,i(c(h)(U.value.provisionedAt)),1)):(o(),n(`span`,Pe,`—`))])]),s(`tr`,Fe,[d[14]||=s(`td`,{class:`w-32 px-2 py-1 align-top text-muted sm:w-48 sm:whitespace-nowrap`},`last refresh`,-1),s(`td`,Ie,[c(h)(U.value.lastRefreshAt)?(o(),n(`span`,Le,i(c(h)(U.value.lastRefreshAt)),1)):(o(),n(`span`,Re,`—`))])])])])]),s(`section`,ze,[d[17]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Disk`,-1),$.value?(o(),n(u,{key:0},[s(`table`,Be,[s(`tbody`,null,[(o(!0),n(u,null,r(Ht.value,([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Ve,i(e),1),s(`td`,He,i(t),1)]))),128))])]),d[16]||=s(`p`,{class:`mb-1 mt-2 text-xs text-muted`},` components (one du, hardlinks counted once — a thread tree shows only what it does not share with the checkout) `,-1),s(`table`,Ue,[s(`tbody`,null,[(o(!0),n(u,null,r(Ut.value,([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,We,i(e),1),s(`td`,Ge,i(t),1)]))),128))])])],64)):(o(),n(`p`,Ke,` not measured yet — the first refresh cycle or attach of this container measures it `))]),s(`section`,qe,[d[18]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Snapshot stamp`,-1),J.value?(o(),n(`table`,Je,[s(`tbody`,null,[(o(),n(u,null,r([`ref`,`sha`,`lockfileHash`,`createdAt`,`mirrorBackupId`,`checkoutBackupId`],e=>s(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Ye,i(e),1),s(`td`,B,[c(h)(J.value[e])?(o(),n(`span`,Xe,i(c(h)(J.value[e])),1)):(o(),n(`span`,Ze,`—`))])])),64))])])):(o(),n(`p`,Qe,`no snapshot recorded`))]),s(`section`,$e,[d[22]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Thread worktrees`,-1),X.value.length>0?(o(),n(u,{key:0},[s(`p`,et,i(Z.value)+` live · `+i(X.value.length-Z.value)+` evicted`,1),s(`div`,tt,[s(`table`,nt,[s(`tbody`,null,[d[21]||=s(`tr`,{class:`text-xs text-muted`},[s(`td`,{class:`px-2 py-1`},`thread`),s(`td`,{class:`px-2 py-1`},`ref · sha`),s(`td`,{class:`px-2 py-1`},`user · deps`),s(`td`,{class:`px-2 py-1`},`bound · last attach`)],-1),(o(!0),n(u,null,r(X.value,e=>(o(),n(`tr`,{key:e.threadKey,class:`border-t border-muted`},[s(`td`,rt,[e.evicted?(o(),n(`span`,it,[l(`evicted `+i(e.evictedAt||`—`),1),e.evictedWhy?(o(),n(u,{key:0},[l(` · `+i(e.evictedWhy),1)],64)):te(``,!0)])):(o(),f(v,{key:1,tone:`green`,label:`live`,tip:`live`})),l(` `+i(e.threadKey),1)]),s(`td`,at,[l(i(e.ref)+` · `,1),e.commitHref?(o(),n(`a`,{key:0,class:`text-primary`,href:e.commitHref},i(e.sha),9,ot)):e.sha?(o(),n(`span`,st,i(e.sha),1)):(o(),n(`span`,ct,`—`))]),s(`td`,lt,[e.user?(o(),n(`span`,ut,i(e.user),1)):(o(),n(`span`,dt,`—`)),d[19]||=l(` · `,-1),e.deps?(o(),n(`span`,ft,i(e.deps),1)):(o(),n(`span`,pt,`—`))]),s(`td`,mt,[e.boundAt?(o(),n(`span`,ht,i(e.boundAt),1)):(o(),n(`span`,gt,`—`)),d[20]||=l(` · `,-1),e.lastAttachAt?(o(),n(`span`,_t,i(e.lastAttachAt),1)):(o(),n(`span`,vt,`—`))])]))),128))])])])],64)):(o(),n(`p`,yt,`no thread worktrees`))]),s(`section`,bt,[d[23]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Pending schedules`,-1),s(`table`,xt,[s(`tbody`,null,[(o(),n(u,null,r([[`refresh`,`refresh`],[`provision run`,`provisionRun`],[`provision deadline`,`provisionDeadline`]],([e,t])=>s(`tr`,{key:t,class:`border-t border-muted`},[s(`td`,St,i(e),1),s(`td`,Ct,i(c(h)(Bt.value[t]??0)||`0`),1)])),64))])])]),s(`section`,wt,[d[25]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Command table`,-1),Y.value.length>0?(o(),n(`table`,Tt,[s(`tbody`,null,[(o(!0),n(u,null,r(Y.value,e=>(o(),n(`tr`,{key:e.name,class:`border-t border-muted`},[s(`td`,Et,i(e.name),1),s(`td`,Dt,[s(`code`,null,i(e.command),1),d[24]||=l(),s(`span`,Ot,i(e.effect),1)])]))),128))])])):(o(),n(`p`,kt,`no command table`))]),s(`section`,At,[d[26]||=s(`h2`,{class:`mb-1.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},`Registry settings`,-1),s(`table`,jt,[s(`tbody`,null,[(o(!0),n(u,null,r([[`onboarded`,c(h)(H.value.onboardedAt)],[`record updated`,c(h)(H.value.updatedAt)],[`provisioning timeout (ms)`,c(h)(H.value.provisioningTimeoutMs)],[`disk budget (MB)`,c(h)(H.value.diskBudgetMb)],[`worktree TTL (days)`,c(h)(H.value.worktreeTtlDays??7)]],([e,t])=>(o(),n(`tr`,{key:e,class:`border-t border-muted`},[s(`td`,Mt,i(e),1),s(`td`,Nt,[t?(o(),n(`span`,Pt,i(t),1)):(o(),n(`span`,Ft,`—`))])]))),128))])])]),s(`p`,It,[d[27]||=l(` Manage from chat: `,-1),s(`code`,Lt,`repo rebuild `+i(W.value),1),d[28]||=l(` · `,-1),s(`code`,Rt,`repo reconfigure `+i(W.value)+` …`,1),d[29]||=l(` · `,-1),s(`code`,zt,`repo offboard `+i(W.value)+` --dry-run`,1)])]),_:1},8,[`title`])}}});export{V as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./AppShell-DPJVhUGP.js";import{An as t,Cn as n,Cr as r,Gr as i,Li as a,Mn as o,Pi as s,Sn as c,Tr as l,Xr as u,_r as d,bn as f,dr as p,hr as m,ji as h,kn as g,ln as _,o as v,rn as y,t as b,xi as x,xn as S,yi as C,yn as w}from"./browser-CCImen5O.js";import{t as T}from"./Tooltip-Dx9YBVEx.js";import{_ as E,a as D,c as O,d as k,f as A,g as j,h as M,i as N,l as P,m as F,n as I,p as L,r as R,s as ee,u as te,y as z}from"./main-DYwRHh0F.js";import{t as B}from"./eventSource-Cv0AFlMi.js";import{t as V}from"./wallClock-x0hjr0J_.js";import{n as ne,r as re}from"./indexFormat-B-pd4r7Y.js";import{A as ie,C as H,D as ae,S as oe,a as se,c as ce,i as le,l as ue,t as de,x as fe}from"./indexRow-BsWcHHVh.js";import"./format-BldUwl_R.js";import{t as U}from"./StatusDot-CFLn-DZ2.js";var pe=[`data-slug`,`data-running`],me=[`open`],he={class:`row flex cursor-pointer list-none flex-wrap items-baseline gap-x-2.5 gap-y-1 rounded-md px-2 py-2 hover:bg-elevated [&::-webkit-details-marker]:hidden`},ge={class:`self-center`},_e={class:`font-mono text-[0.9375rem] font-medium text-highlighted`},ve={class:`text-sm text-toned`},ye={key:0,class:`running shrink-0 rounded border border-ok/25 bg-ok/8 px-1.5 font-mono text-[0.68rem] font-medium tabular-nums text-ok`},be=[`title`],xe={key:2,class:`basis-full pl-[1.9rem] text-xs text-warn`},Se={class:`fold pb-3 pl-[1.9rem] pr-2 pt-0.5`},Ce={key:0,class:`m-0 list-none divide-y divide-(--ui-border-muted) p-0`},we=[`data-run-id`,`data-thread`],Te={class:`pt-[0.3rem]`},Ee={class:`what min-w-0`},De={class:`flex min-w-0 items-baseline gap-2`},Oe=[`title`],ke={key:0,class:`who block truncate text-xs text-dimmed`},Ae=[`href`],je={key:1,class:`who block text-xs text-dimmed`},Me={class:`min-w-0 font-mono text-xs max-sm:col-span-2 max-sm:col-start-2 max-sm:row-start-2`},Ne=[`title`],Pe=[`href`],Fe={key:1},Ie={key:1,class:`font-sans text-dimmed`},Le={key:0,class:`facts-tree block truncate text-dimmed`},Re={class:`user`},ze={class:`deps`},Be=[`title`],Ve={class:`flex items-baseline gap-3 justify-self-end max-sm:col-start-3 max-sm:row-start-1`},He=[`title`],Ue={key:1,class:`py-1 text-xs text-dimmed`},We=[`data-idle`],Ge={key:1},W=o({__name:`ResidentRow`,props:{record:{},runs:{},now:{},open:{type:Boolean}},setup(e){let o=e,p=x(o.open===!0);i(()=>o.open,e=>{e&&(p.value=!0)});function m(e){p.value=e.target.open}let v=w(()=>P(o.record)),b=w(()=>v.value||F(o.record.resource)||`?`),C=w(()=>O(o.record)),T=w(()=>te(C.value.state)),A=w(()=>I.test(v.value)?`/residents/${v.value}`:null),L=w(()=>I.test(v.value)?`https://github.com/${v.value}`:void 0),R=e=>L.value&&/^[0-9a-f]{7,40}$/.test(e)?`${L.value}/commit/${e}`:void 0,z=w(()=>F(o.record.defaultRef)||`?`),B=w(()=>F(C.value.sha).slice(0,8)),V=w(()=>F(C.value.lastRefreshAt)),W=e=>{let t=e?Date.parse(e):NaN;return Number.isFinite(t)?ne(t,o.now):e||`—`},G=w(()=>V.value?W(V.value):``),K=w(()=>ee(o.record)),q=w(()=>K.value?j(K.value):``),J=w(()=>{let e=K.value;if(!e)return null;let t=typeof o.record.diskBudgetMb==`number`?o.record.diskBudgetMb:void 0;return D(e,t)}),Y=w(()=>[`ref ${z.value}`,B.value,G.value?`refreshed ${G.value}`:``,q.value?`disk ${q.value}`:``].filter(Boolean).join(` · `)),X=w(()=>[V.value?`refreshed ${V.value}`:``,K.value?.at?`disk measured ${K.value.at}`:``].filter(Boolean).join(` · `)),Z=w(()=>{let e=K.value,t=J.value;if(!e||!t)return``;let n=t.room.hardlink===null?`room not projected (checkout not measured)`:`room for ${t.room.hardlink} more ${t.room.hardlink===1?`tree`:`trees`}`;return[`${E(t.freeKiB)} free${t.capped?` under the ${E(t.capacityKiB)} cap`:``}`,n,`measured ${W(e.at)}`].join(` · `)}),Q=w(()=>k(o.record)),$=w(()=>{let e=o.runs.map(e=>{let t=re(e.label||H(e.id)),n=N(Q.value,e.threadKey),r=ie(e);return{key:`run:${e.id}`,run:e,agent:t.agent,text:t.snippet??t.scope,who:r.identity,surface:le[r.kind]??r.kind,threadUrl:oe(e),href:fe(e),elapsed:ue(e,o.now),binding:n,treeKiB:n?M(K.value,n.threadKey):null}}),t=new Set(o.runs.map(e=>e.threadKey));for(let n of Q.value)n.evicted||t.has(n.threadKey)||e.push({key:`idle:${n.threadKey}`,text:`idle`,who:``,surface:``,threadUrl:``,href:``,elapsed:``,binding:n,treeKiB:M(K.value,n.threadKey)});return e}),Ke=w(()=>$.value.filter(e=>!e.run).length);return(i,o)=>{let x=l(`RouterLink`);return d(),n(`li`,{class:`resident border-b border-muted first:border-t`,"data-slug":v.value,"data-running":e.runs.length},[f(`details`,{class:`group/fold`,open:p.value,onToggle:m},[f(`summary`,he,[o[2]||=f(`span`,{class:`chev w-3 select-none self-center text-xs text-dimmed transition-transform group-open/fold:rotate-90 motion-reduce:transition-none`,"aria-hidden":`true`},`❯`,-1),f(`span`,ge,[t(U,{tone:T.value,label:C.value.state,tip:C.value.state},null,8,[`tone`,`label`,`tip`])]),f(`span`,_e,a(b.value),1),f(`span`,ve,a(C.value.state),1),e.runs.length>0?(d(),n(`span`,ye,a(e.runs.length)+` running`,1)):c(``,!0),f(`span`,{class:`facts font-mono text-xs text-muted max-sm:basis-full max-sm:pl-[1.9rem] sm:ml-2`,title:X.value||void 0},a(Y.value),9,be),A.value?(d(),S(x,{key:1,class:`detail ml-auto shrink-0 text-xs text-muted no-underline hover:text-highlighted hover:underline`,to:A.value,onClick:o[0]||=y(()=>{},[`stop`])},{default:u(()=>[...o[1]||=[g(`detail ↗`,-1)]]),_:1},8,[`to`])):c(``,!0),C.value.reason?(d(),n(`span`,xe,a(C.value.reason),1)):c(``,!0)]),f(`div`,Se,[$.value.length>0?(d(),n(`ul`,Ce,[(d(!0),n(_,null,r($.value,t=>(d(),n(`li`,{key:t.key,class:s([`grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-3 gap-y-1 py-2 sm:grid-cols-[auto_minmax(0,1fr)_minmax(14rem,22rem)_auto]`,t.run?`run`:`idle`]),"data-run-id":t.run?.id,"data-thread":t.run?void 0:t.binding?.threadKey},[f(`span`,Te,[t.run?(d(),S(U,{key:0,tone:`green`,label:h(ae)(t.run),tip:h(ce)(t.run),pulse:``},null,8,[`label`,`tip`])):(d(),S(U,{key:1,tone:`grey`,label:`idle`,tip:`no run is using this tree`}))]),f(`span`,Ee,[f(`span`,De,[t.agent?(d(),n(`span`,{key:0,class:s([`agent shrink-0 rounded border px-1.5 font-mono text-[0.65rem] font-medium uppercase tracking-wider`,h(de)[h(se)(t.agent)]])},a(t.agent),3)):c(``,!0),f(`span`,{class:s([`text min-w-0 truncate text-[0.8125rem]`,t.run?`text-highlighted`:`text-dimmed`]),title:t.run?t.text:void 0},a(t.text),11,Oe)]),t.run?(d(),n(`span`,ke,[t.who?(d(),n(_,{key:0},[g(`by `+a(t.who),1)],64)):c(``,!0),t.who&&(t.threadUrl||t.surface)?(d(),n(_,{key:1},[g(a(` · `))],64)):c(``,!0),t.threadUrl?(d(),n(`a`,{key:2,class:`text-muted no-underline hover:text-highlighted hover:underline`,href:t.threadUrl,target:`_blank`,rel:`noopener noreferrer`},a(t.surface)+` thread ↗`,9,Ae)):t.surface?(d(),n(_,{key:3},[g(`via `+a(t.surface),1)],64)):c(``,!0)])):t.binding?(d(),n(`span`,je,`last used `+a(W(t.binding.lastAttachAt)),1)):c(``,!0)]),f(`span`,Me,[f(`span`,{class:`tree block truncate text-toned`,title:t.binding&&t.binding.ref||void 0},[t.binding?(d(),n(_,{key:0},[g(a(t.binding.ref||`?`),1),t.binding.sha?(d(),n(_,{key:0},[o[3]||=g(a(` `),-1),o[4]||=f(`span`,{class:`text-dimmed`},`@`,-1),o[5]||=g(a(` `)+` `,-1),R(t.binding.sha)?(d(),n(`a`,{key:0,class:`text-highlighted no-underline hover:underline`,href:R(t.binding.sha)},a(t.binding.sha.slice(0,8)),9,Pe)):(d(),n(`span`,Fe,a(t.binding.sha.slice(0,8)),1))],64)):c(``,!0)],64)):(d(),n(`span`,Ie,`no worktree bound yet`))],8,Ne),t.binding?(d(),n(`span`,Le,[f(`span`,Re,a(t.binding.user||`—`),1),o[6]||=g(` `+a(` · `),-1),f(`span`,ze,a(t.binding.deps||`—`),1),o[7]||=g(` `+a(` · `),-1),f(`span`,{class:s([`size`,t.treeKiB===null?``:`text-muted`]),title:t.treeKiB===null?`size not measured yet`:`on disk`},a(t.treeKiB===null?`—`:h(E)(t.treeKiB)),11,Be)])):c(``,!0)]),f(`span`,Ve,[t.run?(d(),n(`span`,{key:0,class:`elapsed whitespace-nowrap font-mono text-xs tabular-nums text-ok`,title:`running for · started ${h(ne)(t.run.startedAt,e.now)}`},a(t.elapsed),9,He)):c(``,!0),t.run?(d(),S(x,{key:1,class:`open text-xs text-muted no-underline hover:text-highlighted hover:underline`,to:t.href,"aria-label":`open run ${t.run.label||h(H)(t.run.id)}`},{default:u(()=>[...o[8]||=[g(`open ↗`,-1)]]),_:1},8,[`to`,`aria-label`])):c(``,!0)])],10,we))),128))])):(d(),n(`p`,Ue,`nothing on this resident — no run, no worktree`)),f(`p`,{class:`disk mt-2 font-mono text-xs text-dimmed`,"data-idle":Ke.value},[Z.value?(d(),n(_,{key:0},[g(a(Z.value),1)],64)):(d(),n(`span`,Ge,`disk not measured yet`))],8,We)])],40,me)],8,pe)}}}),G={class:`conn flex items-center gap-1.5`},K={id:`state`,class:`text-xs text-muted`},q={class:`mb-2 text-xs text-muted`},J={id:`running`,class:`font-mono tabular-nums`},Y={id:`residents`,class:`m-0 list-none p-0`},X={key:1,class:`px-2 py-1.5 text-muted`},Z=`Resident repos`,Q=o({__name:`ResidentsIndexPage`,setup(o){let s=v(`residents`),c=C({cap:s?.cap,count:s?.count,residents:s?.residents??[],runs:new Map((s?.runs??[]).map(e=>[e.id,e]))}),l=V(s?.now),y=x({tone:`amber`,text:`connecting…`}),E=typeof window<`u`?new URLSearchParams(window.location.search).get(`open`):null,D=w(()=>c.residents.map((e,t)=>{let n=e,r=P(n);return{key:`${r||`?`}-${t}`,record:n,slug:r,runs:L(c.runs.values(),r)}})),O=w(()=>F(c.cap)||`?`),k=w(()=>F(c.count)||String(D.value.length)),j=w(()=>D.value.reduce((e,t)=>e+t.runs.length,0));i([j,()=>c.residents],([e,t])=>{b.setTitle((e>0?`(${e}) `:``)+Z),b.setFavicon(z[A(t)])},{immediate:!0});let M=B(),N=null;return p(()=>{N=M(`/residents?stream=1`);let e=!1;N.onopen=()=>{if(e){b.reload();return}e=!0,y.value={tone:`green`,text:`live`}},N.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}R(c,t)},N.onerror=()=>{N&&N.readyState===2?y.value={tone:`red`,text:`disconnected`}:y.value={tone:`amber`,text:`connecting…`}}}),m(()=>{N?.close()}),(i,o)=>{let s=T;return d(),S(e,{title:Z,nav:`residents`},{status:u(()=>[t(s,{text:`runs arrive from the registry feed; the listing is re-read when a run attaches or ends`},{default:u(()=>[f(`span`,G,[t(U,{tone:y.value.tone,label:y.value.text},null,8,[`tone`,`label`]),f(`span`,K,a(y.value.text),1)])]),_:1})]),default:u(()=>[D.value.length>0?(d(),n(_,{key:0},[f(`p`,q,[g(a(`${k.value}/${O.value} resident slots in use · `),1),f(`span`,J,a(j.value)+` running`,1)]),f(`ul`,Y,[(d(!0),n(_,null,r(D.value,e=>(d(),S(W,{key:e.key,record:e.record,runs:e.runs,now:h(l),open:h(E)!==null&&h(E)===e.slug},null,8,[`record`,`runs`,`now`,`open`]))),128))])],64)):(d(),n(`p`,X,[g(` No repos onboarded (0/`+a(O.value)+`). Onboard one from chat: `,1),o[0]||=f(`code`,{class:`rounded bg-elevated px-1.5 py-0.5`},`repo onboard <owner/name>`,-1),o[1]||=g(`. `,-1)]))]),_:1})}}});export{Q as default};
|
|
1
|
+
import{t as e}from"./AppShell-DPJVhUGP.js";import{An as t,Cn as n,Cr as r,Gr as i,Li as a,Mn as o,Pi as s,Sn as c,Tr as l,Xr as u,_r as d,bn as f,dr as p,hr as m,ji as h,kn as g,ln as _,o as v,rn as y,t as b,xi as x,xn as S,yi as C,yn as w}from"./browser-CCImen5O.js";import{t as T}from"./Tooltip-CmQVfAl2.js";import{_ as E,a as D,c as O,d as k,f as A,g as j,h as M,i as N,l as P,m as F,n as I,p as L,r as R,s as ee,u as te,y as z}from"./main-Bk1L-bNk.js";import{t as B}from"./eventSource-Cv0AFlMi.js";import{t as V}from"./wallClock-x0hjr0J_.js";import{n as ne,r as re}from"./indexFormat-B-pd4r7Y.js";import{A as ie,C as H,D as ae,S as oe,a as se,c as ce,i as le,l as ue,t as de,x as fe}from"./indexRow-BsWcHHVh.js";import"./format-BldUwl_R.js";import{t as U}from"./StatusDot-IkfsHGXg.js";var pe=[`data-slug`,`data-running`],me=[`open`],he={class:`row flex cursor-pointer list-none flex-wrap items-baseline gap-x-2.5 gap-y-1 rounded-md px-2 py-2 hover:bg-elevated [&::-webkit-details-marker]:hidden`},ge={class:`self-center`},_e={class:`font-mono text-[0.9375rem] font-medium text-highlighted`},ve={class:`text-sm text-toned`},ye={key:0,class:`running shrink-0 rounded border border-ok/25 bg-ok/8 px-1.5 font-mono text-[0.68rem] font-medium tabular-nums text-ok`},be=[`title`],xe={key:2,class:`basis-full pl-[1.9rem] text-xs text-warn`},Se={class:`fold pb-3 pl-[1.9rem] pr-2 pt-0.5`},Ce={key:0,class:`m-0 list-none divide-y divide-(--ui-border-muted) p-0`},we=[`data-run-id`,`data-thread`],Te={class:`pt-[0.3rem]`},Ee={class:`what min-w-0`},De={class:`flex min-w-0 items-baseline gap-2`},Oe=[`title`],ke={key:0,class:`who block truncate text-xs text-dimmed`},Ae=[`href`],je={key:1,class:`who block text-xs text-dimmed`},Me={class:`min-w-0 font-mono text-xs max-sm:col-span-2 max-sm:col-start-2 max-sm:row-start-2`},Ne=[`title`],Pe=[`href`],Fe={key:1},Ie={key:1,class:`font-sans text-dimmed`},Le={key:0,class:`facts-tree block truncate text-dimmed`},Re={class:`user`},ze={class:`deps`},Be=[`title`],Ve={class:`flex items-baseline gap-3 justify-self-end max-sm:col-start-3 max-sm:row-start-1`},He=[`title`],Ue={key:1,class:`py-1 text-xs text-dimmed`},We=[`data-idle`],Ge={key:1},W=o({__name:`ResidentRow`,props:{record:{},runs:{},now:{},open:{type:Boolean}},setup(e){let o=e,p=x(o.open===!0);i(()=>o.open,e=>{e&&(p.value=!0)});function m(e){p.value=e.target.open}let v=w(()=>P(o.record)),b=w(()=>v.value||F(o.record.resource)||`?`),C=w(()=>O(o.record)),T=w(()=>te(C.value.state)),A=w(()=>I.test(v.value)?`/residents/${v.value}`:null),L=w(()=>I.test(v.value)?`https://github.com/${v.value}`:void 0),R=e=>L.value&&/^[0-9a-f]{7,40}$/.test(e)?`${L.value}/commit/${e}`:void 0,z=w(()=>F(o.record.defaultRef)||`?`),B=w(()=>F(C.value.sha).slice(0,8)),V=w(()=>F(C.value.lastRefreshAt)),W=e=>{let t=e?Date.parse(e):NaN;return Number.isFinite(t)?ne(t,o.now):e||`—`},G=w(()=>V.value?W(V.value):``),K=w(()=>ee(o.record)),q=w(()=>K.value?j(K.value):``),J=w(()=>{let e=K.value;if(!e)return null;let t=typeof o.record.diskBudgetMb==`number`?o.record.diskBudgetMb:void 0;return D(e,t)}),Y=w(()=>[`ref ${z.value}`,B.value,G.value?`refreshed ${G.value}`:``,q.value?`disk ${q.value}`:``].filter(Boolean).join(` · `)),X=w(()=>[V.value?`refreshed ${V.value}`:``,K.value?.at?`disk measured ${K.value.at}`:``].filter(Boolean).join(` · `)),Z=w(()=>{let e=K.value,t=J.value;if(!e||!t)return``;let n=t.room.hardlink===null?`room not projected (checkout not measured)`:`room for ${t.room.hardlink} more ${t.room.hardlink===1?`tree`:`trees`}`;return[`${E(t.freeKiB)} free${t.capped?` under the ${E(t.capacityKiB)} cap`:``}`,n,`measured ${W(e.at)}`].join(` · `)}),Q=w(()=>k(o.record)),$=w(()=>{let e=o.runs.map(e=>{let t=re(e.label||H(e.id)),n=N(Q.value,e.threadKey),r=ie(e);return{key:`run:${e.id}`,run:e,agent:t.agent,text:t.snippet??t.scope,who:r.identity,surface:le[r.kind]??r.kind,threadUrl:oe(e),href:fe(e),elapsed:ue(e,o.now),binding:n,treeKiB:n?M(K.value,n.threadKey):null}}),t=new Set(o.runs.map(e=>e.threadKey));for(let n of Q.value)n.evicted||t.has(n.threadKey)||e.push({key:`idle:${n.threadKey}`,text:`idle`,who:``,surface:``,threadUrl:``,href:``,elapsed:``,binding:n,treeKiB:M(K.value,n.threadKey)});return e}),Ke=w(()=>$.value.filter(e=>!e.run).length);return(i,o)=>{let x=l(`RouterLink`);return d(),n(`li`,{class:`resident border-b border-muted first:border-t`,"data-slug":v.value,"data-running":e.runs.length},[f(`details`,{class:`group/fold`,open:p.value,onToggle:m},[f(`summary`,he,[o[2]||=f(`span`,{class:`chev w-3 select-none self-center text-xs text-dimmed transition-transform group-open/fold:rotate-90 motion-reduce:transition-none`,"aria-hidden":`true`},`❯`,-1),f(`span`,ge,[t(U,{tone:T.value,label:C.value.state,tip:C.value.state},null,8,[`tone`,`label`,`tip`])]),f(`span`,_e,a(b.value),1),f(`span`,ve,a(C.value.state),1),e.runs.length>0?(d(),n(`span`,ye,a(e.runs.length)+` running`,1)):c(``,!0),f(`span`,{class:`facts font-mono text-xs text-muted max-sm:basis-full max-sm:pl-[1.9rem] sm:ml-2`,title:X.value||void 0},a(Y.value),9,be),A.value?(d(),S(x,{key:1,class:`detail ml-auto shrink-0 text-xs text-muted no-underline hover:text-highlighted hover:underline`,to:A.value,onClick:o[0]||=y(()=>{},[`stop`])},{default:u(()=>[...o[1]||=[g(`detail ↗`,-1)]]),_:1},8,[`to`])):c(``,!0),C.value.reason?(d(),n(`span`,xe,a(C.value.reason),1)):c(``,!0)]),f(`div`,Se,[$.value.length>0?(d(),n(`ul`,Ce,[(d(!0),n(_,null,r($.value,t=>(d(),n(`li`,{key:t.key,class:s([`grid grid-cols-[auto_minmax(0,1fr)_auto] items-start gap-x-3 gap-y-1 py-2 sm:grid-cols-[auto_minmax(0,1fr)_minmax(14rem,22rem)_auto]`,t.run?`run`:`idle`]),"data-run-id":t.run?.id,"data-thread":t.run?void 0:t.binding?.threadKey},[f(`span`,Te,[t.run?(d(),S(U,{key:0,tone:`green`,label:h(ae)(t.run),tip:h(ce)(t.run),pulse:``},null,8,[`label`,`tip`])):(d(),S(U,{key:1,tone:`grey`,label:`idle`,tip:`no run is using this tree`}))]),f(`span`,Ee,[f(`span`,De,[t.agent?(d(),n(`span`,{key:0,class:s([`agent shrink-0 rounded border px-1.5 font-mono text-[0.65rem] font-medium uppercase tracking-wider`,h(de)[h(se)(t.agent)]])},a(t.agent),3)):c(``,!0),f(`span`,{class:s([`text min-w-0 truncate text-[0.8125rem]`,t.run?`text-highlighted`:`text-dimmed`]),title:t.run?t.text:void 0},a(t.text),11,Oe)]),t.run?(d(),n(`span`,ke,[t.who?(d(),n(_,{key:0},[g(`by `+a(t.who),1)],64)):c(``,!0),t.who&&(t.threadUrl||t.surface)?(d(),n(_,{key:1},[g(a(` · `))],64)):c(``,!0),t.threadUrl?(d(),n(`a`,{key:2,class:`text-muted no-underline hover:text-highlighted hover:underline`,href:t.threadUrl,target:`_blank`,rel:`noopener noreferrer`},a(t.surface)+` thread ↗`,9,Ae)):t.surface?(d(),n(_,{key:3},[g(`via `+a(t.surface),1)],64)):c(``,!0)])):t.binding?(d(),n(`span`,je,`last used `+a(W(t.binding.lastAttachAt)),1)):c(``,!0)]),f(`span`,Me,[f(`span`,{class:`tree block truncate text-toned`,title:t.binding&&t.binding.ref||void 0},[t.binding?(d(),n(_,{key:0},[g(a(t.binding.ref||`?`),1),t.binding.sha?(d(),n(_,{key:0},[o[3]||=g(a(` `),-1),o[4]||=f(`span`,{class:`text-dimmed`},`@`,-1),o[5]||=g(a(` `)+` `,-1),R(t.binding.sha)?(d(),n(`a`,{key:0,class:`text-highlighted no-underline hover:underline`,href:R(t.binding.sha)},a(t.binding.sha.slice(0,8)),9,Pe)):(d(),n(`span`,Fe,a(t.binding.sha.slice(0,8)),1))],64)):c(``,!0)],64)):(d(),n(`span`,Ie,`no worktree bound yet`))],8,Ne),t.binding?(d(),n(`span`,Le,[f(`span`,Re,a(t.binding.user||`—`),1),o[6]||=g(` `+a(` · `),-1),f(`span`,ze,a(t.binding.deps||`—`),1),o[7]||=g(` `+a(` · `),-1),f(`span`,{class:s([`size`,t.treeKiB===null?``:`text-muted`]),title:t.treeKiB===null?`size not measured yet`:`on disk`},a(t.treeKiB===null?`—`:h(E)(t.treeKiB)),11,Be)])):c(``,!0)]),f(`span`,Ve,[t.run?(d(),n(`span`,{key:0,class:`elapsed whitespace-nowrap font-mono text-xs tabular-nums text-ok`,title:`running for · started ${h(ne)(t.run.startedAt,e.now)}`},a(t.elapsed),9,He)):c(``,!0),t.run?(d(),S(x,{key:1,class:`open text-xs text-muted no-underline hover:text-highlighted hover:underline`,to:t.href,"aria-label":`open run ${t.run.label||h(H)(t.run.id)}`},{default:u(()=>[...o[8]||=[g(`open ↗`,-1)]]),_:1},8,[`to`,`aria-label`])):c(``,!0)])],10,we))),128))])):(d(),n(`p`,Ue,`nothing on this resident — no run, no worktree`)),f(`p`,{class:`disk mt-2 font-mono text-xs text-dimmed`,"data-idle":Ke.value},[Z.value?(d(),n(_,{key:0},[g(a(Z.value),1)],64)):(d(),n(`span`,Ge,`disk not measured yet`))],8,We)])],40,me)],8,pe)}}}),G={class:`conn flex items-center gap-1.5`},K={id:`state`,class:`text-xs text-muted`},q={class:`mb-2 text-xs text-muted`},J={id:`running`,class:`font-mono tabular-nums`},Y={id:`residents`,class:`m-0 list-none p-0`},X={key:1,class:`px-2 py-1.5 text-muted`},Z=`Resident repos`,Q=o({__name:`ResidentsIndexPage`,setup(o){let s=v(`residents`),c=C({cap:s?.cap,count:s?.count,residents:s?.residents??[],runs:new Map((s?.runs??[]).map(e=>[e.id,e]))}),l=V(s?.now),y=x({tone:`amber`,text:`connecting…`}),E=typeof window<`u`?new URLSearchParams(window.location.search).get(`open`):null,D=w(()=>c.residents.map((e,t)=>{let n=e,r=P(n);return{key:`${r||`?`}-${t}`,record:n,slug:r,runs:L(c.runs.values(),r)}})),O=w(()=>F(c.cap)||`?`),k=w(()=>F(c.count)||String(D.value.length)),j=w(()=>D.value.reduce((e,t)=>e+t.runs.length,0));i([j,()=>c.residents],([e,t])=>{b.setTitle((e>0?`(${e}) `:``)+Z),b.setFavicon(z[A(t)])},{immediate:!0});let M=B(),N=null;return p(()=>{N=M(`/residents?stream=1`);let e=!1;N.onopen=()=>{if(e){b.reload();return}e=!0,y.value={tone:`green`,text:`live`}},N.onmessage=e=>{let t;try{t=JSON.parse(e.data)}catch{return}R(c,t)},N.onerror=()=>{N&&N.readyState===2?y.value={tone:`red`,text:`disconnected`}:y.value={tone:`amber`,text:`connecting…`}}}),m(()=>{N?.close()}),(i,o)=>{let s=T;return d(),S(e,{title:Z,nav:`residents`},{status:u(()=>[t(s,{text:`runs arrive from the registry feed; the listing is re-read when a run attaches or ends`},{default:u(()=>[f(`span`,G,[t(U,{tone:y.value.tone,label:y.value.text},null,8,[`tone`,`label`]),f(`span`,K,a(y.value.text),1)])]),_:1})]),default:u(()=>[D.value.length>0?(d(),n(_,{key:0},[f(`p`,q,[g(a(`${k.value}/${O.value} resident slots in use · `),1),f(`span`,J,a(j.value)+` running`,1)]),f(`ul`,Y,[(d(!0),n(_,null,r(D.value,e=>(d(),S(W,{key:e.key,record:e.record,runs:e.runs,now:h(l),open:h(E)!==null&&h(E)===e.slug},null,8,[`record`,`runs`,`now`,`open`]))),128))])],64)):(d(),n(`p`,X,[g(` No repos onboarded (0/`+a(O.value)+`). Onboard one from chat: `,1),o[0]||=f(`code`,{class:`rounded bg-elevated px-1.5 py-0.5`},`repo onboard <owner/name>`,-1),o[1]||=g(`. `,-1)]))]),_:1})}}});export{Q as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{An as e,Cn as t,Cr as n,Gr as r,Ii as i,Li as a,Mn as o,Pi as s,Sn as c,Tr as l,Xr as u,_r as d,bn as f,dr as p,ir as m,ji as h,kn as g,ln as _,rn as v,t as y,xi as b,xn as x,yn as S}from"./browser-CCImen5O.js";import{r as C,t as w}from"./indexFormat-B-pd4r7Y.js";import{B as T,C as E,D,E as O,G as k,I as A,K as j,L as M,M as N,R as ee,T as te,U as ne,a as P,c as F,l as I,o as L,t as R,x as re,z as ie}from"./indexRow-BsWcHHVh.js";import"./format-BldUwl_R.js";import{n as ae}from"./SlackMark-DB0MGiF5.js";import{c as oe,l as se,n as ce,t as le,w as z}from"./sseReplay-DGRDRLua.js";import{n as ue,t as de}from"./durationTone-CVpX_yIk.js";import{t as B}from"./StatusDot-CFLn-DZ2.js";var fe={merged:`merged`,closed:`closed`,already_landed:`merged`,merge_ready:`merge-ready`,held:`held`,merge_refused:`not merged`,round_cap:`round cap reached`,wall_clock_cap:`out of budget`,review_pending:`review pending`,stopped:`stopped`,aborted:`aborted`,transient:`aborted`,continued:`continuing`,no_verdict:`no verdict`,interrupted:`interrupted`,refused:`refused`,idle:`idle`,idle_expired:`idle expired`,blocked:`blocked`,failed:`failed`};function pe(e){return fe[e]??e}var me={},he={viewBox:`0 0 16 16`,class:`inline-block size-[1em] shrink-0`,"aria-hidden":`true`};function ge(e,n){return d(),t(`svg`,he,[...n[0]||=[f(`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 _e=ae(me,[[`render`,ge]]),V={"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`},ve={getting_ready:`getting ready`,finishing_up:`finishing up`};function ye(e){return V[ve[e]]}var be={id:`timeline`,class:`block mb-4 rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-3`,"data-testid":`timeline`},xe={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},Se={class:`ml-auto flex items-baseline gap-3 font-normal normal-case tracking-normal`},Ce=[`href`],we={class:`lede font-mono text-sm text-toned`},Te={class:`shape tabular-nums`},Ee={key:0,class:`current text-muted`},De={key:0,class:`note mt-0.5 text-xs text-muted`},Oe=[`aria-label`],ke=[`title`,`data-term`],Ae={class:`legend mt-2 flex flex-wrap gap-x-4 gap-y-1 font-mono text-xs`},je=[`title`,`data-term`],Me={class:`term text-muted`},Ne={class:`ms tabular-nums text-toned`},Pe=[`title`],Fe={class:`ranked mt-1 flex flex-col gap-1 font-mono text-xs`},Ie={class:`ms w-14 shrink-0 tabular-nums text-toned`},Le=[`href`,`data-anchor`,`onClick`],Re=[`title`],ze={class:`cut mt-1 flex flex-col gap-1 font-mono text-xs`},Be={class:`ms w-14 shrink-0 tabular-nums text-toned`},Ve=[`href`,`data-anchor`,`onClick`],H=o({__name:`TimelineSection`,props:{vm:{},eventsHref:{}},emits:[`reveal`],setup(e,{emit:r}){let o=e,l=r;function u(e){return`${j(e.ms,`clock`)} ${e.term}${e.hatched?` (in flight)`:``}`}function p(){y.copyText(JSON.stringify(o.vm.debug,null,2))}return(r,o)=>(d(),t(`section`,be,[f(`h2`,xe,[o[0]||=f(`span`,null,`Where the time went`,-1),f(`span`,Se,[e.eventsHref?(d(),t(`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,Ce)):c(``,!0),f(`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:p},` Copy debug JSON `)])]),f(`p`,we,[f(`span`,Te,a(e.vm.shown?e.vm.total:e.vm.lede),1),e.vm.current?(d(),t(`span`,Ee,` · `+a(e.vm.current),1)):c(``,!0)]),(d(!0),t(_,null,n(e.vm.captions,e=>(d(),t(`p`,{key:e,class:`caption mt-0.5 text-xs text-muted`},a(e),1))),128)),e.vm.note?(d(),t(`p`,De,a(e.vm.note),1)):c(``,!0),e.vm.shown?(d(),t(_,{key:1},[f(`div`,{class:`bar mt-2.5 flex h-2 w-full overflow-hidden rounded-sm`,role:`img`,"aria-label":e.vm.lede},[(d(!0),t(_,null,n(e.vm.bar,(e,n)=>(d(),t(`div`,{key:n,class:s([`seg h-full`,[h(V)[e.term],e.hatched?`paint-hatched hatched`:``]]),style:i({width:`${e.pct}%`}),title:u(e),"data-term":e.term},null,14,ke))),128))],8,Oe),f(`ul`,Ae,[(d(!0),t(_,null,n(e.vm.legend,e=>(d(),t(`li`,{key:e.term,class:`flex items-baseline gap-1.5 cursor-help`,title:e.definition,"data-term":e.term},[f(`span`,{class:s([`swatch inline-block size-2 shrink-0 self-center rounded-[2px]`,h(V)[e.term]])},null,2),f(`span`,Me,a(e.term),1),f(`span`,Ne,a(e.text),1)],8,je))),128))]),e.vm.ranked.length>0?(d(),t(_,{key:0},[f(`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,Pe),f(`ol`,Fe,[(d(!0),t(_,null,n(e.vm.ranked,(e,r)=>(d(),t(`li`,{key:r,class:`flex items-baseline gap-2`},[f(`span`,Ie,a(h(j)(e.ms,`clock`)),1),f(`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:v(t=>l(`reveal`,e.anchor),[`prevent`])},a(e.label),9,Le),(d(!0),t(_,null,n(e.facts,e=>(d(),t(`span`,{key:e,class:`fact shrink-0 rounded border border-accented px-1 text-dimmed`},a(e),1))),128))]))),128))])],64)):c(``,!0),e.vm.cut.length>0?(d(),t(_,{key:1},[f(`h3`,{class:`cut-head mt-3 block cursor-help text-xs font-medium text-muted underline decoration-dotted decoration-(--ui-border-accented) underline-offset-2`,title:e.vm.cutNote},` Cut steps `,8,Re),f(`ol`,ze,[(d(!0),t(_,null,n(e.vm.cut,(e,r)=>(d(),t(`li`,{key:r,class:`flex items-baseline gap-2`},[f(`span`,Be,a(h(j)(e.ms,`clock`)),1),f(`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:v(t=>l(`reveal`,e.anchor),[`prevent`])},a(e.label),9,Ve),(d(!0),t(_,null,n(e.facts,e=>(d(),t(`span`,{key:e,class:`fact shrink-0 rounded border border-accented px-1 text-dimmed`},a(e),1))),128))]))),128))])],64)):c(``,!0)],64)):c(``,!0)]))}}),U={"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`},W=`Ranked by each step's own time, its children excluded — the bar counts every instant once.`,G=`Steps still open when the run ended: closed at the run's terminal event and left out of the ranking — the time shown is the cut, not a measurement.`;function He(e){let t=e===`interrupted`?`the interruption`:e===`failed`?`the failure`:e===`stopped_hard`?`the hard stop`:e===`stopped_soft`?`the stop`:void 0;return t?`cut by ${t}`:`cut at the run's end`}var Ue=`currently delivering`,We=`getting ready: not recorded (too large)`,Ge=`no timing data`,Ke=`not loaded (the record has the full shape)`,K={getting_ready:`getting ready`,thinking:`thinking`,tools:`in tools`,finishing_up:`finishing up`};function q(e){let{spans:t,window:n,owner:r}=e,i=e.phase!==`live`,a=ee(t,{window:n,owner:r,finished:i,losses:e.losses}),o=ie(a),s=j(o.totalS*1e3,`clock`),c=t.find(e=>e.name===`request`&&e.parentSpanId===void 0),l=e.phase===`live`?Je(t,r,n):void 0,u=Ye(e,l),d=l?z(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:W,cut:[],cutNote:G,debug:f,lede:s,shown:!1,bar:[],legend:[],ranked:[],note:Ge};let p=qe(c,`restartOfRunId`),m={total:s,current:u,openStep:d,captions:[p===void 0?void 0:`restarted from run ${p}`,A(`before`,J(c,`queuedBeforeMs`)),p===void 0?A(`behind`,J(c,`queuedBehindMs`)):void 0].filter(e=>e!==void 0),rankedNote:W,cutNote:G,debug:f};if(!c)return{...m,lede:s,shown:!1,bar:[],legend:[],ranked:[],cut:[],note:i?We:``};let h=t=>t===`not recorded`?`not recorded${e.truncated?` (too large)`:``}`:t===`not loaded`?Ke:t,g=M(a)&&o.items.length>0,_=g?`${s} — ${o.items.map(({term:e,s:t})=>`${j(t*1e3,`clock`)} ${h(e)}`).join(` · `)}`:a.windowMs>0?`${s} — ${h(Xe(a))}`:s,v=g?o.items.map(({term:t,s:n})=>({term:t,text:j(n*1e3,`clock`),definition:t===`not recorded`&&e.truncated?`${U[t]} (too large)`:U[t]})):[],y=g?Qe(t,c,r,n,e.callTitle,e.phase===`ended`,He(e.endedBy)):{ranked:[],cut:[]};return{...m,lede:_,shown:g,bar:g?Ze(a,l):[],legend:v,ranked:y.ranked,cut:y.cut,note:``}}function J(e,t){let n=e?.attrs[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function qe(e,t){let n=e?.attrs[t];return typeof n==`string`&&n!==``?n:void 0}function Je(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=T(o.name,t);if(e?.kind!==`counted`||Y(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 Y(e,t,n){let r=e,i=new Set;for(;r&&!i.has(r.spanId);){if(i.add(r.spanId),T(r.name,n)?.kind===`background`)return!0;r=r.parentSpanId?t.get(r.parentSpanId):void 0}return!1}function Ye(e,t){return e.phase===`delivering`?Ue:e.phase===`ended`?se(e.delivery??{}):t?`currently ${K[t.bucket]} ${j(t.elapsedMs,`clock`)}`:``}function X(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 Xe(e){let t=[`getting ready`,-1];for(let n of X(e))n[1]>t[1]&&(t=n);return t[0]}function Ze(e,t){let n=[],r=t=>e.windowMs>0?t/e.windowMs*100:0;for(let[i,a]of X(e))if(!(a<=0)){if(t&&K[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 Qe(e,t,n,r,i,a,o){let s=new Map(e.map(e=>[e.spanId,e])),c=new Map;for(let t of e){if(t.parentSpanId===void 0)continue;let e=c.get(t.parentSpanId);e?e.push(t):c.set(t.parentSpanId,[t])}let l=e=>[Math.max(r.start,e.startedAt),Math.min(r.end,e.endedAt??r.end)],u=[],d=[];for(let r of e){if(r===t||r.name===`run.agent`||T(r.name,n)===void 0||Y(r,s,n))continue;let[e,f]=l(r);if(f<=e)continue;let p=(c.get(r.spanId)??[]).map(l).map(([t,n])=>[Math.max(e,t),Math.min(f,n)]).filter(([e,t])=>t>e),m=f-e-$e(p);if(m<=0)continue;let h=r.name.startsWith(`tool.`)&&typeof r.attrs.callId==`string`?r.attrs.callId:void 0,g=h?i?.(h):void 0,_=a&&r.endedAt===void 0;(_?d:u).push({label:g??z(r.name),ms:m,facts:_?[o,...Z(r)]:Z(r),anchor:h?`call-${h}`:`span-${r.spanId}`,startedAt:r.startedAt})}let f=(e,t)=>t.ms-e.ms||e.startedAt-t.startedAt;u.sort(f),d.sort(f);let p=({label:e,ms:t,facts:n,anchor:r})=>({label:e,ms:t,facts:n,anchor:r});return{ranked:u.slice(0,3).map(p),cut:d.map(p)}}function $e(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 Z(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 ${j(t.timeoutMs,`clock`)}`),typeof t.waitedMs==`number`&&n.push(`waited ${j(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 Q(e){return e===`command`?`command`:`agent`}var et=[`data-state`],tt={key:0,class:`loading py-2 font-mono text-xs text-dimmed`},nt={key:1,class:`failed py-2 font-mono text-xs text-warn`},rt=[`data-turn`,`data-anchor`],it={class:`landing-head flex flex-wrap items-baseline gap-x-2 font-mono text-xs text-muted`},at={class:`turn tabular-nums`},ot={class:`what min-w-0 truncate text-toned`},st={key:0,class:`m-0 mt-1 list-none p-0`},ct=o({__name:`RunTimeline`,props:{run:{},land:{},fetch:{}},setup(n){let i=n,o=b(`loading`),s=oe(),v=S(()=>{if(o.value!==`ready`)return null;s.state.traceVersion;let e=i.run,t=e.receivedAt??e.startedAt,n=k(e)??(e.finishedAt===void 0?0:Math.max(0,e.finishedAt-t));return q({spans:s.spanSet(),losses:s.losses(t),window:{start:t,end:t+n},owner:Q(e.agent),totalMs:n,phase:`ended`,delivery:{finishedAt:e.finishedAt,sealedAt:e.sealedAt,replyOk:e.replyOk},...e.truncated===void 0?{}:{truncated:e.truncated},...(e.schema??0)>=2?{}:{untimed:!0},callTitle:s.callHeadline})}),x=S(()=>`/runs/${encodeURIComponent(i.run.id)}/events`),C=e=>`/runs/${encodeURIComponent(i.run.id)}#${e}`;function w(e){y.navigate(C(e))}let T=S(()=>{if(o.value!==`ready`||i.land===void 0)return null;s.state.traceVersion;let e=i.land,t=i.run.session;if(t&&e===t.request)return{anchor:`request`,what:`the request`};let n=t&&t.range!==`broken`?t.range.to:void 0;if(n!==void 0&&e===n&&s.state.reply)return{anchor:`reply`,what:`the reply`};let r=s.landing(e);return r?{anchor:r.anchor,what:E(r.step),step:r.step}:null});function E(e){let t=e.items.find(e=>e.kind===`call`),n=t?.kind===`call`?t.call.headline:void 0;return[e.turn?`thought ${e.turn.chip}`:void 0,n].filter(e=>e!==void 0).join(` · `)||`step ${e.index+1}`}let D=b(null),O=S(()=>T.value?`${i.land}@${T.value.anchor}`:null);return r(O,e=>{e!==null&&m().then(()=>{let e=(T.value?.step?D.value?.querySelector(`li.step`):null)??D.value;e&&(e.scrollIntoView?.({block:`center`}),e.classList.add(`revealed`),setTimeout(()=>e.classList.remove(`revealed`),1500))})}),p(async()=>{let e=i.fetch??((...e)=>globalThis.fetch(...e));try{let t=await e(x.value,{credentials:`same-origin`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=le(await t.text()).filter(e=>e.type!==`replay_note`);for(let e of(i.run.schema??0)>=2?ne(n):n)s.handle(e);s.closePhases(),o.value=`ready`}catch{o.value=`failed`}}),(r,i)=>{let p=l(`RouterLink`);return d(),t(`div`,{class:`runtimeline pl-5`,"data-state":o.value},[o.value===`loading`?(d(),t(`p`,tt,`reading the run's record…`)):o.value===`failed`?(d(),t(`p`,nt,[i[2]||=g(` the run's record could not be read — `,-1),e(p,{class:`text-primary no-underline hover:underline`,to:`/runs/${encodeURIComponent(n.run.id)}`},{default:u(()=>[...i[1]||=[g(`open the run`,-1)]]),_:1},8,[`to`])])):v.value?(d(),t(_,{key:2},[e(H,{vm:v.value,"events-href":x.value,onReveal:w},null,8,[`vm`,`events-href`]),T.value?(d(),t(`div`,{key:0,ref_key:`landingEl`,ref:D,class:`landing mb-4 rounded-lg border border-default px-(--sb-gutter) py-2`,"data-turn":n.land,"data-anchor":T.value.anchor},[f(`p`,it,[f(`span`,at,`turn `+a(n.land),1),f(`span`,ot,`· `+a(T.value.what),1),e(p,{class:`page ml-auto shrink-0 text-primary no-underline hover:underline`,to:C(T.value.anchor),title:`the same step on the run's own page`},{default:u(()=>[...i[3]||=[g(`open on the run's page ↗`,-1)]]),_:1},8,[`to`])]),T.value.step?(d(),t(`ol`,st,[e(ce,{step:T.value.step,onToggleGroup:i[0]||=e=>h(s).toggleGroup(T.value.step)},null,8,[`step`])])):c(``,!0)],8,rt)):c(``,!0)],64)):c(``,!0)],8,et)}}}),lt=[`id`,`data-run-id`,`data-round`,`data-thread`],ut=[`open`],dt={class:`row flex min-w-0 cursor-pointer list-none flex-wrap items-center gap-x-2.5 gap-y-1 px-2 py-2 hover:bg-(--ui-bg-muted) [&::-webkit-details-marker]:hidden`},ft={key:0,class:`round shrink-0 rounded border border-accented px-1.5 font-mono text-[0.7rem] font-medium tabular-nums text-toned`},$={key:2,class:`snippet min-w-0 flex-1 truncate text-muted`},pt={key:3,class:`scope min-w-0 flex-1 truncate text-toned`},mt=[`title`],ht=[`data-heat`],gt={class:`count shrink-0 text-right font-mono text-xs tabular-nums text-dimmed sm:min-w-[6em]`},_t={key:1,class:`row flex min-w-0 flex-wrap items-center gap-x-2.5 gap-y-1 px-2 py-2 hover:bg-(--ui-bg-muted)`},vt={key:0,class:`round shrink-0 rounded border border-accented px-1.5 font-mono text-[0.7rem] font-medium tabular-nums text-toned`},yt={key:2,class:`snippet min-w-0 flex-1 truncate text-muted`},bt={key:3,class:`scope min-w-0 flex-1 truncate text-highlighted`},xt=[`title`],St={class:`elapsed shrink-0 text-right font-mono text-xs tabular-nums text-ok sm:min-w-[4.5em]`,title:`running for`},Ct={class:`count shrink-0 text-right font-mono text-xs tabular-nums text-dimmed sm:min-w-[6em]`},wt=o({__name:`RunFoldRow`,props:{run:{},now:{},label:{},open:{type:Boolean},land:{}},setup(n){let o=n,p=b(o.open===!0);r(()=>o.open,e=>{e&&(p.value=!0)});let m=S(()=>C(o.run.label||E(o.run.id))),_=S(()=>te(o.run)),y=S(()=>re(o.run)),T=S(()=>o.run.finished),k=S(()=>o.run.finished&&o.run.status&&o.run.status!==`completed`?O(o.run.status):``),A=S(()=>de(o.run.finished&&typeof o.run.finishedAt==`number`?o.run.finishedAt-o.run.startedAt:void 0,`run`)),j=S(()=>ue(A.value));function M(e){p.value=e.target.open}return(r,o)=>{let b=l(`RouterLink`);return d(),t(`li`,{id:`run-${n.run.id}`,class:s([`fold group border-b border-muted`,n.run.finished?`finished`:`live`]),"data-run-id":n.run.id,"data-round":n.run.round,"data-thread":n.run.thread},[T.value?(d(),t(`details`,{key:0,class:`group/fold`,open:p.value,onToggle:M},[f(`summary`,dt,[o[2]||=f(`span`,{class:`chev select-none text-xs text-dimmed transition-transform group-open/fold:rotate-90 motion-reduce:transition-none`,"aria-hidden":`true`},`❯`,-1),e(B,{tone:_.value,label:h(D)(n.run),tip:h(F)(n.run)},null,8,[`tone`,`label`,`tip`]),n.label?(d(),t(`span`,ft,a(n.label),1)):c(``,!0),m.value.agent?(d(),t(`span`,{key:1,class:s([`agent shrink-0 rounded border px-1.5 font-mono text-[0.68rem] font-medium uppercase tracking-wider opacity-55`,h(R)[h(P)(m.value.agent)]])},a(m.value.agent),3)):c(``,!0),m.value.snippet===void 0?(d(),t(`span`,pt,a(m.value.scope),1)):(d(),t(`span`,$,a(m.value.snippet),1)),k.value?(d(),t(`span`,{key:4,class:s([`outcome shrink-0 rounded border px-1.5 font-mono text-[0.7rem]`,_.value===`red`?`border-bad/30 text-bad`:`border-warn/30 text-warn`])},a(k.value),3)):c(``,!0),f(`span`,{class:`when shrink-0 font-mono text-xs tabular-nums text-dimmed`,title:h(N)(n.run)},a(h(w)(n.run.startedAt,n.now)),9,mt),f(`span`,{class:s([`elapsed shrink-0 text-right font-mono text-xs tabular-nums sm:min-w-[4.5em]`,[j.value?`heat`:`text-muted`,A.value.level>=2?`font-medium`:``]]),style:i(j.value),"data-heat":A.value.level,title:`start to finish`},a(h(I)(n.run,n.now)),15,ht),f(`span`,gt,a(h(L)(n.run)),1),e(b,{class:`open shrink-0 font-mono text-xs text-primary no-underline hover:underline`,to:y.value,"aria-label":`open run ${n.run.label||h(E)(n.run.id)}`,onClick:o[0]||=v(()=>{},[`stop`])},{default:u(()=>[...o[1]||=[g(`open ↗`,-1)]]),_:1},8,[`to`,`aria-label`])]),p.value?(d(),x(ct,{key:0,run:n.run,land:n.land},null,8,[`run`,`land`])):c(``,!0)],40,ut)):(d(),t(`div`,_t,[o[4]||=f(`span`,{class:`chev select-none text-xs text-transparent`,"aria-hidden":`true`},`❯`,-1),e(B,{tone:_.value,label:h(D)(n.run),tip:h(F)(n.run),pulse:``},null,8,[`tone`,`label`,`tip`]),n.label?(d(),t(`span`,vt,a(n.label),1)):c(``,!0),m.value.agent?(d(),t(`span`,{key:1,class:s([`agent shrink-0 rounded border px-1.5 font-mono text-[0.68rem] font-medium uppercase tracking-wider`,h(R)[h(P)(m.value.agent)]])},a(m.value.agent),3)):c(``,!0),m.value.snippet===void 0?(d(),t(`span`,bt,a(m.value.scope),1)):(d(),t(`span`,yt,a(m.value.snippet),1)),f(`span`,{class:`when shrink-0 font-mono text-xs tabular-nums text-muted`,title:h(N)(n.run)},a(h(w)(n.run.startedAt,n.now)),9,xt),f(`span`,St,a(h(I)(n.run,n.now)),1),f(`span`,Ct,a(h(L)(n.run)),1),e(b,{class:`open shrink-0 font-mono text-xs text-primary no-underline hover:underline`,to:y.value,"aria-label":`open run ${n.run.label||h(E)(n.run.id)}`},{default:u(()=>[...o[3]||=[g(`open ↗`,-1)]]),_:1},8,[`to`,`aria-label`])]))],10,lt)}}});export{ye as a,H as i,Q as n,_e as o,q as r,pe as s,wt as t};
|
|
1
|
+
import{An as e,Cn as t,Cr as n,Gr as r,Ii as i,Li as a,Mn as o,Pi as s,Sn as c,Tr as l,Xr as u,_r as d,bn as f,dr as p,ir as m,ji as h,kn as g,ln as _,rn as v,t as y,xi as b,xn as x,yn as S}from"./browser-CCImen5O.js";import{r as C,t as w}from"./indexFormat-B-pd4r7Y.js";import{B as T,C as E,D,E as O,G as k,I as A,K as j,L as M,M as N,R as ee,T as te,U as ne,a as P,c as F,l as I,o as L,t as R,x as re,z as ie}from"./indexRow-BsWcHHVh.js";import"./format-BldUwl_R.js";import{n as ae}from"./SlackMark-DB0MGiF5.js";import{c as oe,l as se,n as ce,t as le,w as z}from"./sseReplay-DGRDRLua.js";import{n as ue,t as de}from"./durationTone-CVpX_yIk.js";import{t as B}from"./StatusDot-IkfsHGXg.js";var fe={merged:`merged`,closed:`closed`,already_landed:`merged`,merge_ready:`merge-ready`,held:`held`,merge_refused:`not merged`,round_cap:`round cap reached`,wall_clock_cap:`out of budget`,review_pending:`review pending`,stopped:`stopped`,aborted:`aborted`,transient:`aborted`,continued:`continuing`,no_verdict:`no verdict`,interrupted:`interrupted`,refused:`refused`,idle:`idle`,idle_expired:`idle expired`,blocked:`blocked`,failed:`failed`};function pe(e){return fe[e]??e}var me={},he={viewBox:`0 0 16 16`,class:`inline-block size-[1em] shrink-0`,"aria-hidden":`true`};function ge(e,n){return d(),t(`svg`,he,[...n[0]||=[f(`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 _e=ae(me,[[`render`,ge]]),V={"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`},ve={getting_ready:`getting ready`,finishing_up:`finishing up`};function ye(e){return V[ve[e]]}var be={id:`timeline`,class:`block mb-4 rounded-lg border border-default bg-(--ui-bg-muted) px-(--sb-gutter) py-3`,"data-testid":`timeline`},xe={class:`mb-2 flex items-baseline gap-2.5 font-mono text-xs font-medium uppercase tracking-wider text-muted`},Se={class:`ml-auto flex items-baseline gap-3 font-normal normal-case tracking-normal`},Ce=[`href`],we={class:`lede font-mono text-sm text-toned`},Te={class:`shape tabular-nums`},Ee={key:0,class:`current text-muted`},De={key:0,class:`note mt-0.5 text-xs text-muted`},Oe=[`aria-label`],ke=[`title`,`data-term`],Ae={class:`legend mt-2 flex flex-wrap gap-x-4 gap-y-1 font-mono text-xs`},je=[`title`,`data-term`],Me={class:`term text-muted`},Ne={class:`ms tabular-nums text-toned`},Pe=[`title`],Fe={class:`ranked mt-1 flex flex-col gap-1 font-mono text-xs`},Ie={class:`ms w-14 shrink-0 tabular-nums text-toned`},Le=[`href`,`data-anchor`,`onClick`],Re=[`title`],ze={class:`cut mt-1 flex flex-col gap-1 font-mono text-xs`},Be={class:`ms w-14 shrink-0 tabular-nums text-toned`},Ve=[`href`,`data-anchor`,`onClick`],H=o({__name:`TimelineSection`,props:{vm:{},eventsHref:{}},emits:[`reveal`],setup(e,{emit:r}){let o=e,l=r;function u(e){return`${j(e.ms,`clock`)} ${e.term}${e.hatched?` (in flight)`:``}`}function p(){y.copyText(JSON.stringify(o.vm.debug,null,2))}return(r,o)=>(d(),t(`section`,be,[f(`h2`,xe,[o[0]||=f(`span`,null,`Where the time went`,-1),f(`span`,Se,[e.eventsHref?(d(),t(`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,Ce)):c(``,!0),f(`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:p},` Copy debug JSON `)])]),f(`p`,we,[f(`span`,Te,a(e.vm.shown?e.vm.total:e.vm.lede),1),e.vm.current?(d(),t(`span`,Ee,` · `+a(e.vm.current),1)):c(``,!0)]),(d(!0),t(_,null,n(e.vm.captions,e=>(d(),t(`p`,{key:e,class:`caption mt-0.5 text-xs text-muted`},a(e),1))),128)),e.vm.note?(d(),t(`p`,De,a(e.vm.note),1)):c(``,!0),e.vm.shown?(d(),t(_,{key:1},[f(`div`,{class:`bar mt-2.5 flex h-2 w-full overflow-hidden rounded-sm`,role:`img`,"aria-label":e.vm.lede},[(d(!0),t(_,null,n(e.vm.bar,(e,n)=>(d(),t(`div`,{key:n,class:s([`seg h-full`,[h(V)[e.term],e.hatched?`paint-hatched hatched`:``]]),style:i({width:`${e.pct}%`}),title:u(e),"data-term":e.term},null,14,ke))),128))],8,Oe),f(`ul`,Ae,[(d(!0),t(_,null,n(e.vm.legend,e=>(d(),t(`li`,{key:e.term,class:`flex items-baseline gap-1.5 cursor-help`,title:e.definition,"data-term":e.term},[f(`span`,{class:s([`swatch inline-block size-2 shrink-0 self-center rounded-[2px]`,h(V)[e.term]])},null,2),f(`span`,Me,a(e.term),1),f(`span`,Ne,a(e.text),1)],8,je))),128))]),e.vm.ranked.length>0?(d(),t(_,{key:0},[f(`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,Pe),f(`ol`,Fe,[(d(!0),t(_,null,n(e.vm.ranked,(e,r)=>(d(),t(`li`,{key:r,class:`flex items-baseline gap-2`},[f(`span`,Ie,a(h(j)(e.ms,`clock`)),1),f(`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:v(t=>l(`reveal`,e.anchor),[`prevent`])},a(e.label),9,Le),(d(!0),t(_,null,n(e.facts,e=>(d(),t(`span`,{key:e,class:`fact shrink-0 rounded border border-accented px-1 text-dimmed`},a(e),1))),128))]))),128))])],64)):c(``,!0),e.vm.cut.length>0?(d(),t(_,{key:1},[f(`h3`,{class:`cut-head mt-3 block cursor-help text-xs font-medium text-muted underline decoration-dotted decoration-(--ui-border-accented) underline-offset-2`,title:e.vm.cutNote},` Cut steps `,8,Re),f(`ol`,ze,[(d(!0),t(_,null,n(e.vm.cut,(e,r)=>(d(),t(`li`,{key:r,class:`flex items-baseline gap-2`},[f(`span`,Be,a(h(j)(e.ms,`clock`)),1),f(`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:v(t=>l(`reveal`,e.anchor),[`prevent`])},a(e.label),9,Ve),(d(!0),t(_,null,n(e.facts,e=>(d(),t(`span`,{key:e,class:`fact shrink-0 rounded border border-accented px-1 text-dimmed`},a(e),1))),128))]))),128))])],64)):c(``,!0)],64)):c(``,!0)]))}}),U={"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`},W=`Ranked by each step's own time, its children excluded — the bar counts every instant once.`,G=`Steps still open when the run ended: closed at the run's terminal event and left out of the ranking — the time shown is the cut, not a measurement.`;function He(e){let t=e===`interrupted`?`the interruption`:e===`failed`?`the failure`:e===`stopped_hard`?`the hard stop`:e===`stopped_soft`?`the stop`:void 0;return t?`cut by ${t}`:`cut at the run's end`}var Ue=`currently delivering`,We=`getting ready: not recorded (too large)`,Ge=`no timing data`,Ke=`not loaded (the record has the full shape)`,K={getting_ready:`getting ready`,thinking:`thinking`,tools:`in tools`,finishing_up:`finishing up`};function q(e){let{spans:t,window:n,owner:r}=e,i=e.phase!==`live`,a=ee(t,{window:n,owner:r,finished:i,losses:e.losses}),o=ie(a),s=j(o.totalS*1e3,`clock`),c=t.find(e=>e.name===`request`&&e.parentSpanId===void 0),l=e.phase===`live`?Je(t,r,n):void 0,u=Ye(e,l),d=l?z(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:W,cut:[],cutNote:G,debug:f,lede:s,shown:!1,bar:[],legend:[],ranked:[],note:Ge};let p=qe(c,`restartOfRunId`),m={total:s,current:u,openStep:d,captions:[p===void 0?void 0:`restarted from run ${p}`,A(`before`,J(c,`queuedBeforeMs`)),p===void 0?A(`behind`,J(c,`queuedBehindMs`)):void 0].filter(e=>e!==void 0),rankedNote:W,cutNote:G,debug:f};if(!c)return{...m,lede:s,shown:!1,bar:[],legend:[],ranked:[],cut:[],note:i?We:``};let h=t=>t===`not recorded`?`not recorded${e.truncated?` (too large)`:``}`:t===`not loaded`?Ke:t,g=M(a)&&o.items.length>0,_=g?`${s} — ${o.items.map(({term:e,s:t})=>`${j(t*1e3,`clock`)} ${h(e)}`).join(` · `)}`:a.windowMs>0?`${s} — ${h(Xe(a))}`:s,v=g?o.items.map(({term:t,s:n})=>({term:t,text:j(n*1e3,`clock`),definition:t===`not recorded`&&e.truncated?`${U[t]} (too large)`:U[t]})):[],y=g?Qe(t,c,r,n,e.callTitle,e.phase===`ended`,He(e.endedBy)):{ranked:[],cut:[]};return{...m,lede:_,shown:g,bar:g?Ze(a,l):[],legend:v,ranked:y.ranked,cut:y.cut,note:``}}function J(e,t){let n=e?.attrs[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function qe(e,t){let n=e?.attrs[t];return typeof n==`string`&&n!==``?n:void 0}function Je(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=T(o.name,t);if(e?.kind!==`counted`||Y(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 Y(e,t,n){let r=e,i=new Set;for(;r&&!i.has(r.spanId);){if(i.add(r.spanId),T(r.name,n)?.kind===`background`)return!0;r=r.parentSpanId?t.get(r.parentSpanId):void 0}return!1}function Ye(e,t){return e.phase===`delivering`?Ue:e.phase===`ended`?se(e.delivery??{}):t?`currently ${K[t.bucket]} ${j(t.elapsedMs,`clock`)}`:``}function X(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 Xe(e){let t=[`getting ready`,-1];for(let n of X(e))n[1]>t[1]&&(t=n);return t[0]}function Ze(e,t){let n=[],r=t=>e.windowMs>0?t/e.windowMs*100:0;for(let[i,a]of X(e))if(!(a<=0)){if(t&&K[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 Qe(e,t,n,r,i,a,o){let s=new Map(e.map(e=>[e.spanId,e])),c=new Map;for(let t of e){if(t.parentSpanId===void 0)continue;let e=c.get(t.parentSpanId);e?e.push(t):c.set(t.parentSpanId,[t])}let l=e=>[Math.max(r.start,e.startedAt),Math.min(r.end,e.endedAt??r.end)],u=[],d=[];for(let r of e){if(r===t||r.name===`run.agent`||T(r.name,n)===void 0||Y(r,s,n))continue;let[e,f]=l(r);if(f<=e)continue;let p=(c.get(r.spanId)??[]).map(l).map(([t,n])=>[Math.max(e,t),Math.min(f,n)]).filter(([e,t])=>t>e),m=f-e-$e(p);if(m<=0)continue;let h=r.name.startsWith(`tool.`)&&typeof r.attrs.callId==`string`?r.attrs.callId:void 0,g=h?i?.(h):void 0,_=a&&r.endedAt===void 0;(_?d:u).push({label:g??z(r.name),ms:m,facts:_?[o,...Z(r)]:Z(r),anchor:h?`call-${h}`:`span-${r.spanId}`,startedAt:r.startedAt})}let f=(e,t)=>t.ms-e.ms||e.startedAt-t.startedAt;u.sort(f),d.sort(f);let p=({label:e,ms:t,facts:n,anchor:r})=>({label:e,ms:t,facts:n,anchor:r});return{ranked:u.slice(0,3).map(p),cut:d.map(p)}}function $e(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 Z(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 ${j(t.timeoutMs,`clock`)}`),typeof t.waitedMs==`number`&&n.push(`waited ${j(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 Q(e){return e===`command`?`command`:`agent`}var et=[`data-state`],tt={key:0,class:`loading py-2 font-mono text-xs text-dimmed`},nt={key:1,class:`failed py-2 font-mono text-xs text-warn`},rt=[`data-turn`,`data-anchor`],it={class:`landing-head flex flex-wrap items-baseline gap-x-2 font-mono text-xs text-muted`},at={class:`turn tabular-nums`},ot={class:`what min-w-0 truncate text-toned`},st={key:0,class:`m-0 mt-1 list-none p-0`},ct=o({__name:`RunTimeline`,props:{run:{},land:{},fetch:{}},setup(n){let i=n,o=b(`loading`),s=oe(),v=S(()=>{if(o.value!==`ready`)return null;s.state.traceVersion;let e=i.run,t=e.receivedAt??e.startedAt,n=k(e)??(e.finishedAt===void 0?0:Math.max(0,e.finishedAt-t));return q({spans:s.spanSet(),losses:s.losses(t),window:{start:t,end:t+n},owner:Q(e.agent),totalMs:n,phase:`ended`,delivery:{finishedAt:e.finishedAt,sealedAt:e.sealedAt,replyOk:e.replyOk},...e.truncated===void 0?{}:{truncated:e.truncated},...(e.schema??0)>=2?{}:{untimed:!0},callTitle:s.callHeadline})}),x=S(()=>`/runs/${encodeURIComponent(i.run.id)}/events`),C=e=>`/runs/${encodeURIComponent(i.run.id)}#${e}`;function w(e){y.navigate(C(e))}let T=S(()=>{if(o.value!==`ready`||i.land===void 0)return null;s.state.traceVersion;let e=i.land,t=i.run.session;if(t&&e===t.request)return{anchor:`request`,what:`the request`};let n=t&&t.range!==`broken`?t.range.to:void 0;if(n!==void 0&&e===n&&s.state.reply)return{anchor:`reply`,what:`the reply`};let r=s.landing(e);return r?{anchor:r.anchor,what:E(r.step),step:r.step}:null});function E(e){let t=e.items.find(e=>e.kind===`call`),n=t?.kind===`call`?t.call.headline:void 0;return[e.turn?`thought ${e.turn.chip}`:void 0,n].filter(e=>e!==void 0).join(` · `)||`step ${e.index+1}`}let D=b(null),O=S(()=>T.value?`${i.land}@${T.value.anchor}`:null);return r(O,e=>{e!==null&&m().then(()=>{let e=(T.value?.step?D.value?.querySelector(`li.step`):null)??D.value;e&&(e.scrollIntoView?.({block:`center`}),e.classList.add(`revealed`),setTimeout(()=>e.classList.remove(`revealed`),1500))})}),p(async()=>{let e=i.fetch??((...e)=>globalThis.fetch(...e));try{let t=await e(x.value,{credentials:`same-origin`});if(!t.ok)throw Error(`HTTP ${t.status}`);let n=le(await t.text()).filter(e=>e.type!==`replay_note`);for(let e of(i.run.schema??0)>=2?ne(n):n)s.handle(e);s.closePhases(),o.value=`ready`}catch{o.value=`failed`}}),(r,i)=>{let p=l(`RouterLink`);return d(),t(`div`,{class:`runtimeline pl-5`,"data-state":o.value},[o.value===`loading`?(d(),t(`p`,tt,`reading the run's record…`)):o.value===`failed`?(d(),t(`p`,nt,[i[2]||=g(` the run's record could not be read — `,-1),e(p,{class:`text-primary no-underline hover:underline`,to:`/runs/${encodeURIComponent(n.run.id)}`},{default:u(()=>[...i[1]||=[g(`open the run`,-1)]]),_:1},8,[`to`])])):v.value?(d(),t(_,{key:2},[e(H,{vm:v.value,"events-href":x.value,onReveal:w},null,8,[`vm`,`events-href`]),T.value?(d(),t(`div`,{key:0,ref_key:`landingEl`,ref:D,class:`landing mb-4 rounded-lg border border-default px-(--sb-gutter) py-2`,"data-turn":n.land,"data-anchor":T.value.anchor},[f(`p`,it,[f(`span`,at,`turn `+a(n.land),1),f(`span`,ot,`· `+a(T.value.what),1),e(p,{class:`page ml-auto shrink-0 text-primary no-underline hover:underline`,to:C(T.value.anchor),title:`the same step on the run's own page`},{default:u(()=>[...i[3]||=[g(`open on the run's page ↗`,-1)]]),_:1},8,[`to`])]),T.value.step?(d(),t(`ol`,st,[e(ce,{step:T.value.step,onToggleGroup:i[0]||=e=>h(s).toggleGroup(T.value.step)},null,8,[`step`])])):c(``,!0)],8,rt)):c(``,!0)],64)):c(``,!0)],8,et)}}}),lt=[`id`,`data-run-id`,`data-round`,`data-thread`],ut=[`open`],dt={class:`row flex min-w-0 cursor-pointer list-none flex-wrap items-center gap-x-2.5 gap-y-1 px-2 py-2 hover:bg-(--ui-bg-muted) [&::-webkit-details-marker]:hidden`},ft={key:0,class:`round shrink-0 rounded border border-accented px-1.5 font-mono text-[0.7rem] font-medium tabular-nums text-toned`},$={key:2,class:`snippet min-w-0 flex-1 truncate text-muted`},pt={key:3,class:`scope min-w-0 flex-1 truncate text-toned`},mt=[`title`],ht=[`data-heat`],gt={class:`count shrink-0 text-right font-mono text-xs tabular-nums text-dimmed sm:min-w-[6em]`},_t={key:1,class:`row flex min-w-0 flex-wrap items-center gap-x-2.5 gap-y-1 px-2 py-2 hover:bg-(--ui-bg-muted)`},vt={key:0,class:`round shrink-0 rounded border border-accented px-1.5 font-mono text-[0.7rem] font-medium tabular-nums text-toned`},yt={key:2,class:`snippet min-w-0 flex-1 truncate text-muted`},bt={key:3,class:`scope min-w-0 flex-1 truncate text-highlighted`},xt=[`title`],St={class:`elapsed shrink-0 text-right font-mono text-xs tabular-nums text-ok sm:min-w-[4.5em]`,title:`running for`},Ct={class:`count shrink-0 text-right font-mono text-xs tabular-nums text-dimmed sm:min-w-[6em]`},wt=o({__name:`RunFoldRow`,props:{run:{},now:{},label:{},open:{type:Boolean},land:{}},setup(n){let o=n,p=b(o.open===!0);r(()=>o.open,e=>{e&&(p.value=!0)});let m=S(()=>C(o.run.label||E(o.run.id))),_=S(()=>te(o.run)),y=S(()=>re(o.run)),T=S(()=>o.run.finished),k=S(()=>o.run.finished&&o.run.status&&o.run.status!==`completed`?O(o.run.status):``),A=S(()=>de(o.run.finished&&typeof o.run.finishedAt==`number`?o.run.finishedAt-o.run.startedAt:void 0,`run`)),j=S(()=>ue(A.value));function M(e){p.value=e.target.open}return(r,o)=>{let b=l(`RouterLink`);return d(),t(`li`,{id:`run-${n.run.id}`,class:s([`fold group border-b border-muted`,n.run.finished?`finished`:`live`]),"data-run-id":n.run.id,"data-round":n.run.round,"data-thread":n.run.thread},[T.value?(d(),t(`details`,{key:0,class:`group/fold`,open:p.value,onToggle:M},[f(`summary`,dt,[o[2]||=f(`span`,{class:`chev select-none text-xs text-dimmed transition-transform group-open/fold:rotate-90 motion-reduce:transition-none`,"aria-hidden":`true`},`❯`,-1),e(B,{tone:_.value,label:h(D)(n.run),tip:h(F)(n.run)},null,8,[`tone`,`label`,`tip`]),n.label?(d(),t(`span`,ft,a(n.label),1)):c(``,!0),m.value.agent?(d(),t(`span`,{key:1,class:s([`agent shrink-0 rounded border px-1.5 font-mono text-[0.68rem] font-medium uppercase tracking-wider opacity-55`,h(R)[h(P)(m.value.agent)]])},a(m.value.agent),3)):c(``,!0),m.value.snippet===void 0?(d(),t(`span`,pt,a(m.value.scope),1)):(d(),t(`span`,$,a(m.value.snippet),1)),k.value?(d(),t(`span`,{key:4,class:s([`outcome shrink-0 rounded border px-1.5 font-mono text-[0.7rem]`,_.value===`red`?`border-bad/30 text-bad`:`border-warn/30 text-warn`])},a(k.value),3)):c(``,!0),f(`span`,{class:`when shrink-0 font-mono text-xs tabular-nums text-dimmed`,title:h(N)(n.run)},a(h(w)(n.run.startedAt,n.now)),9,mt),f(`span`,{class:s([`elapsed shrink-0 text-right font-mono text-xs tabular-nums sm:min-w-[4.5em]`,[j.value?`heat`:`text-muted`,A.value.level>=2?`font-medium`:``]]),style:i(j.value),"data-heat":A.value.level,title:`start to finish`},a(h(I)(n.run,n.now)),15,ht),f(`span`,gt,a(h(L)(n.run)),1),e(b,{class:`open shrink-0 font-mono text-xs text-primary no-underline hover:underline`,to:y.value,"aria-label":`open run ${n.run.label||h(E)(n.run.id)}`,onClick:o[0]||=v(()=>{},[`stop`])},{default:u(()=>[...o[1]||=[g(`open ↗`,-1)]]),_:1},8,[`to`,`aria-label`])]),p.value?(d(),x(ct,{key:0,run:n.run,land:n.land},null,8,[`run`,`land`])):c(``,!0)],40,ut)):(d(),t(`div`,_t,[o[4]||=f(`span`,{class:`chev select-none text-xs text-transparent`,"aria-hidden":`true`},`❯`,-1),e(B,{tone:_.value,label:h(D)(n.run),tip:h(F)(n.run),pulse:``},null,8,[`tone`,`label`,`tip`]),n.label?(d(),t(`span`,vt,a(n.label),1)):c(``,!0),m.value.agent?(d(),t(`span`,{key:1,class:s([`agent shrink-0 rounded border px-1.5 font-mono text-[0.68rem] font-medium uppercase tracking-wider`,h(R)[h(P)(m.value.agent)]])},a(m.value.agent),3)):c(``,!0),m.value.snippet===void 0?(d(),t(`span`,bt,a(m.value.scope),1)):(d(),t(`span`,yt,a(m.value.snippet),1)),f(`span`,{class:`when shrink-0 font-mono text-xs tabular-nums text-muted`,title:h(N)(n.run)},a(h(w)(n.run.startedAt,n.now)),9,xt),f(`span`,St,a(h(I)(n.run,n.now)),1),f(`span`,Ct,a(h(L)(n.run)),1),e(b,{class:`open shrink-0 font-mono text-xs text-primary no-underline hover:underline`,to:y.value,"aria-label":`open run ${n.run.label||h(E)(n.run.id)}`},{default:u(()=>[...o[3]||=[g(`open ↗`,-1)]]),_:1},8,[`to`,`aria-label`])]))],10,lt)}}});export{ye as a,H as i,Q as n,_e as o,q as r,pe as s,wt as t};
|