@wjarka/cezarion 0.17.0-pr2750.4607 → 0.17.0-pr2753.4613

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 (56) hide show
  1. package/dist/ci-wait/controller.d.ts +37 -37
  2. package/dist/delegation/transport.d.ts +62 -62
  3. package/dist/server/activity-routes.d.ts +23 -23
  4. package/dist/server/self-update-routes.d.ts +11 -11
  5. package/dist/server/server.d.ts +1230 -1230
  6. package/package.json +3 -3
  7. package/web/dist/assets/activity-motion-B5fIHwoB.css +1 -0
  8. package/web/dist/assets/activity-motion-Ch0PoZJR.js +2 -0
  9. package/web/dist/assets/activity-route-CQPkXxJ2.js +1 -0
  10. package/web/dist/assets/{agent-accounts-lFFHk56I.js → agent-accounts-ZGHdsjYE.js} +1 -1
  11. package/web/dist/assets/arrow-right-Dh_Lx3um.js +1 -0
  12. package/web/dist/assets/{commit-diff-panel-0_Qu3h0B.js → commit-diff-panel-UwU29VK_.js} +1 -1
  13. package/web/dist/assets/{control-locations-CM5KUQ3d.js → control-locations-SzZ8gyme.js} +1 -1
  14. package/web/dist/assets/{diff-Ca1O4a0T.js → diff-CQdcUei8.js} +2 -2
  15. package/web/dist/assets/{diff-view-Bk5YG0An.js → diff-view-BH7MnYEM.js} +1 -1
  16. package/web/dist/assets/{file-preview-bylLpbji.js → file-preview-BmEFF1nO.js} +1 -1
  17. package/web/dist/assets/{git-toolbar-BhVKNNog.js → git-toolbar-BIctOY7_.js} +1 -1
  18. package/web/dist/assets/github-BtPVrHZu.js +1 -0
  19. package/web/dist/assets/{github-sidebar-model-DeQrUvUi.js → github-sidebar-model-DssVqUad.js} +1 -1
  20. package/web/dist/assets/global-activity-route-BOg5DOZ-.js +1 -0
  21. package/web/dist/assets/hourglass-B0lPAJvT.js +1 -0
  22. package/web/dist/assets/index-B98HIjrF.js +12 -0
  23. package/web/dist/assets/index-DZItIsRv.css +1 -0
  24. package/web/dist/assets/{preview-pane-connected-DY6nOrSu.js → preview-pane-connected-Dfc9BAkc.js} +2 -2
  25. package/web/dist/assets/{project-router-n0p0qOgE.js → project-router-DQWY9FSQ.js} +1 -1
  26. package/web/dist/assets/{project-scope-context-a1Wrxrws.js → project-scope-context-DFjJ4Dzo.js} +3 -3
  27. package/web/dist/assets/queries-Cgys1fiN.js +1 -0
  28. package/web/dist/assets/{repo-git-BlRkTKPh.js → repo-git-BmaBIIo9.js} +1 -1
  29. package/web/dist/assets/{report-reader-BHAqz7cz.js → report-reader-BflKmitB.js} +1 -1
  30. package/web/dist/assets/{reports-CDtBVfcd.js → reports-D0VRvzsA.js} +1 -1
  31. package/web/dist/assets/run-header-p5pX7Js3.js +2 -0
  32. package/web/dist/assets/{skills-DHipK-wn.js → skills-BLI5ZUXe.js} +1 -1
  33. package/web/dist/assets/{tab-link-aLp9SnaN.js → tab-link-SMUzNnZa.js} +1 -1
  34. package/web/dist/assets/{task-changes-QfK-hLrE.js → task-changes-nzP5M4TF.js} +1 -1
  35. package/web/dist/assets/{task-commits-xIQcR_Km.js → task-commits-IDq_lfu-.js} +1 -1
  36. package/web/dist/assets/{task-files-B7oZBfjd.js → task-files-DKCWoClo.js} +1 -1
  37. package/web/dist/assets/{task-github-item-CjDws-2w.js → task-github-item-D-HcRSL8.js} +1 -1
  38. package/web/dist/assets/task-thread-BJuTSmY_.js +9 -0
  39. package/web/dist/assets/{thread-state-BBWH_A_c.js → thread-state-DWNsDveq.js} +1 -1
  40. package/web/dist/assets/{use-hand-to-agent-state-Ce533i9c.js → use-hand-to-agent-state-Ds1bv9Yr.js} +1 -1
  41. package/web/dist/assets/{useInfiniteQuery-BrVyFSZ3.js → useInfiniteQuery-HtyVqdKz.js} +1 -1
  42. package/web/dist/assets/useQuery-BGIo-SEb.js +1 -0
  43. package/web/dist/assets/{workflows-CBpLWh2t.js → workflows-BWyhlz9X.js} +2 -2
  44. package/web/dist/assets/ws-BZNDvStH.js +1 -0
  45. package/web/dist/index.html +11 -11
  46. package/web/dist/assets/activity-route-B1mVzd-G.js +0 -2
  47. package/web/dist/assets/attention-GMrS0SeU.js +0 -1
  48. package/web/dist/assets/github-lnyth9tK.js +0 -1
  49. package/web/dist/assets/global-activity-route-Bw-ScJWc.js +0 -1
  50. package/web/dist/assets/hourglass-DjKAbcdJ.js +0 -1
  51. package/web/dist/assets/index-BS8upD5I.js +0 -12
  52. package/web/dist/assets/index-CRlkK-XH.css +0 -1
  53. package/web/dist/assets/queries-k8gAuGEO.js +0 -1
  54. package/web/dist/assets/run-header-CIroyrry.js +0 -2
  55. package/web/dist/assets/task-thread-Ce9y5t-U.js +0 -9
  56. package/web/dist/assets/useQuery-P6-rXCt0.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{s as r,u as i}from"./button-RJMdCnZw.js";import{Ut as a,_n as o,ln as s}from"./queries-k8gAuGEO.js";import{d as c,h as l,m as u,p as d}from"./es2015-VrVcR1vD.js";import{S as f}from"./dropdown-menu-B2Hg08ap.js";import{i as p,r as m,t as h}from"./popover-DV9NKc0j.js";import{K as g,i as _,rt as v,u as y}from"./design-icons-DmYTv2r1.js";import{a as b,c as ee,i as x,n as te}from"./textarea-CMbcARwO.js";import{c as ne,t as re}from"./project-router-n0p0qOgE.js";import{B as ie,F as ae,I as S,L as oe,N as se,R as C,z as w}from"./agent-accounts-lFFHk56I.js";import{a as T,i as E}from"./skills-DFBiAuJG.js";/* empty css */import{t as D}from"./markdown-CYkWwCze.js";var O=e(t(),1);function k(e){let t=O.useRef({value:e,previous:e});return O.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var A=n(),j=`Switch`,[ce,le]=u(j),[ue,M]=ce(j);function de(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:l,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[p,m]=c({prop:n,defaultProp:i??!1,onChange:l,caller:j}),[h,g]=O.useState(null),[_,v]=O.useState(null),y={checked:p,setChecked:m,disabled:a,control:h,setControl:g,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:O.useRef(!1),required:u,defaultChecked:i,isFormControl:!h||!!o||!!h.closest(`form`),bubbleInput:_,setBubbleInput:v};return(0,A.jsx)(ue,{scope:t,...y,children:B(f)?f(y):r})}var N=`SwitchTrigger`,P=O.forwardRef(({__scopeSwitch:e,onClick:t,...n},i)=>{let{control:a,form:o,value:s,disabled:c,checked:u,required:f,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:_}=M(N,e),v=r(i,p),y=O.useRef(u);return O.useEffect(()=>{let e=o?a?.ownerDocument.getElementById(o):a?.form;if(e instanceof HTMLFormElement){let t=()=>m(y.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,o,m]),(0,A.jsx)(l.button,{type:`button`,role:`switch`,"aria-checked":u,"aria-required":f,"data-state":V(u),"data-disabled":c?``:void 0,disabled:c,value:s,...n,ref:v,onClick:d(t,e=>{m(e=>!e),_&&g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})})});P.displayName=N;var F=O.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,A.jsx)(de,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(P,{...d,ref:t,__scopeSwitch:n}),e&&(0,A.jsx)(z,{__scopeSwitch:n})]})})});F.displayName=j;var I=`SwitchThumb`,L=O.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=M(I,n);return(0,A.jsx)(l.span,{"data-state":V(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});L.displayName=I;var R=`SwitchBubbleInput`,z=O.forwardRef(({__scopeSwitch:e,...t},n)=>{let{control:i,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:s,required:c,disabled:u,name:d,value:p,form:m,bubbleInput:h,setBubbleInput:g}=M(R,e),_=r(n,g),v=k(o),y=f(i);O.useEffect(()=>{let e=h;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!a.current;if(v!==o&&n){let t=new Event(`click`,{bubbles:r});n.call(e,o),e.dispatchEvent(t)}},[h,v,o,a]);let b=O.useRef(o);return(0,A.jsx)(l.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??b.current,required:c,disabled:u,name:d,value:p,form:m,...t,tabIndex:-1,ref:_,style:{...t.style,...y,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});z.displayName=R;function B(e){return typeof e==`function`}function V(e){return e?`checked`:`unchecked`}function H({templates:e,onInsert:t,triggerClassName:n,disabled:r,iconOnly:a=!1,label:o=`Template`}){let[s,c]=(0,O.useState)(!1),l=(0,O.useRef)(null),u=ne();return e.length===0?null:(0,A.jsxs)(h,{open:s,onOpenChange:c,children:[(0,A.jsx)(p,{asChild:!0,children:(0,A.jsxs)(`button`,{type:`button`,"data-slot":`prompt-template-trigger`,"aria-label":`Insert a prompt template`,title:`Insert a prompt template`,disabled:r,className:i(`inline-flex h-[26px] items-center gap-1.5 rounded-full border border-border bg-card text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-50`,a?`w-[26px] justify-center px-0`:`h-11 gap-2 rounded-lg px-3 text-foreground`,n),children:[(0,A.jsx)(g,{"aria-hidden":`true`,className:a?`size-3 shrink-0 text-accent-icon`:`size-[18px] shrink-0 text-muted-foreground`}),a?null:(0,A.jsxs)(A.Fragment,{children:[o,(0,A.jsx)(y,{"aria-hidden":`true`,className:`size-[13px] shrink-0 text-soft-foreground`})]})]})}),(0,A.jsx)(m,{align:`start`,sideOffset:8,"data-slot":`prompt-template-menu`,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,onCloseAutoFocus:e=>e.preventDefault(),children:(0,A.jsxs)(se,{filter:T,children:[(0,A.jsx)(oe,{placeholder:`search templates…`,onInput:()=>l.current?.scrollTo(0,0)}),(0,A.jsxs)(w,{ref:l,"data-slot":`prompt-template-list-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[(0,A.jsx)(ae,{children:`Nothing matches.`}),(0,A.jsx)(S,{heading:`Insert a template`,children:e.map(e=>(0,A.jsxs)(C,{value:`template ${e.label} ${e.id}`,keywords:[e.text,...e.skills??[]],"data-slot":`prompt-template-option`,"data-template":e.id,title:e.text,className:`flex-col items-start gap-0.5`,onSelect:()=>{t(e.text),c(!1)},children:[(0,A.jsxs)(`span`,{className:`flex w-full items-center gap-1.5`,children:[(0,A.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] font-medium text-foreground`,children:e.label}),e.skills&&e.skills.length>0?(0,A.jsxs)(`span`,{"data-slot":`prompt-template-assigned`,title:`Applied automatically with: ${e.skills.join(`, `)}`,className:`inline-flex shrink-0 items-center gap-0.5 text-[12px] font-medium text-accent-text`,children:[(0,A.jsx)(v,{"aria-hidden":`true`,className:`size-2.5`}),e.skills.length]}):null]}),(0,A.jsx)(`span`,{className:`line-clamp-1 text-[11px] text-soft-foreground`,children:e.text})]},e.id))}),(0,A.jsx)(ie,{}),(0,A.jsx)(S,{children:(0,A.jsx)(C,{value:`edit prompt templates settings`,"data-slot":`prompt-template-settings`,className:`text-[12px] text-muted-foreground`,onSelect:()=>{c(!1),u(`/settings/prompt-templates`)},children:`Edit templates…`})})]})]})})]})}function U({className:e,size:t=`default`,...n}){return(0,A.jsx)(F,{"data-slot":`switch`,"data-size":t,className:i(`peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-none transition-[color,background-color,border-color,box-shadow] outline-hidden focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-6 data-[size=default]:w-10 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-accent-strong data-[state=unchecked]:bg-input`,e),...n,children:(0,A.jsx)(L,{"data-slot":`switch-thumb`,className:i(`pointer-events-none block rounded-full bg-background ring-0 motion-safe:transition-transform group-data-[size=default]/switch:size-[18px] group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-[state=checked]:translate-x-5 group-data-[size=default]/switch:data-[state=unchecked]:translate-x-0.5 group-data-[size=sm]/switch:data-[state=checked]:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-[state=unchecked]:translate-x-0`)})})}function fe({source:e,className:t}){return(0,A.jsx)(`span`,{"data-slot":`skill-source`,"data-source":e,className:i(`shrink-0 rounded bg-accent-strong/10 px-2 py-1 text-[12px]`,E({source:e})?`font-semibold text-foreground`:`text-soft-foreground`,t),children:e===`team`?`Team`:e})}function W({skill:e,activation:t}){return(0,A.jsx)(`span`,{className:`inline-flex min-h-11 min-w-11 shrink-0 items-center justify-center`,children:(0,A.jsx)(U,{"data-slot":`skill-switch`,"data-skill":e.name,"data-repo":e.team?.repo,"data-locked":t.locked||void 0,"aria-label":t.ariaLabel,checked:t.checked,disabled:t.disabled,onCheckedChange:()=>t.onCheckedChange(),className:`relative before:absolute before:-inset-x-1 before:-inset-y-2.5 before:content-[''] disabled:cursor-default`})})}function G({skill:e,usedBy:t,activation:n,heading:r=`h2`}){return(0,A.jsxs)(`div`,{"data-slot":`skill-detail`,className:`min-w-0`,children:[(0,A.jsxs)(`div`,{className:`flex min-w-0 flex-col items-start gap-4`,children:[(0,A.jsxs)(`span`,{className:`sw-detail-source text-[12px]`,children:[(0,A.jsx)(fe,{source:e.source}),` skill`]}),(0,A.jsxs)(`div`,{className:`flex w-full min-w-0 items-start justify-between gap-3`,children:[(0,A.jsx)(r,{className:`min-w-0 text-[19px] font-normal md:text-2xl break-words [overflow-wrap:anywhere]`,children:e.name}),n?(0,A.jsx)(W,{skill:e,activation:n}):null]})]}),n&&!n.checked?(0,A.jsx)(`p`,{"data-slot":`skill-inactive-notice`,className:`mt-4 rounded-md border border-border bg-background px-3 py-2 text-[13px] text-muted-foreground`,children:`Not enabled for this project — agents can’t pick it.`}):null,(0,A.jsxs)(`p`,{"data-slot":`skill-path`,className:`mt-4 text-[12px] break-all text-soft-foreground`,children:[e.path,e.team?` · from ${e.team.repo}`:``]}),e.description?(0,A.jsx)(`p`,{"data-slot":`skill-description`,className:`mt-2.5 text-[13px] text-muted-foreground`,children:e.description}):null,t===void 0?null:(0,A.jsxs)(`section`,{"data-slot":`skill-used-by`,className:`mt-5`,children:[(0,A.jsx)(`h3`,{className:`text-[13px] font-semibold`,children:`Used by`}),t.length>0?(0,A.jsx)(`ul`,{className:`mt-1.5 flex flex-col gap-1`,children:t.map(e=>(0,A.jsxs)(`li`,{className:`flex items-center gap-1.5 font-mono text-xs text-muted-foreground`,children:[(0,A.jsx)(_,{"aria-hidden":`true`,className:`size-3 shrink-0 text-soft-foreground`}),e]},e))}):(0,A.jsx)(`p`,{className:`mt-1.5 text-xs text-soft-foreground`,children:`Not referenced by a workflow yet. quick-task can use it when the task mentions it.`})]}),(0,A.jsx)(`section`,{className:`mt-5`,children:(0,A.jsx)(`div`,{"data-slot":`skill-body`,className:`mt-2 text-sm`,children:(0,A.jsx)(D,{children:e.body})})})]})}function pe({skill:e,onClose:t}){return(0,A.jsx)(te,{open:e!==null,onOpenChange:e=>e?void 0:t(),children:(0,A.jsx)(x,{"data-slot":`skill-preview`,className:`block max-h-[80dvh] overflow-y-auto sm:max-w-2xl`,children:e?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(ee,{className:`sr-only`,children:e.name}),(0,A.jsx)(b,{className:`sr-only`,children:`Read-only skill preview`}),(0,A.jsx)(G,{skill:e,heading:`h3`}),(0,A.jsx)(`p`,{className:`mt-5`,children:(0,A.jsx)(re,{to:`/skills?skill=${encodeURIComponent(e.name)}`,"data-slot":`skill-preview-manage`,onClick:t,className:`text-xs font-semibold text-accent-text hover:underline`,children:`Open in the Skills catalog`})})]}):null})})}function me({className:e,...t}){return(0,A.jsx)(`div`,{"data-slot":`skeleton`,className:i(`animate-pulse rounded-md bg-accent`,e),...t})}var he=[`assigned`,`no-task`,`has-task`,`all`],ge=[`review`,`mine`,`failing`,`all`],_e=50,K=`is:open review-requested:@me`,q=`is:open status:failure`;function ve(e,t){return e===`prs`&&(t===`review`||t===`failing`)}function ye(e){return e===`review`?K:e===`failing`?q:null}function be(e,t){return t===null?null:(e===`issues`?he:ge).includes(t)?t:`all`}function xe(e,t,n,r=``){let i=`${n===void 0?e===`issues`?`/github`:`/github/prs`:`${e===`issues`?`/github/issues`:`/github/prs`}/${n}`}${r}`;return t===null?i:`${i}?filter=${encodeURIComponent(t)}`}function Se(e,t){let n=t??`all`;return n===`all`?e===`issues`?`all`:`all-prs`:n}function Ce(e){return e===`all`?{view:`issues`,filter:`all`}:e===`all-prs`?{view:`prs`,filter:`all`}:{view:e===`review`||e===`mine`||e===`failing`?`prs`:`issues`,filter:e}}var J=[{id:`assigned`,label:`Assigned to me`},{id:`no-task`,label:`No task yet`},{id:`has-task`,label:`Has a task`},{id:`all`,label:`All open`}],Y=[{id:`review`,label:`Review requested`},{id:`mine`,label:`Mine`},{id:`failing`,label:`Checks failing`},{id:`all-prs`,label:`All open`}],X=Object.fromEntries([...J,...Y].map(e=>[e.id,e.label]));function we(e){return e===null?``:`${e.value}${e.bound===`atLeast`?`+`:``}`}function Te(e,t){if(t?.bound===`atLeast`)return e===`review`||e===`failing`?`At least ${t.value}: GitHub search returns at most ${_e} results.`:`At least ${t.value}: only the loaded pages are counted. Scroll to load more.`}var Z=(e,t)=>e!==void 0&&t!==void 0&&e.toLowerCase()===t.toLowerCase();function Ee(e){try{let t=new URL(e).pathname.split(`/`).filter(Boolean);return t.length>=2?`${t[0]}/${t[1]}`.toLowerCase():null}catch{return null}}function De(e,t,n){return new Set(e.filter(e=>!e.archived).flatMap(e=>Q(e,t,n)))}function Q(e,t,n){let r=t?.toLowerCase();return s(e,void 0,n).filter(e=>e.kind===`Issue`&&(!e.url||r!==void 0&&Ee(e.url)===r)).map(e=>e.number)}function Oe(e,t,n,r){let i=new Map;for(let a of e)!o(a)&&Q(a,n,r).includes(t)&&i.set(a.id,a);return[...i.values()].sort((e,t)=>Date.parse(t.createdAt)-Date.parse(e.createdAt)||e.id.localeCompare(t.id))}function ke(e,t){let n=new Map(t.map(e=>[e.number,e]));return e.map(e=>n.get(e.number)??e)}function $(e){return e?.available?{value:e.items.length,bound:e.truncated?`atLeast`:`exact`}:null}function Ae({gh:e,tasks:t,review:n,failing:r}){let i={assigned:null,"no-task":null,"has-task":null,all:null,review:$(n),mine:null,failing:$(r),"all-prs":null};if(!e?.available)return i;let o=!a(e,`issues`),s=!a(e,`prs`),c=(e,t)=>({value:e,bound:t?`atLeast`:`exact`}),l=t?e.issues.filter(e=>t.has(e.number)).length:null;return{...i,all:c(e.issuesTotal??e.issues.length,!1),"all-prs":c(e.prsTotal??e.prs.length,!1),assigned:e.viewerLogin?c(e.issues.filter(t=>t.assignees?.some(t=>Z(t,e.viewerLogin))).length,o):null,mine:e.viewerLogin?c(e.prs.filter(t=>Z(t.author,e.viewerLogin)).length,s):null,"has-task":l===null?null:c(l,o),"no-task":l===null?null:c(e.issues.length-l,o)}}export{H as C,U as S,ye as _,K as a,pe as b,Ce as c,ve as d,De as f,ke as g,Se as h,Y as i,we as l,be as m,q as n,Te as o,Oe as p,J as r,Ae as s,X as t,xe as u,me as v,k as w,W as x,G as y};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{s as r,u as i}from"./button-RJMdCnZw.js";import{Ut as a,cn as o,gn as s}from"./queries-Cgys1fiN.js";import{d as c,h as l,m as u,p as d}from"./es2015-VrVcR1vD.js";import{S as f}from"./dropdown-menu-B2Hg08ap.js";import{i as p,r as m,t as h}from"./popover-DV9NKc0j.js";import{K as g,i as _,rt as v,u as y}from"./design-icons-DmYTv2r1.js";import{a as b,c as ee,i as x,n as te}from"./textarea-CMbcARwO.js";import{c as ne,t as re}from"./project-router-DQWY9FSQ.js";import{B as ie,F as ae,I as S,L as oe,N as se,R as C,z as w}from"./agent-accounts-ZGHdsjYE.js";import{a as T,i as E}from"./skills-DFBiAuJG.js";/* empty css */import{t as D}from"./markdown-CYkWwCze.js";var O=e(t(),1);function k(e){let t=O.useRef({value:e,previous:e});return O.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var A=n(),j=`Switch`,[ce,le]=u(j),[ue,M]=ce(j);function de(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:l,required:u,value:d=`on`,internal_do_not_use_render:f}=e,[p,m]=c({prop:n,defaultProp:i??!1,onChange:l,caller:j}),[h,g]=O.useState(null),[_,v]=O.useState(null),y={checked:p,setChecked:m,disabled:a,control:h,setControl:g,name:s,form:o,value:d,hasConsumerStoppedPropagationRef:O.useRef(!1),required:u,defaultChecked:i,isFormControl:!h||!!o||!!h.closest(`form`),bubbleInput:_,setBubbleInput:v};return(0,A.jsx)(ue,{scope:t,...y,children:B(f)?f(y):r})}var N=`SwitchTrigger`,P=O.forwardRef(({__scopeSwitch:e,onClick:t,...n},i)=>{let{control:a,form:o,value:s,disabled:c,checked:u,required:f,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:h,isFormControl:g,bubbleInput:_}=M(N,e),v=r(i,p),y=O.useRef(u);return O.useEffect(()=>{let e=o?a?.ownerDocument.getElementById(o):a?.form;if(e instanceof HTMLFormElement){let t=()=>m(y.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,o,m]),(0,A.jsx)(l.button,{type:`button`,role:`switch`,"aria-checked":u,"aria-required":f,"data-state":V(u),"data-disabled":c?``:void 0,disabled:c,value:s,...n,ref:v,onClick:d(t,e=>{m(e=>!e),_&&g&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})})});P.displayName=N;var F=O.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,A.jsx)(de,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(P,{...d,ref:t,__scopeSwitch:n}),e&&(0,A.jsx)(z,{__scopeSwitch:n})]})})});F.displayName=j;var I=`SwitchThumb`,L=O.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=M(I,n);return(0,A.jsx)(l.span,{"data-state":V(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});L.displayName=I;var R=`SwitchBubbleInput`,z=O.forwardRef(({__scopeSwitch:e,...t},n)=>{let{control:i,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:s,required:c,disabled:u,name:d,value:p,form:m,bubbleInput:h,setBubbleInput:g}=M(R,e),_=r(n,g),v=k(o),y=f(i);O.useEffect(()=>{let e=h;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!a.current;if(v!==o&&n){let t=new Event(`click`,{bubbles:r});n.call(e,o),e.dispatchEvent(t)}},[h,v,o,a]);let b=O.useRef(o);return(0,A.jsx)(l.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??b.current,required:c,disabled:u,name:d,value:p,form:m,...t,tabIndex:-1,ref:_,style:{...t.style,...y,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});z.displayName=R;function B(e){return typeof e==`function`}function V(e){return e?`checked`:`unchecked`}function H({templates:e,onInsert:t,triggerClassName:n,disabled:r,iconOnly:a=!1,label:o=`Template`}){let[s,c]=(0,O.useState)(!1),l=(0,O.useRef)(null),u=ne();return e.length===0?null:(0,A.jsxs)(h,{open:s,onOpenChange:c,children:[(0,A.jsx)(p,{asChild:!0,children:(0,A.jsxs)(`button`,{type:`button`,"data-slot":`prompt-template-trigger`,"aria-label":`Insert a prompt template`,title:`Insert a prompt template`,disabled:r,className:i(`inline-flex h-[26px] items-center gap-1.5 rounded-full border border-border bg-card text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:pointer-events-none disabled:opacity-50`,a?`w-[26px] justify-center px-0`:`h-11 gap-2 rounded-lg px-3 text-foreground`,n),children:[(0,A.jsx)(g,{"aria-hidden":`true`,className:a?`size-3 shrink-0 text-accent-icon`:`size-[18px] shrink-0 text-muted-foreground`}),a?null:(0,A.jsxs)(A.Fragment,{children:[o,(0,A.jsx)(y,{"aria-hidden":`true`,className:`size-[13px] shrink-0 text-soft-foreground`})]})]})}),(0,A.jsx)(m,{align:`start`,sideOffset:8,"data-slot":`prompt-template-menu`,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,onCloseAutoFocus:e=>e.preventDefault(),children:(0,A.jsxs)(se,{filter:T,children:[(0,A.jsx)(oe,{placeholder:`search templates…`,onInput:()=>l.current?.scrollTo(0,0)}),(0,A.jsxs)(w,{ref:l,"data-slot":`prompt-template-list-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[(0,A.jsx)(ae,{children:`Nothing matches.`}),(0,A.jsx)(S,{heading:`Insert a template`,children:e.map(e=>(0,A.jsxs)(C,{value:`template ${e.label} ${e.id}`,keywords:[e.text,...e.skills??[]],"data-slot":`prompt-template-option`,"data-template":e.id,title:e.text,className:`flex-col items-start gap-0.5`,onSelect:()=>{t(e.text),c(!1)},children:[(0,A.jsxs)(`span`,{className:`flex w-full items-center gap-1.5`,children:[(0,A.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] font-medium text-foreground`,children:e.label}),e.skills&&e.skills.length>0?(0,A.jsxs)(`span`,{"data-slot":`prompt-template-assigned`,title:`Applied automatically with: ${e.skills.join(`, `)}`,className:`inline-flex shrink-0 items-center gap-0.5 text-[12px] font-medium text-accent-text`,children:[(0,A.jsx)(v,{"aria-hidden":`true`,className:`size-2.5`}),e.skills.length]}):null]}),(0,A.jsx)(`span`,{className:`line-clamp-1 text-[11px] text-soft-foreground`,children:e.text})]},e.id))}),(0,A.jsx)(ie,{}),(0,A.jsx)(S,{children:(0,A.jsx)(C,{value:`edit prompt templates settings`,"data-slot":`prompt-template-settings`,className:`text-[12px] text-muted-foreground`,onSelect:()=>{c(!1),u(`/settings/prompt-templates`)},children:`Edit templates…`})})]})]})})]})}function U({className:e,size:t=`default`,...n}){return(0,A.jsx)(F,{"data-slot":`switch`,"data-size":t,className:i(`peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-none transition-[color,background-color,border-color,box-shadow] outline-hidden focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-6 data-[size=default]:w-10 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-accent-strong data-[state=unchecked]:bg-input`,e),...n,children:(0,A.jsx)(L,{"data-slot":`switch-thumb`,className:i(`pointer-events-none block rounded-full bg-background ring-0 motion-safe:transition-transform group-data-[size=default]/switch:size-[18px] group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-[state=checked]:translate-x-5 group-data-[size=default]/switch:data-[state=unchecked]:translate-x-0.5 group-data-[size=sm]/switch:data-[state=checked]:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-[state=unchecked]:translate-x-0`)})})}function fe({source:e,className:t}){return(0,A.jsx)(`span`,{"data-slot":`skill-source`,"data-source":e,className:i(`shrink-0 rounded bg-accent-strong/10 px-2 py-1 text-[12px]`,E({source:e})?`font-semibold text-foreground`:`text-soft-foreground`,t),children:e===`team`?`Team`:e})}function W({skill:e,activation:t}){return(0,A.jsx)(`span`,{className:`inline-flex min-h-11 min-w-11 shrink-0 items-center justify-center`,children:(0,A.jsx)(U,{"data-slot":`skill-switch`,"data-skill":e.name,"data-repo":e.team?.repo,"data-locked":t.locked||void 0,"aria-label":t.ariaLabel,checked:t.checked,disabled:t.disabled,onCheckedChange:()=>t.onCheckedChange(),className:`relative before:absolute before:-inset-x-1 before:-inset-y-2.5 before:content-[''] disabled:cursor-default`})})}function G({skill:e,usedBy:t,activation:n,heading:r=`h2`}){return(0,A.jsxs)(`div`,{"data-slot":`skill-detail`,className:`min-w-0`,children:[(0,A.jsxs)(`div`,{className:`flex min-w-0 flex-col items-start gap-4`,children:[(0,A.jsxs)(`span`,{className:`sw-detail-source text-[12px]`,children:[(0,A.jsx)(fe,{source:e.source}),` skill`]}),(0,A.jsxs)(`div`,{className:`flex w-full min-w-0 items-start justify-between gap-3`,children:[(0,A.jsx)(r,{className:`min-w-0 text-[19px] font-normal md:text-2xl break-words [overflow-wrap:anywhere]`,children:e.name}),n?(0,A.jsx)(W,{skill:e,activation:n}):null]})]}),n&&!n.checked?(0,A.jsx)(`p`,{"data-slot":`skill-inactive-notice`,className:`mt-4 rounded-md border border-border bg-background px-3 py-2 text-[13px] text-muted-foreground`,children:`Not enabled for this project — agents can’t pick it.`}):null,(0,A.jsxs)(`p`,{"data-slot":`skill-path`,className:`mt-4 text-[12px] break-all text-soft-foreground`,children:[e.path,e.team?` · from ${e.team.repo}`:``]}),e.description?(0,A.jsx)(`p`,{"data-slot":`skill-description`,className:`mt-2.5 text-[13px] text-muted-foreground`,children:e.description}):null,t===void 0?null:(0,A.jsxs)(`section`,{"data-slot":`skill-used-by`,className:`mt-5`,children:[(0,A.jsx)(`h3`,{className:`text-[13px] font-semibold`,children:`Used by`}),t.length>0?(0,A.jsx)(`ul`,{className:`mt-1.5 flex flex-col gap-1`,children:t.map(e=>(0,A.jsxs)(`li`,{className:`flex items-center gap-1.5 font-mono text-xs text-muted-foreground`,children:[(0,A.jsx)(_,{"aria-hidden":`true`,className:`size-3 shrink-0 text-soft-foreground`}),e]},e))}):(0,A.jsx)(`p`,{className:`mt-1.5 text-xs text-soft-foreground`,children:`Not referenced by a workflow yet. quick-task can use it when the task mentions it.`})]}),(0,A.jsx)(`section`,{className:`mt-5`,children:(0,A.jsx)(`div`,{"data-slot":`skill-body`,className:`mt-2 text-sm`,children:(0,A.jsx)(D,{children:e.body})})})]})}function pe({skill:e,onClose:t}){return(0,A.jsx)(te,{open:e!==null,onOpenChange:e=>e?void 0:t(),children:(0,A.jsx)(x,{"data-slot":`skill-preview`,className:`block max-h-[80dvh] overflow-y-auto sm:max-w-2xl`,children:e?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(ee,{className:`sr-only`,children:e.name}),(0,A.jsx)(b,{className:`sr-only`,children:`Read-only skill preview`}),(0,A.jsx)(G,{skill:e,heading:`h3`}),(0,A.jsx)(`p`,{className:`mt-5`,children:(0,A.jsx)(re,{to:`/skills?skill=${encodeURIComponent(e.name)}`,"data-slot":`skill-preview-manage`,onClick:t,className:`text-xs font-semibold text-accent-text hover:underline`,children:`Open in the Skills catalog`})})]}):null})})}function me({className:e,...t}){return(0,A.jsx)(`div`,{"data-slot":`skeleton`,className:i(`animate-pulse rounded-md bg-accent`,e),...t})}var he=[`assigned`,`no-task`,`has-task`,`all`],ge=[`review`,`mine`,`failing`,`all`],_e=50,K=`is:open review-requested:@me`,q=`is:open status:failure`;function ve(e,t){return e===`prs`&&(t===`review`||t===`failing`)}function ye(e){return e===`review`?K:e===`failing`?q:null}function be(e,t){return t===null?null:(e===`issues`?he:ge).includes(t)?t:`all`}function xe(e,t,n,r=``){let i=`${n===void 0?e===`issues`?`/github`:`/github/prs`:`${e===`issues`?`/github/issues`:`/github/prs`}/${n}`}${r}`;return t===null?i:`${i}?filter=${encodeURIComponent(t)}`}function Se(e,t){let n=t??`all`;return n===`all`?e===`issues`?`all`:`all-prs`:n}function Ce(e){return e===`all`?{view:`issues`,filter:`all`}:e===`all-prs`?{view:`prs`,filter:`all`}:{view:e===`review`||e===`mine`||e===`failing`?`prs`:`issues`,filter:e}}var J=[{id:`assigned`,label:`Assigned to me`},{id:`no-task`,label:`No task yet`},{id:`has-task`,label:`Has a task`},{id:`all`,label:`All open`}],Y=[{id:`review`,label:`Review requested`},{id:`mine`,label:`Mine`},{id:`failing`,label:`Checks failing`},{id:`all-prs`,label:`All open`}],X=Object.fromEntries([...J,...Y].map(e=>[e.id,e.label]));function we(e){return e===null?``:`${e.value}${e.bound===`atLeast`?`+`:``}`}function Te(e,t){if(t?.bound===`atLeast`)return e===`review`||e===`failing`?`At least ${t.value}: GitHub search returns at most ${_e} results.`:`At least ${t.value}: only the loaded pages are counted. Scroll to load more.`}var Z=(e,t)=>e!==void 0&&t!==void 0&&e.toLowerCase()===t.toLowerCase();function Ee(e){try{let t=new URL(e).pathname.split(`/`).filter(Boolean);return t.length>=2?`${t[0]}/${t[1]}`.toLowerCase():null}catch{return null}}function De(e,t,n){return new Set(e.filter(e=>!e.archived).flatMap(e=>Q(e,t,n)))}function Q(e,t,n){let r=t?.toLowerCase();return o(e,void 0,n).filter(e=>e.kind===`Issue`&&(!e.url||r!==void 0&&Ee(e.url)===r)).map(e=>e.number)}function Oe(e,t,n,r){let i=new Map;for(let a of e)!s(a)&&Q(a,n,r).includes(t)&&i.set(a.id,a);return[...i.values()].sort((e,t)=>Date.parse(t.createdAt)-Date.parse(e.createdAt)||e.id.localeCompare(t.id))}function ke(e,t){let n=new Map(t.map(e=>[e.number,e]));return e.map(e=>n.get(e.number)??e)}function $(e){return e?.available?{value:e.items.length,bound:e.truncated?`atLeast`:`exact`}:null}function Ae({gh:e,tasks:t,review:n,failing:r}){let i={assigned:null,"no-task":null,"has-task":null,all:null,review:$(n),mine:null,failing:$(r),"all-prs":null};if(!e?.available)return i;let o=!a(e,`issues`),s=!a(e,`prs`),c=(e,t)=>({value:e,bound:t?`atLeast`:`exact`}),l=t?e.issues.filter(e=>t.has(e.number)).length:null;return{...i,all:c(e.issuesTotal??e.issues.length,!1),"all-prs":c(e.prsTotal??e.prs.length,!1),assigned:e.viewerLogin?c(e.issues.filter(t=>t.assignees?.some(t=>Z(t,e.viewerLogin))).length,o):null,mine:e.viewerLogin?c(e.prs.filter(t=>Z(t.author,e.viewerLogin)).length,s):null,"has-task":l===null?null:c(l,o),"no-task":l===null?null:c(e.issues.length-l,o)}}export{H as C,U as S,ye as _,K as a,pe as b,Ce as c,ve as d,De as f,ke as g,Se as h,Y as i,we as l,be as m,q as n,Te as o,Oe as p,J as r,Ae as s,X as t,xe as u,me as v,k as w,W as x,G as y};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{p as r,t as i,u as a}from"./button-RJMdCnZw.js";import{$ as o,P as s}from"./queries-Cgys1fiN.js";import{B as c,C as l,E as u,G as d,I as f,M as p,N as m,O as h,P as g,R as _,T as ee,U as te,V as ne,W as re,_ as ie,a as ae,c as v,f as y,g as b,h as x,i as S,j as C,k as w,l as T,m as E,n as D,r as O,t as k,u as A,v as j,w as M,z as N}from"./activity-motion-Ch0PoZJR.js";import{et as P,tt as F}from"./index-B98HIjrF.js";var I=e(t(),1);function L(e,t){if(!t||t.length===0)return[...e];let n=new Map(t.map((e,t)=>[e,t])),r=e.filter(e=>n.has(e.projectId)),i=e.filter(e=>!n.has(e.projectId));return r.sort((e,t)=>(n.get(e.projectId)??0)-(n.get(t.projectId)??0)),[...r,...i]}function R(e){let t=[],n=[];for(let r of e)m(r)===void 0&&r.tasks.length===0?n.push(r):t.push(r);return{panels:t,idle:n}}function z(e){let t=new Set(e.tasks.map(e=>e.runId));return e.requests.filter(e=>e.relationship===`peer`&&t.has(e.senderRunId)&&t.has(e.recipientRunId))}function B(e){let t=e.tasks.length,n=e.tasks.reduce((e,t)=>e+t.workers.filter(e=>c(e.status)).length,0),r=[`${t} active task${t===1?``:`s`}`];return n>0&&r.push(`${n} worker${n===1?``:`s`}`),r.join(` · `)}function V(e,t){let n=t?`more `:``;return e===1?`1 ${n}project has no active work:`:`${e} ${n}projects have no active work:`}var H=n(),U={w:104,h:20};function W(e){let t=e.getBoundingClientRect(),n=new Map;for(let r of e.querySelectorAll(`[data-activity-pill]`)){let e=r.getAttribute(`data-activity-pill`);e&&n.set(e,b(r.getBoundingClientRect(),t))}return n}function G(e,t){let n=W(e),r=[...n.values()],i=ie(t),a=[];for(let e of t){let t=n.get(e.senderRunId),o=n.get(e.recipientRunId);t&&o&&a.push({requestId:e.requestId,...x(t,o,r,i.get(e.requestId))})}let o=j(a.map(e=>({id:e.requestId,at:e.label})),U,`x`);return a.map(e=>({...e,label:o.get(e.requestId)??e.label}))}function K(e,t){return e.length===t.length&&e.every((e,n)=>e.requestId===t[n]?.requestId&&e.d===t[n]?.d&&e.label.x===t[n]?.label.x&&e.label.y===t[n]?.label.y)}function q({arc:e,request:t,now:n,motion:r}){let i=A(r,e.requestId);return(0,H.jsxs)(`span`,{"data-slot":`activity-arc-label`,"data-request":e.requestId,"aria-hidden":`true`,style:{left:e.label.x,top:e.label.y},className:a(`pointer-events-none absolute z-[4] -translate-x-1/2 -translate-y-1/2 rounded-md border bg-background px-1.5 py-px text-[10.5px] whitespace-nowrap text-foreground tabular-nums max-md:hidden`,i?`border-success`:`border-message-peer-accent`,T(r,e.requestId)===`fade`&&`activity-line-out`),children:[i?(0,H.jsx)(`span`,{className:`font-semibold text-success`,children:`Replied`}):(0,H.jsx)(`span`,{className:`font-semibold text-message-peer-accent`,children:`Request`}),` · `,te(re(t.createdAt,n))]})}function J({arcs:e,layoutKey:t,now:n,motion:r=w,paused:i=!1}){let o=I.useRef(null),s=y(o,I.useCallback(t=>G(t,e),[e]),K,`[data-activity-pill]`,t),c=I.useMemo(()=>new Set(s.map(e=>e.requestId)),[s]),l=E(r.comets,c,i),u=new Map(e.map(e=>[e.requestId,e])),d=`activity-arrow-arc-${I.useId().replace(/[^a-zA-Z0-9_-]/g,``)}`;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`svg`,{ref:o,"data-slot":`activity-arcs`,"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-[3] size-full overflow-visible max-md:hidden`,children:[(0,H.jsx)(`defs`,{children:(0,H.jsx)(`marker`,{id:d,viewBox:`0 0 10 10`,refX:`8`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto`,children:(0,H.jsx)(`path`,{d:`M0 0 10 5 0 10z`,className:`fill-message-peer-accent`})})}),s.map(e=>{let t=T(r,e.requestId);return(0,H.jsx)(`path`,{"data-request":e.requestId,"data-kind":`peer`,"data-phase":t,d:e.d,fill:`none`,strokeDasharray:t===`replied`?void 0:`6 5`,strokeWidth:2,markerEnd:`url(#${d})`,className:a(`stroke-message-peer-accent`,v(t,e.requestId in r.opening))},e.requestId)}),(0,H.jsx)(`g`,{ref:l,"data-slot":`activity-comets`})]}),s.map(e=>{let t=u.get(e.requestId);return t?(0,H.jsx)(q,{arc:e,request:t,now:n,motion:r},e.requestId):null})]})}var Y=(e,t)=>`/p/${encodeURIComponent(e)}/tasks/${encodeURIComponent(t)}`;function oe({task:e}){let t=e.workers.filter(e=>c(e.status));return t.length===0?null:(0,H.jsxs)(`div`,{"data-slot":`activity-pill-workers`,className:`mt-1.5 ml-[19px] flex flex-wrap items-center gap-1 text-[11px] text-muted-foreground`,children:[t.map(e=>(0,H.jsx)(u,{run:e,role:`worker`},e.runId)),(0,H.jsxs)(`span`,{className:`ml-0.5`,children:[t.length,` worker`,t.length===1?``:`s`]})]})}function se({projectId:e,task:t,requests:n,index:i}){let a=_(t.runId,n);return a.length===0?null:(0,H.jsx)(`ul`,{"data-slot":`activity-peer-links`,className:`mt-1 ml-[19px] flex flex-col md:hidden`,children:a.map(t=>(0,H.jsx)(`li`,{children:(0,H.jsxs)(r,{to:Y(e,t.recipientRunId),className:`relative z-[1] inline-flex min-h-11 items-center text-[12px] text-message-peer-accent hover:underline focus-visible:outline-2 focus-visible:outline-ring`,children:[`→ `,g(i,t)]})},t.requestId))})}function ce({projectId:e,task:t,requests:n,index:i,ctx:o,motion:s=w}){let c=ne(t,o);return(0,H.jsxs)(`li`,{"data-activity-pill":t.runId,"data-rung":t.rung,className:a(`relative min-w-0 rounded-[10px] border bg-card-2 px-2.5 py-2`,c.action?`border-pending`:`border-border`,t.runId in s.entering&&`activity-card-enter`),children:[(0,H.jsx)(l,{task:t,motion:s,glow:c.action!==void 0}),(0,H.jsxs)(`div`,{className:`flex items-center gap-[7px]`,children:[(0,H.jsx)(u,{run:t,role:`root`}),(0,H.jsx)(`h3`,{className:`min-w-0 flex-1 truncate text-[12.5px] font-medium`,children:(0,H.jsx)(r,{to:Y(e,t.runId),className:`after:absolute after:inset-0 after:rounded-[10px] after:content-[''] focus-visible:outline-2 focus-visible:outline-ring`,children:t.title})}),(0,H.jsx)(ee,{rate:t.rate,className:`h-3 w-10`})]}),(0,H.jsxs)(`p`,{"data-slot":`activity-pill-line`,className:`mt-[3px] ml-[19px] truncate text-[11.5px] text-muted-foreground tabular-nums`,children:[(0,H.jsx)(h,{"data-slot":`activity-verb`,tone:c.tone,className:`font-semibold`,children:c.verb}),` · `,(0,H.jsx)(`span`,{"data-slot":`activity-main`,className:a(c.mono&&`font-mono text-[11px]`),children:c.main})]}),(0,H.jsx)(M,{texts:C(t.runId,n,i)}),(0,H.jsx)(oe,{task:t}),(0,H.jsx)(se,{projectId:e,task:t,requests:n,index:i})]})}var X=e=>`/p/${encodeURIComponent(e)}/activity`,le=e=>`/p/${encodeURIComponent(e)}/`,Z=`rounded-xl border border-border bg-card px-4 pt-3.5 pb-4`,ue=`ml-auto inline-flex items-center text-[12px] text-accent-text hover:underline focus-visible:outline-2 focus-visible:outline-ring max-md:min-h-11`;function Q({project:e,headingId:t,detail:n,to:i,label:a}){return(0,H.jsxs)(`header`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,H.jsx)(`h2`,{id:t,className:`min-w-0 truncate text-[14px] font-semibold`,children:e.name}),(0,H.jsx)(`span`,{"data-slot":`activity-panel-detail`,className:`text-[12px] text-muted-foreground`,children:n}),(0,H.jsx)(r,{to:i,className:ue,children:a})]})}function de({project:e,notice:t}){let n=I.useId();return(0,H.jsx)(`section`,{"aria-labelledby":n,"data-slot":`activity-panel`,"data-project":e.projectId,"data-notice":`true`,className:Z,children:(0,H.jsx)(Q,{project:e,headingId:n,detail:t,to:le(e.projectId),label:`Open project →`})})}function fe(e,t){return I.useMemo(()=>{let n=new Set(e.requests.map(e=>e.requestId)),r=Object.values(t.closing).filter(t=>t.projectId===e.projectId&&!n.has(t.request.requestId)).map(e=>e.request);return z({tasks:e.tasks,requests:[...e.requests,...r]})},[e,t.closing])}function pe({project:e,now:t,motion:n=w,paused:r=!1}){let i=I.useId(),o=I.useMemo(()=>f(e),[e]),s=fe(e,n),c={now:t,titleOf:e=>p(o,e)},l=`${e.tasks.map(e=>e.runId).join(`,`)}:${s.map(e=>e.requestId).join(`,`)}`;return(0,H.jsxs)(`section`,{"aria-labelledby":i,"data-slot":`activity-panel`,"data-project":e.projectId,className:Z,children:[(0,H.jsx)(Q,{project:e,headingId:i,detail:B(e),to:X(e.projectId),label:`Open project activity →`}),(0,H.jsxs)(`div`,{className:a(`relative mt-3`,s.length>0&&`md:mt-1 md:pt-10`),children:[(0,H.jsx)(`ul`,{"data-slot":`activity-pills`,"aria-label":`${e.name} tasks`,className:a(`grid grid-cols-[repeat(auto-fill,minmax(min(100%,220px),1fr))] items-start gap-3.5`,s.length>0&&`md:gap-y-11`),children:e.tasks.map(t=>(0,H.jsx)(ce,{projectId:e.projectId,task:t,requests:e.requests,index:o,ctx:c,motion:n},t.runId))}),s.length>0?(0,H.jsx)(J,{arcs:s,layoutKey:l,now:t,motion:n,paused:r}):null]})]})}function me(e){let t=m(e.project);return t===void 0?(0,H.jsx)(pe,{...e}):(0,H.jsx)(de,{project:e.project,notice:t})}function he({projects:e,belowPanels:t}){return e.length===0?null:(0,H.jsxs)(`p`,{"data-slot":`activity-idle`,className:`text-[12.5px] text-muted-foreground`,children:[V(e.length,t),` `,e.map((e,t)=>(0,H.jsxs)(I.Fragment,{children:[t>0?`, `:null,(0,H.jsx)(r,{to:X(e.projectId),"data-project":e.projectId,className:`text-foreground hover:underline focus-visible:outline-2 focus-visible:outline-ring max-md:inline-flex max-md:min-h-11 max-md:items-center`,children:e.name})]},e.projectId))]})}var ge={kind:`workspace`};function $(){let e=o().data?.projects,{order:t}=P();return I.useMemo(()=>e?F(e,t).map(e=>e.id):void 0,[e,t])}function _e(){let e=d(ge),t=o(),n=s(),r=$(),a=k(e.data?.generatedAt,e.dataUpdatedAt),c=t.data?.bootProject??n.data?.bootProject??null,l=e.data?.projects,u=I.useMemo(()=>R(L(l??[],r)),[l,r]),{motion:f,paused:p,reduced:m}=D(e.data,`workspace`);return(0,H.jsxs)(`div`,{"data-route":`activity-global`,"data-activity-paused":p?`true`:void 0,className:`flex min-h-full w-full flex-col gap-4 px-[18px] py-6 md:px-7`,children:[(0,H.jsx)(O,{name:`All projects`,now:e.data?a:void 0,stale:e.isError,children:(0,H.jsx)(S,{scope:`all`,projectId:c})}),l?(0,H.jsx)(ae,{summary:N(l),tasksTo:`/tasks`,bumps:f.bumps}):null,e.isPending?(0,H.jsx)(`p`,{"data-slot":`activity-loading`,role:`status`,className:`text-xs text-muted-foreground`,children:`Loading activity…`}):null,e.isError&&!l?(0,H.jsxs)(`div`,{role:`alert`,className:`flex items-center gap-3 text-[13px] text-muted-foreground`,children:[`Could not load activity: `,e.error.message,(0,H.jsx)(i,{size:`sm`,variant:`outline`,onClick:()=>void e.refetch(),className:`max-md:min-h-11`,children:`Retry`})]}):null,l&&u.panels.length===0&&u.idle.length===0?(0,H.jsx)(`p`,{"data-slot":`activity-empty`,className:`py-6 text-[13px] text-muted-foreground`,children:`No projects to show.`}):null,(0,H.jsx)(`div`,{"data-slot":`activity-panels`,className:`flex flex-col gap-3.5`,children:u.panels.map(e=>(0,H.jsx)(me,{project:e,now:a,motion:f,paused:p||m},e.projectId))}),(0,H.jsx)(he,{projects:u.idle,belowPanels:u.panels.length>0})]})}export{_e as GlobalActivityRoute};
@@ -0,0 +1 @@
1
+ import{t as e}from"./createLucideIcon-BHp8sXmF.js";var t=e(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),n=e(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),r=e(`hourglass`,[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M5 2h14`,key:`pdyrp9`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`,key:`1d314k`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`,key:`1vvvr6`}]]);export{n,t as r,r as t};