@open-mercato/cezar 0.19.0-pr2182.5227 → 0.19.0-pr2187.5245
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/package.json +4 -4
- package/web/dist/assets/{agent-task-pickers-BhJ_unLi.js → agent-task-pickers-DUqSQDor.js} +1 -1
- package/web/dist/assets/{alert-dialog-CxREVZzs.js → alert-dialog-BMjo8xQG.js} +1 -1
- package/web/dist/assets/arrow-left-BEAlXA3d.js +1 -0
- package/web/dist/assets/{arrow-up-bQUHA-BY.js → arrow-up-DDpMEXPX.js} +1 -1
- package/web/dist/assets/{assets-view-Cc9SYPh2.js → assets-view-DJFhl-WQ.js} +1 -1
- package/web/dist/assets/{automation-format-M_h9N_xc.js → automation-format-AGDCMMpa.js} +1 -1
- package/web/dist/assets/{automations-route-C3kMaiHV.js → automations-route-fZhQTwH6.js} +1 -1
- package/web/dist/assets/{bot-BfPMzQ-a.js → bot-DHGe6SWG.js} +1 -1
- package/web/dist/assets/{button-Tjc8i8XN.js → button-DEKLgKmf.js} +1 -1
- package/web/dist/assets/{centered-state-C7zhOePG.js → centered-state-BphcaI7f.js} +1 -1
- package/web/dist/assets/check-CnXMnT3w.js +1 -0
- package/web/dist/assets/chevron-left-BDTKSpOR.js +1 -0
- package/web/dist/assets/chevron-right-V6O6uOQ1.js +1 -0
- package/web/dist/assets/circle-check-C1XDWUmf.js +1 -0
- package/web/dist/assets/{collapsible-DtzIEpHJ.js → collapsible-y9_JOH8O.js} +1 -1
- package/web/dist/assets/{commit-list-Bb2BwlaF.js → commit-list-BnJ_KtrW.js} +1 -1
- package/web/dist/assets/{compare-variants-ClmyB0jC.js → compare-variants-D-YQDVWc.js} +1 -1
- package/web/dist/assets/{dashboard-BQomE_MF.js → dashboard-BOoHWslq.js} +1 -1
- package/web/dist/assets/{diff-WDu8bbgr.js → diff-BTX8_hnf.js} +2 -2
- package/web/dist/assets/{diff-stat-BjuT8tmA.js → diff-stat-iPS1aFc4.js} +1 -1
- package/web/dist/assets/{diff-view-BHxDxhKT.js → diff-view-D_Ed-_6s.js} +1 -1
- package/web/dist/assets/{dist-COHih6Ap.js → dist-BL82fgXB.js} +1 -1
- package/web/dist/assets/{download-CyuUKqUQ.js → download-BBcE6du0.js} +1 -1
- package/web/dist/assets/{dropdown-menu-Cki3UkoB.js → dropdown-menu-9pfVDQIS.js} +1 -1
- package/web/dist/assets/{external-link-DBW09ipX.js → external-link-B9I9h6zs.js} +1 -1
- package/web/dist/assets/{facet-filter-Cqj-5rKE.js → facet-filter-Cvm-6l7b.js} +1 -1
- package/web/dist/assets/{file-C0T05LWx.js → file-BnJ8Tzsg.js} +1 -1
- package/web/dist/assets/{file-preview-DDMQl0pN.js → file-preview-CP4j_vl5.js} +1 -1
- package/web/dist/assets/{file-tree-BSz-YUtV.js → file-tree-8U32zDd-.js} +1 -1
- package/web/dist/assets/{folder-B1fRqWd-.js → folder-CytN1Yo8.js} +1 -1
- package/web/dist/assets/{follow-up-engine-DJqeqQv7.js → follow-up-engine-Ce9k7tYF.js} +1 -1
- package/web/dist/assets/{git-pull-request-CB-C2ck0.js → git-pull-request-DMo_7DFy.js} +1 -1
- package/web/dist/assets/{git-pull-request-draft-Dll303dU.js → git-pull-request-draft-BMkmZz6D.js} +1 -1
- package/web/dist/assets/{git-tab-loading-CHoWVSMs.js → git-tab-loading-B_kOqZw9.js} +1 -1
- package/web/dist/assets/{github-BAaZGTc5.js → github-Y4GAdDuW.js} +1 -1
- package/web/dist/assets/{host-usage-hoMm5ziX.js → host-usage-Blc4XuJC.js} +1 -1
- package/web/dist/assets/{icon-tooltip-BMSktNTR.js → icon-tooltip-xYeXiKnP.js} +1 -1
- package/web/dist/assets/{impact-control-BntVowtX.js → impact-control-CYWqjBeZ.js} +1 -1
- package/web/dist/assets/{impact-model-BnHTSz19.js → impact-model-w3m0JqTh.js} +1 -1
- package/web/dist/assets/{index-DkH-l1nx.js → index-Bim_jMGF.js} +4 -4
- package/web/dist/assets/{input-BHLoLpf_.js → input-BD-Stab_.js} +1 -1
- package/web/dist/assets/{layout-cards-BiaO-y0_.js → layout-cards-Banu0pif.js} +1 -1
- package/web/dist/assets/loader-circle-B4o_mGGx.js +1 -0
- package/web/dist/assets/{markdown-DCho0xLX.js → markdown-BtT0eMoy.js} +1 -1
- package/web/dist/assets/{markdown-BSbnT59D.js → markdown-DLSPDIgM.js} +1 -1
- package/web/dist/assets/{message-square-DeioD-nE.js → message-square-CFnbWDwJ.js} +1 -1
- package/web/dist/assets/{picker-pill-dtbp-_uE.js → picker-pill-Db_cc08W.js} +1 -1
- package/web/dist/assets/plus-3r-g4vO6.js +1 -0
- package/web/dist/assets/{project-router-DKhAxqVN.js → project-router-B25WtOd0.js} +1 -1
- package/web/dist/assets/{queries-CcUicQMI.js → queries-SXr7UH2d.js} +1 -1
- package/web/dist/assets/{reasoning-effort-pill-BhmfVcsu.js → reasoning-effort-pill-BT5JgCzI.js} +1 -1
- package/web/dist/assets/{repo-git-BFkoDrOR.js → repo-git-BwMJr8WR.js} +1 -1
- package/web/dist/assets/{run-diff-Bqzfy0nD.js → run-diff-D9cHFzEp.js} +1 -1
- package/web/dist/assets/{save-KwYccmIJ.js → save-BvNImrT_.js} +1 -1
- package/web/dist/assets/{scroll-within-NtZ5dkDK.js → scroll-within-Bw2EOT3w.js} +1 -1
- package/web/dist/assets/search-DdSsYN9s.js +1 -0
- package/web/dist/assets/{search-x-CuLyHOYy.js → search-x-B5WQOGxd.js} +1 -1
- package/web/dist/assets/{settings-2-2oAbOGLJ.js → settings-2-Du_u3WUT.js} +1 -1
- package/web/dist/assets/{sheet-476-fEy8.js → sheet-BHrzxKUa.js} +1 -1
- package/web/dist/assets/{skills-DNlTllBw.js → skills-DVAMF9vT.js} +1 -1
- package/web/dist/assets/{square-BNB_JogR.js → square-QzJ9-phT.js} +1 -1
- package/web/dist/assets/{tabs-DvgAVMoK.js → tabs-Be68Aqa2.js} +1 -1
- package/web/dist/assets/{tag-DmOvmnge.js → tag-D04GM0QQ.js} +1 -1
- package/web/dist/assets/{task-commits-BNxM4ySE.js → task-commits-BgNk6lcj.js} +1 -1
- package/web/dist/assets/{task-graph-B8UG1bWG.js → task-graph-BBPeT1Qi.js} +1 -1
- package/web/dist/assets/{task-notes-BzZ_2bLv.js → task-notes-Drlr129V.js} +1 -1
- package/web/dist/assets/{task-workspace-DqQm71hh.js → task-workspace-C2RhmQ8X.js} +3 -3
- package/web/dist/assets/{terminal-drawer-3XZ_E5qD.js → terminal-drawer-Cq4lD_aH.js} +1 -1
- package/web/dist/assets/{terminal-pane-QqbuHk94.js → terminal-pane-Dkj-n0Sv.js} +1 -1
- package/web/dist/assets/terminal-zaJwNSdq.js +1 -0
- package/web/dist/assets/{textarea-1vrKeg9f.js → textarea-CIman6oH.js} +1 -1
- package/web/dist/assets/{toaster-Dj8O1z-I.js → toaster-CE_1rqAq.js} +1 -1
- package/web/dist/assets/{token-metrics-ZDoTStYx.js → token-metrics-97NtLcbt.js} +1 -1
- package/web/dist/assets/{tooltip-WymDMkgX.js → tooltip-CqaFwWh4.js} +1 -1
- package/web/dist/assets/{tracker-B9lQf4WG.js → tracker-Ck46g72w.js} +1 -1
- package/web/dist/assets/{triangle-alert-Clftje0g.js → triangle-alert-oqwl_X9W.js} +1 -1
- package/web/dist/assets/{upload-BIjyX235.js → upload-DWJUmf3k.js} +1 -1
- package/web/dist/assets/{use-now-C1TJXVSC.js → use-now-g24574wK.js} +1 -1
- package/web/dist/assets/{use-submit-shortcut-DYf3by1s.js → use-submit-shortcut-mQeH0ZBS.js} +1 -1
- package/web/dist/assets/utils-hmDT0E5u.js +55 -0
- package/web/dist/assets/{workflow-graph-f7ijc6fG.js → workflow-graph-Bc4h10S1.js} +1 -1
- package/web/dist/assets/{worktree-lifecycle-operation-DvG1DFAL.js → worktree-lifecycle-operation-AhaYwnJA.js} +1 -1
- package/web/dist/assets/x-UK9jvTdu.js +1 -0
- package/web/dist/index.html +50 -50
- package/web/dist/assets/arrow-left-DvHlMSIX.js +0 -1
- package/web/dist/assets/check-BV6GOqQB.js +0 -1
- package/web/dist/assets/chevron-left-DDhByTfa.js +0 -1
- package/web/dist/assets/chevron-right-C78saYqb.js +0 -1
- package/web/dist/assets/circle-check-Cnv6lWpO.js +0 -1
- package/web/dist/assets/loader-circle-Ckbl2c4y.js +0 -1
- package/web/dist/assets/plus-D4tFEjsG.js +0 -1
- package/web/dist/assets/search-pSYAwm0N.js +0 -1
- package/web/dist/assets/terminal-B_iArYIc.js +0 -1
- package/web/dist/assets/utils-BSPpPa8l.js +0 -60
- package/web/dist/assets/x-DK4cVH39.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/cezar",
|
|
3
|
-
"version": "0.19.0-
|
|
3
|
+
"version": "0.19.0-pr2187.5245",
|
|
4
4
|
"description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"undici": "^6.29.0",
|
|
54
54
|
"ws": "^8.21.1",
|
|
55
55
|
"yaml": "^2.5.0",
|
|
56
|
-
"zod": "^4.
|
|
56
|
+
"zod": "^4.6.7"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@open-mercato/cezar-api-client": "0.19.0-
|
|
60
|
-
"@open-mercato/cezar-contract": "0.19.0-
|
|
59
|
+
"@open-mercato/cezar-api-client": "0.19.0-pr2187.5245",
|
|
60
|
+
"@open-mercato/cezar-contract": "0.19.0-pr2187.5245",
|
|
61
61
|
"@types/node": "^20.14.0",
|
|
62
62
|
"@types/proper-lockfile": "4.1.4",
|
|
63
63
|
"@types/ws": "^8.18.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-
|
|
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-hmDT0E5u.js";import{t as i}from"./project-router-B25WtOd0.js";import{i as a,o,s}from"./use-now-g24574wK.js";import{c,d as l,f as u,m as d,p as f,u as p}from"./sheet-BHrzxKUa.js";import{F as m,I as h,L as g,N as _,k as v}from"./worktree-lifecycle-operation-AhaYwnJA.js";import{Ot as y,a as b}from"./picker-pill-Db_cc08W.js";import{t as x}from"./check-CnXMnT3w.js";import{s as S}from"./dist-BL82fgXB.js";import{x as C}from"./impact-model-w3m0JqTh.js";import{n as w}from"./textarea-CIman6oH.js";import{c as T}from"./index-Bim_jMGF.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-
|
|
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-hmDT0E5u.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-DEKLgKmf.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-DEKLgKmf.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-
|
|
1
|
+
import{N as e}from"./button-DEKLgKmf.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,Sa as i,wt as a}from"./queries-CcUicQMI.js";import{ht as o,t as s}from"./utils-BSPpPa8l.js";import{c,x as l}from"./project-router-DKhAxqVN.js";import{N as u,t as d}from"./button-Tjc8i8XN.js";import{kt as f,nt as p}from"./picker-pill-dtbp-_uE.js";import{s as m}from"./dist-COHih6Ap.js";import{a as h,i as g,l as _,n as v,o as y,t as b}from"./dropdown-menu-Cki3UkoB.js";import{t as x}from"./download-CyuUKqUQ.js";import{t as S}from"./external-link-DBW09ipX.js";import{t as C}from"./file-preview-DDMQl0pN.js";import{t as w}from"./file-C0T05LWx.js";import{t as T}from"./loader-circle-Ckbl2c4y.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-DJqeqQv7.js";import{t as L}from"./triangle-alert-Clftje0g.js";import{t as ee}from"./x-DK4cVH39.js";import{n as R}from"./format-DHK74MwW.js";import{t as z}from"./centered-state-C7zhOePG.js";import{t as B}from"./markdown-DCho0xLX.js";import{$ as V,R as H,W as U,it as W,rt as G}from"./index-DkH-l1nx.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,Sa as i,wt as a}from"./queries-SXr7UH2d.js";import{ht as o,t as s}from"./utils-hmDT0E5u.js";import{c,x as l}from"./project-router-B25WtOd0.js";import{N as u,t as d}from"./button-DEKLgKmf.js";import{kt as f,nt as p}from"./picker-pill-Db_cc08W.js";import{s as m}from"./dist-BL82fgXB.js";import{a as h,i as g,l as _,n as v,o as y,t as b}from"./dropdown-menu-9pfVDQIS.js";import{t as x}from"./download-BBcE6du0.js";import{t as S}from"./external-link-B9I9h6zs.js";import{t as C}from"./file-preview-CP4j_vl5.js";import{t as w}from"./file-BnJ8Tzsg.js";import{t as T}from"./loader-circle-B4o_mGGx.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-Ce9k7tYF.js";import{t as L}from"./triangle-alert-oqwl_X9W.js";import{t as ee}from"./x-UK9jvTdu.js";import{n as R}from"./format-DHK74MwW.js";import{t as z}from"./centered-state-BphcaI7f.js";import{t as B}from"./markdown-BtT0eMoy.js";import{$ as V,R as H,W as U,it as W,rt as G}from"./index-Bim_jMGF.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-
|
|
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-hmDT0E5u.js";import{N as c}from"./button-DEKLgKmf.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`}]]);e();var u=t();function d({className:e,flush:t=!1,...n}){return(0,u.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 f(e){return n[((e-1)%7+7)%7]??``}function p(e,t){let n=r(typeof e==`number`?e:Date.parse(e),t);return n?`${f(n.weekday)} ${a(n.hour,n.minute)}`:``}function m(e,t){let n=r(typeof e==`number`?e:Date.parse(e),t);return n?a(n.hour,n.minute):``}function h(e,t,n=Date.now()){let i=Date.parse(e),o=r(i,t);if(!o)return``;if(n-i<6*864e5)return`${f(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 g(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 _(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 v(e){return e>=10?`$${e.toFixed(1)}`:`$${e.toFixed(2)}`}function y(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 b(e){switch(e){case`review`:return`needs review`;case`waiting`:return`needs you`;default:return e}}function x(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 S(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{g as a,y as c,v as d,d as f,h as i,m as l,f as n,S as o,l as p,p as r,b as s,_ as t,x as u};
|