@wjarka/cezarion 0.18.0-dev.8161 → 0.18.0-dev.8167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/web/dist/assets/{accounts-section-xFYT_zfY.js → accounts-section-CRiql0cT.js} +1 -1
- package/web/dist/assets/{activity-motion-OAYNqxZ2.js → activity-motion-Dic711r4.js} +1 -1
- package/web/dist/assets/{activity-route-cdDIR26F.js → activity-route-DkqFQfEX.js} +1 -1
- package/web/dist/assets/{agent-config-section-B8yx4Ftt.js → agent-config-section-pDXHYHXz.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-BUJi0JBr.js → agent-defaults-section-D_d24TE0.js} +1 -1
- package/web/dist/assets/{appearance-L-Mcz7xt.js → appearance-BcCBqgn-.js} +1 -1
- package/web/dist/assets/{automations-route-DndFRPQ2.js → automations-route-fR3nMyuy.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-uXKNbpAQ.js → commit-diff-panel-Ox2k_MeC.js} +1 -1
- package/web/dist/assets/{diff-DcmpXzlx.js → diff-B-6M-t3K.js} +2 -2
- package/web/dist/assets/{diff-view-Bu3mxoNK.js → diff-view-nrQTDxks.js} +1 -1
- package/web/dist/assets/{file-preview-DmLdg1Ak.js → file-preview-B3KVy73J.js} +1 -1
- package/web/dist/assets/{git-toolbar-CBMk5v-t.js → git-toolbar-TX4S_cYI.js} +1 -1
- package/web/dist/assets/github-DMMGSGqg.js +1 -0
- package/web/dist/assets/{global-activity-route-Rx7cgzpu.js → global-activity-route-c5c5Q00Y.js} +1 -1
- package/web/dist/assets/{index-CilVqe_c.js → index-DfmmHZB9.js} +4 -4
- package/web/dist/assets/{markdown-CoC8_Mxa.js → markdown-CH0W4B61.js} +1 -1
- package/web/dist/assets/{notifications-section-CRVfC723.js → notifications-section-bytadcE1.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-BcePJL41.js → preview-pane-connected-Be0ZQ1QZ.js} +1 -1
- package/web/dist/assets/{projects-section-BzJOvGbU.js → projects-section-D2OikZvZ.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-DCXEFZeZ.js → prompt-templates-section-BZQcqxyC.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-B6gmSQmK.js → remote-settings-notice-B7vBsgJe.js} +1 -1
- package/web/dist/assets/{repo-git-f5cKDC-i.js → repo-git-4HLZT14I.js} +1 -1
- package/web/dist/assets/{report-reader-D_SwO-8H.js → report-reader-CmGgO12j.js} +1 -1
- package/web/dist/assets/{reports-CyP79G2S.js → reports-B-AxM1y5.js} +1 -1
- package/web/dist/assets/{run-header-CmEgf2OE.js → run-header-KmcjpBMq.js} +1 -1
- package/web/dist/assets/{settings-agent-picker-CIUuXcrv.js → settings-agent-picker-X-g0UKgD.js} +1 -1
- package/web/dist/assets/{settings-shell-DuQAKYA0.js → settings-shell-DEbkOTuH.js} +1 -1
- package/web/dist/assets/{skills-CBHa5_n1.js → skills-DkL4o5z5.js} +1 -1
- package/web/dist/assets/{task-changes-B-daTy0n.js → task-changes-DggkNS5B.js} +1 -1
- package/web/dist/assets/{task-commits-B8JcUxwa.js → task-commits-xhACNoGj.js} +1 -1
- package/web/dist/assets/{task-files-QGAAGN7K.js → task-files-CL76uaPp.js} +1 -1
- package/web/dist/assets/{task-github-item-BUQ-EaXP.js → task-github-item-CqID35v9.js} +1 -1
- package/web/dist/assets/{task-thread-BDXHF8cV.js → task-thread-BuX8KtlY.js} +1 -1
- package/web/dist/assets/{thread-state-CiVcAJSc.js → thread-state-dtADhBQ_.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-qYz6wj5e.js → use-hand-to-agent-state-BD10hMfn.js} +1 -1
- package/web/dist/assets/{workflows-CmaJn4ba.js → workflows-C2H-HfDa.js} +1 -1
- package/web/dist/assets/{workspace-tools-CJ8gOVwz.js → workspace-tools-Cyfz8V_L.js} +1 -1
- package/web/dist/assets/{worktrees-section-DmsaW6FZ.js → worktrees-section-Doo2MjMH.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/dist/assets/github-ktVA2Gmk.js +0 -1
package/web/dist/assets/{use-hand-to-agent-state-qYz6wj5e.js → use-hand-to-agent-state-BD10hMfn.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{n as r,t as i}from"./utils-DSMR_WLb.js";import{C as a,Nt as o,ci as s,et as c,kr as l,qt as u,r as d,tt as f}from"./project-scope-context-DqBHMdSb.js";import{A as p,E as m,J as h,Pt as g,Tt as _,Ut as v,Z as y,en as b,in as x,kt as S,p as C,t as w}from"./queries-DeeY9cGJ.js";import{t as T}from"./useQuery-IS5tPlew.js";import{n as E}from"./toaster-Bo5vCbz-.js";import{Y as D,c as O,ct as k,ft as A,g as j,it as M,k as N,l as ee,m as te,ot as P,r as F,tt as I,u as ne,ut as L,y as re}from"./design-icons-CzEoMH9c.js";import{t as R}from"./external-link-BE6y205O.js";import{t as ie}from"./eye-B8okNWXU.js";import{a as ae,i as z}from"./format-BNCkW110.js";import{t as oe}from"./message-square-B-MD-8rD.js";import{t as se}from"./play-CmVAj_fu.js";import{t as B}from"./button-BQ2y4XRB.js";import{i as ce,r as le,t as ue}from"./popover-BPgUYFyu.js";import{a as de,i as fe,o as pe,r as me,s as he,t as ge}from"./dialog-BVF6dIeS.js";import{t as V}from"./project-router-CYJwJlJL.js";import{a as _e,i as H,o as U,r as ve,s as ye,t as be}from"./command-CDt1BsZy.js";import{d as xe,f as W,i as Se,o as Ce,p as we,s as Te,t as Ee,u as De}from"./skills-pM_PouEs.js";import{$ as Oe,Bn as G,F as ke,G as Ae,H as je,I as Me,J as Ne,K as Pe,L as Fe,M as Ie,N as Le,P as Re,U as ze,W as K,X as Be,Z as Ve,_n as He,er as Ue,et as We,it as Ge,j as Ke,nt as qe,rt as Je,xt as q,yn as Ye}from"./index-CilVqe_c.js";import{t as Xe}from"./markdown-CoC8_Mxa.js";import{t as Ze}from"./textarea-vJt9undk.js";import{t as Qe}from"./diff-DcmpXzlx.js";import{t as $e}from"./tab-link-Bc33InzJ.js";var J=e(t(),1),Y=n(),et={squash:`Squash and merge`,merge:`Create a merge commit`,rebase:`Rebase and merge`};function X({state:e}){let t=`size-4 shrink-0`;return e===`passing`?(0,Y.jsx)(O,{size:16,"aria-hidden":`true`,"data-slot":`gh-merge-status-passing`,className:i(t,`text-success`)}):e===`failing`?(0,Y.jsx)(j,{size:16,"aria-hidden":`true`,"data-slot":`gh-merge-status-failing`,className:i(t,`text-danger`)}):e===`pending`?(0,Y.jsx)(ae,{"aria-hidden":`true`,"data-slot":`gh-merge-status-pending`,className:i(t,`animate-spin text-warning`)}):(0,Y.jsx)(te,{size:16,"aria-hidden":`true`,"data-slot":`gh-merge-status-unknown`,className:i(t,`text-soft-foreground`)})}function tt(e){return e?.available?e.mergeState:null}function nt(e,t){return e&&t?.methods.includes(e)?e:t?.defaultMethod??t?.methods[0]??null}function rt(e){return e.state===`merged`?`Merged`:e.state===`closed`?`Closed`:e.isDraft?`Draft`:e.mergeable===`conflicting`?`Conflicts must be resolved`:e.canMerge?`Ready to merge`:e.eligibility===`unknown`?`Merge blocked · Requirements unknown`:`Merge blocked`}function it(e){return e===`approved`||e===`not-required`?`passing`:e===`unknown`?`unknown`:`failing`}function at(e){return e===`mergeable`?`passing`:e===`conflicting`?`failing`:`unknown`}function ot(e){return e===`conflicting`?`present`:e===`mergeable`?`none`:`unknown`}function st(e){return e===!0?` · required`:e===null?` · requiredness unknown`:``}function ct(e){return e?.available===!1?e.reason:`GitHub could not load merge requirements.`}function lt(e,t,n){return!!(e&&(t.canMerge||t.canOverride&&n))}function Z(e){return e?et[e]:`Merge`}function ut(e){return e===`conflicting`?`true`:void 0}function dt({check:e}){return(0,Y.jsxs)(`li`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Y.jsx)(X,{state:e.state}),(0,Y.jsxs)(`span`,{children:[e.name,` · `,e.state,st(e.required)]})]}),e.url&&r(e.url)?(0,Y.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`text-muted-foreground underline`,children:`details`}):null]})}function ft({reason:e}){return(0,Y.jsxs)(`section`,{"data-slot":`gh-merge-unavailable`,className:`mt-6 rounded-lg border border-border bg-card p-4 text-sm`,children:[(0,Y.jsx)(`p`,{className:`font-medium`,children:`Merge status unavailable`}),(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-soft-foreground`,children:e})]})}function pt({state:e,selectedMethod:t,overrideRules:n,mergeEnabled:r,refreshPending:a,onRefresh:o,onRunAgent:s,onConfirm:c,onMethodChange:l,onOverrideChange:u}){let d=rt(e),f=it(e.reviewDecision),p=at(e.mergeable);return(0,Y.jsxs)(`div`,{className:`flex items-start gap-3`,children:[e.canMerge?(0,Y.jsx)(O,{size:16,"aria-hidden":`true`,className:`mt-0.5 size-5 shrink-0 text-success`}):(0,Y.jsx)(P,{size:16,"aria-hidden":`true`,className:`mt-0.5 size-5 shrink-0 text-warning`}),(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,Y.jsx)(`h3`,{className:`font-semibold`,children:d}),(0,Y.jsxs)(B,{type:`button`,variant:`ghost`,size:`sm`,disabled:a,onClick:o,children:[(0,Y.jsx)(D,{size:16,"aria-hidden":`true`,className:i(`size-3.5`,a&&`animate-spin`)}),`Refresh`]})]}),(0,Y.jsxs)(`p`,{className:`mt-1 font-mono text-[11px] text-soft-foreground`,children:[e.headRef,` (`,e.headSha.slice(0,7),`) → `,e.baseRef]}),(0,Y.jsxs)(`ul`,{className:`mt-3 space-y-2 text-xs`,children:[(0,Y.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(X,{state:f}),(0,Y.jsxs)(`span`,{children:[`Reviews: `,e.reviewDecision.replaceAll(`-`,` `)]})]}),(0,Y.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(X,{state:p}),(0,Y.jsxs)(`span`,{children:[`Conflicts: `,ot(e.mergeable)]})]}),e.checks.length===0?(0,Y.jsx)(`li`,{children:`No checks configured`}):e.checks.map(e=>(0,Y.jsx)(dt,{check:e},e.name)),e.blockers.map(e=>(0,Y.jsx)(`li`,{className:`text-soft-foreground`,children:e.message},e.code))]}),e.mergeable===`conflicting`&&s?(0,Y.jsx)(B,{className:`mt-4`,onClick:s,children:`Run agent on this PR`}):null,e.canOverride?(0,Y.jsxs)(`label`,{className:`mt-4 flex cursor-pointer items-start gap-2 rounded-md border border-warning/40 bg-warning/5 p-3 text-xs`,children:[(0,Y.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>u(e.target.checked),className:`mt-0.5 size-4 accent-accent-strong`}),(0,Y.jsxs)(`span`,{children:[(0,Y.jsx)(`span`,{className:`block font-medium`,children:`Merge without waiting for requirements`}),(0,Y.jsx)(`span`,{className:`mt-0.5 block text-soft-foreground`,children:`GitHub will allow this only if your permissions can bypass the repository rules.`})]})]}):null,e.eligibility===`unknown`?(0,Y.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`GitHub could not confirm review and branch-protection requirements. Passing checks do not establish merge readiness.`}):null,e.state===`open`&&e.methods.length>0?(0,Y.jsxs)(`div`,{className:`mt-4 flex flex-col flex-wrap gap-2 sm:flex-row`,children:[(0,Y.jsx)(`select`,{"aria-label":`Merge method`,value:t??``,onChange:e=>l(e.target.value),className:`h-9 min-w-0 flex-1 rounded-md border border-input bg-background px-3 text-sm`,children:e.methods.map(e=>(0,Y.jsx)(`option`,{value:e,children:et[e]},e))}),(0,Y.jsx)(B,{disabled:!r,onClick:c,children:Z(t)})]}):null]})]})}function mt({number:e,state:t,selectedMethod:n,confirming:r,overrideRules:i,mergePending:a,mergeError:o,onOpenChange:s,onMerge:c}){return(0,Y.jsx)(ge,{open:r,onOpenChange:s,children:(0,Y.jsxs)(me,{"data-slot":`gh-merge-confirm`,showCloseButton:!1,children:[(0,Y.jsxs)(pe,{children:[(0,Y.jsxs)(he,{children:[Z(n),` pull request #`,e,`?`]}),(0,Y.jsx)(fe,{asChild:!0,children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsxs)(`p`,{children:[`This will merge “`,t.title,`” into `,t.baseRef,`. GitHub will re-check the exact reviewed head before changing the repository.`]}),i&&t.canOverride?(0,Y.jsx)(`p`,{"data-slot":`gh-bypass-warning`,className:`mt-4 text-sm text-warning`,children:`You are asking GitHub to bypass unmet repository requirements; GitHub may refuse if your permissions do not allow it.`}):null]})})]}),o?(0,Y.jsx)(`p`,{className:`text-sm text-danger`,children:o.message}):null,(0,Y.jsxs)(de,{children:[(0,Y.jsx)(B,{variant:`outline`,disabled:a,onClick:()=>s(!1),children:`Cancel`}),(0,Y.jsx)(B,{disabled:a,onClick:c,children:a?`Merging…`:Z(n)})]})]})})}function ht({number:e,onRunAgent:t}){let n=s(),r=y(),i=T({queryKey:w.githubMergeState(e),queryFn:({signal:t})=>f(e,{},{signal:t}),retry:!1}),a=tt(i.data),[c,l]=(0,J.useState)(null),[u,d]=(0,J.useState)(!1),[p,m]=(0,J.useState)(!1),h=x({mutationFn:t=>f(e,{refresh:!0}),onSuccess:(e,t)=>n.setQueryData(t,e),onError:e=>E(e instanceof Error?e.message:String(e),{tone:`danger`})}),g=nt(c,a),_=()=>({mergeState:w.githubMergeState(e),list:w.githubPages(50),comments:w.githubComments(`pr`,e),item:w.githubItem(`pr`,e),refStatus:r===void 0?void 0:w.githubRefStatusOf(r)}),v=x({mutationFn:t=>{if(!a||!g)throw Error(`No merge method is available.`);return o(e,{method:g,expectedHeadSha:a.headSha,...p&&a.canOverride?{overrideRules:!0}:{}})},onSuccess:(t,r)=>{d(!1),E(`Pull request #${e} merged`),n.invalidateQueries({queryKey:r.mergeState}),n.invalidateQueries({queryKey:r.list}),n.invalidateQueries({queryKey:r.comments}),n.invalidateQueries({queryKey:r.item}),r.refStatus&&n.invalidateQueries({queryKey:r.refStatus})},onError:(e,t)=>{E(e instanceof Error?e.message:String(e),{tone:`danger`}),n.invalidateQueries({queryKey:t.mergeState})}});return i.isPending?(0,Y.jsx)(G,{"data-slot":`gh-merge-loading`,className:`mt-6 h-32 w-full`}):a?(0,Y.jsxs)(`section`,{"data-slot":`gh-merge-box`,"data-eligibility":a.eligibility,"data-conflicting":ut(a.mergeable),"aria-live":`polite`,className:`mt-6 rounded-lg border border-border bg-card p-4`,children:[(0,Y.jsx)(pt,{state:a,selectedMethod:g,overrideRules:p,mergeEnabled:lt(g,a,p),refreshPending:h.isPending,onRefresh:()=>h.mutate(w.githubMergeState(e)),onRunAgent:t,onConfirm:()=>d(!0),onMethodChange:l,onOverrideChange:m}),(0,Y.jsx)(mt,{number:e,state:a,selectedMethod:g,confirming:u,overrideRules:p,mergePending:v.isPending,mergeError:v.error,onOpenChange:d,onMerge:()=>v.mutate(_())})]}):(0,Y.jsx)(ft,{reason:ct(i.data)})}function gt(e){let t=new Set;for(let n of e)for(let e of n.labels)t.add(e);return[...t].sort((e,t)=>e.toLowerCase().localeCompare(t.toLowerCase()))}function _t(e,t={}){let n=(t.query??``).trim().toLowerCase(),r=t.labels??[],i=n.replace(/^#/,``),a=i!==``&&/^\d+$/.test(i);return e.filter(e=>r.length>0&&!r.every(t=>e.labels.includes(t))||t.assignees?.length&&!e.assignees?.some(e=>t.assignees.some(t=>t.toLowerCase()===e.toLowerCase()))||t.author!==void 0&&e.author.toLowerCase()!==t.author.toLowerCase()||t.includeNumbers&&!t.includeNumbers.has(e.number)||t.excludeNumbers?.has(e.number)||t.projectId&&e.projectIds!==void 0&&!e.projectIds.includes(t.projectId)?!1:n===``?!0:a?String(e.number).includes(i):`#${e.number} ${e.title} ${e.author} ${e.body??``}`.toLowerCase().includes(n))}function vt(e,t){let n=e.trim();if(n===``)return!1;let r=n.replace(/^#/,``);return/^\d+$/.test(r)?!t.some(e=>e.number===Number(r)):t.length===0}function Q(e){if(!e||!/^[0-9a-fA-F]{6}$/.test(e))return{borderColor:`var(--border)`,color:`var(--muted-foreground)`};let t=`#${e}`;return{backgroundColor:`${t}22`,borderColor:`${t}66`,color:`color-mix(in srgb, ${t} 50%, var(--foreground))`}}function yt({label:e,color:t,plain:n=!1}){return(0,Y.jsx)(`span`,{"data-slot":`gh-label`,"data-label":e,style:n?void 0:Q(t),className:n?`text-[11px] font-normal text-muted-foreground`:`rounded-full border px-1.5 py-px text-[12px] font-medium`,children:e})}function bt(e){return e===`pr`?`pull request`:`issue`}function xt(e,t,n){return e===`pr`&&!!(t||n)}function St({backLink:e}){return e?(0,Y.jsxs)(V,{to:e.to,"data-slot":`gh-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,Y.jsx)(F,{size:16,"aria-hidden":`true`,className:`size-3.5`}),`Back to the list`]}):null}function Ct({item:e,kindWord:t,commentCount:n,hasDiffStat:i,additions:a,deletions:o}){return(0,Y.jsxs)(`p`,{"data-slot":`gh-meta`,className:`flex flex-wrap items-center gap-x-1.5 font-mono text-[11px] text-soft-foreground`,children:[(0,Y.jsxs)(`span`,{children:[`#`,e.number]}),`·`,(0,Y.jsx)(`span`,{children:t}),`·`,(0,Y.jsxs)(`span`,{children:[`opened by `,e.author]}),`·`,(0,Y.jsxs)(`span`,{children:[z(e.createdAt),` ago`]}),n?(0,Y.jsxs)(Y.Fragment,{children:[`·`,(0,Y.jsx)(Kt,{count:n})]}):null,i?(0,Y.jsxs)(Y.Fragment,{children:[`·`,(0,Y.jsxs)(`span`,{"data-slot":`gh-diffstat`,children:[(0,Y.jsxs)(`span`,{className:`text-success`,children:[`+`,a??0]}),` `,(0,Y.jsxs)(`span`,{className:`text-danger`,children:[`−`,o??0]})]})]}):null,`·`,r(e.url)?(0,Y.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-open-link`,className:`inline-flex items-center gap-0.5 text-muted-foreground hover:text-foreground hover:underline`,children:[`open on GitHub`,(0,Y.jsx)(R,{"aria-hidden":`true`,className:`size-2.5`})]}):(0,Y.jsx)(`span`,{"data-slot":`gh-open-link`,className:`text-muted-foreground`,children:`open on GitHub`})]})}function wt({item:e,subNav:t,changes:n}){return e.kind===`pr`?t?(0,Y.jsxs)(`nav`,{"aria-label":`Pull request detail`,className:`mt-4 flex border-b border-border`,children:[(0,Y.jsx)($e,{to:q(`prs`,t.filter,e.number),active:!n,children:`Conversation`}),(0,Y.jsx)($e,{to:q(`prs`,t.filter,e.number,`/changes`),active:n,children:`Changes`})]}):(0,Y.jsx)(V,{to:q(`prs`,null,e.number,`/changes`),"data-slot":`gh-files-changed`,className:`mt-3 inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground hover:underline`,children:`Files changed`}):null}function Tt({item:e,colors:t,checks:n}){return e.labels.length>0||n?(0,Y.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-1.5`,children:[e.labels.map(e=>(0,Y.jsx)(yt,{label:e,color:t[e]},e)),n?(0,Y.jsx)(qt,{checks:n,url:e.url}):null]}):null}function Et({item:e,colors:t,body:n}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{"data-slot":`gh-body`,className:`mt-5 text-sm`,children:n?(0,Y.jsx)(Xe,{children:n}):(0,Y.jsx)(`p`,{className:`text-soft-foreground`,children:`(no description)`})}),(0,Y.jsx)(kt,{item:e,colors:t})]})}function Dt({item:e,colors:t,checks:n,comments:r,backLink:i,subNav:a,onRunAgent:o,afterHeading:s,children:c}){let l=a?.changes??!1,u=bt(e.kind),d=m(e.kind,e.number,!l).data?.detail,f=d?.body??e.body,p=d?.additions??e.additions,h=d?.deletions??e.deletions,g=xt(e.kind,p,h),_=r??e.comments;return(0,Y.jsxs)(`article`,{"data-slot":`gh-detail-inner`,className:`min-w-0 px-4 py-4 md:px-7 md:py-5`,children:[(0,Y.jsx)(St,{backLink:i}),(0,Y.jsxs)(`div`,{"data-slot":`gh-description-card`,className:e.kind===`pr`?`rounded-xl border border-border bg-card p-6`:void 0,children:[e.kind===`pr`?(0,Y.jsxs)(`h2`,{className:`mb-4 text-[22px] leading-snug font-normal`,children:[`#`,e.number,` `,e.title]}):null,(0,Y.jsx)(Ct,{item:e,kindWord:u,commentCount:_,hasDiffStat:g,additions:p,deletions:h}),e.kind===`pr`?null:(0,Y.jsx)(`h2`,{className:`mt-2 text-[22px] leading-snug font-normal`,children:e.title}),s,(0,Y.jsx)(wt,{item:e,subNav:a,changes:l}),(0,Y.jsx)(Tt,{item:e,colors:t,checks:n}),l&&e.kind===`pr`?(0,Y.jsx)(Ot,{item:e}):(0,Y.jsx)(Et,{item:e,colors:t,body:f})]}),e.kind===`pr`?(0,Y.jsx)(ht,{number:e.number,onRunAgent:o}):null,c]})}function Ot({item:e}){let t=s(),n=p(e.number),[a,o]=(0,J.useState)(``),[l,u]=(0,J.useState)(null),d=n.data,f=d?.available?d.files.filter(e=>e.path.toLowerCase().includes(a.toLowerCase())):[],m=f.findIndex(e=>e.path===l);(0,J.useEffect)(()=>{f.length>0&&!f.some(e=>e.path===l)&&u(f[0].path)},[d?.available?d.headSha:``,a]);let h=async()=>{let n=d?.available?d.headSha:null,r=w.githubPrChanges(e.number),i=await c(e.number,{refresh:!0});t.setQueryData(r,i),i.available&&n&&n!==i.headSha&&(u(i.files[0]?.path??null),E(`The reviewed revision changed.`))};if(n.isPending)return(0,Y.jsx)(`p`,{"aria-live":`polite`,className:`mt-6 text-sm text-muted-foreground`,children:`Loading changed files…`});if(n.isError||!d)return(0,Y.jsx)(`p`,{className:`mt-6 text-sm text-danger`,children:`Changed files could not be loaded.`});if(!d.available)return(0,Y.jsx)(`p`,{className:`mt-6 text-sm text-muted-foreground`,children:d.reason});let g=f.map(e=>({path:e.path,...e.previousPath?{oldPath:e.previousPath}:{},status:e.status===`removed`?`deleted`:e.status===`changed`?`modified`:e.status,adds:e.additions,dels:e.deletions,binary:e.patchUnavailableReason===`binary`,patch:e.patch??``})),_=r(e.url)?`${e.url}/files`:null,v=f.find(e=>e.path===l);return(0,Y.jsxs)(`section`,{"data-slot":`gh-pr-changes`,className:`mt-5 min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,Y.jsxs)(`strong`,{children:[d.files.length,` changed files`]}),(0,Y.jsxs)(`span`,{className:`text-success`,children:[`+`,d.additions]}),(0,Y.jsxs)(`span`,{className:`text-danger`,children:[`−`,d.deletions]}),(0,Y.jsxs)(`span`,{className:`font-mono text-muted-foreground`,title:d.headSha,children:[`head `,d.headSha.slice(0,8)]}),(0,Y.jsx)(B,{type:`button`,variant:`outline`,size:`sm`,className:`ml-auto min-h-11`,onClick:()=>void h(),children:`Refresh`})]}),d.truncated?(0,Y.jsxs)(`p`,{role:`status`,className:`mt-3 rounded-md border border-warning/40 bg-warning/10 p-3 text-xs`,children:[d.reason??`This response is incomplete.`,` `,_?(0,Y.jsx)(`a`,{href:_,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:`Open all files on GitHub`}):null]}):null,(0,Y.jsxs)(`div`,{className:`mt-4 grid min-w-0 gap-4 lg:grid-cols-[240px_minmax(0,1fr)]`,children:[(0,Y.jsxs)(`aside`,{className:`min-w-0`,children:[(0,Y.jsx)(`input`,{"aria-label":`Filter changed files`,value:a,onChange:e=>o(e.target.value),placeholder:`Filter files…`,className:`min-h-11 w-full rounded-md border border-input bg-background px-3 text-sm`}),(0,Y.jsx)(`select`,{"aria-label":`Select changed file`,value:l??``,onChange:e=>u(e.target.value),className:`mt-2 min-h-11 w-full rounded-md border border-input bg-background px-2 text-sm lg:hidden`,children:f.map(e=>(0,Y.jsx)(`option`,{children:e.path},e.path))}),(0,Y.jsx)(`ul`,{className:`mt-2 hidden max-h-[60vh] overflow-auto lg:block`,children:f.map(e=>(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>u(e.path),className:i(`min-h-11 w-full truncate rounded px-2 text-left text-xs`,l===e.path&&`bg-muted font-medium`),title:e.path,children:[e.status,` · `,e.path,` `,(0,Y.jsxs)(`span`,{className:`text-success`,children:[`+`,e.additions]}),` `,(0,Y.jsxs)(`span`,{className:`text-danger`,children:[`−`,e.deletions]})]})},e.path))})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`mb-2 flex justify-end gap-1`,children:[(0,Y.jsx)(B,{"aria-label":`Previous file`,variant:`outline`,size:`icon`,className:`min-h-11 min-w-11`,disabled:m<=0,onClick:()=>u(f[m-1]?.path??null),children:(0,Y.jsx)(Ue,{})}),(0,Y.jsx)(B,{"aria-label":`Next file`,variant:`outline`,size:`icon`,className:`min-h-11 min-w-11`,disabled:m<0||m>=f.length-1,onClick:()=>u(f[m+1]?.path??null),children:(0,Y.jsx)(ne,{size:16})})]}),f.length===0?(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No changed files match this filter.`}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Qe,{files:g.filter(e=>e.path===l),wrap:!0,className:`min-w-0`}),v&&!v.patch?(0,Y.jsxs)(`p`,{className:`rounded-b border border-border p-3 text-xs text-muted-foreground`,children:[`Patch unavailable: `,v.patchUnavailableReason??`not-provided`,`.`]}):null]})]})]})]})}function kt({item:e,colors:t}){let n=m(e.kind,e.number),r=n.data,i=(0,J.useMemo)(()=>{let e=[...(r?.comments??[]).map(e=>({row:`comment`,comment:e})),...(r?.events??[]).map(e=>({row:`event`,event:e}))],t=e=>{let t=Date.parse(At(e));return Number.isNaN(t)?-1/0:t};return e.sort((e,n)=>t(e)-t(n))},[r?.comments,r?.events]);return n.isPending?(0,Y.jsxs)(`section`,{"data-slot":`gh-thread-loading`,className:`mt-6 border-t border-border pt-5`,children:[(0,Y.jsx)(G,{className:`mb-3 h-3 w-24`}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Y.jsx)(G,{className:`h-14 w-full`}),(0,Y.jsx)(G,{className:`h-14 w-full`})]})]}):!r||!r.available?(0,Y.jsxs)(`section`,{"data-slot":`gh-thread-error`,className:`mt-6 border-t border-border pt-5 text-xs text-soft-foreground`,children:[(0,Y.jsxs)(`span`,{children:[`Couldn’t load comments — `,r?.reason??(n.error instanceof Error?n.error.message:`could not load comments`),`. `]}),(0,Y.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-0.5 text-muted-foreground hover:text-foreground hover:underline`,children:[`open on GitHub`,(0,Y.jsx)(R,{"aria-hidden":`true`,className:`size-2.5`})]})]}):i.length===0?null:(0,Y.jsxs)(`section`,{"data-slot":`gh-thread`,className:`mt-6 border-t border-border pt-5`,children:[(0,Y.jsxs)(`h3`,{"data-slot":`gh-thread-header`,className:`mb-4 text-[11px] font-semibold tracking-wide text-soft-foreground uppercase`,children:[`Activity · `,r.comments.length,` comment`,r.comments.length===1?``:`s`]}),(0,Y.jsx)(`ul`,{className:`flex flex-col gap-5`,children:jt(i).map(e=>e.group===`commits`?(0,Y.jsx)(Mt,{commits:e.commits,colors:t},e.commits[0].id):e.entry.row===`comment`?(0,Y.jsx)(Ht,{comment:e.entry.comment},`${e.entry.comment.kind}-${e.entry.comment.id}`):(0,Y.jsx)(Nt,{event:e.entry.event,colors:t},e.entry.event.id))}),r.truncated?(0,Y.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-thread-truncated`,className:`mt-4 inline-flex items-center gap-0.5 text-xs text-soft-foreground hover:text-foreground hover:underline`,children:[`thread truncated — open on GitHub`,(0,Y.jsx)(R,{"aria-hidden":`true`,className:`size-2.5`})]}):null]})}var At=e=>e.row===`comment`?e.comment.createdAt:e.event.createdAt;function jt(e){let t=[],n=[],r=()=>{n.length!==0&&(n.length===1?t.push({group:`single`,entry:{row:`event`,event:n[0]}}):t.push({group:`commits`,commits:n}),n=[])};for(let i of e){if(i.row===`event`&&i.event.kind===`committed`&&i.row===`event`){let e=n[n.length-1];e&&e.actor!==i.event.actor&&r(),n.push(i.event);continue}r(),t.push({group:`single`,entry:i})}return r(),t}function Mt({commits:e,colors:t}){let[n,r]=(0,J.useState)(!1),i=e[0]?.actor??`?`;return n?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`li`,{"data-slot":`gh-commit-group`,"data-open":`true`,className:`min-w-0`,children:(0,Y.jsxs)(`button`,{type:`button`,"aria-expanded":!0,onClick:()=>r(!1),className:`flex items-center gap-1.5 font-mono text-[11px] text-soft-foreground hover:text-foreground`,children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,children:$.committed}),(0,Y.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:i}),(0,Y.jsxs)(`span`,{children:[`added `,e.length,` commits`]})]})}),e.map(e=>(0,Y.jsx)(Nt,{event:e,colors:t},e.id))]}):(0,Y.jsx)(`li`,{"data-slot":`gh-commit-group`,"data-open":`false`,className:`min-w-0`,children:(0,Y.jsxs)(`button`,{type:`button`,"aria-expanded":!1,onClick:()=>r(!0),className:`flex items-center gap-1.5 font-mono text-[11px] text-soft-foreground hover:text-foreground`,children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,children:$.committed}),(0,Y.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:i}),(0,Y.jsxs)(`span`,{children:[`added `,e.length,` commits`]}),(0,Y.jsx)(`span`,{className:`shrink-0`,children:z(e[e.length-1].createdAt)})]})})}var $={committed:`⚙`,labeled:`◆`,unlabeled:`◇`,assigned:`◍`,unassigned:`◌`,merged:`⑃`,closed:`⊘`,reopened:`⊙`,head_ref_force_pushed:`↻`,"cross-referenced":`↗`,renamed:`✎`};function Nt({event:e,colors:t}){return(0,Y.jsxs)(`li`,{"data-slot":`gh-event-row`,"data-kind":e.kind,className:i(`flex min-w-0 items-center gap-1.5 font-mono text-[11px] text-soft-foreground`,e.kind===`merged`&&`text-accent-foreground`),children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0`,children:$[e.kind]}),(0,Y.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:e.actor}),(0,Y.jsx)(zt,{event:e,colors:t}),(0,Y.jsx)(`span`,{className:`shrink-0`,children:z(e.createdAt)}),e.url?(0,Y.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`open ${e.kind} on GitHub`,className:`ml-auto shrink-0 text-muted-foreground hover:text-foreground`,children:(0,Y.jsx)(R,{"aria-hidden":`true`,className:`size-2.5`})}):null]})}function Pt({event:e}){return(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Y.jsx)(`span`,{className:`shrink-0`,children:`committed`}),e.sha?(0,Y.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}):null,e.message?(0,Y.jsx)(`span`,{className:`truncate font-sans text-foreground`,children:e.message}):null,(0,Y.jsx)(Bt,{checks:e.checks})]})}function Ft({event:e,colors:t}){return(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Y.jsx)(`span`,{className:`shrink-0`,children:e.kind===`labeled`?`added the`:`removed the`}),e.label?(0,Y.jsx)(`span`,{"data-slot":`gh-event-label`,style:Q(e.label.color??t[e.label.name]),className:`max-w-[12rem] truncate rounded-full border px-1.5 py-px font-sans text-[12px]`,children:e.label.name}):null,(0,Y.jsx)(`span`,{className:`shrink-0`,children:`label`})]})}function It({event:e}){return(0,Y.jsxs)(`span`,{className:`truncate`,children:[e.kind===`assigned`?`assigned`:`unassigned`,` `,e.subject??`someone`]})}function Lt({event:e}){return(0,Y.jsxs)(`span`,{className:`truncate`,children:[`referenced this in `,e.refNumber?`#${e.refNumber}`:`another thread`,e.refTitle?` ${e.refTitle}`:``]})}var Rt={committed:e=>(0,Y.jsx)(Pt,{event:e}),labeled:(e,t)=>(0,Y.jsx)(Ft,{event:e,colors:t}),unlabeled:(e,t)=>(0,Y.jsx)(Ft,{event:e,colors:t}),assigned:e=>(0,Y.jsx)(It,{event:e}),unassigned:e=>(0,Y.jsx)(It,{event:e}),merged:()=>(0,Y.jsx)(`span`,{children:`merged this`}),closed:()=>(0,Y.jsx)(`span`,{children:`closed this`}),reopened:()=>(0,Y.jsx)(`span`,{children:`reopened this`}),head_ref_force_pushed:()=>(0,Y.jsx)(`span`,{children:`force-pushed`}),renamed:e=>(0,Y.jsxs)(`span`,{className:`truncate`,children:[`renamed this to `,e.subject??`—`]}),"cross-referenced":e=>(0,Y.jsx)(Lt,{event:e})};function zt({event:e,colors:t}){return Rt[e.kind]?.(e,t)??null}function Bt({checks:e}){return e?(0,Y.jsx)(`span`,{"data-slot":`gh-commit-checks`,"data-checks":e,"aria-label":`checks ${e}`,className:i(`shrink-0`,Gt[e]),children:Wt[e]}):null}var Vt={approved:{label:`approved`,tone:`border-success/40 text-success`},changes_requested:{label:`changes requested`,tone:`border-danger/40 text-danger`},commented:{label:`commented`,tone:`border-border text-muted-foreground`},dismissed:{label:`dismissed`,tone:`border-border text-muted-foreground`}};function Ht({comment:e}){let t=e.reviewState?Vt[e.reviewState]:null;return(0,Y.jsxs)(`li`,{"data-slot":`gh-thread-entry`,"data-kind":e.kind,className:`min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5 font-mono text-[11px] text-soft-foreground`,children:[(0,Y.jsx)(Ut,{url:e.avatarUrl,login:e.author}),(0,Y.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:e.author}),(0,Y.jsx)(`span`,{children:z(e.createdAt)}),t?(0,Y.jsx)(`span`,{"data-slot":`gh-review-chip`,"data-review-state":e.reviewState,className:i(`rounded-full border px-1.5 py-px font-sans text-[12px] font-medium`,t.tone),children:t.label}):null,(0,Y.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`open comment on GitHub`,className:`ml-auto shrink-0 text-muted-foreground hover:text-foreground`,children:(0,Y.jsx)(R,{"aria-hidden":`true`,className:`size-2.5`})})]}),(0,Y.jsx)(`div`,{"data-slot":`gh-thread-body`,className:`text-sm`,children:e.body?(0,Y.jsx)(Xe,{children:e.body}):(0,Y.jsx)(`p`,{className:`text-soft-foreground`,children:`(no body)`})})]})}function Ut({url:e,login:t}){let[n,r]=(0,J.useState)(!1);return e&&!n?(0,Y.jsx)(`img`,{src:e,alt:``,width:16,height:16,loading:`lazy`,onError:()=>r(!0),"data-slot":`gh-avatar`,className:`size-4 shrink-0 rounded-full`}):(0,Y.jsx)(`span`,{"data-slot":`gh-avatar-fallback`,"aria-hidden":`true`,className:`flex size-4 shrink-0 items-center justify-center rounded-full bg-muted text-[8px] font-semibold text-muted-foreground uppercase`,children:t.slice(0,1)||`?`})}var Wt={passing:`✓`,failing:`✗`,pending:`○`},Gt={passing:`text-success`,failing:`text-danger`,pending:`text-muted-foreground`};function Kt({count:e}){return e?(0,Y.jsxs)(`span`,{"data-slot":`gh-comment-count`,"data-count":e,"aria-label":`${e} comment${e===1?``:`s`}`,className:`inline-flex shrink-0 items-center gap-0.5`,children:[(0,Y.jsx)(oe,{"aria-hidden":`true`,className:`size-3`}),e]}):null}function qt({checks:e,url:t}){let n=i(`text-[11px] font-medium`,Gt[e],t&&`hover:underline`),r=`${Wt[e]} checks ${e}`;return t?(0,Y.jsx)(`a`,{href:`${t}/checks`,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-checks`,"data-checks":e,className:n,children:r}):(0,Y.jsx)(`span`,{"data-slot":`gh-checks`,"data-checks":e,className:n,children:r})}function Jt({checks:e}){return(0,Y.jsx)(`span`,{"data-slot":`gh-row-checks`,"data-checks":e,title:`checks ${e}`,"aria-label":`checks ${e}`,className:i(`shrink-0 font-sans text-[11px] font-semibold`,Gt[e]),children:Wt[e]})}function Yt(e){return`${e.kind===`pr`?`Address GitHub pull request`:`Fix GitHub issue`} #${e.number}: ${e.title}\n\n${e.url}`}function Xt(e,t=[]){let n=Yt(e);return e.body?.trim()&&(n+=`\n\n---\n\n${e.body.trim()}`),t.length&&(n+=Zt(t)),n}function Zt(e){return`\n\nUse these skills where relevant: ${e.join(`, `)}.`}function Qt(e,t){return e.replace(/\{\{\s*number\s*\}\}/gi,()=>`#${t.number}`).replace(/\{\{\s*title\s*\}\}/gi,()=>t.title).replace(/\{\{\s*url\s*\}\}/gi,()=>t.url)}function $t(e,t){if(e.includes(t.url))return!0;let n=t.kind===`pr`?String.raw`(?:pull\s+request|pr)`:String.raw`issue`;return new RegExp(String.raw`\b${n}\s*#?\s*${t.number}\b`,`i`).test(e)}function en(e,t,n){let r=(n??``).trim();if(!r)return Xt(e,t);let i=Yt(e),a=r.startsWith(i)?i+Qt(r.slice(i.length),e):Qt(r,e),o=$t(a,e)?a:`${i}\n\n${a}`;return t.length?o+Zt(t):o}function tn(e){let t=[];for(let n of e.slice(0,8)){let e=new Set(t.map(e=>e.id)),r=n;for(let t=2;e.has(r);t++)r=`${n}-${t}`;t.push({id:r,name:n,skill:n,prompt:`{{task}}`})}return t}function nn(e,t,n,r,i={}){return t?{...i,workflow:t,task:en(e,n.map(e=>e.id),r)}:n.length?{...i,steps:tn(n.map(e=>e.id)).map((e,t)=>({...e,...n[t]?.path===void 0?{}:{skillPath:n[t].path}})),task:en(e,[],r)}:{...i,workflow:`quick-task`,task:en(e,[],r)}}function rn(e){let t=h(),n=C(),r=v(),{runners:i,uninstalled:a,signedOut:o,accounts:s,repoAccount:c,accountFor:l}=Ye(),u=n.data?.defaultRunner,d=Me(e.runner,i,u??i[0]??`claude`),f=n.data?.modelsLocked===!0,p=l(d,e.account),m=b(d,!0,p??c?.[d]),g=ke(f?null:e.model,d,r.data,n.data?.defaultModels,m.data),_=Ie(g,m.data);return{runner:d,runnerExplicit:e.runner!==null,model:g,effort:f?``:Re(e.effort,_),effortOptions:_,runners:i,uninstalled:a,signedOut:o,defaultRunner:u,canRun:t.isSuccess&&i.length>0,modelsLocked:f,providerPending:t.isPending,providerError:t.isError,accounts:s,account:p,repoAccount:c}}function an(e){return{runner:Fe(e.runner,e.defaultRunner,e.runnerExplicit),model:e.modelsLocked?void 0:e.model||void 0,effort:e.modelsLocked?void 0:e.effort||void 0}}function on(e){return{...an(e),...e.account?{agentProfile:e.account}:{}}}function sn(e,t){let{runners:n,uninstalled:r,signedOut:i}=e;return n.length>1||r.length>0||i.length>0||n.some(e=>He(t,e))}function cn({pick:e,onChange:t,disabled:n=!1,accounts:r=!1,layout:i}){let a=(0,J.useRef)(null),o=(0,J.useRef)(null),[s,c]=(0,J.useState)(()=>typeof window<`u`&&window.innerWidth<=767);(0,J.useLayoutEffect)(()=>{let e=a.current;if(i!==`row`||!e)return;let t=()=>{let t=window.innerWidth<=767||e.getBoundingClientRect().width<550,n=document.activeElement;o.current=n instanceof HTMLElement&&e.contains(n)?n:null,c(t)};t();let n=typeof ResizeObserver>`u`?null:new ResizeObserver(t);return n?.observe(e),window.addEventListener(`resize`,t),()=>{n?.disconnect(),window.removeEventListener(`resize`,t)}},[i]),(0,J.useLayoutEffect)(()=>{let e=o.current;o.current=null,e&&e.isConnected&&document.activeElement!==e&&e.focus()},[s]);let l=rn(e),{runner:u,model:d,effort:f,effortOptions:p,runners:m,canRun:h,modelsLocked:g}=l,_=C(),y=v(),x=b(u,!0,l.account??l.repoAccount?.[u]),S=Le(u,y.data,x.data,[e.model,_.data?.defaultModels?.[u]]),w=n||!h,T=r?l.accounts:[],E=sn(l,T)?(0,Y.jsx)(Pe,{icon:(0,Y.jsx)(M,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-accent-text`}),fieldLabel:!0,runners:m,uninstalled:l.uninstalled,signedOut:l.signedOut,value:u,accounts:T,account:r?l.account:null,repoAccount:r?l.repoAccount:void 0,disabled:w,onPick:(n,i)=>t(r?{runner:n,account:i,model:n===u?e.model:null,effort:e.effort}:{runner:n,account:null,model:null,effort:e.effort})},`runner`):null,D=(0,Y.jsx)(K,{icon:(0,Y.jsx)(re,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-accent-text`}),fieldLabel:!0,slot:`model-pill`,ariaLabel:`Model`,label:d===``?`Default`:S.find(e=>e.id===d).label,value:d,disabled:w,readOnly:g===!0,disabledHint:g?`Model selection is locked to native coding-agent settings.`:void 0,onPick:n=>{let r=Ie(n,x.data);t({...e,model:n,effort:e.effort===null?null:Re(e.effort,r)})},options:S.map(e=>({value:e.id,label:e.label,desc:e.desc})),status:Ke(u,y.data,x)},`model`),O=(0,Y.jsx)(K,{icon:(0,Y.jsx)(N,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-accent-text`}),fieldLabel:!0,slot:`effort-pill`,ariaLabel:`Effort`,label:p.find(e=>e.value===f)?.label??`auto`,value:f,disabled:w,readOnly:g===!0,disabledHint:g?`Effort selection is locked to native coding-agent settings.`:void 0,onPick:n=>t({...e,effort:n}),options:p.map(e=>({value:e.value,label:e.label,desc:e.desc}))},`effort`);return i===`row`?(0,Y.jsx)(`div`,{ref:a,"data-slot":`engine-row-box`,children:(0,Y.jsx)(`div`,{"data-slot":`engine-row`,className:`engine-row`,role:`group`,"aria-label":`Agent settings`,children:(0,Y.jsx)(Ae,{children:s?[E,O,D]:[E,D,O]})})}):(0,Y.jsxs)(Ae,{children:[E,D,O]})}var ln={workflow:null,skills:[]},un=`cez-followup-selection`;function dn(e){let t=e&&typeof e==`object`?e:{};return{workflow:typeof t.workflow==`string`?t.workflow:null,skills:Array.isArray(t.skills)?t.skills.flatMap(e=>typeof e==`string`?[{id:e}]:!e||typeof e!=`object`||typeof e.id!=`string`?[]:[{id:e.id,...typeof e.path==`string`?{path:e.path}:{}}]):[]}}function fn(){try{let e=localStorage.getItem(un);return e?dn(JSON.parse(e)):{...ln}}catch{return{...ln}}}function pn(e){try{localStorage.setItem(un,JSON.stringify(e))}catch{}}var mn=`cez-followup-prompt:`;function hn(e){try{return localStorage.getItem(mn+e)??``}catch{return``}}function gn(e,t){try{t===``?localStorage.removeItem(mn+e):localStorage.setItem(mn+e,t)}catch{}}function _n({item:e,workflows:t,skills:n,workflow:i,onWorkflowChange:o,selectedSkills:c,onSkillsChange:l,engine:d,onEngineChange:f,queuedRunId:p,onQueued:m}){let h=s(),v=_(),y=e.kind===`pr`?`PR`:`issue`,b=rn(d),S=g(b.runner,b.account),C=c.filter(e=>S.unchecked||e.path===void 0||n.some(t=>t.id===e.id&&(e.path===void 0||t.path===e.path))),T=C.length!==c.length,[D]=(0,J.useState)(()=>Yt(e)),[k,A]=(0,J.useState)(()=>hn(e.url)||D),j=(0,J.useRef)(null),M=(0,J.useRef)(null);(0,J.useEffect)(()=>{gn(e.url,k===D?``:k)},[e.url,k,D]);let N=(0,J.useMemo)(()=>qe(v.data?.promptTemplates),[v.data?.promptTemplates]),ee=e=>{let t=j.current,n=Ge({prompt:k,base:D,selectionStart:t?.selectionStart??null,focused:document.activeElement===t,remembered:M.current}),r=We(k,n,e);A(r.text),M.current=r.caret,requestAnimationFrame(()=>{j.current?.focus(),j.current?.setSelectionRange(r.caret,r.caret)})},te=Oe(N,C.map(e=>e.id)),P=(0,J.useRef)(k);P.current=k;let F=(0,J.useRef)(``);(0,J.useEffect)(()=>{let e=Je(P.current,F.current,te,D);F.current=e.applied,e.text!==P.current&&A(e.text)},[te,D]);let I=x({mutationFn:async()=>!b.canRun||T?null:a(nn(e,i,C,k,on(b))),onSuccess:t=>{if(t===null)return;let n=t;n&&m(e.url,n.id),E(`Added to the queue — ${y} #${e.number}`),C.length>0&&v.data!==void 0&&u({skillUsage:C.reduce((e,t)=>Ee(e,t.id),v.data.skillUsage)}).then(()=>h.invalidateQueries({queryKey:w.uiState})).catch(()=>{}),gn(e.url,``),A(D),F.current=``,h.invalidateQueries({queryKey:w.runs.all})},onError:e=>E(e.message,{tone:`danger`})}),ne=e=>{Be({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(),!I.isPending&&b.canRun&&I.mutate())},L=e=>l(c.some(t=>W(t)===W(e))?c.filter(t=>W(t)!==W(e)):[...c,Te(e)]);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`section`,{"data-slot":`gh-hand`,className:`mt-7 rounded-lg border border-border bg-card p-4`,children:[(0,Y.jsx)(`h3`,{className:`text-xl font-normal text-foreground`,children:`Hand this to the agent`}),(0,Y.jsxs)(`label`,{className:`gh-field gh-prompt-field`,children:[(0,Y.jsx)(`span`,{children:`Instructions for the agent`}),(0,Y.jsx)(Ze,{ref:j,"data-slot":`gh-custom-prompt`,"aria-label":`Custom prompt`,"aria-keyshortcuts":`Control+Enter Meta+Enter`,value:k,onChange:e=>A(e.target.value),onSelect:e=>{M.current=e.currentTarget.selectionStart},onKeyDown:ne,placeholder:`Instructions for the agent… (#${e.number} and its link are always sent)`,className:`mt-3 min-h-20 text-[13px]`})]}),(0,Y.jsx)(ze,{templates:N,onInsert:ee}),(0,Y.jsxs)(`div`,{className:`gh-handoff-settings`,children:[(0,Y.jsxs)(`div`,{className:`gh-field`,children:[(0,Y.jsx)(`span`,{children:`Workflow`}),(0,Y.jsx)(yn,{workflows:t,value:i,onChange:o})]}),(0,Y.jsxs)(`div`,{className:`gh-field`,children:[(0,Y.jsx)(`span`,{children:`Skills · select one or more`}),(0,Y.jsx)(xn,{skills:n,skillUsage:v.data?.skillUsage,selected:c,onToggle:L})]}),c.length>0?(0,Y.jsx)(`div`,{"data-slot":`gh-skill-chips`,className:`mt-2.5 flex flex-wrap gap-1.5`,children:c.map(e=>(0,Y.jsx)(vn,{skill:e,skills:n,unchecked:S.unchecked,onRemove:()=>L(e)},W(e)))}):null,T?(0,Y.jsx)(`p`,{role:`alert`,children:`A selected skill path is unavailable. Remove it or choose a current copy before starting.`}):null,(0,Y.jsx)(cn,{layout:`row`,pick:d,onChange:f,disabled:I.isPending||!b.canRun,accounts:!0}),(0,Y.jsxs)(`div`,{className:`gh-field`,children:[(0,Y.jsx)(`span`,{children:`Account`}),(0,Y.jsx)(bn,{resolved:b,disabled:I.isPending||!b.canRun,onPick:e=>f({...d,account:e})})]}),!b.providerPending&&!b.canRun?(0,Y.jsxs)(`span`,{"data-slot":`gh-provider-gate`,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[b.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,Y.jsx)(V,{to:`/settings/agent-defaults#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]}):null]}),(0,Y.jsxs)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:[e.kind===`pr`?`PR`:`Issue`,` number and link remain attached to the task. Edit the prompt before starting. Cmd/Ctrl+Enter submits; Enter adds a new line.`]})]}),(0,Y.jsxs)(`div`,{"data-slot":`gh-handoff-actions`,className:`mt-[22px] flex flex-wrap items-center gap-2.5`,children:[r(e.url)?(0,Y.jsx)(B,{asChild:!0,variant:`outline`,children:(0,Y.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:`Open in GitHub`})}):null,(0,Y.jsxs)(B,{variant:`primary`,"data-action":`gh-run`,disabled:I.isPending||!b.canRun||T,onClick:()=>I.mutate(),children:[(0,Y.jsx)(se,{"aria-hidden":`true`,className:`size-3.5`}),`Run agent on this `,y]}),(0,Y.jsx)(`kbd`,{"aria-hidden":`true`,className:`rounded-[5px] border border-b-2 border-border bg-card px-[5px] py-px font-mono text-[11px] font-medium text-muted-foreground`,children:Ve()}),p?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`span`,{"data-slot":`gh-queued`,className:`flex items-center gap-1 text-xs font-medium text-success`,children:[(0,Y.jsx)(O,{size:16,"aria-hidden":`true`,className:`size-3.5`}),`queued`]}),(0,Y.jsx)(V,{to:`/tasks/${p}`,"data-slot":`gh-view-run`,className:`text-xs font-semibold text-accent-text hover:underline`,children:`View task →`})]}):null]})]})}function vn({skill:e,skills:t,unchecked:n,onRemove:r}){let i=t.find(t=>t.id===e.id&&(e.path===void 0||t.path===e.path)),a=[i?.name??e.id,e.path].filter(Boolean).join(` · `),o=!n&&e.path!==void 0&&!i?` (unavailable)`:n||!i?` (unchecked)`:``;return(0,Y.jsxs)(`button`,{type:`button`,"data-slot":`gh-skill-chip`,"data-skill":e.id,onClick:r,title:`Remove skill ${a}`,"aria-label":`Remove skill ${a}`,className:`inline-flex min-h-11 items-center gap-2 rounded-lg border border-border bg-card px-3 text-xs font-medium text-foreground transition-colors hover:bg-danger/10 hover:text-danger`,children:[a,o,(0,Y.jsx)(A,{size:16,"aria-hidden":`true`,className:`size-3`})]})}function yn({workflows:e,value:t,onChange:n}){let[r,a]=(0,J.useState)(!1),[o,s]=(0,J.useState)(``),c=(0,J.useRef)(null),l=xe(e,o);return(0,Y.jsxs)(ue,{open:r,onOpenChange:e=>{a(e),e||s(``)},children:[(0,Y.jsx)(ce,{asChild:!0,children:(0,Y.jsxs)(`button`,{type:`button`,"data-slot":`gh-workflow-trigger`,"aria-label":`Choose a workflow`,className:i(Ne,t&&`border-foreground/60 font-mono text-[11px] font-semibold text-foreground`),children:[(0,Y.jsx)(L,{size:16,"aria-hidden":`true`,className:`size-3 shrink-0 text-accent-icon`}),(0,Y.jsx)(`span`,{className:`min-w-0 max-w-44 truncate`,children:t??`workflow`}),(0,Y.jsx)(ee,{size:16,"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,Y.jsx)(le,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,Y.jsxs)(be,{shouldFilter:!1,children:[(0,Y.jsx)(_e,{placeholder:`search workflows…`,value:o,onValueChange:s,onInput:()=>c.current?.scrollTo(0,0)}),(0,Y.jsxs)(ye,{ref:c,"data-slot":`gh-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[l.length===0?(0,Y.jsx)(ve,{children:`Nothing matches.`}):null,(0,Y.jsx)(H,{children:l.map(e=>{let r=t===e.name;return(0,Y.jsxs)(U,{value:`workflow ${e.name}`,keywords:we(e.name,e.description),"data-slot":`gh-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),a(!1)},children:[(0,Y.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,r?(0,Y.jsx)(O,{size:16,"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-link-foreground`}):null]},e.name)})})]})]})})]})}function bn({resolved:e,disabled:t,onPick:n}){let r=e.accounts.filter(t=>t.provider===e.runner),i=[...r.some(e=>e.id==="default")?[]:[{value:l,label:`Default`}],...r.map(e=>({value:e.id,label:e.label,desc:e.configDir}))],a=e.account??e.repoAccount?.[e.runner]??`default`;return(0,Y.jsx)(K,{icon:(0,Y.jsx)(k,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-accent-text`}),slot:`account-pill`,ariaLabel:`Account`,label:i.find(e=>e.value===a)?.label??`Default`,value:a,options:i,disabled:t,onPick:n})}function xn({skills:e,skillUsage:t,selected:n,onToggle:r}){let[a,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(``),[l,u]=(0,J.useState)(null),d=(0,J.useRef)(null),{mostUsed:f,project:p,global:m,ranked:h}=De(e,s,t),g=(e,t)=>{let a=n.some(t=>W(t)===W(e));return(0,Y.jsxs)(U,{value:W(e),keywords:we(e.name,e.description),"data-slot":`gh-skill-option`,"data-skill":e.id,"data-selected":a?`true`:void 0,onSelect:()=>r(Te(e)),children:[(0,Y.jsx)(`span`,{className:i(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.path?(0,Y.jsx)(`span`,{className:`min-w-0 truncate text-xs`,children:e.path}):null,e.description?(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,(0,Y.jsx)(`button`,{type:`button`,"data-slot":`gh-skill-view`,"aria-label":`View skill ${e.name}`,title:`View skill`,onClick:t=>{t.preventDefault(),t.stopPropagation(),u(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,Y.jsx)(ie,{"aria-hidden":`true`,className:`size-3.5`})}),a?(0,Y.jsx)(O,{size:16,"aria-hidden":`true`,className:`size-3.5 shrink-0 text-link-foreground`}):null]},W(e))};return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(je,{skill:l,onClose:()=>u(null)}),(0,Y.jsxs)(ue,{open:a,onOpenChange:e=>{o(e),e||c(``)},children:[(0,Y.jsx)(ce,{asChild:!0,children:(0,Y.jsxs)(`button`,{type:`button`,"data-slot":`gh-skills-trigger`,"aria-label":`Choose skills`,className:i(Ne,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,Y.jsx)(I,{size:16,"aria-hidden":`true`,className:`size-3 shrink-0 text-accent-icon`}),`skills`,n.length>0?` · ${n.length}`:``,(0,Y.jsx)(ee,{size:16,"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,Y.jsx)(le,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,Y.jsxs)(be,{shouldFilter:!1,children:[(0,Y.jsx)(_e,{placeholder:`search skills…`,value:s,onValueChange:c,onInput:()=>d.current?.scrollTo(0,0)}),(0,Y.jsxs)(ye,{ref:d,"data-slot":`gh-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[s.trim()&&!e.some(e=>e.id===s.trim())?(0,Y.jsx)(H,{children:(0,Y.jsxs)(U,{value:`typed-skill`,onSelect:()=>r({id:s.trim()}),children:[`Use skill id “`,s.trim(),`” (unchecked)`]})}):null,(h?h.length===0:f.length===0&&p.length===0&&m.length===0)?(0,Y.jsx)(ve,{children:`Nothing matches.`}):null,h?h.length>0?(0,Y.jsx)(H,{children:h.map(e=>g(e,Se(e)))}):null:(0,Y.jsxs)(Y.Fragment,{children:[f.length>0?(0,Y.jsx)(H,{heading:`Most used`,children:f.map(e=>g(e,Se(e)))}):null,p.length>0?(0,Y.jsx)(H,{heading:`Project skills`,children:p.map(e=>g(e,!0))}):null,m.length>0?(0,Y.jsx)(H,{heading:`Global`,children:m.map(e=>g(e,!1))}):null]})]})]})})]})]})}var Sn=new WeakMap;function Cn(){let e=fn(),t={workflow:e.workflow,selectedSkills:e.skills,engine:{runner:null,model:null,effort:null,account:null},queued:new Map},n=new Set;return{snapshot:()=>t,subscribe:e=>(n.add(e),()=>{n.delete(e)}),update:e=>{t={...t,...e},(e.workflow!==void 0||e.selectedSkills!==void 0)&&pn({workflow:t.workflow,skills:[...t.selectedSkills]}),n.forEach(e=>e())}}}function wn(){let e=s(),{projectId:t}=d(),n=Sn.get(e);n||Sn.set(e,n=new Map);let r=n.get(t);r||n.set(t,r=Cn());let{snapshot:i,subscribe:a,update:o}=r,c=(0,J.useSyncExternalStore)(a,i,i),l=S(),u=rn(c.engine),f=g(u.runner,u.account),p=_(),m=l.data?.workflows;(0,J.useEffect)(()=>{m&&c.workflow!==null&&!m.some(e=>e.name===c.workflow)&&o({workflow:null})},[o,m,c.workflow]);let h=(0,J.useMemo)(()=>Ce(f.data??[],p.data?.skillUsage),[f.data,p.data?.skillUsage]);return{...c,workflows:l,skillList:h,skillsUnchecked:f.unchecked,setWorkflow:e=>o({workflow:e}),setSelectedSkills:e=>o({selectedSkills:e}),setEngine:e=>o({engine:e}),onQueued:(e,t)=>o({queued:new Map(i().queued).set(e,t)})}}export{Kt as a,jt as c,Q as d,vt as f,Jt as i,gt as l,_n as n,Dt as o,Xt as r,yt as s,wn as t,_t as u};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{n as r,t as i}from"./utils-DSMR_WLb.js";import{C as a,Nt as o,ci as s,et as c,kr as l,qt as u,r as d,tt as f}from"./project-scope-context-DqBHMdSb.js";import{A as p,E as m,J as h,Pt as g,Tt as _,Ut as v,Z as y,en as b,in as x,kt as S,p as C,t as w}from"./queries-DeeY9cGJ.js";import{t as T}from"./useQuery-IS5tPlew.js";import{n as E}from"./toaster-Bo5vCbz-.js";import{Y as D,c as O,ct as k,ft as A,g as j,it as M,k as N,l as ee,m as te,ot as P,r as F,tt as I,u as ne,ut as L,y as re}from"./design-icons-CzEoMH9c.js";import{t as R}from"./external-link-BE6y205O.js";import{t as ie}from"./eye-B8okNWXU.js";import{a as ae,i as z}from"./format-BNCkW110.js";import{t as oe}from"./message-square-B-MD-8rD.js";import{t as se}from"./play-CmVAj_fu.js";import{t as B}from"./button-BQ2y4XRB.js";import{i as ce,r as le,t as ue}from"./popover-BPgUYFyu.js";import{a as de,i as fe,o as pe,r as me,s as he,t as ge}from"./dialog-BVF6dIeS.js";import{t as V}from"./project-router-CYJwJlJL.js";import{a as _e,i as H,o as U,r as ve,s as ye,t as be}from"./command-CDt1BsZy.js";import{d as xe,f as W,i as Se,o as Ce,p as we,s as Te,t as Ee,u as De}from"./skills-pM_PouEs.js";import{$ as Oe,Bn as G,F as ke,G as Ae,H as je,I as Me,J as Ne,K as Pe,L as Fe,M as Ie,N as Le,P as Re,U as ze,W as K,X as Be,Z as Ve,_n as He,er as Ue,et as We,it as Ge,j as Ke,nt as qe,rt as Je,xt as q,yn as Ye}from"./index-DfmmHZB9.js";import{t as Xe}from"./markdown-CH0W4B61.js";import{t as Ze}from"./textarea-vJt9undk.js";import{t as Qe}from"./diff-B-6M-t3K.js";import{t as $e}from"./tab-link-Bc33InzJ.js";var J=e(t(),1),Y=n(),et={squash:`Squash and merge`,merge:`Create a merge commit`,rebase:`Rebase and merge`};function X({state:e}){let t=`size-4 shrink-0`;return e===`passing`?(0,Y.jsx)(O,{size:16,"aria-hidden":`true`,"data-slot":`gh-merge-status-passing`,className:i(t,`text-success`)}):e===`failing`?(0,Y.jsx)(j,{size:16,"aria-hidden":`true`,"data-slot":`gh-merge-status-failing`,className:i(t,`text-danger`)}):e===`pending`?(0,Y.jsx)(ae,{"aria-hidden":`true`,"data-slot":`gh-merge-status-pending`,className:i(t,`animate-spin text-warning`)}):(0,Y.jsx)(te,{size:16,"aria-hidden":`true`,"data-slot":`gh-merge-status-unknown`,className:i(t,`text-soft-foreground`)})}function tt(e){return e?.available?e.mergeState:null}function nt(e,t){return e&&t?.methods.includes(e)?e:t?.defaultMethod??t?.methods[0]??null}function rt(e){return e.state===`merged`?`Merged`:e.state===`closed`?`Closed`:e.isDraft?`Draft`:e.mergeable===`conflicting`?`Conflicts must be resolved`:e.canMerge?`Ready to merge`:e.eligibility===`unknown`?`Merge blocked · Requirements unknown`:`Merge blocked`}function it(e){return e===`approved`||e===`not-required`?`passing`:e===`unknown`?`unknown`:`failing`}function at(e){return e===`mergeable`?`passing`:e===`conflicting`?`failing`:`unknown`}function ot(e){return e===`conflicting`?`present`:e===`mergeable`?`none`:`unknown`}function st(e){return e===!0?` · required`:e===null?` · requiredness unknown`:``}function ct(e){return e?.available===!1?e.reason:`GitHub could not load merge requirements.`}function lt(e,t,n){return!!(e&&(t.canMerge||t.canOverride&&n))}function Z(e){return e?et[e]:`Merge`}function ut(e){return e===`conflicting`?`true`:void 0}function dt({check:e}){return(0,Y.jsxs)(`li`,{className:`flex items-center justify-between gap-3`,children:[(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Y.jsx)(X,{state:e.state}),(0,Y.jsxs)(`span`,{children:[e.name,` · `,e.state,st(e.required)]})]}),e.url&&r(e.url)?(0,Y.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`text-muted-foreground underline`,children:`details`}):null]})}function ft({reason:e}){return(0,Y.jsxs)(`section`,{"data-slot":`gh-merge-unavailable`,className:`mt-6 rounded-lg border border-border bg-card p-4 text-sm`,children:[(0,Y.jsx)(`p`,{className:`font-medium`,children:`Merge status unavailable`}),(0,Y.jsx)(`p`,{className:`mt-1 text-xs text-soft-foreground`,children:e})]})}function pt({state:e,selectedMethod:t,overrideRules:n,mergeEnabled:r,refreshPending:a,onRefresh:o,onRunAgent:s,onConfirm:c,onMethodChange:l,onOverrideChange:u}){let d=rt(e),f=it(e.reviewDecision),p=at(e.mergeable);return(0,Y.jsxs)(`div`,{className:`flex items-start gap-3`,children:[e.canMerge?(0,Y.jsx)(O,{size:16,"aria-hidden":`true`,className:`mt-0.5 size-5 shrink-0 text-success`}):(0,Y.jsx)(P,{size:16,"aria-hidden":`true`,className:`mt-0.5 size-5 shrink-0 text-warning`}),(0,Y.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,Y.jsx)(`h3`,{className:`font-semibold`,children:d}),(0,Y.jsxs)(B,{type:`button`,variant:`ghost`,size:`sm`,disabled:a,onClick:o,children:[(0,Y.jsx)(D,{size:16,"aria-hidden":`true`,className:i(`size-3.5`,a&&`animate-spin`)}),`Refresh`]})]}),(0,Y.jsxs)(`p`,{className:`mt-1 font-mono text-[11px] text-soft-foreground`,children:[e.headRef,` (`,e.headSha.slice(0,7),`) → `,e.baseRef]}),(0,Y.jsxs)(`ul`,{className:`mt-3 space-y-2 text-xs`,children:[(0,Y.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(X,{state:f}),(0,Y.jsxs)(`span`,{children:[`Reviews: `,e.reviewDecision.replaceAll(`-`,` `)]})]}),(0,Y.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,Y.jsx)(X,{state:p}),(0,Y.jsxs)(`span`,{children:[`Conflicts: `,ot(e.mergeable)]})]}),e.checks.length===0?(0,Y.jsx)(`li`,{children:`No checks configured`}):e.checks.map(e=>(0,Y.jsx)(dt,{check:e},e.name)),e.blockers.map(e=>(0,Y.jsx)(`li`,{className:`text-soft-foreground`,children:e.message},e.code))]}),e.mergeable===`conflicting`&&s?(0,Y.jsx)(B,{className:`mt-4`,onClick:s,children:`Run agent on this PR`}):null,e.canOverride?(0,Y.jsxs)(`label`,{className:`mt-4 flex cursor-pointer items-start gap-2 rounded-md border border-warning/40 bg-warning/5 p-3 text-xs`,children:[(0,Y.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>u(e.target.checked),className:`mt-0.5 size-4 accent-accent-strong`}),(0,Y.jsxs)(`span`,{children:[(0,Y.jsx)(`span`,{className:`block font-medium`,children:`Merge without waiting for requirements`}),(0,Y.jsx)(`span`,{className:`mt-0.5 block text-soft-foreground`,children:`GitHub will allow this only if your permissions can bypass the repository rules.`})]})]}):null,e.eligibility===`unknown`?(0,Y.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`GitHub could not confirm review and branch-protection requirements. Passing checks do not establish merge readiness.`}):null,e.state===`open`&&e.methods.length>0?(0,Y.jsxs)(`div`,{className:`mt-4 flex flex-col flex-wrap gap-2 sm:flex-row`,children:[(0,Y.jsx)(`select`,{"aria-label":`Merge method`,value:t??``,onChange:e=>l(e.target.value),className:`h-9 min-w-0 flex-1 rounded-md border border-input bg-background px-3 text-sm`,children:e.methods.map(e=>(0,Y.jsx)(`option`,{value:e,children:et[e]},e))}),(0,Y.jsx)(B,{disabled:!r,onClick:c,children:Z(t)})]}):null]})]})}function mt({number:e,state:t,selectedMethod:n,confirming:r,overrideRules:i,mergePending:a,mergeError:o,onOpenChange:s,onMerge:c}){return(0,Y.jsx)(ge,{open:r,onOpenChange:s,children:(0,Y.jsxs)(me,{"data-slot":`gh-merge-confirm`,showCloseButton:!1,children:[(0,Y.jsxs)(pe,{children:[(0,Y.jsxs)(he,{children:[Z(n),` pull request #`,e,`?`]}),(0,Y.jsx)(fe,{asChild:!0,children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsxs)(`p`,{children:[`This will merge “`,t.title,`” into `,t.baseRef,`. GitHub will re-check the exact reviewed head before changing the repository.`]}),i&&t.canOverride?(0,Y.jsx)(`p`,{"data-slot":`gh-bypass-warning`,className:`mt-4 text-sm text-warning`,children:`You are asking GitHub to bypass unmet repository requirements; GitHub may refuse if your permissions do not allow it.`}):null]})})]}),o?(0,Y.jsx)(`p`,{className:`text-sm text-danger`,children:o.message}):null,(0,Y.jsxs)(de,{children:[(0,Y.jsx)(B,{variant:`outline`,disabled:a,onClick:()=>s(!1),children:`Cancel`}),(0,Y.jsx)(B,{disabled:a,onClick:c,children:a?`Merging…`:Z(n)})]})]})})}function ht({number:e,onRunAgent:t}){let n=s(),r=y(),i=T({queryKey:w.githubMergeState(e),queryFn:({signal:t})=>f(e,{},{signal:t}),retry:!1}),a=tt(i.data),[c,l]=(0,J.useState)(null),[u,d]=(0,J.useState)(!1),[p,m]=(0,J.useState)(!1),h=x({mutationFn:t=>f(e,{refresh:!0}),onSuccess:(e,t)=>n.setQueryData(t,e),onError:e=>E(e instanceof Error?e.message:String(e),{tone:`danger`})}),g=nt(c,a),_=()=>({mergeState:w.githubMergeState(e),list:w.githubPages(50),comments:w.githubComments(`pr`,e),item:w.githubItem(`pr`,e),refStatus:r===void 0?void 0:w.githubRefStatusOf(r)}),v=x({mutationFn:t=>{if(!a||!g)throw Error(`No merge method is available.`);return o(e,{method:g,expectedHeadSha:a.headSha,...p&&a.canOverride?{overrideRules:!0}:{}})},onSuccess:(t,r)=>{d(!1),E(`Pull request #${e} merged`),n.invalidateQueries({queryKey:r.mergeState}),n.invalidateQueries({queryKey:r.list}),n.invalidateQueries({queryKey:r.comments}),n.invalidateQueries({queryKey:r.item}),r.refStatus&&n.invalidateQueries({queryKey:r.refStatus})},onError:(e,t)=>{E(e instanceof Error?e.message:String(e),{tone:`danger`}),n.invalidateQueries({queryKey:t.mergeState})}});return i.isPending?(0,Y.jsx)(G,{"data-slot":`gh-merge-loading`,className:`mt-6 h-32 w-full`}):a?(0,Y.jsxs)(`section`,{"data-slot":`gh-merge-box`,"data-eligibility":a.eligibility,"data-conflicting":ut(a.mergeable),"aria-live":`polite`,className:`mt-6 rounded-lg border border-border bg-card p-4`,children:[(0,Y.jsx)(pt,{state:a,selectedMethod:g,overrideRules:p,mergeEnabled:lt(g,a,p),refreshPending:h.isPending,onRefresh:()=>h.mutate(w.githubMergeState(e)),onRunAgent:t,onConfirm:()=>d(!0),onMethodChange:l,onOverrideChange:m}),(0,Y.jsx)(mt,{number:e,state:a,selectedMethod:g,confirming:u,overrideRules:p,mergePending:v.isPending,mergeError:v.error,onOpenChange:d,onMerge:()=>v.mutate(_())})]}):(0,Y.jsx)(ft,{reason:ct(i.data)})}function gt(e){let t=new Set;for(let n of e)for(let e of n.labels)t.add(e);return[...t].sort((e,t)=>e.toLowerCase().localeCompare(t.toLowerCase()))}function _t(e,t={}){let n=(t.query??``).trim().toLowerCase(),r=t.labels??[],i=n.replace(/^#/,``),a=i!==``&&/^\d+$/.test(i);return e.filter(e=>r.length>0&&!r.every(t=>e.labels.includes(t))||t.assignees?.length&&!e.assignees?.some(e=>t.assignees.some(t=>t.toLowerCase()===e.toLowerCase()))||t.author!==void 0&&e.author.toLowerCase()!==t.author.toLowerCase()||t.includeNumbers&&!t.includeNumbers.has(e.number)||t.excludeNumbers?.has(e.number)||t.projectId&&e.projectIds!==void 0&&!e.projectIds.includes(t.projectId)?!1:n===``?!0:a?String(e.number).includes(i):`#${e.number} ${e.title} ${e.author} ${e.body??``}`.toLowerCase().includes(n))}function vt(e,t){let n=e.trim();if(n===``)return!1;let r=n.replace(/^#/,``);return/^\d+$/.test(r)?!t.some(e=>e.number===Number(r)):t.length===0}function Q(e){if(!e||!/^[0-9a-fA-F]{6}$/.test(e))return{borderColor:`var(--border)`,color:`var(--muted-foreground)`};let t=`#${e}`;return{backgroundColor:`${t}22`,borderColor:`${t}66`,color:`color-mix(in srgb, ${t} 50%, var(--foreground))`}}function yt({label:e,color:t,plain:n=!1}){return(0,Y.jsx)(`span`,{"data-slot":`gh-label`,"data-label":e,style:n?void 0:Q(t),className:n?`text-[11px] font-normal text-muted-foreground`:`rounded-full border px-1.5 py-px text-[12px] font-medium`,children:e})}function bt(e){return e===`pr`?`pull request`:`issue`}function xt(e,t,n){return e===`pr`&&!!(t||n)}function St({backLink:e}){return e?(0,Y.jsxs)(V,{to:e.to,"data-slot":`gh-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,Y.jsx)(F,{size:16,"aria-hidden":`true`,className:`size-3.5`}),`Back to the list`]}):null}function Ct({item:e,kindWord:t,commentCount:n,hasDiffStat:i,additions:a,deletions:o}){return(0,Y.jsxs)(`p`,{"data-slot":`gh-meta`,className:`flex flex-wrap items-center gap-x-1.5 font-mono text-[11px] text-soft-foreground`,children:[(0,Y.jsxs)(`span`,{children:[`#`,e.number]}),`·`,(0,Y.jsx)(`span`,{children:t}),`·`,(0,Y.jsxs)(`span`,{children:[`opened by `,e.author]}),`·`,(0,Y.jsxs)(`span`,{children:[z(e.createdAt),` ago`]}),n?(0,Y.jsxs)(Y.Fragment,{children:[`·`,(0,Y.jsx)(Kt,{count:n})]}):null,i?(0,Y.jsxs)(Y.Fragment,{children:[`·`,(0,Y.jsxs)(`span`,{"data-slot":`gh-diffstat`,children:[(0,Y.jsxs)(`span`,{className:`text-success`,children:[`+`,a??0]}),` `,(0,Y.jsxs)(`span`,{className:`text-danger`,children:[`−`,o??0]})]})]}):null,`·`,r(e.url)?(0,Y.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-open-link`,className:`inline-flex items-center gap-0.5 text-muted-foreground hover:text-foreground hover:underline`,children:[`open on GitHub`,(0,Y.jsx)(R,{"aria-hidden":`true`,className:`size-2.5`})]}):(0,Y.jsx)(`span`,{"data-slot":`gh-open-link`,className:`text-muted-foreground`,children:`open on GitHub`})]})}function wt({item:e,subNav:t,changes:n}){return e.kind===`pr`?t?(0,Y.jsxs)(`nav`,{"aria-label":`Pull request detail`,className:`mt-4 flex border-b border-border`,children:[(0,Y.jsx)($e,{to:q(`prs`,t.filter,e.number),active:!n,children:`Conversation`}),(0,Y.jsx)($e,{to:q(`prs`,t.filter,e.number,`/changes`),active:n,children:`Changes`})]}):(0,Y.jsx)(V,{to:q(`prs`,null,e.number,`/changes`),"data-slot":`gh-files-changed`,className:`mt-3 inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground hover:underline`,children:`Files changed`}):null}function Tt({item:e,colors:t,checks:n}){return e.labels.length>0||n?(0,Y.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-1.5`,children:[e.labels.map(e=>(0,Y.jsx)(yt,{label:e,color:t[e]},e)),n?(0,Y.jsx)(qt,{checks:n,url:e.url}):null]}):null}function Et({item:e,colors:t,body:n}){return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`div`,{"data-slot":`gh-body`,className:`mt-5 text-sm`,children:n?(0,Y.jsx)(Xe,{children:n}):(0,Y.jsx)(`p`,{className:`text-soft-foreground`,children:`(no description)`})}),(0,Y.jsx)(kt,{item:e,colors:t})]})}function Dt({item:e,colors:t,checks:n,comments:r,backLink:i,subNav:a,onRunAgent:o,afterHeading:s,children:c}){let l=a?.changes??!1,u=bt(e.kind),d=m(e.kind,e.number,!l).data?.detail,f=d?.body??e.body,p=d?.additions??e.additions,h=d?.deletions??e.deletions,g=xt(e.kind,p,h),_=r??e.comments;return(0,Y.jsxs)(`article`,{"data-slot":`gh-detail-inner`,className:`min-w-0 px-4 py-4 md:px-7 md:py-5`,children:[(0,Y.jsx)(St,{backLink:i}),(0,Y.jsxs)(`div`,{"data-slot":`gh-description-card`,className:e.kind===`pr`?`rounded-xl border border-border bg-card p-6`:void 0,children:[e.kind===`pr`?(0,Y.jsxs)(`h2`,{className:`mb-4 text-[22px] leading-snug font-normal`,children:[`#`,e.number,` `,e.title]}):null,(0,Y.jsx)(Ct,{item:e,kindWord:u,commentCount:_,hasDiffStat:g,additions:p,deletions:h}),e.kind===`pr`?null:(0,Y.jsx)(`h2`,{className:`mt-2 text-[22px] leading-snug font-normal`,children:e.title}),s,(0,Y.jsx)(wt,{item:e,subNav:a,changes:l}),(0,Y.jsx)(Tt,{item:e,colors:t,checks:n}),l&&e.kind===`pr`?(0,Y.jsx)(Ot,{item:e}):(0,Y.jsx)(Et,{item:e,colors:t,body:f})]}),e.kind===`pr`?(0,Y.jsx)(ht,{number:e.number,onRunAgent:o}):null,c]})}function Ot({item:e}){let t=s(),n=p(e.number),[a,o]=(0,J.useState)(``),[l,u]=(0,J.useState)(null),d=n.data,f=d?.available?d.files.filter(e=>e.path.toLowerCase().includes(a.toLowerCase())):[],m=f.findIndex(e=>e.path===l);(0,J.useEffect)(()=>{f.length>0&&!f.some(e=>e.path===l)&&u(f[0].path)},[d?.available?d.headSha:``,a]);let h=async()=>{let n=d?.available?d.headSha:null,r=w.githubPrChanges(e.number),i=await c(e.number,{refresh:!0});t.setQueryData(r,i),i.available&&n&&n!==i.headSha&&(u(i.files[0]?.path??null),E(`The reviewed revision changed.`))};if(n.isPending)return(0,Y.jsx)(`p`,{"aria-live":`polite`,className:`mt-6 text-sm text-muted-foreground`,children:`Loading changed files…`});if(n.isError||!d)return(0,Y.jsx)(`p`,{className:`mt-6 text-sm text-danger`,children:`Changed files could not be loaded.`});if(!d.available)return(0,Y.jsx)(`p`,{className:`mt-6 text-sm text-muted-foreground`,children:d.reason});let g=f.map(e=>({path:e.path,...e.previousPath?{oldPath:e.previousPath}:{},status:e.status===`removed`?`deleted`:e.status===`changed`?`modified`:e.status,adds:e.additions,dels:e.deletions,binary:e.patchUnavailableReason===`binary`,patch:e.patch??``})),_=r(e.url)?`${e.url}/files`:null,v=f.find(e=>e.path===l);return(0,Y.jsxs)(`section`,{"data-slot":`gh-pr-changes`,className:`mt-5 min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,Y.jsxs)(`strong`,{children:[d.files.length,` changed files`]}),(0,Y.jsxs)(`span`,{className:`text-success`,children:[`+`,d.additions]}),(0,Y.jsxs)(`span`,{className:`text-danger`,children:[`−`,d.deletions]}),(0,Y.jsxs)(`span`,{className:`font-mono text-muted-foreground`,title:d.headSha,children:[`head `,d.headSha.slice(0,8)]}),(0,Y.jsx)(B,{type:`button`,variant:`outline`,size:`sm`,className:`ml-auto min-h-11`,onClick:()=>void h(),children:`Refresh`})]}),d.truncated?(0,Y.jsxs)(`p`,{role:`status`,className:`mt-3 rounded-md border border-warning/40 bg-warning/10 p-3 text-xs`,children:[d.reason??`This response is incomplete.`,` `,_?(0,Y.jsx)(`a`,{href:_,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:`Open all files on GitHub`}):null]}):null,(0,Y.jsxs)(`div`,{className:`mt-4 grid min-w-0 gap-4 lg:grid-cols-[240px_minmax(0,1fr)]`,children:[(0,Y.jsxs)(`aside`,{className:`min-w-0`,children:[(0,Y.jsx)(`input`,{"aria-label":`Filter changed files`,value:a,onChange:e=>o(e.target.value),placeholder:`Filter files…`,className:`min-h-11 w-full rounded-md border border-input bg-background px-3 text-sm`}),(0,Y.jsx)(`select`,{"aria-label":`Select changed file`,value:l??``,onChange:e=>u(e.target.value),className:`mt-2 min-h-11 w-full rounded-md border border-input bg-background px-2 text-sm lg:hidden`,children:f.map(e=>(0,Y.jsx)(`option`,{children:e.path},e.path))}),(0,Y.jsx)(`ul`,{className:`mt-2 hidden max-h-[60vh] overflow-auto lg:block`,children:f.map(e=>(0,Y.jsx)(`li`,{children:(0,Y.jsxs)(`button`,{type:`button`,onClick:()=>u(e.path),className:i(`min-h-11 w-full truncate rounded px-2 text-left text-xs`,l===e.path&&`bg-muted font-medium`),title:e.path,children:[e.status,` · `,e.path,` `,(0,Y.jsxs)(`span`,{className:`text-success`,children:[`+`,e.additions]}),` `,(0,Y.jsxs)(`span`,{className:`text-danger`,children:[`−`,e.deletions]})]})},e.path))})]}),(0,Y.jsxs)(`div`,{className:`min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`mb-2 flex justify-end gap-1`,children:[(0,Y.jsx)(B,{"aria-label":`Previous file`,variant:`outline`,size:`icon`,className:`min-h-11 min-w-11`,disabled:m<=0,onClick:()=>u(f[m-1]?.path??null),children:(0,Y.jsx)(Ue,{})}),(0,Y.jsx)(B,{"aria-label":`Next file`,variant:`outline`,size:`icon`,className:`min-h-11 min-w-11`,disabled:m<0||m>=f.length-1,onClick:()=>u(f[m+1]?.path??null),children:(0,Y.jsx)(ne,{size:16})})]}),f.length===0?(0,Y.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No changed files match this filter.`}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Qe,{files:g.filter(e=>e.path===l),wrap:!0,className:`min-w-0`}),v&&!v.patch?(0,Y.jsxs)(`p`,{className:`rounded-b border border-border p-3 text-xs text-muted-foreground`,children:[`Patch unavailable: `,v.patchUnavailableReason??`not-provided`,`.`]}):null]})]})]})]})}function kt({item:e,colors:t}){let n=m(e.kind,e.number),r=n.data,i=(0,J.useMemo)(()=>{let e=[...(r?.comments??[]).map(e=>({row:`comment`,comment:e})),...(r?.events??[]).map(e=>({row:`event`,event:e}))],t=e=>{let t=Date.parse(At(e));return Number.isNaN(t)?-1/0:t};return e.sort((e,n)=>t(e)-t(n))},[r?.comments,r?.events]);return n.isPending?(0,Y.jsxs)(`section`,{"data-slot":`gh-thread-loading`,className:`mt-6 border-t border-border pt-5`,children:[(0,Y.jsx)(G,{className:`mb-3 h-3 w-24`}),(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Y.jsx)(G,{className:`h-14 w-full`}),(0,Y.jsx)(G,{className:`h-14 w-full`})]})]}):!r||!r.available?(0,Y.jsxs)(`section`,{"data-slot":`gh-thread-error`,className:`mt-6 border-t border-border pt-5 text-xs text-soft-foreground`,children:[(0,Y.jsxs)(`span`,{children:[`Couldn’t load comments — `,r?.reason??(n.error instanceof Error?n.error.message:`could not load comments`),`. `]}),(0,Y.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-0.5 text-muted-foreground hover:text-foreground hover:underline`,children:[`open on GitHub`,(0,Y.jsx)(R,{"aria-hidden":`true`,className:`size-2.5`})]})]}):i.length===0?null:(0,Y.jsxs)(`section`,{"data-slot":`gh-thread`,className:`mt-6 border-t border-border pt-5`,children:[(0,Y.jsxs)(`h3`,{"data-slot":`gh-thread-header`,className:`mb-4 text-[11px] font-semibold tracking-wide text-soft-foreground uppercase`,children:[`Activity · `,r.comments.length,` comment`,r.comments.length===1?``:`s`]}),(0,Y.jsx)(`ul`,{className:`flex flex-col gap-5`,children:jt(i).map(e=>e.group===`commits`?(0,Y.jsx)(Mt,{commits:e.commits,colors:t},e.commits[0].id):e.entry.row===`comment`?(0,Y.jsx)(Ht,{comment:e.entry.comment},`${e.entry.comment.kind}-${e.entry.comment.id}`):(0,Y.jsx)(Nt,{event:e.entry.event,colors:t},e.entry.event.id))}),r.truncated?(0,Y.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-thread-truncated`,className:`mt-4 inline-flex items-center gap-0.5 text-xs text-soft-foreground hover:text-foreground hover:underline`,children:[`thread truncated — open on GitHub`,(0,Y.jsx)(R,{"aria-hidden":`true`,className:`size-2.5`})]}):null]})}var At=e=>e.row===`comment`?e.comment.createdAt:e.event.createdAt;function jt(e){let t=[],n=[],r=()=>{n.length!==0&&(n.length===1?t.push({group:`single`,entry:{row:`event`,event:n[0]}}):t.push({group:`commits`,commits:n}),n=[])};for(let i of e){if(i.row===`event`&&i.event.kind===`committed`&&i.row===`event`){let e=n[n.length-1];e&&e.actor!==i.event.actor&&r(),n.push(i.event);continue}r(),t.push({group:`single`,entry:i})}return r(),t}function Mt({commits:e,colors:t}){let[n,r]=(0,J.useState)(!1),i=e[0]?.actor??`?`;return n?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`li`,{"data-slot":`gh-commit-group`,"data-open":`true`,className:`min-w-0`,children:(0,Y.jsxs)(`button`,{type:`button`,"aria-expanded":!0,onClick:()=>r(!1),className:`flex items-center gap-1.5 font-mono text-[11px] text-soft-foreground hover:text-foreground`,children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,children:$.committed}),(0,Y.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:i}),(0,Y.jsxs)(`span`,{children:[`added `,e.length,` commits`]})]})}),e.map(e=>(0,Y.jsx)(Nt,{event:e,colors:t},e.id))]}):(0,Y.jsx)(`li`,{"data-slot":`gh-commit-group`,"data-open":`false`,className:`min-w-0`,children:(0,Y.jsxs)(`button`,{type:`button`,"aria-expanded":!1,onClick:()=>r(!0),className:`flex items-center gap-1.5 font-mono text-[11px] text-soft-foreground hover:text-foreground`,children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,children:$.committed}),(0,Y.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:i}),(0,Y.jsxs)(`span`,{children:[`added `,e.length,` commits`]}),(0,Y.jsx)(`span`,{className:`shrink-0`,children:z(e[e.length-1].createdAt)})]})})}var $={committed:`⚙`,labeled:`◆`,unlabeled:`◇`,assigned:`◍`,unassigned:`◌`,merged:`⑃`,closed:`⊘`,reopened:`⊙`,head_ref_force_pushed:`↻`,"cross-referenced":`↗`,renamed:`✎`};function Nt({event:e,colors:t}){return(0,Y.jsxs)(`li`,{"data-slot":`gh-event-row`,"data-kind":e.kind,className:i(`flex min-w-0 items-center gap-1.5 font-mono text-[11px] text-soft-foreground`,e.kind===`merged`&&`text-accent-foreground`),children:[(0,Y.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0`,children:$[e.kind]}),(0,Y.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:e.actor}),(0,Y.jsx)(zt,{event:e,colors:t}),(0,Y.jsx)(`span`,{className:`shrink-0`,children:z(e.createdAt)}),e.url?(0,Y.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`open ${e.kind} on GitHub`,className:`ml-auto shrink-0 text-muted-foreground hover:text-foreground`,children:(0,Y.jsx)(R,{"aria-hidden":`true`,className:`size-2.5`})}):null]})}function Pt({event:e}){return(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Y.jsx)(`span`,{className:`shrink-0`,children:`committed`}),e.sha?(0,Y.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}):null,e.message?(0,Y.jsx)(`span`,{className:`truncate font-sans text-foreground`,children:e.message}):null,(0,Y.jsx)(Bt,{checks:e.checks})]})}function Ft({event:e,colors:t}){return(0,Y.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,Y.jsx)(`span`,{className:`shrink-0`,children:e.kind===`labeled`?`added the`:`removed the`}),e.label?(0,Y.jsx)(`span`,{"data-slot":`gh-event-label`,style:Q(e.label.color??t[e.label.name]),className:`max-w-[12rem] truncate rounded-full border px-1.5 py-px font-sans text-[12px]`,children:e.label.name}):null,(0,Y.jsx)(`span`,{className:`shrink-0`,children:`label`})]})}function It({event:e}){return(0,Y.jsxs)(`span`,{className:`truncate`,children:[e.kind===`assigned`?`assigned`:`unassigned`,` `,e.subject??`someone`]})}function Lt({event:e}){return(0,Y.jsxs)(`span`,{className:`truncate`,children:[`referenced this in `,e.refNumber?`#${e.refNumber}`:`another thread`,e.refTitle?` ${e.refTitle}`:``]})}var Rt={committed:e=>(0,Y.jsx)(Pt,{event:e}),labeled:(e,t)=>(0,Y.jsx)(Ft,{event:e,colors:t}),unlabeled:(e,t)=>(0,Y.jsx)(Ft,{event:e,colors:t}),assigned:e=>(0,Y.jsx)(It,{event:e}),unassigned:e=>(0,Y.jsx)(It,{event:e}),merged:()=>(0,Y.jsx)(`span`,{children:`merged this`}),closed:()=>(0,Y.jsx)(`span`,{children:`closed this`}),reopened:()=>(0,Y.jsx)(`span`,{children:`reopened this`}),head_ref_force_pushed:()=>(0,Y.jsx)(`span`,{children:`force-pushed`}),renamed:e=>(0,Y.jsxs)(`span`,{className:`truncate`,children:[`renamed this to `,e.subject??`—`]}),"cross-referenced":e=>(0,Y.jsx)(Lt,{event:e})};function zt({event:e,colors:t}){return Rt[e.kind]?.(e,t)??null}function Bt({checks:e}){return e?(0,Y.jsx)(`span`,{"data-slot":`gh-commit-checks`,"data-checks":e,"aria-label":`checks ${e}`,className:i(`shrink-0`,Gt[e]),children:Wt[e]}):null}var Vt={approved:{label:`approved`,tone:`border-success/40 text-success`},changes_requested:{label:`changes requested`,tone:`border-danger/40 text-danger`},commented:{label:`commented`,tone:`border-border text-muted-foreground`},dismissed:{label:`dismissed`,tone:`border-border text-muted-foreground`}};function Ht({comment:e}){let t=e.reviewState?Vt[e.reviewState]:null;return(0,Y.jsxs)(`li`,{"data-slot":`gh-thread-entry`,"data-kind":e.kind,className:`min-w-0`,children:[(0,Y.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5 font-mono text-[11px] text-soft-foreground`,children:[(0,Y.jsx)(Ut,{url:e.avatarUrl,login:e.author}),(0,Y.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:e.author}),(0,Y.jsx)(`span`,{children:z(e.createdAt)}),t?(0,Y.jsx)(`span`,{"data-slot":`gh-review-chip`,"data-review-state":e.reviewState,className:i(`rounded-full border px-1.5 py-px font-sans text-[12px] font-medium`,t.tone),children:t.label}):null,(0,Y.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`open comment on GitHub`,className:`ml-auto shrink-0 text-muted-foreground hover:text-foreground`,children:(0,Y.jsx)(R,{"aria-hidden":`true`,className:`size-2.5`})})]}),(0,Y.jsx)(`div`,{"data-slot":`gh-thread-body`,className:`text-sm`,children:e.body?(0,Y.jsx)(Xe,{children:e.body}):(0,Y.jsx)(`p`,{className:`text-soft-foreground`,children:`(no body)`})})]})}function Ut({url:e,login:t}){let[n,r]=(0,J.useState)(!1);return e&&!n?(0,Y.jsx)(`img`,{src:e,alt:``,width:16,height:16,loading:`lazy`,onError:()=>r(!0),"data-slot":`gh-avatar`,className:`size-4 shrink-0 rounded-full`}):(0,Y.jsx)(`span`,{"data-slot":`gh-avatar-fallback`,"aria-hidden":`true`,className:`flex size-4 shrink-0 items-center justify-center rounded-full bg-muted text-[8px] font-semibold text-muted-foreground uppercase`,children:t.slice(0,1)||`?`})}var Wt={passing:`✓`,failing:`✗`,pending:`○`},Gt={passing:`text-success`,failing:`text-danger`,pending:`text-muted-foreground`};function Kt({count:e}){return e?(0,Y.jsxs)(`span`,{"data-slot":`gh-comment-count`,"data-count":e,"aria-label":`${e} comment${e===1?``:`s`}`,className:`inline-flex shrink-0 items-center gap-0.5`,children:[(0,Y.jsx)(oe,{"aria-hidden":`true`,className:`size-3`}),e]}):null}function qt({checks:e,url:t}){let n=i(`text-[11px] font-medium`,Gt[e],t&&`hover:underline`),r=`${Wt[e]} checks ${e}`;return t?(0,Y.jsx)(`a`,{href:`${t}/checks`,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-checks`,"data-checks":e,className:n,children:r}):(0,Y.jsx)(`span`,{"data-slot":`gh-checks`,"data-checks":e,className:n,children:r})}function Jt({checks:e}){return(0,Y.jsx)(`span`,{"data-slot":`gh-row-checks`,"data-checks":e,title:`checks ${e}`,"aria-label":`checks ${e}`,className:i(`shrink-0 font-sans text-[11px] font-semibold`,Gt[e]),children:Wt[e]})}function Yt(e){return`${e.kind===`pr`?`Address GitHub pull request`:`Fix GitHub issue`} #${e.number}: ${e.title}\n\n${e.url}`}function Xt(e,t=[]){let n=Yt(e);return e.body?.trim()&&(n+=`\n\n---\n\n${e.body.trim()}`),t.length&&(n+=Zt(t)),n}function Zt(e){return`\n\nUse these skills where relevant: ${e.join(`, `)}.`}function Qt(e,t){return e.replace(/\{\{\s*number\s*\}\}/gi,()=>`#${t.number}`).replace(/\{\{\s*title\s*\}\}/gi,()=>t.title).replace(/\{\{\s*url\s*\}\}/gi,()=>t.url)}function $t(e,t){if(e.includes(t.url))return!0;let n=t.kind===`pr`?String.raw`(?:pull\s+request|pr)`:String.raw`issue`;return new RegExp(String.raw`\b${n}\s*#?\s*${t.number}\b`,`i`).test(e)}function en(e,t,n){let r=(n??``).trim();if(!r)return Xt(e,t);let i=Yt(e),a=r.startsWith(i)?i+Qt(r.slice(i.length),e):Qt(r,e),o=$t(a,e)?a:`${i}\n\n${a}`;return t.length?o+Zt(t):o}function tn(e){let t=[];for(let n of e.slice(0,8)){let e=new Set(t.map(e=>e.id)),r=n;for(let t=2;e.has(r);t++)r=`${n}-${t}`;t.push({id:r,name:n,skill:n,prompt:`{{task}}`})}return t}function nn(e,t,n,r,i={}){return t?{...i,workflow:t,task:en(e,n.map(e=>e.id),r)}:n.length?{...i,steps:tn(n.map(e=>e.id)).map((e,t)=>({...e,...n[t]?.path===void 0?{}:{skillPath:n[t].path}})),task:en(e,[],r)}:{...i,workflow:`quick-task`,task:en(e,[],r)}}function rn(e){let t=h(),n=C(),r=v(),{runners:i,uninstalled:a,signedOut:o,accounts:s,repoAccount:c,accountFor:l}=Ye(),u=n.data?.defaultRunner,d=Me(e.runner,i,u??i[0]??`claude`),f=n.data?.modelsLocked===!0,p=l(d,e.account),m=b(d,!0,p??c?.[d]),g=ke(f?null:e.model,d,r.data,n.data?.defaultModels,m.data),_=Ie(g,m.data);return{runner:d,runnerExplicit:e.runner!==null,model:g,effort:f?``:Re(e.effort,_),effortOptions:_,runners:i,uninstalled:a,signedOut:o,defaultRunner:u,canRun:t.isSuccess&&i.length>0,modelsLocked:f,providerPending:t.isPending,providerError:t.isError,accounts:s,account:p,repoAccount:c}}function an(e){return{runner:Fe(e.runner,e.defaultRunner,e.runnerExplicit),model:e.modelsLocked?void 0:e.model||void 0,effort:e.modelsLocked?void 0:e.effort||void 0}}function on(e){return{...an(e),...e.account?{agentProfile:e.account}:{}}}function sn(e,t){let{runners:n,uninstalled:r,signedOut:i}=e;return n.length>1||r.length>0||i.length>0||n.some(e=>He(t,e))}function cn({pick:e,onChange:t,disabled:n=!1,accounts:r=!1,layout:i}){let a=(0,J.useRef)(null),o=(0,J.useRef)(null),[s,c]=(0,J.useState)(()=>typeof window<`u`&&window.innerWidth<=767);(0,J.useLayoutEffect)(()=>{let e=a.current;if(i!==`row`||!e)return;let t=()=>{let t=window.innerWidth<=767||e.getBoundingClientRect().width<550,n=document.activeElement;o.current=n instanceof HTMLElement&&e.contains(n)?n:null,c(t)};t();let n=typeof ResizeObserver>`u`?null:new ResizeObserver(t);return n?.observe(e),window.addEventListener(`resize`,t),()=>{n?.disconnect(),window.removeEventListener(`resize`,t)}},[i]),(0,J.useLayoutEffect)(()=>{let e=o.current;o.current=null,e&&e.isConnected&&document.activeElement!==e&&e.focus()},[s]);let l=rn(e),{runner:u,model:d,effort:f,effortOptions:p,runners:m,canRun:h,modelsLocked:g}=l,_=C(),y=v(),x=b(u,!0,l.account??l.repoAccount?.[u]),S=Le(u,y.data,x.data,[e.model,_.data?.defaultModels?.[u]]),w=n||!h,T=r?l.accounts:[],E=sn(l,T)?(0,Y.jsx)(Pe,{icon:(0,Y.jsx)(M,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-accent-text`}),fieldLabel:!0,runners:m,uninstalled:l.uninstalled,signedOut:l.signedOut,value:u,accounts:T,account:r?l.account:null,repoAccount:r?l.repoAccount:void 0,disabled:w,onPick:(n,i)=>t(r?{runner:n,account:i,model:n===u?e.model:null,effort:e.effort}:{runner:n,account:null,model:null,effort:e.effort})},`runner`):null,D=(0,Y.jsx)(K,{icon:(0,Y.jsx)(re,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-accent-text`}),fieldLabel:!0,slot:`model-pill`,ariaLabel:`Model`,label:d===``?`Default`:S.find(e=>e.id===d).label,value:d,disabled:w,readOnly:g===!0,disabledHint:g?`Model selection is locked to native coding-agent settings.`:void 0,onPick:n=>{let r=Ie(n,x.data);t({...e,model:n,effort:e.effort===null?null:Re(e.effort,r)})},options:S.map(e=>({value:e.id,label:e.label,desc:e.desc})),status:Ke(u,y.data,x)},`model`),O=(0,Y.jsx)(K,{icon:(0,Y.jsx)(N,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-accent-text`}),fieldLabel:!0,slot:`effort-pill`,ariaLabel:`Effort`,label:p.find(e=>e.value===f)?.label??`auto`,value:f,disabled:w,readOnly:g===!0,disabledHint:g?`Effort selection is locked to native coding-agent settings.`:void 0,onPick:n=>t({...e,effort:n}),options:p.map(e=>({value:e.value,label:e.label,desc:e.desc}))},`effort`);return i===`row`?(0,Y.jsx)(`div`,{ref:a,"data-slot":`engine-row-box`,children:(0,Y.jsx)(`div`,{"data-slot":`engine-row`,className:`engine-row`,role:`group`,"aria-label":`Agent settings`,children:(0,Y.jsx)(Ae,{children:s?[E,O,D]:[E,D,O]})})}):(0,Y.jsxs)(Ae,{children:[E,D,O]})}var ln={workflow:null,skills:[]},un=`cez-followup-selection`;function dn(e){let t=e&&typeof e==`object`?e:{};return{workflow:typeof t.workflow==`string`?t.workflow:null,skills:Array.isArray(t.skills)?t.skills.flatMap(e=>typeof e==`string`?[{id:e}]:!e||typeof e!=`object`||typeof e.id!=`string`?[]:[{id:e.id,...typeof e.path==`string`?{path:e.path}:{}}]):[]}}function fn(){try{let e=localStorage.getItem(un);return e?dn(JSON.parse(e)):{...ln}}catch{return{...ln}}}function pn(e){try{localStorage.setItem(un,JSON.stringify(e))}catch{}}var mn=`cez-followup-prompt:`;function hn(e){try{return localStorage.getItem(mn+e)??``}catch{return``}}function gn(e,t){try{t===``?localStorage.removeItem(mn+e):localStorage.setItem(mn+e,t)}catch{}}function _n({item:e,workflows:t,skills:n,workflow:i,onWorkflowChange:o,selectedSkills:c,onSkillsChange:l,engine:d,onEngineChange:f,queuedRunId:p,onQueued:m}){let h=s(),v=_(),y=e.kind===`pr`?`PR`:`issue`,b=rn(d),S=g(b.runner,b.account),C=c.filter(e=>S.unchecked||e.path===void 0||n.some(t=>t.id===e.id&&(e.path===void 0||t.path===e.path))),T=C.length!==c.length,[D]=(0,J.useState)(()=>Yt(e)),[k,A]=(0,J.useState)(()=>hn(e.url)||D),j=(0,J.useRef)(null),M=(0,J.useRef)(null);(0,J.useEffect)(()=>{gn(e.url,k===D?``:k)},[e.url,k,D]);let N=(0,J.useMemo)(()=>qe(v.data?.promptTemplates),[v.data?.promptTemplates]),ee=e=>{let t=j.current,n=Ge({prompt:k,base:D,selectionStart:t?.selectionStart??null,focused:document.activeElement===t,remembered:M.current}),r=We(k,n,e);A(r.text),M.current=r.caret,requestAnimationFrame(()=>{j.current?.focus(),j.current?.setSelectionRange(r.caret,r.caret)})},te=Oe(N,C.map(e=>e.id)),P=(0,J.useRef)(k);P.current=k;let F=(0,J.useRef)(``);(0,J.useEffect)(()=>{let e=Je(P.current,F.current,te,D);F.current=e.applied,e.text!==P.current&&A(e.text)},[te,D]);let I=x({mutationFn:async()=>!b.canRun||T?null:a(nn(e,i,C,k,on(b))),onSuccess:t=>{if(t===null)return;let n=t;n&&m(e.url,n.id),E(`Added to the queue — ${y} #${e.number}`),C.length>0&&v.data!==void 0&&u({skillUsage:C.reduce((e,t)=>Ee(e,t.id),v.data.skillUsage)}).then(()=>h.invalidateQueries({queryKey:w.uiState})).catch(()=>{}),gn(e.url,``),A(D),F.current=``,h.invalidateQueries({queryKey:w.runs.all})},onError:e=>E(e.message,{tone:`danger`})}),ne=e=>{Be({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(),!I.isPending&&b.canRun&&I.mutate())},L=e=>l(c.some(t=>W(t)===W(e))?c.filter(t=>W(t)!==W(e)):[...c,Te(e)]);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`section`,{"data-slot":`gh-hand`,className:`mt-7 rounded-lg border border-border bg-card p-4`,children:[(0,Y.jsx)(`h3`,{className:`text-xl font-normal text-foreground`,children:`Hand this to the agent`}),(0,Y.jsxs)(`label`,{className:`gh-field gh-prompt-field`,children:[(0,Y.jsx)(`span`,{children:`Instructions for the agent`}),(0,Y.jsx)(Ze,{ref:j,"data-slot":`gh-custom-prompt`,"aria-label":`Custom prompt`,"aria-keyshortcuts":`Control+Enter Meta+Enter`,value:k,onChange:e=>A(e.target.value),onSelect:e=>{M.current=e.currentTarget.selectionStart},onKeyDown:ne,placeholder:`Instructions for the agent… (#${e.number} and its link are always sent)`,className:`mt-3 min-h-20 text-[13px]`})]}),(0,Y.jsx)(ze,{templates:N,onInsert:ee}),(0,Y.jsxs)(`div`,{className:`gh-handoff-settings`,children:[(0,Y.jsxs)(`div`,{className:`gh-field`,children:[(0,Y.jsx)(`span`,{children:`Workflow`}),(0,Y.jsx)(yn,{workflows:t,value:i,onChange:o})]}),(0,Y.jsxs)(`div`,{className:`gh-field`,children:[(0,Y.jsx)(`span`,{children:`Skills · select one or more`}),(0,Y.jsx)(xn,{skills:n,skillUsage:v.data?.skillUsage,selected:c,onToggle:L})]}),c.length>0?(0,Y.jsx)(`div`,{"data-slot":`gh-skill-chips`,className:`mt-2.5 flex flex-wrap gap-1.5`,children:c.map(e=>(0,Y.jsx)(vn,{skill:e,skills:n,unchecked:S.unchecked,onRemove:()=>L(e)},W(e)))}):null,T?(0,Y.jsx)(`p`,{role:`alert`,children:`A selected skill path is unavailable. Remove it or choose a current copy before starting.`}):null,(0,Y.jsx)(cn,{layout:`row`,pick:d,onChange:f,disabled:I.isPending||!b.canRun,accounts:!0}),(0,Y.jsxs)(`div`,{className:`gh-field`,children:[(0,Y.jsx)(`span`,{children:`Account`}),(0,Y.jsx)(bn,{resolved:b,disabled:I.isPending||!b.canRun,onPick:e=>f({...d,account:e})})]}),!b.providerPending&&!b.canRun?(0,Y.jsxs)(`span`,{"data-slot":`gh-provider-gate`,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[b.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,Y.jsx)(V,{to:`/settings/agent-defaults#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]}):null]}),(0,Y.jsxs)(`p`,{className:`text-[11px] leading-relaxed text-muted-foreground`,children:[e.kind===`pr`?`PR`:`Issue`,` number and link remain attached to the task. Edit the prompt before starting. Cmd/Ctrl+Enter submits; Enter adds a new line.`]})]}),(0,Y.jsxs)(`div`,{"data-slot":`gh-handoff-actions`,className:`mt-[22px] flex flex-wrap items-center gap-2.5`,children:[r(e.url)?(0,Y.jsx)(B,{asChild:!0,variant:`outline`,children:(0,Y.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:`Open in GitHub`})}):null,(0,Y.jsxs)(B,{variant:`primary`,"data-action":`gh-run`,disabled:I.isPending||!b.canRun||T,onClick:()=>I.mutate(),children:[(0,Y.jsx)(se,{"aria-hidden":`true`,className:`size-3.5`}),`Run agent on this `,y]}),(0,Y.jsx)(`kbd`,{"aria-hidden":`true`,className:`rounded-[5px] border border-b-2 border-border bg-card px-[5px] py-px font-mono text-[11px] font-medium text-muted-foreground`,children:Ve()}),p?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`span`,{"data-slot":`gh-queued`,className:`flex items-center gap-1 text-xs font-medium text-success`,children:[(0,Y.jsx)(O,{size:16,"aria-hidden":`true`,className:`size-3.5`}),`queued`]}),(0,Y.jsx)(V,{to:`/tasks/${p}`,"data-slot":`gh-view-run`,className:`text-xs font-semibold text-accent-text hover:underline`,children:`View task →`})]}):null]})]})}function vn({skill:e,skills:t,unchecked:n,onRemove:r}){let i=t.find(t=>t.id===e.id&&(e.path===void 0||t.path===e.path)),a=[i?.name??e.id,e.path].filter(Boolean).join(` · `),o=!n&&e.path!==void 0&&!i?` (unavailable)`:n||!i?` (unchecked)`:``;return(0,Y.jsxs)(`button`,{type:`button`,"data-slot":`gh-skill-chip`,"data-skill":e.id,onClick:r,title:`Remove skill ${a}`,"aria-label":`Remove skill ${a}`,className:`inline-flex min-h-11 items-center gap-2 rounded-lg border border-border bg-card px-3 text-xs font-medium text-foreground transition-colors hover:bg-danger/10 hover:text-danger`,children:[a,o,(0,Y.jsx)(A,{size:16,"aria-hidden":`true`,className:`size-3`})]})}function yn({workflows:e,value:t,onChange:n}){let[r,a]=(0,J.useState)(!1),[o,s]=(0,J.useState)(``),c=(0,J.useRef)(null),l=xe(e,o);return(0,Y.jsxs)(ue,{open:r,onOpenChange:e=>{a(e),e||s(``)},children:[(0,Y.jsx)(ce,{asChild:!0,children:(0,Y.jsxs)(`button`,{type:`button`,"data-slot":`gh-workflow-trigger`,"aria-label":`Choose a workflow`,className:i(Ne,t&&`border-foreground/60 font-mono text-[11px] font-semibold text-foreground`),children:[(0,Y.jsx)(L,{size:16,"aria-hidden":`true`,className:`size-3 shrink-0 text-accent-icon`}),(0,Y.jsx)(`span`,{className:`min-w-0 max-w-44 truncate`,children:t??`workflow`}),(0,Y.jsx)(ee,{size:16,"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,Y.jsx)(le,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,Y.jsxs)(be,{shouldFilter:!1,children:[(0,Y.jsx)(_e,{placeholder:`search workflows…`,value:o,onValueChange:s,onInput:()=>c.current?.scrollTo(0,0)}),(0,Y.jsxs)(ye,{ref:c,"data-slot":`gh-workflow-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[l.length===0?(0,Y.jsx)(ve,{children:`Nothing matches.`}):null,(0,Y.jsx)(H,{children:l.map(e=>{let r=t===e.name;return(0,Y.jsxs)(U,{value:`workflow ${e.name}`,keywords:we(e.name,e.description),"data-slot":`gh-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),a(!1)},children:[(0,Y.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,r?(0,Y.jsx)(O,{size:16,"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-link-foreground`}):null]},e.name)})})]})]})})]})}function bn({resolved:e,disabled:t,onPick:n}){let r=e.accounts.filter(t=>t.provider===e.runner),i=[...r.some(e=>e.id==="default")?[]:[{value:l,label:`Default`}],...r.map(e=>({value:e.id,label:e.label,desc:e.configDir}))],a=e.account??e.repoAccount?.[e.runner]??`default`;return(0,Y.jsx)(K,{icon:(0,Y.jsx)(k,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-accent-text`}),slot:`account-pill`,ariaLabel:`Account`,label:i.find(e=>e.value===a)?.label??`Default`,value:a,options:i,disabled:t,onPick:n})}function xn({skills:e,skillUsage:t,selected:n,onToggle:r}){let[a,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(``),[l,u]=(0,J.useState)(null),d=(0,J.useRef)(null),{mostUsed:f,project:p,global:m,ranked:h}=De(e,s,t),g=(e,t)=>{let a=n.some(t=>W(t)===W(e));return(0,Y.jsxs)(U,{value:W(e),keywords:we(e.name,e.description),"data-slot":`gh-skill-option`,"data-skill":e.id,"data-selected":a?`true`:void 0,onSelect:()=>r(Te(e)),children:[(0,Y.jsx)(`span`,{className:i(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.path?(0,Y.jsx)(`span`,{className:`min-w-0 truncate text-xs`,children:e.path}):null,e.description?(0,Y.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,(0,Y.jsx)(`button`,{type:`button`,"data-slot":`gh-skill-view`,"aria-label":`View skill ${e.name}`,title:`View skill`,onClick:t=>{t.preventDefault(),t.stopPropagation(),u(e)},className:`ml-auto shrink-0 rounded-sm p-0.5 text-soft-foreground transition-colors hover:text-foreground`,children:(0,Y.jsx)(ie,{"aria-hidden":`true`,className:`size-3.5`})}),a?(0,Y.jsx)(O,{size:16,"aria-hidden":`true`,className:`size-3.5 shrink-0 text-link-foreground`}):null]},W(e))};return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(je,{skill:l,onClose:()=>u(null)}),(0,Y.jsxs)(ue,{open:a,onOpenChange:e=>{o(e),e||c(``)},children:[(0,Y.jsx)(ce,{asChild:!0,children:(0,Y.jsxs)(`button`,{type:`button`,"data-slot":`gh-skills-trigger`,"aria-label":`Choose skills`,className:i(Ne,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,Y.jsx)(I,{size:16,"aria-hidden":`true`,className:`size-3 shrink-0 text-accent-icon`}),`skills`,n.length>0?` · ${n.length}`:``,(0,Y.jsx)(ee,{size:16,"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,Y.jsx)(le,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,Y.jsxs)(be,{shouldFilter:!1,children:[(0,Y.jsx)(_e,{placeholder:`search skills…`,value:s,onValueChange:c,onInput:()=>d.current?.scrollTo(0,0)}),(0,Y.jsxs)(ye,{ref:d,"data-slot":`gh-skill-menu`,className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[s.trim()&&!e.some(e=>e.id===s.trim())?(0,Y.jsx)(H,{children:(0,Y.jsxs)(U,{value:`typed-skill`,onSelect:()=>r({id:s.trim()}),children:[`Use skill id “`,s.trim(),`” (unchecked)`]})}):null,(h?h.length===0:f.length===0&&p.length===0&&m.length===0)?(0,Y.jsx)(ve,{children:`Nothing matches.`}):null,h?h.length>0?(0,Y.jsx)(H,{children:h.map(e=>g(e,Se(e)))}):null:(0,Y.jsxs)(Y.Fragment,{children:[f.length>0?(0,Y.jsx)(H,{heading:`Most used`,children:f.map(e=>g(e,Se(e)))}):null,p.length>0?(0,Y.jsx)(H,{heading:`Project skills`,children:p.map(e=>g(e,!0))}):null,m.length>0?(0,Y.jsx)(H,{heading:`Global`,children:m.map(e=>g(e,!1))}):null]})]})]})})]})]})}var Sn=new WeakMap;function Cn(){let e=fn(),t={workflow:e.workflow,selectedSkills:e.skills,engine:{runner:null,model:null,effort:null,account:null},queued:new Map},n=new Set;return{snapshot:()=>t,subscribe:e=>(n.add(e),()=>{n.delete(e)}),update:e=>{t={...t,...e},(e.workflow!==void 0||e.selectedSkills!==void 0)&&pn({workflow:t.workflow,skills:[...t.selectedSkills]}),n.forEach(e=>e())}}}function wn(){let e=s(),{projectId:t}=d(),n=Sn.get(e);n||Sn.set(e,n=new Map);let r=n.get(t);r||n.set(t,r=Cn());let{snapshot:i,subscribe:a,update:o}=r,c=(0,J.useSyncExternalStore)(a,i,i),l=S(),u=rn(c.engine),f=g(u.runner,u.account),p=_(),m=l.data?.workflows;(0,J.useEffect)(()=>{m&&c.workflow!==null&&!m.some(e=>e.name===c.workflow)&&o({workflow:null})},[o,m,c.workflow]);let h=(0,J.useMemo)(()=>Ce(f.data??[],p.data?.skillUsage),[f.data,p.data?.skillUsage]);return{...c,workflows:l,skillList:h,skillsUnchecked:f.unchecked,setWorkflow:e=>o({workflow:e}),setSelectedSkills:e=>o({selectedSkills:e}),setEngine:e=>o({engine:e}),onQueued:(e,t)=>o({queued:new Map(i().queued).set(e,t)})}}export{Kt as a,jt as c,Q as d,vt as f,Jt as i,gt as l,_n as n,Dt as o,Xt as r,yt as s,wn as t,_t as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-DSMR_WLb.js";import{A as i,Ht as a,T as o,ci as s,i as c,zt as l}from"./project-scope-context-DqBHMdSb.js";import{Pt as u,Tt as d,in as f,kt as ee,t as p}from"./queries-DeeY9cGJ.js";import{h as m}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{n as h}from"./toaster-Bo5vCbz-.js";import{J as g,S as _,X as v,at as y,b as te,c as ne,ft as re,i as b,l as x,lt as S,n as ie,ot as ae,st as C,tt as oe,v as w,x as T}from"./design-icons-CzEoMH9c.js";import{t as E}from"./button-BQ2y4XRB.js";import{i as D,p as se,r as O,t as ce}from"./dropdown-menu-4e2iKSMT.js";import{i as k,o as le,r as A,s as ue,t as j}from"./dialog-BVF6dIeS.js";import{i as de,l as fe,o as pe}from"./skills-pM_PouEs.js";import{t as me}from"./centered-state-V15AR_qo.js";import{Bt as M,Gt as N,Hn as P,Ht as F,Kt as I,T as he,Ut as L,Vt as R,Wt as z,qt as B}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{t as r}from"./utils-DSMR_WLb.js";import{A as i,Ht as a,T as o,ci as s,i as c,zt as l}from"./project-scope-context-DqBHMdSb.js";import{Pt as u,Tt as d,in as f,kt as ee,t as p}from"./queries-DeeY9cGJ.js";import{h as m}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{n as h}from"./toaster-Bo5vCbz-.js";import{J as g,S as _,X as v,at as y,b as te,c as ne,ft as re,i as b,l as x,lt as S,n as ie,ot as ae,st as C,tt as oe,v as w,x as T}from"./design-icons-CzEoMH9c.js";import{t as E}from"./button-BQ2y4XRB.js";import{i as D,p as se,r as O,t as ce}from"./dropdown-menu-4e2iKSMT.js";import{i as k,o as le,r as A,s as ue,t as j}from"./dialog-BVF6dIeS.js";import{i as de,l as fe,o as pe}from"./skills-pM_PouEs.js";import{t as me}from"./centered-state-V15AR_qo.js";import{Bt as M,Gt as N,Hn as P,Ht as F,Kt as I,T as he,Ut as L,Vt as R,Wt as z,qt as B}from"./index-DfmmHZB9.js";import{_ as V,a as ge,c as _e,f as ve,g as ye,h as be,i as xe,m as H,n as Se,o as Ce,p as U,r as W,t as G,u as we}from"./sortable.esm-CAVTYaA3.js";import{t as K}from"./textarea-vJt9undk.js";var q=e(t(),1);function J(e){let t=[];for(let n of e){if(n.kind===`plugin`||n.command||!n.skill||n.prompt!==void 0&&n.prompt!==`{{task}}`||n.name!==void 0&&n.name!==n.skill||n.timeoutMs!==void 0||n.model||n.effort!==void 0||n.runner||n.agentProfile||n.allowedTools||n.bashAllowlist||n.onFail)return null;t.push(n.skill)}return t.length?t:null}function Te(e,t){let n=new Set(t.map(e=>e.id)),r=e;for(let t=2;n.has(r);t++)r=`${e}-${t}`;return{id:r,name:e,skill:e,prompt:`{{task}}`}}function Ee(e,t,n){let r=[...e];return r.splice(Math.max(0,Math.min(n,r.length)),0,t),r}function De(e,t,n){if(t===n||t<0||t>=e.length||n<0||n>=e.length)return[...e];let r=[...e],[i]=r.splice(t,1);return i===void 0?[...e]:(r.splice(n,0,i),r)}function Oe(e,t){return e.filter((e,n)=>n!==t)}function Y(e){let t=String(e),n=/^[A-Za-z0-9._][A-Za-z0-9 ._/-]*$/.test(t)&&!t.endsWith(` `),r=/^(true|false|yes|no|on|off|null|~)$/i.test(t)||/^[-+.]?\d/.test(t);return n&&!r?t:JSON.stringify(t)}function X(e,t,n){let r=` `.repeat(n);return t.includes(`
|
|
2
2
|
`)?[`${r}${e}: |`,...t.split(`
|
|
3
3
|
`).map(e=>`${r} ${e}`)]:[`${r}${e}: ${Y(t)}`]}function ke(e){let t=[];return e.name&&e.name!==e.id&&t.push(` name: ${Y(e.name)}`),e.skill&&t.push(` skill: ${Y(e.skill)}`),t}function Ae(e){let t=[];return e.model&&t.push(` model: ${Y(e.model)}`),e.timeoutMs!==void 0&&t.push(` timeoutMs: ${e.timeoutMs}`),e.effort!==void 0&&t.push(` effort: ${Y(e.effort)}`),e.runner&&t.push(` runner: ${Y(e.runner)}`),e.agentProfile&&t.push(` agentProfile: ${Y(e.agentProfile)}`),t}function Z(e){let t=[];return e.allowedTools&&t.push(` allowedTools: [${e.allowedTools.map(Y).join(`, `)}]`),e.bashAllowlist&&t.push(` bashAllowlist: [${e.bashAllowlist.map(Y).join(`, `)}]`),t}function je(e){return e.onFail?[` onFail:`,` retry: ${Y(e.onFail.retry)}`,` max: ${e.onFail.max??2}`]:[]}function Me(e){return[` - id: ${Y(e.id)}`,...ke(e),...e.prompt?X(`prompt`,e.prompt,4):[],...e.kind===`plugin`?[` kind: plugin`,` pluginKind: ${Y(e.pluginKind)}`,...e.config===void 0?[]:[` config: ${JSON.stringify(e.config)}`]]:[],...Ae(e),...Z(e),...e.command?X(`command`,e.command,4):[],...je(e)]}function Ne(e,t,n){let r=[`name: ${Y(e.trim()||`my-workflow`)}`];t.trim()&&r.push(...X(`description`,t.trim(),0));let i=J(n);if(i){r.push(`skills:`);for(let e of i)r.push(` - ${Y(e)}`)}else if(n.length){r.push(`steps:`);for(let e of n)r.push(...Me(e))}else r.push(`skills: []`);return`${r.join(`
|
|
4
4
|
`)}\n`}function Pe(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`workflow`}function Fe(e){let t=J(e)?`skill`:`step`;return`${e.length} ${t}${e.length===1?``:`s`}`}function Ie(e,t){let n=new Set,r=[];for(let t of e.steps.slice(0,8)){let e=t.id||`step`,i=e;for(let t=2;n.has(i);t++)i=`${e}-${t}`;n.add(i),r.push({...t,id:i})}return{name:e.name?.trim()||t,steps:r}}function Le(e,t,n){let r=J(n);return{name:e.trim(),...t.trim()?{description:t.trim()}:{},...r?{skills:r}:{steps:[...n]}}}var Q=n();function Re({workflows:e,draft:t,trimmedName:n,nameRef:r,onDraft:i,onLoadWorkflow:a}){return(0,Q.jsxs)(`section`,{"data-slot":`wb-metadata`,className:`flex min-w-0 flex-col gap-3`,children:[(0,Q.jsxs)(`div`,{"data-slot":`wb-load`,className:`flex flex-col items-start gap-2`,children:[(0,Q.jsx)(`label`,{htmlFor:`workflow-load`,className:`text-xs text-muted-foreground`,children:`Load an existing workflow`}),(0,Q.jsxs)(`div`,{className:`relative max-w-full`,children:[(0,Q.jsx)(x,{"aria-hidden":`true`,className:`pointer-events-none absolute left-3 top-3.5 size-4 text-muted-foreground`}),(0,Q.jsxs)(`select`,{id:`workflow-load`,value:e.some(e=>e.name===n)?n:``,onChange:t=>{let n=e.find(e=>e.name===t.target.value);n&&a(n)},className:`h-11 max-w-full rounded-lg border border-border bg-card pl-9 pr-3 text-xs font-medium appearance-none focus-visible:outline-2 focus-visible:outline-ring`,children:[(0,Q.jsx)(`option`,{value:``,disabled:!0,children:`Choose a workflow`}),e.map(e=>(0,Q.jsx)(`option`,{value:e.name,"data-slot":`wb-load-option`,"data-name":e.name,children:e.name},e.name))]})]})]}),(0,Q.jsx)(`label`,{htmlFor:`workflow-name`,className:`text-xs font-semibold`,children:`Workflow name`}),(0,Q.jsx)(P,{id:`workflow-name`,ref:r,"data-slot":`wb-name`,"aria-label":`Workflow name`,spellCheck:!1,value:t.name,onChange:e=>i({...t,name:e.target.value}),className:`h-12 bg-card text-sm`}),(0,Q.jsx)(`label`,{htmlFor:`workflow-description`,className:`text-xs font-semibold`,children:`Description`}),(0,Q.jsx)(K,{id:`workflow-description`,"data-slot":`wb-description`,"aria-label":`Description`,value:t.description,onChange:e=>i({...t,description:e.target.value}),className:`min-h-[72px] bg-card p-3.5 text-sm`})]})}function ze({savedFile:e,autoOpen:t,onImportToggle:n,onExport:r,onAutoToggle:i,onDeleteRequest:a}){return(0,Q.jsxs)(`div`,{"data-slot":`wb-actions`,className:`grid grid-cols-[max-content_max-content] items-center justify-start gap-2 sm:flex sm:flex-wrap [&_button]:min-h-11 [&_button]:border [&_button]:border-border [&_button]:bg-card`,children:[(0,Q.jsxs)(E,{type:`button`,variant:`ghost`,size:`sm`,"data-slot":`wb-import`,className:`col-span-2 justify-self-start`,onClick:n,children:[(0,Q.jsx)(C,{"aria-hidden":`true`,className:`size-3`}),`Import`]}),(0,Q.jsxs)(E,{type:`button`,variant:`ghost`,size:`sm`,"data-slot":`wb-export`,className:`col-span-2 justify-self-start`,title:`Download workflow.yaml`,onClick:r,children:[(0,Q.jsx)(te,{"aria-hidden":`true`,className:`size-3`}),`Export`]}),(0,Q.jsxs)(E,{type:`button`,variant:`ghost`,size:`sm`,"data-slot":`wb-auto`,"aria-expanded":t,title:`Describe a chain — the agent builds it`,onClick:i,children:[(0,Q.jsx)(S,{"aria-hidden":`true`,className:`size-3`}),`Auto`]}),e?(0,Q.jsxs)(E,{type:`button`,variant:`ghost`,size:`sm`,"data-slot":`wb-delete`,className:`text-danger hover:text-danger`,title:`Delete the saved workflow file`,onClick:a,children:[(0,Q.jsx)(y,{"aria-hidden":`true`,className:`size-3`}),`Delete`]}):null]})}function Be({text:e,onTextChange:t,pending:n,onRun:r,onCancel:i}){return(0,Q.jsxs)(`div`,{"data-slot":`wb-auto-panel`,className:`rounded-xl border border-border bg-card p-5 [&_button]:min-h-11`,children:[(0,Q.jsx)(`h2`,{className:`text-lg font-normal`,children:`Build a chain from a prompt`}),(0,Q.jsx)(`p`,{className:`mt-4 text-[13px] leading-relaxed text-muted-foreground`,children:`Describe the outcome. An agent proposes a title and ordered skill/check steps. Review the result, edit it, then Save.`}),(0,Q.jsx)(K,{"data-slot":`wb-auto-text`,"aria-label":`Describe the chain to build`,rows:3,autoFocus:!0,placeholder:`e.g. Fix the bug, run the tests, then review the diff for regressions.`,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),r())},className:`mt-4 min-h-[108px] bg-background p-4 text-sm`}),(0,Q.jsxs)(`div`,{className:`mt-3 flex items-center gap-1.5`,children:[(0,Q.jsxs)(E,{type:`button`,variant:`primary`,size:`sm`,"data-slot":`wb-auto-run`,disabled:n||e.trim()===``,onClick:r,children:[(0,Q.jsx)(S,{"aria-hidden":`true`,className:`size-3`}),n?`Building…`:`Build chain`]}),(0,Q.jsxs)(E,{type:`button`,variant:`ghost`,size:`sm`,"data-slot":`wb-auto-cancel`,onClick:i,children:[(0,Q.jsx)(re,{"aria-hidden":`true`,className:`size-4`}),`Cancel`]})]}),(0,Q.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`Creates an editable draft. Review the generated name and steps before saving.`})]})}function Ve({open:e,onOpenChange:t,text:n,onTextChange:r,error:i,pending:a,onRun:o,onCancel:s}){return(0,Q.jsx)(j,{open:e,onOpenChange:t,children:(0,Q.jsxs)(A,{showCloseButton:!1,"data-slot":`wb-import-panel`,className:`max-md:translate-x-0 max-md:translate-y-0 sm:max-w-[660px] rounded-xl border border-border bg-card p-5 [&_button]:min-h-11`,children:[(0,Q.jsx)(ue,{className:`text-xl font-normal`,children:`Import workflow YAML`}),(0,Q.jsx)(k,{className:`sr-only`,children:`Paste a portable workflow definition to import.`}),(0,Q.jsx)(K,{"data-slot":`wb-import-text`,"aria-label":`Workflow YAML to import`,rows:4,spellCheck:!1,placeholder:`name: my-flow
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{M as r,q as i,qt as a}from"./queries-DeeY9cGJ.js";import{n as o}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import"./tasks-table-_5cXATkO.js";import{n as s}from"./toaster-Bo5vCbz-.js";import{t as c}from"./button-BQ2y4XRB.js";import{t as l}from"./status-dot-DtAOFiIi.js";import{r as u,t as d}from"./agents-settings-path-7X6_cvUg.js";import{Jt as f,Un as p,Vn as m,Xt as h,Yt as g,Zt as _,zn as v}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{M as r,q as i,qt as a}from"./queries-DeeY9cGJ.js";import{n as o}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import"./tasks-table-_5cXATkO.js";import{n as s}from"./toaster-Bo5vCbz-.js";import{t as c}from"./button-BQ2y4XRB.js";import{t as l}from"./status-dot-DtAOFiIi.js";import{r as u,t as d}from"./agents-settings-path-7X6_cvUg.js";import{Jt as f,Un as p,Vn as m,Xt as h,Yt as g,Zt as _,zn as v}from"./index-DfmmHZB9.js";var y=e(t(),1),b=n();function x({health:e,projects:t,repository:n,onAction:r}){return(0,b.jsxs)(`section`,{className:`space-y-4 rounded-xl border border-border bg-card p-6 max-md:p-4`,"aria-labelledby":`add-project-heading`,children:[(0,b.jsx)(`h2`,{id:`add-project-heading`,className:`text-lg font-normal leading-[1.5]`,children:`Add project`}),(0,b.jsx)(`p`,{className:`text-[13px] leading-[1.5] text-muted-foreground`,children:`Start a new repository, open an existing local folder, or clone a GitHub repository.`}),(0,b.jsxs)(`dl`,{className:`space-y-4 text-[13px] leading-[1.5] text-muted-foreground`,children:[e.data?.repoRoot?(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-x-3`,children:[(0,b.jsx)(`dt`,{children:`Local folder`}),(0,b.jsx)(`dd`,{className:`min-w-0 break-all`,children:e.data.repo?.root??e.data.repoRoot})]}):null,n?(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-x-3`,children:[(0,b.jsx)(`dt`,{children:`Repository`}),(0,b.jsx)(`dd`,{className:`min-w-0 break-all`,children:n.replace(/^https:\/\//,``)})]}):null,t.data?.projectsDir?(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-x-3`,children:[(0,b.jsx)(`dt`,{children:`Checkout folder`}),(0,b.jsx)(`dd`,{className:`min-w-0 break-all`,children:t.data.projectsDir})]}):null]}),(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,b.jsx)(c,{variant:`outline`,className:`h-10 rounded-lg px-[15px] text-xs font-normal leading-[18px]`,"data-action":`new-project`,onClick:()=>r(`new`),children:`New project`}),(0,b.jsx)(c,{variant:`outline`,className:`h-10 rounded-lg px-[15px] text-xs font-normal leading-[18px]`,onClick:()=>r(`local`),children:`Open local folder`}),(0,b.jsx)(c,{variant:`outline`,className:`h-10 rounded-lg px-[15px] text-xs font-normal leading-[18px]`,onClick:()=>r(`clone`),children:`Clone from GitHub`})]})]})}function S({health:e,copying:t,onCopy:n}){return(0,b.jsxs)(`section`,{className:`space-y-4 rounded-xl border border-border bg-card p-6 max-md:p-4`,"aria-labelledby":`tools-heading`,children:[(0,b.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,b.jsx)(`h2`,{id:`tools-heading`,className:`text-lg font-normal leading-[1.5]`,children:`Tools diagnostics`}),(0,b.jsx)(o,{to:d,"data-slot":`tools-settings`,className:f,children:`Tool settings ›`})]}),(0,b.jsx)(`p`,{className:`text-[13px] leading-[1.5] text-muted-foreground`,children:`Check the tools available to this local workspace.`}),e.isError?(0,b.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:`Could not refresh tool diagnostics. Recheck to retry.`}):null,!e.data&&!e.isError?(0,b.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:`Checking installed tools…`}):null,e.data?(0,b.jsx)(`dl`,{className:`space-y-4 text-[13px] leading-[1.5] text-muted-foreground`,children:e.data.checks.map(e=>{let t=g(e);return(0,b.jsxs)(`div`,{"data-slot":`tool-row`,"data-tool":e.name,"data-available":e.available,className:`flex flex-wrap items-center gap-x-4 gap-y-1`,children:[(0,b.jsxs)(`dt`,{className:`flex items-center gap-2`,children:[(0,b.jsx)(l,{tone:_(e)}),(0,b.jsx)(`span`,{className:`font-mono text-[13px] font-medium text-foreground`,children:e.name})]}),(0,b.jsxs)(`dd`,{className:`flex min-w-0 flex-1 items-center gap-x-3 text-muted-foreground`,children:[(0,b.jsxs)(`span`,{className:`min-w-0 break-words`,children:[h(e),e.version?` · ${e.version}`:``]}),e.available?null:(0,b.jsx)(o,{to:u(e.name),"data-slot":`tool-setup`,className:`${f} ml-auto`,children:`Set up ›`})]}),t?(0,b.jsx)(`dd`,{"data-slot":`tool-hint`,className:`basis-full min-w-0 break-words pl-[15px] text-xs leading-snug text-muted-foreground`,children:t}):null]},e.name)})}):null,e.data?.checks.length===0?(0,b.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No tool diagnostics reported by this server.`}):null,(0,b.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,b.jsx)(c,{variant:`outline`,className:`h-10 rounded-lg px-[15px] text-xs font-normal leading-[18px]`,disabled:e.isFetching,onClick:()=>void e.refetch(),children:e.isFetching?`Checking tools…`:`Recheck tools`}),(0,b.jsx)(c,{variant:`outline`,className:`h-10 rounded-lg px-[15px] text-xs font-normal leading-[18px]`,disabled:!e.data||t,onClick:()=>void n(),children:t?`Copying…`:`Copy diagnostics`})]})]})}function C(){let e=r(),t=i(),n=a(e.data?.repo?.remote),[o,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(!1);return(0,b.jsxs)(`div`,{"data-route":`workspace-tools`,className:`w-full space-y-[22px] px-9 py-9 max-md:px-[18px] max-md:py-6`,children:[(0,b.jsx)(`h1`,{className:`text-[28px] font-normal leading-[1.5] max-md:text-[24px]`,children:`Workspace tools`}),(0,b.jsx)(x,{health:e,projects:t,repository:n,onAction:c}),(0,b.jsx)(S,{health:e,copying:l,onCopy:async()=>{if(!(!e.data||l)){u(!0);try{await navigator.clipboard.writeText(JSON.stringify({version:e.data.version,checks:e.data.checks},null,2)),s(`Diagnostics copied`)}catch{s(`Could not copy diagnostics. Please try again.`,{tone:`danger`})}finally{u(!1)}}}}),o===`new`?(0,b.jsx)(v,{open:!0,onOpenChange:e=>{e||c(null)}}):null,o===`local`?(0,b.jsx)(p,{open:!0,onOpenChange:e=>{e||c(null)}}):null,o===`clone`?(0,b.jsx)(m,{open:!0,onOpenChange:e=>{e||c(null)}}):null]})}export{C as WorkspaceToolsRoute};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Kt as r,Mr as i,ci as a,i as o,jr as s}from"./project-scope-context-DqBHMdSb.js";import{M as c,in as l,p as u,t as d}from"./queries-DeeY9cGJ.js";import{n as f}from"./toaster-Bo5vCbz-.js";import{u as p}from"./design-icons-CzEoMH9c.js";import{t as m}from"./button-BQ2y4XRB.js";import{t as h}from"./project-router-CYJwJlJL.js";import{t as g}from"./centered-state-V15AR_qo.js";import{Yn as _}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{Kt as r,Mr as i,ci as a,i as o,jr as s}from"./project-scope-context-DqBHMdSb.js";import{M as c,in as l,p as u,t as d}from"./queries-DeeY9cGJ.js";import{n as f}from"./toaster-Bo5vCbz-.js";import{u as p}from"./design-icons-CzEoMH9c.js";import{t as m}from"./button-BQ2y4XRB.js";import{t as h}from"./project-router-CYJwJlJL.js";import{t as g}from"./centered-state-V15AR_qo.js";import{Yn as _}from"./index-DfmmHZB9.js";import{n as v,r as y,t as b}from"./remote-settings-notice-B7vBsgJe.js";import{t as x}from"./settings-field-Bl6WuvGX.js";import{n as S}from"./project-location-YHLlezCN.js";var C=e(t(),1),w=n();function T({copy:e,savedCommandCount:t,settingsAdmin:n,configPath:r,issue:i,invalid:a,children:o}){let s=e.slot;return(0,w.jsxs)(w.Fragment,{children:[t===0&&i===null?(0,w.jsx)(`p`,{"data-slot":`${s}-empty`,className:`text-sm text-foreground`,children:e.empty}):null,o,n===!1?(0,w.jsxs)(`p`,{"data-slot":`${s}-readonly`,className:`text-xs text-foreground`,children:[`Edit `,(0,w.jsxs)(`code`,{children:[e.key,`.commands`]}),` in`,` `,r===null?(0,w.jsxs)(w.Fragment,{children:[`the project’s `,(0,w.jsx)(`code`,{children:`.ai/cezar/config.json`})]}):(0,w.jsx)(`code`,{className:`break-all`,children:r}),` `,`on the machine running Squawk. `,e.fileEditApplies,` No restart is needed. To edit here, the host operator runs `,(0,w.jsx)(`code`,{children:b}),`.`]}):null,i===null?null:(0,w.jsxs)(`p`,{"data-slot":`${s}-issue`,className:`text-[11px] text-danger`,children:[`config.json has an invalid `,e.key,` (`,i,`) — saving replaces it.`]}),a===null?null:(0,w.jsx)(`p`,{"data-slot":`${s}-invalid`,className:`text-[11px] text-danger`,children:a})]})}function E(e,t){let n=e.split(`
|
|
2
2
|
`).map(e=>e.trim()).filter(e=>e!==``),r=Number(t);return{commands:n,timeoutSeconds:r,invalid:n.length>20?`Enter at most 20 commands.`:n.some(e=>e.length>4e3)?`Keep each command under ${s.toLocaleString(`en-US`)} characters.`:t.trim()===``||!Number.isInteger(r)||r<1||r>7200?`Enter a whole number of seconds from 1 to ${i}.`:null}}var D={setup:{key:`worktreeSetup`,issueKey:`worktreeSetupIssue`,slot:`worktree-setup`,title:`Prepare new worktrees`,hint:`Runs in every new task and worker worktree before the agent starts, in order, stopping at the first failure. Leave commands empty to skip setup.`,empty:`No setup commands configured. No commands will run in new worktrees.`,label:`Worktree setup commands, one per line`,example:`npm ci`,fileEditApplies:`Valid file edits apply to new worktrees.`,saved:`Worktree setup saved`,cleared:`Worktree setup cleared`,save:`Save setup`},teardown:{key:`worktreeTeardown`,issueKey:`worktreeTeardownIssue`,slot:`worktree-teardown`,title:`Stop worker services before destroy`,hint:`Runs in a worker’s worktree when the worker is destroyed, before destroy stops the worker’s processes, in order, stopping at the first failure. A failure is recorded on the worker and destroy goes on. Leave commands empty to skip teardown.`,empty:`No teardown commands configured. Destroy runs no commands in worker worktrees.`,label:`Worktree teardown commands, one per line`,example:`docker compose down`,fileEditApplies:`Valid file edits apply to the next worker destroy.`,saved:`Worktree teardown saved`,cleared:`Worktree teardown cleared`,save:`Save teardown`}};function O({config:e,copy:t}){let n=a(),s=c(),u=y(),p=S(),h=p===null?null:`${p.replace(/\/$/,``)}/.ai/cezar/config.json`,g=s.data?.capabilities?.settingsAdmin===!0,_=e[t.key],b=e[t.issueKey],D=_?.commands??[],O=_?.timeoutSeconds??900,[k,A]=(0,C.useState)(D.join(`
|
|
3
3
|
`)),[j,M]=(0,C.useState)(String(O)),{commands:N,timeoutSeconds:P,invalid:F}=E(k,j),I=b===null&&N.length===D.length&&N.every((e,t)=>e===D[t])&&(N.length===0||P===O),L=l({mutationFn:e=>r(e),onSuccess:e=>{n.setQueryData(d.config,e),A(N.join(`
|
|
4
4
|
`)),f(N.length===0?t.cleared:t.saved)},onError:e=>{f(e.message,{tone:`danger`}),e instanceof o&&e.status===409&&u()}}),R=()=>L.mutate({[t.key]:N.length===0?null:{commands:N,...P===900?{}:{timeoutSeconds:P}}}),z=`block 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 read-only:bg-muted read-only:text-muted-foreground`;return(0,w.jsxs)(x,{title:t.title,hint:t.hint,children:[(0,w.jsx)(v,{risk:`These commands run on the machine running Squawk`}),(0,w.jsxs)(T,{copy:t,savedCommandCount:D.length,settingsAdmin:s.data?.capabilities?.settingsAdmin,configPath:h,issue:b,invalid:F,children:[(0,w.jsx)(`textarea`,{"data-slot":`${t.slot}-commands`,"aria-label":t.label,rows:4,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,value:k,readOnly:!g,disabled:L.isPending,onChange:e=>A(e.target.value),className:`${z} min-h-24 w-full resize-y font-mono text-[13px] leading-relaxed`}),(0,w.jsxs)(`p`,{className:`text-xs text-soft-foreground`,children:[`Example only: `,(0,w.jsx)(`code`,{children:t.example}),`. Commands run only after they are saved.`]}),(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,w.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-soft-foreground`,children:[(0,w.jsx)(`span`,{children:`Timeout per command`}),(0,w.jsx)(`input`,{type:`number`,inputMode:`numeric`,min:1,max:i,step:1,"data-slot":`${t.slot}-timeout`,value:j,readOnly:!g,disabled:L.isPending,onChange:e=>M(e.target.value),className:`${z} min-h-11 w-28 md:min-h-0`}),(0,w.jsx)(`span`,{children:`seconds`})]}),(0,w.jsx)(m,{type:`button`,variant:`primary`,size:`sm`,className:`min-h-11 self-start md:min-h-0`,"data-action":`${t.slot}-save`,disabled:!g||I||F!==null||L.isPending,onClick:R,children:t.save})]})]})]})}var k=0,A=1e3;function j(){let e=u();return e.isPending?(0,w.jsx)(`p`,{"data-slot":`worktrees-loading`,className:`p-4 text-[13px] text-soft-foreground md:p-6`,children:`Loading worktree settings…`}):e.isError?(0,w.jsx)(g,{icon:(0,w.jsx)(_,{}),tone:`danger`,title:`Worktree settings did not load`,subtitle:e.error.message,heading:`h2`}):(0,w.jsx)(M,{config:e.data})}function M({config:e}){let t=a(),n=l({mutationFn:e=>r(e),onSuccess:e=>t.setQueryData(d.config,e),onError:e=>f(e.message,{tone:`danger`})}),[i,o]=(0,C.useState)(String(e.worktreeRetention)),s=Number(i),c=i.trim()===``||!Number.isInteger(s)||s<k||s>A,u=e.worktreeRetention===(c?-1:s);return(0,w.jsxs)(`div`,{"data-slot":`worktrees-section`,className:`mx-auto flex w-full max-w-2xl flex-col gap-7 p-4 pb-[calc(90px+env(safe-area-inset-bottom))] md:p-6 md:pb-6`,children:[(0,w.jsxs)(x,{title:`Keep N finished worktrees`,hint:`Older finished worktrees are reclaimed to free disk; their branch is kept so the work stays recoverable. 0 = unlimited. In-review and running tasks are never reclaimed, so the count on disk can exceed this.`,children:[(0,w.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,w.jsx)(`input`,{type:`number`,inputMode:`numeric`,min:k,max:A,step:1,"aria-label":`Keep last N finished worktrees`,"data-slot":`resources-worktree-retention`,value:i,disabled:n.isPending,onChange:e=>o(e.target.value),className:`block w-32 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`}),(0,w.jsx)(`span`,{className:`text-xs text-soft-foreground`,children:`worktrees`}),(0,w.jsx)(m,{type:`button`,variant:`primary`,size:`sm`,className:`self-start`,"data-action":`resources-save-retention`,disabled:u||c||n.isPending,onClick:()=>n.mutate({worktreeRetention:s},{onSuccess:()=>{t.invalidateQueries({queryKey:d.worktrees}),f(s===0?`Keeping all worktrees (unlimited)`:`Keeping the last ${s} finished worktree${s===1?``:`s`}`)}}),children:`Save retention`})]}),c?(0,w.jsxs)(`p`,{"data-slot":`resources-retention-invalid`,className:`text-[11px] text-danger`,children:[`Enter a whole number from `,k,` to `,A,` (0 = unlimited).`]}):(0,w.jsx)(`p`,{className:`text-[11px] text-soft-foreground`,children:s===0?`Keeping every finished worktree.`:`Keeping the last ${s} finished worktree${s===1?``:`s`} on disk.`})]}),(0,w.jsx)(O,{config:e,copy:D.setup}),(0,w.jsx)(O,{config:e,copy:D.teardown}),(0,w.jsxs)(h,{to:`/git/cleanup`,"data-slot":`worktrees-manage-link`,className:`inline-flex min-h-11 items-center gap-1 self-start text-[13px] font-medium text-link-foreground hover:underline focus-visible:outline-2 focus-visible:outline-ring md:min-h-0`,children:[`Manage worktrees on Git`,(0,w.jsx)(p,{"aria-hidden":`true`,className:`size-[14px]`})]})]})}export{j as WorktreesSection};
|
package/web/dist/index.html
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
})()
|
|
61
61
|
</script>
|
|
62
|
-
<script type="module" crossorigin src="/assets/index-
|
|
62
|
+
<script type="module" crossorigin src="/assets/index-DfmmHZB9.js"></script>
|
|
63
63
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-QTnfLwEv.js">
|
|
64
64
|
<link rel="modulepreload" crossorigin href="/assets/react-runtime-CCIEwYL0.js">
|
|
65
65
|
<link rel="modulepreload" crossorigin href="/assets/bundle-mjs-rHxsej31.js">
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{i as t,t as n}from"./react-runtime-CCIEwYL0.js";import{c as r,t as i}from"./utils-DSMR_WLb.js";import{J as a,Q as o,X as s,Z as c,_i as l,ci as u,jn as d,qt as f}from"./project-scope-context-DqBHMdSb.js";import{D as p,T as m,Tt as h,in as g,j as _,k as v,s as y,t as b,tn as x,w as S}from"./queries-DeeY9cGJ.js";import{h as ee}from"./chunk-KS7C4IRE-Cg8l-LDN.js";import{n as C}from"./toaster-Bo5vCbz-.js";import{F as w,I as T,X as E,Y as D,c as O,l as k,ot as A,p as j,r as M}from"./design-icons-CzEoMH9c.js";import{t as te}from"./chevron-down-CHGyCDBH.js";import{t as N}from"./chevron-right-BENZ-1ZN.js";import{l as P,n as F}from"./nav-row-styles-DqKjMToI.js";import{a as I,i as L}from"./format-BNCkW110.js";import{t as R}from"./button-BQ2y4XRB.js";import{i as z,r as B,t as V}from"./popover-BPgUYFyu.js";import{r as ne,t as H}from"./project-router-CYJwJlJL.js";import"./attention-D8ku2yDQ.js";import{f as re,v as ie}from"./task-groups-CC8zwSMv.js";import{t as ae}from"./status-dot-DtAOFiIi.js";import{a as oe,o as U,r as se,s as ce,t as le}from"./command-CDt1BsZy.js";import{t as W}from"./centered-state-V15AR_qo.js";import{$t as ue,Cn as de,Ct as fe,Dt as pe,Et as me,St as he,Tt as ge,_t as _e,b as ve,bt as ye,gt as be,ht as xe,mt as Se,ot as Ce,s as we,vt as Te,wt as Ee,xt as G,yt as De}from"./index-CilVqe_c.js";import{a as Oe,d as ke,f as Ae,i as je,l as Me,n as Ne,o as Pe,r as Fe,s as Ie,t as Le,u as K}from"./use-hand-to-agent-state-qYz6wj5e.js";import{t as q}from"./tab-link-Bc33InzJ.js";var J=e(t(),1),Y=`cez-github-list-width`;function X(e){if(e==null||e===``||typeof e==`string`&&e.trim()===``)return 360;let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?Math.min(520,Math.max(280,Math.round(t))):360}function Re(){try{let e=localStorage.getItem(Y);return e===null?360:X(e)}catch{return 360}}function ze(e){try{localStorage.setItem(Y,String(X(e)))}catch{}}var Z=n();function Be({number:e,repo:t}){let n=r();return(0,Z.jsx)(Ve,{number:e,repo:t,scope:n},JSON.stringify([n,t,e]))}function Ve({number:e,repo:t,scope:n}){let r=(0,J.useId)(),i=(0,J.useId)(),[a,o]=(0,J.useState)(!1),s=a?te:N,c=x(n,!0,n==="default"),l=y(`#${e}`,!0),u=(0,J.useMemo)(()=>Ee(ie(c.data??[],l.data?.pages.flatMap(e=>e.runs)??[]),e,t,n),[c.data,l.data,e,t,n]);return(0,Z.jsxs)(`section`,{"aria-labelledby":r,className:`mt-4 min-w-0 rounded-lg border border-border p-3`,children:[(0,Z.jsx)(`h3`,{id:r,className:`text-xs font-semibold text-muted-foreground`,children:(0,Z.jsxs)(`button`,{type:`button`,"aria-expanded":a,"aria-controls":i,onClick:()=>o(e=>!e),className:`flex min-h-11 w-full items-center gap-2 rounded-md px-2 text-left hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,children:[(0,Z.jsx)(s,{"aria-hidden":`true`,className:`size-4 shrink-0`}),(0,Z.jsxs)(`span`,{children:[`Linked tasks`,c.data?` (${u.length}${l.hasNextPage||l.isError?`+`:``})`:``]})]})}),(0,Z.jsx)(`div`,{id:i,children:a?(0,Z.jsxs)(Z.Fragment,{children:[c.isPending?(0,Z.jsx)(`p`,{role:`status`,className:`mt-2 text-xs text-muted-foreground`,children:`Loading linked tasks…`}):null,c.isError?(0,Z.jsxs)(`div`,{className:`mt-2 text-xs text-muted-foreground`,children:[(0,Z.jsx)(`p`,{role:`status`,children:`Couldn’t load linked tasks. Check your connection and try again.`}),(0,Z.jsx)(R,{variant:`outline`,className:`mt-2 min-h-11`,onClick:()=>void c.refetch(),disabled:c.isFetching,children:`Retry linked tasks`})]}):null,c.data&&u.length===0&&!c.isError?(0,Z.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:`No linked tasks yet.`}):null,u.length>0?(0,Z.jsx)(`ul`,{className:`mt-2 flex flex-col gap-1`,children:u.map(e=>{let t=d(e);return(0,Z.jsx)(`li`,{children:(0,Z.jsxs)(H,{to:`/tasks/${encodeURIComponent(e.id)}`,className:`flex min-h-11 min-w-0 flex-col justify-center gap-1 rounded-md px-2 py-2 hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring`,children:[(0,Z.jsx)(`span`,{className:`text-sm font-medium break-words [overflow-wrap:anywhere]`,children:re(e)}),(0,Z.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground`,children:[(0,Z.jsx)(ae,{tone:t.tone,shape:t.shape,pulse:t.pulse,role:`img`,"aria-label":t.label,title:t.label}),e.archived?(0,Z.jsx)(`span`,{className:`rounded border border-border px-1`,children:`Archived`}):null,(0,Z.jsx)(`time`,{dateTime:e.createdAt,children:new Date(e.createdAt).toLocaleDateString()})]})]})},e.id)})}):null,l.isError?(0,Z.jsxs)(`div`,{className:`mt-2 text-xs text-muted-foreground`,children:[(0,Z.jsx)(`p`,{role:`status`,children:`Couldn’t load older archived linked tasks.`}),(0,Z.jsx)(R,{variant:`outline`,className:`mt-2 min-h-11`,onClick:()=>void l.refetch(),disabled:l.isFetching,children:`Retry older linked tasks`})]}):l.hasNextPage?(0,Z.jsx)(R,{variant:`outline`,className:`mt-2 min-h-11`,onClick:()=>void l.fetchNextPage(),disabled:l.isFetchingNextPage,children:l.isFetchingNextPage?`Loading older linked tasks…`:`Show older linked tasks`}):null]}):null})]})}var Q=`w-44 max-w-full`,$=`min-h-11 min-w-11 rounded-md border border-input bg-card px-3 text-sm text-foreground focus-visible:outline-ring disabled:opacity-50`;function He(e,t){let n=new Map;for(let t of e)for(let e of t.assignees??[])n.set(e.toLowerCase(),e);for(let e of t)n.set(e.toLowerCase(),e);return[...n.values()].sort((e,t)=>e.localeCompare(t))}function Ue(e,t){return!!e&&t.length===1&&t[0]?.toLowerCase()===e.toLowerCase()}function We(e){let t=` Previous memberships are shown; issues with unknown membership remain visible.`;return e.projectsState===`refreshing`&&e.projects?`Refreshing project boards.${t}`:e.projectsState===`unavailable`&&e.projects?`${e.projectsReason}${t}`:e.projects?``:e.projectsReason??(e.projectsState===`refreshing`?`Project memberships pending.`:`Project boards unavailable.`)}function Ge(e){return[e.viewerLogin?``:`GitHub login unavailable.`,We(e)].filter(Boolean).join(` `)}function Ke({options:e,assignees:t,onAssigneesChange:n}){return(0,Z.jsxs)(V,{children:[(0,Z.jsx)(z,{asChild:!0,children:(0,Z.jsxs)(`button`,{type:`button`,className:$,disabled:e.length===0,children:[`Assignee`,t.length?` · ${t.length}`:``,(0,Z.jsx)(k,{size:12,"aria-hidden":`true`,className:`ml-1 inline size-3 shrink-0 align-[-1px] text-soft-foreground`})]})}),(0,Z.jsx)(B,{align:`start`,className:`w-64 max-w-[calc(100vw-2rem)] p-2`,children:(0,Z.jsxs)(`fieldset`,{className:`max-h-[min(16rem,var(--radix-popover-content-available-height))] overflow-y-auto`,children:[(0,Z.jsx)(`legend`,{className:`px-2 text-xs text-muted-foreground`,children:`Match any selected assignee`}),e.map(e=>{let r=t.some(t=>t.toLowerCase()===e.toLowerCase());return(0,Z.jsxs)(`label`,{className:`flex min-h-11 cursor-pointer items-center gap-2 rounded px-2 hover:bg-muted`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:r,onChange:()=>n(r?t.filter(t=>t.toLowerCase()!==e.toLowerCase()):[...t,e])}),(0,Z.jsx)(`span`,{className:`break-all text-sm`,children:e})]},e.toLowerCase())})]})})]})}function qe({data:e,projectId:t,onProjectChange:n,pickerRef:r}){return e.projects?.length?(0,Z.jsxs)(`select`,{ref:r,"aria-label":`Project board`,className:`${$} ${Q}`,value:t,onChange:e=>n(e.target.value),children:[(0,Z.jsx)(`option`,{value:``,children:`All boards`}),e.projects.map(e=>(0,Z.jsx)(`option`,{value:e.id,children:e.title},e.id))]}):e.projects||e.projectsState?(0,Z.jsx)(`select`,{ref:r,"aria-label":`Project board`,className:`${$} ${Q}`,disabled:!0,value:``,children:(0,Z.jsx)(`option`,{value:``,children:e.projects?`No boards`:e.projectsState===`refreshing`?`Loading boards…`:`Boards unavailable`})}):null}function Je({data:e,message:t,lastMessage:n,hasMessage:r,statusOpen:i,setStatusOpen:a,triggerRef:o,contentRef:s}){return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`p`,{role:`status`,className:`sr-only`,children:t}),(0,Z.jsxs)(V,{open:i,onOpenChange:a,children:[(0,Z.jsx)(z,{asChild:!0,children:(0,Z.jsx)(`button`,{ref:o,type:`button`,className:`${$} inline-flex items-center justify-center ${t?``:`invisible`}`,"aria-label":`Project board status`,tabIndex:t?void 0:-1,children:e.projectsState===`refreshing`?(0,Z.jsx)(D,{size:14,"aria-hidden":`true`,className:`size-3.5 motion-safe:animate-spin`}):(0,Z.jsx)(A,{size:14,"aria-hidden":`true`,className:`size-3.5`})})}),(0,Z.jsx)(B,{ref:s,align:`start`,"data-slot":`gh-issue-status`,onCloseAutoFocus:e=>{r||e.preventDefault()},className:`w-72 max-w-[calc(100vw-2rem)] p-3 text-xs text-muted-foreground`,children:t||n.current})]})]})}function Ye({data:e,assignees:t,projectId:n,onAssigneesChange:r,onProjectChange:i}){let[a,o]=(0,J.useState)(!1),s=(0,J.useRef)(null),c=(0,J.useRef)(null),l=(0,J.useRef)(null),u=(0,J.useRef)(null),d=He(e.issues,t),f=Ue(e.viewerLogin,t),p=Ge(e),m=p!==``,h=(0,J.useRef)(p);m&&(h.current=p);let g=(0,J.useRef)(!m);g.current=!m;let _=()=>(l.current&&!l.current.disabled?l.current:u.current)?.focus();return(0,J.useEffect)(()=>{let e=s.current;if(!e)return;let t=e=>{g.current&&!e.relatedTarget&&requestAnimationFrame(()=>{(!document.activeElement||document.activeElement===document.body)&&_()})};return e.addEventListener(`blur`,t),()=>e.removeEventListener(`blur`,t)},[]),(0,J.useEffect)(()=>{if(m)return;let e=document.activeElement,t=!!e&&(e===s.current||!!c.current?.contains(e));o(!1),t&&_()},[m]),(0,Z.jsxs)(`div`,{className:`contents`,"data-slot":`gh-issue-filters`,children:[(0,Z.jsx)(Ke,{options:d,assignees:t,onAssigneesChange:r}),(0,Z.jsx)(`button`,{ref:u,type:`button`,className:`${$} aria-pressed:border-foreground aria-pressed:bg-foreground aria-pressed:text-background`,disabled:!e.viewerLogin,"aria-pressed":f,onClick:()=>r(f?[]:[e.viewerLogin]),children:`Assigned to me`}),(0,Z.jsx)(qe,{data:e,projectId:n,onProjectChange:i,pickerRef:l}),(0,Z.jsx)(Je,{data:e,message:p,lastMessage:h,hasMessage:m,statusOpen:a,setStatusOpen:o,triggerRef:s,contentRef:c})]})}function Xe({onRefresh:e,refreshing:t}){let n=Se(r());return(0,Z.jsxs)(`div`,{"data-route":`github`,"data-slot":`github-filter-screen`,className:F,children:[(0,Z.jsxs)(`div`,{className:`mb-[16px] flex items-center gap-[8px]`,children:[(0,Z.jsx)(`h1`,{className:i(P,`min-w-0 flex-1`),children:`GitHub`}),(0,Z.jsx)(`button`,{type:`button`,"data-slot":`gh-screen-refresh`,"aria-label":`Refresh from GitHub`,title:`Refresh from GitHub`,disabled:t,onClick:e,className:`-my-2 -mr-[10px] flex size-11 shrink-0 items-center justify-center rounded-md text-soft-foreground hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring disabled:opacity-60`,children:(0,Z.jsx)(D,{size:17,"aria-hidden":`true`,className:i(`size-[17px]`,t&&`motion-safe:animate-spin`)})})]}),(0,Z.jsx)(xe,{model:n,variant:`screen`})]})}function Ze(e){let t=getComputedStyle(e).overflowY;return t===`auto`||t===`scroll`?e:e.closest(`[data-slot="main"]`)??e}function Qe(e){let[t,n]=(0,J.useState)(null);return(0,J.useLayoutEffect)(()=>{if(!e){n(null);return}let t=()=>n(Ze(e));t();let r=typeof window.matchMedia==`function`?window.matchMedia(`(min-width: 768px)`):null;r?.addEventListener(`change`,t);let i=typeof ResizeObserver>`u`?null:new ResizeObserver(t);return i?.observe(e),()=>{r?.removeEventListener(`change`,t),i?.disconnect()}},[e]),t}function $e(e,t){let[n,r]=(0,J.useState)(0);return(0,J.useLayoutEffect)(()=>{let n=()=>{!e||!t||r(Math.max(0,Math.round(e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop)))};return n(),window.addEventListener(`resize`,n),()=>window.removeEventListener(`resize`,n)},[e,t]),n}function et(e,t,n){let[r,i]=(0,J.useState)(null),a=(0,J.useRef)(n);return(0,J.useEffect)(()=>{a.current=n}),(0,J.useEffect)(()=>{if(!e||!r||!t||typeof IntersectionObserver>`u`)return;let n=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&a.current()},{root:t.getAttribute(`data-slot`)===`main`?null:t,rootMargin:`0px 0px 600px 0px`});return n.observe(r),()=>n.disconnect()},[e,r,t]),i}function tt(e,t,n,r,i){let[a,o]=(0,J.useState)(null),[s,c]=(0,J.useState)(null),l=Qe(a),u=(0,J.useRef)(null);u.current=l;let d=$e(s,l),f=e===`issues`?n?.issues.length??0:n?.prs.length??0,p=t.hasNextPage&&r===null&&f>0;return{listEl:a,setListEl:o,setRowsEl:c,scrollOwner:l,scrollOwnerRef:u,startMargin:d,pagingAvailable:p,manualPaging:p&&i,loadMoreRef:et(p&&!i&&!t.isFetchingNextPage&&!t.isFetchNextPageError,l,()=>void t.fetchNextPage())}}var nt=100;function rt(e,t,n,r,i){if(!e?.available||t!==`prs`)return[];let a=new Set;n!==null&&Number.isInteger(n)&&a.add(n);for(let t of[...r,...i,...e.prs]){if(a.size>=nt)break;a.add(t.number)}return[...a]}function it(e,t,n,r,i,a){let o=rt(n,e,r,i,a),s=S(o,e===`prs`),c=s.data?.available?s.data.checks:void 0,l=m(e===`issues`?`issue`:`pr`,(0,J.useMemo)(()=>(t.data?.pages??[]).map(t=>(e===`issues`?t.issues:t.prs).map(e=>e.number)),[t.data,e]),n?.available===!0&&n.commentsDeferred===!0),u=(0,J.useMemo)(()=>new Set(n?.commentsDeferred?(e===`issues`?n.issues:n.prs).map(e=>e.number):[]),[n,e]);return{checkPrNumbers:o,checksMap:c,commentsOf:e=>l[e.number]??(u.has(e.number)?void 0:e.comments)}}function at(e){let[t,n]=ve(),r=t.get(`filter`),i=ge(e,r);return{rawFilterParam:r,filter:i,activeFilter:i??`all`,setFilterParam:e=>n(t=>{let n=new URLSearchParams(t);return e===null?n.delete(`filter`):n.set(`filter`,e),n})}}function ot(e,t,{filter:n,activeFilter:r,setFilterParam:i}){let[a,o]=(0,J.useState)(``),[s,c]=(0,J.useState)([]),[l,u]=(0,J.useState)([]),{setProjectFilter:d,activeProject:f}=st(t),p=e===`issues`&&r===`assigned`,m=p?t?.viewerLogin?[t.viewerLogin]:[]:l;return{query:a,setQuery:o,labelFilter:s,setLabelFilter:c,setProjectFilter:d,activeProject:f,isAssignedFilter:p,effectiveAssignees:m,changeAssignees:e=>{u(e),p&&i(`all`)},clearFilters:()=>{o(``),c([]),u([]),d(``),n!==null&&n!==`all`&&i(`all`)},filtering:a.trim()!==``||s.length>0||e===`issues`&&(m.length>0||f!==``)||n!==null&&n!==`all`,narrowing:a.trim()!==``||s.length>0||e===`issues`&&(!p&&l.length>0||f!==``)}}function st(e){let[t,n]=(0,J.useState)(``),r=e?.projectsState===`refreshing`||e?.projectsState===`unavailable`,i=r||e?.projects?.some(e=>e.id===t)?t:``;return(0,J.useEffect)(()=>{e&&!r&&t&&!i&&n(``)},[e,t,i,r]),{setProjectFilter:n,activeProject:i}}function ct(e,t,{filter:n,activeFilter:i},a){let o=r(),s=e===`issues`&&(i===`no-task`||i===`has-task`),c=x(o,s,o==="default"),l=(0,J.useMemo)(()=>c.data?fe(c.data,t?.repo,o):null,[c.data,t?.repo,o]),u=he(e,n)?pe(n):null,d=_(`pr`,u??``,u!==null&&t?.available===!0),f=u!==null&&d.data?.available?d.data.items:null,p=(0,J.useMemo)(()=>t?.available?e===`issues`?t.issues:t.prs:[],[t,e]),m=(0,J.useMemo)(()=>f?me(f,p):null,[f,p]),h=lt({view:e,gh:t,activeFilter:i,isAssignedFilter:a,taskFilter:s,taskNumbers:l,runsQuery:c,backedQuery:u,filterHits:f,filterSearch:d});return{backedQuery:u,filterSearch:d,fullList:p,filterRows:m,filterGate:h,openItems:(0,J.useMemo)(()=>h?[]:m??p,[h,m,p]),narrow:(0,J.useMemo)(()=>e===`issues`?i===`no-task`&&l?{excludeNumbers:l}:i===`has-task`&&l?{includeNumbers:l}:{}:i===`mine`&&t?.viewerLogin?{author:t.viewerLogin}:f?{includeNumbers:new Set(f.map(e=>e.number))}:{},[e,i,l,t?.viewerLogin,f])}}function lt({view:e,gh:t,activeFilter:n,isAssignedFilter:r,taskFilter:i,taskNumbers:a,runsQuery:o,backedQuery:s,filterHits:c,filterSearch:l}){return t?.available?(r||e===`prs`&&n===`mine`)&&!t.viewerLogin?{kind:`blocked`,message:`GitHub login unavailable, so this filter cannot be applied.`}:i&&!a?o.isError?{kind:`blocked`,message:`The task list is unavailable, so this filter cannot be applied.`}:{kind:`loading`,message:`Loading tasks…`}:s!==null&&!c?l.data?.available===!1?{kind:`blocked`,message:`GitHub could not be searched: ${l.data.reason??`unknown reason`}.`}:l.isError?{kind:`blocked`,message:`GitHub could not be searched: ${l.error instanceof Error?l.error.message:`the search request failed`}.`}:{kind:`loading`,message:`Searching GitHub…`}:null:null}function ut(e,t){return t?o(t.kind,t.number,{refresh:!0}).then(n=>(e.setQueryData(t.key,n),!0)).catch(()=>!1):Promise.resolve(!0)}function dt(e,t,n,{filterGate:r,filterRows:i,fullList:a}){let o=b.github()[0],s=t===void 0?null:Number.parseInt(t,10),c=!r&&n.data?.available?n.data.items.find(e=>e.number===s):void 0,l=i&&s!==null&&!a.some(e=>e.number===s)?i.find(e=>e.number===s):void 0,u=c??l,[d,f]=(0,J.useState)(null);return(0,J.useEffect)(()=>{u&&f({scope:o,view:e,item:u})},[o,e,u]),{selectedNumber:s,remoteDetail:u??(d?.scope===o&&d.view===e&&d.item.number===s?d.item:null)}}function ft(e,t,n,{fullList:r,filterRows:i},a){let o=u(),s=(0,J.useRef)(null),c=e===`issues`?`issue`:`pr`,l=t?.available===!0&&n!==null&&Number.isSafeInteger(n)&&n>0&&!r.some(e=>e.number===n)&&!i?.some(e=>e.number===n)&&a===null,d=p(c,n??0,l),f=l&&d.data?.available&&d.data.item?.kind===c?d.data.item:null;s.current=l&&n!==null?{kind:c,number:n,key:b.githubItem(c,n)}:null;let[m,h]=(0,J.useState)(!1);return{exactWanted:l,exactItem:d,exactDetail:f,exactTargetRef:s,retryingExact:m,retryExact:()=>{h(!0),ut(o,s.current).then(e=>{h(!1),e||C(`Could not reach GitHub for #${n}`,{tone:`danger`})})}}}function pt(e,t,n){let r=u(),i=(0,J.useRef)(null);return{refresh:g({mutationFn:e=>(ut(r,e),a({refresh:!0,limit:50})),onSuccess:async a=>{await r.cancelQueries({queryKey:b.githubPages(50),exact:!0}),r.setQueryData(b.githubPages(50),{pages:[a],pageParams:[{}]}),r.invalidateQueries({queryKey:b.githubChecks(t)});let o=e===`issues`?`issue`:`pr`,u=(e===`issues`?a.issues:a.prs).map(e=>e.number),d=b.githubCommentCounts(o,u);r.removeQueries({queryKey:b.githubCommentCounts(o,[]).slice(0,4),predicate:e=>e.queryHash!==l(d)}),a.available&&a.commentsDeferred&&u.length>0&&s(o,u,{refresh:!0}).then(e=>r.setQueryData(d,e)).catch(()=>{}),r.invalidateQueries({queryKey:b.githubSearch(e===`issues`?`issue`:`pr`,n)}),r.invalidateQueries({queryKey:b.githubSearch(`pr`,ye)}),r.invalidateQueries({queryKey:b.githubSearch(`pr`,_e)});let f=i.current;if(!f){r.removeQueries({queryKey:[`github`,`comments`]});return}let p=b.githubComments(f.kind,f.number);c(f.kind,f.number,{refresh:!0}).then(e=>r.setQueryData(p,e)).catch(()=>{}),r.removeQueries({queryKey:[`github`,`comments`],predicate:e=>e.queryHash!==l(p)})},onError:e=>C(e.message,{tone:`danger`})}),openThreadRef:i}}var mt=350;function ht(e,t){let[n,r]=(0,J.useState)(e);return(0,J.useEffect)(()=>{let n=setTimeout(()=>r(e),t);return()=>clearTimeout(n)},[e,t]),n}function gt(e,t,{query:n,labelFilter:r,effectiveAssignees:i,activeProject:a},{openItems:o,narrow:s,filterGate:c}){let l=ht(n,mt),u=(0,J.useMemo)(()=>K(o,{query:l,labels:r,...s,...e===`issues`?{assignees:i,projectId:a}:{}}),[o,l,r,e,i,a,s]),d=n.trim()===l.trim(),f=t?.available===!0&&!c&&d&&Ae(l,u),p=_(e===`issues`?`issue`:`pr`,l,f),m=K(o,{query:n,labels:r,...s,...e===`issues`?{assignees:i,projectId:a}:{}}),h=f&&p.data?.available?p.data:null,g=new Set(m.map(e=>e.number)),v=_t(e,h,a,i);return{debouncedQuery:l,searchWanted:f,forgeSearch:p,items:m,searchPayload:h,metadataFailure:v,searchHits:h&&!v?K(h.items,{labels:r,...s,...e===`issues`?{assignees:i,projectId:a}:{}}).filter(e=>!g.has(e.number)):[],...vt(n,d,f,p)}}function _t(e,t,n,r){return e===`issues`&&t?n&&t.items.some(e=>e.projectIds===void 0)?t.projectsReason??`Project board data is incomplete. Refresh to try again.`:r.length&&t.items.some(e=>e.assignees===void 0)?`Assignee data is incomplete. Refresh to try again.`:null:null}function vt(e,t,n,r){return{searching:e.trim()!==``&&!t||n&&r.isPending,searchFailed:n&&(r.data?.available===!1||r.isError),searchFailureReason:r.data?.available===!1?r.data.reason??`unknown reason`:r.error instanceof Error?r.error.message:`the search request failed`}}function yt({width:e,onWidthChange:t}){let n=(0,J.useRef)(null),r=t=>{t.button===0&&(n.current={x:t.clientX,width:e},t.currentTarget.setPointerCapture(t.pointerId),t.preventDefault(),t.currentTarget.focus())},i=e=>{let r=n.current;r&&t(X(r.width+(e.clientX-r.x)))},a=e=>{n.current&&(n.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))};return(0,Z.jsx)(`div`,{"data-slot":`gh-list-resize-handle`,role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the GitHub list`,"aria-valuenow":e,"aria-valuemin":280,"aria-valuemax":520,tabIndex:0,onPointerDown:r,onPointerMove:i,onPointerUp:a,onPointerCancel:a,onKeyDown:n=>{let r=n.key===`ArrowLeft`?e-16:n.key===`ArrowRight`?e+16:n.key===`Home`?280:n.key===`End`?520:null;r!==null&&(n.preventDefault(),t(X(r)))},onDoubleClick:()=>t(360),title:`Drag to resize the GitHub list — double-click to reset`,className:`absolute inset-y-0 -right-[2px] z-20 hidden w-[5px] cursor-col-resize touch-none bg-transparent transition-colors hover:bg-accent-strong/40 focus-visible:bg-accent-strong/60 focus-visible:outline-none md:block`})}function bt({view:e,changes:t=!1,index:n=!1}){let{n:r}=ee(),i=at(e),{rawFilterParam:a,activeFilter:o}=i,s=ue(),{pages:c,data:l}=v(50),u=de(),d=St(),f=Le(),p=xt({index:n,isDesktop:s,rawFilterParam:a,n:r,rememberedView:h().data?.githubView}),m=Ct(l?.available===!0&&!p.filterScreen),[g,_]=(0,J.useState)(!1),y=ot(e,l,i),b=ct(e,l,i,y.isAssignedFilter),x=gt(e,l,y,b),S=dt(e,r,x.forgeSearch,b),C=ft(e,l,S.selectedNumber,b,S.remoteDetail),w=it(e,c,l,S.selectedNumber,x.searchHits,b.openItems),{refresh:T,openThreadRef:E}=pt(e,w.checkPrNumbers,x.debouncedQuery),D=tt(e,c,l,b.backedQuery,y.narrowing);if(p.restorePrs)return(0,Z.jsx)(ne,{to:`/github/prs`,replace:!0});if(!l)return c.isError?(0,Z.jsx)(`div`,{"data-route":`github`,className:`flex min-h-full flex-col`,children:(0,Z.jsx)(W,{icon:(0,Z.jsx)(A,{size:16}),tone:`danger`,title:`Could not load GitHub`,subtitle:c.error.message})}):(0,Z.jsx)(Ce,{});E.current=null;let O=()=>T.mutate(C.exactTargetRef.current);if(p.filterScreen&&l.available)return(0,Z.jsx)(Xe,{onRefresh:O,refreshing:T.isPending});if(!l.available)return(0,Z.jsx)(Ot,{reason:l.reason,refreshing:T.isPending,onRetry:O});let{labelColors:k,labelOptions:j}=wt(l,x.searchPayload,b.openItems,b.fullList),M=Tt({number:S.selectedNumber,items:x.items,searchHits:x.searchHits,fullList:b.fullList,filterRows:b.filterRows,remoteDetail:S.remoteDetail,exactDetail:C.exactDetail});E.current=M?{kind:M.kind,number:M.number}:null;let{linkFilter:te,listPath:N}=Et(e,a,o,s),P={view:e,filter:te,colors:k,selected:M,queued:f.queued,checksMap:w.checksMap,commentsOf:w.commentsOf},F=Dt(e,y,b.filterGate,x);return(0,Z.jsxs)(`div`,{ref:m.routeRef,"data-route":`github`,className:`flex min-h-full flex-col gap-3 px-[18px] pt-[18px] pb-[calc(90px+env(safe-area-inset-bottom))] md:gap-[22px] md:px-7 md:pt-4 md:pb-4`,children:[(0,Z.jsx)(kt,{view:e,activeFilter:o,isDesktop:s,rawFilterParam:a,n:r,gh:l}),(0,Z.jsxs)(`div`,{ref:m.workspaceRef,"data-slot":`gh-workspace`,"data-stacked":m.panesStacked,className:`flex min-h-0 min-w-0 flex-1 flex-col gap-3 md:h-[calc(var(--gh-workspace-height,calc(100dvh-4rem))-1rem)] md:flex-none md:gap-[22px]`,children:[(0,Z.jsxs)(`header`,{"data-slot":`gh-header`,className:`flex shrink-0 flex-col gap-3 bg-background md:gap-[22px]`,children:[(0,Z.jsx)(At,{view:e,isDesktop:s,gh:l,automationsAvailable:u,onSaveView:d,refreshing:T.isPending,onRefresh:O}),(0,Z.jsx)(jt,{view:e,gh:l,filters:y,labelOptions:j,labelColors:k,searchPayload:x.searchPayload})]}),(0,Z.jsxs)(`div`,{"data-slot":`gh-panes`,className:`flex min-h-0 min-w-0 flex-1 flex-col items-start gap-[22px] md:flex-row md:items-stretch md:overflow-hidden`,children:[(0,Z.jsx)(Pt,{view:e,n:r,rows:P,verdict:F,search:x,sidebar:b,list:c,paging:D,width:m.githubListWidth,onWidthChange:m.changeGithubListWidth,expanded:g,onExpandedChange:_}),(0,Z.jsx)(Bt,{view:e,n:r,selected:M,selectedNumber:S.selectedNumber,exact:C,repo:l.repo,rows:P,listPath:N,changes:t,handToAgent:f})]})]})]})}function xt({index:e,isDesktop:t,rawFilterParam:n,n:r,rememberedView:i}){return{filterScreen:e&&!t&&n===null&&r===void 0,restorePrs:e&&t&&n===null&&i===`prs`}}function St(){let e=u();return t=>{e.setQueryData(b.uiState,e=>({...e,githubView:t})),f({githubView:t}).then(t=>e.setQueryData(b.uiState,t)).catch(t=>{C(t instanceof Error?t.message:String(t),{tone:`danger`}),e.invalidateQueries({queryKey:b.uiState})})}}function Ct(e){let[t,n]=(0,J.useState)(Re),[r,i]=(0,J.useState)(!0),a=(0,J.useRef)(null),o=(0,J.useRef)(null);return(0,J.useEffect)(()=>{if(!e)return;let n=a.current,r=o.current,s=n?.closest(`[data-slot="main"]`);if(!n||!r||!s)return;let c=window.matchMedia(`(min-width: 768px)`),l=!1,u=()=>{if(l=c.matches&&r.clientWidth>=t+22+360,i(!l),!l||s.clientHeight<1){n.style.removeProperty(`--gh-workspace-height`);return}n.style.setProperty(`--gh-workspace-height`,`${Math.round(s.clientHeight)}px`)};u();let d=new ResizeObserver(u);d.observe(s),d.observe(r);let f=e=>{if(!l||e.ctrlKey||!e.deltaY||Math.abs(e.deltaX)>Math.abs(e.deltaY)||r.getBoundingClientRect().top<=s.getBoundingClientRect().top+1||!(e.target instanceof Element)||!e.target.closest(`[data-slot="gh-panes"]`))return;e.preventDefault();let t=e.deltaMode===1?16:e.deltaMode===2?s.clientHeight:1;s.scrollTop+=e.deltaY*t};return r.addEventListener(`wheel`,f,{passive:!1}),c.addEventListener(`change`,u),()=>{r.removeEventListener(`wheel`,f),d.disconnect(),c.removeEventListener(`change`,u)}},[e,t]),{githubListWidth:t,changeGithubListWidth:e=>{let t=X(e);n(t),ze(t)},panesStacked:r,routeRef:a,workspaceRef:o}}function wt(e,t,n,r){return{labelColors:{...t?.labelColors,...e.labelColors},labelOptions:Me([...n,...r,...t?.items??[]])}}function Tt({number:e,items:t,searchHits:n,fullList:r,filterRows:i,remoteDetail:a,exactDetail:o}){return e===null?t[0]??n[0]??null:r.find(t=>t.number===e)??i?.find(t=>t.number===e)??a??o??null}function Et(e,t,n,r){let i=t===null?null:n;return{linkFilter:i,listPath:G(e,i??(e===`issues`&&!r?`all`:null))}}function Dt(e,{query:t,filtering:n},r,{searching:i,searchFailed:a,searchFailureReason:o,metadataFailure:s,searchHits:c,searchPayload:l,items:u}){let d=e===`issues`?`issues`:`pull requests`;return r?(0,Z.jsxs)(`p`,{role:`status`,className:`flex items-center gap-1.5`,"data-slot":`gh-filter-gate`,"data-kind":r.kind,children:[r.kind===`loading`?(0,Z.jsx)(I,{"aria-hidden":`true`,className:`size-3.5 motion-safe:animate-spin`}):null,r.message]}):n?i?(0,Z.jsxs)(`p`,{className:`flex items-center gap-1.5`,children:[(0,Z.jsx)(I,{"aria-hidden":`true`,className:`size-3.5 motion-safe:animate-spin`}),`Searching GitHub for “`,t.trim(),`”…`]}):a?c.length>0?(0,Z.jsxs)(`p`,{role:`status`,children:[`Showing previous results. GitHub could not be refreshed: `,o,`. Use Refresh to try again.`]}):u.length>0?(0,Z.jsxs)(`p`,{children:[`GitHub could not be searched: `,o,`.`]}):(0,Z.jsxs)(`p`,{children:[`No open `,d,` match your filter, and GitHub could not be searched: `,o,`.`]}):s?(0,Z.jsxs)(`p`,{role:`status`,children:[`Cannot apply the selected filters to GitHub results: `,s]}):c.length>0?null:l?.truncated?(0,Z.jsx)(`p`,{children:`No matches within GitHub’s first matches. Narrow your search to check more specific results.`}):l&&u.length>0?(0,Z.jsxs)(`p`,{children:[`No additional `,d,` match your filter on GitHub.`]}):l?(0,Z.jsxs)(`p`,{children:[`No `,d,` match your filter — open, closed or merged.`]}):(0,Z.jsxs)(`p`,{children:[`No open `,d,` match your filter.`]}):(0,Z.jsxs)(`p`,{children:[`No open `,d,`.`]})}function Ot({reason:e,refreshing:t,onRetry:n}){return(0,Z.jsx)(`div`,{"data-route":`github`,className:`flex min-h-full flex-col`,children:(0,Z.jsx)(W,{icon:(0,Z.jsx)(T,{}),tone:`neutral`,title:`GitHub is unavailable here`,subtitle:e??`unknown reason`,actions:(0,Z.jsx)(R,{variant:`outline`,"data-action":`gh-retry`,disabled:t,onClick:n,children:`Try again`}),children:(0,Z.jsxs)(`p`,{className:`text-xs leading-relaxed text-soft-foreground`,children:[`The tab needs the `,(0,Z.jsx)(`span`,{className:`font-mono`,children:`gh`}),` CLI, logged in (`,(0,Z.jsx)(`span`,{className:`font-mono`,children:`gh auth login`}),`), and a repo with a GitHub remote. Everything else in Squawk works without it.`]})})})}function kt({view:e,activeFilter:t,isDesktop:n,rawFilterParam:r,n:i,gh:a}){return(0,Z.jsxs)(`div`,{"data-slot":`gh-masthead`,className:`flex min-w-0 shrink-0 flex-col gap-1 md:flex-row md:items-baseline md:gap-3`,children:[(0,Z.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight md:text-[15px] md:tracking-normal`,children:n?`${e===`issues`?`Issues`:`Pull requests`} · ${be[t]}`:`GitHub`}),r!==null&&i===void 0?(0,Z.jsxs)(`div`,{"data-slot":`gh-filter-context`,className:`flex min-w-0 items-center gap-3 md:hidden`,children:[(0,Z.jsxs)(H,{to:`/github`,"data-slot":`gh-back-filters`,className:`inline-flex min-h-11 items-center gap-1.5 text-xs font-medium text-muted-foreground hover:text-foreground`,children:[(0,Z.jsx)(M,{size:16,"aria-hidden":`true`,className:`size-3.5`}),`Back to filters`]}),t===`all`?null:(0,Z.jsx)(`span`,{"data-slot":`gh-active-filter`,className:`truncate text-xs text-soft-foreground`,children:[...Te,...De].find(e=>e.id===t)?.label})]}):null,a.repo?(0,Z.jsxs)(`span`,{className:`min-w-0 truncate text-[13px] text-muted-foreground md:text-[11px] md:text-soft-foreground`,children:[(0,Z.jsx)(`span`,{"data-slot":`gh-repo`,children:a.repo}),(0,Z.jsxs)(`span`,{"data-slot":`gh-synced`,children:[` · `,a.syncedAt?`Synced ${L(a.syncedAt)} ago`:`Not synced yet`]})]}):null]})}function At({view:e,isDesktop:t,gh:n,automationsAvailable:r,onSaveView:a,refreshing:o,onRefresh:s}){return(0,Z.jsxs)(`div`,{"data-slot":`gh-tabs`,className:`flex min-h-11 flex-wrap items-center gap-3`,children:[(0,Z.jsxs)(q,{to:t?`/github`:`/github?filter=all`,active:e===`issues`,onClick:()=>a(`issues`),children:[`Issues · `,n.issuesTotal??n.issues.length]}),(0,Z.jsxs)(q,{to:`/github/prs`,active:e===`prs`,onClick:()=>a(`prs`),children:[`Pull requests · `,n.prsTotal??n.prs.length]}),r?(0,Z.jsx)(H,{to:`/automations/new`,className:`gh-utility`,children:`Set up automations`}):null,(0,Z.jsxs)(`button`,{type:`button`,"data-slot":`gh-refresh`,title:`Refresh from GitHub`,disabled:o,onClick:s,className:`gh-utility`,children:[(0,Z.jsx)(D,{size:16,"aria-hidden":`true`,className:i(`size-3.5`,o&&`motion-safe:animate-spin`)}),`Refresh`]})]})}function jt({view:e,gh:t,filters:n,labelOptions:r,labelColors:i,searchPayload:a}){return(0,Z.jsxs)(`div`,{"data-slot":`gh-filter-toolbar`,className:`flex flex-wrap items-center gap-2.5`,children:[(0,Z.jsxs)(`div`,{className:`relative min-w-0 basis-full md:flex-1 md:basis-auto`,children:[(0,Z.jsx)(E,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2 text-soft-foreground`}),(0,Z.jsx)(`input`,{type:`search`,"data-slot":`gh-search`,"aria-label":`Search ${e}`,placeholder:e===`issues`?`Filter issues…`:`Filter pull requests…`,value:n.query,onChange:e=>n.setQuery(e.target.value),className:`min-h-11 w-full rounded-md border border-input bg-card py-1 pr-2 pl-7 text-[13px] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`})]}),(0,Z.jsx)(Kt,{options:r,colors:i,selected:n.labelFilter,onChange:n.setLabelFilter}),e===`issues`?(0,Z.jsx)(Ye,{data:{...t,issues:[...t.issues,...a?.items??[]]},assignees:n.effectiveAssignees,projectId:n.activeProject,onAssigneesChange:n.changeAssignees,onProjectChange:n.setProjectFilter}):null,(0,Z.jsx)(`button`,{type:`button`,disabled:!n.filtering,className:`min-h-11 min-w-11 rounded-md border border-border bg-card px-4 text-xs disabled:opacity-50`,onClick:n.clearFilters,children:`Clear filters`})]})}function Mt(e,t){return e.kind===`pr`?t?.[e.number]??e.checks:e.checks}function Nt(e,t){return(0,Z.jsx)(Gt,{item:e,view:t.view,filter:t.filter,colors:t.colors,active:t.selected?.url===e.url,queued:t.queued.has(e.url),checks:Mt(e,t.checksMap),comments:t.commentsOf(e)})}function Pt({view:e,n:t,rows:n,verdict:r,search:i,sidebar:a,list:o,paging:s,width:c,onWidthChange:l,expanded:u,onExpandedChange:d}){let{items:f,searchHits:p}=i,m=e===`issues`&&t!==void 0&&!u;return(0,Z.jsxs)(`section`,{ref:s.setListEl,"data-slot":`gh-list`,"data-mobile-preview":m||void 0,style:{"--github-list-width":`${c}px`},className:`relative flex w-full min-h-0 min-w-0 flex-col rounded-lg border border-border bg-card p-3 md:w-[var(--github-list-width)] md:shrink-0 md:overflow-x-hidden md:overflow-y-auto`,children:[f.length===0?r&&(0,Z.jsx)(`div`,{"data-slot":`gh-empty`,className:`px-4 py-4 text-sm text-soft-foreground`,children:r}):(0,Z.jsx)(Ft,{items:f,rows:n,compactPreview:m,paging:s}),s.pagingAvailable?(0,Z.jsx)(It,{view:e,list:o,paging:s}):null,(0,Z.jsx)(Lt,{backedQuery:a.backedQuery,filterSearch:a.filterSearch}),(0,Z.jsx)(Rt,{view:e,n:t,count:f.length,expanded:u,onExpandedChange:d}),f.length>0&&i.searchWanted&&r?(0,Z.jsx)(`div`,{"data-slot":`gh-search-status`,role:`status`,className:`px-4 py-4 text-sm text-soft-foreground`,children:r}):null,p.length>0?(0,Z.jsx)(zt,{hits:p,searchPayload:i.searchPayload,rows:n}):null,(0,Z.jsx)(yt,{width:c,onWidthChange:l})]})}function Ft({items:e,rows:t,compactPreview:n,paging:r}){let{setRowsEl:i,scrollOwner:a,listEl:o,scrollOwnerRef:s,startMargin:c}=r,l=e.map((e,r)=>(0,Z.jsx)(`div`,{role:`listitem`,"data-slot":`gh-row-item`,"data-divided":r>0||void 0,"data-compact-hidden":n&&r>=2&&t.selected?.url!==e.url||void 0,children:Nt(e,t)},e.url));return(0,Z.jsx)(`div`,{ref:i,"data-slot":`gh-rows`,"data-virtualized":a?`true`:void 0,role:`list`,children:a?(0,Z.jsx)(we,{scrollRef:s,startMargin:c,children:l},a===o?`list`:`main`):l})}function It({view:e,list:t,paging:n}){return(0,Z.jsx)(`div`,{ref:n.loadMoreRef,"data-slot":`gh-load-more`,className:`flex min-h-6 items-center justify-center gap-1.5 px-4 pb-3 text-xs text-soft-foreground`,children:t.isFetchingNextPage?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(I,{"aria-hidden":`true`,className:`size-3.5 motion-safe:animate-spin`}),`Loading more…`]}):t.isFetchNextPageError?(0,Z.jsxs)(Z.Fragment,{children:[`Could not load more.`,(0,Z.jsx)(`button`,{type:`button`,"data-slot":`gh-load-more-retry`,onClick:()=>void t.fetchNextPage(),className:`font-medium text-accent-text hover:underline`,children:`Retry`})]}):n.manualPaging?(0,Z.jsxs)(Z.Fragment,{children:[`Filters cover the loaded `,e===`issues`?`issues`:`pull requests`,`.`,(0,Z.jsx)(`button`,{type:`button`,"data-slot":`gh-load-more-manual`,onClick:()=>void t.fetchNextPage(),className:`font-medium text-accent-text hover:underline`,children:`Load more`})]}):null})}function Lt({backedQuery:e,filterSearch:t}){return e!==null&&t.data?.available&&t.data.truncated?(0,Z.jsxs)(`div`,{"data-slot":`gh-filter-note`,role:`status`,className:`px-4 py-3 text-xs text-soft-foreground`,children:[`Showing the first `,t.data.items.length,` matches from GitHub search; more may exist.`]}):null}function Rt({view:e,n:t,count:n,expanded:r,onExpandedChange:i}){return e===`issues`&&t!==void 0&&n>2?(0,Z.jsx)(R,{variant:`outline`,className:`mt-2 self-start md:hidden`,"data-slot":`gh-expand-list`,"aria-expanded":r,onClick:()=>i(e=>!e),children:r?`Show fewer issues`:`View all ${n} issues`}):null}function zt({hits:e,searchPayload:t,rows:n}){return(0,Z.jsxs)(`div`,{"data-slot":`gh-search-hits`,children:[(0,Z.jsxs)(`p`,{className:`px-4 pt-2 pb-1 text-[11px] font-medium tracking-wide text-soft-foreground uppercase`,children:[`Found on GitHub`,t?.truncated?` (first matches)`:``]}),(0,Z.jsx)(`ul`,{className:`flex flex-col gap-0.5 px-2 pb-2`,children:e.map(e=>(0,Z.jsx)(`li`,{children:Nt(e,n)},e.url))})]})}function Bt({view:e,n:t,selected:n,selectedNumber:r,exact:a,repo:o,rows:s,listPath:c,changes:l,handToAgent:u}){let{exactWanted:d,exactItem:f}=a;return(0,Z.jsx)(`section`,{"data-slot":`gh-detail`,className:i(`w-full min-w-0 min-h-0 flex-1 flex-col rounded-lg border border-border bg-card md:overflow-y-auto`,t===void 0?`hidden md:flex`:`flex`),children:n?(0,Z.jsx)(Vt,{item:n,n:t,repo:o,rows:s,listPath:c,changes:l,handToAgent:u}):d&&f.isPending?(0,Z.jsx)(`div`,{"data-slot":`gh-detail-loading`,className:`flex min-h-full flex-1 flex-col`,children:(0,Z.jsx)(W,{icon:(0,Z.jsx)(I,{className:`motion-safe:animate-spin`}),tone:`neutral`,heading:`h2`,title:`Loading #${r}…`,subtitle:`It is not among the open items, so the tab is asking GitHub for it.`})}):d&&(f.isError||f.data?.available===!1)?(0,Z.jsx)(Ht,{number:r,exact:a}):(0,Z.jsx)(Ut,{view:e,number:r})})}function Vt({item:e,n:t,repo:n,rows:r,listPath:i,changes:a,handToAgent:o}){let{workflows:s,skillList:c,workflow:l,setWorkflow:u,selectedSkills:d,setSelectedSkills:f,engine:p,setEngine:m,queued:h,onQueued:g}=o;return(0,Z.jsx)(Pe,{item:e,comments:r.commentsOf(e),afterHeading:e.kind===`issue`?(0,Z.jsx)(Be,{number:e.number,repo:n},t??`list`):void 0,backLink:{to:i},subNav:{filter:r.filter,changes:a},onRunAgent:Wt,colors:r.colors,checks:Mt(e,r.checksMap),children:(0,Z.jsx)(Ne,{item:e,workflows:s.data?.workflows??[],skills:c,workflow:l,onWorkflowChange:u,selectedSkills:d,onSkillsChange:f,engine:p,onEngineChange:m,queuedRunId:h.get(e.url)??null,onQueued:g},e.url)})}function Ht({number:e,exact:t}){let{exactItem:n,retryingExact:r,retryExact:i}=t;return(0,Z.jsx)(W,{icon:(0,Z.jsx)(A,{size:16}),tone:n.isError?`danger`:`neutral`,heading:`h2`,title:`Could not load #${e}`,subtitle:n.data?.available===!1?n.data.reason:n.error instanceof Error?n.error.message:`The request failed.`,actions:(0,Z.jsx)(R,{variant:`outline`,disabled:r,onClick:i,children:`Retry`})})}function Ut({view:e,number:t}){return(0,Z.jsx)(W,{icon:e===`issues`?(0,Z.jsx)(j,{size:16}):(0,Z.jsx)(w,{size:16}),tone:`neutral`,heading:`h2`,title:t===null?`Nothing selected`:`Not found`,subtitle:t===null?`No open ${e===`issues`?`issues`:`pull requests`} to show.`:`#${t} is not among the open ${e===`issues`?`issues`:`pull requests`}. Search for ${t} above to look it up on GitHub, closed and merged included.`})}function Wt(){let e=document.querySelector(`[data-slot="gh-detail-inner"] [data-slot="gh-custom-prompt"]`);e?.scrollIntoView({block:`center`}),e?.focus({preventScroll:!0})}function Gt({item:e,view:t,filter:n,colors:r,active:a,queued:o,checks:s,comments:l}){let d=e.kind===`issue`?j:w,f=u(),p=()=>{f.prefetchQuery({queryKey:b.githubComments(e.kind,e.number),queryFn:({signal:t})=>c(e.kind,e.number,{},{signal:t}),staleTime:6e4})};return(0,Z.jsxs)(H,{to:G(t,n,e.number),draggable:!0,onDragStart:t=>{try{t.dataTransfer.setData(`text/plain`,Fe(e)),t.dataTransfer.effectAllowed=`copy`}catch{}},onMouseEnter:p,onFocus:p,"data-slot":`gh-row`,"data-number":e.number,"data-kind":e.kind,"aria-current":a?`page`:void 0,title:`Drag into the composer to prefill a task`,className:i(`flex flex-col gap-2 rounded-md px-3 py-4 transition-colors hover:bg-muted`,a&&`bg-accent-strong/10 text-accent-text`),children:[(0,Z.jsxs)(`span`,{className:`flex min-w-0 items-start gap-2 md:items-center`,children:[(0,Z.jsx)(d,{"aria-hidden":`true`,"data-slot":`gh-row-icon`,className:i(`mt-0.5 size-3.5 shrink-0 md:mt-0`,e.kind===`issue`?`text-success`:`text-accent-icon`)}),(0,Z.jsx)(`span`,{"data-slot":`gh-row-title`,className:i(`line-clamp-2 min-w-0 text-[13px] font-medium md:block md:truncate`,a&&`font-semibold`),children:e.title})]}),(0,Z.jsxs)(`span`,{"data-slot":`gh-row-meta`,className:`flex flex-wrap items-center gap-x-2 gap-y-1 pl-[22px] font-mono text-[11px] text-muted-foreground md:flex-nowrap md:gap-y-0`,children:[(0,Z.jsxs)(`span`,{children:[`#`,e.number]}),(0,Z.jsx)(`span`,{"data-slot":`gh-row-author`,className:`max-w-full shrink-0 truncate md:min-w-0 md:shrink`,children:e.author}),(0,Z.jsx)(`span`,{children:L(e.createdAt)}),(0,Z.jsx)(Oe,{count:l}),s?(0,Z.jsx)(je,{checks:s}):null,o?(0,Z.jsx)(`span`,{"data-slot":`gh-queued-flag`,className:`font-sans font-medium text-accent-text`,children:`↗ run queued`}):null]}),e.labels.length>0?(0,Z.jsx)(`span`,{"data-slot":`gh-row-labels`,className:`flex flex-wrap gap-1 pl-[22px]`,children:e.labels.map(e=>(0,Z.jsx)(Ie,{label:e,color:r[e],plain:!0},e))}):null]})}function Kt({options:e,colors:t,selected:n,onChange:r}){let[a,o]=(0,J.useState)(!1),s=e=>r(n.includes(e)?n.filter(t=>t!==e):[...n,e]);return(0,Z.jsxs)(V,{open:a,onOpenChange:o,children:[(0,Z.jsx)(z,{asChild:!0,children:(0,Z.jsxs)(`button`,{type:`button`,"data-slot":`gh-label-filter`,disabled:e.length===0,className:i(`flex min-h-11 min-w-11 shrink-0 items-center gap-1 rounded-md border border-input bg-card px-2 py-1 text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground disabled:opacity-50`,n.length>0&&`border-accent-strong/60 text-foreground`),children:[n.length>0?`Labels · ${n.length}`:`Labels`,(0,Z.jsx)(k,{size:12,"aria-hidden":`true`,className:`size-3 shrink-0 text-soft-foreground`})]})}),(0,Z.jsx)(B,{align:`end`,sideOffset:6,className:`w-60 p-0`,children:(0,Z.jsxs)(le,{children:[(0,Z.jsx)(oe,{placeholder:`Filter labels…`}),(0,Z.jsxs)(ce,{className:`max-h-[min(16rem,calc(var(--radix-popover-content-available-height)-3rem))]`,children:[(0,Z.jsx)(se,{children:`No labels.`}),n.length>0?(0,Z.jsxs)(U,{value:`__clear__`,onSelect:()=>r([]),className:`min-h-11 text-soft-foreground`,children:[`Clear `,n.length,` filter`,n.length>1?`s`:``]}):null,e.map(e=>{let r=n.includes(e);return(0,Z.jsxs)(U,{value:e,onSelect:()=>s(e),className:`min-h-11`,children:[(0,Z.jsx)(`span`,{"aria-hidden":`true`,className:`size-2.5 shrink-0 rounded-full border`,style:ke(t[e])}),(0,Z.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e}),r?(0,Z.jsx)(O,{size:16,"aria-hidden":`true`,className:`size-3.5 shrink-0 text-link-foreground`}):null]},e)})]})]})})]})}export{bt as GithubRoute};
|