@pat-lewczuk/cezar 0.1.4 → 0.1.5
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/README.md +124 -37
- package/dist/config.d.ts +46 -0
- package/dist/config.js +31 -0
- package/dist/config.js.map +1 -1
- package/dist/core/agent-runner.d.ts +16 -0
- package/dist/core/agent-runner.js +9 -0
- package/dist/core/agent-runner.js.map +1 -1
- package/dist/core/claude-cli-runner.d.ts +6 -0
- package/dist/core/claude-cli-runner.js +27 -43
- package/dist/core/claude-cli-runner.js.map +1 -1
- package/dist/core/codex-app-server-runner.js +42 -5
- package/dist/core/codex-app-server-runner.js.map +1 -1
- package/dist/core/opencode-server-runner.js +42 -5
- package/dist/core/opencode-server-runner.js.map +1 -1
- package/dist/git-worktree.d.ts +21 -0
- package/dist/git-worktree.js +48 -4
- package/dist/git-worktree.js.map +1 -1
- package/dist/handoff.d.ts +1 -1
- package/dist/handoff.js +2 -0
- package/dist/handoff.js.map +1 -1
- package/dist/index.js +34 -4
- package/dist/index.js.map +1 -1
- package/dist/runs/store.d.ts +82 -1
- package/dist/runs/store.js +57 -5
- package/dist/runs/store.js.map +1 -1
- package/dist/server/git.js +12 -1
- package/dist/server/git.js.map +1 -1
- package/dist/server/github.d.ts +8 -29
- package/dist/server/github.js +7 -139
- package/dist/server/github.js.map +1 -1
- package/dist/server/pr.d.ts +5 -20
- package/dist/server/pr.js +4 -95
- package/dist/server/pr.js.map +1 -1
- package/dist/server/server.d.ts +30 -1
- package/dist/server/server.js +448 -19
- package/dist/server/server.js.map +1 -1
- package/dist/workflows/run.d.ts +90 -0
- package/dist/workflows/run.js +412 -29
- package/dist/workflows/run.js.map +1 -1
- package/dist/workflows/types.d.ts +16 -16
- package/package.json +44 -6
- package/scripts/check-pack.mjs +46 -0
- package/scripts/dev.mjs +74 -0
- package/scripts/mock-claude.mjs +54 -2
- package/scripts/test-process-usage.mjs +47 -0
- package/web/dist/assets/{toaster-BS2E1bhz.js → centered-state-zgEVNWsj.js} +1 -1
- package/web/dist/assets/compare-variants-ChHCcSQX.js +1 -0
- package/web/dist/assets/dialog-DDRjj-uK.js +1 -0
- package/web/dist/assets/{diff-view-CctnJHWe.js → diff-view-CWRO0GMe.js} +1 -1
- package/web/dist/assets/dist-id2CeyV-.js +1 -0
- package/web/dist/assets/git-toolbar-C4jo602L.js +1 -0
- package/web/dist/assets/github-BOIzQFwE.js +1 -0
- package/web/dist/assets/index-Cv1pQs9U.js +11 -0
- package/web/dist/assets/repo-git-BuyJiqna.js +1 -0
- package/web/dist/assets/{run-diff-C7mfxj7f.js → run-diff-BocG6LVd.js} +1 -1
- package/web/dist/assets/run-header-CDKw22ek.js +1 -0
- package/web/dist/assets/skill-detail-CcFFKmGO.js +1 -0
- package/web/dist/assets/skills-Bc_4U3yq.js +1 -0
- package/web/dist/assets/tab-link-C77EP3i6.js +1 -0
- package/web/dist/assets/task-changes-DsDgN8-x.js +1 -0
- package/web/dist/assets/task-commits-Dve6Fozc.js +1 -0
- package/web/dist/assets/{task-files-FOAAz2FB.js → task-files-BDMc_z0B.js} +1 -1
- package/web/dist/assets/{task-thread-Bncxe8Os.js → task-thread-CmRuPj9H.js} +2 -2
- package/web/dist/assets/use-desktop-CyEWsxSU.js +3 -0
- package/web/dist/assets/{workflows-Dg2wQg6i.js → workflows-J3z3kYic.js} +1 -1
- package/web/dist/index.html +5 -5
- package/web/app/node_modules/.vite/vitest/ca84d1343b96baa8137c943ed1860e522cacb238/results.json +0 -1
- package/web/app/src/components/app-shell-container.tsx +0 -76
- package/web/app.js +0 -3428
- package/web/dist/assets/compare-variants-D6fPL9cS.js +0 -1
- package/web/dist/assets/dialog-BEgEWFDS.js +0 -1
- package/web/dist/assets/dist-CW7M_Jhs.js +0 -1
- package/web/dist/assets/git-toolbar-D8OPPqBP.js +0 -1
- package/web/dist/assets/github-BYIHwIJB.js +0 -1
- package/web/dist/assets/index-9qG98Orw.js +0 -11
- package/web/dist/assets/repo-git-XTqlVOl2.js +0 -1
- package/web/dist/assets/run-header-CfVeY3uM.js +0 -1
- package/web/dist/assets/skill-detail-C9cniyId.js +0 -1
- package/web/dist/assets/skills-DXgY1uXJ.js +0 -1
- package/web/dist/assets/tab-link-phWEqSBy.js +0 -1
- package/web/dist/assets/task-changes-DYwnPnTN.js +0 -1
- package/web/dist/assets/task-commits-DZzxEzbn.js +0 -1
- package/web/dist/assets/use-desktop-eHm2iTXX.js +0 -3
- package/web/index.html +0 -108
- package/web/style.css +0 -1767
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,o as n}from"./bundle-mjs-DLPpRFyl.js";import{D as r,Dt as i,F as a,Ft as o,I as s,L as c,Lt as l,Z as u,a as d,bt as f,j as p,k as m,n as h,r as g,rt as _,zt as v}from"./toaster-BS2E1bhz.js";import{t as y}from"./utils-rQGbOrwc.js";import{t as b}from"./arrow-left-BE957rJs.js";import{n as x}from"./loader-circle-BV3DO9mE.js";import{t as S}from"./tab-link-phWEqSBy.js";import{a as C,i as w,r as T,t as E}from"./git-toolbar-D8OPPqBP.js";import{a as D,i as O,n as k,r as A,t as j}from"./use-desktop-eHm2iTXX.js";import{t as M}from"./git-pull-request-DJkAMT0f.js";import{t as N}from"./search-x-CoCyl7zT.js";import{t as P}from"./triangle-alert-6su4Js5O.js";import{t as F}from"./input-BRsSo4xH.js";import{$ as I,P as L,p as R,rt as z}from"./index-9qG98Orw.js";var B=t(n(),1),V=e();function H({repo:e,info:t}){let n=p(),i=v(),a=e=>h(e.message,{tone:`danger`}),o=l({mutationFn:e=>_({name:e}),onSuccess:e=>{h(e.created?`Created and switched to ${e.branch}`:`Switched to ${e.branch}`),i.invalidateQueries({queryKey:r.repo}),i.invalidateQueries({queryKey:r.health})},onError:a}),s=l({mutationFn:e=>f({baseBranch:e}),onSuccess:e=>{h(e.baseBranch?`Agents now branch from ${e.baseBranch}`:`Agents now branch from the current checkout`),i.invalidateQueries({queryKey:r.repo})},onError:a}),[c,u]=(0,B.useState)(``);return(0,V.jsxs)(`section`,{"data-slot":`repo-branches`,className:`flex flex-col gap-6 px-4 py-4 md:px-6`,children:[(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`h2`,{className:`text-xs font-semibold tracking-wide text-soft-foreground uppercase`,children:`Branches`}),(0,V.jsx)(`ul`,{"data-slot":`repo-branch-list`,className:`mt-2 flex max-w-xl flex-col divide-y divide-border`,children:e.branches.map(e=>{let n=e===t.branch;return(0,V.jsxs)(`li`,{"data-slot":`branch-row`,"data-branch":e,className:`flex min-h-9 items-center gap-2 py-1`,children:[(0,V.jsx)(z,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,V.jsx)(`span`,{className:y(`min-w-0 truncate font-mono text-xs`,n&&`font-semibold`),children:e}),n?(0,V.jsxs)(`span`,{"data-slot":`branch-current`,className:`flex shrink-0 items-center gap-1 rounded-sm bg-muted px-1.5 py-px text-[10px] font-medium text-muted-foreground`,children:[(0,V.jsx)(x,{"aria-hidden":`true`,className:`size-3`}),`current`]}):(0,V.jsx)(d,{variant:`ghost`,size:`sm`,"data-action":`switch-branch`,className:`ml-auto`,disabled:o.isPending,onClick:()=>o.mutate(e),children:`Switch`})]},e)})}),(0,V.jsxs)(`form`,{"data-slot":`branch-create`,className:`mt-3 flex max-w-md items-center gap-2`,onSubmit:e=>{e.preventDefault();let t=c.trim();t&&o.mutate(t,{onSuccess:()=>u(``)})},children:[(0,V.jsx)(F,{"aria-label":`New branch name`,placeholder:`new-branch-name`,value:c,onChange:e=>u(e.target.value)}),(0,V.jsxs)(d,{type:`submit`,variant:`outline`,size:`sm`,"data-action":`create-branch`,disabled:!c.trim()||o.isPending,children:[(0,V.jsx)(I,{"aria-hidden":`true`}),`Create`]})]})]}),(0,V.jsxs)(`div`,{className:`max-w-md`,children:[(0,V.jsx)(`label`,{htmlFor:`base-branch-picker`,className:`text-xs font-semibold tracking-wide text-soft-foreground uppercase`,children:`Agents’ base branch`}),(0,V.jsxs)(`select`,{id:`base-branch-picker`,"data-slot":`base-branch-picker`,value:e.baseBranch??``,disabled:s.isPending,onChange:e=>s.mutate(e.target.value===``?null:e.target.value),className:`mt-1.5 block w-full rounded-md border border-input bg-card px-3 py-1.5 text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:opacity-50`,children:[(0,V.jsx)(`option`,{value:``,children:`current checkout (default)`}),e.branches.map(e=>(0,V.jsx)(`option`,{value:e,children:e},e))]}),(0,V.jsx)(`p`,{className:`mt-1 text-[11px] text-soft-foreground`,children:`New task worktrees branch from this.`})]}),n.data?.forge?.available?(0,V.jsx)(U,{}):null]})}function U(){let e=m({limit:20});return(0,V.jsxs)(`div`,{"data-slot":`repo-prs`,className:`max-w-xl`,children:[(0,V.jsx)(`h2`,{className:`text-xs font-semibold tracking-wide text-soft-foreground uppercase`,children:`Open pull requests`}),e.isPending?(0,V.jsx)(`p`,{className:`mt-2 text-xs text-soft-foreground`,children:`Loading pull requests…`}):e.isError?(0,V.jsx)(`p`,{className:`mt-2 text-xs text-soft-foreground`,children:e.error.message}):e.data.available?e.data.prs.length===0?(0,V.jsx)(`p`,{className:`mt-2 text-xs text-soft-foreground`,children:`No open pull requests.`}):(0,V.jsx)(`ul`,{className:`mt-2 flex flex-col divide-y divide-border`,children:e.data.prs.map(e=>(0,V.jsx)(W,{pr:e},e.number))}):(0,V.jsx)(`p`,{"data-slot":`repo-prs-unavailable`,className:`mt-2 text-xs text-soft-foreground`,children:e.data.reason??`The forge is unreachable right now.`})]})}function W({pr:e}){return(0,V.jsx)(`li`,{"data-slot":`pr-row`,"data-number":e.number,children:(0,V.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`flex min-w-0 items-center gap-2 rounded-sm px-1.5 py-2 hover:bg-muted`,children:[(0,V.jsx)(M,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-muted-foreground`}),(0,V.jsxs)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:[`#`,e.number]}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px]`,children:e.title}),e.checks?(0,V.jsx)(G,{checks:e.checks}):null]})})}function G({checks:e}){return(0,V.jsx)(`span`,{"data-slot":`pr-checks`,"data-checks":e,className:y(`shrink-0 text-[10px] font-medium`,e===`passing`&&`text-success`,e===`failing`&&`text-danger`,e===`pending`&&`text-muted-foreground`),children:e})}function K(){let e=s(),t=j(),[n,r]=(0,B.useState)(`unified`),[i,a]=(0,B.useState)(!1),[o,c]=(0,B.useState)(null),l=e.isError&&e.error instanceof u&&e.error.status===409,d=e.data?.files??[],f=(0,B.useMemo)(()=>T(d),[d]),p=t?n:`unified`,m=!t||i;return(0,V.jsxs)(`section`,{"data-slot":`repo-changes`,className:`flex min-h-0 flex-1 flex-col`,children:[(0,V.jsxs)(`div`,{"data-slot":`repo-changes-toolbar`,className:`flex flex-wrap items-center gap-x-2.5 gap-y-1.5 border-b border-border px-4 py-2 md:px-6`,children:[(0,V.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Uncommitted changes`}),e.data?(0,V.jsx)(E,{stat:e.data.stat}):null,(0,V.jsx)(`span`,{className:`ml-auto hidden items-center gap-1 md:flex`,children:(0,V.jsx)(O,{mode:n,wrap:i,onModeChange:r,onWrapChange:a})})]}),e.isPending?(0,V.jsx)(`p`,{"data-slot":`changes-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-6`,children:`Loading changes…`}):e.isError?(0,V.jsx)(g,{icon:l?(0,V.jsx)(C,{}):(0,V.jsx)(P,{}),tone:l?`neutral`:`danger`,heading:`h2`,title:l?`No changes to show`:`Could not load the changes`,subtitle:e.error.message}):d.length===0?(0,V.jsx)(g,{icon:(0,V.jsx)(C,{}),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,V.jsxs)(`div`,{className:`flex min-h-0 flex-1 items-start gap-5 px-4 py-4 [--diff-sticky-top:7rem] md:px-6`,children:[(0,V.jsx)(`aside`,{className:`sticky top-28 hidden w-60 shrink-0 md:block lg:w-72`,children:(0,V.jsx)(w,{root:f,selected:o,onSelect:e=>{c(e),document.querySelector(`[data-slot="diff-file"][data-path="${CSS.escape(e)}"]`)?.scrollIntoView?.({block:`start`,behavior:`smooth`})}})}),(0,V.jsx)(k,{files:d,mode:p,wrap:m,className:`min-w-0 flex-1`})]})]})}function q({log:e}){let{sha:t}=o();return t?(0,V.jsx)(J,{sha:t}):e.length===0?(0,V.jsx)(g,{icon:(0,V.jsx)(D,{}),tone:`neutral`,heading:`h2`,title:`No commits yet`,subtitle:`The log is empty — this repository has no commits to show.`}):(0,V.jsx)(`ul`,{"data-slot":`repo-commits`,className:`flex flex-col divide-y divide-border px-2 py-1 md:px-4`,children:e.map(e=>(0,V.jsx)(`li`,{children:(0,V.jsxs)(i,{"data-slot":`commit-row`,"data-sha":e.hash,to:`/git/commits/${e.hash}`,className:`flex min-w-0 items-baseline gap-3 rounded-sm px-2 py-2.5 hover:bg-muted`,children:[(0,V.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:e.hash}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] font-medium`,children:e.subject}),(0,V.jsxs)(`span`,{className:`hidden shrink-0 text-[11px] text-soft-foreground sm:inline`,children:[e.author,` · `,e.when]})]})},e.hash))})}function J({sha:e}){let t=c(e),n=j(),[r,a]=(0,B.useState)(`unified`),[o,s]=(0,B.useState)(!1),l=t.isError&&t.error instanceof u&&t.error.status===409,f=n?r:`unified`,p=!n||o;return(0,V.jsxs)(`section`,{"data-slot":`repo-commit`,"data-sha":e,className:`flex min-h-0 flex-1 flex-col`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2.5 gap-y-1.5 border-b border-border px-4 py-2 md:px-6`,children:[(0,V.jsx)(d,{asChild:!0,variant:`ghost`,size:`sm`,"data-slot":`commit-back`,children:(0,V.jsxs)(i,{to:`/git/commits`,children:[(0,V.jsx)(b,{"aria-hidden":`true`}),`All commits`]})}),t.data?(0,V.jsx)(L,{stat:t.data.stat}):null,(0,V.jsx)(`span`,{className:`ml-auto hidden items-center gap-1 md:flex`,children:(0,V.jsx)(O,{mode:r,wrap:o,onModeChange:a,onWrapChange:s})})]}),t.isPending?(0,V.jsx)(`p`,{"data-slot":`commit-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-6`,children:`Loading commit…`}):t.isError?(0,V.jsx)(g,{icon:l?(0,V.jsx)(N,{}):(0,V.jsx)(P,{}),tone:l?`neutral`:`danger`,heading:`h2`,title:l?`Commit not found`:`Could not load the commit`,subtitle:t.error.message}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{"data-slot":`commit-meta`,className:`border-b border-border px-4 py-3 md:px-6`,children:[(0,V.jsx)(`h2`,{className:`text-sm font-semibold`,children:t.data.subject}),(0,V.jsxs)(`p`,{className:`mt-0.5 text-[11px] text-soft-foreground`,children:[t.data.author,` · `,t.data.when,` ·`,` `,(0,V.jsx)(`span`,{className:`font-mono select-all`,children:t.data.sha})]})]}),t.data.files.length===0?(0,V.jsx)(g,{icon:(0,V.jsx)(D,{}),tone:`neutral`,heading:`h2`,title:`No file changes`,subtitle:`This commit carries no diff of its own — a merge commit's changes live on the commits it merged.`}):(0,V.jsx)(`div`,{className:`px-4 py-4 [--diff-sticky-top:7rem] md:px-6`,children:(0,V.jsx)(k,{files:t.data.files,mode:f,wrap:p,className:`min-w-0`})})]})]})}function Y({tab:e}){let t=a();if(t.isPending)return(0,V.jsx)(R,{});if(t.isError)return(0,V.jsx)(`div`,{"data-route":`repo-git`,className:`flex min-h-full flex-col`,children:(0,V.jsx)(g,{icon:(0,V.jsx)(P,{}),tone:`danger`,title:`Could not load the repository`,subtitle:t.error.message})});let n=t.data.info;return n?(0,V.jsx)(X,{repo:t.data,info:n,tab:e}):(0,V.jsx)(`div`,{"data-route":`repo-git`,className:`flex min-h-full flex-col`,children:(0,V.jsx)(g,{icon:(0,V.jsx)(z,{}),tone:`neutral`,title:`Not a git repository`,subtitle:`cezar is running outside a git repository — start it inside one to browse changes, commits and branches.`})})}function X({repo:e,info:t,tab:n}){return(0,V.jsxs)(`div`,{"data-route":`repo-git`,className:`flex min-h-full flex-col`,children:[(0,V.jsxs)(`header`,{"data-slot":`repo-header`,className:`sticky top-0 z-20 border-b border-border bg-background/95 px-4 pt-3 backdrop-blur md:px-6`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,V.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Git`}),(0,V.jsx)(A,{branch:t.branch}),t.remote?(0,V.jsx)(`span`,{"data-slot":`repo-remote`,className:`hidden min-w-0 truncate text-[11px] text-soft-foreground md:inline`,children:t.remote}):null]}),(0,V.jsxs)(`div`,{"data-slot":`repo-tabs`,className:`mt-2.5 flex items-end gap-1`,children:[(0,V.jsx)(S,{to:`/git`,active:n===`changes`,children:`Changes`}),(0,V.jsx)(S,{to:`/git/commits`,active:n===`commits`,children:`Commits`}),(0,V.jsx)(S,{to:`/git/branches`,active:n===`branches`,children:`Branches`})]})]}),n===`changes`?(0,V.jsx)(K,{}):n===`commits`?(0,V.jsx)(q,{log:e.log}):(0,V.jsx)(H,{repo:e,info:t})]})}export{Y as RepoGitRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,o as n}from"./bundle-mjs-DLPpRFyl.js";import{$ as r,D as i,G as a,Lt as o,N as s,P as c,Pt as l,W as u,Z as d,a as f,et as p,lt as ee,mt as te,n as m,nt as ne,pt as h,st as re,zt as g}from"./toaster-BS2E1bhz.js";import{n as _,t as v}from"./utils-rQGbOrwc.js";import{n as y,t as ie}from"./loader-circle-BV3DO9mE.js";import{n as b,t as x}from"./trash-2-CDtxmmc8.js";import{t as ae}from"./ellipsis-vertical-DJPAfccS.js";import{n as oe,t as S}from"./tab-link-phWEqSBy.js";import{t as C}from"./square-terminal-B6PZX4Qp.js";import{t as se}from"./markdown-CR_HLGTs.js";import{A as w,B as T,I as ce,L as E,M as D,N as O,P as le,R as ue,_ as de,a as fe,at as pe,b as me,et as k,g as A,h as j,i as M,j as N,k as P,m as F,n as I,o as L,r as R,tt as z,ut as B,v as he,x as ge,y as _e}from"./index-9qG98Orw.js";var V=_(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),ve=_(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),H=_(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),ye=_(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),U=_(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),W=t(n(),1);function G(e){return e===`running`||e===`queued`||e===`waiting`}function K(e){return[...e.steps].reverse().find(e=>e.sessionId)?.sessionId}function be(e,t){switch(e){case`codex`:return`codex resume ${t}`;case`opencode`:return`opencode --session ${t}`;default:return`claude --resume ${t}`}}function xe(e){if(G(e.status))return;let t=K(e);if(t===void 0)return;let n=be(e.runner,t);return e.worktreePath?`cd ${e.worktreePath} && ${n}`:n}function q(e){let t=G(e.status),n=K(e)!==void 0;return{finish:e.status===`waiting`||e.status===`review`,continueRun:!t&&n,terminal:!t&&n,notes:!0,archive:!t,cancel:t,deleteRun:!t}}function J(e){return e===`review`?`Accept the changes without a PR`:`Close the session`}function Se(e,t){let n=e.filter(e=>!e.archived&&e.status===`queued`).sort((e,t)=>e.createdAt.localeCompare(t.createdAt)).findIndex(e=>e.id===t);return n>=0?n+1:void 0}var Y=e();function X(e){switch(e){case`done`:return`done`;case`running`:case`waiting`:case`review`:return`active`;case`failed`:case`cancelled`:return`failed`;case`pending`:case`skipped`:return`pending`}}function Ce(e){if(e.length===0)return 0;let t=new Set([`done`,`failed`,`cancelled`,`skipped`]),n=new Set([`running`,`waiting`,`review`]),r=0;for(let i of e)t.has(i.status)?r+=1:n.has(i.status)&&(r+=.5);return r/e.length}function Z({steps:e}){if(e.length===0)return null;let t=Ce(e)*100;return(0,Y.jsxs)(`div`,{"data-slot":`step-rail`,className:`flex min-w-0 flex-col gap-1`,children:[e.map((t,n)=>(0,Y.jsxs)(`div`,{"data-slot":`step-row`,"data-visual":X(t.status),className:`flex min-h-[22px] min-w-0 items-center gap-2 text-[13px] text-muted-foreground`,children:[(0,Y.jsx)(we,{visual:X(t.status)}),(0,Y.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground`,children:t.name}),t.iterations>1?(0,Y.jsxs)(`span`,{"data-slot":`step-iterations`,className:`shrink-0 text-xs text-soft-foreground tabular-nums`,children:[`×`,t.iterations]}):null,(0,Y.jsxs)(`span`,{className:`ml-auto shrink-0 pl-2 text-[11.5px] text-soft-foreground tabular-nums`,children:[t.kind,` · step `,n+1,` of `,e.length]})]},t.id)),(0,Y.jsx)(`div`,{"data-slot":`step-progress`,className:`mt-1 h-0.5 overflow-hidden rounded-full bg-muted`,children:(0,Y.jsx)(`div`,{className:`h-full rounded-full bg-pending`,style:{width:`${t}%`}})})]})}function we({visual:e}){let t=`size-[13px] shrink-0`;switch(e){case`done`:return(0,Y.jsx)(ve,{"aria-hidden":!0,className:v(t,`text-success`)});case`active`:return(0,Y.jsx)(ie,{role:`status`,"aria-label":`Step running`,className:v(t,`animate-spin stroke-pending motion-reduce:animate-none`)});case`failed`:return(0,Y.jsx)(ye,{"aria-hidden":!0,className:v(t,`text-danger`)});case`pending`:return(0,Y.jsx)(pe,{"aria-hidden":!0,className:v(t,`text-soft-foreground`)})}}function Q(e){let t=g();return o({mutationFn:()=>ee(e),onSuccess:()=>t.invalidateQueries({queryKey:i.runs.all}),onError:e=>m(e.message,{tone:`danger`})})}function Te({run:e,planTally:t,tab:n=`session`}){let r=T(e),i=q(e),o=xe(e),[s,c]=(0,W.useState)(!1),l=De(e),u=a(),d=e.status===`queued`?ce(u.data??[]).get(e.id):void 0;return(0,Y.jsxs)(`header`,{"data-slot":`run-header`,className:`sticky top-0 z-20 border-b border-border bg-background/95 px-4 pt-3 backdrop-blur md:px-6`,children:[(0,Y.jsxs)(`div`,{className:`mx-auto w-full max-w-[820px]`,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Y.jsx)(Oe,{run:e}),(0,Y.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2.5`,children:[t?(0,Y.jsxs)(`span`,{"data-slot":`plan-mirror`,className:`text-[11px] text-soft-foreground tabular-nums`,children:[`Plan `,t.done,`/`,t.total]}):null,(0,Y.jsxs)(M,{dot:r.tone,pulse:r.pulse,children:[r.label,d===void 0?``:` #${d}`]}),(0,Y.jsx)(Ae,{run:e,actions:l,onToggleNotes:()=>c(e=>!e)})]})]}),(0,Y.jsx)(ke,{run:e}),(0,Y.jsxs)(`div`,{"data-slot":`run-tabs`,className:`mt-2.5 flex items-end gap-1`,children:[(0,Y.jsx)(S,{to:`/tasks/${e.id}`,active:n===`session`,children:`Session`}),(0,Y.jsx)(S,{to:`/tasks/${e.id}/changes`,active:n===`changes`,children:`Changes`}),(0,Y.jsx)(S,{to:`/tasks/${e.id}/commits`,active:n===`commits`,children:`Commits`}),(0,Y.jsx)(S,{to:`/tasks/${e.id}/files`,active:n===`files`,children:`Files`}),(0,Y.jsxs)(`div`,{"data-slot":`run-actions`,className:`ml-auto hidden items-center gap-1 pb-1 md:flex`,children:[i.finish?(0,Y.jsxs)(f,{variant:`outline`,size:`sm`,title:J(e.status),onClick:()=>l.finish.mutate(),children:[(0,Y.jsx)(y,{"aria-hidden":`true`}),`Finish`]}):null,i.continueRun?(0,Y.jsxs)(f,{variant:`outline`,size:`sm`,title:`Reopen the session`,onClick:()=>l.continueRun.mutate(),children:[(0,Y.jsx)(k,{"aria-hidden":`true`}),`Continue`]}):null,(0,Y.jsx)(Ee,{run:e,canResume:i.terminal,onResume:()=>l.terminal.mutate()}),(0,Y.jsxs)(f,{variant:`ghost`,size:`sm`,title:`Handoff notes — what the agent did and what's left`,"aria-expanded":s,onClick:()=>c(e=>!e),children:[(0,Y.jsx)(U,{"aria-hidden":`true`}),`Notes`]}),i.archive?(0,Y.jsxs)(f,{variant:`ghost`,size:`sm`,onClick:()=>l.archive.mutate(),children:[e.archived?(0,Y.jsx)(V,{"aria-hidden":`true`}):(0,Y.jsx)(B,{"aria-hidden":`true`}),e.archived?`Unarchive`:`Archive`]}):null,i.cancel?(0,Y.jsxs)(f,{variant:`danger-ghost`,size:`sm`,onClick:()=>l.setConfirming(`cancel`),children:[(0,Y.jsx)(H,{"aria-hidden":`true`}),`Cancel`]}):null,i.deleteRun?(0,Y.jsxs)(f,{variant:`danger-ghost`,size:`sm`,onClick:()=>l.setConfirming(`delete`),children:[(0,Y.jsx)(x,{"aria-hidden":`true`}),`Delete`]}):null]})]}),e.steps.length>0?(0,Y.jsx)(`div`,{className:`border-t border-border pt-2.5 pb-1`,children:(0,Y.jsx)(Z,{steps:e.steps})}):null,o?(0,Y.jsx)(Me,{hint:o}):null,s?(0,Y.jsx)(Ne,{runId:e.id}):null]}),(0,Y.jsx)(je,{run:e,actions:l})]})}function Ee({run:e,canResume:t,onResume:n}){let r=s(),i=o({mutationFn:t=>h(e.id,t),onError:e=>m(e.message,{tone:`danger`})}),a=e.worktreePath?r.data?.targets??[]:[];return!t&&a.length===0?null:(0,Y.jsxs)(P,{children:[(0,Y.jsx)(O,{asChild:!0,children:(0,Y.jsxs)(f,{variant:`ghost`,size:`sm`,title:`Resume in a terminal, or open the worktree locally`,children:[(0,Y.jsx)(oe,{"aria-hidden":`true`}),`Open in…`]})}),(0,Y.jsxs)(w,{align:`end`,children:[t?(0,Y.jsxs)(N,{"data-target":`terminal-resume`,onSelect:n,children:[(0,Y.jsx)(C,{"aria-hidden":`true`}),`Terminal (resume session)`]}):null,t&&a.length>0?(0,Y.jsx)(D,{}):null,a.map(e=>(0,Y.jsx)(N,{"data-target":e.id,onSelect:()=>i.mutate(e.id),children:e.label},e.id)),e.worktreePath?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(D,{}),(0,Y.jsxs)(N,{onSelect:()=>{let t=e.worktreePath;t&&navigator.clipboard.writeText(t).then(()=>m(`Worktree path copied`)).catch(()=>m(`Path: ${t}`))},children:[(0,Y.jsx)(b,{"aria-hidden":`true`}),`Copy worktree path`]})]}):null]})]})}function De(e){let t=g(),n=l(),[a,s]=(0,W.useState)(null),c=()=>t.invalidateQueries({queryKey:i.runs.all}),u=e=>m(e.message,{tone:`danger`});return{finish:Q(e.id),continueRun:o({mutationFn:()=>ne(e.id),onSuccess:c,onError:u}),archive:o({mutationFn:()=>r(e.id,!e.archived),onSuccess:c,onError:u}),cancel:o({mutationFn:()=>p(e.id),onSuccess:c,onError:u}),delete:o({mutationFn:()=>re(e.id),onSuccess:()=>{c(),n(`/`)},onError:u}),terminal:o({mutationFn:()=>te(e.id),onError:e=>{if(e instanceof d&&e.command){$(e.command,`No terminal found — command copied to clipboard.`);return}u(e)}}),confirming:a,setConfirming:s}}async function $(e,t){try{await navigator.clipboard.writeText(e),m(t)}catch{m(`Run manually: ${e}`)}}function Oe({run:e}){let t=c(e.id),n=E(e),r=L(n,e=>t.mutate({title:e},{onError:e=>m(e.message,{tone:`danger`})}));return r.editing?(0,Y.jsx)(fe,{editor:r,className:`flex-1 text-[15px] font-semibold`}):(0,Y.jsxs)(`span`,{className:`group flex min-w-0 items-center gap-1`,children:[(0,Y.jsx)(`h1`,{className:`min-w-0 truncate text-[15px] font-semibold`,title:e.task,children:n}),(0,Y.jsx)(`button`,{type:`button`,"aria-label":`Rename task`,onClick:r.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)(z,{className:`size-3.5`,"aria-hidden":`true`})})]})}function ke({run:e}){let t=[(0,Y.jsx)(`span`,{children:R(e)},`workflow`)];return e.runner&&e.runner!==`claude`&&t.push((0,Y.jsx)(`span`,{children:e.runner},`runner`)),e.model&&t.push((0,Y.jsx)(`span`,{children:e.model},`model`)),e.branch&&t.push((0,Y.jsx)(`span`,{"data-slot":`branch-chip`,className:`rounded-sm border border-border bg-card px-1.5 py-px font-mono text-[11px] font-medium`,children:e.branch},`branch`)),e.diffStat&&t.push((0,Y.jsx)(le,{stat:e.diffStat},`diff`)),e.tokensUsed>0&&t.push((0,Y.jsxs)(`span`,{className:`tabular-nums`,children:[ue(e.tokensUsed),` tokens`]},`tokens`)),e.costUsd&&t.push((0,Y.jsx)(`span`,{className:`tabular-nums`,children:I(e.costUsd)},`cost`)),(0,Y.jsx)(`div`,{"data-slot":`run-meta`,className:`mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground`,children:t.map((e,t)=>(0,Y.jsxs)(W.Fragment,{children:[t>0?(0,Y.jsx)(`span`,{className:`text-soft-foreground`,"aria-hidden":`true`,children:`·`}):null,e]},t))})}function Ae({run:e,actions:t,onToggleNotes:n}){let r=q(e);return(0,Y.jsxs)(P,{children:[(0,Y.jsx)(O,{asChild:!0,children:(0,Y.jsx)(f,{variant:`ghost`,size:`icon-sm`,"aria-label":`Run actions`,className:`md:hidden`,children:(0,Y.jsx)(ae,{"aria-hidden":`true`})})}),(0,Y.jsxs)(w,{align:`end`,"data-slot":`run-actions-menu`,children:[r.finish?(0,Y.jsxs)(N,{onSelect:()=>t.finish.mutate(),children:[(0,Y.jsx)(y,{"aria-hidden":`true`}),` Finish`]}):null,r.continueRun?(0,Y.jsxs)(N,{onSelect:()=>t.continueRun.mutate(),children:[(0,Y.jsx)(k,{"aria-hidden":`true`}),` Continue`]}):null,r.terminal?(0,Y.jsxs)(N,{onSelect:()=>t.terminal.mutate(),children:[(0,Y.jsx)(C,{"aria-hidden":`true`}),` Terminal`]}):null,(0,Y.jsxs)(N,{onSelect:n,children:[(0,Y.jsx)(U,{"aria-hidden":`true`}),` Notes`]}),r.archive?(0,Y.jsxs)(N,{onSelect:()=>t.archive.mutate(),children:[e.archived?(0,Y.jsx)(V,{"aria-hidden":`true`}):(0,Y.jsx)(B,{"aria-hidden":`true`}),e.archived?`Unarchive`:`Archive`]}):null,r.cancel||r.deleteRun?(0,Y.jsx)(D,{}):null,r.cancel?(0,Y.jsxs)(N,{variant:`destructive`,onSelect:()=>t.setConfirming(`cancel`),children:[(0,Y.jsx)(H,{"aria-hidden":`true`}),` Cancel`]}):null,r.deleteRun?(0,Y.jsxs)(N,{variant:`destructive`,onSelect:()=>t.setConfirming(`delete`),children:[(0,Y.jsx)(x,{"aria-hidden":`true`}),` Delete`]}):null]})]})}function je({run:e,actions:t}){let n=t.confirming;return(0,Y.jsx)(F,{open:n!==null,onOpenChange:e=>!e&&t.setConfirming(null),children:(0,Y.jsxs)(de,{children:[(0,Y.jsxs)(me,{children:[(0,Y.jsx)(ge,{children:n===`delete`?`Delete this task?`:`Cancel this task?`}),(0,Y.jsx)(he,{children:n===`delete`?`This removes the run, its transcript, its worktree and its branch. There is no undo.`:`The agent is stopped and the run completes as cancelled. The worktree stays.`})]}),(0,Y.jsxs)(_e,{children:[(0,Y.jsx)(A,{children:`Keep it`}),(0,Y.jsx)(j,{className:`bg-danger text-danger-foreground hover:brightness-[0.96]`,onClick:()=>{n===`delete`?t.delete.mutate():t.cancel.mutate(),t.setConfirming(null)},children:n===`delete`?`Delete ${E(e).slice(0,40)}`:`Cancel the run`})]})]})})}function Me({hint:e}){return(0,Y.jsxs)(`button`,{type:`button`,"data-slot":`resume-hint`,title:`Copy the command`,onClick:()=>void $(e,`Command copied to clipboard.`),className:`mb-2 flex w-full min-w-0 items-center gap-1.5 rounded-sm px-1 py-0.5 text-left font-mono text-[11px] text-soft-foreground hover:bg-muted hover:text-foreground`,children:[(0,Y.jsx)(b,{className:`size-3 shrink-0`,"aria-hidden":`true`}),(0,Y.jsxs)(`span`,{className:`truncate`,children:[`take over interactively: `,e]})]})}function Ne({runId:e}){let t=u(e);return(0,Y.jsx)(`div`,{"data-slot":`notes-panel`,className:`mb-3 max-h-72 overflow-y-auto rounded-md border border-border bg-card px-4 py-3`,children:t.isPending?(0,Y.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`Loading notes…`}):t.isError?(0,Y.jsx)(`p`,{className:`text-xs text-danger`,children:t.error.message}):t.data.trim().length>0?(0,Y.jsx)(se,{children:t.data}):(0,Y.jsx)(`p`,{className:`text-xs text-soft-foreground`,children:`No notes yet — the handoff file is seeded when the task starts.`})})}export{K as a,U as c,G as i,Q as n,Se as o,J as r,q as s,Te as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./bundle-mjs-DLPpRFyl.js";import{Dt as t}from"./toaster-BS2E1bhz.js";import{n,t as r}from"./utils-rQGbOrwc.js";import{i,r as a,s as o,t as s}from"./dialog-BEgEWFDS.js";import{r as c}from"./skills-ynuO5oCr.js";import{t as l}from"./markdown-CR_HLGTs.js";var u=n(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),d=n(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),f=e();function p({source:e,className:t}){return(0,f.jsx)(`span`,{"data-slot":`skill-source`,"data-source":e,className:r(`shrink-0 rounded-full border border-border px-2 py-px font-mono text-[10.5px]`,c({source:e})?`font-semibold text-foreground`:`text-soft-foreground`,t),children:e})}function m({skill:e,usedBy:t,heading:n=`h2`}){return(0,f.jsxs)(`div`,{"data-slot":`skill-detail`,className:`min-w-0`,children:[(0,f.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2.5`,children:[(0,f.jsx)(n,{className:`min-w-0 font-mono text-lg font-semibold break-all`,children:e.name}),(0,f.jsx)(p,{source:e.source})]}),(0,f.jsxs)(`p`,{"data-slot":`skill-path`,className:`mt-1 font-mono text-[10.5px] break-all text-soft-foreground`,children:[e.path,e.team?` · from ${e.team.repo}`:``]}),e.description?(0,f.jsx)(`p`,{"data-slot":`skill-description`,className:`mt-2.5 text-[13px] text-muted-foreground`,children:e.description}):null,t===void 0?null:(0,f.jsxs)(`section`,{"data-slot":`skill-used-by`,className:`mt-5`,children:[(0,f.jsx)(`h3`,{className:`text-[11px] font-semibold tracking-[.04em] text-soft-foreground uppercase`,children:`Used by`}),t.length>0?(0,f.jsx)(`ul`,{className:`mt-1.5 flex flex-col gap-1`,children:t.map(e=>(0,f.jsxs)(`li`,{className:`flex items-center gap-1.5 font-mono text-xs text-muted-foreground`,children:[(0,f.jsx)(u,{"aria-hidden":`true`,className:`size-3 shrink-0 text-soft-foreground`}),e]},e))}):(0,f.jsx)(`p`,{className:`mt-1.5 text-xs text-soft-foreground`,children:`Not referenced by any workflow yet — quick-task picks it up when the task mentions it.`})]}),(0,f.jsxs)(`section`,{className:`mt-5`,children:[(0,f.jsx)(`h3`,{className:`text-[11px] font-semibold tracking-[.04em] text-soft-foreground uppercase`,children:`Content`}),(0,f.jsx)(`div`,{"data-slot":`skill-body`,className:`mt-2 text-sm`,children:(0,f.jsx)(l,{children:e.body})})]})]})}function h({skill:e,onClose:n}){return(0,f.jsx)(s,{open:e!==null,onOpenChange:e=>e?void 0:n(),children:(0,f.jsx)(a,{"data-slot":`skill-preview`,className:`block max-h-[80dvh] overflow-y-auto sm:max-w-2xl`,children:e?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(o,{className:`sr-only`,children:e.name}),(0,f.jsx)(i,{className:`sr-only`,children:`Read-only skill preview`}),(0,f.jsx)(m,{skill:e,heading:`h3`}),(0,f.jsx)(`p`,{className:`mt-5`,children:(0,f.jsx)(t,{to:`/skills?skill=${encodeURIComponent(e.name)}`,"data-slot":`skill-preview-manage`,onClick:n,className:`text-xs font-semibold text-violet hover:underline`,children:`Open in the Skills catalog`})})]}):null})})}export{d as i,h as n,p as r,m as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,o as n}from"./bundle-mjs-DLPpRFyl.js";import{D as r,Dt as i,It as a,Lt as o,St as s,X as c,n as l,q as u,r as d,zt as f}from"./toaster-BS2E1bhz.js";import{t as p}from"./utils-rQGbOrwc.js";import{t as m}from"./arrow-left-BE957rJs.js";import{i as h,r as g,t as _}from"./skill-detail-C9cniyId.js";import{t as v}from"./refresh-cw-DCa-Rlwz.js";import{t as y}from"./triangle-alert-6su4Js5O.js";import{i as b,o as x,r as S,t as C}from"./skills-ynuO5oCr.js";import{t as w}from"./input-BRsSo4xH.js";import{X as T,s as E}from"./index-9qG98Orw.js";var D=t(n(),1),O=e(),k=`__bm`;function A(){return(0,O.jsxs)(`div`,{"data-route":`skills`,className:`flex min-h-full flex-col`,children:[(0,O.jsxs)(`header`,{className:`sticky top-0 z-10 hidden h-14 shrink-0 items-center gap-3 border-b border-border bg-background px-5 md:flex`,children:[(0,O.jsx)(`h1`,{className:`text-base font-semibold`,children:`Skills`}),(0,O.jsx)(`p`,{className:`text-[13px] text-muted-foreground`,children:`Markdown playbooks agents can follow.`})]}),(0,O.jsx)(j,{})]})}function j(){let e=u(),t=c(),[n]=a(),[g,S]=(0,D.useState)(``),A=f(),j=o({mutationFn:()=>s(),onSuccess:e=>{A.setQueryData(r.skills,e),l(`Team skills refreshed.`)},onError:e=>l(e.message,{tone:`danger`})});if(e.isError)return(0,O.jsx)(d,{icon:(0,O.jsx)(y,{}),tone:`danger`,heading:`h2`,title:`Could not load skills`,subtitle:e.error.message});let N=b(e.data??[]),P=n.get(`skill`),F=P===k?k:P!==null&&N.some(e=>e.name===P)?P:N[0]?.name??k,I=N.find(e=>e.name===F)??null,L=C(N,g);return(0,O.jsxs)(`div`,{"data-slot":`skills-section`,className:`flex min-h-full flex-1 items-stretch`,children:[(0,O.jsxs)(`section`,{"data-slot":`skills-list`,className:p(`w-full flex-col border-border md:flex md:w-[320px] md:shrink-0 md:border-r`,`md:sticky md:top-14 md:max-h-[calc(100dvh-(var(--spacing)*14))]`,P===null?`flex`:`hidden md:flex`),children:[(0,O.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 p-3 pb-2`,children:[(0,O.jsx)(w,{"data-slot":`skills-filter`,placeholder:`Filter skills…`,"aria-label":`Filter skills`,value:g,onChange:e=>S(e.target.value),className:`h-8 text-[13px]`}),(0,O.jsxs)(`button`,{type:`button`,"data-slot":`skills-refresh`,title:`git fetch the team skills repos`,disabled:j.isPending,onClick:()=>j.mutate(),className:`flex h-8 shrink-0 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:opacity-55`,children:[(0,O.jsx)(v,{"aria-hidden":`true`,className:p(`size-3`,j.isPending&&`motion-safe:animate-spin`)}),`Refresh`]})]}),(0,O.jsx)(`ul`,{"data-slot":`skill-rows`,className:`min-h-0 flex-1 overflow-y-auto px-2 pb-2`,children:e.isPending?(0,O.jsx)(`li`,{className:`px-2.5 py-2 text-[13px] text-soft-foreground`,children:`Loading…`}):L.length>0?L.map(e=>(0,O.jsx)(M,{skill:e,active:F===e.name},e.path)):(0,O.jsx)(`li`,{className:`px-2.5 py-2 text-xs leading-relaxed text-soft-foreground`,children:N.length>0?`(no skills match)`:(0,O.jsxs)(O.Fragment,{children:[`No skills yet. Drop Markdown files into `,(0,O.jsx)(`span`,{className:`font-mono`,children:`.ai/skills/`}),` or`,` `,(0,O.jsx)(`span`,{className:`font-mono`,children:`.ai/cezar/skills/`}),` — optional frontmatter:`,` `,(0,O.jsx)(`span`,{className:`font-mono`,children:`name`}),`, `,(0,O.jsx)(`span`,{className:`font-mono`,children:`description`}),`. Team skills from your skills repo appear here too — try Refresh.`]})})}),(0,O.jsx)(`div`,{className:`shrink-0 border-t border-border p-2`,children:(0,O.jsxs)(i,{to:`/skills?skill=${k}`,"data-slot":`bookmarklets-row`,"aria-current":F===k?`page`:void 0,className:p(`flex flex-col gap-0.5 rounded-md px-2.5 py-2 transition-colors hover:bg-muted`,F===k&&`bg-muted`),children:[(0,O.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,O.jsx)(h,{"aria-hidden":`true`,className:`size-3.5 shrink-0 text-primary`}),(0,O.jsx)(`span`,{className:`min-w-0 truncate text-[13px] font-medium`,children:`Run from GitHub`}),(0,O.jsx)(`span`,{className:`ml-auto shrink-0 rounded-full border border-border px-2 py-px font-mono text-[10.5px] text-soft-foreground`,children:`bookmarklets`})]}),(0,O.jsx)(`span`,{className:`pl-[22px] text-xs text-soft-foreground`,children:`One-click skill launch from any GitHub PR or issue.`})]})})]}),(0,O.jsx)(`section`,{"data-slot":`skills-detail`,className:p(`min-w-0 flex-1 flex-col`,P===null?`hidden md:flex`:`flex`),children:(0,O.jsxs)(`div`,{className:`min-w-0 flex-1 px-4 py-4 md:px-7 md:py-5`,children:[(0,O.jsxs)(i,{to:`/skills`,"data-slot":`skills-back`,className:`mb-3 inline-flex items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground md:hidden`,children:[(0,O.jsx)(m,{"aria-hidden":`true`,className:`size-3.5`}),`Back to the list`]}),F===k?(0,O.jsx)(E,{skills:N}):I?(0,O.jsx)(_,{skill:I,usedBy:x(t.data?.workflows??[],I.name)}):e.isPending?null:(0,O.jsx)(d,{icon:(0,O.jsx)(T,{}),tone:`neutral`,heading:`h2`,title:`No skill selected`,subtitle:`Pick a skill from the catalog.`})]})})]})}function M({skill:e,active:t}){let n=S(e);return(0,O.jsx)(`li`,{children:(0,O.jsxs)(i,{to:`/skills?skill=${encodeURIComponent(e.name)}`,"data-slot":`skill-row`,"data-skill":e.name,"data-project":n?`true`:void 0,"aria-current":t?`page`:void 0,className:p(`flex flex-col gap-0.5 rounded-md px-2.5 py-2 transition-colors hover:bg-muted`,t&&`bg-muted`),children:[(0,O.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,O.jsx)(T,{"aria-hidden":`true`,className:p(`size-3.5 shrink-0`,n?`text-violet`:`text-soft-foreground`)}),(0,O.jsx)(`span`,{className:p(`min-w-0 truncate font-mono text-[13px]`,n?`font-semibold text-foreground`:`font-medium text-muted-foreground`),children:e.name}),(0,O.jsx)(g,{source:e.source,className:`ml-auto`})]}),e.description?(0,O.jsx)(`span`,{className:`line-clamp-2 pl-[22px] text-xs text-soft-foreground`,children:e.description}):null]})})}export{A as SkillsRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./bundle-mjs-DLPpRFyl.js";import{Dt as t}from"./toaster-BS2E1bhz.js";import{n,t as r}from"./utils-rQGbOrwc.js";var i=n(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),a=e();function o({to:e,active:n=!1,children:i}){return(0,a.jsx)(t,{to:e,"aria-current":n?`page`:void 0,className:r(`-mb-px flex h-8 items-center rounded-t-md border-b-2 px-3 text-[13px] font-medium`,n?`border-foreground font-semibold text-foreground`:`border-transparent text-muted-foreground hover:bg-muted hover:text-foreground`),children:i})}export{i as n,o as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,o as n}from"./bundle-mjs-DLPpRFyl.js";import{D as r,Ft as i,Lt as a,R as o,Z as s,a as c,at as l,ft as u,j as d,mt as f,n as p,r as m,tt as h,yt as g,z as _,zt as v}from"./toaster-BS2E1bhz.js";import{a as y,i as b,t as x}from"./run-header-CfVeY3uM.js";import{a as S,i as C,n as w,r as T}from"./git-toolbar-D8OPPqBP.js";import{a as E,n as D,t as O}from"./use-desktop-eHm2iTXX.js";import{a as k,i as A,o as j,r as M,s as N,t as P}from"./dialog-BEgEWFDS.js";import{C as F,L as I,c as L,d as R,u as z}from"./index-9qG98Orw.js";var B=t(n(),1),V=e=>e===`running`||e===`queued`||e===`waiting`,H=`no worktree — this task ran directly in the repo working tree`;function U(e){let t=e=>({id:`commit`,label:`Commit`,enabled:!1,reason:e});return e.hasWorktree?e.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 — ${H}`)}function W(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.status===`running`?t(`Push unavailable — the agent is still working in this worktree`):{id:`push`,label:`Push`,enabled:!0}:t(`Push unavailable — ${H}`)}function G(e){let t=e=>({id:`create-pr`,label:`Create PR`,enabled:!1,reason:e});return!e.hasWorktree||e.branch===void 0?t(`Create PR unavailable — ${H}`):e.forge===null?t(`Create PR unavailable — no supported forge remote (GitHub) detected`):e.forge.available?V(e.status)?t(`Create PR unavailable — the run is still active; wait for the review gate`):{id:`create-pr`,label:`Create PR`,enabled:!0}:t(`Create PR unavailable — ${e.forge.reason??`the forge is unreachable`}`)}function K(e){let t=e.prUrl?{id:`view-pr`,label:`View PR`,enabled:!0,href:e.prUrl}:U(e),n=e.prUrl?[U(e),W(e)]:[W(e),G(e)],r=[];if(e.localHandoff){let t=e.hasSession?V(e.status)?{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,secondary:n,menu:r}}var q=e();function J({run:e,open:t,onOpenChange:n}){let i=v(),[o,s]=(0,B.useState)(``),l=I(e),u=(0,B.useRef)(l);u.current=l,(0,B.useEffect)(()=>{t&&s(u.current)},[t]);let d=a({mutationFn:t=>h(e.id,t),onSuccess:t=>{p(`Committed ${t.sha.slice(0,7)}`),n(!1),i.invalidateQueries({queryKey:r.runs.changes(e.id)}),i.invalidateQueries({queryKey:r.runs.all})},onError:e=>p(e.message,{tone:`danger`})}),f=()=>{let e=o.trim();e.length===0||d.isPending||d.mutate(e)};return(0,q.jsx)(P,{open:t,onOpenChange:n,children:(0,q.jsxs)(M,{"data-slot":`commit-dialog`,children:[(0,q.jsxs)(j,{children:[(0,q.jsx)(N,{children:`Commit changes`}),(0,q.jsxs)(A,{children:[`Stages everything in the task's worktree (git add -A) and commits to`,` `,e.branch?(0,q.jsx)(`span`,{className:`font-mono`,children:e.branch}):`its branch`,`.`]})]}),(0,q.jsx)(L,{"data-slot":`commit-message`,"aria-label":`Commit message`,rows:3,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{F({key:e.key,shiftKey:e.shiftKey,metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,repeat:e.repeat,isComposing:e.nativeEvent.isComposing})&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),f())}}),(0,q.jsxs)(k,{children:[(0,q.jsx)(c,{variant:`outline`,onClick:()=>n(!1),children:`Cancel`}),(0,q.jsx)(c,{"data-slot":`commit-confirm`,disabled:o.trim().length===0||d.isPending,onClick:f,children:d.isPending?`Committing…`:`Commit`})]})]})})}function Y(){let{id:e}=i(),t=o(e);return t.isPending?(0,q.jsx)(R,{tab:`changes`}):t.isError?(0,q.jsx)(z,{tab:`changes`,error:t.error}):(0,q.jsx)(X,{run:t.data})}function X({run:e}){let t=d(),n=_(e.id,b(e.status)),i=O(),[o,c]=(0,B.useState)(`unified`),[u,h]=(0,B.useState)(!1),[k,A]=(0,B.useState)(null),[j,M]=(0,B.useState)(!1),N=v(),P=()=>N.invalidateQueries({queryKey:r.runs.all}),F=e=>p(e.message,{tone:`danger`}),I=a({mutationFn:()=>g(e.id),onSuccess:e=>p(e.upstreamSet?`Pushed ${e.branch} to ${e.remote} (upstream set)`:`Pushed ${e.branch} to ${e.remote}`),onError:F}),L=a({mutationFn:()=>l(e.id),onSuccess:e=>{p(`Draft PR created — ${e.url}`),P()},onError:F}),R=a({mutationFn:()=>f(e.id),onError:e=>{if(e instanceof s&&e.command){navigator.clipboard.writeText(e.command).then(()=>p(`No terminal found — command copied to clipboard.`)).catch(()=>p(`Run manually: ${e.command}`));return}F(e)}}),z=n.isError&&n.error instanceof s&&n.error.status===409,V=K({status:e.status,hasWorktree:!!e.worktreePath&&!z,branch:e.branch,changedFiles:n.data?.stat.files,remote:t.data?.repo?.remote,forge:t.data?.forge??null,localHandoff:t.data?.capabilities.localHandoff??!1,hasSession:y(e)!==void 0,prUrl:e.pullRequestUrl}),H=e=>{switch(e){case`commit`:M(!0);break;case`push`:I.mutate();break;case`create-pr`:L.mutate();break;case`open-terminal`:R.mutate();break;case`view-pr`:break}},U=n.data?.files??[],W=(0,B.useMemo)(()=>T(U),[U]),G=i?o:`unified`,Y=!i||u;return(0,q.jsxs)(`div`,{"data-route":`task-changes`,className:`flex min-h-full flex-col`,children:[(0,q.jsx)(x,{run:e,tab:`changes`}),(0,q.jsx)(w,{bar:V,branch:e.branch,stat:n.data?.stat,mode:G,wrap:Y,onModeChange:c,onWrapChange:h,onAction:H}),n.isPending?(0,q.jsx)(`p`,{"data-slot":`changes-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-6`,children:`Loading changes…`}):n.isError?(0,q.jsx)(m,{icon:z?(0,q.jsx)(S,{}):(0,q.jsx)(E,{}),tone:z?`neutral`:`danger`,heading:`h2`,title:z?`No changes to show`:`Could not load the changes`,subtitle:n.error.message}):U.length===0?(0,q.jsx)(m,{icon:(0,q.jsx)(S,{}),tone:`neutral`,heading:`h2`,title:`No changes yet`,subtitle:`The worktree matches its base branch. Changes appear here as the agent works.`}):(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-1 items-start gap-5 px-4 py-4 [--diff-sticky-top:10rem] md:px-6`,children:[(0,q.jsx)(`aside`,{className:`sticky top-40 hidden w-60 shrink-0 md:block lg:w-72`,children:(0,q.jsx)(C,{root:W,selected:k,onSelect:e=>{A(e),document.querySelector(`[data-slot="diff-file"][data-path="${CSS.escape(e)}"]`)?.scrollIntoView?.({block:`start`,behavior:`smooth`})}})}),(0,q.jsx)(D,{files:U,mode:G,wrap:Y,loadFileText:t=>Z(e.id,t),className:`min-w-0 flex-1`})]}),(0,q.jsx)(J,{run:e,open:j,onOpenChange:M})]})}async function Z(e,t){try{let n=await u(e,t);return n.type!==`file`||n.binary||n.tooLarge?null:n.content??null}catch{return null}}export{Y as TaskChangesRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,o as n}from"./bundle-mjs-DLPpRFyl.js";import{B as r,Dt as i,Ft as a,R as o,V as s,Z as c,a as l,r as u}from"./toaster-BS2E1bhz.js";import{i as d,t as f}from"./run-header-CfVeY3uM.js";import{t as p}from"./arrow-left-BE957rJs.js";import{a as m,i as h,n as g,t as _}from"./use-desktop-eHm2iTXX.js";import{t as v}from"./search-x-CoCyl7zT.js";import{t as y}from"./triangle-alert-6su4Js5O.js";import{P as b,d as x,u as S}from"./index-9qG98Orw.js";var C=t(n(),1),w=e();function T(){let{id:e}=a(),t=o(e);return t.isPending?(0,w.jsx)(x,{tab:`changes`}):t.isError?(0,w.jsx)(S,{tab:`changes`,error:t.error}):(0,w.jsx)(E,{run:t.data})}function E({run:e}){let{sha:t}=a(),n=s(e.id,d(e.status));return(0,w.jsxs)(`div`,{"data-route":`task-commits`,className:`flex min-h-full flex-col`,children:[(0,w.jsx)(f,{run:e,tab:`commits`}),t?(0,w.jsx)(D,{runId:e.id,sha:t}):n.isPending?(0,w.jsx)(`p`,{"data-slot":`commits-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-6`,children:`Loading commits…`}):n.isError?(0,w.jsx)(u,{icon:(0,w.jsx)(m,{}),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,w.jsx)(u,{icon:(0,w.jsx)(m,{}),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,w.jsx)(`ul`,{"data-slot":`task-commits`,className:`mx-auto flex w-full max-w-[820px] flex-col divide-y divide-border px-2 py-1 md:px-4`,children:n.data.commits.map(t=>(0,w.jsx)(`li`,{children:(0,w.jsxs)(i,{"data-slot":`commit-row`,"data-sha":t.sha,to:`/tasks/${e.id}/commits/${t.sha}`,className:`flex min-w-0 items-baseline gap-3 rounded-sm px-2 py-2.5 hover:bg-muted`,children:[(0,w.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:t.sha.slice(0,8)}),(0,w.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] font-medium`,children:t.subject}),(0,w.jsxs)(`span`,{className:`hidden shrink-0 text-[11px] text-soft-foreground sm:inline`,children:[t.author,` · `,t.when]})]})},t.sha))})]})}function D({runId:e,sha:t}){let n=r(e,t),a=_(),[o,s]=(0,C.useState)(`unified`),[d,f]=(0,C.useState)(!1),x=n.isError&&n.error instanceof c&&n.error.status===409,S=a?o:`unified`,T=!a||d;return(0,w.jsxs)(`section`,{"data-slot":`task-commit`,"data-sha":t,className:`mx-auto flex min-h-0 w-full max-w-[820px] flex-1 flex-col`,children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2.5 gap-y-1.5 border-b border-border px-4 py-2 md:px-6`,children:[(0,w.jsx)(l,{asChild:!0,variant:`ghost`,size:`sm`,"data-slot":`commit-back`,children:(0,w.jsxs)(i,{to:`/tasks/${e}/commits`,children:[(0,w.jsx)(p,{"aria-hidden":`true`}),`All commits`]})}),n.data?(0,w.jsx)(b,{stat:n.data.stat}):null,(0,w.jsx)(`span`,{className:`ml-auto hidden items-center gap-1 md:flex`,children:(0,w.jsx)(h,{mode:o,wrap:d,onModeChange:s,onWrapChange:f})})]}),n.isPending?(0,w.jsx)(`p`,{"data-slot":`commit-loading`,className:`px-4 py-6 text-center text-xs text-soft-foreground md:px-6`,children:`Loading commit…`}):n.isError?(0,w.jsx)(u,{icon:x?(0,w.jsx)(v,{}):(0,w.jsx)(y,{}),tone:x?`neutral`:`danger`,heading:`h2`,title:x?`Commit not found`:`Could not load the commit`,subtitle:n.error.message}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{"data-slot":`commit-meta`,className:`border-b border-border px-4 py-3 md:px-6`,children:[(0,w.jsx)(`h2`,{className:`text-sm font-semibold`,children:n.data.subject}),(0,w.jsxs)(`p`,{className:`mt-0.5 text-[11px] text-soft-foreground`,children:[n.data.author,` · `,n.data.when,` ·`,` `,(0,w.jsx)(`span`,{className:`font-mono select-all`,children:n.data.sha})]})]}),n.data.files.length===0?(0,w.jsx)(u,{icon:(0,w.jsx)(m,{}),tone:`neutral`,heading:`h2`,title:`No file changes`,subtitle:`This commit carries no diff of its own — a merge commit's changes live on the commits it merged.`}):(0,w.jsx)(`div`,{className:`px-4 py-4 [--diff-sticky-top:10rem] md:px-6`,children:(0,w.jsx)(g,{files:n.data.files,mode:S,wrap:T,className:`min-w-0`})})]})]})}export{T as TaskCommitsRoute};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/diff-view-CctnJHWe.js","assets/bundle-mjs-DLPpRFyl.js","assets/utils-rQGbOrwc.js","assets/highlighter-BKVEsACy.js","assets/index-9qG98Orw.js","assets/react-dom-Ddtik4qM.js","assets/toaster-BS2E1bhz.js","assets/skill-detail-C9cniyId.js","assets/dialog-BEgEWFDS.js","assets/x-Br_jIDBw.js","assets/dist-CW7M_Jhs.js","assets/skills-ynuO5oCr.js","assets/markdown-CR_HLGTs.js","assets/chunk-BO2N2NFS-f5igTtpB.js","assets/lib-CNGa3Dig.js","assets/loader-circle-BV3DO9mE.js","assets/search-x-CoCyl7zT.js","assets/triangle-alert-6su4Js5O.js","assets/input-BRsSo4xH.js","assets/index-Bz_r8Jt3.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e,i as t,l as n,o as r}from"./bundle-mjs-DLPpRFyl.js";import{a as i}from"./toaster-BS2E1bhz.js";import{n as a,t as o}from"./utils-rQGbOrwc.js";import{P as s,rt as c}from"./index-9qG98Orw.js";var l=a(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),u=a(`text-wrap`,[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]]),d=e();function f({mode:e,wrap:t,onModeChange:n,onWrapChange:r}){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(`span`,{"data-slot":`diff-mode-toggle`,role:`group`,"aria-label":`Diff layout`,className:`flex items-center rounded-md border border-border p-0.5`,children:[(0,d.jsx)(p,{current:e,value:`unified`,onModeChange:n}),(0,d.jsx)(p,{current:e,value:`split`,onModeChange:n})]}),(0,d.jsx)(i,{variant:`ghost`,size:`icon-sm`,"data-slot":`wrap-toggle`,"aria-pressed":t,"aria-label":`Wrap long lines`,title:`Wrap long lines`,className:o(t&&`bg-muted text-foreground`),onClick:()=>r(!t),children:(0,d.jsx)(u,{"aria-hidden":`true`})})]})}function p({current:e,value:t,onModeChange:n}){let r=e===t;return(0,d.jsx)(`button`,{type:`button`,"data-mode":t,"aria-pressed":r,onClick:()=>n(t),className:o(`rounded-[5px] px-2 py-0.5 text-[11px] font-medium capitalize`,r?`bg-muted text-foreground`:`text-muted-foreground hover:text-foreground`),children:t})}function m({branch:e}){return(0,d.jsxs)(`span`,{"data-slot":`branch-chip`,className:`flex min-w-0 items-center gap-1 rounded-sm border border-border bg-card px-1.5 py-px font-mono text-[11px] font-medium`,children:[(0,d.jsx)(c,{"aria-hidden":`true`,className:`size-3 shrink-0`}),(0,d.jsx)(`span`,{className:`truncate`,children:e})]})}var h=n(r(),1);function g(e){let[n,r]=(0,h.useState)(null);return(0,h.useEffect)(()=>{let e=!1;return t(()=>import(`./diff-view-CctnJHWe.js`).then(t=>{e||r({View:t.DiffView})},()=>{e||r(`failed`)}),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),()=>{e=!0}},[]),e.files.length===0?(0,d.jsx)(`p`,{"data-slot":`diff-empty`,className:o(`px-1 text-xs text-soft-foreground`,e.className),children:`No changes.`}):n===`failed`?(0,d.jsx)(_,{...e}):n===null?(0,d.jsx)(`p`,{"data-slot":`diff-loading`,className:o(`px-1 text-xs text-soft-foreground`,e.className),children:`Loading diff…`}):(0,d.jsx)(n.View,{...e})}function _({files:e,wrap:t=!1,className:n}){let r={adds:e.reduce((e,t)=>e+t.adds,0),dels:e.reduce((e,t)=>e+t.dels,0),files:e.length};return(0,d.jsxs)(`div`,{"data-slot":`diff`,"data-fallback":`true`,className:o(`flex min-w-0 flex-col gap-3`,n),children:[(0,d.jsxs)(`p`,{"data-slot":`diff-totals`,className:`flex items-center gap-2 px-1 text-xs text-muted-foreground`,children:[(0,d.jsxs)(`span`,{children:[r.files,` `,r.files===1?`file`:`files`,` changed`]}),(0,d.jsx)(s,{stat:r})]}),e.map(e=>(0,d.jsx)(v,{file:e,wrap:t},`${e.oldPath??``}→${e.path}`))]})}function v({file:e,wrap:t}){return(0,d.jsxs)(`section`,{"data-slot":`diff-file`,"data-path":e.path,className:`min-w-0 overflow-clip rounded-md border border-border bg-card`,children:[(0,d.jsxs)(`header`,{className:`flex items-center gap-2 border-b border-border/50 px-3 py-2`,children:[(0,d.jsx)(`span`,{"data-slot":`diff-file-path`,className:`min-w-0 truncate font-mono text-xs font-medium`,children:e.oldPath?`${e.oldPath} → ${e.path}`:e.path}),(0,d.jsx)(`span`,{className:`ml-auto shrink-0`,children:(0,d.jsx)(s,{stat:{adds:e.adds,dels:e.dels,files:1},className:`text-[11px]`})})]}),e.binary?(0,d.jsx)(`p`,{className:`px-4 py-2.5 text-xs text-soft-foreground`,children:`Binary file — no text diff.`}):e.patch===``?(0,d.jsx)(`p`,{className:`px-4 py-2.5 text-xs text-soft-foreground`,children:`No content changes (metadata only).`}):(0,d.jsx)(`pre`,{className:o(`py-2 font-mono text-xs leading-[1.7]`,t?`break-words whitespace-pre-wrap`:`overflow-x-auto whitespace-pre`),children:e.patch.split(`
|
|
3
|
-
`).map((e,t)=>(0,d.jsxs)(`span`,{className:o(`block px-4`,e.startsWith(`+`)&&!e.startsWith(`+++`)&&`bg-diff-add`,e.startsWith(`-`)&&!e.startsWith(`---`)&&`bg-diff-del`,e.startsWith(`@@`)&&`text-soft-foreground`),children:[e,e===``?` `:``]},t))})]})}function y(){let[e,t]=(0,h.useState)(()=>typeof window.matchMedia!=`function`||window.matchMedia(`(min-width: 768px)`).matches);return(0,h.useEffect)(()=>{if(typeof window.matchMedia!=`function`)return;let e=window.matchMedia(`(min-width: 768px)`),n=e=>t(e.matches);return e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[]),e}export{l as a,f as i,g as n,m as r,y as t};
|
package/web/index.html
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<title>cezar</title>
|
|
7
|
-
<link rel="icon" type="image/svg+xml" href="/open-mercato.svg">
|
|
8
|
-
<!-- Theme before first paint — no flash. Falls back to dark. -->
|
|
9
|
-
<script>document.documentElement.dataset.theme = localStorage.getItem('cez-theme') || 'dark';</script>
|
|
10
|
-
<!-- Web fonts degrade quietly to system fonts when offline. -->
|
|
11
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
12
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
13
|
-
<link href="https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,420;8..60,500;8..60,600&family=Instrument+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
|
14
|
-
<link rel="stylesheet" href="/style.css">
|
|
15
|
-
</head>
|
|
16
|
-
<body>
|
|
17
|
-
<aside id="sidebar">
|
|
18
|
-
<div id="brand">
|
|
19
|
-
<img src="/open-mercato.svg" alt="open-mercato" width="18" height="18" style="border-radius:5px;flex:none">
|
|
20
|
-
<span class="brand-name">cezar</span>
|
|
21
|
-
<span id="repo-chip" class="mono" hidden></span>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<div id="new-task-wrap">
|
|
25
|
-
<form id="new-task" autocomplete="off">
|
|
26
|
-
<textarea name="task" rows="2" placeholder="Describe a task for the agent…" required></textarea>
|
|
27
|
-
<div id="task-thumbs" hidden></div>
|
|
28
|
-
<div class="row opts">
|
|
29
|
-
<div class="pill-select" id="src-pill" data-pill="src"></div>
|
|
30
|
-
</div>
|
|
31
|
-
<div class="row actions">
|
|
32
|
-
<button type="button" id="task-attach" class="icon-btn" data-tip="Attach an image — or paste one with ⌘V">
|
|
33
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8"><path d="M20 11l-8 8a5 5 0 01-7-7l8-8a3.4 3.4 0 015 5l-8 8a1.7 1.7 0 01-2.4-2.4l7-7"/></svg>
|
|
34
|
-
</button>
|
|
35
|
-
<button type="button" id="plan-btn" data-tip="The AI drafts a chain of steps for this task. You review, reorder or trim them — nothing runs until you press Start.">
|
|
36
|
-
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linejoin="round"><path d="M12 3l2 5.5L19.5 10 14 12l-2 5.5L10 12l-5.5-2L10 8.5 12 3z"/></svg>
|
|
37
|
-
Plan
|
|
38
|
-
</button>
|
|
39
|
-
<div class="pill-select" id="runner-pill" data-pill="runner" hidden></div>
|
|
40
|
-
<div class="pill-select" id="model-pill" data-pill="model"></div>
|
|
41
|
-
<button type="submit" id="run-btn" class="tip-right" data-tip="Run the task (⌘↵)">
|
|
42
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2"><path d="M12 19V5M6 11l6-6 6 6"/></svg>
|
|
43
|
-
</button>
|
|
44
|
-
</div>
|
|
45
|
-
<div id="form-error" class="error-text" hidden></div>
|
|
46
|
-
<input type="file" id="task-file" accept="image/*" multiple hidden>
|
|
47
|
-
</form>
|
|
48
|
-
</div>
|
|
49
|
-
|
|
50
|
-
<nav id="tabs">
|
|
51
|
-
<button data-view="runs" class="active">
|
|
52
|
-
<svg viewBox="0 0 24 24"><path d="M13 2L4.5 13.5h5.5L9 22l8.5-11.5H12L13 2z"/></svg>
|
|
53
|
-
Runs
|
|
54
|
-
</button>
|
|
55
|
-
<button data-view="inbox">
|
|
56
|
-
<svg viewBox="0 0 24 24"><path d="M3 13h4l2 3h6l2-3h4M5 5h14l2 8v6H3v-6l2-8z"/></svg>
|
|
57
|
-
Inbox <span id="inbox-badge" class="count-badge" hidden></span>
|
|
58
|
-
</button>
|
|
59
|
-
<button data-view="repo">
|
|
60
|
-
<svg viewBox="0 0 24 24"><path d="M3 8a2 2 0 012-2h4l2 2h8a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2V8z"/></svg>
|
|
61
|
-
Repo
|
|
62
|
-
</button>
|
|
63
|
-
<button data-view="github">
|
|
64
|
-
<svg viewBox="0 0 24 24"><path d="M6 4a2 2 0 100 4 2 2 0 000-4zM6 8v8M6 16a2 2 0 100 4 2 2 0 000-4zM18 4a2 2 0 100 4 2 2 0 000-4zM18 8c0 6-6 8-10 8"/></svg>
|
|
65
|
-
GitHub
|
|
66
|
-
</button>
|
|
67
|
-
<button data-view="skills">
|
|
68
|
-
<svg viewBox="0 0 24 24"><path d="M12 3l2 5.5L19.5 10 14 12l-2 5.5L10 12l-5.5-2L10 8.5 12 3z"/></svg>
|
|
69
|
-
Skills
|
|
70
|
-
</button>
|
|
71
|
-
<button data-view="workflows">
|
|
72
|
-
<svg viewBox="0 0 24 24"><path d="M4 3.5h7v7H4zM13 13.5h7v7h-7zM7.5 10.5v2a2 2 0 002 2H13"/></svg>
|
|
73
|
-
Workflows
|
|
74
|
-
</button>
|
|
75
|
-
</nav>
|
|
76
|
-
|
|
77
|
-
<div id="run-list-wrap">
|
|
78
|
-
<div id="list-tabs"></div>
|
|
79
|
-
<div id="run-list"></div>
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
<div id="side-foot">
|
|
83
|
-
<span id="env-chips"></span>
|
|
84
|
-
<button id="theme-toggle" title="Toggle theme"></button>
|
|
85
|
-
</div>
|
|
86
|
-
</aside>
|
|
87
|
-
|
|
88
|
-
<main>
|
|
89
|
-
<section id="view-runs" class="view">
|
|
90
|
-
<section id="detail">
|
|
91
|
-
<div class="empty">Select a run — or start one.</div>
|
|
92
|
-
</section>
|
|
93
|
-
</section>
|
|
94
|
-
|
|
95
|
-
<section id="view-workflows" class="view" hidden></section>
|
|
96
|
-
<section id="view-inbox" class="view scroll-view" hidden></section>
|
|
97
|
-
<section id="view-github" class="view" hidden></section>
|
|
98
|
-
<section id="view-repo" class="view scroll-view" hidden></section>
|
|
99
|
-
<section id="view-skills" class="view" hidden></section>
|
|
100
|
-
</main>
|
|
101
|
-
|
|
102
|
-
<!-- proposed chain (spec 008) — an overlay over the main area, roomy enough
|
|
103
|
-
to read full step prompts; the sidebar was too tight for it -->
|
|
104
|
-
<div id="plan-overlay" hidden><div id="plan-panel"></div></div>
|
|
105
|
-
|
|
106
|
-
<script src="/app.js"></script>
|
|
107
|
-
</body>
|
|
108
|
-
</html>
|