@hearsay-tools/squawk 0.19.0-dev.9092 → 0.19.0-dev.9102
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/{accounts-section-DrA0kndh.js → accounts-section-DL3fIJ3Y.js} +1 -1
- package/web/dist/assets/{activity-motion-C23PnhhH.js → activity-motion-nt1FXMrF.js} +1 -1
- package/web/dist/assets/{activity-route-CWGPbwtG.js → activity-route-xVy2K_Fi.js} +1 -1
- package/web/dist/assets/{agent-config-section-DWZQ2DSW.js → agent-config-section-nFavGeR2.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-Da4tKbp7.js → agent-defaults-section-CN0pC4xG.js} +1 -1
- package/web/dist/assets/{appearance-Bm4ePfiH.js → appearance-zGuTSgIy.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-DuRmMR6k.js → archive-on-merge-field-BaKNf-j4.js} +1 -1
- package/web/dist/assets/{ask-card-vM_Z-WAg.js → ask-card-huOW3GMV.js} +3 -3
- package/web/dist/assets/{automations-route-B8zD3wux.js → automations-route-GBaRU2IS.js} +2 -2
- package/web/dist/assets/{commit-list-lwVhwbS8.js → commit-list-x-75vYko.js} +1 -1
- package/web/dist/assets/{diff-CC5UqjNZ.js → diff-Bhh_CAtI.js} +2 -2
- package/web/dist/assets/{diff-controls-C8KWZ5S-.js → diff-controls-BOnMrLuP.js} +1 -1
- package/web/dist/assets/{diff-view-DiuQQoKq.js → diff-view-DiPeQi9D.js} +1 -1
- package/web/dist/assets/{discard-changes-dialog-CX7M4k9n.js → discard-changes-dialog-BMofaFwH.js} +1 -1
- package/web/dist/assets/{file-preview-C_0CRYAr.js → file-preview-ChwOU1Uc.js} +1 -1
- package/web/dist/assets/{git-toolbar-PM540i_A.js → git-toolbar-BdhjSQLm.js} +1 -1
- package/web/dist/assets/{github-CeBvZzjo.js → github-DqXXUCBy.js} +1 -1
- package/web/dist/assets/{global-activity-route-CiTt7W6o.js → global-activity-route-CZJRu2G1.js} +1 -1
- package/web/dist/assets/index-CbSPKU4g.js +21 -0
- package/web/dist/assets/{markdown-CqzDs1kO.js → markdown-DMFXz4xY.js} +1 -1
- package/web/dist/assets/{option-select-CDOKbUov.js → option-select-Cq_bhgu6.js} +1 -1
- package/web/dist/assets/{preferences-section-cdbIMfEU.js → preferences-section-CHhUi72X.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-BcU9ryyW.js → preview-pane-connected-DH9rjYI7.js} +2 -2
- package/web/dist/assets/{project-location-BpBbcl3v.js → project-location-CSXt_Yk6.js} +1 -1
- package/web/dist/assets/{projects-section-CX1WJq4d.js → projects-section-CSBdiEM-.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-DrQthAY7.js → prompt-templates-section-DaJbpROr.js} +2 -2
- package/web/dist/assets/{remote-settings-notice-_MtFnktv.js → remote-settings-notice-Chx8LxP6.js} +1 -1
- package/web/dist/assets/repo-git-D8Sn_897.js +1 -0
- package/web/dist/assets/{report-reader-iboN3k6l.js → report-reader-Ccymt9jp.js} +1 -1
- package/web/dist/assets/reports-GvAw7DYA.js +1 -0
- package/web/dist/assets/{resources-section-BmDbIpaO.js → resources-section-BWqoBxtC.js} +1 -1
- package/web/dist/assets/{review-notes-drafts-DXxIudVB.js → review-notes-drafts-BKzyNpXo.js} +1 -1
- package/web/dist/assets/{review-panel-BjWbFGev.js → review-panel-DxAlY6hQ.js} +1 -1
- package/web/dist/assets/{review-strip-QIghY88F.js → review-strip-QDKNuOm9.js} +1 -1
- package/web/dist/assets/run-header-BS7SXYup.js +2 -0
- package/web/dist/assets/{select-BxuV2GlN.js → select-DVQEFrtF.js} +1 -1
- package/web/dist/assets/{session-context-section-OLW5UTvx.js → session-context-section-YxCcDlRl.js} +2 -2
- package/web/dist/assets/{settings-agent-picker-Dasyc6Qo.js → settings-agent-picker-CDyluV99.js} +1 -1
- package/web/dist/assets/{settings-save-bar-Mrc6Vm7P.js → settings-save-bar-CMJaZn_P.js} +1 -1
- package/web/dist/assets/settings-shell-DHVB7FYt.js +1 -0
- package/web/dist/assets/{sidebar-section-CVNvjM29.js → sidebar-section-hphp-63V.js} +1 -1
- package/web/dist/assets/{skills-7MwCp2i_.js → skills-BlHcP8uc.js} +1 -1
- package/web/dist/assets/{task-changes-DSZjztX7.js → task-changes-DWMFWq5g.js} +1 -1
- package/web/dist/assets/{task-commits-P_ElCQ4M.js → task-commits-q5Cn_tdG.js} +1 -1
- package/web/dist/assets/{task-file-scope-B63NmSov.js → task-file-scope-BKjO7lKK.js} +1 -1
- package/web/dist/assets/{task-files-CSFB6sG7.js → task-files-DbRJAKAg.js} +1 -1
- package/web/dist/assets/{task-github-item-BJ1rGyc6.js → task-github-item-DV6uUcx2.js} +1 -1
- package/web/dist/assets/{task-thread-C0DbAGi_.js → task-thread-05LMMzIs.js} +1 -1
- package/web/dist/assets/{thread-state-B7pyjJYO.js → thread-state-uf_28v2G.js} +1 -1
- package/web/dist/assets/{use-finish-run-B1Gy5JPt.js → use-finish-run-BsTPLn1d.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-CMyKCFeb.js → use-hand-to-agent-state-DyjrAs-3.js} +1 -1
- package/web/dist/assets/use-path-bases-hbJkikc4.js +1 -0
- package/web/dist/assets/{workflows-seQiL2pi.js → workflows-B5xr64g0.js} +3 -3
- package/web/dist/assets/{workspace-tools-BDf7nsE5.js → workspace-tools-DGlrX2Uj.js} +1 -1
- package/web/dist/assets/{worktrees-section-x7r5wRhx.js → worktrees-section-D2bbdi3Y.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/assets/index-UFO7Bk2I.js +0 -21
- package/web/dist/assets/repo-git-5JS3oL12.js +0 -1
- package/web/dist/assets/reports-Cn3kWlK7.js +0 -1
- package/web/dist/assets/run-header-BWLcG57S.js +0 -2
- package/web/dist/assets/settings-shell-DWRk12-i.js +0 -1
- package/web/dist/assets/use-path-bases-wGc__G57.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{o as r,p as i,s as a}from"./dist-C_rn70hE.js";import{A as o,C as s,Kt as c,S as l,T as u,U as d,Ut as f,bt as p,nt as m,un as h,w as g}from"./queries-CchoEEzj.js";import{B as ee,Rn as _,T as v,f as y,n as b,ut as x,vi as S,w as C,z as te,zt as ne}from"./toaster-zMN8cNZQ.js";import{Z as w}from"./live-protocol-DMhTnCmf.js";import{g as T,h as E}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{c as D,f as O,i as re,t as k}from"./reference-chip-z7dZJVH-.js";import{D as ie,F as A,I as ae,M as oe,N as se,P as ce,Q as le,S as ue,X as de,Z as fe,c as pe,ct as me,d as he,j as ge,l as _e,n as ve,st as ye,w as be,y as xe}from"./design-icons-QbNMZniQ.js";import{t as Se}from"./createLucideIcon-BHp8sXmF.js";import{n as Ce,t as we}from"./circle-x-7nTlobAF.js";import{_ as Te}from"./nav-row-styles-CgP5uNp4.js";import{i as Ee,r as De,t as Oe}from"./git-toolbar-PM540i_A.js";import{t as j}from"./info-DA1x_4bz.js";import{t as ke}from"./loader-circle-CPBhhDbB.js";import{a as Ae,i as je,n as Me,r as Ne}from"./diff-controls-C8KWZ5S-.js";import{t as M}from"./button-B22ANdCY.js";import{i as N,l as Pe,p as Fe,r as Ie,t as Le}from"./dropdown-menu-DjtKUK8F.js";import{a as Re,i as ze,n as Be,o as Ve,r as He,s as Ue,t as We}from"./dialog-rpNyAWGb.js";import{t as P}from"./project-router-j0uBi7Ep.js";import{t as Ge}from"./status-dot-Drd4-nfa.js";import{c as Ke,d as qe,f as Je,m as F,n as Ye,s as Xe,t as Ze}from"./page-shell-BgabWJ3w.js";import{a as Qe,o as $e}from"./format-BU7D3IfE.js";import{t as et}from"./control-locations-kCPVEtOM.js";import{t as I}from"./centered-state-BgSV4e79.js";import{$t as tt,Bn as nt,Bt as rt,Cr as L,Gt as it,Hn as at,Ht as ot,In as st,Jt as ct,Kt as lt,M as ut,N as R,Qt as dt,Ut as ft,Vn as pt,Vt as mt,Wt as ht,Xt as gt,Yt as z,Zt as _t,an as B,cn as V,en as vt,in as H,mr as yt,nn as U,on as W,qt as G,rn as K,sn as q,sr as bt,tn as J,xr as xt}from"./index-UFO7Bk2I.js";import{t as St}from"./markdown-BBDDg-4t.js";import{t as Ct}from"./diff-CC5UqjNZ.js";import{t as wt}from"./change-counts-wqSYI3W8.js";import{t as Tt}from"./code-workbench-CUkiQ1pF.js";import{t as Et}from"./file-text-nGpo7MVd.js";import{i as Dt,n as Ot,r as kt}from"./commit-list-lwVhwbS8.js";var Y=e(t(),1);function At(e,t){let n=S(t),r=n.getQueryCache();return Y.useSyncExternalStore(Y.useCallback(e=>r.subscribe(w.batchCalls(e)),[r]),()=>n.isFetching(e),()=>n.isFetching(e))}var jt=Se(`arrow-down-to-line`,[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]),Mt=Se(`git-pull-request-create`,[[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 9v12`,key:`1sc30k`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v3`,key:`1jb6z3`}],[`path`,{d:`M18 15v6`,key:`9wciyi`}],[`path`,{d:`M21 18h-6`,key:`139f0c`}]]),X=n();function Nt(){let e=i(),t=l(),n=S(),a=At({queryKey:f.repo})>0,o=t.data?.info?t.data:null,s=rt(e,o,`screen`);return(0,X.jsx)(qe,{route:`repo-git`,density:o?.info?`full`:`empty`,headerSpacing:`compact`,header:{title:`Git`,secondaryActions:(0,X.jsx)(Ke,{type:`button`,variant:`ghost`,"data-slot":`git-screen-refresh`,"aria-label":`Refresh the repository`,title:`Refresh the repository`,disabled:a,onClick:()=>{n.invalidateQueries({queryKey:f.repo}),n.invalidateQueries({queryKey:f.worktrees})},children:(0,X.jsx)(fe,{size:17,"aria-hidden":`true`,className:r(`size-[17px]`,a&&`motion-safe:animate-spin`)})})},children:(0,X.jsxs)(`div`,{"data-slot":`git-screen`,children:[o?.info?(0,X.jsx)(`div`,{className:`mb-[16px]`,children:(0,X.jsx)(ft,{scope:e,repo:o,info:o.info,variant:`screen`},e)}):t.isPending?(0,X.jsx)(`p`,{"data-slot":`git-screen-loading`,role:`status`,className:`mb-[16px] px-[10px] text-[13px] text-soft-foreground`,children:`Loading the checkout…`}):t.isError?(0,X.jsxs)(`p`,{"data-slot":`git-screen-error`,role:`alert`,className:`mb-[16px] px-[10px] text-[13px] text-danger`,children:[`Could not load the repository: `,t.error.message]}):(0,X.jsx)(`p`,{"data-slot":`git-screen-not-git`,className:`mb-[16px] px-[10px] text-[13px] text-soft-foreground`,children:`Not a git repository.`}),t.isPending?null:(0,X.jsx)(mt,{branch:o?.info?.branch??null,counts:s,variant:`screen`})]})})}function Pt(e){if(e===``)return null;if(e===`@`)return`A branch cannot be named “@”.`;if(e.startsWith(`-`))return`A branch name cannot start with “-”.`;if(/\s/.test(e))return`A branch name cannot contain spaces.`;if(/[\u0000-\u001f\u007f]/.test(e))return`A branch name cannot contain control characters.`;let t=/[~^:?*[\\]/.exec(e);if(t)return`A branch name cannot contain “${t[0]}”.`;if(e.includes(`..`))return`A branch name cannot contain “..”.`;if(e.includes(`@{`))return`A branch name cannot contain “@{”.`;if(e.startsWith(`/`)||e.endsWith(`/`))return`A branch name cannot start or end with “/”.`;if(e.includes(`//`))return`A branch name cannot contain “//”.`;if(e.endsWith(`.`))return`A branch name cannot end with “.”.`;for(let t of e.split(`/`)){if(t.startsWith(`.`))return`A part of a branch name cannot start with “.”.`;if(t.endsWith(`.lock`))return`A part of a branch name cannot end with “.lock”.`}return null}function Ft({from:e}){let[t,n]=(0,Y.useState)(!1),r=(0,Y.useRef)(null);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(Ke,{ref:r,variant:`primary`,"data-action":`new-branch`,disabled:G(i())&&!t,onClick:()=>n(!0),children:[(0,X.jsx)(de,{size:16,"aria-hidden":`true`}),`New branch`]}),t?(0,X.jsx)(It,{from:e,returnFocus:r,onClose:()=>n(!1)}):null]})}function It({from:e,returnFocus:t,onClose:n}){let r=lt(i()),a=G(i()),[o,s]=(0,Y.useState)(``),[c,l]=(0,Y.useState)(null),u=o.trim(),d=Pt(u),f=d??c;return(0,X.jsx)(We,{open:!0,onOpenChange:e=>{!e&&!r.isPending&&n()},children:(0,X.jsx)(He,{"data-slot":`new-branch-dialog`,className:`sm:max-w-md`,onCloseAutoFocus:e=>{e.preventDefault(),t.current?.focus()},children:(0,X.jsxs)(`form`,{className:`grid min-w-0 gap-4`,onSubmit:e=>{e.preventDefault(),!(!u||d||a)&&(l(null),r.mutate(u,{onSuccess:n,onError:e=>l(e.message)}))},children:[(0,X.jsxs)(Ve,{children:[(0,X.jsx)(Ue,{children:`New branch`}),(0,X.jsxs)(ze,{"data-slot":`new-branch-base`,children:[`Create from `,(0,X.jsx)(`span`,{className:`font-mono text-foreground`,children:e}),` and switch to it. Switching changes your working tree.`]})]}),(0,X.jsxs)(Be,{className:`flex flex-col gap-2`,children:[(0,X.jsx)(`label`,{htmlFor:`new-branch-name`,className:`text-sm font-medium`,children:`Branch name`}),(0,X.jsx)(bt,{id:`new-branch-name`,autoComplete:`off`,spellCheck:!1,placeholder:`new-branch-name`,className:`h-11 bg-background font-mono md:text-base placeholder:text-soft-foreground`,value:o,"aria-invalid":f?!0:void 0,"aria-describedby":f?`new-branch-name-hint`:void 0,onChange:e=>{s(e.target.value),l(null)}}),f?(0,X.jsx)(`p`,{id:`new-branch-name-hint`,"data-slot":d?`branch-name-hint`:`branch-create-refusal`,role:`alert`,className:`text-xs text-danger`,children:f}):null]}),(0,X.jsxs)(Re,{children:[(0,X.jsx)(M,{type:`button`,variant:`outline`,disabled:r.isPending,onClick:n,children:`Cancel`}),(0,X.jsx)(M,{type:`submit`,variant:`primary`,"data-action":`create-branch`,disabled:!u||d!==null||a,children:r.isPending?`Creating…`:`Create`})]})]})})})}function Lt({entry:e}){return e.keptReason?(0,X.jsx)(`span`,{"data-slot":`branch-kept-reason`,className:`min-w-0 text-xs text-muted-foreground`,children:e.keptReason}):null}function Rt({repo:e,info:t}){let n=s(),a=new Map((n.data?.branches??[]).map(e=>[e.name,e])),o=n.data?.base??e.baseBranch??t.branch,c=lt(i(),e=>b(e.message,{tone:`danger`})),l=G(i()),[u,d]=(0,Y.useState)(``),f=u.trim().toLowerCase(),p=Gt(e,n.data?.branches),m=f?p.filter(e=>e.toLowerCase().includes(f)):p;return(0,X.jsx)(`section`,{"data-slot":`repo-branches`,className:`min-w-0`,children:(0,X.jsxs)(`div`,{className:`min-w-0 rounded-xl border border-border bg-card p-5`,children:[(0,X.jsx)(`h2`,{className:`sr-only`,children:`Branches`}),(0,X.jsxs)(`label`,{className:`relative block`,children:[(0,X.jsx)(le,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute left-3 top-3 size-4 text-muted-foreground`}),(0,X.jsx)(bt,{"aria-label":`Filter branches`,placeholder:`Filter branches…`,value:u,onChange:e=>d(e.target.value),className:`h-10 rounded-lg border-border bg-card pl-10`})]}),(0,X.jsxs)(`ul`,{"data-slot":`repo-branch-list`,className:`mt-3.5 flex min-w-0 flex-col divide-y divide-border border-t border-border md:max-h-[40rem] md:overflow-y-auto md:overscroll-contain`,children:[m.map(e=>{let n=e===t.branch,i=a.get(e);return(0,X.jsxs)(`li`,{"data-slot":`branch-row`,"data-branch":e,"data-branch-class":i?.class,className:`flex min-h-[60px] flex-col items-start justify-center gap-1.5 py-2 md:flex-row md:items-center md:justify-start md:gap-2.5`,children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 max-w-full items-center gap-[8px]`,children:[i?.runId?(0,X.jsx)(P,{to:`/tasks/${i.runId}`,"data-slot":`branch-task-link`,title:i.title?`Open the task ${i.title}`:`Open the task`,className:`min-w-0 truncate rounded-[2px] font-mono text-[12px] underline-offset-2 hover:underline focus-visible:outline-2 focus-visible:outline-ring`,children:e}):(0,X.jsx)(`span`,{className:r(`min-w-0 truncate font-mono text-[12px]`,n&&`font-medium`),children:e}),i&&!(n&&i.class===`active`)?(0,X.jsx)(Wt,{entry:i}):null]}),i?(0,X.jsx)(zt,{entry:i,base:o}):null,i?(0,X.jsx)(Lt,{entry:i}):null,e.startsWith(`cez/`)&&!n?null:n?(0,X.jsx)(`span`,{"data-slot":`branch-current`,className:`flex h-8 shrink-0 items-center rounded-md bg-accent-strong/10 px-2.5 text-[12px] font-medium text-accent-text md:ml-auto`,children:`Current`}):(0,X.jsxs)(M,{variant:`outline`,size:`sm`,"data-action":`switch-branch`,className:`md:ml-auto`,disabled:l,onClick:()=>c.mutate(e),children:[(0,X.jsx)(ge,{size:16,"aria-hidden":`true`}),`Switch`]})]},e)}),m.length===0?(0,X.jsxs)(`li`,{"data-slot":`branch-empty`,className:`py-3 text-xs text-muted-foreground`,children:[`No branches match “`,u.trim(),`”.`]}):null]})]})})}function zt({entry:e,base:t}){let n=e.pr?.state===`open`||e.pr?.state===`draft`;return(0,X.jsxs)(`span`,{"data-slot":`branch-facts`,className:`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground`,children:[(0,X.jsxs)(`span`,{"data-slot":`branch-counts`,title:`${Z(e.ahead)} ahead of ${t}, ${Z(e.behind)} behind`,className:`shrink-0 font-mono tabular-nums`,children:[(0,X.jsxs)(`span`,{"aria-hidden":`true`,children:[`↑`,e.ahead,` ↓`,e.behind]}),(0,X.jsxs)(`span`,{className:`sr-only`,children:[Z(e.ahead),` ahead of `,t,`, `,Z(e.behind),` behind`]})]}),e.pr?(0,X.jsx)(Vt,{pr:e.pr}):null,n&&e.pr?.checks?(0,X.jsx)(Ht,{checks:e.pr.checks}):null]})}var Z=e=>`${e} commit${e===1?``:`s`}`,Bt={open:{icon:ae,className:`border-success/40 text-semantic-green`},draft:{icon:A,className:`border-border text-muted-foreground`},merged:{icon:se,className:`border-merged-strong/35 text-merged-text`},closed:{icon:ce,className:`border-danger/40 text-semantic-red`}};function Vt({pr:e}){let{icon:t,className:n}=Bt[e.state],i=(0,X.jsxs)(`span`,{className:r(`inline-flex h-6 items-center gap-1 rounded-[4px] border px-1.5 text-xs font-medium group-hover:bg-muted`,n),children:[(0,X.jsx)(t,{size:12,"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,X.jsxs)(`span`,{className:`font-mono`,children:[`#`,e.number]}),(0,X.jsx)(`span`,{children:e.state})]}),o=`inline-flex shrink-0 items-center rounded-[4px] max-md:min-h-11 no-hover:min-h-11`;return a(e.url)?(0,X.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`branch-pr`,"data-pr-state":e.state,title:`Open pull request #${e.number}`,className:r(o,`group focus-visible:outline-2 focus-visible:outline-ring`),children:i}):(0,X.jsx)(`span`,{"data-slot":`branch-pr`,"data-pr-state":e.state,className:o,children:i})}function Ht({checks:e}){let t=e===`passing`?Ce:e===`failing`?we:xt;return(0,X.jsxs)(`span`,{"data-slot":`pr-checks`,"data-checks":e,className:r(`inline-flex shrink-0 items-center gap-1 text-[12px] font-medium`,e===`passing`&&`text-success`,e===`failing`&&`text-danger`,e===`pending`&&`text-muted-foreground`),children:[(0,X.jsx)(t,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),e]})}var Ut={active:`in use`,"not-landed":`not landed`,orphan:`not landed`,merged:`merged`,empty:`empty`,other:`yours`};function Wt({entry:e}){return(0,X.jsx)(`span`,{"data-slot":`branch-class`,className:r(`shrink-0 rounded-[4px] border px-1.5 py-px text-xs leading-4 font-medium`,e.class===`active`?`border-status-running/40 text-status-running`:e.class===`not-landed`||e.class===`orphan`?`border-inbox-count-foreground/40 text-inbox-count-foreground`:`border-border text-soft-foreground`),children:Ut[e.class]})}function Gt(e,t){let n=new Set(e.branches);for(let e of t??[])n.add(e.name);return[...n].sort((e,t)=>e.localeCompare(t))}function Kt(){let e=g(),t=F(),[n,r]=(0,Y.useState)(`unified`),[i,a]=(0,Y.useState)(!0),[o,s]=(0,Y.useState)(!1),[c,l]=(0,Y.useState)(null),u=(0,Y.useRef)(null),d=e.isError&&e.error instanceof _&&e.error.status===409,f=e.data?.files??[],p=(0,Y.useMemo)(()=>De(f),[f]),m=(0,Y.useMemo)(()=>f.some(St),[f]),h=t?n:`unified`;return(0,X.jsx)(`section`,{"data-slot":`repo-changes`,className:`flex min-h-0 flex-1 flex-col`,children:e.isPending?(0,X.jsx)(`p`,{"data-slot":`changes-loading`,className:`py-6 text-center text-xs text-muted-foreground`,children:`Loading changes…`}):e.isError?(0,X.jsx)(I,{icon:d?(0,X.jsx)(be,{size:16}):(0,X.jsx)(me,{size:16}),tone:d?`neutral`:`danger`,heading:`h2`,title:d?`No changes to show`:`Could not load the changes`,subtitle:e.error.message}):f.length===0?(0,X.jsx)(I,{icon:(0,X.jsx)(be,{size:16}),tone:`neutral`,heading:`h2`,title:`Working tree clean`,subtitle:`No uncommitted changes in the main working tree. Edits show up here as they happen.`}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{"data-slot":`repo-changes-toolbar`,className:`flex flex-wrap items-center gap-x-3 gap-y-2 pb-4 [&_button:not([data-button-size])]:min-h-11`,children:[e.data?(0,X.jsx)(Oe,{stat:e.data.stat}):null,(0,X.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[m&&o?(0,X.jsx)(je,{}):null,m?(0,X.jsx)(`span`,{className:`max-md:hidden`,children:(0,X.jsx)(Ae,{preview:o,onPreviewChange:s})}):null,(0,X.jsx)(Ne,{mode:n,wrap:i,onModeChange:r,onWrapChange:a,disabled:m&&o}),(0,X.jsx)(Me,{wrap:i,onWrapChange:a,preview:o,onPreviewChange:m?s:void 0,disabled:m&&o})]})]}),(0,X.jsx)(Tt,{className:`gap-5 [--diff-sticky-top:0px] md:gap-0`,treeSlot:`changes-tree-pane`,treeClassName:`overflow-y-auto overscroll-contain rounded-xl border border-border bg-card p-3.5 md:sticky md:top-4 md:max-h-[calc(100dvh_-_64px_-_2rem)]`,tree:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`h2`,{"data-slot":`changes-tree-heading`,className:`mb-3 border-b border-border pb-3 text-xs font-semibold`,children:`Changed files`}),(0,X.jsx)(Ee,{root:p,selected:c,onSelect:e=>{l(e),u.current?.scrollToPath(e)}})]}),children:(0,X.jsx)(Ct,{files:f,viewRef:u,mode:h,wrap:i,preview:o,loadFileText:e=>Et(()=>v(e)),totals:!1,className:`min-w-0 flex-1`})})]})})}function qt({repo:e,info:t}){let{sha:n}=E(),r=F(),i=e.log,a=(0,Y.useMemo)(()=>vt(i),[i]);if(n&&(!r||i.length===0))return(0,X.jsx)(Qt,{sha:n});let o=gt(e,t),s=o&&o.behind>0?(0,X.jsx)(Xt,{info:t,tracking:o}):null;if(i.length===0)return(0,X.jsxs)(X.Fragment,{children:[s?(0,X.jsx)(`div`,{children:s}):null,(0,X.jsx)(I,{icon:(0,X.jsx)(oe,{size:16}),tone:`neutral`,heading:`h2`,title:`No commits yet`,subtitle:`The log is empty — this repository has no commits to show.`})]});let c=(0,X.jsxs)(`div`,{"data-slot":`repo-commits`,className:`flex flex-col gap-4`,children:[s,a.map(e=>(0,X.jsxs)(`section`,{"data-slot":`repo-commit-day`,"aria-label":e.label,className:`flex flex-col gap-1.5`,children:[(0,X.jsx)(`h2`,{className:`text-xs font-medium text-muted-foreground`,children:e.label}),(0,X.jsx)(`ul`,{className:`flex flex-col divide-y divide-border rounded-xl border border-border bg-card`,children:e.commits.map(e=>(0,X.jsx)(Jt,{commit:e,selected:r&&e.hash===(n??i[0]?.hash),stacked:r},e.hash))})]},e.label))]});return r?(0,X.jsx)(Tt,{className:`flex-none`,treeSlot:`repo-commits-pane`,tree:c,children:(0,X.jsx)(Zt,{sha:n??i[0]?.hash})}):c}function Jt({commit:e,selected:t,stacked:n}){return(0,X.jsxs)(`li`,{"data-selected":t?`true`:void 0,className:r(`flex min-h-[52px] gap-3.5 first:rounded-t-xl last:rounded-b-xl hover:bg-sidebar-row-hover`,n?`flex-col items-stretch gap-0`:`items-center`,t&&`bg-muted/70`),children:[(0,X.jsxs)(P,{to:`/git/commits/${e.hash}`,"data-slot":`commit-row`,"data-sha":e.hash,"aria-current":t?`true`:void 0,className:`flex min-h-[52px] min-w-0 flex-1 flex-col justify-center gap-0.5 px-4 py-2 focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,X.jsx)(`span`,{"data-slot":`commit-row-subject`,className:`truncate text-[13px] font-medium text-foreground`,children:e.subject}),(0,X.jsxs)(`span`,{"data-slot":`commit-row-meta`,className:`flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,X.jsx)(Ot,{sha:e.hash}),(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0`,children:`·`}),(0,X.jsxs)(`span`,{className:`truncate`,children:[e.author,` · `,(0,X.jsx)(`span`,{title:tt(e.when,e.at),children:dt(e.when,e.at)})]})]})]}),(0,X.jsx)(Yt,{source:e.source,stacked:n})]})}function Yt({source:e,stacked:t}){let n=r(`hidden shrink-0 items-center gap-[5px] text-xs text-muted-foreground md:flex`,t?`-mt-1.5 max-w-full self-start px-4 pb-2.5`:`max-w-[45%] pr-4`);return e?(0,X.jsxs)(P,{to:`/tasks/${e.runId}`,"data-slot":`commit-source`,"data-source":`task`,"aria-label":`From the task ${e.title}${e.prNumber===null?``:`, pull request #${e.prNumber}`}`,className:r(n,`rounded-[4px] hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring`),children:[e.prNumber===null?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(se,{"aria-hidden":`true`,className:`size-[11px] shrink-0 text-merged-text`}),(0,X.jsxs)(`span`,{className:`shrink-0 text-muted-foreground`,children:[`PR #`,e.prNumber]})]}),(0,X.jsx)(pe,{"aria-hidden":`true`,className:`size-[12px] shrink-0`}),(0,X.jsx)(`span`,{className:`min-w-0 truncate`,children:e.title})]}):(0,X.jsx)(`span`,{"data-slot":`commit-source`,"data-source":`unknown`,className:n,children:`no task found`})}function Xt({info:e,tracking:t}){let n=it(i(),e),r=(0,Y.useRef)(null);return(0,X.jsxs)(`div`,{"data-slot":`git-incoming`,className:`flex min-h-[44px] items-center gap-2.5 rounded-xl border border-border bg-card px-4 py-2`,children:[(0,X.jsx)(jt,{"aria-hidden":`true`,className:`size-[14px] shrink-0 text-inbox-count-foreground`}),(0,X.jsxs)(`span`,{className:`min-w-0 flex-1 text-[12.5px] text-muted-foreground`,children:[t.behind,` commit`,t.behind===1?``:`s`,` on `,t.ref,` `,t.behind===1?`is`:`are`,` not in your checkout yet`]}),(0,X.jsxs)(`button`,{ref:r,type:`button`,"data-action":`repo-pull-incoming`,disabled:!n.hasRemote||n.pulling,onClick:()=>void n.pull(),className:`inline-flex h-[28px] shrink-0 items-center gap-[4px] rounded-[6px] bg-muted px-[10px] text-[12px] font-medium text-foreground hover:brightness-110 focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-50 max-md:h-11 [&>svg]:size-[12px]`,children:[n.pulling?(0,X.jsx)(ke,{"aria-hidden":`true`,className:`motion-safe:animate-spin`}):(0,X.jsx)(ve,{"aria-hidden":`true`}),`Pull`]}),(0,X.jsx)(ht,{checkout:n,returnFocus:r})]})}function Zt({sha:e}){return(0,X.jsx)(Dt,{commit:u(e),sha:e,slot:`repo-commit-preview`,loadFileText:t=>Et(()=>C(e,t))})}function Qt({sha:e}){return(0,X.jsx)(kt,{commit:u(e),sha:e,backTo:ct,backLabel:`All recent commits`,slot:`repo-commit`,loadFileText:t=>Et(()=>C(e,t))})}var $t=`Squash-merged branches may show as not landed without GitHub`;function en(e){let t=[],n=[],r=[];for(let i of e)if(i.class===`orphan`)r.push(i);else if(i.class!==`not-landed`)continue;else i.pr&&(i.pr.state===`open`||i.pr.state===`draft`)?n.push(i):t.push(i);return[{key:`no-pr`,title:`No pull request`,note:`nobody sees this work until you act`,rows:t},{key:`pr-open`,title:`Pull request open`,rows:n},{key:`deleted`,title:`Task deleted`,note:`this branch is the only copy of the work`,rows:r}].filter(e=>e.rows.length>0)}function tn(e){return e.filter(e=>e.class===`active`&&e.runId!==null&&e.ahead>0&&(e.runStatus===`done`||e.runStatus===`failed`||e.runStatus===`cancelled`)).length}function nn(){let e=s(),t=m(),n=i(),r=p(),[a,o]=(0,Y.useState)(null);if(e.isPending)return(0,X.jsx)(`p`,{"data-slot":`not-landed-loading`,role:`status`,className:`py-5 text-[13px] text-muted-foreground`,children:`Loading branches…`});if(e.isError)return(0,X.jsx)(I,{icon:(0,X.jsx)(me,{size:16}),tone:`danger`,heading:`h2`,title:`Could not classify the branches`,subtitle:e.error.message});let c=en(e.data.branches),l=c.reduce((e,t)=>e+t.rows.length,0),u=tn(e.data.branches),d=u>0?(0,X.jsxs)(`p`,{"data-slot":`not-landed-retained`,className:`flex items-start gap-2 text-xs leading-relaxed text-muted-foreground`,children:[(0,X.jsx)(j,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0`}),(0,X.jsxs)(`span`,{children:[u,` finished task`,u===1?` still has its`:`s still have their`,` worktree and commits not on the base, so `,u===1?`it is`:`they are`,` not listed here.`,` `,`They show here once the worktree is reclaimed in `,(0,X.jsx)(P,{to:z.cleanup,className:`underline underline-offset-2 hover:text-foreground`,children:`Cleanup`}),`.`]})]}):null,f=new Map((t.data??[]).map(e=>[e.id,e.finishedAt]));return(0,X.jsxs)(re,{projectId:n,repoBase:r,requests:c.flatMap(e=>e.rows).flatMap(e=>e.pr?[{projectId:n,kind:`PR`,number:e.pr.number}]:[]),children:[(0,X.jsxs)(`div`,{"data-slot":`repo-not-landed`,className:`flex flex-col gap-4 pb-[calc(90px+env(safe-area-inset-bottom))] md:pb-0`,children:[e.data.prStateKnown?null:(0,X.jsx)(rn,{}),d,c.length===0?(0,X.jsx)(Ze,{icon:(0,X.jsx)(yt,{size:16}),title:u>0?`Nothing else waiting to land`:`Everything landed`,description:u>0?`Every other finished task's commits are on the base branch, or it made none.`:`Every finished task's commits are on the base branch, or it made none.`,actions:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(M,{variant:`outline`,size:`sm`,asChild:!0,children:(0,X.jsx)(P,{to:z.cleanup,children:`Check cleanup`})}),(0,X.jsx)(M,{variant:`outline`,size:`sm`,asChild:!0,children:(0,X.jsx)(P,{to:`/`,children:`View tasks`})})]})}):(0,X.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,X.jsx)(`div`,{className:`flex flex-col gap-5`,children:c.map(e=>(0,X.jsxs)(`section`,{"data-slot":`not-landed-group`,"data-group":e.key,"aria-label":e.title,className:`flex flex-col gap-1.5`,children:[(0,X.jsxs)(`h2`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-1.5 text-xs text-muted-foreground`,children:[(0,X.jsx)(`span`,{className:`font-semibold text-foreground`,children:e.title}),(0,X.jsx)(`span`,{className:`tabular-nums`,children:e.rows.length}),e.note?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Q,{}),(0,X.jsx)(`span`,{children:e.note})]}):null]}),(0,X.jsx)(`ul`,{className:`flex flex-col divide-y divide-border rounded-xl border border-border bg-card`,children:e.rows.map(e=>(0,X.jsx)(an,{entry:e,finishedAt:e.runId?f.get(e.runId):void 0,onDelete:()=>o(e)},e.name))})]},e.key))}),(0,X.jsxs)(`p`,{"data-slot":`not-landed-note`,className:`flex items-start gap-1.5 px-1 text-xs leading-snug text-muted-foreground`,children:[(0,X.jsx)(j,{"aria-hidden":`true`,className:`mt-px size-3 shrink-0`}),`Delete a branch from its row's … menu. It confirms and names the commits it drops; nothing here is bulk-deleted.`]}),l<=3?(0,X.jsx)(Ye,{summary:`${l} ${l===1?`branch`:`branches`} waiting to land. Open a draft PR or inspect worktrees in Cleanup.`,actions:(0,X.jsx)(M,{variant:`outline`,size:`sm`,asChild:!0,children:(0,X.jsx)(P,{to:z.cleanup,children:`Open cleanup`})})}):null]})]}),(0,X.jsx)(un,{entry:a,onClose:()=>o(null)})]})}function rn({className:e}){return(0,X.jsxs)(`p`,{"data-slot":`git-no-forge`,className:r(`flex items-start gap-2 text-xs leading-relaxed text-muted-foreground`,e),children:[(0,X.jsx)(j,{"aria-hidden":`true`,className:`mt-0.5 size-3.5 shrink-0`}),$t,`.`]})}function an({entry:e,finishedAt:t,onDelete:n}){return(0,X.jsxs)(`li`,{"data-slot":`not-landed-row`,"data-branch":e.name,"data-branch-class":e.class,className:`flex min-h-[60px] items-center gap-3 px-4 py-3 first:rounded-t-xl last:rounded-b-xl hover:bg-sidebar-row-hover`,children:[(0,X.jsx)(cn,{entry:e,finishedAt:t}),(0,X.jsx)(on,{entry:e}),(0,X.jsx)(sn,{entry:e,onDelete:n})]})}function on({entry:e}){return(0,X.jsx)(X.Fragment,{children:e.pr?(0,X.jsxs)(`span`,{"data-slot":`not-landed-pr`,className:`hidden shrink-0 items-center gap-1.5 text-xs text-muted-foreground md:flex`,children:[(0,X.jsx)(k,{plain:!0,reference:{kind:`PR`,number:e.pr.number,url:e.pr.url},taskTitle:e.title??e.name,status:e.pr.state===`draft`?`draft`:e.pr.state===`closed`?`closed`:void 0}),(0,X.jsx)(ln,{entry:e})]}):null})}function sn({entry:e,onDelete:t}){let n=S(),i=e.class===`orphan`,a=e.pr&&(e.pr.state===`open`||e.pr.state===`draft`)?e.pr:null,o=!i&&e.runId!==null&&!a,s=h({mutationFn:()=>x(e.runId),onSuccess:e=>{b(`Draft PR created — ${e.url}`),n.invalidateQueries({queryKey:f.repoBranches}),n.invalidateQueries({queryKey:f.runs.all})},onError:e=>b(e instanceof _&&e.manual?`${e.message} — ${e.manual}`:e.message,{tone:`danger`})}),[c,l]=(0,Y.useState)(!1),u=(0,Y.useRef)(null);(0,Y.useEffect)(()=>()=>{u.current!==null&&clearTimeout(u.current)},[]);let d=()=>void navigator.clipboard.writeText(e.name).then(()=>{b(`Copied ${e.name}`),u.current!==null&&clearTimeout(u.current),l(!0),u.current=setTimeout(()=>l(!1),2e3)},()=>b(`Could not copy the branch name`,{tone:`danger`})),p=`inline-flex h-8 shrink-0 items-center gap-1.5 rounded-sm px-2.5 text-[12.5px] font-medium text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-50 [&>svg]:size-[12px]`;return(0,X.jsxs)(X.Fragment,{children:[e.runId?(0,X.jsx)(P,{to:`/tasks/${e.runId}`,"data-action":`not-landed-open`,className:r(p,`hidden border border-border bg-card hover:bg-muted md:inline-flex`),children:`Open task`}):null,o?(0,X.jsxs)(`button`,{type:`button`,"data-action":`not-landed-create-pr`,disabled:s.isPending,onClick:()=>s.mutate(),className:r(p,`hidden border border-border bg-card hover:bg-muted md:inline-flex`),children:[(0,X.jsx)(Mt,{"aria-hidden":`true`}),s.isPending?`Creating…`:`Draft PR`]}):null,i?(0,X.jsxs)(`button`,{type:`button`,"data-action":`not-landed-copy`,"data-copied":c||void 0,"aria-live":`polite`,onClick:d,className:r(p,`hidden border border-border bg-card hover:bg-muted md:inline-flex`),children:[c?(0,X.jsx)(_e,{"aria-hidden":`true`}):(0,X.jsx)(xe,{"aria-hidden":`true`}),c?`Copied`:`Copy branch`]}):null,(0,X.jsxs)(Le,{children:[(0,X.jsx)(Fe,{"data-action":`not-landed-more`,"aria-label":`More actions for ${e.name}`,className:`flex size-8 shrink-0 items-center justify-center rounded-sm text-soft-foreground outline-none hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring max-md:size-11`,children:(0,X.jsx)(ue,{"aria-hidden":`true`,className:`size-[14px]`})}),(0,X.jsxs)(Ie,{align:`end`,className:`w-52`,children:[e.runId?(0,X.jsx)(N,{asChild:!0,className:`md:hidden`,children:(0,X.jsx)(P,{to:`/tasks/${e.runId}`,children:`Open task`})}):null,o?(0,X.jsx)(N,{className:`md:hidden`,disabled:s.isPending,onSelect:()=>s.mutate(),children:`Draft PR`}):null,(0,X.jsx)(N,{className:r(!i&&`md:hidden`),onSelect:d,children:`Copy branch`}),(0,X.jsx)(Pe,{className:`md:hidden`}),(0,X.jsx)(N,{"data-action":`not-landed-delete`,variant:`destructive`,onSelect:t,children:`Delete branch…`})]})]})]})}function cn({entry:e,finishedAt:t}){let n=e.class===`orphan`,r=n?`No task · last commit “${e.lastCommit.subject}”`:e.title??e.name,i=t??e.lastCommit.at,a=Qe(i),o=e.runStatus?st(e.runStatus):void 0,s=n||!o?a:`${o.label}${a?` ${a}`:``}`,c=Number.isFinite(Date.parse(i))?new Date(i).toLocaleString():void 0;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{className:`flex size-[12px] shrink-0 items-center justify-center`,children:n?(0,X.jsx)(Te,{"aria-label":`Task deleted`,className:`size-[12px] text-muted-foreground`}):(0,X.jsx)(Ge,{tone:o?.tone??`neutral`,shape:o?.shape??`filled`,"aria-label":o?.label})}),(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[e.runId?(0,X.jsx)(P,{to:`/tasks/${e.runId}`,"data-slot":`not-landed-title`,className:`min-w-0 truncate rounded-[2px] text-[13px] font-medium text-foreground hover:underline underline-offset-2 focus-visible:outline-2 focus-visible:outline-ring`,children:r}):(0,X.jsx)(`span`,{"data-slot":`not-landed-title`,className:`min-w-0 truncate text-[13px] font-medium text-foreground`,title:r,children:r}),(0,X.jsxs)(`span`,{"data-slot":`not-landed-meta`,className:`flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,X.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),(0,X.jsx)(Q,{}),(0,X.jsxs)(`span`,{className:`shrink-0`,children:[e.ahead,` commit`,e.ahead===1?``:`s`]}),e.diffStat?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Q,{}),(0,X.jsx)(wt,{adds:e.diffStat.additions,dels:e.diffStat.deletions})]}):null,s?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Q,{}),(0,X.jsx)(`span`,{className:`truncate`,title:c,children:s})]}):null]}),e.parentRunId?(0,X.jsx)(P,{to:`/tasks/${e.parentRunId}`,"data-slot":`not-landed-parent`,className:`w-fit rounded-[2px] text-xs text-muted-foreground hover:underline underline-offset-2 focus-visible:outline-2 focus-visible:outline-ring`,children:`Worker of its parent task`}):null,(0,X.jsx)(Lt,{entry:e})]})]})}function Q(){return(0,X.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0`,children:`·`})}function ln({entry:e}){let t=c(D(`PR`,e.pr?.number).status),n=e.pr?.state,r=n===`draft`||n===`closed`?n:t?t.label.toLowerCase():`open`;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Q,{}),(0,X.jsx)(`span`,{"data-slot":`not-landed-pr-state`,children:r})]})}function un({entry:e,onClose:t}){let n=S(),[r,i]=(0,Y.useState)(``),a=(0,Y.useId)(),o=h({mutationFn:e=>y({names:[e],confirm:e}),onSuccess:e=>{let t=e.dropped?.length??0;b(e.deleted.length>0?`Deleted ${e.deleted[0]}${t?` and ${t} commit${t===1?``:`s`} with it`:``}`:e.refused[0]?.reason??`Nothing was deleted`),n.invalidateQueries({queryKey:f.repo}),s()},onError:e=>b(e.message,{tone:`danger`})}),s=()=>{i(``),t()},c=e!==null&&r.trim()===e.name,l=e&&`${e.ahead} commit${e.ahead===1?``:`s`}`;return(0,X.jsx)(J,{open:e!==null,onOpenChange:e=>!e&&!o.isPending&&s(),children:(0,X.jsxs)(H,{"data-slot":`delete-branch-dialog`,children:[(0,X.jsxs)(q,{children:[(0,X.jsxs)(V,{children:[`Delete `,e?.name,`?`]}),(0,X.jsx)(B,{asChild:!0,children:(0,X.jsxs)(`div`,{className:`space-y-2`,children:[(0,X.jsx)(`p`,{children:e?.class===`orphan`?`Its task was deleted, so this branch is the only copy of the work.`:(0,X.jsxs)(X.Fragment,{children:[`This drops the work of `,(0,X.jsx)(`span`,{className:`font-medium text-foreground`,children:e?.title??e?.name}),`. It is not on the base branch`,e?.pr?``:` and no pull request carries it`,`.`]})}),(0,X.jsxs)(`p`,{"data-slot":`delete-branch-dropped`,children:[l,` will be dropped`,e?.diffStat?` (+${e.diffStat.additions} −${e.diffStat.deletions})`:``,`, the latest “`,e?.lastCommit.subject,`”`,e?.lastCommit.sha?(0,X.jsxs)(X.Fragment,{children:[` (`,(0,X.jsx)(at,{sha:e.lastCommit.sha,variant:`inline`}),`)`]}):null,`.`]})]})})]}),(0,X.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),c&&e&&!o.isPending&&o.mutate(e.name)},className:`flex flex-col gap-[6px]`,children:[(0,X.jsxs)(`label`,{htmlFor:a,className:`text-[12.5px] text-muted-foreground`,children:[`Type `,(0,X.jsx)(`span`,{className:`font-mono text-foreground`,children:e?.name}),` to confirm`]}),(0,X.jsx)(bt,{id:a,"data-slot":`delete-branch-confirm`,autoComplete:`off`,spellCheck:!1,value:r,onChange:e=>i(e.target.value),className:`h-11 font-mono`})]}),(0,X.jsxs)(W,{children:[(0,X.jsx)(K,{className:`h-11`,disabled:o.isPending,children:`Keep it`}),(0,X.jsx)(U,{"data-action":`delete-branch-confirm`,className:`h-11 bg-danger text-danger-foreground hover:brightness-[0.96]`,disabled:!c||o.isPending,onClick:t=>{t.preventDefault(),e&&o.mutate(e.name)},children:o.isPending?`Deleting…`:`Delete branch`})]})]})})}function dn({base:e}){let t=s(),n=S(),[r,i]=(0,Y.useState)({merged:!1,empty:!1}),[a,o]=(0,Y.useState)(!1),c=(t.data?.branches??[]).filter(e=>e.class===`merged`),l=(t.data?.branches??[]).filter(e=>e.class===`empty`),u=[...c,...l],d=h({mutationFn:e=>y({names:e}),onSuccess:e=>{let t=e.refused.length;b(`Deleted ${e.deleted.length} branch${e.deleted.length===1?``:`es`}${t?`; kept ${t} that ${t===1?`is`:`are`} no longer safe to delete`:``}`),n.invalidateQueries({queryKey:f.repo})},onError:e=>{n.invalidateQueries({queryKey:f.repo}),b(e.message,{tone:`danger`})}});if(t.isPending)return(0,X.jsx)(`p`,{"data-slot":`cleanup-branches-loading`,className:`text-[13px] text-soft-foreground`,children:`Loading branches…`});if(t.isError)return(0,X.jsxs)(`p`,{"data-slot":`cleanup-branches-error`,className:`text-[13px] text-danger`,children:[`Branches did not load: `,t.error.message]});let p=u.length,m=`branch${p===1?``:`es`}`;return(0,X.jsxs)(`section`,{"data-slot":`cleanup-branches`,"aria-labelledby":`cleanup-branches-title`,className:`flex flex-col rounded-[8px] border border-border`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col gap-[10px] border-b border-border px-[14px] py-[12px] md:flex-row md:items-center`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-[2px]`,children:[(0,X.jsxs)(`h2`,{id:`cleanup-branches-title`,className:`text-[13px] font-semibold text-foreground`,children:[`Branches safe to delete · `,p]}),(0,X.jsxs)(`p`,{className:`text-xs leading-[17px] text-soft-foreground`,children:[`Their work is already on `,e,`, or they have none. Deleting loses nothing.`]})]}),(0,X.jsxs)(`button`,{type:`button`,"data-action":`cleanup-branches-delete`,disabled:p===0||d.isPending,onClick:()=>o(!0),className:`inline-flex h-[28px] shrink-0 items-center gap-[5px] self-start rounded-[6px] bg-muted px-[10px] text-[12px] font-medium text-foreground hover:brightness-110 focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-50 disabled:hover:brightness-100 max-md:h-11 md:self-center`,children:[(0,X.jsx)(ye,{"aria-hidden":`true`,className:`size-[12px]`}),d.isPending?`Deleting…`:`Delete ${p} ${m}`]})]}),(0,X.jsx)(fn,{kind:`merged`,title:`Merged into ${e}`,hint:t.data.prStateKnown?`including squash-merged PRs, read from the PR state`:$t.toLowerCase(),rows:c,open:r.merged,onToggle:()=>i(e=>({...e,merged:!e.merged}))}),(0,X.jsx)(fn,{kind:`empty`,title:`Empty`,hint:`no commits beyond the fork point`,rows:l,open:r.empty,onToggle:()=>i(e=>({...e,empty:!e.empty}))}),(0,X.jsx)(J,{open:a,onOpenChange:o,children:(0,X.jsxs)(H,{children:[(0,X.jsxs)(q,{children:[(0,X.jsxs)(V,{children:[`Delete `,p,` `,m,`?`]}),(0,X.jsxs)(B,{children:[c.length,` merged into `,e,` and `,l.length,` empty. Their work is already on `,e,`, or they have none. Anything that stopped being safe since this list loaded is kept.`]})]}),(0,X.jsxs)(W,{children:[(0,X.jsx)(K,{children:`Keep them`}),(0,X.jsxs)(U,{"data-action":`cleanup-branches-confirm`,className:`bg-danger text-danger-foreground hover:brightness-[0.96]`,onClick:()=>{d.mutate(u.map(e=>e.name)),o(!1)},children:[`Delete `,p,` `,m]})]})]})})]})}function fn({kind:e,title:t,hint:n,rows:i,open:a,onToggle:o}){let s=`cleanup-branches-${e}`;return(0,X.jsxs)(`div`,{"data-slot":`cleanup-branch-group`,"data-group":e,className:`border-b border-border last:border-0`,children:[(0,X.jsxs)(`button`,{type:`button`,"aria-expanded":a,"aria-controls":s,disabled:i.length===0,onClick:o,className:`flex min-h-[44px] w-full items-center gap-[12px] px-[14px] py-[4px] text-left hover:bg-sidebar-row-hover focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring disabled:hover:bg-transparent`,children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-[2px]`,children:[(0,X.jsxs)(`span`,{className:`truncate text-[12.5px] text-foreground`,children:[t,` · `,i.length]}),(0,X.jsx)(`span`,{className:`truncate text-xs text-soft-foreground`,children:n})]}),i.length>0?(0,X.jsx)(he,{"aria-hidden":`true`,className:r(`size-[13px] shrink-0 text-soft-foreground transition-transform motion-reduce:transition-none`,a&&`rotate-90`)}):null]}),a?(0,X.jsx)(`ul`,{id:s,"aria-label":t,className:`flex flex-col pb-[6px]`,children:i.map(e=>(0,X.jsxs)(`li`,{"data-slot":`cleanup-branch-row`,"data-branch":e.name,className:`flex min-h-[32px] items-center gap-[10px] px-[14px] pl-[26px] text-xs`,children:[(0,X.jsx)(nt,{value:e.name,className:`shrink-0 text-muted-foreground`}),e.runId?(0,X.jsx)(P,{to:`/tasks/${e.runId}`,className:`min-w-0 flex-1 truncate text-soft-foreground underline-offset-2 hover:text-foreground hover:underline`,children:e.title??`Open the task`}):(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-soft-foreground`,children:e.lastCommit.subject}),e.pr?(0,X.jsxs)(`span`,{className:`shrink-0 text-soft-foreground`,children:[`PR #`,e.pr.number]}):null,(0,X.jsx)(pt,{iso:e.lastCommit.at,className:`shrink-0 text-soft-foreground`})]},e.name))}):null]})}function $(e){return e.some(e=>e.sizeBytes===null)?null:e.reduce((e,t)=>e+(t.sizeBytes??0),0)}function pn(e){return e.kind===`dirty`?`${e.uncommittedFiles} uncommitted`:e.kind===`detached-head`?`detached HEAD`:e.kind===`submodules`?`has submodules`:`broken worktree`}function mn(e){if(e.kind===`dirty`){let t=`${e.uncommittedFiles} uncommitted file${e.uncommittedFiles===1?``:`s`}`;return e.detachedHead?`${t} and a detached HEAD on no branch`:t}return e.kind===`detached-head`?`a detached HEAD whose commit is on no branch`:e.kind===`submodules`?`initialized submodules that Git will not remove without force`:`an unregistered or broken Git worktree directory`}function hn(e){let t=e.some(e=>e.reclaimBlocker?.kind===`dirty`),n=e.some(e=>e.reclaimBlocker?.kind===`detached-head`||e.reclaimBlocker?.kind===`dirty`&&e.reclaimBlocker.detachedHead),r=e.some(e=>e.reclaimBlocker?.kind===`submodules`),i=e.some(e=>e.reclaimBlocker?.kind===`invalid`),a=[...t?[`uncommitted work`]:[],...n?[`a detached HEAD`]:[],...r?[`initialized submodules`]:[],...i?[`a broken checkout`]:[]];return a.length<=1?a[0]??`uncommitted work`:`${a.slice(0,-1).join(`, `)} or ${a.at(-1)}`}function gn(e,t,n){let r=Math.max(0,t-e);return e===0?r===0?`Nothing to reclaim — no finished worktrees exceed the keep limit`:n?`Nothing was reclaimed — the worktrees past the keep limit are in use or could not be removed`:`Nothing was reclaimed — the worktrees past the keep limit have uncommitted work or are in use`:`Reclaimed ${e} worktree${e===1?``:`s`} (branch kept)${r>0?` · ${r} kept: ${n?`in use or could not be removed`:`uncommitted work or in use`}`:``}`}function _n(e,t){return e===0?`Reclaim now`:t?`Reclaim ${O(t)} now`:`Reclaim ${e} now`}function vn(e,t,n){let r=t?O(t):String(e);return n?`Discard & reclaim all ${r}`:`Discard & reclaim ${r}`}function yn(e,t){if(!e)return t>0?`No clean worktrees past the keep limit — use Discard & reclaim for blocked worktrees`:`Nothing past the keep limit to reclaim`}function bn(e){return e===0?{prefix:`Retention is unlimited (`,suffix:`), so nothing is reclaimed on its own.`}:{prefix:`Retention keeps the newest ${e} finished checkout${e===1?``:`s`} (`,suffix:`) and reclaims the rest.`}}function xn({blocked:e,discardLabel:t,disabled:n,onDiscard:r}){let i=$(e),a=e.length===1?``:`s`,o=e.length===1?`it has`:`they have`;return(0,X.jsxs)(`div`,{"data-slot":`worktrees-blocked-banner`,className:`flex flex-col gap-[10px] border-b border-border bg-muted/40 px-[14px] py-[10px] md:flex-row md:items-center`,children:[(0,X.jsxs)(`p`,{className:`min-w-0 flex-1 text-[12px] leading-[17px] text-foreground`,children:[e.length,` worktree`,a,` past the keep limit`,i?` (${O(i)})`:``,` `,`cannot be reclaimed automatically because `,o,` `,hn(e),`.`]}),(0,X.jsxs)(`button`,{type:`button`,"data-action":`worktrees-discard-reclaim`,disabled:n,onClick:r,className:`inline-flex h-[28px] shrink-0 items-center gap-[5px] self-start rounded-[6px] border border-danger/40 px-[10px] text-[12px] font-medium text-danger hover:bg-danger/10 focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-50 max-md:h-11 md:self-center`,children:[(0,X.jsx)(L,{"aria-hidden":`true`,className:`size-[12px]`}),t]})]})}function Sn({confirmClean:e,onCloseClean:t,cleanCount:n,cleanBytes:r,reclaimLabel:i,onConfirmClean:a,discardBatch:o,onCloseDiscardBatch:s,onConfirmDiscardBatch:c,discardRow:l,onCloseRow:u,onConfirmRow:d}){let f=o?$(o):null,p=o?o.filter(e=>e.reclaimBlocker!==null).length:0,m=o?o.some(e=>!e.reclaimBlocker):!1,h=o?vn(o.length,f,m):``;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(J,{open:e,onOpenChange:e=>{e||t()},children:(0,X.jsxs)(H,{children:[(0,X.jsxs)(q,{children:[(0,X.jsx)(V,{children:`Reclaim old worktrees?`}),(0,X.jsxs)(B,{children:[n,` finished worktree`,n===1?``:`s`,` beyond the keep limit`,r?` (${O(r)})`:``,` `,n===1?`is`:`are`,` reclaimed now, directory only. Their branches are kept, so the work stays recoverable.`]})]}),(0,X.jsxs)(W,{children:[(0,X.jsx)(K,{children:`Keep them`}),(0,X.jsx)(U,{"data-action":`worktrees-confirm`,onClick:a,children:i})]})]})}),(0,X.jsx)(J,{open:o!==null,onOpenChange:e=>{e||s()},children:(0,X.jsxs)(H,{children:[(0,X.jsxs)(q,{children:[(0,X.jsx)(V,{children:`Discard changes and reclaim worktrees?`}),(0,X.jsx)(B,{children:o?(0,X.jsxs)(X.Fragment,{children:[o.length,` finished worktree`,o.length===1?``:`s`,` beyond the keep limit`,f?` (${O(f)})`:``,` will be reclaimed now.`,` `,`Uncommitted files and detached-HEAD commits in `,p,` blocked checkout`,p===1?``:`s`,` will be permanently discarded. Each task’s branch is kept.`]}):null})]}),(0,X.jsxs)(W,{children:[(0,X.jsx)(K,{children:`Keep them`}),(0,X.jsx)(U,{"data-action":`worktrees-discard-confirm`,className:`bg-danger text-danger-foreground hover:brightness-[0.96]`,onClick:()=>{o&&c(o),s()},children:h})]})]})}),(0,X.jsx)(J,{open:l!==null,onOpenChange:e=>{e||u()},children:(0,X.jsxs)(H,{children:[(0,X.jsxs)(q,{children:[(0,X.jsx)(V,{children:`Discard changes and reclaim worktree?`}),(0,X.jsx)(B,{children:l?.reclaimBlocker?(0,X.jsxs)(X.Fragment,{children:[l.title,` has `,mn(l.reclaimBlocker),`. Reclaiming removes the directory and permanently discards uncommitted or unbranched changes in it. The branch (`,l.branch??l.runId.slice(0,8),`) is kept.`]}):null})]}),(0,X.jsxs)(W,{children:[(0,X.jsx)(K,{children:`Keep it`}),(0,X.jsx)(U,{"data-action":`worktree-discard-confirm`,className:`bg-danger text-danger-foreground hover:brightness-[0.96]`,onClick:()=>{l&&d(l),u()},children:`Discard & reclaim`})]})]})})]})}function Cn(){let e=o(),t=d().data?.targets.find(e=>e.id===`finder`),n=h({mutationFn:e=>ne(e,t.id),onError:e=>b(e.message,{tone:`danger`})}),r=S(),[i,a]=(0,Y.useState)(!1),[s,c]=(0,Y.useState)(null),[l,u]=(0,Y.useState)(null),p=()=>Promise.all([r.invalidateQueries({queryKey:f.worktrees}),r.invalidateQueries({queryKey:f.repoBranches})]),m=h({mutationFn:({runIds:e})=>ee(e?{discardWork:!0,runIds:e}:void 0),onSuccess:(e,{expected:t,runIds:n})=>{p(),b(gn(e.reclaimed.length,t,!!n))},onError:e=>b(e.message,{tone:`danger`})}),g=h({mutationFn:({worktree:e,discardWork:t})=>te(e.runId,t?{discardWork:!0}:void 0),onSuccess:(e,{worktree:t})=>{p(),b(`Reclaimed the worktree of ${t.title} (branch kept)`)},onError:e=>{p(),b(e.message,{tone:`danger`})}});if(e.isPending)return(0,X.jsx)(`p`,{"data-slot":`worktrees-loading`,className:`text-[13px] text-soft-foreground`,children:`Loading worktrees…`});if(e.isError)return(0,X.jsxs)(`p`,{"data-slot":`worktrees-error`,className:`text-[13px] text-danger`,children:[`Worktrees did not load: `,e.error.message]});let{worktrees:_,totalBytes:v,keep:y}=e.data,x=m.isPending||g.isPending,C=_.filter(e=>e.pastKeep),w=C.filter(e=>!e.reclaimBlocker),T=C.filter(e=>e.reclaimBlocker!==null),E=w.length>0,D=$(w),re=$(C),k=_n(w.length,D),ie=vn(C.length,re,E),A=v?O(v):null,ae=bn(y);return(0,X.jsxs)(`section`,{"data-slot":`worktrees-panel`,"aria-labelledby":`worktrees-panel-title`,className:`flex flex-col rounded-[8px] border border-border`,children:[(0,X.jsxs)(`div`,{className:`flex flex-col gap-[10px] border-b border-border px-[14px] py-[12px] md:flex-row md:items-center`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-[2px]`,children:[(0,X.jsxs)(`h2`,{id:`worktrees-panel-title`,className:`text-[13px] font-semibold text-foreground`,children:[`Worktrees on disk`,A?` · ${A}`:``]}),(0,X.jsxs)(`p`,{"data-slot":`worktrees-retention`,className:`text-xs leading-[17px] text-soft-foreground`,children:[ae.prefix,(0,X.jsx)(P,{to:`/settings/worktrees`,"data-slot":`worktrees-retention-link`,className:`underline-offset-2 hover:text-foreground hover:underline`,children:et(`worktrees`,` › `)}),ae.suffix,` `,`Reclaim removes the directory only; the branch stays, so its work stays recoverable.`]})]}),(0,X.jsxs)(`button`,{type:`button`,"data-action":`worktrees-reclaim-now`,disabled:x||!E,title:yn(E,T.length),onClick:()=>a(!0),className:`inline-flex h-[28px] shrink-0 items-center gap-[5px] self-start rounded-[6px] bg-muted px-[10px] text-[12px] font-medium text-foreground hover:brightness-110 focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-50 disabled:hover:brightness-100 max-md:h-11 md:self-center`,children:[(0,X.jsx)(L,{"aria-hidden":`true`,className:`size-[12px]`}),k]})]}),T.length>0?(0,X.jsx)(xn,{blocked:T,discardLabel:ie,disabled:x,onDiscard:()=>c(C)}):null,_.length===0?(0,X.jsx)(`p`,{"data-slot":`worktrees-empty`,className:`px-[14px] py-[12px] text-[12.5px] text-soft-foreground`,children:`No task worktrees on disk.`}):(0,X.jsx)(`ul`,{"aria-label":`Task worktrees on disk`,className:`flex flex-col`,children:_.map(e=>(0,X.jsx)(En,{worktree:e,keep:y,disabled:x,onOpen:t?()=>n.mutate(e.runId):void 0,opening:n.isPending,onReclaim:()=>{e.reclaimBlocker?u(e):g.mutate({worktree:e,discardWork:!1})}},e.runId))}),(0,X.jsx)(Sn,{confirmClean:i,onCloseClean:()=>a(!1),cleanCount:w.length,cleanBytes:D,reclaimLabel:k,onConfirmClean:()=>{m.mutate({expected:w.length}),a(!1)},discardBatch:s,onCloseDiscardBatch:()=>c(null),onConfirmDiscardBatch:e=>{m.mutate({expected:e.length,runIds:e.map(e=>e.runId)})},discardRow:l,onCloseRow:()=>u(null),onConfirmRow:e=>g.mutate({worktree:e,discardWork:!0})})]})}var wn=new Set([`queued`,`running`,`waiting`,`review`]);function Tn(e,t){return wn.has(e.status)||!e.reclaimable?{label:`in use`,tone:`in-use`,state:`in-use`}:e.reclaimBlocker?{label:pn(e.reclaimBlocker),tone:`blocked`,state:`blocked`}:e.pastKeep?{label:`reclaimable`,tone:`plain`,state:`reclaimable`}:{label:t>0?`kept · newest ${t}`:`kept`,tone:`plain`,state:`kept`}}function En({worktree:e,keep:t,disabled:n,onOpen:i,opening:a,onReclaim:o}){let s=Tn(e,t),c=Qe(e.finishedAt??void 0),l=e.status===`review`?`at review`:c?`${e.status} ${$e(c)}`:e.status,u=s.tone===`in-use`?`text-status-running`:s.tone===`blocked`?`text-danger`:`text-soft-foreground`,d=e.reclaimBlocker?`Cannot auto-reclaim: ${mn(e.reclaimBlocker)}`:void 0,f=(0,X.jsx)(`span`,{"data-slot":`worktree-state`,"data-state":s.state,title:d,className:r(`text-xs`,u),children:s.label}),p=`flex size-[28px] shrink-0 items-center justify-center rounded-[6px] text-soft-foreground hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-50 max-md:size-11`,m=e.reclaimBlocker?`Discard changes and reclaim the worktree of ${e.title} (branch kept)`:`Reclaim the worktree of ${e.title} (branch kept)`,h=e.reclaimBlocker?`Discard changes and reclaim the directory (branch kept)`:`Reclaim the directory (branch kept)`;return(0,X.jsxs)(`li`,{"data-slot":`worktree-row`,"data-run":e.runId,className:`flex min-h-[44px] items-center gap-[12px] border-b border-border px-[14px] py-[4px] last:border-0`,children:[(0,X.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-[2px]`,children:[(0,X.jsx)(`span`,{className:`truncate text-[12.5px] text-foreground`,title:e.title,children:e.title}),(0,X.jsxs)(`span`,{className:`truncate font-mono text-xs text-soft-foreground`,children:[e.branch??e.runId.slice(0,8),` · `,l,(0,X.jsxs)(`span`,{className:`md:hidden`,children:[` · `,s.label]})]})]}),(0,X.jsx)(`span`,{"data-slot":`worktree-size`,className:`shrink-0 text-xs tabular-nums text-muted-foreground`,children:e.sizeBytes===null?`—`:O(e.sizeBytes)||`0 kB`}),(0,X.jsx)(`span`,{className:`hidden shrink-0 md:inline`,children:f}),i?(0,X.jsx)(`button`,{type:`button`,className:p,"aria-label":`Open folder for ${e.title}`,title:`Open folder`,disabled:a,onClick:i,children:(0,X.jsx)(ie,{"aria-hidden":`true`,className:`size-[13px]`})}):null,s.tone===`in-use`?null:(0,X.jsx)(`button`,{type:`button`,"data-action":`worktree-reclaim`,"aria-label":m,title:h,disabled:n,onClick:o,className:r(p,e.reclaimBlocker&&`text-danger hover:text-danger`),children:(0,X.jsx)(L,{"aria-hidden":`true`,className:`size-[13px]`})})]})}function Dn(e){return e===`main`||e===`changes`?`Split`:`Table`}function On({section:e,index:t=!1}){let n=l(),r=F(),[i]=T(),a=Dn(e);if(t&&!r&&i.get(`view`)!==`repo`)return(0,X.jsx)(Nt,{});if(n.isPending)return(0,X.jsx)(ut,{});if(n.isError)return(0,X.jsx)(Xe,{template:a,route:`repo-git`,density:`empty`,beforeHeader:(0,X.jsx)(R,{}),children:(0,X.jsx)(I,{icon:(0,X.jsx)(me,{size:16}),tone:`danger`,title:`Could not load the repository`,subtitle:n.error.message})});let o=n.data.info;return o?(0,X.jsx)(kn,{repo:n.data,info:o,section:e}):(0,X.jsx)(Xe,{template:a,route:`repo-git`,density:`empty`,beforeHeader:(0,X.jsx)(R,{}),children:(0,X.jsx)(I,{icon:(0,X.jsx)(ge,{size:16}),tone:`neutral`,title:`Not a git repository`,subtitle:`Squawk is running outside a git repository — start it inside one to browse changes, commits and branches.`})})}function kn({repo:e,info:t,section:n}){let r=Dn(n),i=s(),a=An(n),o=n===`main`?e.log.length:n===`changes`?e.status.length:n===`branches`?Gt(e,i.data?.branches).length:n===`not-landed`?i.data?.branches.filter(e=>e.class===`not-landed`||e.class===`orphan`).length??0:4;return(0,X.jsx)(Xe,{template:r,route:`repo-git`,density:n===`not-landed`&&i.isPending?`full`:Je(o),rootProps:{"data-git-section":n},beforeHeader:(0,X.jsx)(R,{}),header:{title:a?.title??ot(n,t.branch),headerSlot:`repo-header`,subtitle:a?(0,X.jsxs)(X.Fragment,{children:[`Commit `,a.shortSha,` on `,t.branch]}):(0,X.jsx)(jn,{repo:e,info:t,section:n}),subtitleSlot:`repo-meta`,...n===`branches`?{primaryAction:(0,X.jsx)(Ft,{from:t.branch})}:{}},children:n===`main`?(0,X.jsx)(qt,{repo:e,info:t}):n===`not-landed`?(0,X.jsx)(nn,{}):n===`cleanup`?(0,X.jsxs)(`div`,{"data-slot":`repo-cleanup`,className:`flex flex-col gap-4 pb-[calc(90px+env(safe-area-inset-bottom))] md:pb-0`,children:[(0,X.jsx)(Cn,{}),(0,X.jsx)(dn,{base:e.baseBranch??t.branch})]}):n===`branches`?(0,X.jsx)(Rt,{repo:e,info:t}):(0,X.jsx)(Kt,{})})}function An(e){let{sha:t}=E(),n=F(),r=e===`main`&&!n?t:void 0,i=u(r);if(!r)return;let a=r.slice(0,8);return{title:i.data?.subject??`Commit ${a}`,shortSha:a}}function jn({repo:e,info:t,section:n}){let r=e.baseBranch??t.branch;switch(n){case`main`:return(0,X.jsxs)(X.Fragment,{children:[e.log.length===0?`No commits yet`:`Latest ${e.log.length} commit${e.log.length===1?``:`s`} in the main checkout`,e.tracking?` · ${_t(e.tracking)}`:``]});case`not-landed`:return(0,X.jsxs)(X.Fragment,{children:[`Finished tasks whose commits are not on `,r]});case`branches`:return(0,X.jsx)(Mn,{repo:e,info:t});case`changes`:return(0,X.jsxs)(X.Fragment,{children:[e.status.length,` uncommitted file`,e.status.length===1?``:`s`,` in the main checkout`]});case`cleanup`:return(0,X.jsxs)(X.Fragment,{children:[`Nothing here can delete work that is not on `,r]})}}function Mn({repo:e,info:t}){let n=Gt(e,s().data?.branches).length;return(0,X.jsxs)(X.Fragment,{children:[n,` branch`,n===1?``:`es`,` · on `,t.branch]})}export{On as RepoGitRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{o as r,p as i}from"./dist-C_rn70hE.js";import{Lt as a,M as o,st as s}from"./queries-CchoEEzj.js";import{Bn as c,Cr as l,Gr as u,Hn as d,gi as f,oi as p,qr as m,vi as h,zn as g}from"./toaster-zMN8cNZQ.js";import{B as _,F as v,I as y,J as b,N as x,W as S,Y as C,z as w}from"./live-protocol-DMhTnCmf.js";import{f as T,m as E}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{Q as D}from"./design-icons-QbNMZniQ.js";import{t as O}from"./arrow-up-right-DKGzsMqY.js";import{t as k}from"./chevron-right-BENZ-1ZN.js";import{t as A}from"./eye-B8okNWXU.js";import{t as j}from"./button-B22ANdCY.js";import{t as M}from"./project-router-j0uBi7Ep.js";import{f as N,i as ee,n as te,r as ne,t as P,u as F}from"./page-shell-BgabWJ3w.js";import{t as I}from"./use-search-params-writer-ClMScnNe.js";import{Dn as L,Vn as R,gr as z,sr as B}from"./index-UFO7Bk2I.js";import{t as V}from"./report-title-D4Mbu2Er.js";import{t as H}from"./html-report-frame-Ck76gKfA.js";var U=e(t(),1),W=1e3,G=S().min(1).max(1024);_({q:S().max(W).optional(),before:G.optional(),limit:S().regex(/^(?:[1-9]|[1-9][0-9]|100)$/).transform(Number).optional()}).strict();var K=_({reports:x(_({id:b(),runId:b(),name:S(),title:S(),createdAt:C(),size:w().int().nonnegative(),taskTitle:S(),taskStatus:l}).strict()),nextCursor:G.nullable(),total:w().int().nonnegative()}).strict(),q=_({epoch:b(),generation:w().int().nonnegative(),metadataGeneration:w().int().nonnegative()}).strict(),J=_({runId:b(),taskTitle:S(),taskStatus:l}).strict(),Y=v(`type`,[q.extend({type:y(`snapshot`)}),q.extend({type:y(`content`)}),q.extend({type:y(`metadata`),runs:x(J)})]),X=new WeakMap;function re(e,t){if(!e)return{content:t.type===`content`,metadata:t.type===`metadata`,reset:!1};if(e.epoch!==t.epoch)return{content:!0,metadata:!0,reset:!0};if(!(t.generation<e.generation||t.metadataGeneration<e.metadataGeneration)&&!(e.generation===t.generation&&e.metadataGeneration===t.metadataGeneration))return{content:t.generation!==e.generation,metadata:t.metadataGeneration!==e.metadataGeneration,reset:!1}}var ie=class{client;project;state;content=0;metadata=0;patches=new Map;trailing=new Set;flights=new Map;constructor(e,t){this.client=e,this.project=t,e.getQueryCache().subscribe(n=>{if(n.type===`removed`){this.trailing.delete(n.query),this.flights.delete(n.query);return}if(!(n.query.queryKey[0]!==t||n.query.queryKey[1]!==`reports`)){if(n.type===`updated`&&n.action.type===`fetch`&&this.flights.set(n.query,this.metadata),n.query.state.fetchStatus===`idle`&&this.flights.has(n.query)){let e=this.flights.get(n.query);this.flights.delete(n.query),e!==this.metadata&&String(n.query.queryKey[2]??``).trim()===``&&this.client.setQueryData(n.query.queryKey,t=>t&&{...t,pages:t.pages.map(t=>this.patch(t,e))})}!this.trailing.has(n.query)||n.query.state.fetchStatus!==`idle`||(this.trailing.delete(n.query),queueMicrotask(()=>{e.invalidateQueries({queryKey:n.query.queryKey,exact:!0,refetchType:`active`},{cancelRefetch:!1})}))}})}patch(e,t=-1){return{...e,reports:e.reports.map(e=>{let n=this.patches.get(e.runId);return n&&n.version>t?{...e,taskTitle:n.value.taskTitle,taskStatus:n.value.taskStatus}:e})}}async read(e,t){for(;;){let n=this.content,r=this.metadata,i=await t();if(!(n!==this.content||e.trim()!==``&&r!==this.metadata))return e.trim()===``?this.patch(i,r):i}}receive(e,t=!1){let n=this.state;if(!n&&e.type===`snapshot`){this.state=e,this.content++,this.client.getQueryCache().findAll({queryKey:[this.project,`reports`]}).some(e=>e.state.data!==void 0)&&this.invalidate(!0);return}let r=re(n,e);if(!r){t&&e.type===`snapshot`&&(this.content++,this.invalidate(!0));return}let{metadata:i,reset:a}=r,o=r.content||t&&e.type===`snapshot`;this.state=e,a&&this.patches.clear(),i&&this.metadata++,o&&this.content++,e.type===`metadata`&&!a&&this.patchCaches(e);let s=o||i&&e.type!==`metadata`;(s||i)&&this.invalidate(s)}patchCaches(e){for(let t of e.runs)this.patches.set(t.runId,{value:t,version:this.metadata});this.client.setQueriesData({queryKey:[this.project,`reports`],predicate:e=>String(e.queryKey[2]??``).trim()===``},e=>e&&{...e,pages:e.pages.map(e=>this.patch(e,this.metadata-1))})}invalidate(e){let t={queryKey:[this.project,`reports`],refetchType:`active`,...e?{}:{predicate:e=>String(e.queryKey[2]??``).trim()!==``}};for(let e of this.client.getQueryCache().findAll(t))e.state.fetchStatus===`fetching`&&this.trailing.add(e);this.client.invalidateQueries(t,{cancelRefetch:!1})}};function ae(e,t){let n=X.get(e);n||(n=new Map,X.set(e,n));let r=n.get(t);return r||(r=new ie(e,t),n.set(t,r)),r}async function oe(e,t){let n=await g.api.v1.p[`:projectId`].reports.state.$get({param:{projectId:e}},c({signal:t}));return q.parse(await d(n,`/reports/state`))}function se(e){let t=ae(h(),e);return(0,U.useEffect)(()=>{let n=a(`reports:project:${e}`,e=>{let n=Y.safeParse(e);n.success&&t.receive(n.data,n.data.type===`snapshot`)}),r,i,o=()=>{if(u()===`finite`&&!r){i=new AbortController;let n=i.signal;oe(e,n).then(e=>{n.aborted||t.receive({type:`snapshot`,...e})}).catch(()=>void 0),r=s({path:`/api/v1/p/${encodeURIComponent(e)}/reports/state`,intervalMs:5e3},(e,n)=>{let r=q.safeParse(e);!n&&r.success&&t.receive({type:`snapshot`,...r.data})})}else u()!==`finite`&&(i?.abort(),r?.(),r=void 0)};o();let c=m(o);return()=>{c(),i?.abort(),r?.(),n()}},[t,e]),t}async function ce(e,t,n,r){let i=await g.api.v1.p[`:projectId`].reports.$get({param:{projectId:e},query:{q:t.slice(0,W),...n?{before:n}:{}}},c(r?{signal:r}:void 0));return K.parse(await d(i,`/reports`))}function Z(e){let t=i(),n=se(t);return p({queryKey:[t,`reports`,e],initialPageParam:void 0,queryFn:({pageParam:r,signal:i})=>n.read(e,()=>ce(t,e,r,i)),getNextPageParam:e=>e.nextCursor??void 0,staleTime:0,refetchOnWindowFocus:!0})}var Q=n(),$=new Map;function le(){let e=T(),t=E(),[n,i]=I(),a=(n.get(`q`)??``).slice(0,W),o=Z(a),s=(0,U.useRef)(null),c=(0,U.useRef)(null),l=(0,U.useRef)(``),u=e.pathname+e.search,d=o.data?.pages.flatMap(e=>e.reports)??[],f=e=>{$.set(u,{scroll:c.current?.scrollTop??0,row:e,pages:o.data?.pages.length??1})},[p,m]=(0,U.useState)(null),h=ee(s);(0,U.useLayoutEffect)(()=>{if(!o.data||l.current===u)return;let n=$.get(u),r=e.state?.filesRestoreKey===u;if(!n||!c.current||t!==`POP`&&!r){l.current=u;return}let i=c.current.querySelector(`[data-report-id="${n.row}"]`);if(o.isFetchNextPageError){l.current=u,c.current.scrollTop=0;return}if((!i||o.data.pages.length<n.pages)&&o.hasNextPage){o.isFetchingNextPage||o.fetchNextPage();return}l.current=u,c.current.scrollTop=i?n.scroll:0,i?.focus({preventScroll:!0})},[u,o.data,o.hasNextPage,o.isFetchingNextPage,o.isFetchNextPageError,o.fetchNextPage,e.state,t]);let g=t=>i(n=>(t?n.set(`q`,t.slice(0,W)):n.delete(`q`),$.delete(e.pathname+`?`+n.toString()),n)),_=d.find(e=>e.id===p)??d[0]??null,v=o.isPending?`full`:N(d.length);return(0,Q.jsx)(F,{route:`reports`,density:v,fillHeight:!0,bodyClassName:`gap-4`,header:{title:`Reports`,subtitle:`Published HTML snapshots from tasks in this project.`},children:(0,Q.jsxs)(`div`,{ref:s,"data-slot":`reports-content`,className:`flex min-h-0 min-w-0 flex-1 flex-col gap-4`,children:[(0,Q.jsxs)(`div`,{className:`relative w-full shrink-0`,children:[(0,Q.jsx)(D,{"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground`}),(0,Q.jsx)(B,{maxLength:W,"aria-label":`Search reports`,placeholder:`Search reports or source tasks…`,value:a,onChange:e=>g(e.target.value),className:`h-10 w-full rounded-lg border-border bg-card pl-9 text-sm max-md:h-11`})]}),o.isPending?(0,Q.jsx)(`div`,{ref:c,"data-slot":`reports-list`,className:`min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:(0,Q.jsx)(`p`,{role:`status`,className:`py-4 text-sm text-muted-foreground`,children:`Loading reports…`})}):o.isError&&d.length===0?(0,Q.jsx)(`div`,{ref:c,"data-slot":`reports-list`,className:`min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:(0,Q.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-3 rounded-xl border border-border bg-card p-5`,children:[(0,Q.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:`Could not load reports`}),(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:o.error.message}),(0,Q.jsx)(j,{variant:`outline`,onClick:()=>void o.refetch(),children:`Retry`})]})}):d.length===0?(0,Q.jsx)(`div`,{ref:c,"data-slot":`reports-list`,className:`min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:(0,Q.jsx)(P,{icon:(0,Q.jsx)(z,{}),title:a?`No matching reports`:`No published reports yet`,description:a?`Try a different keyword or clear the search filter.`:(0,Q.jsxs)(Q.Fragment,{children:[`Publish an HTML snapshot with`,` `,(0,Q.jsxs)(`code`,{className:`rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-foreground`,children:[L(),` artifact publish`]}),` `,`to list it here.`]}),actions:a?(0,Q.jsx)(j,{"data-slot":`reports-clear-search`,variant:`outline`,onClick:()=>g(``),children:`Clear search`}):(0,Q.jsx)(j,{variant:`outline`,asChild:!0,children:(0,Q.jsx)(M,{to:`/new`,children:`Start a task`})})})}):(0,Q.jsx)(ne,{list:(0,Q.jsxs)(`div`,{ref:c,"data-slot":`reports-list`,className:`min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:[(0,Q.jsx)(`ul`,{className:`flex flex-col gap-1.5`,"aria-label":`Reports`,children:d.map(e=>{let t=_?.id===e.id;return(0,Q.jsxs)(`li`,{"data-slot":`report-row`,"data-selected":h&&t?`true`:void 0,className:r(`reports-row flex items-center gap-3 rounded-xl border border-border bg-card px-4 py-3 transition-colors`,h&&t&&`border-accent-strong/60 bg-sidebar-row-selected/40`),children:[(0,Q.jsx)(z,{"aria-hidden":`true`,className:`reports-icon mt-0.5 size-4 shrink-0 self-start text-accent-text`}),(0,Q.jsxs)(`div`,{className:`reports-lines flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Q.jsx)(`h2`,{className:`flex min-w-0 text-[14px] leading-5 font-semibold text-foreground`,title:V(e),children:(0,Q.jsx)(M,{"data-report-id":e.id,className:`reports-open text-foreground no-underline`,to:`/tasks/${e.runId}/report?artifact=${e.id}`,state:{readerFrom:u,filesRestoreKey:u},onClick:()=>f(e.id),children:(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,children:V(e)})})}),(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 text-xs leading-4 text-muted-foreground`,children:[(0,Q.jsx)(M,{className:`reports-task min-w-0 truncate text-xs text-muted-foreground no-underline hover:text-foreground hover:underline`,to:`/tasks/${e.runId}`,children:(0,Q.jsx)(`span`,{className:`min-w-0 truncate`,title:e.taskTitle,children:e.taskTitle})}),(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0`,children:`·`}),(0,Q.jsx)(R,{className:`shrink-0`,iso:e.createdAt,prefix:`Published · `})]})]}),h?(0,Q.jsx)(`button`,{type:`button`,"data-slot":`report-preview-select`,"aria-label":`Preview ${V(e)}`,"aria-pressed":t,onClick:()=>m(e.id),className:`reports-preview-btn inline-flex min-h-8 min-w-8 shrink-0 items-center justify-center gap-1 rounded-md border border-border bg-background px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring`,children:(0,Q.jsx)(A,{"aria-hidden":`true`,className:`size-3.5`})}):(0,Q.jsx)(k,{"aria-hidden":`true`,"data-slot":`report-open-cue`,className:`reports-cue size-4 shrink-0 text-muted-foreground`})]},e.id)})}),o.hasNextPage?(0,Q.jsx)(`div`,{className:`mt-4`,children:(0,Q.jsx)(j,{variant:`outline`,disabled:o.isFetchingNextPage,onClick:()=>void o.fetchNextPage(),children:`Load more reports`})}):null,v===`sparse`?(0,Q.jsx)(te,{summary:`${d.length} published ${d.length===1?`report`:`reports`}. Select a row to open full screen or preview beside the list.`}):null]}),detail:h&&_?(0,Q.jsx)(ue,{report:_,restoreKey:u,onOpenReader:()=>f(_.id)}):null})]})})}function ue({report:e,restoreKey:t,onOpenReader:n}){let r=(0,U.useContext)(f)!==void 0;return(0,Q.jsxs)(`section`,{"data-slot":`reports-preview-pane`,"aria-label":`Preview of ${V(e)}`,className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl border border-border bg-card`,children:[(0,Q.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border px-4 py-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`h2`,{className:`truncate text-sm font-semibold text-foreground`,children:V(e)}),(0,Q.jsxs)(`p`,{className:`mt-0.5 truncate text-xs text-muted-foreground`,children:[e.taskTitle,` · `,(0,Q.jsx)(R,{iso:e.createdAt,prefix:`Published · `})]})]}),(0,Q.jsx)(j,{variant:`outline`,size:`sm`,asChild:!0,className:`shrink-0 py-1.5`,children:(0,Q.jsxs)(M,{"data-slot":`reports-preview-open`,to:`/tasks/${e.runId}/report?artifact=${e.id}`,state:{readerFrom:t,filesRestoreKey:t},onClick:n,children:[`Open reader`,(0,Q.jsx)(O,{"aria-hidden":`true`,className:`size-3.5`})]})})]}),r?(0,Q.jsx)(de,{report:e}):(0,Q.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 text-xs text-muted-foreground`,children:`Open reader to view this HTML report.`})]})}function de({report:e}){let t=o(e.runId,e.id);if(t.isPending)return(0,Q.jsx)(`p`,{role:`status`,className:`p-6 text-xs text-muted-foreground`,children:`Loading preview…`});if(t.isError)return(0,Q.jsxs)(`div`,{role:`alert`,className:`flex flex-col items-start gap-2 p-6 text-xs text-muted-foreground`,children:[(0,Q.jsx)(`p`,{className:`font-medium text-foreground`,children:`Could not load report preview`}),(0,Q.jsx)(`p`,{children:t.error.message}),(0,Q.jsx)(j,{variant:`outline`,size:`sm`,onClick:()=>void t.refetch(),children:`Retry`})]});let n=t.data;return!n||n.type!==`file`||n.binary||n.content===void 0?(0,Q.jsx)(`p`,{className:`p-6 text-xs text-muted-foreground`,children:`Preview unavailable for this artifact.`}):(0,Q.jsx)(H,{html:n.content,title:V(e),className:`min-h-0 flex-1`})}export{le as ReportsRoute};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{o as r,s as i}from"./dist-C_rn70hE.js";import{G as a,H as o,J as s,St as c,U as l,Ut as u,V as d,W as f,bt as p,cn as ee,ct as m,d as h,et as g,ln as _,nn as v,nt as te,un as y,vt as ne,xt as b}from"./queries-CchoEEzj.js";import{Bt as re,Nn as ie,Rn as x,Sr as S,dr as ae,ft as oe,lr as se,n as C,rt as w,vi as ce,zt as le}from"./toaster-zMN8cNZQ.js";import{C as ue,S as de,T as fe,b as pe,g as me,i as he,m as ge,n as _e,p as ve,t as T,x as ye}from"./reference-chip-z7dZJVH-.js";import{I as be,S as xe,Y as Se,a as Ce,m as we,mt as Te,st as Ee,t as De,u as Oe,y as E}from"./design-icons-QbNMZniQ.js";import{t as D}from"./createLucideIcon-BHp8sXmF.js";import{t as ke}from"./app-window-CSHwDX9N.js";import{n as Ae,r as je,t as Me}from"./open-in-menu-CbQWVBD0.js";import{t as Ne}from"./info-DA1x_4bz.js";import{t as Pe}from"./message-square-B-MD-8rD.js";import{t as Fe}from"./square-terminal-B6RYYieR.js";import{t as O}from"./button-B22ANdCY.js";import{a as k,i as A,l as j,n as M,p as N,r as P,t as F}from"./dropdown-menu-DjtKUK8F.js";import{i as Ie,r as Le,t as Re}from"./popover-CvL6hQ5c.js";import{a as ze,i as Be,o as Ve,r as He,s as Ue,t as We}from"./dialog-rpNyAWGb.js";import{c as Ge,s as Ke,t as I}from"./project-router-j0uBi7Ep.js";import"./attention-DnxGjw_R.js";import{T as qe,f as L,u as Je}from"./task-groups-CGCnVqHE.js";import{t as R}from"./status-dot-Drd4-nfa.js";import{t as Ye}from"./format-BU7D3IfE.js";import{a as Xe}from"./agent-accounts-D_7QcFSx.js";import{$n as Ze,J as z,Ln as Qe,Sn as B,Y as V,_ as $e,_n as et,a as H,an as U,cn as tt,dn as nt,dr as rt,er as it,fr as at,g as ot,gr as st,in as ct,kn as W,nn as lt,o as ut,on as dt,pn as ft,q as pt,r as G,rn as mt,sn as ht,tn as gt,tr as _t,wr as vt,xn as K}from"./index-UFO7Bk2I.js";import{t as yt}from"./textarea-vEsJAUAV.js";import{t as bt}from"./markdown-CqzDs1kO.js";import{t as xt}from"./task-file-scope-B63NmSov.js";import{t as q}from"./tab-link-BKlpD9sn.js";var St=D(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),Ct=D(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),wt=D(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Tt=D(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),J=e(t(),1),Y=n();function Et(e){let t=m();return y({mutationFn:t=>w(_(e),t),onSuccess:()=>t.invalidateAfter(`runs`,()=>ee()),onError:e=>C(e.message,{tone:`danger`})})}function Dt(e){return e.archived?`Unarchive`:`Archive task`}function Ot({run:e,open:t,onOpenChange:n,onConfirm:r}){return(0,Y.jsx)(gt,{open:t,onOpenChange:n,children:(0,Y.jsxs)(ct,{"data-slot":`task-confirmation`,className:`sm:max-w-[660px]`,children:[(0,Y.jsxs)(ht,{children:[(0,Y.jsx)(tt,{children:`Archive task?`}),(0,Y.jsxs)(U,{children:[`Move “`,(0,Y.jsx)(`span`,{className:`font-medium text-foreground`,title:L(e),children:L(e)}),`” out of Active tasks. You can restore it from Archived.`]})]}),(0,Y.jsxs)(dt,{children:[(0,Y.jsx)(mt,{children:`Cancel`}),(0,Y.jsx)(lt,{className:`bg-accent-strong text-accent-strong-foreground hover:brightness-[0.96]`,onClick:r,children:`Archive task`})]})]})})}function kt({run:e,className:t}){let[n,i]=(0,J.useState)(!1),a=Et(e.id),o=Dt(e);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(O,{type:`button`,variant:`outline`,"data-slot":`archive-action`,"aria-label":o,title:e.archived?`Put this task back in Active tasks`:`Move this task out of Active tasks`,disabled:a.isPending,className:r(`gap-[7px] px-3`,t),onClick:()=>e.archived?a.mutate(!1):i(!0),children:[e.archived?(0,Y.jsx)(vt,{"aria-hidden":`true`}):(0,Y.jsx)(De,{"aria-hidden":`true`}),(0,Y.jsx)(`span`,{children:o})]}),(0,Y.jsx)(Ot,{run:e,open:n,onOpenChange:i,onConfirm:()=>{a.mutate(!0),i(!1)}})]})}function At({run:e,action:t,prUrl:n,patch:r}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`text-sm [overflow-wrap:anywhere]`,children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:t.phase===`blocked`?`Completion blocked`:`Completion pending`}),` · `,t.message||(t.phase===`blocked`?`Completion needs attention.`:`Checking completion actions.`)]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n&&i(n)?(0,Y.jsx)(O,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,children:`Open PR`})}):null,e.autoMergePr?(0,Y.jsx)(O,{variant:`outline`,disabled:r.isPending,onClick:()=>r.mutate({autoMergePr:!1},{onError:e=>C(e.message,{tone:`danger`})}),children:r.isPending?`Saving…`:`Disable auto-merge`}):null]})]})}function jt({run:e,blocker:t,flags:n}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`text-sm [overflow-wrap:anywhere]`,children:[(0,Y.jsx)(`span`,{className:`font-medium`,children:`Archive blocked`}),` · `,t.message]}),(0,Y.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[t.runId?(0,Y.jsx)(O,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(I,{to:`/tasks/${t.runId}`,children:`Open blocking task`})}):null,t.pullRequestUrl&&i(t.pullRequestUrl)?(0,Y.jsx)(O,{variant:`outline`,asChild:!0,children:(0,Y.jsx)(`a`,{href:t.pullRequestUrl,target:`_blank`,rel:`noopener noreferrer`,children:`Open blocking PR`})}):null,n.archive?(0,Y.jsx)(kt,{run:e}):null]})]})}function Mt({run:e}){let t=f(e.id),n=B(e),r=e.status===`done`?e.completionAction:void 0,i=n.archive?e.archiveBlocker:void 0,a=r&&r.phase!==`complete`?r:void 0;if(!a&&!i)return null;let o=e.pullRequestUrl??e.pullRequests?.find(e=>e.url)?.url;return(0,Y.jsxs)(`section`,{"data-slot":`completion-status`,"aria-label":`Completion action`,className:`grid min-w-0 gap-2 rounded-lg border border-card-edge bg-card p-3 shadow-card [margin-block:0.75rem]`,children:[a?(0,Y.jsx)(At,{run:e,action:a,prUrl:o,patch:t}):null,i?(0,Y.jsx)(jt,{run:e,blocker:i,flags:n}):null]})}var Nt=[`running`,`queued`,`waiting`];function Pt(e,{queuePosition:t,now:n=new Date}){let r=ie(e),i=Qe(e,r).label,a=t===void 0?i:`${i} #${t}`,o=Nt.includes(e.status)?It(e,n):void 0;return o?{attention:r,label:a,nextCheck:o}:{attention:r,label:a}}function Ft(e){return e.nextCheck?`${e.label} · Next check ${e.nextCheck.text}`:e.label}function It(e,t){let n;for(let t of Array.isArray(e.waits)?e.waits:[]){if(t?.kind!==`timer`||t.phase!==`open`)continue;let e=new Date(t.deadline);Number.isFinite(e.getTime())&&(!n||e<n)&&(n=e)}if(n)return{at:n.toISOString(),text:Ye(n,t)}}async function X(e,t){try{await navigator.clipboard.writeText(e),C(t)}catch{C(`Run manually: ${e}`)}}function Lt(e){let t=p(),n=h(),r=(0,J.useMemo)(()=>fe(e,t),[e,t]);return{referenceProjectId:n,repoBase:t,references:r,requests:(0,J.useMemo)(()=>n===void 0?[]:r.filter(e=>ve(e,t)).map(e=>({projectId:n,kind:e.kind,number:e.number})),[r,n,t])}}function Z(e){return y({mutationFn:()=>re(e.id),onError:e=>{if(e instanceof x&&e.command){X(e.command,`No terminal found — command copied to clipboard.`);return}C(e.message,{tone:`danger`})}})}function Q(e,t){let n=l(),r=c(),i=v(),a=y({mutationFn:t=>le(e.id,t),onError:e=>C(e.message,{tone:`danger`})}),o=Xe(),s=qe(e),u=o.runnersOn(e=>t&&s.sessionId!==void 0&&e===s.backend?s.profileId??`default`:o.repoAccount?.[e]).runners,d=e=>!r.isSuccess||!i.isSuccess||u.includes(e??`claude`);return{canResumeHere:t&&d(et(e)),choices:e.worktreePath?(n.data?.targets??[]).filter(e=>{let t=Ae(e.id);return t===void 0||i.isSuccess&&d(t)}).map(t=>({target:t,...ft(e,t.id)?{suffix:` (resume)`,title:`Resume this run's session`}:{}})):[],open:a}}function Rt({run:e,canResume:t,onResume:n}){let{canResumeHere:r,choices:i,open:a}=Q(e,t),o=v().data,s=K(e);return!r&&i.length===0&&!s?null:(0,Y.jsxs)(Y.Fragment,{children:[r||i.length>0?(0,Y.jsxs)(`div`,{className:`task-open-targets flex flex-wrap gap-3`,children:[r?(0,Y.jsxs)(O,{variant:`outline`,"data-target":`terminal-resume`,onClick:n,children:[(0,Y.jsx)(Fe,{}),`Terminal (resume session)`]}):null,i.map(({target:e,suffix:t,title:n})=>{let r=je(e,o);return(0,Y.jsxs)(O,{variant:`outline`,"data-target":e.id,title:n,disabled:a.isPending,onClick:()=>a.mutate(e.id),children:[(0,Y.jsx)(r,{"aria-hidden":`true`}),e.label,t??``]},e.id)}),e.worktreePath?(0,Y.jsxs)(O,{variant:`outline`,onClick:()=>{let t=e.worktreePath;t&&navigator.clipboard.writeText(t).then(()=>C(`Worktree path copied`)).catch(()=>C(`Path: ${t}`))},children:[(0,Y.jsx)(E,{}),`Copy worktree path`]}):null]}):null,s?(0,Y.jsxs)(`div`,{"data-slot":`resume-command`,className:`mt-5 border-t border-border pt-5`,children:[(0,Y.jsx)(`h3`,{className:`text-base font-medium`,children:`Resume in a terminal`}),(0,Y.jsx)(`pre`,{className:`my-4 whitespace-pre-wrap break-all rounded-lg border border-border bg-background p-4 text-xs`,children:s}),(0,Y.jsxs)(O,{variant:`outline`,onClick:()=>void X(s,`Command copied to clipboard.`),children:[(0,Y.jsx)(E,{}),`Copy resume command`]})]}):null]})}function zt({run:e,canResume:t,onResume:n}){let{canResumeHere:r,choices:i,open:a}=Q(e,t),o=K(e),s=e.worktreePath;return!r&&i.length===0&&!o&&!s?null:(0,Y.jsxs)(`div`,{"data-slot":`workspace-tools`,className:`flex min-w-0 flex-wrap gap-2`,children:[r||i.length>0?(0,Y.jsx)(Me,{choices:i,onPick:e=>a.mutate(e),disabled:a.isPending,triggerVariant:`outline`,leading:r?(0,Y.jsxs)(A,{"data-target":`terminal-resume`,onSelect:n,children:[(0,Y.jsx)(Fe,{"aria-hidden":`true`}),`Terminal (resume session)`]}):void 0}):null,s?(0,Y.jsxs)(O,{variant:`outline`,size:`sm`,onClick:()=>void X(s,`Worktree path copied`),children:[(0,Y.jsx)(E,{"aria-hidden":`true`}),`Copy worktree path`]}):null,o?(0,Y.jsxs)(O,{variant:`outline`,size:`sm`,"data-slot":`resume-command`,title:o,onClick:()=>void X(o,`Command copied to clipboard.`),children:[(0,Y.jsx)(E,{"aria-hidden":`true`}),`Copy resume command`]}):null]})}function Bt({run:e,canResume:t,onResume:n,onOpen:r,onClose:i}){let{canResumeHere:a,choices:o}=Q(e,t);return!a&&o.length===0?null:r?(0,Y.jsx)(A,{onSelect:r,children:`Open in…`}):(0,Y.jsxs)(`section`,{"aria-label":`Open task worktree in…`,className:`task-action-panel my-5 rounded-xl border border-border bg-card p-6`,children:[(0,Y.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsx)(`h2`,{className:`text-lg font-medium`,children:`Open task worktree in…`}),(0,Y.jsx)(O,{variant:`ghost`,size:`icon`,"aria-label":`Close worktree chooser`,onClick:i,children:(0,Y.jsx)(Te,{})})]}),e.worktreePath?(0,Y.jsx)(`p`,{className:`my-4 break-all text-xs text-muted-foreground`,children:e.worktreePath}):null,(0,Y.jsx)(`div`,{className:`mt-4`,children:(0,Y.jsx)(Rt,{run:e,canResume:t,onResume:n})})]})}function Vt({branch:e}){let[t,n]=(0,J.useState)(null),r=(0,J.useRef)(null);(0,J.useEffect)(()=>()=>{r.current!==null&&clearTimeout(r.current)},[]);let i=t===e,a=async()=>{r.current!==null&&clearTimeout(r.current),n(null);try{if(!navigator.clipboard?.writeText)throw Error(`Clipboard unavailable`);await navigator.clipboard.writeText(e),n(e),r.current=setTimeout(()=>n(null),2e3)}catch{C(`Could not copy branch. Select and copy: ${e}`)}};return(0,Y.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-full items-center gap-1`,children:[(0,Y.jsx)(`span`,{"data-slot":`branch-chip`,className:`min-w-0 rounded-sm border border-border bg-card px-1.5 py-px font-mono text-xs font-medium break-all`,children:e}),(0,Y.jsxs)(`button`,{type:`button`,"aria-label":i?`Copied branch name`:`Copy branch name`,onClick:()=>void a(),className:`inline-flex min-h-11 shrink-0 items-center gap-1 rounded-sm px-2 text-xs font-medium text-foreground hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-link-foreground md:min-h-8`,children:[(0,Y.jsx)(E,{className:`size-3.5`,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{"aria-live":`polite`,children:i?`Copied`:`Copy`})]})]})}function Ht({run:e}){let t=p(),n=h(),r=r=>n===void 0?void 0:ye(n,e.id,r,t),a=(0,J.useMemo)(()=>fe(e,t),[e,t]),o=[],s=[],c=a.filter(e=>e.kind===`PR`);for(let t of c)o.push((0,Y.jsx)(T,{reference:t,to:r(t),taskTitle:L(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`,conflictAction:(0,Y.jsx)(nt,{run:e,prNumber:t.number})},me(t)));let l=ue(e);l&&i(l)&&!c.some(e=>e.url===l)&&o.push((0,Y.jsx)(T,{reference:{kind:`PR`,url:l},taskTitle:L(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},`pr`));let u=a.filter(e=>e.kind===`Issue`);for(let t of u)s.push((0,Y.jsx)(T,{reference:t,to:r(t),taskTitle:L(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},me(t)));let d=pe(e,t);if(d&&i(d)&&!u.some(e=>e.url===d)){let t=ge(d);s.push((0,Y.jsx)(T,{reference:{kind:`Issue`,...t?{number:Number(t)}:{},url:d},to:t?r({kind:`Issue`,number:Number(t),url:d}):void 0,taskTitle:L(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},`issue`))}return o.length===0&&s.length===0?null:(0,Y.jsx)(`div`,{"data-slot":`linked-references`,className:`flex min-w-0 flex-col gap-3`,children:[[`PR`,`PRs`,o],[`Issue`,`Issues`,s]].map(([e,t,n])=>n.length>0?(0,Y.jsxs)(`div`,{"data-reference-kind":e,className:`grid min-w-0 grid-cols-[5rem_minmax(0,1fr)] items-center gap-x-2 gap-y-1`,children:[(0,Y.jsx)(`span`,{className:`font-medium text-foreground`,children:t}),(0,Y.jsx)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:n})]},e):null)})}function Ut(){let e=Ke(),t=b();return pt(t.data?.projects?.find(n=>n.id===(e??t.data?.bootProject)))}var Wt=e=>e.map(e=>`${e.name}: ${z(e.url)}`).join(`
|
|
2
|
-
`);function Gt(e){return Ut().length>0||e.notify===!0}function $({run:e}){let t=Ut(),n=t.length>0,r=o(e.id),[i,a]=(0,J.useState)(null),s=e.notify===!0;return!n&&!s?null:(0,Y.jsxs)(Y.Fragment,{children:[s?(0,Y.jsxs)(F,{children:[(0,Y.jsx)(N,{asChild:!0,children:(0,Y.jsxs)(O,{variant:`outline`,"data-slot":`notifying-chip`,className:`gap-1.5`,"aria-label":n?`Notifying ${V(t)} — webhook actions`:`Notifying — webhook actions`,title:n?Wt(t):void 0,children:[(0,Y.jsx)(R,{tone:`success`}),(0,Y.jsx)(`span`,{children:`Notifying`}),(0,Y.jsx)(Oe,{"aria-hidden":`true`,className:`size-3.5`})]})}),(0,Y.jsxs)(P,{align:`end`,"data-slot":`notifying-menu`,className:`w-[240px] max-w-[calc(100vw-2rem)] p-2`,children:[n?(0,Y.jsx)(k,{"data-slot":`notifying-targets`,className:`flex flex-col gap-0.5 px-2 py-1.5 text-xs font-normal text-muted-foreground`,children:t.map(e=>(0,Y.jsx)(`span`,{"data-webhook-target":e.id,className:`truncate`,title:z(e.url),children:e.name},e.id))}):null,n?(0,Y.jsxs)(A,{className:`min-h-11`,onSelect:()=>a(`note`),children:[(0,Y.jsx)(Pe,{"aria-hidden":`true`}),` Send a note…`]}):null,(0,Y.jsxs)(A,{variant:`destructive`,className:`min-h-11`,disabled:r.isPending,onSelect:()=>r.mutate({notify:!1},{onSuccess:()=>C(`Stopped notifying the webhook`),onError:e=>C(`Could not stop notifying. ${e.message}`,{tone:`danger`})}),children:[(0,Y.jsx)(St,{"aria-hidden":`true`}),` Stop notifying`]})]})]}):(0,Y.jsxs)(O,{variant:`outline`,"data-action":`handoff`,className:`max-md:px-0`,"aria-label":`Hand off to webhook`,onClick:()=>a(`handoff`),children:[(0,Y.jsx)(rt,{"aria-hidden":`true`}),(0,Y.jsx)(`span`,{className:`max-md:sr-only`,children:`Hand off`})]}),n?(0,Y.jsx)(Kt,{mode:i,targets:t,pending:r.isPending,onOpenChange:e=>!e&&a(null),onSubmit:e=>r.mutate({notify:!0,...e?{message:e}:{}},{onSuccess:()=>{a(null),C(i===`note`?`Note sent to the webhook`:`Handed off to the webhook`)},onError:e=>C(`Could not hand off. ${e.message}`,{tone:`danger`})})}):null]})}function Kt({mode:e,targets:t,pending:n,onOpenChange:r,onSubmit:i}){let a=(0,J.useId)(),o=(0,J.useId)(),[s,c]=(0,J.useState)(``);(0,J.useEffect)(()=>{e!==null&&c(``)},[e]);let l=e===`note`,u=V(t);return(0,Y.jsx)(We,{open:e!==null,onOpenChange:e=>{e||c(``),r(e)},children:(0,Y.jsx)(He,{"data-slot":`handoff-dialog`,className:`max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:max-w-none max-sm:translate-x-0 max-sm:translate-y-0 max-sm:rounded-b-none max-sm:rounded-t-xl max-sm:border-x-0 max-sm:border-b-0 max-sm:pb-[max(1.5rem,env(safe-area-inset-bottom))] max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=open]:zoom-in-100 max-sm:data-[state=closed]:slide-out-to-bottom max-sm:data-[state=closed]:zoom-out-100`,children:(0,Y.jsxs)(`form`,{className:`grid gap-4`,onSubmit:e=>{e.preventDefault(),i(s.trim())},children:[(0,Y.jsxs)(Ve,{className:`text-left`,children:[(0,Y.jsx)(Ue,{children:l?`Send a note to ${t.length===1?`the webhook`:`the webhooks`}`:`Hand off to webhook`}),(0,Y.jsx)(Be,{children:(0,Y.jsx)(`span`,{"data-webhook-destination":``,title:Wt(t),children:l?`${u} ${t.length===1?`gets`:`get`} this note with the task's current status.`:`${u} will start receiving this task's status updates. Add a note (optional).`})})]}),(0,Y.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,Y.jsx)(`label`,{htmlFor:a,className:`text-[13px] font-medium`,children:`Note`}),(0,Y.jsx)(yt,{id:a,"data-slot":`handoff-note`,"aria-describedby":o,rows:4,maxLength:1e5,className:`min-h-24`,placeholder:`e.g. Take over from here, ping me when the PR is green`,value:s,onChange:e=>c(e.target.value)}),(0,Y.jsxs)(`p`,{id:o,className:`flex items-center gap-1.5 text-[12px] text-muted-foreground`,children:[(0,Y.jsx)(Ne,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),`The note goes to the webhook only, not to the agent.`]})]}),(0,Y.jsxs)(ze,{className:`gap-2 max-sm:flex-col-reverse max-sm:[&>button]:w-full`,children:[(0,Y.jsx)(O,{type:`button`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,Y.jsxs)(O,{type:`submit`,variant:`contrast`,"data-action":`handoff-submit`,disabled:n||l&&s.trim()===``,children:[(0,Y.jsx)(rt,{"aria-hidden":`true`}),l?`Send note`:`Hand off`]})]})]})})})}function qt({id:e}){return(0,Y.jsxs)(I,{to:`/tasks/${e}`,"aria-label":`Parent task ${e}`,"data-slot":`mobile-parent-task-link`,className:`inline-flex shrink-0 items-center justify-center gap-1 rounded-sm px-2 text-[13px] text-muted-foreground [min-block-size:2.75rem] [min-inline-size:2.75rem] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring active:bg-muted active:text-foreground`,children:[(0,Y.jsx)(Ce,{"aria-hidden":!0,className:`shrink-0 [block-size:1.2cap] [inline-size:auto]`}),`Parent`]})}function Jt({id:e}){let t=s(e),n=t.data?L(t.data):e;return(0,Y.jsxs)(`div`,{"data-slot":`parent-task`,className:`flex min-w-0 flex-wrap items-center gap-x-2 text-[13px] text-muted-foreground`,children:[(0,Y.jsxs)(I,{to:`/tasks/${e}`,"aria-label":`Parent task ${e}`,title:`Parent · ${n}`,"data-slot":`parent-task-link`,className:`flex min-h-11 min-w-0 max-w-full items-center gap-2 rounded-sm text-muted-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring active:text-foreground`,children:[(0,Y.jsx)(Ce,{"aria-hidden":!0,className:`h-[1.2cap] w-auto shrink-0`}),(0,Y.jsx)(`span`,{className:`shrink-0`,children:`Parent`}),(0,Y.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,Y.jsx)(`span`,{className:`min-w-0 overflow-clip text-ellipsis whitespace-nowrap`,children:n})]}),t.isError?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{children:`Parent record unavailable or deleted`}),(0,Y.jsx)(O,{variant:`outline`,onClick:()=>void t.refetch(),children:`Retry parent task`})]}):null]})}var Yt=3,Xt=(e,t)=>e.kind===t.kind&&e.number===t.number;function Zt(e,t,n=Yt){let r=t?e.findIndex(e=>Xt(e,t)):-1;if(e.length<=n||r<n)return{inline:e.slice(0,n),overflow:e.slice(n)};let i=[...e.slice(0,n-1),e[r]];return{inline:i,overflow:e.filter(e=>!i.includes(e))}}var Qt=(e,t)=>`/tasks/${e}/${t.kind}/${t.number}`;function $t({tab:e}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(e.kind===`pr`?be:we,{"aria-hidden":`true`,className:`mr-1 size-3.5 shrink-0`}),(0,Y.jsx)(`span`,{className:`sr-only`,children:e.kind===`pr`?`Pull request`:`Issue`}),` #`,e.number,(0,Y.jsx)(_e,{kind:e.kind===`pr`?`PR`:`Issue`,number:e.number,className:`ml-1`})]})}function en(e,t){let n=e[0],r=e.length+ +!!t;return n?`Preview :${n.port}${r>1?` +${r-1}`:``}`:t?`Preview · agent`:`Preview`}function tn({servers:e}){let t=ot();if(t===null)return null;let n=t.agentLive===!0,r=e[0],i=e.length+ +!!n===1?r?{port:r.port}:{agent:!0}:{};return(0,Y.jsxs)(O,{variant:`outline`,"data-slot":`preview-toggle`,"aria-pressed":t.open,onClick:()=>t.openPane(i),children:[(0,Y.jsx)(ke,{"aria-hidden":`true`}),en(e,n),t.live?(0,Y.jsx)(R,{tone:`success`,"aria-label":`Preview is live`}):null]})}function nn({tab:e}){let t=$e();return!t?.available||e!==`session`&&e!==`changes`?null:(0,Y.jsxs)(O,{variant:`outline`,"data-slot":`split-view-toggle`,className:r(t.showing&&`border-accent-text/40 bg-muted text-accent-text`),"aria-pressed":t.showing,title:t.showing?`Show Session alone`:`Show Changes beside Session`,onClick:()=>t.setOn(!t.showing),children:[(0,Y.jsx)(wt,{"aria-hidden":`true`}),`Split view`]})}function rn(e){return e?.role===`worker`?`Worker session`:e?.role===`root`?`Parent session`:`Task session`}function an({run:e,compact:t=!1}){if(e.delegation?.role!==`worker`)return null;let n=e.delegation.supervisorRunId??e.delegation.parentRunId;return t?(0,Y.jsx)(qt,{id:n}):(0,Y.jsx)(Jt,{id:n})}function on({isDesktop:e,desktopActivitySlot:t,attention:n,statusLine:r}){return e&&t?(0,Y.jsx)(Y.Fragment,{children:t}):(0,Y.jsx)(`span`,{"data-slot":`run-status-slot`,className:`hidden`,children:(0,Y.jsx)(G,{dot:n.tone,shape:n.shape,pulse:n.pulse,children:Ft(r)})})}function sn(e,t,n){return n&&!e.archiveBlocker&&t.archive?(0,Y.jsx)(kt,{run:e}):null}function cn({archived:e,className:t}){return e?(0,Y.jsx)(G,{"data-slot":`run-archived-pill`,dot:W.tone,shape:W.shape,className:t,children:W.label}):null}function ln({run:e}){return e.archived&&e.autoArchive?.reason===`pull-requests-merged`&&e.autoArchive.archivedAt===e.archivedAt?(0,Y.jsx)(`p`,{"data-slot":`auto-archive-reason`,className:`text-[13px] text-muted-foreground`,children:`Archived automatically after all associated PRs merged.`}):null}function un({shown:e,run:t,previewToggle:n}){let r=Gt(t);return e&&(n||r)?(0,Y.jsxs)(`div`,{"data-slot":`run-mobile-actions`,className:`flex flex-wrap items-center gap-2 pt-2`,children:[n,(0,Y.jsx)($,{run:t})]}):null}function dn({isDesktop:e,phoneBar:t,run:n,previewToggle:i,mobileActivitySlot:a}){let o=Gt(n);if(e||!a)return null;let s=t&&(!!i||o);return(0,Y.jsxs)(`div`,{"data-slot":s?`run-mobile-actions`:void 0,"data-mobile-session-bar":t||void 0,className:r(`flex flex-wrap items-center gap-2 md:hidden`,t&&`border-t border-border py-1`),children:[a,s?(0,Y.jsxs)(`span`,{className:`ms-auto flex shrink-0 flex-wrap items-center gap-2`,children:[i,(0,Y.jsx)($,{run:n})]}):null]})}function fn({run:e,tab:t,activeItem:n,inlineItemTabs:i,overflowItemTabs:a,phoneBar:o,isDesktop:s}){let c=(0,J.useRef)(null),[l,u]=(0,J.useState)(!1);(0,J.useEffect)(()=>{let e=c.current;if(!e||s){u(!1);return}let t=()=>u(e.scrollWidth-e.clientWidth-e.scrollLeft>1),n=new ResizeObserver(t);n.observe(e);for(let t of e.children)n.observe(t);return e.addEventListener(`scroll`,t,{passive:!0}),t(),()=>{n.disconnect(),e.removeEventListener(`scroll`,t)}},[s,i,a,e.diffStat?.files]);let d=n?`${n.kind}#${n.number}`:null;return(0,J.useEffect)(()=>{!d||s||c.current?.querySelector(`[aria-current="page"]`)?.scrollIntoView?.({block:`nearest`,inline:`nearest`})},[d,i.map(e=>`${e.kind}#${e.number}`).join(`,`),s]),(0,Y.jsxs)(`div`,{ref:c,"data-slot":`run-tabs`,"data-phone-bar":o||void 0,"data-overflow-end":l||void 0,className:r(`flex flex-wrap items-end gap-1 border-b border-border md:mt-5 max-md:flex-nowrap max-md:overflow-x-auto max-md:border-b-0 max-md:shadow-[inset_0_-1px_0_var(--border)] max-md:gap-0 max-md:[&>*]:mb-0 max-md:[&>*]:shrink-0 max-md:[&>a]:min-h-11 max-md:[&>a]:px-2 max-md:[&>a]:text-[13.5px]`,o?`mt-0`:`mt-3`),children:[(0,Y.jsx)(q,{to:`/tasks/${e.id}`,active:t===`session`,replace:o,children:`Session`}),(0,Y.jsx)(q,{to:`/tasks/${e.id}/changes`,active:t===`changes`,replace:o,count:e.diffStat&&e.diffStat.files>0?e.diffStat.files:void 0,children:`Changes`}),(0,Y.jsx)(q,{to:`/tasks/${e.id}/commits`,active:t===`commits`,replace:o,children:`Commits`}),(0,Y.jsx)(q,{to:`/tasks/${e.id}/files`,active:t===`files`,replace:o,children:`Files`}),i.map(t=>(0,Y.jsx)(q,{to:Qt(e.id,t),active:n!==null&&Xt(t,n),replace:o,children:(0,Y.jsx)($t,{tab:t})},`${t.kind}-${t.number}`)),a.length>0?(0,Y.jsxs)(F,{children:[(0,Y.jsxs)(N,{"data-slot":`run-tabs-more`,"aria-label":`${a.length} more linked items`,className:`-mb-px flex h-8 items-center rounded-t-md border-b-2 border-transparent px-3 text-[13px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-link-foreground max-md:min-h-11 max-md:px-3.5 max-md:text-[13.5px]`,children:[`+`,a.length]}),(0,Y.jsx)(P,{align:`end`,children:a.map(t=>(0,Y.jsx)(A,{asChild:!0,children:(0,Y.jsx)(I,{to:Qt(e.id,t),replace:o,children:(0,Y.jsx)($t,{tab:t})})},`${t.kind}-${t.number}`))})]}):null]})}function pn({run:e,tab:t=`session`,onMarkedUnread:n,desktopActivitySlot:i,mobileActivitySlot:a}){let o=ie(e),s=B(e),[c,l]=(0,J.useState)(!1),[u,d]=(0,J.useState)(!1),f=mn(e,n),p=te(),ee=ne(),m=Pt(e,{queuePosition:e.status===`queued`?Je(p.data??[]).get(e.id):void 0}),h=_t(),g=it(),_=h!==null&&!g?h:null,v=_!==null,{referenceProjectId:y,repoBase:b,requests:re}=Lt(e),x=(0,J.useMemo)(()=>de(e,b),[e,b]),S=typeof t==`object`?t:null,{inline:ae,overflow:oe}=Zt(x,S),se=ee.data?.capabilities?.preview===!0,C=e.worktreePath&&se?(0,Y.jsx)(tn,{servers:e.previewServers??[]}):null,w=(0,Y.jsx)(vn,{run:e,actions:f,onOpenChooser:()=>d(!0),onToggleNotes:()=>l(e=>!e)}),ce=sn(e,s,g);return(0,Y.jsx)(he,{projectId:y,repoBase:b,requests:re,children:(0,Y.jsxs)(`header`,{"data-slot":`run-header`,"data-sticky":t===`session`||void 0,className:r(`relative z-20 shrink-0 bg-background px-4 md:px-9 md:pt-7`,v?`pt-0`:`pt-[18px]`,t===`session`&&`border-b border-border`),children:[(0,Y.jsx)(ln,{run:e}),(0,Y.jsx)(Mt,{run:e}),(0,Y.jsxs)(`div`,{className:`w-full`,children:[(0,Y.jsx)(an,{run:e}),_?(0,Y.jsxs)(Ze,{slot:_,children:[(0,Y.jsx)(_n,{run:e,status:(0,Y.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,Y.jsx)(G,{"data-slot":`mobile-run-status`,dot:o.tone,shape:o.shape,pulse:o.pulse,className:`max-w-full self-start truncate px-2 py-px text-xs leading-4`,children:m.label}),(0,Y.jsx)(cn,{archived:e.archived,className:`px-2 py-px text-xs leading-4`})]})}),(0,Y.jsx)(an,{run:e,compact:!0}),w]}):(0,Y.jsxs)(`div`,{"data-slot":`run-title-row`,className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 md:flex-nowrap`,children:[(0,Y.jsx)(`p`,{"data-slot":`session-kind`,className:`text-[12px] font-semibold tracking-[0.14em] text-muted-foreground uppercase md:hidden`,children:rn(e.delegation)}),(0,Y.jsx)(gn,{run:e}),(0,Y.jsx)(on,{isDesktop:g,desktopActivitySlot:i,attention:o,statusLine:m}),(0,Y.jsx)(cn,{archived:e.archived,className:`max-md:hidden`}),(0,Y.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-1 md:gap-2.5`,children:[ce,(0,Y.jsx)(nn,{tab:t}),C,(0,Y.jsx)($,{run:e}),w]})]}),(0,Y.jsx)(un,{shown:_!==null&&!a,run:e,previewToggle:C}),(0,Y.jsx)(fn,{run:e,tab:t,activeItem:S,inlineItemTabs:ae,overflowItemTabs:oe,phoneBar:v,isDesktop:g}),(0,Y.jsx)(dn,{isDesktop:g,phoneBar:v,run:e,previewToggle:C,mobileActivitySlot:a}),c?(0,Y.jsx)(xn,{runId:e.id,onClose:()=>l(!1)}):null,u?(0,Y.jsx)(Bt,{run:e,canResume:B(e).terminal,onResume:()=>f.terminal.mutate(),onClose:()=>d(!1)}):null]}),(0,Y.jsx)(bn,{run:e,actions:f})]})})}function mn(e,t){let n=ce(),r=Ge(),[i,o]=(0,J.useState)(null),s=()=>n.invalidateQueries({queryKey:u.runs.all}),c=e=>C(e.message,{tone:`danger`}),l=a(),f={isPending:l.isPending,mutate:()=>l.mutate({id:e.id,pinned:!e.pinned})},p=d();return{pin:f,markUnread:{isPending:p.isPending,mutate:()=>{t?.(),p.mutate(e.id,{onError:c})}},delete:y({mutationFn:()=>oe(e.id),onSuccess:()=>{s(),r(`/`)},onError:c}),terminal:Z(e),confirming:i,setConfirming:o}}function hn(e){let t=f(e.id),n=L(e);return{title:n,editor:ut(n,e=>t.mutate({title:e},{onError:e=>C(e.message,{tone:`danger`})}))}}function gn({run:e}){let{title:t,editor:n}=hn(e);return n.editing?(0,Y.jsx)(H,{editor:n,className:`flex-1 text-[16px] font-semibold`}):(0,Y.jsxs)(`span`,{className:`group flex min-w-0 items-center gap-1`,children:[(0,Y.jsx)(`h1`,{className:`line-clamp-2 min-w-0 break-words text-2xl font-semibold tracking-tight`,title:e.task,children:t}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":`Rename task`,onClick:n.begin,className:`shrink-0 rounded-sm p-1 text-soft-foreground opacity-0 transition-opacity group-hover:opacity-100 hover:bg-muted hover:text-foreground focus-visible:opacity-100 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Y.jsx)(at,{className:`size-3.5`,"aria-hidden":`true`})})]})}function _n({run:e,status:t}){let{title:n,editor:r}=hn(e);return(0,Y.jsxs)(Re,{open:r.editing,onOpenChange:e=>{e?r.begin():r.commit()},children:[(0,Y.jsxs)(`div`,{"data-slot":`mobile-run-title`,className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,Y.jsx)(`h1`,{className:`line-clamp-2 break-words text-[15px] leading-[18px] font-semibold text-foreground`,title:e.task,children:n}),t]}),(0,Y.jsx)(Ie,{asChild:!0,children:(0,Y.jsx)(`button`,{type:`button`,"aria-label":`Rename task`,className:`flex size-11 shrink-0 items-center justify-center rounded-sm text-soft-foreground hover:bg-muted hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none`,children:(0,Y.jsx)(at,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,Y.jsx)(Le,{align:`end`,className:`w-64 max-w-[calc(100vw-16px)] p-2`,onEscapeKeyDown:e=>{e.preventDefault(),r.cancel()},children:(0,Y.jsx)(H,{editor:r,className:`text-[16px] font-semibold`})})]})}function vn({run:e,actions:t,onToggleNotes:n,onOpenChooser:r}){let i=B(e),a=K(e),o=it(),s=Et(e.id),[c,l]=(0,J.useState)(!1),u=f(e.id),d=(0,J.useId)();return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Ot,{run:e,open:c,onOpenChange:l,onConfirm:()=>{s.mutate(!0),l(!1)}}),(0,Y.jsxs)(F,{children:[(0,Y.jsx)(N,{asChild:!0,children:(0,Y.jsx)(O,{variant:`ghost`,size:`icon`,"aria-label":`Run actions`,children:(0,Y.jsx)(xe,{"aria-hidden":`true`})})}),(0,Y.jsxs)(P,{align:`end`,"data-slot":`run-actions-menu`,className:`w-[270px] max-w-[calc(100vw-2rem)] p-3`,children:[(0,Y.jsx)(k,{className:`px-2 py-3 text-[12px] font-normal text-muted-foreground`,children:`TASK ACTIONS`}),!o&&i.archive&&!e.archiveBlocker?(0,Y.jsx)(A,{disabled:s.isPending,onSelect:()=>e.archived?s.mutate(!1):l(!0),children:Dt(e)}):null,(0,Y.jsxs)(A,{onSelect:n,children:[(0,Y.jsx)(st,{"aria-hidden":`true`}),` Notes / handoff`]}),(0,Y.jsx)(Bt,{run:e,canResume:i.terminal,onResume:()=>t.terminal.mutate(),onOpen:r}),a?(0,Y.jsxs)(A,{onSelect:()=>void X(a,`Command copied to clipboard.`),children:[(0,Y.jsx)(E,{"aria-hidden":`true`}),` Copy resume command`]}):null,i.markUnread?(0,Y.jsxs)(A,{disabled:t.markUnread.isPending,onSelect:()=>t.markUnread.mutate(),children:[(0,Y.jsx)(Ct,{"aria-hidden":`true`}),` Mark unread`]}):null,i.pin?(0,Y.jsxs)(M,{"data-slot":`pin-run`,className:`min-h-11`,checked:!!e.pinned,disabled:t.pin.isPending,onCheckedChange:()=>t.pin.mutate(),children:[e.pinned?(0,Y.jsx)(Tt,{"aria-hidden":`true`}):(0,Y.jsx)(Se,{"aria-hidden":`true`}),e.pinned?`Unpin task`:`Pin task`]}):null,(0,Y.jsx)(j,{}),(0,Y.jsx)(k,{className:`text-xs text-muted-foreground`,children:`AFTER DONE`}),(0,Y.jsx)(M,{"data-slot":`archive-when-done`,className:`min-h-11`,checked:e.archiveWhenDone===!0,disabled:u.isPending,onCheckedChange:e=>u.mutate({archiveWhenDone:e},{onError:e=>C(e.message,{tone:`danger`})}),children:`Archive when Done`}),(0,Y.jsx)(M,{"data-slot":`auto-merge-pr`,className:`min-h-11`,checked:e.autoMergePr===!0,disabled:u.isPending,"aria-describedby":d,onCheckedChange:e=>u.mutate({autoMergePr:e},{onError:e=>C(e.message,{tone:`danger`})}),children:`Auto-merge PR`}),(0,Y.jsx)(`p`,{id:d,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block:0.5rem]`,children:`After Done, auto-merge can mark a draft PR ready. It waits for current-head CI and GitHub rules. Merge comes before archive.`}),e.delegation?.role===`worker`?null:(0,Y.jsx)(yn,{run:e,patch:u}),i.deleteRun?(0,Y.jsx)(j,{}):null,i.deleteRun?(0,Y.jsxs)(A,{variant:`destructive`,onSelect:()=>t.setConfirming(`delete`),children:[(0,Y.jsx)(Ee,{"aria-hidden":`true`}),` Delete task…`]}):null]})]})]})}function yn({run:e,patch:t}){let n=(0,J.useId)(),r=(0,J.useId)(),i=(0,J.useId)(),a=e=>C(e.message,{tone:`danger`});return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(j,{}),(0,Y.jsx)(k,{className:`text-xs text-muted-foreground`,children:`TASK ACCESS`}),(0,Y.jsx)(M,{"data-slot":`allow-workers`,className:`min-h-11`,checked:ae(e),disabled:t.isPending,"aria-describedby":`${n} ${i}`,onCheckedChange:e=>t.mutate({allowWorkers:e},{onError:a}),children:`Allow Squawk workers`}),(0,Y.jsx)(`p`,{id:n,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block-end:0.5rem]`,children:`Agents in this task can start Squawk workers. Each worker is a separate paid agent session. Worker limits cap resources, not spending.`}),(0,Y.jsx)(M,{"data-slot":`allow-messaging`,className:`min-h-11`,checked:se(e),disabled:t.isPending,"aria-describedby":`${r} ${i}`,onCheckedChange:e=>t.mutate({allowMessaging:e},{onError:a}),children:`Allow task messaging`}),(0,Y.jsx)(`p`,{id:r,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block-end:0.5rem]`,children:`Agents in this task can message other tasks in this project.`}),(0,Y.jsx)(`p`,{id:i,"data-slot":`task-access-session-note`,className:`text-xs text-muted-foreground [padding-inline:0.5rem] [padding-block-end:0.5rem]`,children:`Turning one off applies at once. Turning one on reaches a running agent at its next session.`})]})}function bn({run:e,actions:t}){let n=t.confirming;return(0,Y.jsx)(gt,{open:n!==null,onOpenChange:e=>!e&&t.setConfirming(null),children:(0,Y.jsxs)(ct,{"data-slot":`task-confirmation`,className:`sm:max-w-[660px]`,children:[(0,Y.jsxs)(ht,{children:[(0,Y.jsx)(tt,{className:`text-danger`,children:`Delete task permanently?`}),(0,Y.jsx)(U,{children:(0,Y.jsxs)(Y.Fragment,{children:[`Delete “`,(0,Y.jsx)(`span`,{className:`font-medium text-foreground`,title:L(e),children:L(e)}),`” and its transcript`,e.delegation?.role===`worker`&&!S(e.delegation.workspace)?``:`, worktree and branch`,`. This cannot be undone.`]})})]}),(0,Y.jsxs)(dt,{children:[(0,Y.jsx)(mt,{children:`Cancel`}),(0,Y.jsx)(lt,{className:`bg-danger text-danger-foreground hover:brightness-[0.96]`,onClick:()=>{t.delete.mutate(),t.setConfirming(null)},children:`Delete task`})]})]})})}function xn({runId:e,onClose:t}){let n=g(e);return(0,Y.jsxs)(`div`,{"data-slot":`notes-panel`,className:`my-5 flex max-h-[min(45dvh,420px)] flex-col overflow-hidden rounded-xl border border-border bg-card p-6`,children:[(0,Y.jsxs)(`div`,{className:`mb-4 flex shrink-0 items-center justify-between gap-3`,children:[(0,Y.jsx)(`h2`,{className:`text-lg font-medium`,children:`Notes / handoff`}),(0,Y.jsx)(O,{variant:`ghost`,size:`icon`,"aria-label":`Close notes`,onClick:t,children:(0,Y.jsx)(Te,{})})]}),(0,Y.jsx)(`div`,{"data-slot":`notes-panel-body`,className:`min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:n.isPending?(0,Y.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`Loading notes…`}):n.isError?(0,Y.jsx)(`p`,{className:`text-xs text-danger`,children:n.error.message}):n.data.trim().length>0?(0,Y.jsx)(xt,{runId:e,children:(0,Y.jsx)(bt,{children:n.data})}):(0,Y.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`No notes yet — the handoff file is seeded when the task starts.`})}),(0,Y.jsxs)(`div`,{className:`mt-4 flex shrink-0 gap-3`,children:[(0,Y.jsx)(O,{variant:`outline`,disabled:!n.data?.trim(),onClick:()=>void X(n.data??``,`Notes copied`),children:`Copy notes`}),(0,Y.jsx)(O,{variant:`outline`,onClick:t,children:`Close`})]})]})}export{Z as a,zt as i,Vt as n,Lt as o,Ht as r,Pt as s,pn as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Ft as r,Ot as i,Pt as a,ht as o,jt as s,xt as c}from"./queries-CchoEEzj.js";import{An as l,Dn as u,En as d,Tn as f,jn as p,n as m}from"./toaster-zMN8cNZQ.js";import{n as h,p as g,r as _}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{d as v,u as y}from"./design-icons-QbNMZniQ.js";import{t as b}from"./plus-CxRU2X8C.js";import{t as x}from"./button-B22ANdCY.js";import{n as ee,r as S,t as te}from"./collapsible-Bx2vViFx.js";import{t as C}from"./switch-CAKeV99j.js";import{t as w}from"./badge-DVxxThpb.js";import{n as T,s as E,t as D}from"./project-router-j0uBi7Ep.js";import"./attention-DnxGjw_R.js";import{o as O,u as ne}from"./page-shell-BgabWJ3w.js";import{En as re,J as ie,St as k,bt as ae,rr as oe,sr as A,xt as j}from"./index-UFO7Bk2I.js";import{t as se}from"./textarea-vEsJAUAV.js";import{n as ce}from"./save-cue-CpHgT93o.js";import{n as M}from"./settings-field-Bhh8I9fJ.js";import{t as le}from"./project-location-BpBbcl3v.js";import{n as N,r as ue,t as P}from"./settings-save-bar-Mrc6Vm7P.js";import{n as de,t as fe}from"./saved-draft-BwzBc-_Y.js";import{t as pe}from"./archive-on-merge-field-DuRmMR6k.js";import{a as me,i as he,n as F,t as I}from"./projects-section-CX1WJq4d.js";var L=e(t(),1),R={"needs-you":{label:`Needs you`,hint:`Asks a question, asks for permission, or waits for review`},failed:{label:`Failed`,hint:`Failed, with no scheduled resume`},done:{label:`Done`,hint:`Finished`},cancelled:{label:`Cancelled`,hint:`Was cancelled`},running:{label:`Running`,hint:`Runs an agent turn`},"waiting-workers":{label:`Waiting for agents`,hint:`Waits on its workers or their replies`},"waiting-ci":{label:`Waiting on CI`,hint:`Waits on a pull request's checks`},"waiting-timer":{label:`Waiting`,hint:`Waits on a timer`},"waiting-other":{label:`Any other wait`,hint:`Waits on anything else, including wait types added later`}},z=(e,t)=>e.length===t.length&&e.every(e=>t.includes(e)),B={name:``,description:``,url:``,token:``,tasks:!0,triggers:l,agent:!1};function V(e){return{name:e.name,description:e.description??``,url:e.url,token:``,tasks:e.tasks,triggers:e.triggers??l,agent:e.agent}}var H=e=>p.filter(t=>e.includes(t));function ge(e){let t=e.description.trim();return{name:e.name.trim(),url:e.url.trim(),...t?{description:t}:{},...e.token?{token:e.token}:{},tasks:e.tasks,...z(e.triggers,l)?{}:{triggers:H(e.triggers)},agent:e.agent}}function _e(e){return e.name.trim()!==``||e.description.trim()!==``||e.url.trim()!==``||e.token!==``||e.tasks!==B.tasks||e.agent!==B.agent||!z(e.triggers,B.triggers)}function ve(e,t){let n={},r=e.name.trim(),i=e.description.trim(),a=e.url.trim();return r!==t.name&&(n.name=r),i!==(t.description??``)&&(n.description=i),a!==t.url&&(n.url=a),e.token&&(n.token=e.token),e.tasks!==t.tasks&&(n.tasks=e.tasks),z(e.triggers,t.triggers??l)||(n.triggers=H(e.triggers)),e.agent!==t.agent&&(n.agent=e.agent),n}var U=n(),W=`flex flex-col gap-1 text-[13px]`,G=`text-xs text-muted-foreground`;function K({draft:e,onChange:t,tokenSet:n}){let r=(0,L.useId)(),i=(0,L.useId)(),a=(0,L.useId)(),o=(0,L.useId)(),s=(0,L.useId)(),c=(0,L.useId)(),l=(0,L.useId)(),m=(0,L.useId)(),h=(0,L.useId)(),g=(0,L.useId)();return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))] gap-3`,children:[(0,U.jsxs)(`div`,{className:W,children:[(0,U.jsx)(`label`,{htmlFor:r,className:G,children:`Name`}),(0,U.jsx)(A,{id:r,"data-slot":`webhook-name`,autoComplete:`off`,maxLength:80,placeholder:`e.g. Team bot`,value:e.name,onChange:e=>t({name:e.target.value})})]}),(0,U.jsxs)(`div`,{className:W,children:[(0,U.jsx)(`label`,{htmlFor:o,className:G,children:`URL`}),(0,U.jsx)(A,{id:o,"data-slot":`webhook-url`,type:`url`,inputMode:`url`,autoComplete:`off`,spellCheck:!1,maxLength:u,placeholder:`https://bot.example/hooks/cez`,value:e.url,onChange:e=>t({url:e.target.value})})]})]}),(0,U.jsxs)(`div`,{className:W,children:[(0,U.jsx)(`label`,{htmlFor:i,className:G,children:`Description`}),(0,U.jsx)(se,{id:i,"data-slot":`webhook-description`,"aria-describedby":a,rows:2,maxLength:f,placeholder:`e.g. Posts to the #releases channel. Use it for release notes.`,value:e.description,onChange:e=>t({description:e.target.value})}),(0,U.jsx)(`span`,{id:a,className:`text-xs text-soft-foreground`,children:`Agents read the name and description to decide when to use this webhook.`})]}),(0,U.jsxs)(`div`,{className:W,children:[(0,U.jsx)(`label`,{htmlFor:s,className:G,children:`Token`}),(0,U.jsx)(A,{id:s,"data-slot":`webhook-token`,type:`password`,autoComplete:`new-password`,spellCheck:!1,maxLength:d,"aria-describedby":c,placeholder:n?`Token set — type to replace`:`Optional Bearer token`,value:e.token,onChange:e=>t({token:e.target.value})}),(0,U.jsx)(`span`,{id:c,className:`text-xs text-soft-foreground`,children:n?`The token is stored in ~/.cezar and never shown again. Leave it empty to keep it.`:`The token is stored in ~/.cezar, never in the repo. It is sent as a Bearer header.`})]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,U.jsxs)(`div`,{className:`flex min-h-11 items-center gap-3`,children:[(0,U.jsx)(C,{id:l,"aria-describedby":m,"data-slot":`webhook-tasks`,checked:e.tasks,onCheckedChange:e=>t({tasks:e})}),(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-col text-[13px]`,children:[(0,U.jsx)(`label`,{htmlFor:l,className:`font-medium`,children:`Task notifications`}),(0,U.jsx)(`span`,{id:m,className:`text-xs text-soft-foreground`,children:`Tasks you hand off, or start with notify on, send their status here.`})]})]}),e.tasks?(0,U.jsxs)(`fieldset`,{"data-slot":`webhook-triggers`,className:`flex flex-col gap-1 sm:ps-[3.25rem]`,children:[(0,U.jsx)(`legend`,{className:`pbe-1 text-xs text-muted-foreground`,children:`Send a delivery when a task enters`}),(0,U.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(min(100%,15rem),1fr))] gap-x-3`,children:p.map(n=>(0,U.jsxs)(`label`,{className:`flex min-h-11 items-start gap-2.5 pbs-2 text-[13px]`,children:[(0,U.jsx)(`input`,{type:`checkbox`,"data-trigger":n,checked:e.triggers.includes(n),onChange:r=>t({triggers:r.target.checked?[...e.triggers,n]:e.triggers.filter(e=>e!==n)}),className:`mbs-0.5 size-[18px] shrink-0`}),(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:R[n].label}),(0,U.jsx)(`span`,{className:`text-xs text-soft-foreground`,children:R[n].hint})]})]},n))}),(0,U.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`Handing a task off and Send test always deliver.`})]}):null]}),(0,U.jsxs)(`div`,{className:`flex min-h-11 items-center gap-3`,children:[(0,U.jsx)(C,{id:h,"aria-describedby":g,"data-slot":`webhook-agent`,checked:e.agent,onCheckedChange:e=>t({agent:e})}),(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-col text-[13px]`,children:[(0,U.jsx)(`label`,{htmlFor:h,className:`font-medium`,children:`Let agents send reports`}),(0,U.jsx)(`span`,{id:g,className:`text-xs text-soft-foreground`,children:`Agents in this project may post a report here when the task calls for it.`})]})]})]})}var q=(e,t)=>({tone:`alert`,text:`Not saved: ${e.message}. Fix the field and select ${t} again.`}),ye=e=>e.dryRun?{tone:`ok`,text:`Dry run: nothing was sent.`}:e.ok?{tone:`ok`,text:`Delivered (HTTP ${e.status??200}).`}:{tone:`danger`,text:`Not delivered: ${e.error??`unknown error`}.`};function J({feedback:e}){return e?(0,U.jsx)(`p`,{"data-slot":e.tone===`alert`?`webhook-error`:`webhook-result`,role:e.tone===`alert`?`alert`:`status`,className:e.tone===`ok`?`text-[13px] text-muted-foreground`:`text-[13px] text-danger`,children:e.text}):null}var Y=`rounded-md border border-border bg-background`,X=`flex flex-col gap-3 border-bs border-border p-3`;function be({projectId:e,webhook:t,defaultOpen:n=!1}){let r=a(),o=i(),c=s(),[l,u]=(0,L.useState)(n),[d,f]=de(V(t),fe),[p,h]=(0,L.useState)(null),g=ve(d,t),_=Object.keys(g).length>0,v=d.name.trim()!==``&&d.url.trim()!==``,b=r.isPending||o.isPending||c.isPending,C={projectId:e,webhookId:t.id},T=()=>(h(null),r.mutateAsync({...C,...g},{onSuccess:()=>f(e=>({...e,token:``})),onError:e=>h(q(e,`Save`))}));ue({dirty:_,invalid:!v,busy:b,save:T,discard:()=>f(V(t))});let E=()=>c.mutate(C,{onSuccess:e=>h(ye(e)),onError:e=>h({tone:`danger`,text:e.message})});return(0,U.jsx)(`li`,{"data-slot":`webhook-card`,"data-webhook-id":t.id,className:Y,children:(0,U.jsxs)(te,{open:l,onOpenChange:u,children:[(0,U.jsx)(S,{asChild:!0,children:(0,U.jsxs)(`button`,{type:`button`,"data-action":`webhook-toggle`,className:`group flex min-h-11 w-full items-center gap-3 rounded-md p-3 text-start focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-foreground pointer-hover:bg-muted/50 active:bg-muted/50`,children:[(0,U.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,U.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,U.jsx)(`span`,{"data-slot":`webhook-card-name`,className:`min-w-0 break-words text-[13px] font-medium`,children:t.name}),t.tasks?(0,U.jsx)(w,{variant:`secondary`,"data-badge":`tasks`,children:`Task notifications`}):null,t.agent?(0,U.jsx)(w,{variant:`secondary`,"data-badge":`agent`,children:`Agents`}):null]}),(0,U.jsx)(`span`,{"data-slot":`webhook-card-url`,className:`truncate text-[12px] text-muted-foreground`,children:ie(t.url)})]}),(0,U.jsx)(y,{"aria-hidden":`true`,className:`size-4 shrink-0 text-muted-foreground group-data-[state=open]:rotate-180`})]})}),(0,U.jsx)(ee,{children:(0,U.jsxs)(`form`,{"data-slot":`webhook-form`,"data-reports-dirty":``,className:X,onSubmit:e=>{e.preventDefault(),h(null),v&&_&&!b&&T().catch(()=>{})},children:[(0,U.jsx)(K,{draft:d,tokenSet:t.tokenSet,onChange:e=>f(t=>({...t,...e}))}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(x,{type:`button`,size:`sm`,variant:`outline`,"data-action":`webhook-test`,disabled:b||!v,onClick:()=>{h(null),_?T().then(E,()=>{}):E()},children:`Send test`}),t.tokenSet?(0,U.jsx)(x,{type:`button`,size:`sm`,variant:`ghost`,"data-action":`webhook-clear-token`,disabled:b,onClick:()=>r.mutate({...C,token:``},{onSuccess:()=>m(`Webhook token cleared`),onError:e=>h({tone:`danger`,text:`Token not cleared: ${e.message}.`})}),children:`Clear token`}):null,(0,U.jsx)(x,{type:`button`,size:`sm`,variant:`danger-ghost`,"data-action":`webhook-remove`,"aria-label":`Remove ${t.name}`,disabled:b,onClick:()=>o.mutate(C,{onSuccess:()=>m(`${t.name} removed`),onError:e=>h({tone:`danger`,text:`Not removed: ${e.message}.`})}),children:`Remove`})]}),(0,U.jsx)(J,{feedback:p}),(0,U.jsx)(P,{})]})})]})})}function xe({projectId:e,onCreated:t,onCancel:n}){let r=o(),[i,a]=(0,L.useState)(B),[s,c]=(0,L.useState)(null),l=i.name.trim()!==``&&i.url.trim()!==``;return re(_e(i)),(0,U.jsxs)(`li`,{"data-slot":`webhook-card`,"data-draft":``,className:Y,children:[(0,U.jsx)(`p`,{className:`p-3 text-[13px] font-medium`,children:`New webhook`}),(0,U.jsxs)(`form`,{"data-slot":`webhook-form`,"data-reports-dirty":``,"aria-label":`New webhook`,className:X,onSubmit:n=>{n.preventDefault(),c(null),l&&r.mutate({projectId:e,...ge(i)},{onSuccess:({webhook:e})=>{m(`${e.name} created`),t(e)},onError:e=>c(q(e,`Create`))})},children:[(0,U.jsx)(K,{draft:i,tokenSet:!1,onChange:e=>a(t=>({...t,...e}))}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(x,{type:`submit`,size:`sm`,variant:`outline`,"data-action":`webhook-create`,disabled:r.isPending||!l,children:`Create`}),(0,U.jsx)(x,{type:`button`,size:`sm`,variant:`ghost`,"data-action":`webhook-cancel`,disabled:r.isPending,onClick:n,children:`Cancel`})]}),(0,U.jsx)(J,{feedback:s})]})]})}function Se({project:e}){let t=e.webhooks??[],[n,r]=(0,L.useState)(!1),[i,a]=(0,L.useState)(null),o=t.length>=16;return(0,U.jsx)(M,{wide:!0,title:`Webhooks`,hint:`A webhook gets a POST from Squawk. Tasks can send their status to it, and agents can send it reports.`,children:(0,U.jsxs)(`div`,{"data-slot":`project-webhooks`,className:`flex flex-col gap-3`,children:[t.length===0&&!n?(0,U.jsx)(`p`,{"data-slot":`webhooks-empty`,className:`text-[13px] text-soft-foreground`,children:`No webhooks yet. Add one to send task updates to a bot, or to let agents post reports.`}):null,t.length>0||n?(0,U.jsxs)(`ul`,{className:`flex flex-col gap-2`,children:[t.map(t=>(0,U.jsx)(be,{projectId:e.id,webhook:t,defaultOpen:t.id===i},t.id)),n?(0,U.jsx)(xe,{projectId:e.id,onCancel:()=>r(!1),onCreated:e=>{a(e.id),r(!1)}}):null]}):null,n?null:(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsxs)(x,{type:`button`,size:`sm`,variant:`outline`,"data-action":`webhook-add`,disabled:o,onClick:()=>r(!0),children:[(0,U.jsx)(b,{"aria-hidden":`true`}),`Add webhook`]}),o?(0,U.jsxs)(`span`,{className:`text-xs text-soft-foreground`,children:[`A project holds at most `,16,` webhooks.`]}):null]})]})})}function Z(e){let t=new Date(e);return Number.isNaN(t.getTime())?`—`:t.toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`})}function Ce(){let e=E(),t=c(),n=r(),i=ce();if(t.isPending)return(0,U.jsx)(`p`,{"data-slot":`project-general-loading`,className:`text-[13px] text-soft-foreground`,children:`Loading project…`});if(t.isError)return(0,U.jsxs)(`p`,{"data-slot":`project-general-error`,className:`text-[13px] text-danger`,children:[`Could not read the project registry — `,t.error.message]});let a=t.data,o=a?.projects.find(t=>t.id===e);return!a||!o?null:(0,U.jsxs)(`div`,{"data-slot":`project-general`,className:`flex w-full flex-col gap-5`,children:[(0,U.jsxs)(`section`,{className:`flex flex-col gap-5 rounded-lg border border-border bg-card p-5 [&_select]:min-h-11 [&_select]:w-full`,children:[(0,U.jsx)(`h2`,{className:`text-lg font-semibold`,children:`General`}),(0,U.jsx)(le,{}),(0,U.jsx)(we,{project:o}),(0,U.jsx)(M,{title:`Max parallel tasks`,saved:i.saved,hint:n.data?`The workspace limit (${n.data.resources.maxParallel}) still applies as an overall ceiling.`:`How many of this project's tasks may run at once. The workspace limit still applies as an overall ceiling.`,children:n.data?(0,U.jsx)(I,{project:o,workspaceMax:n.data.resources.maxParallel,onSaved:i.flash}):(0,U.jsx)(`p`,{className:`text-[13px] text-soft-foreground`,children:`Loading the workspace limit…`})}),(0,U.jsx)(Se,{project:o},o.id)]}),(0,U.jsx)(`section`,{className:`rounded-lg border border-border bg-card p-5`,children:(0,U.jsx)(Te,{project:o,projects:a.projects,bootProject:a.bootProject})})]})}function we({project:e}){return(0,U.jsxs)(`dl`,{"data-slot":`project-facts`,className:`grid grid-cols-1 gap-4 text-[13px] sm:grid-cols-3`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Project`}),(0,U.jsx)(`dd`,{className:`mt-1 font-medium`,children:e.name})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Branch`}),(0,U.jsx)(`dd`,{className:`mt-1 break-all`,children:e.branch??`—`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Status`}),(0,U.jsxs)(`dd`,{"data-slot":`project-general-status`,className:e.status===`missing`?`mt-1 text-danger`:`mt-1`,children:[F[e.status],e.status===`missing`?` — remove it below, or restore the folder`:null]})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Added`}),(0,U.jsxs)(`dd`,{className:`mt-1`,children:[Z(e.addedAt),(0,U.jsx)(`span`,{className:`text-soft-foreground`,children:e.source===`checkout`?` · cloned from GitHub`:` · opened locally`})]})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Last opened`}),(0,U.jsx)(`dd`,{className:`mt-1`,children:Z(e.lastOpenedAt)})]})]})}function Te({project:e,projects:t,bootProject:n}){let[r,i]=(0,L.useState)(null),a=me(),o=g(),s=n!==null&&e.id===n,c=n??t.find(t=>t.id!==e.id&&t.status!==`missing`)?.id??t.find(t=>t.id!==e.id)?.id??null;return(0,U.jsxs)(M,{title:`Remove from workspace`,hint:`Unregisters this project so it leaves the sidebar and the project list. Nothing on disk is deleted — the folder, its git history and its task history all stay, and opening it again re-registers it.`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,U.jsxs)(x,{type:`button`,variant:`outline`,size:`sm`,"data-action":`project-general-remove`,"aria-label":`Remove ${e.name} from the workspace — unregisters it, no files are deleted`,title:s?`Squawk is serving this project — it re-registers itself at every start`:void 0,disabled:s||a.isPending,onClick:()=>i(e),className:`text-danger`,children:[`Remove `,e.name]}),s?(0,U.jsx)(`span`,{"data-slot":`project-general-remove-boot`,className:`text-xs text-soft-foreground`,children:`Squawk is serving this project — it re-registers itself at every start.`}):null]}),(0,U.jsx)(he,{project:r,onOpenChange:e=>!e&&i(null),onConfirm:()=>{i(null),a.confirm(e,()=>void o(c===null?`/`:`/p/${encodeURIComponent(c)}`))}})]})}function Ee(e){return e===`global`?{Link:h,NavLink:_}:{Link:D,NavLink:T}}function Q({scope:e,title:t,mobileTitle:n,description:r}){let i=oe().name,a=e===`global`?`every project`:i??`this project`;return{headerSlot:`settings-main-header`,title:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`md:hidden`,children:n}),(0,U.jsxs)(`span`,{className:`max-md:hidden`,children:[t,` `,(0,U.jsxs)(`span`,{"data-slot":`page-header-scope`,className:`font-normal text-soft-foreground`,children:[`· `,a]})]})]}),subtitle:r,hideSubtitleOnMobile:!0,headerExtra:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{"data-slot":`settings-mobile-scope`,className:`mt-1 text-[13px] text-muted-foreground md:hidden`,children:e===`global`?`Applies to every project`:a}),e===`global`?(0,U.jsx)(`span`,{"data-slot":`settings-scope-chip`,className:`sr-only`,children:`Global settings`}):null]})}}function $({scope:e,activeId:t}){let{NavLink:n}=Ee(e),r=k(e);return(0,U.jsxs)(`details`,{className:`settings-section-picker md:hidden`,children:[(0,U.jsxs)(`summary`,{children:[r.find(e=>e.id===t)?.title??`General`,(0,U.jsx)(y,{"aria-hidden":`true`,className:`size-5 text-muted-foreground`})]}),(0,U.jsxs)(`nav`,{"aria-label":`Settings sections`,"data-slot":`settings-nav-mobile`,"data-scope":e,children:[e===`project`?(0,U.jsx)(n,{to:`/settings`,end:!0,"data-slot":`settings-nav-index`,children:`General`}):null,r.map(t=>(0,U.jsx)(n,{to:j(e,t.id),"data-section":t.id,children:t.title},t.id))]})]},`${e}-${t}`)}function De({section:e,scope:t}){let n=e.component,r=E(),i=Q({scope:t,title:e.title,description:e.description,mobileTitle:t===`global`?`Global settings`:`Project settings`});return(0,U.jsx)(e.id===`agent-config`?ne:O,{route:t===`global`?`settings-global-${e.id}`:`settings-${e.id}`,density:`full`,className:`settings-route`,header:i,children:(0,U.jsxs)(`div`,{className:`settings-route-body flex min-w-0 flex-1 flex-col md:flex-row`,children:[(0,U.jsxs)(`div`,{"data-slot":`settings-mobile-section`,className:`flex flex-col gap-2 md:hidden`,children:[(0,U.jsx)($,{scope:t,activeId:e.id}),e.description?(0,U.jsx)(`p`,{"data-slot":`settings-mobile-section-subtitle`,className:`px-1 text-[13px] leading-normal text-muted-foreground`,children:e.description}):null]}),(0,U.jsxs)(`section`,{className:`settings-panel min-w-0 self-start md:flex-1`,"aria-label":e.title,children:[(0,U.jsx)(`h2`,{className:`settings-panel-title sr-only`,children:e.title}),(0,U.jsx)(N,{children:(0,U.jsx)(n,{})},`${r??``}:${e.id}`)]})]})})}function Oe(){let e=Q({scope:`project`,title:`General`,mobileTitle:`Project settings`}),t=E();return(0,U.jsx)(O,{route:`settings`,density:`full`,className:`settings-route`,header:e,children:(0,U.jsxs)(`div`,{className:`settings-route-body flex min-w-0 flex-1 flex-col md:flex-row`,children:[(0,U.jsx)($,{scope:`project`,activeId:null}),(0,U.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-5`,children:(0,U.jsxs)(N,{children:[(0,U.jsx)(Ce,{}),(0,U.jsx)(`section`,{className:`rounded-lg border border-card-edge bg-card p-5 shadow-card`,children:(0,U.jsx)(pe,{})}),(0,U.jsx)(`h2`,{className:`settings-other-title mt-6 rounded-t-lg border border-b-0 border-card-edge bg-card px-5 pt-5 text-base font-semibold shadow-card md:hidden`,children:`Other project settings`}),(0,U.jsx)(`ul`,{"data-slot":`settings-index`,className:`mt-7 flex w-full flex-col gap-5 md:hidden`,children:k(`project`).map(e=>(0,U.jsx)(`li`,{children:(0,U.jsxs)(D,{to:j(`project`,e.id),"data-section":e.id,className:`flex items-center gap-3.5 rounded-lg border border-card-edge bg-card p-4 shadow-card transition-colors hover:bg-card-2`,children:[(0,U.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center text-accent-text`,children:(0,U.jsx)(e.icon,{"aria-hidden":`true`,className:`size-4`})}),(0,U.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:e.title}),(0,U.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:e.description})]}),(0,U.jsx)(v,{"aria-hidden":`true`,className:`size-4 shrink-0 text-soft-foreground`})]})},e.id))}),(0,U.jsxs)(`p`,{className:`mt-5 w-full text-[12px] text-soft-foreground`,children:[`Appearance, preferences, host resources and the project registry live in`,` `,(0,U.jsx)(h,{to:ae,"data-slot":`settings-global-link`,className:`underline underline-offset-2 hover:text-foreground`,children:`Global settings`}),`.`]})]},t??``)})]})})}export{Oe as SettingsIndexRoute,De as SettingsSectionRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ft as e}from"./queries-CchoEEzj.js";import{n as t}from"./project-location-BpBbcl3v.js";function n(){return{home:e().data?.homeDir??null,root:t()}}export{n as t};
|