@hearsay-tools/squawk 0.19.0-dev.9308 → 0.19.0-dev.9310
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/server/server.d.ts +58 -58
- package/package.json +4 -4
- package/web/dist/assets/{accounts-section-B8X63Wvk.js → accounts-section-DJ_M9Wt5.js} +1 -1
- package/web/dist/assets/{activity-motion-BX7w9uwa.js → activity-motion-CeNmzIIs.js} +1 -1
- package/web/dist/assets/{activity-route-D6OhCzkJ.js → activity-route-CYn-qQq2.js} +1 -1
- package/web/dist/assets/{agent-config-section-RluVjTDv.js → agent-config-section-C89KQhYI.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-Bl67Iurg.js → agent-defaults-section-CsIHvRnd.js} +1 -1
- package/web/dist/assets/{appearance-ChGEz79A.js → appearance-xdlVXLZN.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-DtMYAmPH.js → archive-on-merge-field-vYZF1Wln.js} +1 -1
- package/web/dist/assets/{ask-card-Bk87kXMi.js → ask-card-CTkwopg6.js} +1 -1
- package/web/dist/assets/{automations-route-DpEqMGRx.js → automations-route-DhkRC_XY.js} +1 -1
- package/web/dist/assets/{commit-list-DGLW8f7_.js → commit-list-B3px5blI.js} +1 -1
- package/web/dist/assets/{diff-BQIvq2Ar.js → diff-4OKh2896.js} +2 -2
- package/web/dist/assets/{diff-controls-CcYIa7pJ.js → diff-controls-CQuYWKK_.js} +1 -1
- package/web/dist/assets/{diff-view-BSYPKJkF.js → diff-view-BZi9U7Rt.js} +6 -6
- package/web/dist/assets/{discard-changes-dialog-CEeuND_i.js → discard-changes-dialog-DRLVQrRX.js} +1 -1
- package/web/dist/assets/{file-preview-BPSpXZ6G.js → file-preview-DwDnEbjs.js} +1 -1
- package/web/dist/assets/{git-toolbar-D3O7S7vw.js → git-toolbar-CnbRMfPP.js} +1 -1
- package/web/dist/assets/{github-b6pU4RVM.js → github-BFdjku0b.js} +1 -1
- package/web/dist/assets/{global-activity-route-sTvejVUG.js → global-activity-route-CYV5tNqR.js} +1 -1
- package/web/dist/assets/{index-CIyGnGfm.js → index-BlqAIDwd.js} +4 -4
- package/web/dist/assets/index-DrL3MqE4.css +1 -0
- package/web/dist/assets/{markdown-DnBvknF9.js → markdown-BA-2Hv-H.js} +1 -1
- package/web/dist/assets/{option-select-HC8juekO.js → option-select-Bz-6fs6-.js} +1 -1
- package/web/dist/assets/{preferences-section-DuV8JFqQ.js → preferences-section-CGPTMvPb.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-E8n0RgYL.js → preview-pane-connected-Km1_yTQu.js} +1 -1
- package/web/dist/assets/{project-location-bPiIsStE.js → project-location-DgWnz24i.js} +1 -1
- package/web/dist/assets/{projects-section-0eQ2TVqw.js → projects-section-C5Lm9E1X.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-CVNw5v0w.js → prompt-templates-section-BSqqmMzn.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-tNcad9fA.js → remote-settings-notice-CPMHtuyk.js} +1 -1
- package/web/dist/assets/{repo-git-DA66978k.js → repo-git-Dr-LPs33.js} +1 -1
- package/web/dist/assets/{report-reader-DHB5teJQ.js → report-reader-BXPtT3jw.js} +1 -1
- package/web/dist/assets/{reports-Oxg0v5bR.js → reports-BztUxdF1.js} +1 -1
- package/web/dist/assets/{resources-section-BAj-A1Ou.js → resources-section-CKxYxZlu.js} +1 -1
- package/web/dist/assets/{review-notes-drafts-agZQaBcF.js → review-notes-drafts-B7QtBlMK.js} +1 -1
- package/web/dist/assets/{review-panel-858YvYOc.js → review-panel-WjhjBT-O.js} +1 -1
- package/web/dist/assets/review-strip-lK-KV-Bh.js +1 -0
- package/web/dist/assets/{run-diff-BDFptONx.js → run-diff-BzL5y9aa.js} +1 -1
- package/web/dist/assets/{run-header-CEIKmo_0.js → run-header-D_I9i1FK.js} +2 -2
- package/web/dist/assets/{select-C4s2-ztq.js → select-C3I9ZinR.js} +1 -1
- package/web/dist/assets/{session-context-section-CihFGtUL.js → session-context-section-Bko3JFzB.js} +1 -1
- package/web/dist/assets/{settings-agent-picker-B-LnnccN.js → settings-agent-picker-CA5KEY0b.js} +1 -1
- package/web/dist/assets/{settings-save-bar-l5vO-fT3.js → settings-save-bar-DXlarWtq.js} +1 -1
- package/web/dist/assets/{settings-shell-B_o8TQYi.js → settings-shell-BvkTyfyu.js} +1 -1
- package/web/dist/assets/{sidebar-section-BTjJD2PF.js → sidebar-section-BWGMQzwD.js} +1 -1
- package/web/dist/assets/{skills-C-PLlLf0.js → skills-khuz63Be.js} +1 -1
- package/web/dist/assets/task-changes-BZiv3oW9.js +5 -0
- package/web/dist/assets/task-commits-C319iu69.js +1 -0
- package/web/dist/assets/{task-file-scope-npOd7AhM.js → task-file-scope-CVzNnBlI.js} +1 -1
- package/web/dist/assets/{task-files--54CdvAw.js → task-files-BwWE5iwD.js} +1 -1
- package/web/dist/assets/{task-github-item-QzP9IPGg.js → task-github-item--JaIohoc.js} +1 -1
- package/web/dist/assets/{task-thread-BgxYbzJU.js → task-thread-D_Yc4SUV.js} +1 -1
- package/web/dist/assets/{thread-state-CfmY7F3h.js → thread-state-DAlHXYiH.js} +1 -1
- package/web/dist/assets/{unified-diff-DdU6bcRV.js → unified-diff-C46MIUZz.js} +1 -1
- package/web/dist/assets/{use-finish-run-Bv7_Ezz_.js → use-finish-run-0YNEOl4g.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-dHej93ZU.js → use-hand-to-agent-state-CkqtX66f.js} +1 -1
- package/web/dist/assets/use-path-bases-Dpl3ksiL.js +1 -0
- package/web/dist/assets/{workflows-CeUWNdYH.js → workflows-D5gUtDwQ.js} +1 -1
- package/web/dist/assets/{workspace-tools-BwMECWWr.js → workspace-tools-CCQ42oji.js} +1 -1
- package/web/dist/assets/{worktrees-section-CytHZvmT.js → worktrees-section-B_8wVdPI.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-BToDejlf.css +0 -1
- package/web/dist/assets/review-strip-tiqQt7qS.js +0 -1
- package/web/dist/assets/task-changes-BZ7Hlj9q.js +0 -5
- package/web/dist/assets/task-commits-Jf35_1k0.js +0 -1
- package/web/dist/assets/use-path-bases-B6yYqrmU.js +0 -1
|
@@ -1,5 +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{B as r,S as i,Tt as a,Ut as o,Wt as s,Zt as c,on as l,zn as u}from"./queries-CPNrCEon.js";import{$r as d,Ji as f,Kt as p,Ot as m,Vt as h,Wt as g,a as _,ha as v,st as y,ut as ee,wn as b,zt as x}from"./project-scope-context-_6sNMsAf.js";import{g as S}from"./chunk-KS7C4IRE-BdLLx37K.js";import{o as C}from"./dist-CCX8mhHc.js";import{M as w,u as T,w as E}from"./design-icons-QbNMZniQ.js";import{t as te}from"./run-header-CEIKmo_0.js";import{i as D,n as ne,r as O}from"./git-toolbar-D3O7S7vw.js";import{t as k}from"./button-BV_AiLj2.js";import{a as A,i as j,o as M,r as N,s as P,t as F}from"./dialog-DKr-j9S6.js";import{m as I}from"./task-groups-Bc_WNTMe.js";import{f as re,l as ie,m as ae}from"./page-shell-BdjH5hyc.js";import{t as L}from"./centered-state-N8vWM_Hw.js";import{D as oe,E as se,Vn as ce,gn as le,rt as ue}from"./index-CIyGnGfm.js";import{t as R}from"./textarea-BGp28xFr.js";import{t as z}from"./markdown-BBDDg-4t.js";import{a as B,i as V,o as H,t as U}from"./unified-diff-DdU6bcRV.js";import{n as de,t as fe}from"./review-notes-drafts-agZQaBcF.js";import{t as pe}from"./diff-BQIvq2Ar.js";import{t as me}from"./code-workbench-B0GIezrD.js";import{t as he}from"./file-text-nGpo7MVd.js";import{i as ge,n as W,r as _e}from"./selected-file-CfBWFB6p.js";var G=e(t(),1),K=`no worktree — this task ran directly in the repo working tree`;function q(e){let t=e=>({id:`commit`,label:`Commit`,enabled:!1,reason:e});return e.hasWorktree?e.run.status===`running`?t(`Commit unavailable — the agent is still working in this worktree`):e.changedFiles===void 0?t(`Commit unavailable — changes are still loading`):e.changedFiles===0?t(`Commit unavailable — no changes to commit`):{id:`commit`,label:`Commit`,enabled:!0}:t(`Commit unavailable — ${K}`)}function J(e){let t=e=>({id:`push`,label:`Push`,enabled:!1,reason:e});return e.hasWorktree?e.remote===void 0?t(`Push unavailable — no remote configured`):e.branch===void 0?t(`Push unavailable — the run has no branch to push`):e.run.status===`running`?t(`Push unavailable — the agent is still working in this worktree`):{id:`push`,label:`Push`,enabled:!0}:t(`Push unavailable — ${K}`)}function ve(e){let t=e=>({id:`create-pr`,label:`Draft PR`,enabled:!1,reason:e});return!e.hasWorktree||e.branch===void 0?t(`Draft PR unavailable — ${K}`):e.forge===null?t(`Draft PR unavailable — no supported forge remote (GitHub) detected`):e.forge.available?f(e.run)?t(`Draft PR unavailable — the run is waiting on a usage-limit hold; choose Don’t resume first`):d(e.run)?t(`Draft PR unavailable — the run is still active; wait for the review gate`):{id:`create-pr`,label:`Draft PR`,enabled:!0}:t(`Draft PR unavailable — ${e.forge.reason??`the forge is unreachable`}`)}function ye(e){let t=e.prUrl?{id:`view-pr`,label:`View PR`,enabled:!0,href:e.prUrl}:q(e),n=e.prUrl?[q(e),J(e)]:[J(e),ve(e)],r=[];if(e.localHandoff&&e.cliHandoff!==!1){let t=e.worktreeUnavailable?{id:`open-terminal`,label:`Open in terminal`,enabled:!1,reason:`Terminal unavailable — ${K}`}:e.hasSession?d(e.run)?{id:`open-terminal`,label:`Open in terminal`,enabled:!1,reason:`Terminal unavailable — the session is still active in the engine`}:{id:`open-terminal`,label:`Open in terminal`,enabled:!0}:{id:`open-terminal`,label:`Open in terminal`,enabled:!1,reason:`Terminal unavailable — no agent session to resume`};r.push(t)}return{primary:t,primaryVariant:e.run.status===`review`?`outline`:`primary`,secondary:n,menu:r}}function be(e,t){let[n=``,...r]=t.trim().split(`
|
|
2
|
-
`),i=[n,...r.map(e=>e.trim()===``?``:` ${e.trimEnd()}`)].join(`
|
|
3
|
-
`);return`- \`${xe(e)}\` — ${i}`}function xe({path:e,side:t,line:n}){let r=typeof n==`number`||n.start===n.end?String(typeof n==`number`?n:n.start):`${n.start}-${n.end}`;return t===`old`?`${e} (old ${r})`:`${e}:${r}`}function Se(e,t,n){let r=fe(e).notes;de(e,{open:!0,notes:`${r}${r===``||r.endsWith(`
|
|
4
|
-
`)?``:`
|
|
5
|
-
`}${be(t,n)}`})}var Y=n();function Ce({run:e,open:t,onOpenChange:n}){let r=v(),[i,a]=(0,G.useState)(``),o=I(e),s=(0,G.useRef)(o);s.current=o,(0,G.useEffect)(()=>{t&&a(s.current)},[t]);let c=u({mutationFn:t=>y(e.id,t),onSuccess:t=>{_(`Committed ${ce(t.sha)}`),n(!1),r.invalidateQueries({queryKey:l.runs.changes(e.id)}),r.invalidateQueries({queryKey:l.runs.all})},onError:e=>_(e.message,{tone:`danger`})}),d=()=>{let e=i.trim();e.length===0||c.isPending||c.mutate(e)};return(0,Y.jsx)(F,{open:t,onOpenChange:n,children:(0,Y.jsxs)(N,{"data-slot":`commit-dialog`,children:[(0,Y.jsxs)(M,{children:[(0,Y.jsx)(P,{children:`Commit changes`}),(0,Y.jsxs)(j,{children:[`Stages everything in the task's worktree (git add -A) and commits to`,` `,e.branch?(0,Y.jsx)(`span`,{className:`font-mono`,children:e.branch}):`its branch`,`.`]})]}),(0,Y.jsx)(R,{"data-slot":`commit-message`,"aria-label":`Commit message`,rows:3,value:i,onChange:e=>a(e.target.value),onKeyDown:e=>{ue(e)&&(e.preventDefault(),d())}}),(0,Y.jsxs)(A,{children:[(0,Y.jsx)(k,{variant:`outline`,onClick:()=>n(!1),children:`Cancel`}),(0,Y.jsx)(k,{"data-slot":`commit-confirm`,disabled:i.trim().length===0||c.isPending,onClick:d,children:c.isPending?`Committing…`:`Commit`})]})]})})}function X(){let{id:e}=S(),t=o(e);return t.isPending?(0,Y.jsx)(oe,{tab:`changes`}):t.isError?(0,Y.jsx)(se,{tab:`changes`,error:t.error}):(0,Y.jsx)(we,{run:t.data},t.data.id)}function we({run:e}){let t=r(),n=i(),a=s(e.id,d(e)),o=ae(),[c,f]=(0,G.useState)(`unified`),[p,m]=(0,G.useState)(!0),[y,x]=(0,G.useState)(!1),[S,C]=(0,G.useState)(!1),w=v(),T=()=>w.invalidateQueries({queryKey:l.runs.all}),E=e=>_(e.message,{tone:`danger`}),D=u({mutationFn:()=>g(e.id),onSuccess:e=>_(e.upstreamSet?`Pushed ${e.branch} to ${e.remote} (upstream set)`:`Pushed ${e.branch} to ${e.remote}`),onError:E}),O=u({mutationFn:()=>ee(e.id),onSuccess:e=>{_(`Draft PR created — ${e.url}`),T()},onError:E}),k=u({mutationFn:()=>h(e.id),onError:e=>{if(e instanceof b&&e.command){navigator.clipboard.writeText(e.command).then(()=>_(`No terminal found — command copied to clipboard.`)).catch(()=>_(`Run manually: ${e.command}`));return}E(e)}}),A=$(a),j=Q(e,A),M=ye({run:e,cliHandoff:e.cliHandoff,hasWorktree:!!e.worktreePath&&!A,worktreeUnavailable:!!e.worktreeReclaimedAt||j.workspaceDeleted,branch:e.branch,changedFiles:a.data?.stat.files,remote:n.data?.info?.remote,forge:t.data?.forge??null,localHandoff:t.data?.capabilities.localHandoff??!1,hasSession:le(e)!==void 0,prUrl:e.pullRequestUrl}),N=e=>{switch(e){case`commit`:C(!0);break;case`push`:D.mutate();break;case`create-pr`:O.mutate();break;case`open-terminal`:k.mutate();break;case`view-pr`:break}},P=j.available?j.files:a.data?.files??[],F=j.available?j.stat:a.data?.stat,I=(0,G.useMemo)(()=>P.some(z),[P]),L=o?c:`unified`;return(0,Y.jsxs)(ie,{route:`task-changes`,density:re(P.length),flushPadding:!0,children:[(0,Y.jsx)(te,{run:e,tab:`changes`}),(0,Y.jsx)(ne,{bar:M,healthReady:t.data!==void 0,branch:e.branch,stat:F,mode:L,wrap:p,preview:y,onModeChange:f,onWrapChange:m,onPreviewChange:I?x:void 0,onAction:N}),(0,Y.jsx)(Z,{run:e,mode:L,wrap:p,preview:y}),(0,Y.jsx)(Ce,{run:e,open:S,onOpenChange:C})]})}function Z({run:e,mode:t=`unified`,wrap:n=!0,preview:i=!1,revealRef:a}){let o=r(),c=s(e.id,d(e)),l=u({mutationFn:t=>x(e.id,t),onError:e=>_(e.message,{tone:`danger`})}),f=$(c),p=Q(e,f),m=p.available?p.files:c.data?.files??[],h=p.available?p.files:c.data?.files,g=(0,G.useMemo)(()=>O(m),[m]),v=ge(e.id),y=_e(e.id,`changes`,h);return(0,G.useEffect)(()=>{if(a)return a.current=t=>m.some(e=>e.path===t)?(W(e.id,t),y.reveal(t),!0):!1,()=>{a.current=null}},[a,m,e.id,y]),(0,Y.jsxs)(Y.Fragment,{children:[c.data?.repointedHead?(0,Y.jsxs)(`p`,{"data-slot":`repointed-head-note`,className:`border-b px-4 py-2 text-xs text-soft-foreground md:px-9`,children:[`HEAD is on `,(0,Y.jsx)(`code`,{children:c.data.repointedHead.headBranch}),`, not this task's branch`,` `,(0,Y.jsx)(`code`,{children:c.data.repointedHead.taskBranch}),` — showing only what this task changed there.`]}):null,p.available&&p.observedAt?(0,Y.jsx)(B,{observedAt:p.observedAt,headSha:p.headSha,truncated:p.truncated,worktreeRemoved:p.worktreeRemoved,variant:`bar`}):null,(0,Y.jsx)(Te,{changes:c,changesRefused:f,stored:p,fileCount:m.length,children:(0,Y.jsx)(Ee,{runId:e.id,files:m,tree:g,selected:v,selectFile:t=>{W(e.id,t),y.reveal(t)},diffRef:y,effectiveMode:t,effectiveWrap:n,preview:i,stored:p.available,localHandoff:o.data?.capabilities.localHandoff,onOpenInApp:l.mutate,onNote:e.status===`review`?(t,n)=>Se(e.id,t,n):void 0})})]})}function Q(e,t){let n=a(e),r=c(e.id,{includeDiff:!0,enabled:t,version:n}),i=t?r.data:void 0,o=i?.diff.state===`available`?i.diff.patch:void 0,s=o!==void 0,l=(0,G.useMemo)(()=>o?V(o):[],[o]),u=(0,G.useMemo)(()=>s&&l.length>0?U(l):void 0,[s,l]);return{pending:t&&r.isPending,available:s,observedAt:i?.observedAt,headSha:i?.head.sha,truncated:i?.diff.state===`available`?i.diff.truncated||!!i.diff.patchTruncated:!1,worktreeRemoved:i?H(i):!1,workspaceDeleted:i?.workspace.state===`deleted`,files:l,stat:u}}function $(e){return e.isError&&e.error instanceof b&&e.error.status===409}function Te({changes:e,changesRefused:t,stored:n,fileCount:r,children:i}){return e.isPending||n.pending?(0,Y.jsx)(`p`,{"data-slot":`changes-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-9`,children:`Loading changes…`}):n.available?r===0?(0,Y.jsx)(L,{icon:(0,Y.jsx)(E,{size:16}),tone:`neutral`,heading:`h2`,title:`No changes recorded in stored snapshot`,subtitle:`The worktree matched its base branch when this snapshot was saved.`}):i:e.isError?(0,Y.jsx)(L,{icon:t?(0,Y.jsx)(E,{size:16}):(0,Y.jsx)(w,{size:16}),tone:t?`neutral`:`danger`,heading:`h2`,title:t?`No changes to show`:`Could not load the changes`,subtitle:e.error.message}):r===0?(0,Y.jsx)(L,{icon:(0,Y.jsx)(E,{size:16}),tone:`neutral`,heading:`h2`,title:`No changes yet`,subtitle:`The worktree matches its base branch. Changes appear here as the agent works.`}):i}function Ee({runId:e,files:t,tree:n,selected:r,selectFile:i,diffRef:a,effectiveMode:o,effectiveWrap:s,preview:c,stored:l=!1,localHandoff:u,onOpenInApp:d,onNote:f}){let[h,g]=(0,G.useState)(!1);return(0,Y.jsx)(me,{className:`px-4 pb-9 pt-0 [--diff-sticky-top:0px] md:px-9`,treeSlot:`changes-tree-pane`,treeClassName:`rounded-xl border border-border bg-card md:sticky md:top-4 md:max-h-[calc(100dvh_-_64px_-_2rem)] md:overflow-y-auto md:overscroll-contain md:p-3.5`,tree:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`button`,{type:`button`,"data-slot":`changes-tree-toggle`,"aria-expanded":h,onClick:()=>g(e=>!e),className:`flex min-h-11 w-full items-center justify-between gap-2 px-3.5 py-2 text-left text-xs font-semibold text-foreground md:hidden`,children:[(0,Y.jsxs)(`span`,{children:[`Changed files`,` `,(0,Y.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,t.length,`)`]})]}),(0,Y.jsx)(T,{size:16,"aria-hidden":`true`,className:C(`size-4 shrink-0 text-muted-foreground motion-safe:transition-transform`,h&&`rotate-180`)})]}),(0,Y.jsx)(`h2`,{className:`mb-3 hidden border-b border-border pb-3 text-xs font-semibold md:block`,children:`Changed files`}),(0,Y.jsx)(`div`,{className:C(h?`border-t border-border px-3.5 py-3 md:border-t-0 md:p-0`:`hidden md:block`),children:(0,Y.jsx)(D,{root:n,selected:r,onSelect:e=>{i(e),g(!1)}})})]}),children:(0,Y.jsx)(pe,{files:t,viewRef:a,mode:o,wrap:s,preview:c,loadFileText:l?void 0:t=>he(()=>m(e,t)),imageSrc:l?void 0:t=>p(e,t),onOpenInApp:!l&&u&&d?e=>d(e):void 0,onNote:l?void 0:f,totals:!1,className:`min-w-0 flex-1`})})}export{Z as ChangesPane,X as TaskChangesRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./react-runtime-CCIEwYL0.js";import{Bn as t,Gt as n,Kt as r,Ut as i,on as a}from"./queries-CPNrCEon.js";import{$r as o,Tt as s,wn as c,wt as l}from"./project-scope-context-_6sNMsAf.js";import{g as u}from"./chunk-KS7C4IRE-BdLLx37K.js";import{C as d,M as f}from"./design-icons-QbNMZniQ.js";import{t as p}from"./run-header-CEIKmo_0.js";import{t as m}from"./project-router-l_pJCK5X.js";import"./task-groups-Bc_WNTMe.js";import{f as h,l as g,m as _}from"./page-shell-BdjH5hyc.js";import{t as v}from"./centered-state-N8vWM_Hw.js";import{Bn as y,D as b,E as x}from"./index-CIyGnGfm.js";import{t as S}from"./change-counts-BLLRvt46.js";import{t as C}from"./code-workbench-B0GIezrD.js";import{t as w}from"./file-text-nGpo7MVd.js";import{i as T,r as E,t as D}from"./commit-list-DGLW8f7_.js";import{i as O,n as k,r as A}from"./selected-file-CfBWFB6p.js";var j=e();function M(){let{id:e}=u(),t=i(e);return t.isPending?(0,j.jsx)(b,{tab:`changes`}):t.isError?(0,j.jsx)(x,{tab:`changes`,error:t.error}):(0,j.jsx)(N,{run:t.data})}function N({run:e}){let{sha:t}=u(),n=r(e.id,o(e)),i=_(),a=t??n.data?.commits[0]?.sha,s=t!==void 0&&(!i||n.isError||n.data?.commits.length===0);return(0,j.jsxs)(g,{route:`task-commits`,density:h(n.data?.commits.length??0),flushPadding:!0,children:[(0,j.jsx)(p,{run:e,tab:`commits`}),s?(0,j.jsx)(F,{runId:e.id,sha:t}):n.isPending?(0,j.jsx)(`p`,{"data-slot":`commits-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-9`,children:`Loading commits…`}):n.isError?(0,j.jsx)(v,{icon:(0,j.jsx)(f,{size:16}),tone:n.error instanceof c&&n.error.status===409?`neutral`:`danger`,heading:`h2`,title:n.error instanceof c&&n.error.status===409?`No commits to show`:`Could not load the commits`,subtitle:n.error.message}):n.data.commits.length===0?(0,j.jsx)(v,{icon:(0,j.jsx)(f,{size:16}),tone:`neutral`,heading:`h2`,title:`No commits yet`,subtitle:`This task hasn't committed anything on its branch. Autosave commits and any the agent makes appear here.`}):(0,j.jsx)(P,{run:e,commits:n.data.commits,selectedSha:a})]})}function P({run:e,commits:t,selectedSha:r}){let i=n(e.id,r),a=L(e.id,t),o=A(e.id,`commit:${r??``}`,i.data?.files),c=O(e.id);return(0,j.jsx)(C,{className:`px-4 py-5 md:px-9`,treeSlot:`task-commits-pane`,tree:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(D,{slot:`task-commits`,selectedSha:r,heading:(0,j.jsxs)(`h2`,{className:`text-sm font-semibold text-foreground`,children:[t.length,` `,t.length===1?`commit`:`commits`,` in this task`]}),className:`w-full`,commits:t.map(t=>({...t,href:`/tasks/${e.id}/commits/${t.sha}`,stat:a.get(t.sha)}))}),r&&i.data&&i.data.files.length>0?(0,j.jsx)(R,{runId:e.id,sha:r,files:i.data.files,selected:c,onPick:t=>{k(e.id,t),o.reveal(t)}}):null]}),children:r?(0,j.jsx)(T,{commit:i,sha:r,slot:`task-commit-preview`,heading:`h3`,diffRef:o,loadFileText:t=>w(()=>s(e.id,r,t))}):null})}function F({runId:e,sha:t}){let r=n(e,t);return(0,j.jsx)(E,{commit:r,sha:t,diffRef:A(e,`commit:${t}`,r.data?.files),backTo:`/tasks/${e}/commits`,backLabel:`All commits`,slot:`task-commit`,loadFileText:n=>w(()=>s(e,t,n))})}var I=12;function L(e,n){let r=n.length<=I,i=t({queries:n.map(t=>({queryKey:a.runs.commit(e,t.sha),queryFn:({signal:n})=>l(e,t.sha,{signal:n}),enabled:r,retry:!1}))}),o=new Map;return i.forEach((e,t)=>{let r=n[t]?.sha;r&&e.data?.stat&&o.set(r,e.data.stat)}),o}function R({runId:e,sha:t,files:n,selected:r,onPick:i}){return(0,j.jsxs)(`section`,{"data-slot":`task-commit-files`,className:`mt-4 rounded-xl border border-border bg-card p-4`,children:[(0,j.jsxs)(`div`,{className:`mb-2 flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1`,children:[(0,j.jsxs)(`h2`,{className:`text-sm font-semibold text-foreground`,children:[n.length,` `,n.length===1?`file`:`files`,` in`,` `,(0,j.jsx)(y,{sha:t,variant:`inline`,className:`text-[13px] font-medium`})]}),(0,j.jsx)(m,{to:`/tasks/${e}/changes`,className:`text-xs text-muted-foreground hover:text-foreground`,children:`All task changes ›`})]}),(0,j.jsx)(`ul`,{className:`space-y-1`,children:n.map(e=>(0,j.jsx)(`li`,{children:(0,j.jsxs)(`button`,{type:`button`,"data-slot":`task-commit-file`,title:e.oldPath?`${e.oldPath} → ${e.path}`:e.path,"aria-current":e.path===r?`true`:void 0,onClick:()=>i(e.path),className:`flex min-h-11 w-full items-center gap-2 rounded-md px-2 text-left text-xs text-muted-foreground hover:bg-muted hover:text-foreground aria-[current=true]:bg-muted aria-[current=true]:text-foreground`,children:[(0,j.jsx)(d,{size:16,"aria-hidden":`true`,className:`size-[15px] shrink-0`}),(0,j.jsx)(`span`,{className:`min-w-0 flex-1 break-all`,children:e.path}),(0,j.jsx)(S,{adds:e.adds,dels:e.dels,className:`font-mono text-xs`})]})},e.path))})]})}export{M as TaskCommitsRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{rt as e}from"./queries-CPNrCEon.js";import{n as t}from"./project-location-bPiIsStE.js";function n(){return{home:e().data?.homeDir??null,root:t()}}export{n as t};
|