@hearsay-tools/squawk 0.19.0-pr4591.9107 → 0.19.0-pr4592.9114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contract/hosts.d.ts +47 -5
- package/dist/contract/index.js +19 -1
- package/dist/features/hosts/bootstrap.d.ts +120 -0
- package/dist/features/hosts/bootstrap.js +469 -0
- package/dist/features/hosts/bootstrap.js.map +1 -0
- package/dist/features/hosts/cli.d.ts +13 -3
- package/dist/features/hosts/cli.js +199 -27
- package/dist/features/hosts/cli.js.map +1 -1
- package/dist/features/hosts/host-actions.d.ts +56 -0
- package/dist/features/hosts/host-actions.js +367 -0
- package/dist/features/hosts/host-actions.js.map +1 -0
- package/dist/features/hosts/host-server-cli.js +21 -3
- package/dist/features/hosts/host-server-cli.js.map +1 -1
- package/dist/features/hosts/host-server.d.ts +10 -1
- package/dist/features/hosts/host-server.js +74 -0
- package/dist/features/hosts/host-server.js.map +1 -1
- package/dist/features/hosts/index.d.ts +4 -2
- package/dist/features/hosts/index.js +14 -2
- package/dist/features/hosts/index.js.map +1 -1
- package/dist/features/hosts/registry.d.ts +28 -0
- package/dist/features/hosts/registry.js +42 -1
- package/dist/features/hosts/registry.js.map +1 -1
- package/dist/features/hosts/routes.d.ts +5 -3
- package/dist/features/hosts/routes.js +14 -7
- package/dist/features/hosts/routes.js.map +1 -1
- package/dist/features/hosts/ssh.d.ts +85 -0
- package/dist/features/hosts/ssh.js +271 -0
- package/dist/features/hosts/ssh.js.map +1 -0
- package/dist/features/hosts/supervisor.d.ts +191 -0
- package/dist/features/hosts/supervisor.js +620 -0
- package/dist/features/hosts/supervisor.js.map +1 -0
- package/dist/features/hosts/tunnel.d.ts +46 -0
- package/dist/features/hosts/tunnel.js +244 -0
- package/dist/features/hosts/tunnel.js.map +1 -0
- package/dist/features/webhooks/routes.d.ts +13 -13
- package/package.json +4 -4
- package/web/dist/assets/{accounts-section-DL3fIJ3Y.js → accounts-section-qBZ5-RXj.js} +1 -1
- package/web/dist/assets/{activity-motion-nt1FXMrF.js → activity-motion-B9_5XF5v.js} +1 -1
- package/web/dist/assets/{activity-route-xVy2K_Fi.js → activity-route-DDL70lAh.js} +1 -1
- package/web/dist/assets/{agent-config-section-nFavGeR2.js → agent-config-section-BTaLvuxh.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-CN0pC4xG.js → agent-defaults-section-VLUss9RM.js} +1 -1
- package/web/dist/assets/{appearance-zGuTSgIy.js → appearance-T8z_1h0U.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-BaKNf-j4.js → archive-on-merge-field-B1evTz6G.js} +1 -1
- package/web/dist/assets/{ask-card-huOW3GMV.js → ask-card-Cy2wek5M.js} +1 -1
- package/web/dist/assets/{automations-route-GBaRU2IS.js → automations-route-CNJznv4j.js} +1 -1
- package/web/dist/assets/{commit-list-x-75vYko.js → commit-list-CXzSImbK.js} +1 -1
- package/web/dist/assets/{diff-Bhh_CAtI.js → diff-BQKKR814.js} +2 -2
- package/web/dist/assets/{diff-controls-BOnMrLuP.js → diff-controls-C8_X3pGh.js} +1 -1
- package/web/dist/assets/{diff-view-DiPeQi9D.js → diff-view-DG1UPpcV.js} +1 -1
- package/web/dist/assets/{discard-changes-dialog-BMofaFwH.js → discard-changes-dialog-BwiG6PUl.js} +1 -1
- package/web/dist/assets/{file-preview-ChwOU1Uc.js → file-preview-DXFAfzRZ.js} +1 -1
- package/web/dist/assets/{git-toolbar-BdhjSQLm.js → git-toolbar-DMwDBZHQ.js} +1 -1
- package/web/dist/assets/{github-DqXXUCBy.js → github-tms-xpXp.js} +1 -1
- package/web/dist/assets/{global-activity-route-CZJRu2G1.js → global-activity-route-BZVh2SuF.js} +1 -1
- package/web/dist/assets/{index-CbSPKU4g.js → index-By89A7EE.js} +4 -4
- package/web/dist/assets/index-CMmxKxy6.css +1 -0
- package/web/dist/assets/{markdown-DMFXz4xY.js → markdown-SnVO2DaH.js} +1 -1
- package/web/dist/assets/{option-select-Cq_bhgu6.js → option-select-DsG7Q73v.js} +1 -1
- package/web/dist/assets/{preferences-section-CHhUi72X.js → preferences-section-Da9B4Z8D.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-DH9rjYI7.js → preview-pane-connected-CdgEdzP5.js} +1 -1
- package/web/dist/assets/{project-location-CSXt_Yk6.js → project-location-RZjKydrb.js} +1 -1
- package/web/dist/assets/{projects-section-CSBdiEM-.js → projects-section-C_sYrdIT.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-DaJbpROr.js → prompt-templates-section-CjgNc9ZO.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-Chx8LxP6.js → remote-settings-notice-D9VYD4by.js} +1 -1
- package/web/dist/assets/{repo-git-D8Sn_897.js → repo-git-CD5G34tp.js} +1 -1
- package/web/dist/assets/{report-reader-Ccymt9jp.js → report-reader-DtEXo7Fw.js} +1 -1
- package/web/dist/assets/{reports-GvAw7DYA.js → reports-B9Cs-YvK.js} +1 -1
- package/web/dist/assets/{resources-section-BWqoBxtC.js → resources-section-CcKLIO4H.js} +1 -1
- package/web/dist/assets/{review-notes-drafts-BKzyNpXo.js → review-notes-drafts-BI4aCHM1.js} +1 -1
- package/web/dist/assets/{review-panel-DxAlY6hQ.js → review-panel-B0Oa_Lws.js} +1 -1
- package/web/dist/assets/{review-strip-QDKNuOm9.js → review-strip-D1N_qYlD.js} +1 -1
- package/web/dist/assets/run-header-BC8OtX85.js +2 -0
- package/web/dist/assets/{select-DVQEFrtF.js → select-BQDojwao.js} +1 -1
- package/web/dist/assets/{session-context-section-YxCcDlRl.js → session-context-section-BvdzKbKF.js} +1 -1
- package/web/dist/assets/{settings-agent-picker-CDyluV99.js → settings-agent-picker-CHuJTKf-.js} +1 -1
- package/web/dist/assets/{settings-save-bar-CMJaZn_P.js → settings-save-bar-BA7OrIIE.js} +1 -1
- package/web/dist/assets/{settings-shell-DHVB7FYt.js → settings-shell-CGYHUMju.js} +1 -1
- package/web/dist/assets/{sidebar-section-hphp-63V.js → sidebar-section-BTuFmolj.js} +1 -1
- package/web/dist/assets/{skills-BlHcP8uc.js → skills-CPIJ4Uwy.js} +1 -1
- package/web/dist/assets/{task-changes-DWMFWq5g.js → task-changes-oDqYSSbu.js} +1 -1
- package/web/dist/assets/{task-commits-q5Cn_tdG.js → task-commits-C9xXuud1.js} +1 -1
- package/web/dist/assets/{task-file-scope-BKjO7lKK.js → task-file-scope-DqKm-YPL.js} +1 -1
- package/web/dist/assets/{task-files-DbRJAKAg.js → task-files-B-cW59Yz.js} +1 -1
- package/web/dist/assets/{task-github-item-DV6uUcx2.js → task-github-item-BEdp-0M2.js} +1 -1
- package/web/dist/assets/{task-thread-05LMMzIs.js → task-thread-BDXrjYe2.js} +1 -1
- package/web/dist/assets/{thread-state-uf_28v2G.js → thread-state-C0pmupBX.js} +1 -1
- package/web/dist/assets/{use-finish-run-BsTPLn1d.js → use-finish-run-DmmQCQGl.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DyjrAs-3.js → use-hand-to-agent-state-D-5nky1R.js} +1 -1
- package/web/dist/assets/use-path-bases-CyQIGumQ.js +1 -0
- package/web/dist/assets/{workflows-B5xr64g0.js → workflows-BUonf3es.js} +1 -1
- package/web/dist/assets/{workspace-tools-DGlrX2Uj.js → workspace-tools-BUUqNxd8.js} +1 -1
- package/web/dist/assets/{worktrees-section-D2bbdi3Y.js → worktrees-section-CUsYktyM.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-CSgBel_0.css +0 -1
- package/web/dist/assets/run-header-BS7SXYup.js +0 -2
- package/web/dist/assets/use-path-bases-hbJkikc4.js +0 -1
|
@@ -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 m,ct as h,d as g,et as _,ln as v,nn as y,nt as ee,un as b,vt as te,xt as x}from"./queries-CchoEEzj.js";import{Bt as ne,Nn as S,Rn as C,Sr as w,dr as T,ft as re,lr as ie,n as E,rt as D,vi as ae,zt as oe}from"./toaster-zMN8cNZQ.js";import{C as se,S as ce,T as le,b as ue,g as de,i as fe,m as pe,n as me,p as he,t as O,x as ge}from"./reference-chip-z7dZJVH-.js";import{I as _e,S as ve,Y as ye,a as be,m as xe,mt as k,st as Se,t as Ce,u as we,y as A}from"./design-icons-QbNMZniQ.js";import{t as j}from"./createLucideIcon-BHp8sXmF.js";import{t as Te}from"./app-window-CSHwDX9N.js";import{n as Ee,r as De,t as Oe}from"./open-in-menu-CbQWVBD0.js";import{t as ke}from"./info-DA1x_4bz.js";import{t as Ae}from"./message-square-B-MD-8rD.js";import{t as M}from"./square-terminal-B6RYYieR.js";import{t as N}from"./button-B22ANdCY.js";import{a as P,i as F,l as I,n as L,p as R,r as z,t as B}from"./dropdown-menu-DjtKUK8F.js";import{i as je,r as Me,t as Ne}from"./popover-CvL6hQ5c.js";import{a as Pe,i as Fe,o as Ie,r as Le,s as Re,t as ze}from"./dialog-rpNyAWGb.js";import{c as Be,s as Ve,t as V}from"./project-router-j0uBi7Ep.js";import"./attention-DnxGjw_R.js";import{T as He,f as H,u as Ue}from"./task-groups-CGCnVqHE.js";import{t as We}from"./status-dot-Drd4-nfa.js";import{t as Ge}from"./format-BU7D3IfE.js";import{a as Ke}from"./agent-accounts-D_7QcFSx.js";import{Er as qe,J as Je,Ln as Ye,Sn as U,Y as Xe,Yn as Ze,_ as Qe,_n as $e,a as et,an as tt,cn as W,dn as nt,g as rt,in as it,kn as G,mr as at,nn as ot,nr as st,o as ct,on as lt,pn as ut,pr as dt,q as ft,r as K,rn as pt,rr as mt,sn as ht,tn as gt,tr as _t,vr as vt,xn as q}from"./index-CbSPKU4g.js";import{t as yt}from"./textarea-vEsJAUAV.js";import{t as bt}from"./markdown-DMFXz4xY.js";import{t as xt}from"./task-file-scope-BKjO7lKK.js";import{t as J}from"./tab-link-BKlpD9sn.js";var St=j(`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=j(`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=j(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),Tt=j(`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`}]]),Y=e(t(),1),X=n();function Et(e){let t=h();return b({mutationFn:t=>D(v(e),t),onSuccess:()=>t.invalidateAfter(`runs`,()=>m()),onError:e=>E(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,X.jsx)(gt,{open:t,onOpenChange:n,children:(0,X.jsxs)(it,{"data-slot":`task-confirmation`,className:`sm:max-w-[660px]`,children:[(0,X.jsxs)(ht,{children:[(0,X.jsx)(W,{children:`Archive task?`}),(0,X.jsxs)(tt,{children:[`Move “`,(0,X.jsx)(`span`,{className:`font-medium text-foreground`,title:H(e),children:H(e)}),`” out of Active tasks. You can restore it from Archived.`]})]}),(0,X.jsxs)(lt,{children:[(0,X.jsx)(pt,{children:`Cancel`}),(0,X.jsx)(ot,{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,Y.useState)(!1),a=Et(e.id),o=Dt(e);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(N,{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,X.jsx)(qe,{"aria-hidden":`true`}):(0,X.jsx)(Ce,{"aria-hidden":`true`}),(0,X.jsx)(`span`,{children:o})]}),(0,X.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,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`text-sm [overflow-wrap:anywhere]`,children:[(0,X.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,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n&&i(n)?(0,X.jsx)(N,{variant:`outline`,asChild:!0,children:(0,X.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,children:`Open PR`})}):null,e.autoMergePr?(0,X.jsx)(N,{variant:`outline`,disabled:r.isPending,onClick:()=>r.mutate({autoMergePr:!1},{onError:e=>E(e.message,{tone:`danger`})}),children:r.isPending?`Saving…`:`Disable auto-merge`}):null]})]})}function jt({run:e,blocker:t,flags:n}){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`p`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`text-sm [overflow-wrap:anywhere]`,children:[(0,X.jsx)(`span`,{className:`font-medium`,children:`Archive blocked`}),` · `,t.message]}),(0,X.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[t.runId?(0,X.jsx)(N,{variant:`outline`,asChild:!0,children:(0,X.jsx)(V,{to:`/tasks/${t.runId}`,children:`Open blocking task`})}):null,t.pullRequestUrl&&i(t.pullRequestUrl)?(0,X.jsx)(N,{variant:`outline`,asChild:!0,children:(0,X.jsx)(`a`,{href:t.pullRequestUrl,target:`_blank`,rel:`noopener noreferrer`,children:`Open blocking PR`})}):null,n.archive?(0,X.jsx)(kt,{run:e}):null]})]})}function Mt({run:e}){let t=f(e.id),n=U(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,X.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,X.jsx)(At,{run:e,action:a,prUrl:o,patch:t}):null,i?(0,X.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=S(e),i=Ye(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:Ge(n,t)}}async function Z(e,t){try{await navigator.clipboard.writeText(e),E(t)}catch{E(`Run manually: ${e}`)}}function Lt(e){let t=p(),n=g(),r=(0,Y.useMemo)(()=>le(e,t),[e,t]);return{referenceProjectId:n,repoBase:t,references:r,requests:(0,Y.useMemo)(()=>n===void 0?[]:r.filter(e=>he(e,t)).map(e=>({projectId:n,kind:e.kind,number:e.number})),[r,n,t])}}function Rt(e){return b({mutationFn:()=>ne(e.id),onError:e=>{if(e instanceof C&&e.command){Z(e.command,`No terminal found — command copied to clipboard.`);return}E(e.message,{tone:`danger`})}})}function Q(e,t){let n=l(),r=c(),i=y(),a=b({mutationFn:t=>oe(e.id,t),onError:e=>E(e.message,{tone:`danger`})}),o=Ke(),s=He(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($e(e)),choices:e.worktreePath?(n.data?.targets??[]).filter(e=>{let t=Ee(e.id);return t===void 0||i.isSuccess&&d(t)}).map(t=>({target:t,...ut(e,t.id)?{suffix:` (resume)`,title:`Resume this run's session`}:{}})):[],open:a}}function zt({run:e,canResume:t,onResume:n}){let{canResumeHere:r,choices:i,open:a}=Q(e,t),o=y().data,s=q(e);return!r&&i.length===0&&!s?null:(0,X.jsxs)(X.Fragment,{children:[r||i.length>0?(0,X.jsxs)(`div`,{className:`task-open-targets flex flex-wrap gap-3`,children:[r?(0,X.jsxs)(N,{variant:`outline`,"data-target":`terminal-resume`,onClick:n,children:[(0,X.jsx)(M,{}),`Terminal (resume session)`]}):null,i.map(({target:e,suffix:t,title:n})=>{let r=De(e,o);return(0,X.jsxs)(N,{variant:`outline`,"data-target":e.id,title:n,disabled:a.isPending,onClick:()=>a.mutate(e.id),children:[(0,X.jsx)(r,{"aria-hidden":`true`}),e.label,t??``]},e.id)}),e.worktreePath?(0,X.jsxs)(N,{variant:`outline`,onClick:()=>{let t=e.worktreePath;t&&navigator.clipboard.writeText(t).then(()=>E(`Worktree path copied`)).catch(()=>E(`Path: ${t}`))},children:[(0,X.jsx)(A,{}),`Copy worktree path`]}):null]}):null,s?(0,X.jsxs)(`div`,{"data-slot":`resume-command`,className:`mt-5 border-t border-border pt-5`,children:[(0,X.jsx)(`h3`,{className:`text-base font-medium`,children:`Resume in a terminal`}),(0,X.jsx)(`pre`,{className:`my-4 whitespace-pre-wrap break-all rounded-lg border border-border bg-background p-4 text-xs`,children:s}),(0,X.jsxs)(N,{variant:`outline`,onClick:()=>void Z(s,`Command copied to clipboard.`),children:[(0,X.jsx)(A,{}),`Copy resume command`]})]}):null]})}function Bt({run:e,canResume:t,onResume:n}){let{canResumeHere:r,choices:i,open:a}=Q(e,t),o=q(e),s=e.worktreePath;return!r&&i.length===0&&!o&&!s?null:(0,X.jsxs)(`div`,{"data-slot":`workspace-tools`,className:`flex min-w-0 flex-wrap gap-2`,children:[r||i.length>0?(0,X.jsx)(Oe,{choices:i,onPick:e=>a.mutate(e),disabled:a.isPending,triggerVariant:`outline`,leading:r?(0,X.jsxs)(F,{"data-target":`terminal-resume`,onSelect:n,children:[(0,X.jsx)(M,{"aria-hidden":`true`}),`Terminal (resume session)`]}):void 0}):null,s?(0,X.jsxs)(N,{variant:`outline`,size:`sm`,onClick:()=>void Z(s,`Worktree path copied`),children:[(0,X.jsx)(A,{"aria-hidden":`true`}),`Copy worktree path`]}):null,o?(0,X.jsxs)(N,{variant:`outline`,size:`sm`,"data-slot":`resume-command`,title:o,onClick:()=>void Z(o,`Command copied to clipboard.`),children:[(0,X.jsx)(A,{"aria-hidden":`true`}),`Copy resume command`]}):null]})}function Vt({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,X.jsx)(F,{onSelect:r,children:`Open in…`}):(0,X.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,X.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,X.jsx)(`h2`,{className:`text-lg font-medium`,children:`Open task worktree in…`}),(0,X.jsx)(N,{variant:`ghost`,size:`icon`,"aria-label":`Close worktree chooser`,onClick:i,children:(0,X.jsx)(k,{})})]}),e.worktreePath?(0,X.jsx)(`p`,{className:`my-4 break-all text-xs text-muted-foreground`,children:e.worktreePath}):null,(0,X.jsx)(`div`,{className:`mt-4`,children:(0,X.jsx)(zt,{run:e,canResume:t,onResume:n})})]})}function Ht({branch:e}){let[t,n]=(0,Y.useState)(null),r=(0,Y.useRef)(null);(0,Y.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{E(`Could not copy branch. Select and copy: ${e}`)}};return(0,X.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-full items-center gap-1`,children:[(0,X.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,X.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,X.jsx)(A,{className:`size-3.5`,"aria-hidden":`true`}),(0,X.jsx)(`span`,{"aria-live":`polite`,children:i?`Copied`:`Copy`})]})]})}function Ut({run:e}){let t=p(),n=g(),r=r=>n===void 0?void 0:ge(n,e.id,r,t),a=(0,Y.useMemo)(()=>le(e,t),[e,t]),o=[],s=[],c=a.filter(e=>e.kind===`PR`);for(let t of c)o.push((0,X.jsx)(O,{reference:t,to:r(t),taskTitle:H(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`,conflictAction:(0,X.jsx)(nt,{run:e,prNumber:t.number})},de(t)));let l=se(e);l&&i(l)&&!c.some(e=>e.url===l)&&o.push((0,X.jsx)(O,{reference:{kind:`PR`,url:l},taskTitle:H(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,X.jsx)(O,{reference:t,to:r(t),taskTitle:H(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},de(t)));let d=ue(e,t);if(d&&i(d)&&!u.some(e=>e.url===d)){let t=pe(d);s.push((0,X.jsx)(O,{reference:{kind:`Issue`,...t?{number:Number(t)}:{},url:d},to:t?r({kind:`Issue`,number:Number(t),url:d}):void 0,taskTitle:H(e),className:`h-5 no-hover:min-h-[44px] no-hover:min-w-[44px]`},`issue`))}return o.length===0&&s.length===0?null:(0,X.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,X.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,X.jsx)(`span`,{className:`font-medium text-foreground`,children:t}),(0,X.jsx)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:n})]},e):null)})}function Wt(){let e=Ve(),t=x();return ft(t.data?.projects?.find(n=>n.id===(e??t.data?.bootProject)))}var Gt=e=>e.map(e=>`${e.name}: ${Je(e.url)}`).join(`
|
|
2
|
-
`);function Kt(e){let t=Ze(),n=Wt();return t!==`absent`&&(n.length>0||e.notify===!0)}function $({run:e}){let t=Ze(),n=Wt(),r=n.length>0,i=o(e.id),[a,s]=(0,Y.useState)(null),c=e.notify===!0;return t===`absent`||!r&&!c?null:(0,X.jsxs)(X.Fragment,{children:[c?(0,X.jsxs)(B,{children:[(0,X.jsx)(R,{asChild:!0,children:(0,X.jsxs)(N,{variant:`outline`,"data-slot":`notifying-chip`,className:`gap-1.5`,"aria-label":r?`Notifying ${Xe(n)} — webhook actions`:`Notifying — webhook actions`,title:r?Gt(n):void 0,children:[(0,X.jsx)(We,{tone:`success`}),(0,X.jsx)(`span`,{children:`Notifying`}),(0,X.jsx)(we,{"aria-hidden":`true`,className:`size-3.5`})]})}),(0,X.jsxs)(z,{align:`end`,"data-slot":`notifying-menu`,className:`w-[240px] max-w-[calc(100vw-2rem)] p-2`,children:[r?(0,X.jsx)(P,{"data-slot":`notifying-targets`,className:`flex flex-col gap-0.5 px-2 py-1.5 text-xs font-normal text-muted-foreground`,children:n.map(e=>(0,X.jsx)(`span`,{"data-webhook-target":e.id,className:`truncate`,title:Je(e.url),children:e.name},e.id))}):null,r?(0,X.jsxs)(F,{className:`min-h-11`,onSelect:()=>s(`note`),children:[(0,X.jsx)(Ae,{"aria-hidden":`true`}),` Send a note…`]}):null,(0,X.jsxs)(F,{variant:`destructive`,className:`min-h-11`,disabled:i.isPending,onSelect:()=>i.mutate({notify:!1},{onSuccess:()=>E(`Stopped notifying the webhook`),onError:e=>E(`Could not stop notifying. ${e.message}`,{tone:`danger`})}),children:[(0,X.jsx)(St,{"aria-hidden":`true`}),` Stop notifying`]})]})]}):(0,X.jsxs)(N,{variant:`outline`,"data-action":`handoff`,className:`max-md:px-0`,"aria-label":`Hand off to webhook`,onClick:()=>s(`handoff`),children:[(0,X.jsx)(dt,{"aria-hidden":`true`}),(0,X.jsx)(`span`,{className:`max-md:sr-only`,children:`Hand off`})]}),r?(0,X.jsx)(qt,{mode:a,targets:n,pending:i.isPending,onOpenChange:e=>!e&&s(null),onSubmit:e=>i.mutate({notify:!0,...e?{message:e}:{}},{onSuccess:()=>{s(null),E(a===`note`?`Note sent to the webhook`:`Handed off to the webhook`)},onError:e=>E(`Could not hand off. ${e.message}`,{tone:`danger`})})}):null]})}function qt({mode:e,targets:t,pending:n,onOpenChange:r,onSubmit:i}){let a=(0,Y.useId)(),o=(0,Y.useId)(),[s,c]=(0,Y.useState)(``);(0,Y.useEffect)(()=>{e!==null&&c(``)},[e]);let l=e===`note`,u=Xe(t);return(0,X.jsx)(ze,{open:e!==null,onOpenChange:e=>{e||c(``),r(e)},children:(0,X.jsx)(Le,{"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,X.jsxs)(`form`,{className:`grid gap-4`,onSubmit:e=>{e.preventDefault(),i(s.trim())},children:[(0,X.jsxs)(Ie,{className:`text-left`,children:[(0,X.jsx)(Re,{children:l?`Send a note to ${t.length===1?`the webhook`:`the webhooks`}`:`Hand off to webhook`}),(0,X.jsx)(Fe,{children:(0,X.jsx)(`span`,{"data-webhook-destination":``,title:Gt(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,X.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,X.jsx)(`label`,{htmlFor:a,className:`text-[13px] font-medium`,children:`Note`}),(0,X.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,X.jsxs)(`p`,{id:o,className:`flex items-center gap-1.5 text-[12px] text-muted-foreground`,children:[(0,X.jsx)(ke,{"aria-hidden":`true`,className:`size-3.5 shrink-0`}),`The note goes to the webhook only, not to the agent.`]})]}),(0,X.jsxs)(Pe,{className:`gap-2 max-sm:flex-col-reverse max-sm:[&>button]:w-full`,children:[(0,X.jsx)(N,{type:`button`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,X.jsxs)(N,{type:`submit`,variant:`contrast`,"data-action":`handoff-submit`,disabled:n||l&&s.trim()===``,children:[(0,X.jsx)(dt,{"aria-hidden":`true`}),l?`Send note`:`Hand off`]})]})]})})})}function Jt({id:e}){return(0,X.jsxs)(V,{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,X.jsx)(be,{"aria-hidden":!0,className:`shrink-0 [block-size:1.2cap] [inline-size:auto]`}),`Parent`]})}function Yt({id:e}){let t=s(e),n=t.data?H(t.data):e;return(0,X.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,X.jsxs)(V,{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,X.jsx)(be,{"aria-hidden":!0,className:`h-[1.2cap] w-auto shrink-0`}),(0,X.jsx)(`span`,{className:`shrink-0`,children:`Parent`}),(0,X.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,X.jsx)(`span`,{className:`min-w-0 overflow-clip text-ellipsis whitespace-nowrap`,children:n})]}),t.isError?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`span`,{children:`Parent record unavailable or deleted`}),(0,X.jsx)(N,{variant:`outline`,onClick:()=>void t.refetch(),children:`Retry parent task`})]}):null]})}var Xt=3,Zt=(e,t)=>e.kind===t.kind&&e.number===t.number;function Qt(e,t,n=Xt){let r=t?e.findIndex(e=>Zt(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 $t=(e,t)=>`/tasks/${e}/${t.kind}/${t.number}`;function en({tab:e}){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(e.kind===`pr`?_e:xe,{"aria-hidden":`true`,className:`mr-1 size-3.5 shrink-0`}),(0,X.jsx)(`span`,{className:`sr-only`,children:e.kind===`pr`?`Pull request`:`Issue`}),` #`,e.number,(0,X.jsx)(me,{kind:e.kind===`pr`?`PR`:`Issue`,number:e.number,className:`ml-1`})]})}function tn(e,t){let n=e[0],r=e.length+ +!!t;return n?`Preview :${n.port}${r>1?` +${r-1}`:``}`:t?`Preview · agent`:`Preview`}function nn({servers:e}){let t=rt();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,X.jsxs)(N,{variant:`outline`,"data-slot":`preview-toggle`,"aria-pressed":t.open,onClick:()=>t.openPane(i),children:[(0,X.jsx)(Te,{"aria-hidden":`true`}),tn(e,n),t.live?(0,X.jsx)(We,{tone:`success`,"aria-label":`Preview is live`}):null]})}function rn({tab:e}){let t=Qe();return!t?.available||e!==`session`&&e!==`changes`?null:(0,X.jsxs)(N,{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,X.jsx)(wt,{"aria-hidden":`true`}),`Split view`]})}function an(e){return e?.role===`worker`?`Worker session`:e?.role===`root`?`Parent session`:`Task session`}function on({run:e,compact:t=!1}){if(e.delegation?.role!==`worker`)return null;let n=e.delegation.supervisorRunId??e.delegation.parentRunId;return t?(0,X.jsx)(Jt,{id:n}):(0,X.jsx)(Yt,{id:n})}function sn({isDesktop:e,desktopActivitySlot:t,attention:n,statusLine:r}){return e&&t?(0,X.jsx)(X.Fragment,{children:t}):(0,X.jsx)(`span`,{"data-slot":`run-status-slot`,className:`hidden`,children:(0,X.jsx)(K,{dot:n.tone,shape:n.shape,pulse:n.pulse,children:Ft(r)})})}function cn(e,t,n){return n&&!e.archiveBlocker&&t.archive?(0,X.jsx)(kt,{run:e}):null}function ln({archived:e,className:t}){return e?(0,X.jsx)(K,{"data-slot":`run-archived-pill`,dot:G.tone,shape:G.shape,className:t,children:G.label}):null}function un({run:e}){return e.archived&&e.autoArchive?.reason===`pull-requests-merged`&&e.autoArchive.archivedAt===e.archivedAt?(0,X.jsx)(`p`,{"data-slot":`auto-archive-reason`,className:`text-[13px] text-muted-foreground`,children:`Archived automatically after all associated PRs merged.`}):null}function dn({shown:e,run:t,previewToggle:n}){let r=Kt(t);return e&&(n||r)?(0,X.jsxs)(`div`,{"data-slot":`run-mobile-actions`,className:`flex flex-wrap items-center gap-2 pt-2`,children:[n,(0,X.jsx)($,{run:t})]}):null}function fn({isDesktop:e,phoneBar:t,run:n,previewToggle:i,mobileActivitySlot:a}){let o=Kt(n);if(e||!a)return null;let s=t&&(!!i||o);return(0,X.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,X.jsxs)(`span`,{className:`ms-auto flex shrink-0 flex-wrap items-center gap-2`,children:[i,(0,X.jsx)($,{run:n})]}):null]})}function pn({run:e,tab:t,activeItem:n,inlineItemTabs:i,overflowItemTabs:a,phoneBar:o,isDesktop:s}){let c=(0,Y.useRef)(null),[l,u]=(0,Y.useState)(!1);(0,Y.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,Y.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,X.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,X.jsx)(J,{to:`/tasks/${e.id}`,active:t===`session`,replace:o,children:`Session`}),(0,X.jsx)(J,{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,X.jsx)(J,{to:`/tasks/${e.id}/commits`,active:t===`commits`,replace:o,children:`Commits`}),(0,X.jsx)(J,{to:`/tasks/${e.id}/files`,active:t===`files`,replace:o,children:`Files`}),i.map(t=>(0,X.jsx)(J,{to:$t(e.id,t),active:n!==null&&Zt(t,n),replace:o,children:(0,X.jsx)(en,{tab:t})},`${t.kind}-${t.number}`)),a.length>0?(0,X.jsxs)(B,{children:[(0,X.jsxs)(R,{"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,X.jsx)(z,{align:`end`,children:a.map(t=>(0,X.jsx)(F,{asChild:!0,children:(0,X.jsx)(V,{to:$t(e.id,t),replace:o,children:(0,X.jsx)(en,{tab:t})})},`${t.kind}-${t.number}`))})]}):null]})}function mn({run:e,tab:t=`session`,onMarkedUnread:n,desktopActivitySlot:i,mobileActivitySlot:a}){let o=S(e),s=U(e),[c,l]=(0,Y.useState)(!1),[u,d]=(0,Y.useState)(!1),f=hn(e,n),p=ee(),m=te(),h=Pt(e,{queuePosition:e.status===`queued`?Ue(p.data??[]).get(e.id):void 0}),g=mt(),_=st(),v=g!==null&&!_?g:null,y=v!==null,{referenceProjectId:b,repoBase:x,requests:ne}=Lt(e),C=(0,Y.useMemo)(()=>ce(e,x),[e,x]),w=typeof t==`object`?t:null,{inline:T,overflow:re}=Qt(C,w),ie=m.data?.capabilities?.preview===!0,E=e.worktreePath&&ie?(0,X.jsx)(nn,{servers:e.previewServers??[]}):null,D=(0,X.jsx)(yn,{run:e,actions:f,onOpenChooser:()=>d(!0),onToggleNotes:()=>l(e=>!e)}),ae=cn(e,s,_);return(0,X.jsx)(fe,{projectId:b,repoBase:x,requests:ne,children:(0,X.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`,y?`pt-0`:`pt-[18px]`,t===`session`&&`border-b border-border`),children:[(0,X.jsx)(un,{run:e}),(0,X.jsx)(Mt,{run:e}),(0,X.jsxs)(`div`,{className:`w-full`,children:[(0,X.jsx)(on,{run:e}),v?(0,X.jsxs)(_t,{slot:v,children:[(0,X.jsx)(vn,{run:e,status:(0,X.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,X.jsx)(K,{"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:h.label}),(0,X.jsx)(ln,{archived:e.archived,className:`px-2 py-px text-xs leading-4`})]})}),(0,X.jsx)(on,{run:e,compact:!0}),D]}):(0,X.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,X.jsx)(`p`,{"data-slot":`session-kind`,className:`text-[12px] font-semibold tracking-[0.14em] text-muted-foreground uppercase md:hidden`,children:an(e.delegation)}),(0,X.jsx)(_n,{run:e}),(0,X.jsx)(sn,{isDesktop:_,desktopActivitySlot:i,attention:o,statusLine:h}),(0,X.jsx)(ln,{archived:e.archived,className:`max-md:hidden`}),(0,X.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-1 md:gap-2.5`,children:[ae,(0,X.jsx)(rn,{tab:t}),E,(0,X.jsx)($,{run:e}),D]})]}),(0,X.jsx)(dn,{shown:v!==null&&!a,run:e,previewToggle:E}),(0,X.jsx)(pn,{run:e,tab:t,activeItem:w,inlineItemTabs:T,overflowItemTabs:re,phoneBar:y,isDesktop:_}),(0,X.jsx)(fn,{isDesktop:_,phoneBar:y,run:e,previewToggle:E,mobileActivitySlot:a}),c?(0,X.jsx)(Sn,{runId:e.id,onClose:()=>l(!1)}):null,u?(0,X.jsx)(Vt,{run:e,canResume:U(e).terminal,onResume:()=>f.terminal.mutate(),onClose:()=>d(!1)}):null]}),(0,X.jsx)(xn,{run:e,actions:f})]})})}function hn(e,t){let n=ae(),r=Be(),[i,o]=(0,Y.useState)(null),s=()=>n.invalidateQueries({queryKey:u.runs.all}),c=e=>E(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:b({mutationFn:()=>re(e.id),onSuccess:()=>{s(),r(`/`)},onError:c}),terminal:Rt(e),confirming:i,setConfirming:o}}function gn(e){let t=f(e.id),n=H(e);return{title:n,editor:ct(n,e=>t.mutate({title:e},{onError:e=>E(e.message,{tone:`danger`})}))}}function _n({run:e}){let{title:t,editor:n}=gn(e);return n.editing?(0,X.jsx)(et,{editor:n,className:`flex-1 text-[16px] font-semibold`}):(0,X.jsxs)(`span`,{className:`group flex min-w-0 items-center gap-1`,children:[(0,X.jsx)(`h1`,{className:`line-clamp-2 min-w-0 break-words text-2xl font-semibold tracking-tight`,title:e.task,children:t}),(0,X.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,X.jsx)(at,{className:`size-3.5`,"aria-hidden":`true`})})]})}function vn({run:e,status:t}){let{title:n,editor:r}=gn(e);return(0,X.jsxs)(Ne,{open:r.editing,onOpenChange:e=>{e?r.begin():r.commit()},children:[(0,X.jsxs)(`div`,{"data-slot":`mobile-run-title`,className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,X.jsx)(`h1`,{className:`line-clamp-2 break-words text-[15px] leading-[18px] font-semibold text-foreground`,title:e.task,children:n}),t]}),(0,X.jsx)(je,{asChild:!0,children:(0,X.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,X.jsx)(at,{className:`size-3.5`,"aria-hidden":`true`})})}),(0,X.jsx)(Me,{align:`end`,className:`w-64 max-w-[calc(100vw-16px)] p-2`,onEscapeKeyDown:e=>{e.preventDefault(),r.cancel()},children:(0,X.jsx)(et,{editor:r,className:`text-[16px] font-semibold`})})]})}function yn({run:e,actions:t,onToggleNotes:n,onOpenChooser:r}){let i=U(e),a=q(e),o=st(),s=Et(e.id),[c,l]=(0,Y.useState)(!1),u=f(e.id),d=(0,Y.useId)();return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Ot,{run:e,open:c,onOpenChange:l,onConfirm:()=>{s.mutate(!0),l(!1)}}),(0,X.jsxs)(B,{children:[(0,X.jsx)(R,{asChild:!0,children:(0,X.jsx)(N,{variant:`ghost`,size:`icon`,"aria-label":`Run actions`,children:(0,X.jsx)(ve,{"aria-hidden":`true`})})}),(0,X.jsxs)(z,{align:`end`,"data-slot":`run-actions-menu`,className:`w-[270px] max-w-[calc(100vw-2rem)] p-3`,children:[(0,X.jsx)(P,{className:`px-2 py-3 text-[12px] font-normal text-muted-foreground`,children:`TASK ACTIONS`}),!o&&i.archive&&!e.archiveBlocker?(0,X.jsx)(F,{disabled:s.isPending,onSelect:()=>e.archived?s.mutate(!1):l(!0),children:Dt(e)}):null,(0,X.jsxs)(F,{onSelect:n,children:[(0,X.jsx)(vt,{"aria-hidden":`true`}),` Notes / handoff`]}),(0,X.jsx)(Vt,{run:e,canResume:i.terminal,onResume:()=>t.terminal.mutate(),onOpen:r}),a?(0,X.jsxs)(F,{onSelect:()=>void Z(a,`Command copied to clipboard.`),children:[(0,X.jsx)(A,{"aria-hidden":`true`}),` Copy resume command`]}):null,i.markUnread?(0,X.jsxs)(F,{disabled:t.markUnread.isPending,onSelect:()=>t.markUnread.mutate(),children:[(0,X.jsx)(Ct,{"aria-hidden":`true`}),` Mark unread`]}):null,i.pin?(0,X.jsxs)(L,{"data-slot":`pin-run`,className:`min-h-11`,checked:!!e.pinned,disabled:t.pin.isPending,onCheckedChange:()=>t.pin.mutate(),children:[e.pinned?(0,X.jsx)(Tt,{"aria-hidden":`true`}):(0,X.jsx)(ye,{"aria-hidden":`true`}),e.pinned?`Unpin task`:`Pin task`]}):null,(0,X.jsx)(I,{}),(0,X.jsx)(P,{className:`text-xs text-muted-foreground`,children:`AFTER DONE`}),(0,X.jsx)(L,{"data-slot":`archive-when-done`,className:`min-h-11`,checked:e.archiveWhenDone===!0,disabled:u.isPending,onCheckedChange:e=>u.mutate({archiveWhenDone:e},{onError:e=>E(e.message,{tone:`danger`})}),children:`Archive when Done`}),(0,X.jsx)(L,{"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=>E(e.message,{tone:`danger`})}),children:`Auto-merge PR`}),(0,X.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,X.jsx)(bn,{run:e,patch:u}),i.deleteRun?(0,X.jsx)(I,{}):null,i.deleteRun?(0,X.jsxs)(F,{variant:`destructive`,onSelect:()=>t.setConfirming(`delete`),children:[(0,X.jsx)(Se,{"aria-hidden":`true`}),` Delete task…`]}):null]})]})]})}function bn({run:e,patch:t}){let n=(0,Y.useId)(),r=(0,Y.useId)(),i=(0,Y.useId)(),a=e=>E(e.message,{tone:`danger`});return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(I,{}),(0,X.jsx)(P,{className:`text-xs text-muted-foreground`,children:`TASK ACCESS`}),(0,X.jsx)(L,{"data-slot":`allow-workers`,className:`min-h-11`,checked:T(e),disabled:t.isPending,"aria-describedby":`${n} ${i}`,onCheckedChange:e=>t.mutate({allowWorkers:e},{onError:a}),children:`Allow Squawk workers`}),(0,X.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,X.jsx)(L,{"data-slot":`allow-messaging`,className:`min-h-11`,checked:ie(e),disabled:t.isPending,"aria-describedby":`${r} ${i}`,onCheckedChange:e=>t.mutate({allowMessaging:e},{onError:a}),children:`Allow task messaging`}),(0,X.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,X.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 xn({run:e,actions:t}){let n=t.confirming;return(0,X.jsx)(gt,{open:n!==null,onOpenChange:e=>!e&&t.setConfirming(null),children:(0,X.jsxs)(it,{"data-slot":`task-confirmation`,className:`sm:max-w-[660px]`,children:[(0,X.jsxs)(ht,{children:[(0,X.jsx)(W,{className:`text-danger`,children:`Delete task permanently?`}),(0,X.jsx)(tt,{children:(0,X.jsxs)(X.Fragment,{children:[`Delete “`,(0,X.jsx)(`span`,{className:`font-medium text-foreground`,title:H(e),children:H(e)}),`” and its transcript`,e.delegation?.role===`worker`&&!w(e.delegation.workspace)?``:`, worktree and branch`,`. This cannot be undone.`]})})]}),(0,X.jsxs)(lt,{children:[(0,X.jsx)(pt,{children:`Cancel`}),(0,X.jsx)(ot,{className:`bg-danger text-danger-foreground hover:brightness-[0.96]`,onClick:()=>{t.delete.mutate(),t.setConfirming(null)},children:`Delete task`})]})]})})}function Sn({runId:e,onClose:t}){let n=_(e);return(0,X.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,X.jsxs)(`div`,{className:`mb-4 flex shrink-0 items-center justify-between gap-3`,children:[(0,X.jsx)(`h2`,{className:`text-lg font-medium`,children:`Notes / handoff`}),(0,X.jsx)(N,{variant:`ghost`,size:`icon`,"aria-label":`Close notes`,onClick:t,children:(0,X.jsx)(k,{})})]}),(0,X.jsx)(`div`,{"data-slot":`notes-panel-body`,className:`min-h-0 flex-1 overflow-y-auto overscroll-contain`,children:n.isPending?(0,X.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`Loading notes…`}):n.isError?(0,X.jsx)(`p`,{className:`text-xs text-danger`,children:n.error.message}):n.data.trim().length>0?(0,X.jsx)(xt,{runId:e,children:(0,X.jsx)(bt,{children:n.data})}):(0,X.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`No notes yet — the handoff file is seeded when the task starts.`})}),(0,X.jsxs)(`div`,{className:`mt-4 flex shrink-0 gap-3`,children:[(0,X.jsx)(N,{variant:`outline`,disabled:!n.data?.trim(),onClick:()=>void Z(n.data??``,`Notes copied`),children:`Copy notes`}),(0,X.jsx)(N,{variant:`outline`,onClick:t,children:`Close`})]})]})}export{Rt as a,Bt as i,Ht as n,Lt as o,Ut as r,Pt as s,mn as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ft as e}from"./queries-CchoEEzj.js";import{n as t}from"./project-location-CSXt_Yk6.js";function n(){return{home:e().data?.homeDir??null,root:t()}}export{n as t};
|