@straiffi/archon 1.6.0 → 1.6.2
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/client/assets/GitHubActionsDialog-YYq8JstU.js +1 -0
- package/dist/client/assets/{TestsDialog-elElGi9L.js → TestsDialog-BDV84HfF.js} +2 -2
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-BNcdEMha.js → architectureDiagram-3BPJPVTR-GehFBNFz.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-xHTKb0-z.js → blockDiagram-GPEHLZMM-CTFXIE8q.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-kMngbYRg.js → c4Diagram-AAUBKEIU-BY9e8TiT.js} +1 -1
- package/dist/client/assets/channel-BHDgEkkI.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-BVZnJcYa.js → chunk-2J33WTMH-Ck8V3BxZ.js} +1 -1
- package/dist/client/assets/{chunk-3OPIFGDE-Dq_H_MkG.js → chunk-3OPIFGDE-DvZbg_ji.js} +1 -1
- package/dist/client/assets/{chunk-5ZQYHXKU-_TwHLQwE.js → chunk-5ZQYHXKU-DZL6nSFA.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-CKkS_93w.js → chunk-727SXJPM-DMy23TqS.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-BHSSO0SM.js → chunk-AQP2D5EJ-Ch4juSfK.js} +1 -1
- package/dist/client/assets/{chunk-CSCIHK7Q-CgzsiMAL.js → chunk-CSCIHK7Q-BSL0qTfP.js} +1 -1
- package/dist/client/assets/{chunk-KSCS5N6A-DM-rnicK.js → chunk-KSCS5N6A-C1zDfxY8.js} +1 -1
- package/dist/client/assets/{chunk-L5ZTLDWV-CnMgoXZs.js → chunk-L5ZTLDWV-D8yXktZ8.js} +1 -1
- package/dist/client/assets/{chunk-LZXEDZCA-CCr2z1iU.js → chunk-LZXEDZCA-CjmFVV-I.js} +2 -2
- package/dist/client/assets/{chunk-ND2GUHAM-DtA6gjMn.js → chunk-ND2GUHAM-Dc6gtC7r.js} +1 -1
- package/dist/client/assets/{chunk-NZK2D7GU-_8fmSSaf.js → chunk-NZK2D7GU-CJMnwR03.js} +1 -1
- package/dist/client/assets/{chunk-O5CBEL6O-B84elqwU.js → chunk-O5CBEL6O-BW2gf35w.js} +1 -1
- package/dist/client/assets/{chunk-WU5MYG2G-DBvmvPPt.js → chunk-WU5MYG2G-6nbIEzjM.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-eaJS9esZ.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-DjTlDKs4.js +1 -0
- package/dist/client/assets/{dagre-BM42HDAG-C-QssoNU.js → dagre-BM42HDAG-vmxXhZ0y.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-8RpG5DGb.js → diagram-2AECGRRQ-Bf7MS2bc.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-Dk2raJWq.js → diagram-5GNKFQAL-Br3zBMUu.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-7iZuIIef.js → diagram-KO2AKTUF-DTzQBils.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-JLaaaEE6.js → diagram-LMA3HP47-BT-zhfvW.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-jeL3-Rd3.js → diagram-OG6HWLK6-BkJWuAdb.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-B6uFrMrQ.js → erDiagram-TEJ5UH35-DLuUFa06.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-BFWnhmx2.js → flowDiagram-I6XJVG4X-DqxBy0Eu.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-nxON-689.js → ganttDiagram-6RSMTGT7-lxV5wli4.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-DEAsC0GZ.js → gitGraphDiagram-PVQCEYII-iEzJEXy_.js} +1 -1
- package/dist/client/assets/index-B3KA0m7e.css +2 -0
- package/dist/client/assets/index-BnMFJ-iq.js +265 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA-CAZHR2I8.js → infoDiagram-5YYISTIA-mjHIc-rc.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-DEe4SNzl.js → ishikawaDiagram-YF4QCWOH-C3mJymgB.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-CG2kTAj9.js → journeyDiagram-JHISSGLW-Bl7pH31i.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-DUWutAjA.js → kanban-definition-UN3LZRKU-iL68fF8o.js} +1 -1
- package/dist/client/assets/{line-B1SFN8mz.js → line-BbGkhDvA.js} +1 -1
- package/dist/client/assets/{mermaid-parser.core-C-dyz_nb.js → mermaid-parser.core-3NnYiOiR.js} +1 -1
- package/dist/client/assets/{mermaid.core-nm4BMZuF.js → mermaid.core-BdUaWj-Y.js} +3 -3
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-DZEd-RCz.js → mindmap-definition-RKZ34NQL-sDh1lwIs.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-WXxrzUwX.js → pieDiagram-4H26LBE5-CmkeWRGt.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-BClH2kQx.js → quadrantDiagram-W4KKPZXB-CusAc0KA.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-ByolUxfP.js → requirementDiagram-4Y6WPE33-DRjpIANs.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-B2vcb3U1.js → sankeyDiagram-5OEKKPKP-DNpufJOV.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-J8Nt0GXG.js → sequenceDiagram-3UESZ5HK-BD5zE-V4.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-CrgZ4Uwa.js → stateDiagram-AJRCARHV-fCUNQluV.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-CaE9ItcI.js +1 -0
- package/dist/client/assets/{timeline-definition-PNZ67QCA-CXebl6LI.js → timeline-definition-PNZ67QCA-C4u3WsSc.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-DLBqI39h.js → vennDiagram-CIIHVFJN-HdgYgPYH.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-ku4fViV9.js → wardleyDiagram-YWT4CUSO-mtIAqcj8.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-5Jh-bBeb.js → xychartDiagram-2RQKCTM6-CekNHwM1.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/db.js +133 -0
- package/dist/server/db.js.map +1 -1
- package/dist/server/index.js +160 -15
- package/dist/server/index.js.map +1 -1
- package/dist/server/lib/agent.js +12 -11
- package/dist/server/lib/agent.js.map +1 -1
- package/dist/server/lib/buildOpenQuestions.js +263 -0
- package/dist/server/lib/buildOpenQuestions.js.map +1 -0
- package/dist/server/lib/bundleReviewOperations.js +17 -3
- package/dist/server/lib/bundleReviewOperations.js.map +1 -1
- package/dist/server/lib/lightweightPrompt.js +2 -1
- package/dist/server/lib/lightweightPrompt.js.map +1 -1
- package/dist/server/lib/planModeQuestions.js +23 -1
- package/dist/server/lib/planModeQuestions.js.map +1 -1
- package/dist/server/lib/projectAutoConfig.js +2 -1
- package/dist/server/lib/projectAutoConfig.js.map +1 -1
- package/dist/server/lib/projects.js +10 -0
- package/dist/server/lib/projects.js.map +1 -1
- package/dist/server/lib/ticketAutomation.js +16 -4
- package/dist/server/lib/ticketAutomation.js.map +1 -1
- package/dist/server/lib/ticketAutomationCommit.js +10 -10
- package/dist/server/lib/ticketAutomationCommit.js.map +1 -1
- package/dist/server/lib/ticketOpenQuestions.js +17 -0
- package/dist/server/lib/ticketOpenQuestions.js.map +1 -1
- package/dist/server/lib/ticketWorkflowOperations.js +1 -1
- package/dist/server/lib/ticketWorkflowOperations.js.map +1 -1
- package/dist/server/lib/tickets.js +48 -6
- package/dist/server/lib/tickets.js.map +1 -1
- package/dist/server/workers/build.js +55 -12
- package/dist/server/workers/build.js.map +1 -1
- package/dist/server/workers/chat.js +2 -5
- package/dist/server/workers/chat.js.map +1 -1
- package/dist/server/workers/followUp.js +119 -18
- package/dist/server/workers/followUp.js.map +1 -1
- package/dist/server/workers/plan.js +4 -7
- package/dist/server/workers/plan.js.map +1 -1
- package/dist/server/workers/review.js +25 -8
- package/dist/server/workers/review.js.map +1 -1
- package/dist/server/workers/specSession.js +2 -5
- package/dist/server/workers/specSession.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/assets/GitHubActionsDialog-oMY61JXF.js +0 -1
- package/dist/client/assets/channel-DAW1OrrC.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-BmFh-n6n.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-tA1aAbh4.js +0 -1
- package/dist/client/assets/index-BzDXl4AF.js +0 -265
- package/dist/client/assets/index-DSap5tSX.css +0 -2
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-CUEBQOsD.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-BNv3lrIs.js";import{B as t,C as n,D as r,E as i,F as a,I as o,L as s,M as c,N as l,O as u,R as d,T as f,W as p,_ as m,b as h,c as g,d as _,f as v,j as y,l as b,r as x,s as S,u as C,w,y as T,z as E}from"./index-BzDXl4AF.js";var D=e(p(),1),O=E(),k=`https://docs.github.com/en/actions`,A=(e,t)=>g.t(`common:githubActions.${e}`,t),j=e=>A(`status.${e}`),M=e=>e?A(`conclusion.${e}`):null,N=e=>e.status===`completed`?e.conclusion===`success`?`border-emerald-400/40 bg-emerald-500/10 text-emerald-200`:e.conclusion===`failure`||e.conclusion===`timed_out`?`border-rose-400/40 bg-rose-500/10 text-rose-200`:e.conclusion===`cancelled`?`border-amber-400/40 bg-amber-500/10 text-amber-200`:`border-border/70 bg-background/60 text-muted-foreground`:e.status===`in_progress`?`border-sky-400/40 bg-sky-500/10 text-sky-200`:e.status===`queued`?`border-violet-400/40 bg-violet-500/10 text-violet-200`:`border-border/70 bg-background/60 text-muted-foreground`,P=e=>e.status===`completed`?e.conclusion===`success`?`border-emerald-400/30 bg-emerald-500/10 text-emerald-200`:e.conclusion===`failure`?`border-rose-400/30 bg-rose-500/10 text-rose-200`:`border-border/70 bg-background/60 text-muted-foreground`:e.status===`in_progress`?`border-sky-400/30 bg-sky-500/10 text-sky-200`:`border-border/70 bg-background/60 text-muted-foreground`,F=e=>{let t=e.run_started_at??e.created_at,n=e.updated_at;if(!t||!n)return null;let r=Date.parse(t),i=Date.parse(n);if(!Number.isFinite(r)||!Number.isFinite(i)||i<r)return null;let a=i-r;if(a<1e3)return`${a} ms`;let o=Math.floor(a/1e3),s=Math.floor(o/3600),c=Math.floor(o%3600/60),l=o%60;return s>0?`${s}h ${c}m ${l}s`:c>0?`${c}m ${l}s`:`${(a/1e3).toFixed(a>=1e4?0:1)} s`},I=e=>e.status===`completed`?M(e.conclusion)??A(`status.completed`):j(e.status),L=e=>{let t={};for(let n of e){if(n.type===`boolean`){t[n.name]=n.default===!0;continue}typeof n.default==`string`&&n.default!==``&&(t[n.name]=n.default)}return t},R=({workflow:e,inputsState:t,isSelected:n,onSelect:r})=>{let i=e.state===`active`,a=t?.dispatchable??!0,o=i&&a&&!t?.isLoading,s=e.path.split(`/`).pop();return(0,O.jsxs)(`div`,{className:l(`flex flex-col gap-3 rounded-2xl border px-4 py-3 transition-colors`,n?`border-sky-400/45 bg-sky-500/10`:`border-border/60 bg-background/20 hover:bg-accent/20`),children:[(0,O.jsx)(`p`,{className:`line-clamp-2 break-words text-sm font-medium text-foreground`,children:e.name}),(0,O.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,O.jsx)(`p`,{className:`min-w-0 text-[11px] text-muted-foreground`,children:s}),(0,O.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,O.jsx)(S,{variant:`outline`,className:l(`px-2 py-0.5 text-[10px] uppercase tracking-[0.18em]`,i?`border-emerald-400/30 bg-emerald-500/10 text-emerald-200`:`border-border/70 bg-background/60 text-muted-foreground`),children:A(i?`workflows.stateActive`:`workflows.stateDisabled`)}),(0,O.jsxs)(c,{type:`button`,variant:n?`secondary`:`outline`,size:`sm`,className:`h-8 gap-1.5 px-3 text-xs`,disabled:!o,"aria-label":A(`workflows.runAriaLabel`,{name:e.name}),title:!a&&t?A(`inputs.notDispatchable`):void 0,onClick:r,children:[t?.isLoading?(0,O.jsx)(h,{className:`h-3.5 w-3.5 animate-spin`}):(0,O.jsx)(T,{className:`h-3.5 w-3.5`}),(0,O.jsx)(`span`,{children:A(`actions.run`)})]})]})]})]})},z=({workflow:e,inputsState:t,refValue:r,onRefChange:i,values:a,onValueChange:o,isDispatching:s,onDispatch:l,onCancel:u})=>{let d=t.inputs.filter(e=>e.required&&!B(a[e.name],e)),f=t.dispatchable&&!t.isLoading&&!t.error&&r.trim()!==``&&d.length===0&&!s;return(0,O.jsxs)(`div`,{className:`space-y-4 rounded-2xl border border-border/70 bg-background/20 p-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,O.jsxs)(`div`,{className:`min-w-0`,children:[(0,O.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:A(`inputs.title`)}),(0,O.jsx)(`p`,{className:`mt-0.5 truncate text-sm font-medium text-foreground`,children:e.name})]}),(0,O.jsx)(c,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":A(`actions.cancel`),onClick:u,children:(0,O.jsx)(b,{className:`h-4 w-4`})})]}),(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(n,{htmlFor:`github-actions-ref`,children:A(`inputs.refLabel`)}),(0,O.jsx)(w,{id:`github-actions-ref`,type:`text`,value:r,onChange:e=>{i(e.target.value)},placeholder:A(`inputs.refPlaceholder`),"aria-label":A(`inputs.refAriaLabel`)})]}),t.isLoading&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,O.jsx)(h,{className:`h-3.5 w-3.5 animate-spin`}),(0,O.jsx)(`span`,{children:A(`inputs.loading`)})]}),t.error&&(0,O.jsx)(`p`,{className:`text-xs text-rose-200`,children:t.error}),!t.dispatchable&&!t.isLoading&&!t.error&&(0,O.jsx)(`p`,{className:`text-xs text-amber-200`,children:A(`inputs.notDispatchable`)}),t.inputs.map(e=>(0,O.jsx)(V,{input:e,value:a[e.name],onChange:t=>{o(e.name,t)}},e.name)),d.length>0&&(0,O.jsx)(`p`,{className:`text-xs text-rose-200`,children:A(`inputs.requiredValidationError`)}),(0,O.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,O.jsx)(c,{type:`button`,variant:`ghost`,onClick:u,disabled:s,children:A(`actions.cancel`)}),(0,O.jsxs)(c,{type:`button`,variant:`success`,onClick:l,disabled:!f,children:[s?(0,O.jsx)(h,{className:`h-4 w-4 animate-spin`}):(0,O.jsx)(T,{className:`h-4 w-4`}),(0,O.jsx)(`span`,{children:A(`actions.dispatch`)})]})]})]})},B=(e,t)=>t.type===`boolean`?typeof e==`boolean`:typeof e==`string`&&e.trim()!==``,V=({input:e,value:t,onChange:r})=>{let i=`github-actions-input-${e.name}`;return(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsxs)(n,{htmlFor:i,className:`flex items-center gap-2`,children:[(0,O.jsx)(`span`,{children:e.name}),e.required&&(0,O.jsx)(`span`,{className:`text-[10px] uppercase tracking-[0.18em] text-rose-200/80`,children:A(`inputs.requiredLabel`)})]}),e.description&&(0,O.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:e.description}),H(e,i,t,r)]})},H=(e,t,n,r)=>{if(e.type===`boolean`){let i=typeof n==`boolean`?n:e.default===!0;return(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(x,{id:t,checked:i,onCheckedChange:e=>{r(e)}}),(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:A(i?`inputs.booleanYes`:`inputs.booleanNo`)})]})}if(e.type===`choice`){let i=e.options??[],a=typeof n==`string`?n:typeof e.default==`string`?e.default:``;return(0,O.jsxs)(`select`,{id:t,className:`h-9 w-full rounded-lg border border-border/70 bg-background/60 px-3 text-sm text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,value:a,onChange:e=>{r(e.target.value)},children:[a===``&&(0,O.jsx)(`option`,{value:``,children:A(`inputs.selectPlaceholder`)}),i.map(e=>(0,O.jsx)(`option`,{value:e,children:e},e))]})}return(0,O.jsx)(w,{id:t,type:`text`,value:typeof n==`string`?n:typeof e.default==`string`?e.default:``,onChange:e=>{r(e.target.value)}})},U=({job:e})=>e.steps.length===0?null:(0,O.jsx)(`div`,{className:`mt-2 ml-4 space-y-1 border-l border-border/60 pl-4`,children:e.steps.map(t=>(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(S,{variant:`outline`,className:l(`px-2 py-0 text-[10px] uppercase tracking-[0.16em]`,P(t)),children:t.status===`completed`?M(t.conclusion)??A(`status.completed`):j(t.status)}),(0,O.jsx)(`span`,{className:`truncate text-[11px] text-muted-foreground`,children:t.name})]},`${e.id}-${t.number}`))}),W=({run:e})=>{let t=F(e),n=I(e);return(0,O.jsxs)(`div`,{className:`rounded-2xl border border-border/60 bg-background/20 px-4 py-3`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,O.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,O.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e.name??`#${e.id}`}),(0,O.jsx)(S,{variant:`outline`,className:l(`px-2 py-0.5 text-[10px] uppercase tracking-[0.18em]`,N(e)),children:n})]}),(0,O.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[t&&(0,O.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:t}),e.html_url&&(0,O.jsxs)(`a`,{href:e.html_url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[11px] text-sky-200 hover:text-sky-100`,children:[A(`actions.openOnGithub`),(0,O.jsx)(C,{className:`h-3 w-3`})]})]})]}),e.head_branch&&(0,O.jsx)(`p`,{className:`mt-1 text-[11px] text-muted-foreground`,children:e.head_branch}),e.jobs.map(e=>(0,O.jsxs)(`div`,{className:`mt-2`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsx)(S,{variant:`outline`,className:l(`px-2 py-0 text-[10px] uppercase tracking-[0.16em]`,N(e)),children:e.status===`completed`?M(e.conclusion)??A(`status.completed`):j(e.status)}),(0,O.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:e.name})]}),(0,O.jsx)(U,{job:e})]},e.id))]})},G=({tracked:e})=>{let t=e.state===`not_visible`?A(`runs.notVisible`):A(`runs.resolving`);return(0,O.jsxs)(`div`,{className:`flex items-center gap-2 rounded-2xl border border-border/60 bg-background/20 px-4 py-3`,children:[(0,O.jsx)(h,{className:`h-3.5 w-3.5 animate-spin text-muted-foreground`}),(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:t})]})},K=e=>({ref:e??`main`}),q=({projectId:e,defaultBranch:n,onClose:l})=>{let[p,g]=(0,D.useState)([]),[x,S]=(0,D.useState)(!0),[w,T]=(0,D.useState)(null),[E,j]=(0,D.useState)([]),[M,N]=(0,D.useState)([]),[P,F]=(0,D.useState)({}),[I,B]=(0,D.useState)(null),[V,H]=(0,D.useState)(!1),[U]=(0,D.useState)(()=>K(n)),q=(0,D.useRef)({}),J=(0,D.useRef)({}),Y=(0,D.useRef)(null),X=(0,D.useCallback)(async n=>{F(e=>{let t=e[n.id];return t?.isLoading?e:{...e,[n.id]:{inputs:t?.inputs??[],dispatchable:t?.dispatchable??!0,isLoading:!0,error:null}}});try{let t=await o(e,n.id,n.path);return F(e=>({...e,[n.id]:{inputs:t.inputs,dispatchable:t.dispatchable,isLoading:!1,error:null}})),t}catch(e){return F(r=>({...r,[n.id]:{inputs:[],dispatchable:!0,isLoading:!1,error:e instanceof t?e.message:A(`workflows.loadError`)}})),null}},[e]),Z=(0,D.useCallback)(async()=>{S(!0),T(null);try{let t=await d(e);g(t.workflows),Promise.allSettled(t.workflows.map(e=>X(e)))}catch(e){T(e instanceof t?e.message:A(`workflows.loadError`))}finally{S(!1)}},[X,e]),Q=(0,D.useCallback)(async()=>{try{j((await s(e)).runs)}catch(e){console.warn(`[github-actions] unable to load runs`,e)}},[e]);(0,D.useEffect)(()=>{Z(),Q()},[Z,Q]);let ee=(0,D.useCallback)(async e=>{if(I?.workflow.id===e.id)return;Y.current=e.id,B({workflow:e,ref:U.ref,values:{}});let t=P[e.id];if(t&&!t.isLoading&&!t.error){B(n=>!n||n.workflow.id!==e.id?n:{...n,values:L(t.inputs)});return}let n=await X(e);n&&B(t=>!t||t.workflow.id!==e.id?t:{...t,values:L(n.inputs)})},[U.ref,P,X,I]),te=(0,D.useCallback)(async()=>{if(!I)return;let n=P[I.workflow.id];if(!n||!n.dispatchable)return;H(!0);let r={};for(let e of n.inputs){let t=I.values[e.name];e.type===`boolean`?r[e.name]=typeof t==`boolean`?t:e.default===!0:typeof t==`string`&&t!==``?r[e.name]=t:typeof e.default==`string`&&e.default!==``&&(r[e.name]=e.default)}try{await a(e,I.workflow.id,{ref:I.ref,inputs:r}),m.success(A(`messages.dispatched`)),B(null),Q()}catch(e){m.error(e instanceof t?e.message:A(`messages.dispatchError`))}finally{H(!1)}},[P,Q,e,I]);(0,D.useEffect)(()=>{let t=t=>{!t||t.project_id!==e||(N(e=>{let n=e.filter(e=>e.tracking_key!==t.tracking_key);return t.run?n:[...n,t]}),t.run&&j(e=>{let n=e.findIndex(e=>e.id===t.run.id);if(n===-1)return[t.run,...e];let r=[...e];return r[n]=t.run,r}))};return _.on(`github-actions:updated`,t),()=>{_.off(`github-actions:updated`,t)}},[e]),(0,D.useEffect)(()=>{let e=I?.workflow.id;!e||Y.current!==e||(q.current[e]?.scrollIntoView({block:`nearest`}),J.current[e]?.scrollIntoView({block:`nearest`}),Y.current=null)},[I?.workflow.id]);let $=(0,D.useMemo)(()=>[...E].sort((e,t)=>{let n=e.updated_at?Date.parse(e.updated_at):0;return(t.updated_at?Date.parse(t.updated_at):0)-n}),[E]);return(0,O.jsx)(f,{open:!0,onOpenChange:e=>{e||l()},children:(0,O.jsxs)(r,{showCloseButton:!1,overlayClassName:`bg-black/70`,className:`flex h-[calc(100vh-2rem)] max-h-[58rem] w-full max-w-[calc(100%-1rem)] flex-col gap-0 overflow-hidden rounded-3xl border border-[#2a2a38] bg-[#16161f] p-0 shadow-2xl sm:max-w-5xl`,onInteractOutside:e=>e.preventDefault(),children:[(0,O.jsx)(y,{className:`sr-only`,children:A(`dialog.srTitle`)}),(0,O.jsx)(u,{className:`sr-only`,children:A(`dialog.srDescription`)}),(0,O.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-border px-6 py-4`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,O.jsx)(`div`,{className:`flex size-10 shrink-0 items-center justify-center rounded-2xl border border-border/70 bg-background/60 text-violet-200`,children:(0,O.jsx)(v,{className:`h-5 w-5`})}),(0,O.jsx)(`div`,{children:(0,O.jsx)(`h2`,{className:`text-2xl font-semibold text-foreground`,children:A(`dialog.title`)})})]}),(0,O.jsx)(i,{asChild:!0,children:(0,O.jsx)(c,{type:`button`,"aria-label":A(`dialog.closeAriaLabel`),variant:`ghost`,size:`icon-sm`,className:`cursor-pointer text-muted-foreground hover:text-foreground`,children:(0,O.jsx)(b,{className:`h-4 w-4`})})})]}),(0,O.jsxs)(`div`,{className:`grid min-h-0 flex-1 gap-0 overflow-hidden lg:grid-cols-[22rem_minmax(0,1fr)]`,children:[(0,O.jsxs)(`aside`,{"aria-label":A(`workflows.ariaLabel`),className:`flex min-h-0 flex-col gap-3 overflow-y-auto border-b border-border/70 px-4 py-4 lg:border-r lg:border-b-0`,children:[(0,O.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,O.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:A(`workflows.title`)}),(0,O.jsx)(c,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 px-2 text-xs text-muted-foreground hover:text-foreground`,onClick:()=>{Z(),Q()},children:A(`actions.refresh`)})]}),x&&(0,O.jsxs)(`div`,{className:`flex items-center gap-2 px-2 text-xs text-muted-foreground`,children:[(0,O.jsx)(h,{className:`h-3.5 w-3.5 animate-spin`}),(0,O.jsx)(`span`,{children:A(`workflows.loading`)})]}),w&&(0,O.jsx)(`div`,{className:`rounded-2xl border border-rose-500/30 bg-rose-500/10 px-4 py-3 text-sm text-rose-200`,children:w}),!x&&p.length===0&&!w&&(0,O.jsxs)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:[(0,O.jsx)(`p`,{children:A(`workflows.empty`)}),(0,O.jsx)(`p`,{className:`mt-1`,children:A(`workflows.emptyHint`)}),(0,O.jsxs)(`a`,{href:k,target:`_blank`,rel:`noreferrer`,className:`mt-2 inline-flex items-center gap-1 text-xs text-sky-200 hover:text-sky-100`,children:[A(`workflows.docsLink`),(0,O.jsx)(C,{className:`h-3 w-3`})]})]}),(0,O.jsx)(`div`,{className:`space-y-2`,children:p.map(e=>{let t=I?.workflow.id===e.id;return(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(`div`,{ref:t=>{q.current[e.id]=t},children:(0,O.jsx)(R,{workflow:e,inputsState:P[e.id]??null,isSelected:t,onSelect:()=>{ee(e)}})}),t&&I&&(0,O.jsx)(`div`,{ref:t=>{J.current[e.id]=t},children:(0,O.jsx)(z,{workflow:e,inputsState:P[e.id]??{inputs:[],dispatchable:!0,isLoading:!1,error:null},refValue:I.ref,onRefChange:e=>{B(t=>t&&{...t,ref:e})},values:I.values,onValueChange:(e,t)=>{B(n=>n&&{...n,values:{...n.values,[e]:t}})},isDispatching:V,onDispatch:()=>{te()},onCancel:()=>{B(null)}})})]},e.id)})})]}),(0,O.jsxs)(`section`,{className:`flex min-h-0 flex-col gap-3 overflow-y-auto px-4 py-4`,children:[(0,O.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:A(`runs.title`)}),M.map(e=>(0,O.jsx)(G,{tracked:e},e.tracking_key)),$.map(e=>(0,O.jsx)(W,{run:e},e.id)),$.length===0&&M.length===0&&(0,O.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:A(`runs.empty`)})]})]})]})})};export{q as GitHubActionsDialog};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{at as e,ot as t}from"./chunk-CSCIHK7Q-CgzsiMAL.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-Bi_byJUe.js";import"./chunk-CSCIHK7Q-CgzsiMAL.js";import"./chunk-5ZQYHXKU-_TwHLQwE.js";import"./chunk-O5CBEL6O-B84elqwU.js";import"./chunk-FMBD7UC4-CWQN4V4s.js";import"./chunk-BSJP7CBP-CNtf2uaW.js";import"./chunk-L5ZTLDWV-CnMgoXZs.js";import"./chunk-ND2GUHAM-DtA6gjMn.js";import"./chunk-55IACEB6-B-d-YzxI.js";import"./chunk-2J33WTMH-BVZnJcYa.js";import"./chunk-NZK2D7GU-_8fmSSaf.js";import"./chunk-3OPIFGDE-Dq_H_MkG.js";import"./chunk-KSCS5N6A-DM-rnicK.js";import"./chunk-LZXEDZCA-CCr2z1iU.js";import{i as t,n,r,t as i}from"./chunk-727SXJPM-CKkS_93w.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-Bi_byJUe.js";import"./chunk-CSCIHK7Q-CgzsiMAL.js";import"./chunk-5ZQYHXKU-_TwHLQwE.js";import"./chunk-O5CBEL6O-B84elqwU.js";import"./chunk-FMBD7UC4-CWQN4V4s.js";import"./chunk-BSJP7CBP-CNtf2uaW.js";import"./chunk-L5ZTLDWV-CnMgoXZs.js";import"./chunk-ND2GUHAM-DtA6gjMn.js";import"./chunk-55IACEB6-B-d-YzxI.js";import"./chunk-2J33WTMH-BVZnJcYa.js";import"./chunk-NZK2D7GU-_8fmSSaf.js";import"./chunk-3OPIFGDE-Dq_H_MkG.js";import"./chunk-KSCS5N6A-DM-rnicK.js";import"./chunk-LZXEDZCA-CCr2z1iU.js";import{i as t,n,r,t as i}from"./chunk-727SXJPM-CKkS_93w.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|