@wjarka/cezarion 0.18.0-dev.7909 → 0.18.0-dev.7917
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-C7qacMAX.js → accounts-section-BvrCdhB1.js} +1 -1
- package/web/dist/assets/activity-motion-CyQUo8rH.js +2 -0
- package/web/dist/assets/{activity-route-DkSc-BB_.js → activity-route-BZPRmiNI.js} +1 -1
- package/web/dist/assets/{agent-config-section-DBqtxqrI.js → agent-config-section-DEeDIcK_.js} +1 -1
- package/web/dist/assets/{agent-defaults-section-AHmatJKy.js → agent-defaults-section-RYnao4vB.js} +1 -1
- package/web/dist/assets/{appearance-Uyrw7pjm.js → appearance-obeD0TrH.js} +1 -1
- package/web/dist/assets/{archive-on-merge-field-w_cfxV6m.js → archive-on-merge-field-DP12N-QW.js} +1 -1
- package/web/dist/assets/attention-CSFsCoi5.js +1 -0
- package/web/dist/assets/automations-route-bJYe7JKX.js +1 -0
- package/web/dist/assets/{commit-diff-panel-Ba-6F5So.js → commit-diff-panel-yCI8kY--.js} +1 -1
- package/web/dist/assets/{diff-D3RVmX07.js → diff-B9wl20YA.js} +2 -2
- package/web/dist/assets/{diff-view-CYIMlq04.js → diff-view-C-HieogW.js} +1 -1
- package/web/dist/assets/{file-preview-jj3RWAaW.js → file-preview-BzialgZg.js} +1 -1
- package/web/dist/assets/{folder-browser-CH0gdxd-.js → folder-browser-B8_lzQT7.js} +1 -1
- package/web/dist/assets/{git-toolbar-BOaq9GcR.js → git-toolbar-lvqVHT9o.js} +1 -1
- package/web/dist/assets/{github-wkggyCqa.js → github-CQhVzG31.js} +1 -1
- package/web/dist/assets/{global-activity-route-BTrelHAD.js → global-activity-route-Cnk7K6kB.js} +1 -1
- package/web/dist/assets/index-D0DvUgTj.js +21 -0
- package/web/dist/assets/{label-D6DhdNb7.js → label-CYqEyapm.js} +1 -1
- package/web/dist/assets/{markdown-i80v6qNq.js → markdown-BLWEExIH.js} +1 -1
- package/web/dist/assets/{notifications-section-GGsdkedq.js → notifications-section-Ci4iCnOt.js} +1 -1
- package/web/dist/assets/{open-in-menu-DgScIVvr.js → open-in-menu-JhT-c8K6.js} +1 -1
- package/web/dist/assets/preview-pane-connected-COUwLzj1.js +3 -0
- package/web/dist/assets/{project-location-4UN0Eqf-.js → project-location-BMreyTgv.js} +1 -1
- package/web/dist/assets/{project-router-UyyzK1j2.js → project-router-DG3CwEiO.js} +1 -1
- package/web/dist/assets/project-scope-context-BairiAvs.js +4 -0
- package/web/dist/assets/{projects-section-DjeKfkRK.js → projects-section-I4Umh57f.js} +1 -1
- package/web/dist/assets/{prompt-templates-section-CPH3RU9O.js → prompt-templates-section-Byinr-jH.js} +1 -1
- package/web/dist/assets/queries-bg9YtgmX.js +1 -0
- package/web/dist/assets/{reference-chip-DGOmeh0l.js → reference-chip-Bphmq8DU.js} +1 -1
- package/web/dist/assets/{remote-settings-notice-BFDdo8X5.js → remote-settings-notice-CcYe1mbK.js} +1 -1
- package/web/dist/assets/{repo-git-PaJ9uJ6o.js → repo-git-tmqJIA3Y.js} +1 -1
- package/web/dist/assets/{report-reader-DDDg-Iyz.js → report-reader-GE7zBDlE.js} +1 -1
- package/web/dist/assets/{reports-DRSGsu5b.js → reports-Dzd6o31r.js} +1 -1
- package/web/dist/assets/{resources-section-Dwx13rfP.js → resources-section-D6yjk2_7.js} +1 -1
- package/web/dist/assets/run-header-Cc5Flvc9.js +2 -0
- package/web/dist/assets/{runners-BFhbiSKy.js → runners-GyEIYtzT.js} +1 -1
- package/web/dist/assets/settings-agent-picker-gDWJBt2q.js +1 -0
- package/web/dist/assets/{settings-shell-De1IxHYf.js → settings-shell-1kV0mCGg.js} +1 -1
- package/web/dist/assets/{sidebar-section-CYKz48EO.js → sidebar-section-bytwajV6.js} +1 -1
- package/web/dist/assets/skills-oC915Joa.js +1 -0
- package/web/dist/assets/{tab-link-BmEGnV4R.js → tab-link-BrrGCBYJ.js} +1 -1
- package/web/dist/assets/{task-changes-CvbqO0ug.js → task-changes-CgEF750z.js} +1 -1
- package/web/dist/assets/{task-commits-kVuYqkqB.js → task-commits-CmewNVBz.js} +1 -1
- package/web/dist/assets/{task-files-DOFkMbFg.js → task-files-x0fUUNIG.js} +1 -1
- package/web/dist/assets/{task-github-item-13sbVXYb.js → task-github-item-DuwLqcE4.js} +1 -1
- package/web/dist/assets/{task-groups-Dc7pXgaS.js → task-groups-Ccol3P2t.js} +1 -1
- package/web/dist/assets/task-thread-DkgKDQSG.js +9 -0
- package/web/dist/assets/{tasks-table-lb5Dy-8O.js → tasks-table-CbfBNxAB.js} +1 -1
- package/web/dist/assets/{thread-state-BwzJmXzv.js → thread-state-Nzl4pHXB.js} +1 -1
- package/web/dist/assets/use-hand-to-agent-state-BMWlCZBX.js +1 -0
- package/web/dist/assets/{useInfiniteQuery-rgb-nitU.js → useInfiniteQuery-C8q14xTE.js} +1 -1
- package/web/dist/assets/useQuery-Berjv5Ts.js +1 -0
- package/web/dist/assets/{workflows-35bEvVkH.js → workflows-BV5oZdB_.js} +3 -3
- package/web/dist/assets/{workspace-tools-Bw4MyHOW.js → workspace-tools-NWKvRhWg.js} +1 -1
- package/web/dist/assets/{worktrees-section-CLwPLrl2.js → worktrees-section--MUxuXUq.js} +4 -4
- package/web/dist/assets/{ws-D3-jE1IB.js → ws-BYbBRDfC.js} +1 -1
- package/web/dist/index.html +15 -15
- package/web/dist/assets/activity-motion-CkAbct6K.js +0 -2
- package/web/dist/assets/attention-BMiaqJnx.js +0 -1
- package/web/dist/assets/automations-route-BBzRefYM.js +0 -1
- package/web/dist/assets/index-CRfojAQ1.js +0 -21
- package/web/dist/assets/preview-pane-connected-B3mexb-I.js +0 -3
- package/web/dist/assets/project-scope-context-BRvkKGX1.js +0 -4
- package/web/dist/assets/queries-CQWAcH8p.js +0 -1
- package/web/dist/assets/run-header-q5egOxrK.js +0 -2
- package/web/dist/assets/settings-agent-picker-YO8UtetZ.js +0 -1
- package/web/dist/assets/skills-hTBIyeAr.js +0 -1
- package/web/dist/assets/task-thread-B0d0xyLV.js +0 -9
- package/web/dist/assets/use-hand-to-agent-state-wRTXiZqE.js +0 -1
- package/web/dist/assets/useQuery-SVV6EtG7.js +0 -1
|
@@ -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{n as r,t as i}from"./utils-DSMR_WLb.js";import{C as a,Dr as o,Er as s,Ln as c,Nt as l,et as u,qt as d,r as f,ti as p,tt as m}from"./project-scope-context-BRvkKGX1.js";import{A as h,E as g,Gt as _,J as v,Pt as y,Tt as b,Yt as x,Z as S,kt as C,p as w,t as T}from"./queries-CQWAcH8p.js";import{t as E}from"./useQuery-SVV6EtG7.js";import{n as D}from"./toaster-Bo5vCbz-.js";import{s as O}from"./runners-BFhbiSKy.js";import{Y as k,c as A,ct as j,ft as M,g as N,it as ee,k as P,l as F,m as I,ot as L,r as te,tt as R,u as ne,ut as re,y as ie}from"./design-icons-CzEoMH9c.js";import{t as z}from"./external-link-BE6y205O.js";import{t as ae}from"./eye-B8okNWXU.js";import{a as oe,i as B}from"./format-BNCkW110.js";import{t as se}from"./message-square-B-MD-8rD.js";import{t as ce}from"./play-CmVAj_fu.js";import{t as V}from"./button-BQ2y4XRB.js";import{i as le,r as ue,t as de}from"./popover-BPgUYFyu.js";import{a as fe,i as pe,o as me,r as he,s as ge,t as _e}from"./dialog-BVF6dIeS.js";import{t as H}from"./project-router-UyyzK1j2.js";import{a as ve,i as U,o as W,r as ye,s as be,t as xe}from"./command-CDt1BsZy.js";import{d as Se,f as G,i as Ce,o as we,p as Te,s as Ee,t as De,u as Oe}from"./skills-pM_PouEs.js";import{F as ke,G as Ae,H as je,I as Me,J as Ne,K,L as Pe,Ln as q,M as Fe,N as Ie,P as Le,Q as Re,St as J,V as ze,W as Be,Y as Ve,Z as He,Zn as Ue,at as We,et as Ge,it as Ke,j as qe,q as Je,rt as Ye,tt as Xe}from"./index-CRfojAQ1.js";import{t as Ze}from"./markdown-i80v6qNq.js";import{t as Qe}from"./textarea-vJt9undk.js";import{t as $e}from"./diff-D3RVmX07.js";import{t as et}from"./tab-link-BmEGnV4R.js";var Y=e(t(),1),X=n(),tt={squash:`Squash and merge`,merge:`Create a merge commit`,rebase:`Rebase and merge`};function Z({state:e}){let t=`size-4 shrink-0`;return e===`passing`?(0,X.jsx)(A,{size:16,"aria-hidden":`true`,"data-slot":`gh-merge-status-passing`,className:i(t,`text-success`)}):e===`failing`?(0,X.jsx)(N,{size:16,"aria-hidden":`true`,"data-slot":`gh-merge-status-failing`,className:i(t,`text-danger`)}):e===`pending`?(0,X.jsx)(oe,{"aria-hidden":`true`,"data-slot":`gh-merge-status-pending`,className:i(t,`animate-spin text-warning`)}):(0,X.jsx)(I,{size:16,"aria-hidden":`true`,"data-slot":`gh-merge-status-unknown`,className:i(t,`text-soft-foreground`)})}function nt(e){return e?.available?e.mergeState:null}function rt(e,t){return e&&t?.methods.includes(e)?e:t?.defaultMethod??t?.methods[0]??null}function it(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 at(e){return e===`approved`||e===`not-required`?`passing`:e===`unknown`?`unknown`:`failing`}function ot(e){return e===`mergeable`?`passing`:e===`conflicting`?`failing`:`unknown`}function st(e){return e===`conflicting`?`present`:e===`mergeable`?`none`:`unknown`}function ct(e){return e===!0?` · required`:e===null?` · requiredness unknown`:``}function lt(e){return e?.available===!1?e.reason:`GitHub could not load merge requirements.`}function ut(e,t,n){return!!(e&&(t.canMerge||t.canOverride&&n))}function Q(e){return e?tt[e]:`Merge`}function dt(e){return e===`conflicting`?`true`:void 0}function ft({check:e}){return(0,X.jsxs)(`li`,{className:`flex items-center justify-between gap-3`,children:[(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,X.jsx)(Z,{state:e.state}),(0,X.jsxs)(`span`,{children:[e.name,` · `,e.state,ct(e.required)]})]}),e.url&&r(e.url)?(0,X.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`text-muted-foreground underline`,children:`details`}):null]})}function pt({reason:e}){return(0,X.jsxs)(`section`,{"data-slot":`gh-merge-unavailable`,className:`mt-6 rounded-lg border border-border bg-card p-4 text-sm`,children:[(0,X.jsx)(`p`,{className:`font-medium`,children:`Merge status unavailable`}),(0,X.jsx)(`p`,{className:`mt-1 text-xs text-soft-foreground`,children:e})]})}function mt({state:e,selectedMethod:t,overrideRules:n,mergeEnabled:r,refreshPending:a,onRefresh:o,onRunAgent:s,onConfirm:c,onMethodChange:l,onOverrideChange:u}){let d=it(e),f=at(e.reviewDecision),p=ot(e.mergeable);return(0,X.jsxs)(`div`,{className:`flex items-start gap-3`,children:[e.canMerge?(0,X.jsx)(A,{size:16,"aria-hidden":`true`,className:`mt-0.5 size-5 shrink-0 text-success`}):(0,X.jsx)(L,{size:16,"aria-hidden":`true`,className:`mt-0.5 size-5 shrink-0 text-warning`}),(0,X.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,X.jsx)(`h3`,{className:`font-semibold`,children:d}),(0,X.jsxs)(V,{type:`button`,variant:`ghost`,size:`sm`,disabled:a,onClick:o,children:[(0,X.jsx)(k,{size:16,"aria-hidden":`true`,className:i(`size-3.5`,a&&`animate-spin`)}),`Refresh`]})]}),(0,X.jsxs)(`p`,{className:`mt-1 font-mono text-[11px] text-soft-foreground`,children:[e.headRef,` (`,e.headSha.slice(0,7),`) → `,e.baseRef]}),(0,X.jsxs)(`ul`,{className:`mt-3 space-y-2 text-xs`,children:[(0,X.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(Z,{state:f}),(0,X.jsxs)(`span`,{children:[`Reviews: `,e.reviewDecision.replaceAll(`-`,` `)]})]}),(0,X.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,X.jsx)(Z,{state:p}),(0,X.jsxs)(`span`,{children:[`Conflicts: `,st(e.mergeable)]})]}),e.checks.length===0?(0,X.jsx)(`li`,{children:`No checks configured`}):e.checks.map(e=>(0,X.jsx)(ft,{check:e},e.name)),e.blockers.map(e=>(0,X.jsx)(`li`,{className:`text-soft-foreground`,children:e.message},e.code))]}),e.mergeable===`conflicting`&&s?(0,X.jsx)(V,{className:`mt-4`,onClick:s,children:`Run agent on this PR`}):null,e.canOverride?(0,X.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,X.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>u(e.target.checked),className:`mt-0.5 size-4 accent-accent-strong`}),(0,X.jsxs)(`span`,{children:[(0,X.jsx)(`span`,{className:`block font-medium`,children:`Merge without waiting for requirements`}),(0,X.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,X.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,X.jsxs)(`div`,{className:`mt-4 flex flex-col flex-wrap gap-2 sm:flex-row`,children:[(0,X.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,X.jsx)(`option`,{value:e,children:tt[e]},e))}),(0,X.jsx)(V,{disabled:!r,onClick:c,children:Q(t)})]}):null]})]})}function ht({number:e,state:t,selectedMethod:n,confirming:r,overrideRules:i,mergePending:a,mergeError:o,onOpenChange:s,onMerge:c}){return(0,X.jsx)(_e,{open:r,onOpenChange:s,children:(0,X.jsxs)(he,{"data-slot":`gh-merge-confirm`,showCloseButton:!1,children:[(0,X.jsxs)(me,{children:[(0,X.jsxs)(ge,{children:[Q(n),` pull request #`,e,`?`]}),(0,X.jsx)(pe,{asChild:!0,children:(0,X.jsxs)(`div`,{children:[(0,X.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,X.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,X.jsx)(`p`,{className:`text-sm text-danger`,children:o.message}):null,(0,X.jsxs)(fe,{children:[(0,X.jsx)(V,{variant:`outline`,disabled:a,onClick:()=>s(!1),children:`Cancel`}),(0,X.jsx)(V,{disabled:a,onClick:c,children:a?`Merging…`:Q(n)})]})]})})}function gt({number:e,onRunAgent:t}){let n=p(),r=S(),i=E({queryKey:T.githubMergeState(e),queryFn:({signal:t})=>m(e,{},{signal:t}),retry:!1}),a=nt(i.data),[o,s]=(0,Y.useState)(null),[c,u]=(0,Y.useState)(!1),[d,f]=(0,Y.useState)(!1),h=x({mutationFn:t=>m(e,{refresh:!0}),onSuccess:(e,t)=>n.setQueryData(t,e),onError:e=>D(e instanceof Error?e.message:String(e),{tone:`danger`})}),g=rt(o,a),_=()=>({mergeState:T.githubMergeState(e),list:T.githubPages(50),comments:T.githubComments(`pr`,e),item:T.githubItem(`pr`,e),refStatus:r===void 0?void 0:T.githubRefStatusOf(r)}),v=x({mutationFn:t=>{if(!a||!g)throw Error(`No merge method is available.`);return l(e,{method:g,expectedHeadSha:a.headSha,...d&&a.canOverride?{overrideRules:!0}:{}})},onSuccess:(t,r)=>{u(!1),D(`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)=>{D(e instanceof Error?e.message:String(e),{tone:`danger`}),n.invalidateQueries({queryKey:t.mergeState})}});return i.isPending?(0,X.jsx)(q,{"data-slot":`gh-merge-loading`,className:`mt-6 h-32 w-full`}):a?(0,X.jsxs)(`section`,{"data-slot":`gh-merge-box`,"data-eligibility":a.eligibility,"data-conflicting":dt(a.mergeable),"aria-live":`polite`,className:`mt-6 rounded-lg border border-border bg-card p-4`,children:[(0,X.jsx)(mt,{state:a,selectedMethod:g,overrideRules:d,mergeEnabled:ut(g,a,d),refreshPending:h.isPending,onRefresh:()=>h.mutate(T.githubMergeState(e)),onRunAgent:t,onConfirm:()=>u(!0),onMethodChange:s,onOverrideChange:f}),(0,X.jsx)(ht,{number:e,state:a,selectedMethod:g,confirming:c,overrideRules:d,mergePending:v.isPending,mergeError:v.error,onOpenChange:u,onMerge:()=>v.mutate(_())})]}):(0,X.jsx)(pt,{reason:lt(i.data)})}function _t(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 vt(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 yt(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 $(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 bt({label:e,color:t,plain:n=!1}){return(0,X.jsx)(`span`,{"data-slot":`gh-label`,"data-label":e,style:n?void 0:$(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 xt(e){return e===`pr`?`pull request`:`issue`}function St(e,t,n){return e===`pr`&&!!(t||n)}function Ct({backLink:e}){return e?(0,X.jsxs)(H,{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,X.jsx)(te,{size:16,"aria-hidden":`true`,className:`size-3.5`}),`Back to the list`]}):null}function wt({item:e,kindWord:t,commentCount:n,hasDiffStat:i,additions:a,deletions:o}){return(0,X.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,X.jsxs)(`span`,{children:[`#`,e.number]}),`·`,(0,X.jsx)(`span`,{children:t}),`·`,(0,X.jsxs)(`span`,{children:[`opened by `,e.author]}),`·`,(0,X.jsxs)(`span`,{children:[B(e.createdAt),` ago`]}),n?(0,X.jsxs)(X.Fragment,{children:[`·`,(0,X.jsx)(Jt,{count:n})]}):null,i?(0,X.jsxs)(X.Fragment,{children:[`·`,(0,X.jsxs)(`span`,{"data-slot":`gh-diffstat`,children:[(0,X.jsxs)(`span`,{className:`text-success`,children:[`+`,a??0]}),` `,(0,X.jsxs)(`span`,{className:`text-danger`,children:[`−`,o??0]})]})]}):null,`·`,r(e.url)?(0,X.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,X.jsx)(z,{"aria-hidden":`true`,className:`size-2.5`})]}):(0,X.jsx)(`span`,{"data-slot":`gh-open-link`,className:`text-muted-foreground`,children:`open on GitHub`})]})}function Tt({item:e,subNav:t,changes:n}){return e.kind===`pr`?t?(0,X.jsxs)(`nav`,{"aria-label":`Pull request detail`,className:`mt-4 flex border-b border-border`,children:[(0,X.jsx)(et,{to:J(`prs`,t.filter,e.number),active:!n,children:`Conversation`}),(0,X.jsx)(et,{to:J(`prs`,t.filter,e.number,`/changes`),active:n,children:`Changes`})]}):(0,X.jsx)(H,{to:J(`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 Et({item:e,colors:t,checks:n}){return e.labels.length>0||n?(0,X.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-1.5`,children:[e.labels.map(e=>(0,X.jsx)(bt,{label:e,color:t[e]},e)),n?(0,X.jsx)(Yt,{checks:n,url:e.url}):null]}):null}function Dt({item:e,colors:t,body:n}){return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`div`,{"data-slot":`gh-body`,className:`mt-5 text-sm`,children:n?(0,X.jsx)(Ze,{children:n}):(0,X.jsx)(`p`,{className:`text-soft-foreground`,children:`(no description)`})}),(0,X.jsx)(At,{item:e,colors:t})]})}function Ot({item:e,colors:t,checks:n,comments:r,backLink:i,subNav:a,onRunAgent:o,afterHeading:s,children:c}){let l=a?.changes??!1,u=xt(e.kind),d=g(e.kind,e.number,!l).data?.detail,f=d?.body??e.body,p=d?.additions??e.additions,m=d?.deletions??e.deletions,h=St(e.kind,p,m),_=r??e.comments;return(0,X.jsxs)(`article`,{"data-slot":`gh-detail-inner`,className:`min-w-0 px-4 py-4 md:px-7 md:py-5`,children:[(0,X.jsx)(Ct,{backLink:i}),(0,X.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,X.jsxs)(`h2`,{className:`mb-4 text-[22px] leading-snug font-normal`,children:[`#`,e.number,` `,e.title]}):null,(0,X.jsx)(wt,{item:e,kindWord:u,commentCount:_,hasDiffStat:h,additions:p,deletions:m}),e.kind===`pr`?null:(0,X.jsx)(`h2`,{className:`mt-2 text-[22px] leading-snug font-normal`,children:e.title}),s,(0,X.jsx)(Tt,{item:e,subNav:a,changes:l}),(0,X.jsx)(Et,{item:e,colors:t,checks:n}),l&&e.kind===`pr`?(0,X.jsx)(kt,{item:e}):(0,X.jsx)(Dt,{item:e,colors:t,body:f})]}),e.kind===`pr`?(0,X.jsx)(gt,{number:e.number,onRunAgent:o}):null,c]})}function kt({item:e}){let t=p(),n=h(e.number),[a,o]=(0,Y.useState)(``),[s,c]=(0,Y.useState)(null),l=n.data,d=l?.available?l.files.filter(e=>e.path.toLowerCase().includes(a.toLowerCase())):[],f=d.findIndex(e=>e.path===s);(0,Y.useEffect)(()=>{d.length>0&&!d.some(e=>e.path===s)&&c(d[0].path)},[l?.available?l.headSha:``,a]);let m=async()=>{let n=l?.available?l.headSha:null,r=T.githubPrChanges(e.number),i=await u(e.number,{refresh:!0});t.setQueryData(r,i),i.available&&n&&n!==i.headSha&&(c(i.files[0]?.path??null),D(`The reviewed revision changed.`))};if(n.isPending)return(0,X.jsx)(`p`,{"aria-live":`polite`,className:`mt-6 text-sm text-muted-foreground`,children:`Loading changed files…`});if(n.isError||!l)return(0,X.jsx)(`p`,{className:`mt-6 text-sm text-danger`,children:`Changed files could not be loaded.`});if(!l.available)return(0,X.jsx)(`p`,{className:`mt-6 text-sm text-muted-foreground`,children:l.reason});let g=d.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=d.find(e=>e.path===s);return(0,X.jsxs)(`section`,{"data-slot":`gh-pr-changes`,className:`mt-5 min-w-0`,children:[(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,X.jsxs)(`strong`,{children:[l.files.length,` changed files`]}),(0,X.jsxs)(`span`,{className:`text-success`,children:[`+`,l.additions]}),(0,X.jsxs)(`span`,{className:`text-danger`,children:[`−`,l.deletions]}),(0,X.jsxs)(`span`,{className:`font-mono text-muted-foreground`,title:l.headSha,children:[`head `,l.headSha.slice(0,8)]}),(0,X.jsx)(V,{type:`button`,variant:`outline`,size:`sm`,className:`ml-auto min-h-11`,onClick:()=>void m(),children:`Refresh`})]}),l.truncated?(0,X.jsxs)(`p`,{role:`status`,className:`mt-3 rounded-md border border-warning/40 bg-warning/10 p-3 text-xs`,children:[l.reason??`This response is incomplete.`,` `,_?(0,X.jsx)(`a`,{href:_,target:`_blank`,rel:`noopener noreferrer`,className:`underline`,children:`Open all files on GitHub`}):null]}):null,(0,X.jsxs)(`div`,{className:`mt-4 grid min-w-0 gap-4 lg:grid-cols-[240px_minmax(0,1fr)]`,children:[(0,X.jsxs)(`aside`,{className:`min-w-0`,children:[(0,X.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,X.jsx)(`select`,{"aria-label":`Select changed file`,value:s??``,onChange:e=>c(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:d.map(e=>(0,X.jsx)(`option`,{children:e.path},e.path))}),(0,X.jsx)(`ul`,{className:`mt-2 hidden max-h-[60vh] overflow-auto lg:block`,children:d.map(e=>(0,X.jsx)(`li`,{children:(0,X.jsxs)(`button`,{type:`button`,onClick:()=>c(e.path),className:i(`min-h-11 w-full truncate rounded px-2 text-left text-xs`,s===e.path&&`bg-muted font-medium`),title:e.path,children:[e.status,` · `,e.path,` `,(0,X.jsxs)(`span`,{className:`text-success`,children:[`+`,e.additions]}),` `,(0,X.jsxs)(`span`,{className:`text-danger`,children:[`−`,e.deletions]})]})},e.path))})]}),(0,X.jsxs)(`div`,{className:`min-w-0`,children:[(0,X.jsxs)(`div`,{className:`mb-2 flex justify-end gap-1`,children:[(0,X.jsx)(V,{"aria-label":`Previous file`,variant:`outline`,size:`icon`,className:`min-h-11 min-w-11`,disabled:f<=0,onClick:()=>c(d[f-1]?.path??null),children:(0,X.jsx)(Ue,{})}),(0,X.jsx)(V,{"aria-label":`Next file`,variant:`outline`,size:`icon`,className:`min-h-11 min-w-11`,disabled:f<0||f>=d.length-1,onClick:()=>c(d[f+1]?.path??null),children:(0,X.jsx)(ne,{size:16})})]}),d.length===0?(0,X.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No changed files match this filter.`}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)($e,{files:g.filter(e=>e.path===s),wrap:!0,className:`min-w-0`}),v&&!v.patch?(0,X.jsxs)(`p`,{className:`rounded-b border border-border p-3 text-xs text-muted-foreground`,children:[`Patch unavailable: `,v.patchUnavailableReason??`not-provided`,`.`]}):null]})]})]})]})}function At({item:e,colors:t}){let n=g(e.kind,e.number),r=n.data,i=(0,Y.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(jt(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,X.jsxs)(`section`,{"data-slot":`gh-thread-loading`,className:`mt-6 border-t border-border pt-5`,children:[(0,X.jsx)(q,{className:`mb-3 h-3 w-24`}),(0,X.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,X.jsx)(q,{className:`h-14 w-full`}),(0,X.jsx)(q,{className:`h-14 w-full`})]})]}):!r||!r.available?(0,X.jsxs)(`section`,{"data-slot":`gh-thread-error`,className:`mt-6 border-t border-border pt-5 text-xs text-soft-foreground`,children:[(0,X.jsxs)(`span`,{children:[`Couldn’t load comments — `,r?.reason??(n.error instanceof Error?n.error.message:`could not load comments`),`. `]}),(0,X.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,X.jsx)(z,{"aria-hidden":`true`,className:`size-2.5`})]})]}):i.length===0?null:(0,X.jsxs)(`section`,{"data-slot":`gh-thread`,className:`mt-6 border-t border-border pt-5`,children:[(0,X.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,X.jsx)(`ul`,{className:`flex flex-col gap-5`,children:Mt(i).map(e=>e.group===`commits`?(0,X.jsx)(Nt,{commits:e.commits,colors:t},e.commits[0].id):e.entry.row===`comment`?(0,X.jsx)(Wt,{comment:e.entry.comment},`${e.entry.comment.kind}-${e.entry.comment.id}`):(0,X.jsx)(Ft,{event:e.entry.event,colors:t},e.entry.event.id))}),r.truncated?(0,X.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,X.jsx)(z,{"aria-hidden":`true`,className:`size-2.5`})]}):null]})}var jt=e=>e.row===`comment`?e.comment.createdAt:e.event.createdAt;function Mt(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 Nt({commits:e,colors:t}){let[n,r]=(0,Y.useState)(!1),i=e[0]?.actor??`?`;return n?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`li`,{"data-slot":`gh-commit-group`,"data-open":`true`,className:`min-w-0`,children:(0,X.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,X.jsx)(`span`,{"aria-hidden":`true`,children:Pt.committed}),(0,X.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:i}),(0,X.jsxs)(`span`,{children:[`added `,e.length,` commits`]})]})}),e.map(e=>(0,X.jsx)(Ft,{event:e,colors:t},e.id))]}):(0,X.jsx)(`li`,{"data-slot":`gh-commit-group`,"data-open":`false`,className:`min-w-0`,children:(0,X.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,X.jsx)(`span`,{"aria-hidden":`true`,children:Pt.committed}),(0,X.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:i}),(0,X.jsxs)(`span`,{children:[`added `,e.length,` commits`]}),(0,X.jsx)(`span`,{className:`shrink-0`,children:B(e[e.length-1].createdAt)})]})})}var Pt={committed:`⚙`,labeled:`◆`,unlabeled:`◇`,assigned:`◍`,unassigned:`◌`,merged:`⑃`,closed:`⊘`,reopened:`⊙`,head_ref_force_pushed:`↻`,"cross-referenced":`↗`,renamed:`✎`};function Ft({event:e,colors:t}){return(0,X.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,X.jsx)(`span`,{"aria-hidden":`true`,className:`shrink-0`,children:Pt[e.kind]}),(0,X.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:e.actor}),(0,X.jsx)(Vt,{event:e,colors:t}),(0,X.jsx)(`span`,{className:`shrink-0`,children:B(e.createdAt)}),e.url?(0,X.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,X.jsx)(z,{"aria-hidden":`true`,className:`size-2.5`})}):null]})}function It({event:e}){return(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,X.jsx)(`span`,{className:`shrink-0`,children:`committed`}),e.sha?(0,X.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}):null,e.message?(0,X.jsx)(`span`,{className:`truncate font-sans text-foreground`,children:e.message}):null,(0,X.jsx)(Ht,{checks:e.checks})]})}function Lt({event:e,colors:t}){return(0,X.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,X.jsx)(`span`,{className:`shrink-0`,children:e.kind===`labeled`?`added the`:`removed the`}),e.label?(0,X.jsx)(`span`,{"data-slot":`gh-event-label`,style:$(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,X.jsx)(`span`,{className:`shrink-0`,children:`label`})]})}function Rt({event:e}){return(0,X.jsxs)(`span`,{className:`truncate`,children:[e.kind===`assigned`?`assigned`:`unassigned`,` `,e.subject??`someone`]})}function zt({event:e}){return(0,X.jsxs)(`span`,{className:`truncate`,children:[`referenced this in `,e.refNumber?`#${e.refNumber}`:`another thread`,e.refTitle?` ${e.refTitle}`:``]})}var Bt={committed:e=>(0,X.jsx)(It,{event:e}),labeled:(e,t)=>(0,X.jsx)(Lt,{event:e,colors:t}),unlabeled:(e,t)=>(0,X.jsx)(Lt,{event:e,colors:t}),assigned:e=>(0,X.jsx)(Rt,{event:e}),unassigned:e=>(0,X.jsx)(Rt,{event:e}),merged:()=>(0,X.jsx)(`span`,{children:`merged this`}),closed:()=>(0,X.jsx)(`span`,{children:`closed this`}),reopened:()=>(0,X.jsx)(`span`,{children:`reopened this`}),head_ref_force_pushed:()=>(0,X.jsx)(`span`,{children:`force-pushed`}),renamed:e=>(0,X.jsxs)(`span`,{className:`truncate`,children:[`renamed this to `,e.subject??`—`]}),"cross-referenced":e=>(0,X.jsx)(zt,{event:e})};function Vt({event:e,colors:t}){return Bt[e.kind]?.(e,t)??null}function Ht({checks:e}){return e?(0,X.jsx)(`span`,{"data-slot":`gh-commit-checks`,"data-checks":e,"aria-label":`checks ${e}`,className:i(`shrink-0`,qt[e]),children:Kt[e]}):null}var Ut={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 Wt({comment:e}){let t=e.reviewState?Ut[e.reviewState]:null;return(0,X.jsxs)(`li`,{"data-slot":`gh-thread-entry`,"data-kind":e.kind,className:`min-w-0`,children:[(0,X.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5 font-mono text-[11px] text-soft-foreground`,children:[(0,X.jsx)(Gt,{url:e.avatarUrl,login:e.author}),(0,X.jsx)(`span`,{className:`font-sans font-medium text-foreground`,children:e.author}),(0,X.jsx)(`span`,{children:B(e.createdAt)}),t?(0,X.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,X.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,X.jsx)(z,{"aria-hidden":`true`,className:`size-2.5`})})]}),(0,X.jsx)(`div`,{"data-slot":`gh-thread-body`,className:`text-sm`,children:e.body?(0,X.jsx)(Ze,{children:e.body}):(0,X.jsx)(`p`,{className:`text-soft-foreground`,children:`(no body)`})})]})}function Gt({url:e,login:t}){let[n,r]=(0,Y.useState)(!1);return e&&!n?(0,X.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,X.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 Kt={passing:`✓`,failing:`✗`,pending:`○`},qt={passing:`text-success`,failing:`text-danger`,pending:`text-muted-foreground`};function Jt({count:e}){return e?(0,X.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,X.jsx)(se,{"aria-hidden":`true`,className:`size-3`}),e]}):null}function Yt({checks:e,url:t}){let n=i(`text-[11px] font-medium`,qt[e],t&&`hover:underline`),r=`${Kt[e]} checks ${e}`;return t?(0,X.jsx)(`a`,{href:`${t}/checks`,target:`_blank`,rel:`noopener noreferrer`,"data-slot":`gh-checks`,"data-checks":e,className:n,children:r}):(0,X.jsx)(`span`,{"data-slot":`gh-checks`,"data-checks":e,className:n,children:r})}function Xt({checks:e}){return(0,X.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`,qt[e]),children:Kt[e]})}function Zt(e){return`${e.kind===`pr`?`Address GitHub pull request`:`Fix GitHub issue`} #${e.number}: ${e.title}\n\n${e.url}`}function Qt(e,t=[]){let n=Zt(e);return e.body?.trim()&&(n+=`\n\n---\n\n${e.body.trim()}`),t.length&&(n+=$t(t)),n}function $t(e){return`\n\nUse these skills where relevant: ${e.join(`, `)}.`}function en(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 tn(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 nn(e,t,n){let r=(n??``).trim();if(!r)return Qt(e,t);let i=Zt(e),a=r.startsWith(i)?i+en(r.slice(i.length),e):en(r,e),o=tn(a,e)?a:`${i}\n\n${a}`;return t.length?o+$t(t):o}function rn(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 an(e,t,n,r,i={}){return t?{...i,workflow:t,task:nn(e,n.map(e=>e.id),r)}:n.length?{...i,steps:rn(n.map(e=>e.id)).map((e,t)=>({...e,...n[t]?.path===void 0?{}:{skillPath:n[t].path}})),task:nn(e,[],r)}:{...i,workflow:`quick-task`,task:nn(e,[],r)}}function on(e){let t=v(),n=w(),r=O(),i=o(t.data,r.data),a=s(t.data,r.data),c=n.data?.defaultRunner,l=Me(e.runner,i,c??i[0]??`claude`),u=n.data?.modelsLocked===!0,{accounts:d,repoAccount:f}=je(),p=d.some(t=>t.provider===l&&t.id===e.account)?e.account:null,m=_(l,!0,p??f?.[l]),h=ke(u?null:e.model,l,r.data,n.data?.defaultModels,m.data),g=Fe(h,m.data);return{runner:l,runnerExplicit:e.runner!==null,model:h,effort:u?``:Le(e.effort,g),effortOptions:g,runners:i,uninstalled:a,defaultRunner:c,canRun:t.isSuccess&&i.length>0,modelsLocked:u,providerPending:t.isPending,providerError:t.isError,accounts:d,account:p,repoAccount:f}}function sn(e){return{runner:Pe(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 cn(e){return{...sn(e),...e.account?{agentProfile:e.account}:{}}}function ln(e,t){let{runners:n,uninstalled:r}=e;return n.length>1||r.length>0||n.some(e=>ze(t,e))}function un({pick:e,onChange:t,disabled:n=!1,accounts:r=!1,layout:i}){let a=(0,Y.useRef)(null),o=(0,Y.useRef)(null),[s,c]=(0,Y.useState)(()=>typeof window<`u`&&window.innerWidth<=767);(0,Y.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,Y.useLayoutEffect)(()=>{let e=o.current;o.current=null,e&&e.isConnected&&document.activeElement!==e&&e.focus()},[s]);let l=on(e),{runner:u,model:d,effort:f,effortOptions:p,runners:m,canRun:h,modelsLocked:g}=l,v=w(),y=O(),b=_(u,!0,l.account??l.repoAccount?.[u]),x=Ie(u,y.data,b.data,[e.model,v.data?.defaultModels?.[u]]),S=n||!h,C=r?l.accounts:[],T=ln(l,C)?(0,X.jsx)(Ne,{icon:(0,X.jsx)(ee,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-accent-text`}),fieldLabel:!0,runners:m,uninstalled:l.uninstalled,value:u,accounts:C,account:r?l.account:null,repoAccount:r?l.repoAccount:void 0,disabled:S,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,E=(0,X.jsx)(K,{icon:(0,X.jsx)(ie,{"aria-hidden":`true`,className:`size-[18px] shrink-0 text-accent-text`}),fieldLabel:!0,slot:`model-pill`,ariaLabel:`Model`,label:d===``?`Default`:x.find(e=>e.id===d).label,value:d,disabled:S,readOnly:g===!0,disabledHint:g?`Model selection is locked to native coding-agent settings.`:void 0,onPick:n=>{let r=Fe(n,b.data);t({...e,model:n,effort:e.effort===null?null:Le(e.effort,r)})},options:x.map(e=>({value:e.id,label:e.label,desc:e.desc})),status:qe(u,y.data,b)},`model`),D=(0,X.jsx)(K,{icon:(0,X.jsx)(P,{"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:S,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,X.jsx)(`div`,{ref:a,"data-slot":`engine-row-box`,children:(0,X.jsx)(`div`,{"data-slot":`engine-row`,className:`engine-row`,role:`group`,"aria-label":`Agent settings`,children:(0,X.jsx)(Je,{children:s?[T,D,E]:[T,E,D]})})}):(0,X.jsxs)(Je,{children:[T,E,D]})}var dn={workflow:null,skills:[]},fn=`cez-followup-selection`;function pn(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 mn(){try{let e=localStorage.getItem(fn);return e?pn(JSON.parse(e)):{...dn}}catch{return{...dn}}}function hn(e){try{localStorage.setItem(fn,JSON.stringify(e))}catch{}}var gn=`cez-followup-prompt:`;function _n(e){try{return localStorage.getItem(gn+e)??``}catch{return``}}function vn(e,t){try{t===``?localStorage.removeItem(gn+e):localStorage.setItem(gn+e,t)}catch{}}function yn({item:e,workflows:t,skills:n,workflow:i,onWorkflowChange:o,selectedSkills:s,onSkillsChange:c,engine:l,onEngineChange:u,queuedRunId:f,onQueued:m}){let h=p(),g=b(),_=e.kind===`pr`?`PR`:`issue`,v=on(l),S=y(v.runner,v.account),C=s.filter(e=>S.unchecked||e.path===void 0||n.some(t=>t.id===e.id&&(e.path===void 0||t.path===e.path))),w=C.length!==s.length,[E]=(0,Y.useState)(()=>Zt(e)),[O,k]=(0,Y.useState)(()=>_n(e.url)||E),j=(0,Y.useRef)(null),M=(0,Y.useRef)(null);(0,Y.useEffect)(()=>{vn(e.url,O===E?``:O)},[e.url,O,E]);let N=(0,Y.useMemo)(()=>Ye(g.data?.promptTemplates),[g.data?.promptTemplates]),ee=e=>{let t=j.current,n=We({prompt:O,base:E,selectionStart:t?.selectionStart??null,focused:document.activeElement===t,remembered:M.current}),r=Xe(O,n,e);k(r.text),M.current=r.caret,requestAnimationFrame(()=>{j.current?.focus(),j.current?.setSelectionRange(r.caret,r.caret)})},P=Ge(N,C.map(e=>e.id)),F=(0,Y.useRef)(O);F.current=O;let I=(0,Y.useRef)(``);(0,Y.useEffect)(()=>{let e=Ke(F.current,I.current,P,E);I.current=e.applied,e.text!==F.current&&k(e.text)},[P,E]);let L=x({mutationFn:async()=>!v.canRun||w?null:a(an(e,i,C,O,cn(v))),onSuccess:t=>{if(t===null)return;let n=t;n&&m(e.url,n.id),D(`Added to the queue — ${_} #${e.number}`),C.length>0&&g.data!==void 0&&d({skillUsage:C.reduce((e,t)=>De(e,t.id),g.data.skillUsage)}).then(()=>h.invalidateQueries({queryKey:T.uiState})).catch(()=>{}),vn(e.url,``),k(E),I.current=``,h.invalidateQueries({queryKey:T.runs.all})},onError:e=>D(e.message,{tone:`danger`})}),te=e=>{He({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(),!L.isPending&&v.canRun&&L.mutate())},R=e=>c(s.some(t=>G(t)===G(e))?s.filter(t=>G(t)!==G(e)):[...s,Ee(e)]);return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`section`,{"data-slot":`gh-hand`,className:`mt-7 rounded-lg border border-border bg-card p-4`,children:[(0,X.jsx)(`h3`,{className:`text-xl font-normal text-foreground`,children:`Hand this to the agent`}),(0,X.jsxs)(`label`,{className:`gh-field gh-prompt-field`,children:[(0,X.jsx)(`span`,{children:`Instructions for the agent`}),(0,X.jsx)(Qe,{ref:j,"data-slot":`gh-custom-prompt`,"aria-label":`Custom prompt`,"aria-keyshortcuts":`Control+Enter Meta+Enter`,value:O,onChange:e=>k(e.target.value),onSelect:e=>{M.current=e.currentTarget.selectionStart},onKeyDown:te,placeholder:`Instructions for the agent… (#${e.number} and its link are always sent)`,className:`mt-3 min-h-20 text-[13px]`})]}),(0,X.jsx)(Ae,{templates:N,onInsert:ee}),(0,X.jsxs)(`div`,{className:`gh-handoff-settings`,children:[(0,X.jsxs)(`div`,{className:`gh-field`,children:[(0,X.jsx)(`span`,{children:`Workflow`}),(0,X.jsx)(xn,{workflows:t,value:i,onChange:o})]}),(0,X.jsxs)(`div`,{className:`gh-field`,children:[(0,X.jsx)(`span`,{children:`Skills · select one or more`}),(0,X.jsx)(Cn,{skills:n,skillUsage:g.data?.skillUsage,selected:s,onToggle:R})]}),s.length>0?(0,X.jsx)(`div`,{"data-slot":`gh-skill-chips`,className:`mt-2.5 flex flex-wrap gap-1.5`,children:s.map(e=>(0,X.jsx)(bn,{skill:e,skills:n,unchecked:S.unchecked,onRemove:()=>R(e)},G(e)))}):null,w?(0,X.jsx)(`p`,{role:`alert`,children:`A selected skill path is unavailable. Remove it or choose a current copy before starting.`}):null,(0,X.jsx)(un,{layout:`row`,pick:l,onChange:u,disabled:L.isPending||!v.canRun,accounts:!0}),(0,X.jsxs)(`div`,{className:`gh-field`,children:[(0,X.jsx)(`span`,{children:`Account`}),(0,X.jsx)(Sn,{resolved:v,disabled:L.isPending||!v.canRun,onPick:e=>u({...l,account:e})})]}),!v.providerPending&&!v.canRun?(0,X.jsxs)(`span`,{"data-slot":`gh-provider-gate`,className:`inline-flex flex-wrap items-center gap-1 text-xs text-muted-foreground`,children:[v.providerError?`Provider authentication could not be verified.`:`Connect an agent provider to run this item.`,(0,X.jsx)(H,{to:`/settings/agent-defaults#providers`,className:`font-medium text-foreground underline underline-offset-4`,children:`Configure providers`})]}):null]}),(0,X.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,X.jsxs)(`div`,{"data-slot":`gh-handoff-actions`,className:`mt-[22px] flex flex-wrap items-center gap-2.5`,children:[r(e.url)?(0,X.jsx)(V,{asChild:!0,variant:`outline`,children:(0,X.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:`Open in GitHub`})}):null,(0,X.jsxs)(V,{variant:`primary`,"data-action":`gh-run`,disabled:L.isPending||!v.canRun||w,onClick:()=>L.mutate(),children:[(0,X.jsx)(ce,{"aria-hidden":`true`,className:`size-3.5`}),`Run agent on this `,_]}),(0,X.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:Re()}),f?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`span`,{"data-slot":`gh-queued`,className:`flex items-center gap-1 text-xs font-medium text-success`,children:[(0,X.jsx)(A,{size:16,"aria-hidden":`true`,className:`size-3.5`}),`queued`]}),(0,X.jsx)(H,{to:`/tasks/${f}`,"data-slot":`gh-view-run`,className:`text-xs font-semibold text-accent-text hover:underline`,children:`View task →`})]}):null]})]})}function bn({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,X.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,X.jsx)(M,{size:16,"aria-hidden":`true`,className:`size-3`})]})}function xn({workflows:e,value:t,onChange:n}){let[r,a]=(0,Y.useState)(!1),[o,s]=(0,Y.useState)(``),c=(0,Y.useRef)(null),l=Se(e,o);return(0,X.jsxs)(de,{open:r,onOpenChange:e=>{a(e),e||s(``)},children:[(0,X.jsx)(le,{asChild:!0,children:(0,X.jsxs)(`button`,{type:`button`,"data-slot":`gh-workflow-trigger`,"aria-label":`Choose a workflow`,className:i(Ve,t&&`border-foreground/60 font-mono text-[11px] font-semibold text-foreground`),children:[(0,X.jsx)(re,{size:16,"aria-hidden":`true`,className:`size-3 shrink-0 text-accent-icon`}),(0,X.jsx)(`span`,{className:`min-w-0 max-w-44 truncate`,children:t??`workflow`}),(0,X.jsx)(F,{size:16,"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,X.jsx)(ue,{align:`start`,sideOffset:8,className:`w-[320px] max-w-[calc(100vw-2rem)] p-0`,children:(0,X.jsxs)(xe,{shouldFilter:!1,children:[(0,X.jsx)(ve,{placeholder:`search workflows…`,value:o,onValueChange:s,onInput:()=>c.current?.scrollTo(0,0)}),(0,X.jsxs)(be,{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,X.jsx)(ye,{children:`Nothing matches.`}):null,(0,X.jsx)(U,{children:l.map(e=>{let r=t===e.name;return(0,X.jsxs)(W,{value:`workflow ${e.name}`,keywords:Te(e.name,e.description),"data-slot":`gh-workflow-option`,"data-workflow":e.name,onSelect:()=>{n(r?null:e.name),a(!1)},children:[(0,X.jsx)(`span`,{className:`shrink-0 font-mono text-xs`,children:e.name}),e.description?(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,r?(0,X.jsx)(A,{size:16,"aria-hidden":`true`,className:`ml-auto size-3.5 shrink-0 text-link-foreground`}):null]},e.name)})})]})]})})]})}function Sn({resolved:e,disabled:t,onPick:n}){let r=e.accounts.filter(t=>t.provider===e.runner),i=[...r.some(e=>e.id==="default")?[]:[{value:c,label:`Default`}],...r.map(e=>({value:e.id,label:e.label,desc:e.configDir}))],a=e.account??e.repoAccount?.[e.runner]??`default`;return(0,X.jsx)(K,{icon:(0,X.jsx)(j,{"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 Cn({skills:e,skillUsage:t,selected:n,onToggle:r}){let[a,o]=(0,Y.useState)(!1),[s,c]=(0,Y.useState)(``),[l,u]=(0,Y.useState)(null),d=(0,Y.useRef)(null),{mostUsed:f,project:p,global:m,ranked:h}=Oe(e,s,t),g=(e,t)=>{let a=n.some(t=>G(t)===G(e));return(0,X.jsxs)(W,{value:G(e),keywords:Te(e.name,e.description),"data-slot":`gh-skill-option`,"data-skill":e.id,"data-selected":a?`true`:void 0,onSelect:()=>r(Ee(e)),children:[(0,X.jsx)(`span`,{className:i(`shrink-0 font-mono text-xs`,t&&`font-semibold`),children:e.name}),e.path?(0,X.jsx)(`span`,{className:`min-w-0 truncate text-xs`,children:e.path}):null,e.description?(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-soft-foreground`,children:e.description}):null,(0,X.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,X.jsx)(ae,{"aria-hidden":`true`,className:`size-3.5`})}),a?(0,X.jsx)(A,{size:16,"aria-hidden":`true`,className:`size-3.5 shrink-0 text-link-foreground`}):null]},G(e))};return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Be,{skill:l,onClose:()=>u(null)}),(0,X.jsxs)(de,{open:a,onOpenChange:e=>{o(e),e||c(``)},children:[(0,X.jsx)(le,{asChild:!0,children:(0,X.jsxs)(`button`,{type:`button`,"data-slot":`gh-skills-trigger`,"aria-label":`Choose skills`,className:i(Ve,n.length>0&&`border-foreground/60 font-semibold text-foreground`),children:[(0,X.jsx)(R,{size:16,"aria-hidden":`true`,className:`size-3 shrink-0 text-accent-icon`}),`skills`,n.length>0?` · ${n.length}`:``,(0,X.jsx)(F,{size:16,"aria-hidden":`true`,className:`size-2.5 shrink-0 text-soft-foreground`})]})}),(0,X.jsx)(ue,{align:`start`,sideOffset:8,className:`w-[336px] max-w-[calc(100vw-2rem)] p-0`,children:(0,X.jsxs)(xe,{shouldFilter:!1,children:[(0,X.jsx)(ve,{placeholder:`search skills…`,value:s,onValueChange:c,onInput:()=>d.current?.scrollTo(0,0)}),(0,X.jsxs)(be,{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,X.jsx)(U,{children:(0,X.jsxs)(W,{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,X.jsx)(ye,{children:`Nothing matches.`}):null,h?h.length>0?(0,X.jsx)(U,{children:h.map(e=>g(e,Ce(e)))}):null:(0,X.jsxs)(X.Fragment,{children:[f.length>0?(0,X.jsx)(U,{heading:`Most used`,children:f.map(e=>g(e,Ce(e)))}):null,p.length>0?(0,X.jsx)(U,{heading:`Project skills`,children:p.map(e=>g(e,!0))}):null,m.length>0?(0,X.jsx)(U,{heading:`Global`,children:m.map(e=>g(e,!1))}):null]})]})]})})]})]})}var wn=new WeakMap;function Tn(){let e=mn(),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)&&hn({workflow:t.workflow,skills:[...t.selectedSkills]}),n.forEach(e=>e())}}}function En(){let e=p(),{projectId:t}=f(),n=wn.get(e);n||wn.set(e,n=new Map);let r=n.get(t);r||n.set(t,r=Tn());let{snapshot:i,subscribe:a,update:o}=r,s=(0,Y.useSyncExternalStore)(a,i,i),c=C(),l=on(s.engine),u=y(l.runner,l.account),d=b(),m=c.data?.workflows;(0,Y.useEffect)(()=>{m&&s.workflow!==null&&!m.some(e=>e.name===s.workflow)&&o({workflow:null})},[o,m,s.workflow]);let h=(0,Y.useMemo)(()=>we(u.data??[],d.data?.skillUsage),[u.data,d.data?.skillUsage]);return{...s,workflows:c,skillList:h,skillsUnchecked:u.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{Jt as a,Mt as c,$ as d,yt as f,Xt as i,_t as l,yn as n,Ot as o,Qt as r,bt as s,En as t,vt as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Gr as e,ni as t}from"./project-scope-context-BRvkKGX1.js";function n(n,r){return e(n,t,r)}export{n as t};
|