@open-mercato/cezar 0.19.0 → 0.20.0-pr1372.4752

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/contract/index.js +4 -1
  2. package/dist/contract/repo.d.ts +3 -1
  3. package/dist/git-worktree.d.ts +2 -1
  4. package/dist/git-worktree.js +7 -2
  5. package/dist/git-worktree.js.map +1 -1
  6. package/dist/index.js +3 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/runs/retention.d.ts +9 -2
  9. package/dist/runs/retention.js +23 -4
  10. package/dist/runs/retention.js.map +1 -1
  11. package/dist/server/server.d.ts +12 -10
  12. package/dist/server/server.js +27 -2
  13. package/dist/server/server.js.map +1 -1
  14. package/dist/worktree-in-use.d.ts +25 -0
  15. package/dist/worktree-in-use.js +274 -0
  16. package/dist/worktree-in-use.js.map +1 -0
  17. package/dist/worktree-lifecycle/coordinator.js +4 -0
  18. package/dist/worktree-lifecycle/coordinator.js.map +1 -1
  19. package/package.json +3 -3
  20. package/web/dist/assets/{agent-task-pickers-C6pdeuHJ.js → agent-task-pickers-C0lbPIio.js} +1 -1
  21. package/web/dist/assets/{alert-dialog-DsAKVB9U.js → alert-dialog-D7_6EawW.js} +1 -1
  22. package/web/dist/assets/arrow-left-Ci5OwIMH.js +1 -0
  23. package/web/dist/assets/{arrow-up-DerG9eQK.js → arrow-up-Pd8kIuRY.js} +1 -1
  24. package/web/dist/assets/{assets-view-COAZvPqm.js → assets-view-Dig8Ow0W.js} +1 -1
  25. package/web/dist/assets/{automation-format-DmmN5Z7N.js → automation-format-MLNn8qnY.js} +1 -1
  26. package/web/dist/assets/{automations-route-C9h3Pe23.js → automations-route-B_hyZJ2Q.js} +1 -1
  27. package/web/dist/assets/{bot-tf6AC27f.js → bot-TU5OTE8D.js} +1 -1
  28. package/web/dist/assets/{button-DhBNRPDb.js → button-jcXhXi-5.js} +1 -1
  29. package/web/dist/assets/{centered-state-DWZ57Ha1.js → centered-state-zjxxQcEb.js} +1 -1
  30. package/web/dist/assets/check-CNVywZ6B.js +1 -0
  31. package/web/dist/assets/chevron-left-D94sZNQc.js +1 -0
  32. package/web/dist/assets/chevron-right-D2EqYt_O.js +1 -0
  33. package/web/dist/assets/circle-check-C09e7mFj.js +1 -0
  34. package/web/dist/assets/{collapsible-BXlCnxCU.js → collapsible-BGyXLTVv.js} +1 -1
  35. package/web/dist/assets/{commit-list-Inz2UHlC.js → commit-list-DxiIebKF.js} +1 -1
  36. package/web/dist/assets/{compare-variants-B66gT_Lp.js → compare-variants-RfJUgKZi.js} +1 -1
  37. package/web/dist/assets/{dashboard-DQ2EsruE.js → dashboard-CPnDqmbf.js} +1 -1
  38. package/web/dist/assets/{diff-NBMGWe9I.js → diff-DpElozOH.js} +2 -2
  39. package/web/dist/assets/{diff-stat-CgvKmRgV.js → diff-stat-YT7Licr1.js} +1 -1
  40. package/web/dist/assets/{diff-view-t0WQPrPT.js → diff-view-mNp6Fo84.js} +1 -1
  41. package/web/dist/assets/{dist-BJiHofth.js → dist-C2IyLYZs.js} +1 -1
  42. package/web/dist/assets/{download-CEvQNLNA.js → download-Cu9ySzL2.js} +1 -1
  43. package/web/dist/assets/{dropdown-menu-R7qzKuR5.js → dropdown-menu-Da8iP-nI.js} +1 -1
  44. package/web/dist/assets/{external-link-OzBGW2PE.js → external-link-CTJbUN9h.js} +1 -1
  45. package/web/dist/assets/{facet-filter-Qbx1pf2T.js → facet-filter-Be0XFoHu.js} +1 -1
  46. package/web/dist/assets/{file-fM0ty7CG.js → file-D9jm2sJ3.js} +1 -1
  47. package/web/dist/assets/{file-preview-vKAohITF.js → file-preview-BIAcYezC.js} +1 -1
  48. package/web/dist/assets/{file-tree-DZ2eXzpR.js → file-tree-hpaNl9qS.js} +1 -1
  49. package/web/dist/assets/{folder-DdjIxY7B.js → folder-Ctd1Xvqx.js} +1 -1
  50. package/web/dist/assets/{follow-up-engine-BSEbPKpI.js → follow-up-engine-WsUFV3Ry.js} +1 -1
  51. package/web/dist/assets/{git-pull-request-D2gvtstb.js → git-pull-request-BAfSEvVb.js} +1 -1
  52. package/web/dist/assets/{git-pull-request-draft-CLy0NzfX.js → git-pull-request-draft-BIgZJsu-.js} +1 -1
  53. package/web/dist/assets/{git-tab-loading-BfHswOkO.js → git-tab-loading-BnU4U-BA.js} +1 -1
  54. package/web/dist/assets/{github-3riSQ6Lm.js → github-DnDrPPfz.js} +1 -1
  55. package/web/dist/assets/{host-usage-7ZdPz-XK.js → host-usage-BeX2ZFmV.js} +1 -1
  56. package/web/dist/assets/{icon-tooltip-DWp0bFCr.js → icon-tooltip-BfI1AC00.js} +1 -1
  57. package/web/dist/assets/{impact-control-C6qnPF32.js → impact-control-Ba9XW3tV.js} +1 -1
  58. package/web/dist/assets/{impact-model-BXkk-8LD.js → impact-model-Bo4KSZmi.js} +1 -1
  59. package/web/dist/assets/{index-BJPVto-W.js → index-Crs_dvXc.js} +5 -5
  60. package/web/dist/assets/{input-Cv2-g500.js → input-vswZUfsf.js} +1 -1
  61. package/web/dist/assets/{layout-cards-rvwV0uTN.js → layout-cards-BxB9Sv6Z.js} +1 -1
  62. package/web/dist/assets/loader-circle-BuBcxAH7.js +1 -0
  63. package/web/dist/assets/{markdown-DpThfUoB.js → markdown--qN61YgZ.js} +1 -1
  64. package/web/dist/assets/{markdown-ugFgDUM5.js → markdown-BiRiR9OM.js} +1 -1
  65. package/web/dist/assets/{message-square-k8K2YFw2.js → message-square-Jt8U2gAH.js} +1 -1
  66. package/web/dist/assets/{picker-pill-DjKsq5S1.js → picker-pill-BFprBA9h.js} +1 -1
  67. package/web/dist/assets/plus-nGmv0BVG.js +1 -0
  68. package/web/dist/assets/{project-router-DXcbRXxc.js → project-router-ByYpf5zi.js} +1 -1
  69. package/web/dist/assets/{queries-DvnoUOE1.js → queries-DbDUaheq.js} +1 -1
  70. package/web/dist/assets/{reasoning-effort-pill-BtWN6FBA.js → reasoning-effort-pill-BMAjcAKk.js} +1 -1
  71. package/web/dist/assets/{repo-git-DQHghYiX.js → repo-git-CpbhUvyL.js} +1 -1
  72. package/web/dist/assets/{run-diff-CymNF6XN.js → run-diff-DTbhZHQE.js} +1 -1
  73. package/web/dist/assets/{save-A5Be1rcj.js → save-DGJET0jv.js} +1 -1
  74. package/web/dist/assets/{scroll-within-DIDO40Ps.js → scroll-within-sbc5xXAl.js} +1 -1
  75. package/web/dist/assets/search-P545ZVzc.js +1 -0
  76. package/web/dist/assets/{search-x-DHAJ1hHA.js → search-x-BI_L6x3P.js} +1 -1
  77. package/web/dist/assets/{settings-2-CT4CHpD0.js → settings-2-CcipoS54.js} +1 -1
  78. package/web/dist/assets/{sheet-D8vk1p4X.js → sheet-DJ7Q8rRA.js} +1 -1
  79. package/web/dist/assets/{skills-BAzH59kW.js → skills-DwnXdnzS.js} +1 -1
  80. package/web/dist/assets/{square-dKpVPAsQ.js → square-CuNOgYBC.js} +1 -1
  81. package/web/dist/assets/{tabs-B_vUNwk9.js → tabs-BCUQqEYa.js} +1 -1
  82. package/web/dist/assets/{tag-BWgO0bkB.js → tag-DHjatodA.js} +1 -1
  83. package/web/dist/assets/{task-commits-rj991QXb.js → task-commits-x21u_XE-.js} +1 -1
  84. package/web/dist/assets/{task-graph-VKJ_lfXL.js → task-graph-DdCE5G3r.js} +1 -1
  85. package/web/dist/assets/{task-notes-CyXwM1jJ.js → task-notes-C6RP3maE.js} +1 -1
  86. package/web/dist/assets/task-workspace-xnZHXFXk.js +29 -0
  87. package/web/dist/assets/terminal-ZT2Z_ALj.js +1 -0
  88. package/web/dist/assets/{terminal-drawer-BZItdxn-.js → terminal-drawer-Dm0kyMmF.js} +1 -1
  89. package/web/dist/assets/{terminal-pane-D4ZoQdKv.js → terminal-pane-CRjYeI78.js} +1 -1
  90. package/web/dist/assets/{textarea-DGt1COuN.js → textarea-Ckx3d0hV.js} +1 -1
  91. package/web/dist/assets/{toaster-DkOynrTr.js → toaster-CejrnYvv.js} +1 -1
  92. package/web/dist/assets/{token-metrics-CH6yTO0m.js → token-metrics-BINGXGrg.js} +1 -1
  93. package/web/dist/assets/{tooltip-DZFNJfGV.js → tooltip-26XdOGj8.js} +1 -1
  94. package/web/dist/assets/{tracker-CfV4FaME.js → tracker-BzXE6yLf.js} +1 -1
  95. package/web/dist/assets/{triangle-alert-DPgo0TAM.js → triangle-alert-CBrg6nYB.js} +1 -1
  96. package/web/dist/assets/{upload-CyWxzeww.js → upload-Cu6NRABh.js} +1 -1
  97. package/web/dist/assets/{use-now-p7SRpNs9.js → use-now-CdtIyF-0.js} +1 -1
  98. package/web/dist/assets/{use-submit-shortcut-DbaZm8p1.js → use-submit-shortcut-B3TJ3HBP.js} +1 -1
  99. package/web/dist/assets/{utils-DujIMO-J.js → utils-Bl_tQdVw.js} +1 -1
  100. package/web/dist/assets/{workflow-graph-Bi8UYX1n.js → workflow-graph-CkCPBwhB.js} +1 -1
  101. package/web/dist/assets/{worktree-lifecycle-operation-D7uIWIl_.js → worktree-lifecycle-operation-UpV9MAuk.js} +1 -1
  102. package/web/dist/assets/x-Qhn_uE86.js +1 -0
  103. package/web/dist/index.html +50 -50
  104. package/dist/telemetry-service.json +0 -1
  105. package/web/dist/assets/arrow-left-D773GDAV.js +0 -1
  106. package/web/dist/assets/check--JMF5pzG.js +0 -1
  107. package/web/dist/assets/chevron-left-BiwkBjqr.js +0 -1
  108. package/web/dist/assets/chevron-right-QEoLhwFQ.js +0 -1
  109. package/web/dist/assets/circle-check-C7cRTvGo.js +0 -1
  110. package/web/dist/assets/loader-circle-wWXhd3lT.js +0 -1
  111. package/web/dist/assets/plus-BCu7YC-w.js +0 -1
  112. package/web/dist/assets/search-_XntIRWA.js +0 -1
  113. package/web/dist/assets/task-workspace-BsOvp8_P.js +0 -29
  114. package/web/dist/assets/terminal-De3oF9fR.js +0 -1
  115. package/web/dist/assets/x-BzTqCf_Q.js +0 -1
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-DujIMO-J.js";import{t as i}from"./project-router-DXcbRXxc.js";import{i as a,o,s}from"./use-now-p7SRpNs9.js";import{c,d as l,f as u,m as d,p as f,u as p}from"./sheet-D8vk1p4X.js";import{F as m,I as h,L as g,N as _,k as v}from"./worktree-lifecycle-operation-D7uIWIl_.js";import{Ot as y,a as b}from"./picker-pill-DjKsq5S1.js";import{t as x}from"./check--JMF5pzG.js";import{s as S}from"./dist-BJiHofth.js";import{x as C}from"./impact-model-BXkk-8LD.js";import{n as w}from"./textarea-DGt1COuN.js";import{c as T}from"./index-BJPVto-W.js";var E=n();function D({name:e,route:t,selected:n,list:i,detail:a}){return(0,E.jsxs)(`div`,{"data-route":t,className:`flex h-full min-h-0 items-stretch`,children:[(0,E.jsx)(`section`,{"data-slot":`${e}-list`,className:r(`w-full min-h-0 flex-col overflow-y-auto overscroll-contain border-border md:flex md:w-[360px] md:shrink-0 md:border-r`,n?`hidden`:`flex`),children:i}),(0,E.jsx)(`section`,{"data-slot":`${e}-detail`,className:r(`min-w-0 min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain`,n?`flex`:`hidden md:flex`),children:a})]})}function O({resolved:e,dataSlot:t}){return e.providerPending||e.canRun?null:(0,E.jsxs)(`span`,{"data-slot":t,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[e.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,E.jsx)(i,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]})}var k=e(t(),1);function A({workflows:e,value:t,onChange:n,slotPrefix:i=`gh`}){let[m,_]=(0,k.useState)(!1),[v,y]=(0,k.useState)(``),C=(0,k.useRef)(null),T=h(e,v);return(0,E.jsxs)(a,{open:m,onOpenChange:e=>{_(e),e||y(``)},children:[(0,E.jsx)(s,{asChild:!0,children:(0,E.jsxs)(`button`,{type:`button`,"data-slot":`${i}-workflow-trigger`,"aria-label":`Choose a workflow`,className:r(b,t&&`border-foreground/60 font-mono text-meta font-semibold text-foreground`),children:[(0,E.jsx)(w,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),(0,E.jsx)(`span`,{className:`max-w-44 truncate`,children:t??`workflow`}),(0,E.jsx)(S,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,E.jsx)(o,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,E.jsxs)(c,{label:`Choose a workflow`,shouldFilter:!1,children:[(0,E.jsx)(u,{placeholder:`search workflows…`,value:v,onValueChange:y,onInput:()=>C.current?.scrollTo(0,0)}),(0,E.jsxs)(d,{ref:C,"data-slot":`${i}-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[T.length===0?(0,E.jsx)(p,{children:`Nothing matches.`}):null,(0,E.jsx)(l,{children:T.map(e=>{let r=t===e.name;return(0,E.jsxs)(f,{value:`workflow ${e.name}`,keywords:g(e.name,e.description),"data-slot":`${i}-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),_(!1)},children:[(0,E.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,r?(0,E.jsx)(x,{"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-primary`}):null]},e.name)})})]})]})})]})}function j({skills:e,skillUsage:t,selected:n,onToggle:i,maxSelections:h,slotPrefix:w=`gh`}){let[D,O]=(0,k.useState)(!1),[A,j]=(0,k.useState)(``),[M,N]=(0,k.useState)(null),P=(0,k.useRef)(null),{mostUsed:F,project:I,global:L}=_(m(e,A,t),t),R=(e,t)=>{let a=n.includes(e.name);return(0,E.jsxs)(f,{value:`skill ${e.name} ${e.path}`,keywords:g(e.name,e.description),"data-slot":`${w}-skill-option`,"data-skill":e.name,"data-selected":a?`true`:void 0,disabled:!a&&h!==void 0&&n.length>=h,onSelect:()=>i(e.name),children:[(0,E.jsx)(`span`,{className:r(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.description?(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,(0,E.jsx)(`button`,{type:`button`,"data-slot":`${w}-skill-view`,"aria-label":`View skill ${e.name}`,title:`View skill`,onClick:t=>{t.preventDefault(),t.stopPropagation(),N(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,E.jsx)(C,{"aria-hidden":`true`,className:`size-3.5`})}),a?(0,E.jsx)(x,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},e.path)};return e.length===0?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(T,{skill:M,onClose:()=>N(null)}),(0,E.jsxs)(a,{open:D,onOpenChange:e=>{O(e),e||j(``)},children:[(0,E.jsx)(s,{asChild:!0,children:(0,E.jsxs)(`button`,{type:`button`,"data-slot":`${w}-skills-trigger`,"aria-label":`Choose skills`,className:r(b,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,E.jsx)(y,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),`skills`,n.length>0?` · ${n.length}`:``,(0,E.jsx)(S,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,E.jsx)(o,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,E.jsxs)(c,{label:`Choose skills`,shouldFilter:!1,children:[(0,E.jsx)(u,{placeholder:`search skills…`,value:A,onValueChange:j,onInput:()=>P.current?.scrollTo(0,0)}),(0,E.jsxs)(d,{ref:P,"data-slot":`${w}-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[F.length===0&&I.length===0&&L.length===0?(0,E.jsx)(p,{children:`Nothing matches.`}):null,F.length>0?(0,E.jsx)(l,{heading:`Most used`,children:F.map(e=>R(e,v(e)))}):null,I.length>0?(0,E.jsx)(l,{heading:`Project skills`,children:I.map(e=>R(e,!0))}):null,L.length>0?(0,E.jsx)(l,{heading:`Global`,children:L.map(e=>R(e,!1))}):null]})]})})]})]})}export{D as i,A as n,O as r,j as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Bl_tQdVw.js";import{t as i}from"./project-router-ByYpf5zi.js";import{i as a,o,s}from"./use-now-CdtIyF-0.js";import{c,d as l,f as u,m as d,p as f,u as p}from"./sheet-DJ7Q8rRA.js";import{F as m,I as h,L as g,N as _,k as v}from"./worktree-lifecycle-operation-UpV9MAuk.js";import{Ot as y,a as b}from"./picker-pill-BFprBA9h.js";import{t as x}from"./check-CNVywZ6B.js";import{s as S}from"./dist-C2IyLYZs.js";import{x as C}from"./impact-model-Bo4KSZmi.js";import{n as w}from"./textarea-Ckx3d0hV.js";import{c as T}from"./index-Crs_dvXc.js";var E=n();function D({name:e,route:t,selected:n,list:i,detail:a}){return(0,E.jsxs)(`div`,{"data-route":t,className:`flex h-full min-h-0 items-stretch`,children:[(0,E.jsx)(`section`,{"data-slot":`${e}-list`,className:r(`w-full min-h-0 flex-col overflow-y-auto overscroll-contain border-border md:flex md:w-[360px] md:shrink-0 md:border-r`,n?`hidden`:`flex`),children:i}),(0,E.jsx)(`section`,{"data-slot":`${e}-detail`,className:r(`min-w-0 min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain`,n?`flex`:`hidden md:flex`),children:a})]})}function O({resolved:e,dataSlot:t}){return e.providerPending||e.canRun?null:(0,E.jsxs)(`span`,{"data-slot":t,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[e.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,E.jsx)(i,{to:`/settings/agents#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]})}var k=e(t(),1);function A({workflows:e,value:t,onChange:n,slotPrefix:i=`gh`}){let[m,_]=(0,k.useState)(!1),[v,y]=(0,k.useState)(``),C=(0,k.useRef)(null),T=h(e,v);return(0,E.jsxs)(a,{open:m,onOpenChange:e=>{_(e),e||y(``)},children:[(0,E.jsx)(s,{asChild:!0,children:(0,E.jsxs)(`button`,{type:`button`,"data-slot":`${i}-workflow-trigger`,"aria-label":`Choose a workflow`,className:r(b,t&&`border-foreground/60 font-mono text-meta font-semibold text-foreground`),children:[(0,E.jsx)(w,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),(0,E.jsx)(`span`,{className:`max-w-44 truncate`,children:t??`workflow`}),(0,E.jsx)(S,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,E.jsx)(o,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,E.jsxs)(c,{label:`Choose a workflow`,shouldFilter:!1,children:[(0,E.jsx)(u,{placeholder:`search workflows…`,value:v,onValueChange:y,onInput:()=>C.current?.scrollTo(0,0)}),(0,E.jsxs)(d,{ref:C,"data-slot":`${i}-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[T.length===0?(0,E.jsx)(p,{children:`Nothing matches.`}):null,(0,E.jsx)(l,{children:T.map(e=>{let r=t===e.name;return(0,E.jsxs)(f,{value:`workflow ${e.name}`,keywords:g(e.name,e.description),"data-slot":`${i}-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),_(!1)},children:[(0,E.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,r?(0,E.jsx)(x,{"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-primary`}):null]},e.name)})})]})]})})]})}function j({skills:e,skillUsage:t,selected:n,onToggle:i,maxSelections:h,slotPrefix:w=`gh`}){let[D,O]=(0,k.useState)(!1),[A,j]=(0,k.useState)(``),[M,N]=(0,k.useState)(null),P=(0,k.useRef)(null),{mostUsed:F,project:I,global:L}=_(m(e,A,t),t),R=(e,t)=>{let a=n.includes(e.name);return(0,E.jsxs)(f,{value:`skill ${e.name} ${e.path}`,keywords:g(e.name,e.description),"data-slot":`${w}-skill-option`,"data-skill":e.name,"data-selected":a?`true`:void 0,disabled:!a&&h!==void 0&&n.length>=h,onSelect:()=>i(e.name),children:[(0,E.jsx)(`span`,{className:r(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.description?(0,E.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,(0,E.jsx)(`button`,{type:`button`,"data-slot":`${w}-skill-view`,"aria-label":`View skill ${e.name}`,title:`View skill`,onClick:t=>{t.preventDefault(),t.stopPropagation(),N(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,E.jsx)(C,{"aria-hidden":`true`,className:`size-3.5`})}),a?(0,E.jsx)(x,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}):null]},e.path)};return e.length===0?null:(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(T,{skill:M,onClose:()=>N(null)}),(0,E.jsxs)(a,{open:D,onOpenChange:e=>{O(e),e||j(``)},children:[(0,E.jsx)(s,{asChild:!0,children:(0,E.jsxs)(`button`,{type:`button`,"data-slot":`${w}-skills-trigger`,"aria-label":`Choose skills`,className:r(b,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,E.jsx)(y,{"aria-hidden":`true`,className:`size-3 shrink-0 text-violet`}),`skills`,n.length>0?` · ${n.length}`:``,(0,E.jsx)(S,{"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,E.jsx)(o,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,E.jsxs)(c,{label:`Choose skills`,shouldFilter:!1,children:[(0,E.jsx)(u,{placeholder:`search skills…`,value:A,onValueChange:j,onInput:()=>P.current?.scrollTo(0,0)}),(0,E.jsxs)(d,{ref:P,"data-slot":`${w}-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[F.length===0&&I.length===0&&L.length===0?(0,E.jsx)(p,{children:`Nothing matches.`}):null,F.length>0?(0,E.jsx)(l,{heading:`Most used`,children:F.map(e=>R(e,v(e)))}):null,I.length>0?(0,E.jsx)(l,{heading:`Project skills`,children:I.map(e=>R(e,!0))}):null,L.length>0?(0,E.jsx)(l,{heading:`Global`,children:L.map(e=>R(e,!1))}):null]})]})})]})]})}export{D as i,A as n,O as r,j as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-DujIMO-J.js";import{C as i,a,c as o,d as s,i as c,j as l,l as u,n as d,o as f,r as p,s as m,u as h,w as g}from"./button-DhBNRPDb.js";var _=e(t(),1),v=n(),y=`AlertDialog`,[b,ee]=g(y,[s]),x=s(),S=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(p,{...r,...n,modal:!0})};S.displayName=y;var C=`AlertDialogTrigger`,w=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(h,{...i,...r,ref:t})});w.displayName=C;var T=`AlertDialogPortal`,E=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(o,{...r,...n})};E.displayName=T;var D=`AlertDialogOverlay`,O=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(m,{...i,...r,ref:t})});O.displayName=D;var k=`AlertDialogContent`,[A,j]=b(k),M=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...o}=e,s=x(n),c=l(t,_.useRef(null)),u=_.useRef(null);return(0,v.jsx)(A,{scope:n,cancelRef:u,children:(0,v.jsx)(a,{role:`alertdialog`,...s,...o,ref:c,onOpenAutoFocus:i(o.onOpenAutoFocus,e=>{e.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})});M.displayName=k;var N=`AlertDialogTitle`,P=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(u,{...i,...r,ref:t})});P.displayName=N;var F=`AlertDialogDescription`,I=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(f,{...i,...r,ref:t})});I.displayName=F;var L=`AlertDialogAction`,R=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(c,{...i,...r,ref:t})});R.displayName=L;var z=`AlertDialogCancel`,B=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=j(z,n),a=x(n),o=l(t,i);return(0,v.jsx)(c,{...a,...r,ref:o})});B.displayName=z;var V=S,te=E,H=O,U=M,W=R,G=B,K=P,q=I;function J({...e}){return(0,v.jsx)(V,{"data-slot":`alert-dialog`,...e})}function Y({...e}){return(0,v.jsx)(te,{"data-slot":`alert-dialog-portal`,...e})}function X({className:e,...t}){return(0,v.jsx)(H,{"data-slot":`alert-dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Z({className:e,...t}){return(0,v.jsxs)(Y,{children:[(0,v.jsx)(X,{}),(0,v.jsx)(U,{"data-slot":`alert-dialog-content`,className:r(`fixed top-[50%] left-[50%] z-50 grid w-full grid-cols-1 max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-card p-6 shadow-modal duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-md`,e),...t})]})}function Q({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:r(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function $({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function ne({className:e,...t}){return(0,v.jsx)(K,{"data-slot":`alert-dialog-title`,className:r(`text-lg leading-none font-semibold`,e),...t})}function re({className:e,...t}){return(0,v.jsx)(q,{"data-slot":`alert-dialog-description`,className:r(`text-sm text-muted-foreground`,e),...t})}function ie({className:e,...t}){return(0,v.jsx)(W,{"data-slot":`alert-dialog-action`,className:r(d({variant:`contrast`}),e),...t})}function ae({className:e,...t}){return(0,v.jsx)(G,{"data-slot":`alert-dialog-cancel`,className:r(d({variant:`outline`}),e),...t})}export{re as a,ne as c,Z as i,ie as n,$ as o,ae as r,Q as s,J as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-Bl_tQdVw.js";import{C as i,a,c as o,d as s,i as c,j as l,l as u,n as d,o as f,r as p,s as m,u as h,w as g}from"./button-jcXhXi-5.js";var _=e(t(),1),v=n(),y=`AlertDialog`,[b,ee]=g(y,[s]),x=s(),S=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(p,{...r,...n,modal:!0})};S.displayName=y;var C=`AlertDialogTrigger`,w=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(h,{...i,...r,ref:t})});w.displayName=C;var T=`AlertDialogPortal`,E=e=>{let{__scopeAlertDialog:t,...n}=e,r=x(t);return(0,v.jsx)(o,{...r,...n})};E.displayName=T;var D=`AlertDialogOverlay`,O=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(m,{...i,...r,ref:t})});O.displayName=D;var k=`AlertDialogContent`,[A,j]=b(k),M=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...o}=e,s=x(n),c=l(t,_.useRef(null)),u=_.useRef(null);return(0,v.jsx)(A,{scope:n,cancelRef:u,children:(0,v.jsx)(a,{role:`alertdialog`,...s,...o,ref:c,onOpenAutoFocus:i(o.onOpenAutoFocus,e=>{e.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:r})})});M.displayName=k;var N=`AlertDialogTitle`,P=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(u,{...i,...r,ref:t})});P.displayName=N;var F=`AlertDialogDescription`,I=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(f,{...i,...r,ref:t})});I.displayName=F;var L=`AlertDialogAction`,R=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=x(n);return(0,v.jsx)(c,{...i,...r,ref:t})});R.displayName=L;var z=`AlertDialogCancel`,B=_.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=j(z,n),a=x(n),o=l(t,i);return(0,v.jsx)(c,{...a,...r,ref:o})});B.displayName=z;var V=S,te=E,H=O,U=M,W=R,G=B,K=P,q=I;function J({...e}){return(0,v.jsx)(V,{"data-slot":`alert-dialog`,...e})}function Y({...e}){return(0,v.jsx)(te,{"data-slot":`alert-dialog-portal`,...e})}function X({className:e,...t}){return(0,v.jsx)(H,{"data-slot":`alert-dialog-overlay`,className:r(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Z({className:e,...t}){return(0,v.jsxs)(Y,{children:[(0,v.jsx)(X,{}),(0,v.jsx)(U,{"data-slot":`alert-dialog-content`,className:r(`fixed top-[50%] left-[50%] z-50 grid w-full grid-cols-1 max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-card p-6 shadow-modal duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-md`,e),...t})]})}function Q({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:r(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function $({className:e,...t}){return(0,v.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:r(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function ne({className:e,...t}){return(0,v.jsx)(K,{"data-slot":`alert-dialog-title`,className:r(`text-lg leading-none font-semibold`,e),...t})}function re({className:e,...t}){return(0,v.jsx)(q,{"data-slot":`alert-dialog-description`,className:r(`text-sm text-muted-foreground`,e),...t})}function ie({className:e,...t}){return(0,v.jsx)(W,{"data-slot":`alert-dialog-action`,className:r(d({variant:`contrast`}),e),...t})}function ae({className:e,...t}){return(0,v.jsx)(G,{"data-slot":`alert-dialog-cancel`,className:r(d({variant:`outline`}),e),...t})}export{re as a,ne as c,Z as i,ie as n,$ as o,ae as r,Q as s,J as t};
@@ -0,0 +1 @@
1
+ import{N as e}from"./button-jcXhXi-5.js";var t=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]);export{t};
@@ -1 +1 @@
1
- import{N as e}from"./button-DhBNRPDb.js";var t=e(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),n=e(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]);export{t as n,n as t};
1
+ import{N as e}from"./button-jcXhXi-5.js";var t=e(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),n=e(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]);export{t as n,n as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ct as r,ba as i,wt as a}from"./queries-DvnoUOE1.js";import{ht as o,t as s}from"./utils-DujIMO-J.js";import{c,x as l}from"./project-router-DXcbRXxc.js";import{N as u,t as d}from"./button-DhBNRPDb.js";import{kt as f,nt as p}from"./picker-pill-DjKsq5S1.js";import{s as m}from"./dist-BJiHofth.js";import{a as h,i as g,l as _,n as v,o as y,t as b}from"./dropdown-menu-R7qzKuR5.js";import{t as x}from"./download-CEvQNLNA.js";import{t as S}from"./external-link-OzBGW2PE.js";import{t as C}from"./file-preview-vKAohITF.js";import{t as w}from"./file-fM0ty7CG.js";import{t as T}from"./loader-circle-wWXhd3lT.js";import{a as E,c as D,d as O,f as k,i as A,l as j,o as M,r as N,s as P,t as F,u as I}from"./follow-up-engine-BSEbPKpI.js";import{t as L}from"./triangle-alert-DPgo0TAM.js";import{t as ee}from"./x-BzTqCf_Q.js";import{n as R}from"./format-DHK74MwW.js";import{t as z}from"./centered-state-DWZ57Ha1.js";import{t as B}from"./markdown-DpThfUoB.js";import{$ as V,R as H,W as U,it as W,rt as G}from"./index-BJPVto-W.js";var K=u(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),q=u(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),J=e(t(),1);function Y(e){let t=o.safeParse(e);return t.success?{ref:t.data.ref,label:t.data.label.slice(0,200)}:null}function X(e,t){return e?`About ${e.ref} ("${e.label}"): ${t}`:t}function Z(e,t){let n=(0,J.useRef)(t);n.current=t,(0,J.useEffect)(()=>{let t=t=>{let r=e.current?.contentWindow;if(!r||t.source!==r)return;let i=Y(t.data);i&&n.current(i)};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[e])}var Q=n();function te({run:e,reference:t,onClearReference:n}){let r=F(e),i=N(e,r.continueWith),a=p(e),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),[u,f]=(0,J.useState)(null),m=(0,J.useId)(),h=e.status===`running`||e.status===`waiting`,g=e.status===`queued`,_=!h&&!g&&r.available;if(!h&&!g&&!_||e.worktreeLifecycle?.activeOperationId)return null;let v=h&&!a.usable?a.reason:_&&!r.canContinue?r.reason??`No provider can continue this task.`:void 0,y=!v&&!c&&o.trim()!==``,b=async e=>{if(e?.preventDefault(),y){l(!0),f(null);try{await i(X(t,o.trim()),[]),s(``),n()}catch(e){f(e instanceof Error?e.message:String(e))}finally{l(!1)}}};return(0,Q.jsxs)(`form`,{"data-slot":`assets-ask`,"aria-label":`Ask about this asset`,onSubmit:e=>void b(e),className:`shrink-0 border-t border-border bg-background px-2 py-2 sm:px-3`,children:[t?(0,Q.jsxs)(`span`,{"data-slot":`assets-ask-ref`,className:`mb-1.5 inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-muted py-0.5 pr-0.5 pl-2 text-meta`,children:[(0,Q.jsx)(K,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`truncate`,title:`${t.ref} — ${t.label}`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-muted-foreground`,children:t.ref}),` `,t.label]}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-ask-ref-remove`,"aria-label":`Remove reference`,onClick:n,className:`rounded-full p-0.5 text-muted-foreground hover:bg-background hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(ee,{"aria-hidden":`true`,className:`size-3`})})]}):null,(0,Q.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Q.jsx)(`textarea`,{"data-slot":`assets-ask-input`,"aria-label":t?`Ask about ${t.label||t.ref}`:`Ask the agent about this asset`,"aria-describedby":v||u?m:void 0,rows:1,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&b()},disabled:!!v,placeholder:t?`Ask or correct — ⌘↵ to send`:`Ask the agent about this report — click an element to reference it`,className:`max-h-32 min-h-9 flex-1 resize-y rounded-md border border-border bg-card px-2.5 py-2 text-ui focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:opacity-60`}),(0,Q.jsxs)(d,{type:`submit`,size:`sm`,"data-action":`assets-ask-send`,disabled:!y,"aria-busy":c||void 0,children:[c?(0,Q.jsx)(T,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,Q.jsx)(O,{"aria-hidden":`true`}),_?`Continue`:`Send`]})]}),v||u?(0,Q.jsx)(`p`,{id:m,"data-slot":`assets-ask-reason`,className:`mt-1 text-xs text-soft-foreground`,children:u??v}):null]})}var ne=`No assets yet`,re=`Agents publish pages here when they write to the run's artifacts folder.`;function ie({runId:e,routed:t,run:n}){let r=a(e),o=l(),u=c(),[p,m]=(0,J.useState)(void 0),h=t?o.name:p,g=r.data?.artifacts??[],_=D(g,h),v=(0,J.useCallback)(n=>{t?u(`/tasks/${e}/assets/${encodeURIComponent(n)}`,{replace:!0}):m(n)},[u,t,e]),[y,b]=oe(),[C,w]=(0,J.useState)(0),[E,O]=(0,J.useState)(void 0),A=_?.kind===`html`?ae(r.data?.versions,_.name):[],j=A.at(-1)?.version,M=E&&_&&E.name===_.name&&E.version!==j&&A.some(e=>e.version===E.version)?E.version:void 0,N=(0,J.useRef)(null),[P,F]=(0,J.useState)(null);return Z(N,F),r.isPending?(0,Q.jsx)(z,{icon:(0,Q.jsx)(T,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading assets…`}):r.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(L,{}),tone:`danger`,heading:`h2`,title:`Could not load this task's assets`,subtitle:r.error.message}):(0,Q.jsxs)(`section`,{"data-slot":`assets-view`,className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,Q.jsxs)(`div`,{"data-slot":`assets-toolbar`,role:`toolbar`,"aria-label":`Assets`,className:`flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-2 sm:px-3`,children:[_?(0,Q.jsx)(se,{artifacts:g,current:_,onSelect:v}):(0,Q.jsx)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:`Assets`}),_?.kind===`html`?(0,Q.jsxs)(`span`,{"data-slot":`assets-sandboxed`,title:`Runs in a sandbox: no access to cezar, your cookies or the network beyond pinned CDN scripts`,className:`hidden items-center gap-1 rounded-sm border border-border px-1.5 py-px text-meta text-muted-foreground sm:inline-flex`,children:[(0,Q.jsx)(V,{"aria-hidden":`true`,className:`size-3`}),`sandboxed`]}):null,_&&A.length>1?(0,Q.jsx)($,{versions:A,viewing:M,onSelect:e=>O(e===j?void 0:{name:_.name,version:e})}):null,M===void 0?null:(0,Q.jsxs)(`span`,{"data-slot":`assets-viewing-version`,className:`inline-flex items-center gap-1.5 text-meta text-muted-foreground`,children:[`Viewing v`,M,(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`—`}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-version-current`,onClick:()=>O(void 0),className:`font-medium text-foreground underline underline-offset-2`,children:`back to current`})]}),r.data.truncated?(0,Q.jsxs)(`span`,{className:`hidden text-meta text-muted-foreground md:inline`,children:[`Showing the newest `,r.data.artifacts.length,` files; the folder has more`]}):null,(0,Q.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,Q.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-focus`,"aria-pressed":y,"aria-label":y?`Leave focus`:`Focus`,title:y?`Leave focus — bring the sidebar back`:`Focus — fold the sidebar to icons while Assets is open`,className:s(`text-muted-foreground`,y&&`bg-muted text-foreground`),onClick:()=>b(!y),children:y?(0,Q.jsx)(G,{"aria-hidden":`true`}):(0,Q.jsx)(W,{"aria-hidden":`true`})}),_?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,children:(0,Q.jsx)(`a`,{"data-action":`assets-open`,href:i(e,_.name,M),target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in new tab`,title:`Open in new tab (still sandboxed)`,children:(0,Q.jsx)(S,{"aria-hidden":`true`})})}),(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,children:(0,Q.jsx)(`a`,{"data-action":`assets-download`,href:i(e,_.name,M),download:_.name,"aria-label":`Download`,title:`Download`,children:(0,Q.jsx)(x,{"aria-hidden":`true`})})}),(0,Q.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-reload`,"aria-label":`Reload`,title:`Reload`,className:`text-muted-foreground`,onClick:()=>w(e=>e+1),children:(0,Q.jsx)(k,{"aria-hidden":`true`})})]}):null]})]}),_?(0,Q.jsx)(ce,{runId:e,artifact:_,version:M,frameRef:N},`${_.name}@${_.updatedAt}#${C}v${M??``}`):(0,Q.jsx)(z,{icon:(0,Q.jsx)(f,{}),tone:`neutral`,heading:`h2`,title:ne,subtitle:re}),n&&_?(0,Q.jsx)(te,{run:n,reference:P,onClearReference:()=>F(null)}):null]})}function ae(e,t){return(e??[]).filter(e=>e.files.includes(t))}function $({versions:e,viewing:t,onSelect:n}){let r=e.at(-1),i=t??r?.version;return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-versions`,"aria-label":`Version v${i} — pick another version`,className:`h-7 gap-1 px-2 text-label text-muted-foreground`,children:[(0,Q.jsx)(q,{"aria-hidden":`true`,className:`size-3.5`}),`v`,i,r&&t===void 0?(0,Q.jsxs)(`span`,{className:`hidden sm:inline`,children:[`· `,R(r.updatedAt),` ago`]}):null,(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`w-56`,children:[(0,Q.jsx)(g,{children:`Versions`}),(0,Q.jsx)(h,{value:String(i),onValueChange:e=>n(Number(e)),children:[...e].reverse().map(e=>(0,Q.jsxs)(y,{value:String(e.version),"data-version":e.version,children:[`v`,e.version,` · `,R(e.updatedAt),` ago`,e.version===r?.version?(0,Q.jsx)(`span`,{className:`ml-auto text-meta text-muted-foreground`,children:`current`}):null]},e.version))})]})]})}function oe(){let[e,t]=(0,J.useState)(()=>j(`assets`)),n=(0,J.useCallback)(e=>{I(`assets`,e),t(e)},[]);return(0,J.useEffect)(()=>{if(e)return H(()=>n(!1))},[e,n]),[e,n]}function se({artifacts:e,current:t,onSelect:n}){let r=P(e);return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-switcher`,"aria-label":`Asset: ${M(t)} — switch asset`,className:`h-7 min-w-0 max-w-[min(28rem,60vw)] gap-1.5 px-2 text-ui font-medium`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:M(t)}),(0,Q.jsx)(`span`,{className:`shrink-0 text-meta font-normal text-muted-foreground`,children:E[t.kind]}),(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 shrink-0 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`max-h-80 w-80 overflow-y-auto`,children:[(0,Q.jsxs)(g,{children:[e.length,` `,e.length===1?`asset`:`assets`]}),(0,Q.jsx)(h,{value:t.name,onValueChange:n,children:r.map(e=>(0,Q.jsx)(y,{value:e.name,"data-asset":e.name,children:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:M(e)}),(0,Q.jsxs)(`span`,{className:`truncate font-mono text-meta text-muted-foreground`,children:[e.name,` · `,E[e.kind],` · `,R(e.updatedAt)]})]})},e.name))})]})]})}function ce({runId:e,artifact:t,version:n,frameRef:r}){let a=U(),o=i(e,t.name,n);switch(t.kind){case`html`:return(0,Q.jsx)(`iframe`,{ref:r,"data-slot":`assets-frame`,title:M(t),src:`${o}#theme=${a}`,sandbox:A,referrerPolicy:`no-referrer`,className:`min-h-0 w-full flex-1 border-0 bg-background`});case`image`:return(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:(0,Q.jsx)(`img`,{"data-slot":`assets-image`,src:o,alt:M(t),className:`max-w-full rounded-sm`})});case`markdown`:case`json`:return(0,Q.jsx)(le,{runId:e,artifact:t});case`other`:return(0,Q.jsx)(z,{icon:(0,Q.jsx)(w,{}),tone:`neutral`,heading:`h2`,title:`No preview for this file`,subtitle:`${t.name} — download it to open it locally.`,actions:(0,Q.jsx)(d,{asChild:!0,variant:`outline`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download-file`,href:o,download:t.name,children:[(0,Q.jsx)(x,{"aria-hidden":`true`}),`Download`]})})})}}function le({runId:e,artifact:t}){let n=r(e,t.name,t.updatedAt);return n.isPending?(0,Q.jsxs)(`p`,{className:`px-4 py-6 text-center text-xs text-soft-foreground`,children:[`Loading `,t.name,`…`]}):n.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(L,{}),tone:`danger`,heading:`h2`,title:`Could not load this asset`,subtitle:n.error.message}):(0,Q.jsx)(`div`,{"data-slot":`assets-${t.kind}`,className:`min-h-0 flex-1 overflow-auto`,children:t.kind===`markdown`?(0,Q.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 py-4`,children:(0,Q.jsx)(B,{children:n.data})}):(0,Q.jsx)(C,{path:t.name,text:n.data})})}export{ie as AssetsView};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ct as r,ba as i,wt as a}from"./queries-DbDUaheq.js";import{ht as o,t as s}from"./utils-Bl_tQdVw.js";import{c,x as l}from"./project-router-ByYpf5zi.js";import{N as u,t as d}from"./button-jcXhXi-5.js";import{kt as f,nt as p}from"./picker-pill-BFprBA9h.js";import{s as m}from"./dist-C2IyLYZs.js";import{a as h,i as g,l as _,n as v,o as y,t as b}from"./dropdown-menu-Da8iP-nI.js";import{t as x}from"./download-Cu9ySzL2.js";import{t as S}from"./external-link-CTJbUN9h.js";import{t as C}from"./file-preview-BIAcYezC.js";import{t as w}from"./file-D9jm2sJ3.js";import{t as T}from"./loader-circle-BuBcxAH7.js";import{a as E,c as D,d as O,f as k,i as A,l as j,o as M,r as N,s as P,t as F,u as I}from"./follow-up-engine-WsUFV3Ry.js";import{t as L}from"./triangle-alert-CBrg6nYB.js";import{t as ee}from"./x-Qhn_uE86.js";import{n as R}from"./format-DHK74MwW.js";import{t as z}from"./centered-state-zjxxQcEb.js";import{t as B}from"./markdown--qN61YgZ.js";import{$ as V,R as H,W as U,it as W,rt as G}from"./index-Crs_dvXc.js";var K=u(`at-sign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),q=u(`history`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M12 7v5l4 2`,key:`1fdv2h`}]]),J=e(t(),1);function Y(e){let t=o.safeParse(e);return t.success?{ref:t.data.ref,label:t.data.label.slice(0,200)}:null}function X(e,t){return e?`About ${e.ref} ("${e.label}"): ${t}`:t}function Z(e,t){let n=(0,J.useRef)(t);n.current=t,(0,J.useEffect)(()=>{let t=t=>{let r=e.current?.contentWindow;if(!r||t.source!==r)return;let i=Y(t.data);i&&n.current(i)};return window.addEventListener(`message`,t),()=>window.removeEventListener(`message`,t)},[e])}var Q=n();function te({run:e,reference:t,onClearReference:n}){let r=F(e),i=N(e,r.continueWith),a=p(e),[o,s]=(0,J.useState)(``),[c,l]=(0,J.useState)(!1),[u,f]=(0,J.useState)(null),m=(0,J.useId)(),h=e.status===`running`||e.status===`waiting`,g=e.status===`queued`,_=!h&&!g&&r.available;if(!h&&!g&&!_||e.worktreeLifecycle?.activeOperationId)return null;let v=h&&!a.usable?a.reason:_&&!r.canContinue?r.reason??`No provider can continue this task.`:void 0,y=!v&&!c&&o.trim()!==``,b=async e=>{if(e?.preventDefault(),y){l(!0),f(null);try{await i(X(t,o.trim()),[]),s(``),n()}catch(e){f(e instanceof Error?e.message:String(e))}finally{l(!1)}}};return(0,Q.jsxs)(`form`,{"data-slot":`assets-ask`,"aria-label":`Ask about this asset`,onSubmit:e=>void b(e),className:`shrink-0 border-t border-border bg-background px-2 py-2 sm:px-3`,children:[t?(0,Q.jsxs)(`span`,{"data-slot":`assets-ask-ref`,className:`mb-1.5 inline-flex max-w-full items-center gap-1 rounded-full border border-border bg-muted py-0.5 pr-0.5 pl-2 text-meta`,children:[(0,Q.jsx)(K,{"aria-hidden":`true`,className:`size-3 shrink-0 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`truncate`,title:`${t.ref} — ${t.label}`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-muted-foreground`,children:t.ref}),` `,t.label]}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-ask-ref-remove`,"aria-label":`Remove reference`,onClick:n,className:`rounded-full p-0.5 text-muted-foreground hover:bg-background hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Q.jsx)(ee,{"aria-hidden":`true`,className:`size-3`})})]}):null,(0,Q.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,Q.jsx)(`textarea`,{"data-slot":`assets-ask-input`,"aria-label":t?`Ask about ${t.label||t.ref}`:`Ask the agent about this asset`,"aria-describedby":v||u?m:void 0,rows:1,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&b()},disabled:!!v,placeholder:t?`Ask or correct — ⌘↵ to send`:`Ask the agent about this report — click an element to reference it`,className:`max-h-32 min-h-9 flex-1 resize-y rounded-md border border-border bg-card px-2.5 py-2 text-ui focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none disabled:opacity-60`}),(0,Q.jsxs)(d,{type:`submit`,size:`sm`,"data-action":`assets-ask-send`,disabled:!y,"aria-busy":c||void 0,children:[c?(0,Q.jsx)(T,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,Q.jsx)(O,{"aria-hidden":`true`}),_?`Continue`:`Send`]})]}),v||u?(0,Q.jsx)(`p`,{id:m,"data-slot":`assets-ask-reason`,className:`mt-1 text-xs text-soft-foreground`,children:u??v}):null]})}var ne=`No assets yet`,re=`Agents publish pages here when they write to the run's artifacts folder.`;function ie({runId:e,routed:t,run:n}){let r=a(e),o=l(),u=c(),[p,m]=(0,J.useState)(void 0),h=t?o.name:p,g=r.data?.artifacts??[],_=D(g,h),v=(0,J.useCallback)(n=>{t?u(`/tasks/${e}/assets/${encodeURIComponent(n)}`,{replace:!0}):m(n)},[u,t,e]),[y,b]=oe(),[C,w]=(0,J.useState)(0),[E,O]=(0,J.useState)(void 0),A=_?.kind===`html`?ae(r.data?.versions,_.name):[],j=A.at(-1)?.version,M=E&&_&&E.name===_.name&&E.version!==j&&A.some(e=>e.version===E.version)?E.version:void 0,N=(0,J.useRef)(null),[P,F]=(0,J.useState)(null);return Z(N,F),r.isPending?(0,Q.jsx)(z,{icon:(0,Q.jsx)(T,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading assets…`}):r.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(L,{}),tone:`danger`,heading:`h2`,title:`Could not load this task's assets`,subtitle:r.error.message}):(0,Q.jsxs)(`section`,{"data-slot":`assets-view`,className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,Q.jsxs)(`div`,{"data-slot":`assets-toolbar`,role:`toolbar`,"aria-label":`Assets`,className:`flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-2 sm:px-3`,children:[_?(0,Q.jsx)(se,{artifacts:g,current:_,onSelect:v}):(0,Q.jsx)(`span`,{className:`px-1 text-xs text-muted-foreground`,children:`Assets`}),_?.kind===`html`?(0,Q.jsxs)(`span`,{"data-slot":`assets-sandboxed`,title:`Runs in a sandbox: no access to cezar, your cookies or the network beyond pinned CDN scripts`,className:`hidden items-center gap-1 rounded-sm border border-border px-1.5 py-px text-meta text-muted-foreground sm:inline-flex`,children:[(0,Q.jsx)(V,{"aria-hidden":`true`,className:`size-3`}),`sandboxed`]}):null,_&&A.length>1?(0,Q.jsx)($,{versions:A,viewing:M,onSelect:e=>O(e===j?void 0:{name:_.name,version:e})}):null,M===void 0?null:(0,Q.jsxs)(`span`,{"data-slot":`assets-viewing-version`,className:`inline-flex items-center gap-1.5 text-meta text-muted-foreground`,children:[`Viewing v`,M,(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`—`}),(0,Q.jsx)(`button`,{type:`button`,"data-action":`assets-version-current`,onClick:()=>O(void 0),className:`font-medium text-foreground underline underline-offset-2`,children:`back to current`})]}),r.data.truncated?(0,Q.jsxs)(`span`,{className:`hidden text-meta text-muted-foreground md:inline`,children:[`Showing the newest `,r.data.artifacts.length,` files; the folder has more`]}):null,(0,Q.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-0.5`,children:[(0,Q.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-focus`,"aria-pressed":y,"aria-label":y?`Leave focus`:`Focus`,title:y?`Leave focus — bring the sidebar back`:`Focus — fold the sidebar to icons while Assets is open`,className:s(`text-muted-foreground`,y&&`bg-muted text-foreground`),onClick:()=>b(!y),children:y?(0,Q.jsx)(G,{"aria-hidden":`true`}):(0,Q.jsx)(W,{"aria-hidden":`true`})}),_?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,children:(0,Q.jsx)(`a`,{"data-action":`assets-open`,href:i(e,_.name,M),target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in new tab`,title:`Open in new tab (still sandboxed)`,children:(0,Q.jsx)(S,{"aria-hidden":`true`})})}),(0,Q.jsx)(d,{asChild:!0,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,children:(0,Q.jsx)(`a`,{"data-action":`assets-download`,href:i(e,_.name,M),download:_.name,"aria-label":`Download`,title:`Download`,children:(0,Q.jsx)(x,{"aria-hidden":`true`})})}),(0,Q.jsx)(d,{type:`button`,variant:`ghost`,size:`icon-sm`,"data-action":`assets-reload`,"aria-label":`Reload`,title:`Reload`,className:`text-muted-foreground`,onClick:()=>w(e=>e+1),children:(0,Q.jsx)(k,{"aria-hidden":`true`})})]}):null]})]}),_?(0,Q.jsx)(ce,{runId:e,artifact:_,version:M,frameRef:N},`${_.name}@${_.updatedAt}#${C}v${M??``}`):(0,Q.jsx)(z,{icon:(0,Q.jsx)(f,{}),tone:`neutral`,heading:`h2`,title:ne,subtitle:re}),n&&_?(0,Q.jsx)(te,{run:n,reference:P,onClearReference:()=>F(null)}):null]})}function ae(e,t){return(e??[]).filter(e=>e.files.includes(t))}function $({versions:e,viewing:t,onSelect:n}){let r=e.at(-1),i=t??r?.version;return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-versions`,"aria-label":`Version v${i} — pick another version`,className:`h-7 gap-1 px-2 text-label text-muted-foreground`,children:[(0,Q.jsx)(q,{"aria-hidden":`true`,className:`size-3.5`}),`v`,i,r&&t===void 0?(0,Q.jsxs)(`span`,{className:`hidden sm:inline`,children:[`· `,R(r.updatedAt),` ago`]}):null,(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`w-56`,children:[(0,Q.jsx)(g,{children:`Versions`}),(0,Q.jsx)(h,{value:String(i),onValueChange:e=>n(Number(e)),children:[...e].reverse().map(e=>(0,Q.jsxs)(y,{value:String(e.version),"data-version":e.version,children:[`v`,e.version,` · `,R(e.updatedAt),` ago`,e.version===r?.version?(0,Q.jsx)(`span`,{className:`ml-auto text-meta text-muted-foreground`,children:`current`}):null]},e.version))})]})]})}function oe(){let[e,t]=(0,J.useState)(()=>j(`assets`)),n=(0,J.useCallback)(e=>{I(`assets`,e),t(e)},[]);return(0,J.useEffect)(()=>{if(e)return H(()=>n(!1))},[e,n]),[e,n]}function se({artifacts:e,current:t,onSelect:n}){let r=P(e);return(0,Q.jsxs)(b,{children:[(0,Q.jsx)(_,{asChild:!0,children:(0,Q.jsxs)(d,{type:`button`,variant:`ghost`,size:`sm`,"data-action":`assets-switcher`,"aria-label":`Asset: ${M(t)} — switch asset`,className:`h-7 min-w-0 max-w-[min(28rem,60vw)] gap-1.5 px-2 text-ui font-medium`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:M(t)}),(0,Q.jsx)(`span`,{className:`shrink-0 text-meta font-normal text-muted-foreground`,children:E[t.kind]}),(0,Q.jsx)(m,{"aria-hidden":`true`,className:`size-3.5 shrink-0 opacity-60`})]})}),(0,Q.jsxs)(v,{align:`start`,className:`max-h-80 w-80 overflow-y-auto`,children:[(0,Q.jsxs)(g,{children:[e.length,` `,e.length===1?`asset`:`assets`]}),(0,Q.jsx)(h,{value:t.name,onValueChange:n,children:r.map(e=>(0,Q.jsx)(y,{value:e.name,"data-asset":e.name,children:(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,Q.jsx)(`span`,{className:`truncate`,children:M(e)}),(0,Q.jsxs)(`span`,{className:`truncate font-mono text-meta text-muted-foreground`,children:[e.name,` · `,E[e.kind],` · `,R(e.updatedAt)]})]})},e.name))})]})]})}function ce({runId:e,artifact:t,version:n,frameRef:r}){let a=U(),o=i(e,t.name,n);switch(t.kind){case`html`:return(0,Q.jsx)(`iframe`,{ref:r,"data-slot":`assets-frame`,title:M(t),src:`${o}#theme=${a}`,sandbox:A,referrerPolicy:`no-referrer`,className:`min-h-0 w-full flex-1 border-0 bg-background`});case`image`:return(0,Q.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center overflow-auto p-4`,children:(0,Q.jsx)(`img`,{"data-slot":`assets-image`,src:o,alt:M(t),className:`max-w-full rounded-sm`})});case`markdown`:case`json`:return(0,Q.jsx)(le,{runId:e,artifact:t});case`other`:return(0,Q.jsx)(z,{icon:(0,Q.jsx)(w,{}),tone:`neutral`,heading:`h2`,title:`No preview for this file`,subtitle:`${t.name} — download it to open it locally.`,actions:(0,Q.jsx)(d,{asChild:!0,variant:`outline`,children:(0,Q.jsxs)(`a`,{"data-action":`assets-download-file`,href:o,download:t.name,children:[(0,Q.jsx)(x,{"aria-hidden":`true`}),`Download`]})})})}}function le({runId:e,artifact:t}){let n=r(e,t.name,t.updatedAt);return n.isPending?(0,Q.jsxs)(`p`,{className:`px-4 py-6 text-center text-xs text-soft-foreground`,children:[`Loading `,t.name,`…`]}):n.isError?(0,Q.jsx)(z,{icon:(0,Q.jsx)(L,{}),tone:`danger`,heading:`h2`,title:`Could not load this asset`,subtitle:n.error.message}):(0,Q.jsx)(`div`,{"data-slot":`assets-${t.kind}`,className:`min-h-0 flex-1 overflow-auto`,children:t.kind===`markdown`?(0,Q.jsx)(`div`,{className:`mx-auto max-w-3xl px-4 py-4`,children:(0,Q.jsx)(B,{children:n.data})}):(0,Q.jsx)(C,{path:t.name,text:n.data})})}export{ie as AssetsView};
@@ -1 +1 @@
1
- import"./rolldown-runtime-QTnfLwEv.js";import{i as e,t}from"./react-runtime-CCIEwYL0.js";import{F as n,G as r,H as i,R as a,W as o,t as s}from"./utils-DujIMO-J.js";import{N as c}from"./button-DhBNRPDb.js";var l=c(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),u=c(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);e();var d=t();function f({className:e,flush:t=!1,...n}){return(0,d.jsx)(`div`,{"data-slot":`card`,"data-flush":t?`true`:void 0,className:s(`flex flex-col rounded-lg border bg-card text-card-foreground shadow-xs`,t?`gap-0 overflow-hidden py-0`:`gap-6 py-6`,e),...n})}function p(e){return n[((e-1)%7+7)%7]??``}function m(e,t){let n=r(typeof e==`number`?e:Date.parse(e),t);return n?`${p(n.weekday)} ${a(n.hour,n.minute)}`:``}function h(e,t){let n=r(typeof e==`number`?e:Date.parse(e),t);return n?a(n.hour,n.minute):``}function g(e,t,n=Date.now()){let i=Date.parse(e),o=r(i,t);if(!o)return``;if(n-i<6*864e5)return`${p(o.weekday)} ${a(o.hour,o.minute)}`;let s=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`][o.month-1];return`${o.day} ${s} ${a(o.hour,o.minute)}`}function _(e,t=Date.now()){let n=Math.max(0,Math.round((e-t)/6e4));return n<60?`in ${n}m`:n<1440?`in ${Math.round(n/60)}h`:`in ${Math.round(n/1440)}d`}function v(e){let t=Math.round(e/60),n=Math.floor(t/60);return n>0?`${n}h ${String(t%60).padStart(2,`0`)}m`:`${t}m`}function y(e){return e>=10?`$${e.toFixed(1)}`:`$${e.toFixed(2)}`}function b(e){switch(e){case`done`:return`success`;case`running`:case`queued`:case`waiting`:return`pending`;case`failed`:case`cancelled`:return`danger`;case`review`:return`violet`}}function x(e){switch(e){case`review`:return`needs review`;case`waiting`:return`needs you`;default:return e}}function S(e){if(e.kind===`schedule`)return o(e).map(i).join(`; `);if(e.kind===`tracker`){let t=e.trackerTrigger,n=t?.association.kind===`jira`?`Jira`:t?.association.kind===`linear`?`Linear`:`Tracker`;return t?`${n} · ${t.events.join(`, `)}${t.targetStatusIds?.length?` → ${t.targetStatusIds.join(`, `)}`:``}${t.changedLabelIds?.length?` · labels ${t.changedLabelIds.join(`, `)}`:``} · every ${Math.round((e.intervalSeconds??1800)/60)} min`:`${n} · select an event to complete setup`}let t=(e.events??[]).join(`, `),n=Math.round((e.intervalSeconds??300)/60);return`on ${t||`github`} · every ${n} min`}function C(e){switch(e){case`launched`:case`manual`:case`catch-up`:return`success`;case`failed`:case`error`:case`rate-limited`:return`danger`;default:return`neutral`}}export{_ as a,b as c,y as d,f,g as i,h as l,l as m,p as n,C as o,u as p,m as r,x as s,v as t,S as u};
1
+ import"./rolldown-runtime-QTnfLwEv.js";import{i as e,t}from"./react-runtime-CCIEwYL0.js";import{F as n,G as r,H as i,R as a,W as o,t as s}from"./utils-Bl_tQdVw.js";import{N as c}from"./button-jcXhXi-5.js";var l=c(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),u=c(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);e();var d=t();function f({className:e,flush:t=!1,...n}){return(0,d.jsx)(`div`,{"data-slot":`card`,"data-flush":t?`true`:void 0,className:s(`flex flex-col rounded-lg border bg-card text-card-foreground shadow-xs`,t?`gap-0 overflow-hidden py-0`:`gap-6 py-6`,e),...n})}function p(e){return n[((e-1)%7+7)%7]??``}function m(e,t){let n=r(typeof e==`number`?e:Date.parse(e),t);return n?`${p(n.weekday)} ${a(n.hour,n.minute)}`:``}function h(e,t){let n=r(typeof e==`number`?e:Date.parse(e),t);return n?a(n.hour,n.minute):``}function g(e,t,n=Date.now()){let i=Date.parse(e),o=r(i,t);if(!o)return``;if(n-i<6*864e5)return`${p(o.weekday)} ${a(o.hour,o.minute)}`;let s=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`][o.month-1];return`${o.day} ${s} ${a(o.hour,o.minute)}`}function _(e,t=Date.now()){let n=Math.max(0,Math.round((e-t)/6e4));return n<60?`in ${n}m`:n<1440?`in ${Math.round(n/60)}h`:`in ${Math.round(n/1440)}d`}function v(e){let t=Math.round(e/60),n=Math.floor(t/60);return n>0?`${n}h ${String(t%60).padStart(2,`0`)}m`:`${t}m`}function y(e){return e>=10?`$${e.toFixed(1)}`:`$${e.toFixed(2)}`}function b(e){switch(e){case`done`:return`success`;case`running`:case`queued`:case`waiting`:return`pending`;case`failed`:case`cancelled`:return`danger`;case`review`:return`violet`}}function x(e){switch(e){case`review`:return`needs review`;case`waiting`:return`needs you`;default:return e}}function S(e){if(e.kind===`schedule`)return o(e).map(i).join(`; `);if(e.kind===`tracker`){let t=e.trackerTrigger,n=t?.association.kind===`jira`?`Jira`:t?.association.kind===`linear`?`Linear`:`Tracker`;return t?`${n} · ${t.events.join(`, `)}${t.targetStatusIds?.length?` → ${t.targetStatusIds.join(`, `)}`:``}${t.changedLabelIds?.length?` · labels ${t.changedLabelIds.join(`, `)}`:``} · every ${Math.round((e.intervalSeconds??1800)/60)} min`:`${n} · select an event to complete setup`}let t=(e.events??[]).join(`, `),n=Math.round((e.intervalSeconds??300)/60);return`on ${t||`github`} · every ${n} min`}function C(e){switch(e){case`launched`:case`manual`:case`catch-up`:return`success`;case`failed`:case`error`:case`rate-limited`:return`danger`;default:return`neutral`}}export{_ as a,b as c,y as d,f,g as i,h as l,l as m,p as n,C as o,u as p,m as r,x as s,v as t,S as u};