@kidlat-dakila/flightplan 0.1.5 → 0.1.6

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.
Files changed (55) hide show
  1. package/backend/main.js +286 -53
  2. package/frontend/assets/_branchId-CPb8-qBw.js +1 -0
  3. package/frontend/assets/{_branchId-BctD9BVI.js → _branchId-LiwHskkW.js} +1 -1
  4. package/frontend/assets/{_id-DS2_k7mD.js → _id-BDFgPH36.js} +1 -1
  5. package/frontend/assets/_id-DlHylI1F.js +1 -0
  6. package/frontend/assets/agents-BGNiGYQQ.js +1 -0
  7. package/frontend/assets/{agents-Cg-w99VB.js → agents-DBPulyWi.js} +1 -1
  8. package/frontend/assets/configuration-C8ZTSPna.js +1 -0
  9. package/frontend/assets/{configuration-B1tYKnw1.js → configuration-DBU-Fvop.js} +1 -1
  10. package/frontend/assets/{create-BXn1thks.js → create-BWsYjEs5.js} +1 -1
  11. package/frontend/assets/{create-DQsVrUIP.js → create-DBNC2wSp.js} +1 -1
  12. package/frontend/assets/{create-CNT_ktA4.js → create-DBv4ZLt7.js} +1 -1
  13. package/frontend/assets/create-DXgFUVIW.js +1 -0
  14. package/frontend/assets/{download-BsAZZo3P.js → download-BnmEn_Ca.js} +1 -1
  15. package/frontend/assets/{forges-ChElPpOV.js → forges-BOWrvfZl.js} +1 -1
  16. package/frontend/assets/forges-DwSiwqas.js +1 -0
  17. package/frontend/assets/{index-eMdhkBjo.js → index-B1Rm0SQ5.js} +1 -1
  18. package/frontend/assets/index-BKKD-dvv.js +1 -0
  19. package/frontend/assets/{index-C8gx27Rr.js → index-BaflOxvR.js} +1 -1
  20. package/frontend/assets/{index-h6dRc3tV.js → index-CR5UGYQN.js} +1 -1
  21. package/frontend/assets/{index-Dfzoepph.js → index-CSoB1eP_.js} +1 -1
  22. package/frontend/assets/{index-DgodP5aC.js → index-CUqlioqL.js} +1 -1
  23. package/frontend/assets/{index-Baaegu29.js → index-CZN7BV83.js} +1 -1
  24. package/frontend/assets/index-CeY9TXPf.js +1 -0
  25. package/frontend/assets/{index-9KbVyMz4.js → index-CydhSU9g.js} +1 -1
  26. package/frontend/assets/index-D-k5POv5.js +1 -0
  27. package/frontend/assets/{index-B7lg0P4V.js → index-DCCyA67N.js} +1 -1
  28. package/frontend/assets/{index-CX9sF5Fh.js → index-DfRj4oZV.js} +3 -3
  29. package/frontend/assets/index-Dn9qaXzX.js +1 -0
  30. package/frontend/assets/{index-DzSYBwXV.js → index-Dw5NpM9d.js} +1 -1
  31. package/frontend/assets/{index-CPyhbNqS.js → index-DyfuBbIJ.js} +1 -1
  32. package/frontend/assets/{index-CIReAhWD.js → index-PzkXPYSX.js} +1 -1
  33. package/frontend/assets/{index-xoWXUJLW.js → index-QabB0_Qw.js} +1 -1
  34. package/frontend/assets/{index-Ccx_zqhL.js → index-V8tnJR9v.js} +1 -1
  35. package/frontend/assets/{index-BYtgetD4.js → index-XcYy-NBi.js} +1 -1
  36. package/frontend/assets/{index-BsRx8Pzi.js → index-efpZ6EEe.js} +1 -1
  37. package/frontend/assets/{index-BWM8kiQ0.js → index-s14Wy6CE.js} +1 -1
  38. package/frontend/assets/index-zxLaxo8R.js +1 -0
  39. package/frontend/assets/repositories-BLLfYDjf.js +1 -0
  40. package/frontend/assets/{repositories-DdOEWFoL.js → repositories-of9BXUjW.js} +1 -1
  41. package/frontend/assets/{route-qbVbAxtx.js → route-X94hglR1.js} +1 -1
  42. package/frontend/index.html +1 -1
  43. package/package.json +1 -1
  44. package/frontend/assets/_branchId--sAXSZ0Z.js +0 -1
  45. package/frontend/assets/_id-ZvG2tACL.js +0 -1
  46. package/frontend/assets/agents-DbSvvIcf.js +0 -1
  47. package/frontend/assets/configuration-PLwRj92u.js +0 -1
  48. package/frontend/assets/create-CGIYQfn-.js +0 -1
  49. package/frontend/assets/forges-D5lw6fYh.js +0 -1
  50. package/frontend/assets/index-BBbL0wfM.js +0 -1
  51. package/frontend/assets/index-BCEvS2zI.js +0 -1
  52. package/frontend/assets/index-D3gI7yfx.js +0 -1
  53. package/frontend/assets/index-D6S4PGCc.js +0 -1
  54. package/frontend/assets/index-DvVl2gWR.js +0 -1
  55. package/frontend/assets/repositories-Di8qfiyD.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as e,D as p,a as h,b as m,c as u,d as j,e as g,B as l,t as f}from"./index-DfRj4oZV.js";const N={repository:"font-bold","added-repository":"text-muted-foreground",folder:""},b=({folder:t,onOpenFolder:a,onChooseRepository:s})=>t.kind==="added-repository"?null:t.kind==="repository"?e.jsx(l,{type:"button",size:"sm","aria-label":`Choose ${t.name}`,onClick:()=>{s(t.path)},children:"Choose"}):e.jsx(l,{type:"button",variant:"outline",size:"sm","aria-label":`Open ${t.name}`,onClick:()=>{a(t.path)},children:"Open"}),y=({browser:t,onOpenFolder:a,onChooseRepository:s})=>e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("p",{className:"min-w-0 flex-1 font-mono text-[0.82rem] wrap-anywhere",children:t.path}),t.parentPath===null?null:e.jsx(l,{type:"button",variant:"outline",size:"sm",onClick:()=>{t.parentPath!==null&&a(t.parentPath)},children:"Up one folder"})]}),t.message===null?e.jsx("ul",{className:"max-h-[calc(20rem+1px)] overflow-y-auto border-t border-border",children:t.folders.map(n=>e.jsxs("li",{className:"flex h-10 items-center gap-3 border-b border-border",children:[e.jsx("span",{className:f("min-w-0 flex-1 truncate",N[n.kind]),children:n.name}),e.jsx("span",{className:"text-muted-foreground",children:n.kindLabel}),e.jsx(b,{folder:n,onOpenFolder:a,onChooseRepository:s})]},n.path))}):e.jsx("p",{className:"border-t border-border pt-3 text-muted-foreground",children:t.message})]}),k=({isOpen:t,title:a,description:s,browser:n,errorMessage:i,onOpenFolder:o,onChooseRepository:d,onChooseFolder:r,onClose:c})=>e.jsx(p,{open:t,onOpenChange:x=>{x||c()},children:e.jsxs(h,{children:[e.jsxs(m,{children:[e.jsx(u,{children:a}),e.jsx(j,{children:s})]}),n===null?e.jsx("p",{role:"status",className:"text-muted-foreground",children:"Reading the folder…"}):e.jsx(y,{browser:n,onOpenFolder:o,onChooseRepository:d}),i===null?null:e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:i}),n===null||r===null?null:e.jsx(g,{children:e.jsx(l,{type:"button",onClick:()=>{r(n.path)},children:"Use this folder"})})]})});export{k as F};
@@ -1 +1 @@
1
- import{r as n,j as s,f as H,M as U,B as z,N as W,P as q}from"./index-CX9sF5Fh.js";import{F as J}from"./index-D3gI7yfx.js";const K="pt-8 pb-2 text-xl leading-7 font-bold text-signal-text",p="size-4 shrink-0 accent-(--primary)",Q="Open folders until you reach the one to install into, then use it.",L="model",_="effort",V=[L,_],X=()=>{},Y=({option:a,groupName:y,isPicked:u,isDefault:w,installPath:l,model:N,effort:S,pathErrorMessage:C,modelErrorMessage:E,effortErrorMessage:v,onPickedChange:B,onDefaultChange:A,onInstallPathChange:O,onModelChange:I,onEffortChange:F,onBrowse:h})=>{const d=a.modelOptions.find(t=>t.model===N),f=n.useId(),x=n.useId(),g=n.useId(),o=C!==null,b=a.unavailableReason===null;return s.jsxs("li",{className:"border-b border-border py-3",children:[s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsxs("label",{className:H("flex min-w-0 flex-1 items-start gap-3",b?"cursor-pointer":""),children:[s.jsx("input",{type:"checkbox",checked:u,disabled:!b,className:`${p} mt-0.5`,onChange:t=>{B(t.target.checked)}}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"font-bold",children:a.label}),a.unavailableReason===null?null:s.jsxs("span",{className:"block max-w-[62ch] text-sm text-destructive",children:[s.jsx("span",{className:"font-bold",children:"Unavailable."}),` ${a.unavailableReason}`]})]})]}),s.jsxs("label",{className:"flex cursor-pointer items-center gap-2 pt-0.5 text-sm has-disabled:cursor-default has-disabled:text-muted-foreground",children:[s.jsx("input",{type:"radio",name:y,checked:w,disabled:!u,className:p,onChange:A}),s.jsx("span",{"aria-hidden":"true",className:"text-box-cap",children:"Default"}),s.jsx("span",{className:"sr-only",children:`Default agent: ${a.label}`})]})]}),u?s.jsxs("div",{className:"mt-3 grid gap-1.5 pl-7",children:[s.jsx("label",{htmlFor:f,className:"text-sm font-bold",children:`Install folder for ${a.label}`}),s.jsx("p",{id:x,className:"text-sm text-muted-foreground",children:a.pathHint}),s.jsxs("div",{className:"flex max-w-xl items-center gap-2",children:[s.jsx(U,{id:f,value:l,autoComplete:"off",spellCheck:!1,"aria-invalid":o,"aria-describedby":o?`${x} ${g}`:x,className:"min-w-0 flex-1 font-mono",onChange:t=>{O(t.target.value)}}),s.jsx(z,{type:"button",variant:"outline","aria-label":`Browse for the ${a.label} install folder`,onClick:h,children:"Browse"})]}),o?s.jsx("p",{id:g,role:"alert",className:"text-sm text-destructive",children:C}):null,s.jsxs("div",{className:"flex flex-wrap items-start gap-x-6 gap-y-3 pt-3",children:[s.jsx(W,{label:`Model for ${a.label}`,options:a.modelOptions.map(t=>({value:t.model,label:t.label})),value:N,errorMessage:E,className:"w-60",onChange:t=>{const j=a.modelOptions.find(k=>k.model===t);j!==void 0&&I(j)}}),(d==null?void 0:d.hasEffortChoice)===!0?s.jsx(q,{label:`Effort for ${a.label}`,options:d.effortOptions.map(t=>({value:t.effort,label:t.label})),value:S,onChange:F}):null]}),v===null?null:s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:v})]}):null]})},se=({agents:a,defaultAgent:y,connection:u,connectionOptions:w,problem:l,children:N,folderBrowser:S,folderBrowserErrorMessage:C,onBrowseFolder:E,onBrowseEnd:v,onSubmit:B})=>{const A=n.useId(),O=n.useId(),[I,F]=n.useState(()=>Object.fromEntries(a.map(e=>[e.agent,e.isPicked]))),[h,d]=n.useState(()=>Object.fromEntries(a.map(e=>[e.agent,e.installPath]))),[f,x]=n.useState(()=>Object.fromEntries(a.map(e=>[e.agent,e.model]))),[g,o]=n.useState(()=>Object.fromEntries(a.map(e=>[e.agent,e.effort]))),[b,t]=n.useState(y),[j,k]=n.useState(u),[m,D]=n.useState(null),M=e=>{D(e),E(h[e.agent]??"")},P=()=>{D(null),v()},T=e=>{m!==null&&d(i=>({...i,[m.agent]:e})),P()},G=()=>{B({agents:a.map(e=>({agent:e.agent,isPicked:I[e.agent]??!1,installPath:h[e.agent]??"",model:f[e.agent]??e.model,effort:g[e.agent]??e.effort})),defaultAgent:b,connection:j})};return s.jsxs("form",{action:G,children:[s.jsx("ul",{className:"border-t border-border",children:a.map(e=>{var i,R,$;return s.jsx(Y,{option:e,groupName:A,isPicked:I[e.agent]??!1,isDefault:b===e.agent,installPath:h[e.agent]??"",model:f[e.agent]??e.model,effort:g[e.agent]??e.effort,pathErrorMessage:((i=l==null?void 0:l.field)==null?void 0:i.owner)===e.agent&&!V.includes(l.field.name)?l.message:null,modelErrorMessage:((R=l==null?void 0:l.field)==null?void 0:R.owner)===e.agent&&l.field.name===L?l.message:null,effortErrorMessage:(($=l==null?void 0:l.field)==null?void 0:$.owner)===e.agent&&l.field.name===_?l.message:null,onPickedChange:c=>{F(r=>({...r,[e.agent]:c}))},onDefaultChange:()=>{t(e.agent)},onInstallPathChange:c=>{d(r=>({...r,[e.agent]:c}))},onModelChange:c=>{x(r=>({...r,[e.agent]:c.model})),o(r=>({...r,[e.agent]:c.selectedEffort}))},onEffortChange:c=>{o(r=>({...r,[e.agent]:c}))},onBrowse:()=>{M(e)}},e.agent)})}),s.jsxs("fieldset",{children:[s.jsx("legend",{className:K,children:"How Flight Plan reaches the agent"}),s.jsx("ul",{className:"border-t border-border",children:w.map(e=>s.jsxs("li",{className:"border-b border-border py-3 last:border-b-0",children:[s.jsxs("label",{className:"flex cursor-pointer items-start gap-3",children:[s.jsx("input",{type:"radio",name:O,checked:j===e.connection,className:`${p} mt-1`,onChange:()=>{k(e.connection)}}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"font-bold",children:e.label}),e.tagLabel===null?null:s.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:e.tagLabel}),s.jsx("span",{className:"block max-w-[62ch] text-sm text-muted-foreground",children:e.description})]})]}),e.unavailableFeatures.length>0?s.jsxs("div",{className:"mt-2 pl-7 text-sm",children:[s.jsx("p",{children:"Not available when you prompt the agent yourself:"}),s.jsx("ul",{className:"list-disc pl-5 text-muted-foreground",children:e.unavailableFeatures.map(i=>s.jsx("li",{children:i},i))})]}):null]},e.connection))})]}),N,s.jsx(J,{isOpen:m!==null,title:`Install folder for ${(m==null?void 0:m.label)??""}`,description:Q,browser:S,errorMessage:C,onOpenFolder:E,onChooseRepository:X,onChooseFolder:T,onClose:P})]})};export{se as A};
1
+ import{r as n,j as s,t as H,N as U,B as z,P as Q,Q as W}from"./index-DfRj4oZV.js";import{F as q}from"./index-Dn9qaXzX.js";const J="pt-8 pb-2 text-xl leading-7 font-bold text-signal-text",p="size-4 shrink-0 accent-(--primary)",K="Open folders until you reach the one to install into, then use it.",L="model",_="effort",V=[L,_],X=()=>{},Y=({option:a,groupName:y,isPicked:u,isDefault:w,installPath:l,model:N,effort:S,pathErrorMessage:C,modelErrorMessage:E,effortErrorMessage:v,onPickedChange:B,onDefaultChange:A,onInstallPathChange:O,onModelChange:I,onEffortChange:F,onBrowse:h})=>{const d=a.modelOptions.find(t=>t.model===N),f=n.useId(),x=n.useId(),g=n.useId(),o=C!==null,b=a.unavailableReason===null;return s.jsxs("li",{className:"border-b border-border py-3",children:[s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsxs("label",{className:H("flex min-w-0 flex-1 items-start gap-3",b?"cursor-pointer":""),children:[s.jsx("input",{type:"checkbox",checked:u,disabled:!b,className:`${p} mt-0.5`,onChange:t=>{B(t.target.checked)}}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"font-bold",children:a.label}),a.unavailableReason===null?null:s.jsxs("span",{className:"block max-w-[62ch] text-sm text-destructive",children:[s.jsx("span",{className:"font-bold",children:"Unavailable."}),` ${a.unavailableReason}`]})]})]}),s.jsxs("label",{className:"flex cursor-pointer items-center gap-2 pt-0.5 text-sm has-disabled:cursor-default has-disabled:text-muted-foreground",children:[s.jsx("input",{type:"radio",name:y,checked:w,disabled:!u,className:p,onChange:A}),s.jsx("span",{"aria-hidden":"true",className:"text-box-cap",children:"Default"}),s.jsx("span",{className:"sr-only",children:`Default agent: ${a.label}`})]})]}),u?s.jsxs("div",{className:"mt-3 grid gap-1.5 pl-7",children:[s.jsx("label",{htmlFor:f,className:"text-sm font-bold",children:`Install folder for ${a.label}`}),s.jsx("p",{id:x,className:"text-sm text-muted-foreground",children:a.pathHint}),s.jsxs("div",{className:"flex max-w-xl items-center gap-2",children:[s.jsx(U,{id:f,value:l,autoComplete:"off",spellCheck:!1,"aria-invalid":o,"aria-describedby":o?`${x} ${g}`:x,className:"min-w-0 flex-1 font-mono",onChange:t=>{O(t.target.value)}}),s.jsx(z,{type:"button",variant:"outline","aria-label":`Browse for the ${a.label} install folder`,onClick:h,children:"Browse"})]}),o?s.jsx("p",{id:g,role:"alert",className:"text-sm text-destructive",children:C}):null,s.jsxs("div",{className:"flex flex-wrap items-start gap-x-6 gap-y-3 pt-3",children:[s.jsx(Q,{label:`Model for ${a.label}`,options:a.modelOptions.map(t=>({value:t.model,label:t.label})),value:N,errorMessage:E,className:"w-60",onChange:t=>{const j=a.modelOptions.find(k=>k.model===t);j!==void 0&&I(j)}}),(d==null?void 0:d.hasEffortChoice)===!0?s.jsx(W,{label:`Effort for ${a.label}`,options:d.effortOptions.map(t=>({value:t.effort,label:t.label})),value:S,onChange:F}):null]}),v===null?null:s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:v})]}):null]})},se=({agents:a,defaultAgent:y,connection:u,connectionOptions:w,problem:l,children:N,folderBrowser:S,folderBrowserErrorMessage:C,onBrowseFolder:E,onBrowseEnd:v,onSubmit:B})=>{const A=n.useId(),O=n.useId(),[I,F]=n.useState(()=>Object.fromEntries(a.map(e=>[e.agent,e.isPicked]))),[h,d]=n.useState(()=>Object.fromEntries(a.map(e=>[e.agent,e.installPath]))),[f,x]=n.useState(()=>Object.fromEntries(a.map(e=>[e.agent,e.model]))),[g,o]=n.useState(()=>Object.fromEntries(a.map(e=>[e.agent,e.effort]))),[b,t]=n.useState(y),[j,k]=n.useState(u),[m,D]=n.useState(null),M=e=>{D(e),E(h[e.agent]??"")},P=()=>{D(null),v()},T=e=>{m!==null&&d(i=>({...i,[m.agent]:e})),P()},G=()=>{B({agents:a.map(e=>({agent:e.agent,isPicked:I[e.agent]??!1,installPath:h[e.agent]??"",model:f[e.agent]??e.model,effort:g[e.agent]??e.effort})),defaultAgent:b,connection:j})};return s.jsxs("form",{action:G,children:[s.jsx("ul",{className:"border-t border-border",children:a.map(e=>{var i,R,$;return s.jsx(Y,{option:e,groupName:A,isPicked:I[e.agent]??!1,isDefault:b===e.agent,installPath:h[e.agent]??"",model:f[e.agent]??e.model,effort:g[e.agent]??e.effort,pathErrorMessage:((i=l==null?void 0:l.field)==null?void 0:i.owner)===e.agent&&!V.includes(l.field.name)?l.message:null,modelErrorMessage:((R=l==null?void 0:l.field)==null?void 0:R.owner)===e.agent&&l.field.name===L?l.message:null,effortErrorMessage:(($=l==null?void 0:l.field)==null?void 0:$.owner)===e.agent&&l.field.name===_?l.message:null,onPickedChange:c=>{F(r=>({...r,[e.agent]:c}))},onDefaultChange:()=>{t(e.agent)},onInstallPathChange:c=>{d(r=>({...r,[e.agent]:c}))},onModelChange:c=>{x(r=>({...r,[e.agent]:c.model})),o(r=>({...r,[e.agent]:c.selectedEffort}))},onEffortChange:c=>{o(r=>({...r,[e.agent]:c}))},onBrowse:()=>{M(e)}},e.agent)})}),s.jsxs("fieldset",{children:[s.jsx("legend",{className:J,children:"How Flight Plan reaches the agent"}),s.jsx("ul",{className:"border-t border-border",children:w.map(e=>s.jsxs("li",{className:"border-b border-border py-3 last:border-b-0",children:[s.jsxs("label",{className:"flex cursor-pointer items-start gap-3",children:[s.jsx("input",{type:"radio",name:O,checked:j===e.connection,className:`${p} mt-1`,onChange:()=>{k(e.connection)}}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"font-bold",children:e.label}),e.tagLabel===null?null:s.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:e.tagLabel}),s.jsx("span",{className:"block max-w-[62ch] text-sm text-muted-foreground",children:e.description})]})]}),e.unavailableFeatures.length>0?s.jsxs("div",{className:"mt-2 pl-7 text-sm",children:[s.jsx("p",{children:"Not available when you prompt the agent yourself:"}),s.jsx("ul",{className:"list-disc pl-5 text-muted-foreground",children:e.unavailableFeatures.map(i=>s.jsx("li",{children:i},i))})]}):null]},e.connection))})]}),N,s.jsx(q,{isOpen:m!==null,title:`Install folder for ${(m==null?void 0:m.label)??""}`,description:K,browser:S,errorMessage:C,onOpenFolder:E,onChooseRepository:X,onChooseFolder:T,onClose:P})]})};export{se as A};
@@ -1 +1 @@
1
- import{u as o,j as e,B as r}from"./index-CX9sF5Fh.js";import{P as a}from"./index-CqVakH8R.js";const n="The backend did not say what went wrong.",m=({error:s})=>{const t=o();return e.jsxs("section",{role:"alert",className:"max-w-prose",children:[e.jsx("h1",{className:a,children:"Could not load the setup"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s instanceof Error?s.message:n}),e.jsx(r,{className:"mt-4",onClick:()=>{t.invalidate()},children:"Try again"})]})};export{m as errorComponent};
1
+ import{u as o,j as e,B as r}from"./index-DfRj4oZV.js";import{P as a}from"./index-CqVakH8R.js";const n="The backend did not say what went wrong.",m=({error:s})=>{const t=o();return e.jsxs("section",{role:"alert",className:"max-w-prose",children:[e.jsx("h1",{className:a,children:"Could not load the setup"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s instanceof Error?s.message:n}),e.jsx(r,{className:"mt-4",onClick:()=>{t.invalidate()},children:"Try again"})]})};export{m as errorComponent};
@@ -1 +1 @@
1
- import{r as x,j as t,B as a}from"./index-CX9sF5Fh.js";import{T as p}from"./index-h6dRc3tV.js";const j=({label:r,markdown:s,isSaving:e,errorMessage:o,renderCodeLinkDialog:n,onSave:i,onCancel:c})=>{const[d,l]=x.useState(s);return t.jsxs("form",{action:()=>{i(d)},className:"grid gap-3",children:[t.jsx(p,{label:r,value:s,errorMessage:o,renderCodeLinkDialog:n,onChange:l}),t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx(a,{type:"button",variant:"ghost",onClick:c,children:"Cancel"}),t.jsx(a,{type:"submit",disabled:e,children:e?"Saving…":"Save"})]})]})};export{j as default};
1
+ import{r as x,j as t,B as a}from"./index-DfRj4oZV.js";import{T as p}from"./index-CR5UGYQN.js";const j=({label:r,markdown:s,isSaving:e,errorMessage:o,renderCodeLinkDialog:n,onSave:i,onCancel:c})=>{const[d,l]=x.useState(s);return t.jsxs("form",{action:()=>{i(d)},className:"grid gap-3",children:[t.jsx(p,{label:r,value:s,errorMessage:o,renderCodeLinkDialog:n,onChange:l}),t.jsxs("div",{className:"flex justify-end gap-2",children:[t.jsx(a,{type:"button",variant:"ghost",onClick:c,children:"Cancel"}),t.jsx(a,{type:"submit",disabled:e,children:e?"Saving…":"Save"})]})]})};export{j as default};
@@ -1 +1 @@
1
- import{j as e,D as f,x as v,y as C,z as y,C as R,E as D,r as N,G as m,B as t}from"./index-CX9sF5Fh.js";import{R as b}from"./index-DvVl2gWR.js";const k=({name:n,isSaving:s,isRemoving:o,onRemove:r,onClose:a})=>{const[l,i]=N.useState(!1);return l?e.jsxs("div",{className:"grid gap-3",children:[e.jsx("p",{children:`Remove ${n} from Flight Plan? Its folder on disk is not touched.`}),e.jsxs(m,{children:[e.jsx(t,{type:"button",variant:"ghost",onClick:()=>{i(!1)},children:"Keep"}),e.jsx(t,{type:"button",variant:"destructive",disabled:o,onClick:r,children:o?"Removing…":"Remove"})]})]}):e.jsxs(m,{children:[e.jsx(t,{type:"button",variant:"outline",className:"sm:mr-auto",onClick:()=>{i(!0)},children:"Remove repository"}),e.jsx(t,{type:"button",variant:"ghost",onClick:a,children:"Cancel"}),e.jsx(t,{type:"submit",disabled:s,children:s?"Saving…":"Save"})]})},E=({isOpen:n,name:s,path:o,configurationHref:r,authors:a,isSaving:l,isRemoving:i,errorMessage:c,onAuthorQueryChange:x,onAuthorSelect:h,onSelfAuthorRemove:p,onTrackedAuthorRemove:g,onSave:u,onRemove:j,onClose:d})=>e.jsx(f,{open:n,onOpenChange:D(d),children:e.jsxs(v,{className:"sm:max-w-lg",children:[e.jsxs(C,{children:[e.jsx(y,{children:`Configure ${s}`}),e.jsx(R,{children:"Choose the users Flight Plan follows in this repository."})]}),e.jsxs("form",{action:u,className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-1.5",children:[e.jsx("p",{className:"text-sm font-bold",children:"Repository folder"}),e.jsx("p",{className:"font-mono text-[0.82rem] wrap-anywhere text-muted-foreground",children:o})]}),e.jsx(b,{authors:a,onAuthorQueryChange:x,onAuthorSelect:h,onSelfAuthorRemove:p,onTrackedAuthorRemove:g}),e.jsx("a",{href:r,className:"w-fit text-sm underline",children:"Prompt configurations"}),c===null?null:e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:c}),e.jsx(k,{name:s,isSaving:l,isRemoving:i,onRemove:j,onClose:d})]})]})});export{E as C};
1
+ import{j as e,D as f,a as v,b as C,c as y,d as R,f as b,r as D,e as m,B as t}from"./index-DfRj4oZV.js";import{R as N}from"./index-D-k5POv5.js";const k=({name:n,isSaving:s,isRemoving:o,onRemove:r,onClose:a})=>{const[l,i]=D.useState(!1);return l?e.jsxs("div",{className:"grid gap-3",children:[e.jsx("p",{children:`Remove ${n} from Flight Plan? Its folder on disk is not touched.`}),e.jsxs(m,{children:[e.jsx(t,{type:"button",variant:"ghost",onClick:()=>{i(!1)},children:"Keep"}),e.jsx(t,{type:"button",variant:"destructive",disabled:o,onClick:r,children:o?"Removing…":"Remove"})]})]}):e.jsxs(m,{children:[e.jsx(t,{type:"button",variant:"outline",className:"sm:mr-auto",onClick:()=>{i(!0)},children:"Remove repository"}),e.jsx(t,{type:"button",variant:"ghost",onClick:a,children:"Cancel"}),e.jsx(t,{type:"submit",disabled:s,children:s?"Saving…":"Save"})]})},P=({isOpen:n,name:s,path:o,configurationHref:r,authors:a,isSaving:l,isRemoving:i,errorMessage:c,onAuthorQueryChange:x,onAuthorSelect:h,onSelfAuthorRemove:p,onTrackedAuthorRemove:g,onSave:u,onRemove:j,onClose:d})=>e.jsx(f,{open:n,onOpenChange:b(d),children:e.jsxs(v,{className:"sm:max-w-lg",children:[e.jsxs(C,{children:[e.jsx(y,{children:`Configure ${s}`}),e.jsx(R,{children:"Choose the users Flight Plan follows in this repository."})]}),e.jsxs("form",{action:u,className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-1.5",children:[e.jsx("p",{className:"text-sm font-bold",children:"Repository folder"}),e.jsx("p",{className:"font-mono text-[0.82rem] wrap-anywhere text-muted-foreground",children:o})]}),e.jsx(N,{authors:a,onAuthorQueryChange:x,onAuthorSelect:h,onSelfAuthorRemove:p,onTrackedAuthorRemove:g}),e.jsx("a",{href:r,className:"w-fit text-sm underline",children:"Prompt configurations"}),c===null?null:e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:c}),e.jsx(k,{name:s,isSaving:l,isRemoving:i,onRemove:j,onClose:d})]})]})});export{P as C};
@@ -1 +1 @@
1
- import{h as j,i as S,l as y,r as m,j as s,N as R,B as h}from"./index-CX9sF5Fh.js";import{T as b}from"./index-h6dRc3tV.js";const M=(d,u,t)=>{var r,c;const e=j(),p=S(),a=y(e.review.editBlast.mutationOptions({onSuccess:async n=>{n.kind==="saved"&&(await p.invalidateQueries(e.review.get.pathFilter()),t())}})),i=((r=a.data)==null?void 0:r.kind)==="rejected"?a.data.message:null;return{isSaving:a.isPending,errorMessage:i??((c=a.error)==null?void 0:c.message)??null,onSave:n=>{a.mutate({...d,path:u,...n})}}},C=({reviewKey:d,path:u,assessment:t,form:e,renderCodeLinkDialog:p,onClose:a})=>{const[i,r]=m.useState(t.impactType),[c,n]=m.useState(t.impactReason),o=M(d,u,a),g=e.choices.some(l=>l.value===i&&l.hasReason);return s.jsxs("form",{action:()=>{o.onSave({impactType:i,impactReason:c})},className:"grid gap-3",children:[s.jsx(R,{label:e.impactTypeLabel,options:e.choices,value:i,errorMessage:g?null:o.errorMessage,onChange:l=>{const v=e.choices.find(x=>x.value===l);v!==void 0&&r(v.value)}}),s.jsx("div",{hidden:!g,children:s.jsx(b,{label:e.impactReasonLabel,value:t.impactReason,errorMessage:g?o.errorMessage:null,renderCodeLinkDialog:p,onChange:n})}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(h,{type:"button",variant:"ghost",onClick:a,children:"Cancel"}),s.jsx(h,{type:"submit",disabled:o.isSaving,children:o.isSaving?"Saving…":"Save"})]})]})};export{C as default};
1
+ import{g as j,h as S,k as y,r as m,j as s,P as R,B as h}from"./index-DfRj4oZV.js";import{T as b}from"./index-CR5UGYQN.js";const M=(d,u,t)=>{var r,c;const e=j(),p=S(),a=y(e.review.editBlast.mutationOptions({onSuccess:async n=>{n.kind==="saved"&&(await p.invalidateQueries(e.review.get.pathFilter()),t())}})),i=((r=a.data)==null?void 0:r.kind)==="rejected"?a.data.message:null;return{isSaving:a.isPending,errorMessage:i??((c=a.error)==null?void 0:c.message)??null,onSave:n=>{a.mutate({...d,path:u,...n})}}},C=({reviewKey:d,path:u,assessment:t,form:e,renderCodeLinkDialog:p,onClose:a})=>{const[i,r]=m.useState(t.impactType),[c,n]=m.useState(t.impactReason),o=M(d,u,a),g=e.choices.some(l=>l.value===i&&l.hasReason);return s.jsxs("form",{action:()=>{o.onSave({impactType:i,impactReason:c})},className:"grid gap-3",children:[s.jsx(R,{label:e.impactTypeLabel,options:e.choices,value:i,errorMessage:g?null:o.errorMessage,onChange:l=>{const v=e.choices.find(x=>x.value===l);v!==void 0&&r(v.value)}}),s.jsx("div",{hidden:!g,children:s.jsx(b,{label:e.impactReasonLabel,value:t.impactReason,errorMessage:g?o.errorMessage:null,renderCodeLinkDialog:p,onChange:n})}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(h,{type:"button",variant:"ghost",onClick:a,children:"Cancel"}),s.jsx(h,{type:"submit",disabled:o.isSaving,children:o.isSaving?"Saving…":"Save"})]})]})};export{C as default};
@@ -1 +1 @@
1
- import{u as n,j as t,B as a}from"./index-CX9sF5Fh.js";const o="The backend did not say what went wrong.",i=({error:e})=>{const s=n();return t.jsxs("section",{role:"alert",className:"max-w-prose",children:[t.jsx("h2",{className:"text-2xl leading-8 font-bold tracking-[-0.015em]",children:"Could not load the settings"}),t.jsx("p",{className:"mt-2 text-muted-foreground",children:e instanceof Error?e.message:o}),t.jsx(a,{className:"mt-4",onClick:()=>{s.invalidate()},children:"Try again"})]})};export{i as S};
1
+ import{u as n,j as t,B as a}from"./index-DfRj4oZV.js";const o="The backend did not say what went wrong.",i=({error:e})=>{const s=n();return t.jsxs("section",{role:"alert",className:"max-w-prose",children:[t.jsx("h2",{className:"text-2xl leading-8 font-bold tracking-[-0.015em]",children:"Could not load the settings"}),t.jsx("p",{className:"mt-2 text-muted-foreground",children:e instanceof Error?e.message:o}),t.jsx(a,{className:"mt-4",onClick:()=>{s.invalidate()},children:"Try again"})]})};export{i as S};
@@ -1 +1 @@
1
- import{j as t}from"./index-CX9sF5Fh.js";const x=({title:e,children:s})=>t.jsxs("header",{className:"pb-6",children:[t.jsx("h2",{className:"text-2xl leading-8 font-bold tracking-[-0.015em] text-signal-text",children:e}),t.jsx("p",{className:"mt-2 max-w-[62ch] text-muted-foreground",children:s})]});export{x as S};
1
+ import{j as t}from"./index-DfRj4oZV.js";const x=({title:e,children:s})=>t.jsxs("header",{className:"pb-6",children:[t.jsx("h2",{className:"text-2xl leading-8 font-bold tracking-[-0.015em] text-signal-text",children:e}),t.jsx("p",{className:"mt-2 max-w-[62ch] text-muted-foreground",children:s})]});export{x as S};
@@ -1 +1 @@
1
- import{u as r,j as o,B as t}from"./index-CX9sF5Fh.js";import{P as a}from"./index-s0xxzhVW.js";const n="The backend did not say what went wrong.",m=({error:e})=>{const s=r();return o.jsxs("section",{role:"alert",className:"max-w-prose",children:[o.jsx("h1",{className:a,children:"Could not load your repositories"}),o.jsx("p",{className:"mt-2 text-muted-foreground",children:e instanceof Error?e.message:n}),o.jsx(t,{className:"mt-4",onClick:()=>{s.invalidate()},children:"Try again"})]})};export{m as errorComponent};
1
+ import{u as r,j as o,B as t}from"./index-DfRj4oZV.js";import{P as a}from"./index-s0xxzhVW.js";const n="The backend did not say what went wrong.",m=({error:e})=>{const s=r();return o.jsxs("section",{role:"alert",className:"max-w-prose",children:[o.jsx("h1",{className:a,children:"Could not load your repositories"}),o.jsx("p",{className:"mt-2 text-muted-foreground",children:e instanceof Error?e.message:n}),o.jsx(t,{className:"mt-4",onClick:()=>{s.invalidate()},children:"Try again"})]})};export{m as errorComponent};
@@ -0,0 +1 @@
1
+ import{j as e,D as K,a as X,b as Y,c as Z,d as ee,S as se,e as ae,B as R,f as te,g as B,h as H,r as j,i as M,k as S,l as ne,F as U,m as z,A as E,n as G,L as y,o as V,p as $,q as re,s as le,I as O,t as oe,v as ie,R as P,w as ce}from"./index-DfRj4oZV.js";import{P as de}from"./index-s0xxzhVW.js";import{L as ue,u as me,a as Q,A as xe}from"./index-D-k5POv5.js";import{C as he}from"./index-QabB0_Qw.js";import"./index-Dn9qaXzX.js";const ge="Search the local and remote branches. A branch with an open pull request is added as that pull request.",pe="Branch",fe="Search branches and pull requests",be=({title:t,search:a,errorMessage:s,onQueryChange:c,onSelect:l,onClose:o})=>e.jsx(K,{open:!0,onOpenChange:te(o),children:e.jsxs(X,{className:"sm:max-w-lg",children:[e.jsxs(Y,{children:[e.jsx(Z,{children:t}),e.jsx(ee,{children:ge})]}),e.jsx(se,{label:pe,hint:null,placeholder:fe,value:a.query,suggestions:a.options,message:a.message,errorMessage:s,onValueChange:c,onSelect:l}),e.jsx(ae,{children:e.jsx(R,{type:"button",variant:"ghost",onClick:o,children:"Cancel"})})]})}),je="Searching…",Ne="Adding…",Se=(t,a)=>{var d,r,f,g;const s=B(),c=H(),[l,o]=j.useState(""),i=j.useDeferredValue(l),m=M({...s.repository.searchTargets.queryOptions({repositoryName:t,query:i}),placeholderData:ne}),x=S(s.repository.addTarget.mutationOptions({onSuccess:async()=>{await c.invalidateQueries(s.repository.list.pathFilter()),a()}}));return{search:{query:l,options:x.isPending?[]:((d=m.data)==null?void 0:d.options)??[],message:x.isPending?Ne:((r=m.data)==null?void 0:r.message)??(m.isPending?je:null)},errorMessage:((f=x.error)==null?void 0:f.message)??((g=m.error)==null?void 0:g.message)??null,onQueryChange:p=>{x.reset(),o(p)},onSelect:p=>{x.mutate({repositoryName:t,targetId:p})}}},ye="Show all authors",ve=({buttonLabel:t,isDefault:a,options:s,onSelect:c})=>e.jsxs(U,{label:t,children:[s.map(l=>e.jsx(z,{label:l.label,countLabel:l.countLabel,isSelected:l.isSelected,marker:l.person===null?e.jsx("span",{className:"size-5 shrink-0"}):e.jsx(E,{imageUrl:l.person.avatarUrl,monogram:l.person.monogram}),onToggle:()=>{c(l.toggledAuthors)}},l.key)),a?null:e.jsx(G,{label:ye,onReset:()=>{c(null)}})]}),Le=()=>e.jsxs("section",{className:"max-w-prose border-t-2 border-foreground pt-5",children:[e.jsx("h2",{className:"text-xl leading-7 font-bold",children:"No repositories yet"}),e.jsx("p",{className:"mt-1 text-muted-foreground",children:"Flight Plan lists the repository it is started in. Start it inside a repository, or add one here by its folder path. Each repository then shows its open pull requests and branches, with the status of their reviews."})]}),we=({kindLabel:t,title:a,details:s,author:c,updatedLabel:l,createReviewHref:o,isDismissing:i,onDismiss:m})=>e.jsxs("li",{className:"grid grid-cols-[2.5rem_minmax(0,1fr)]",children:[e.jsx("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:e.jsx("span",{className:"w-1 flex-1 bg-(--line)"})}),e.jsxs("div",{className:"my-1 flex flex-wrap items-center gap-x-4 gap-y-2 rounded-sm bg-muted px-3 py-2",children:[e.jsxs("div",{className:"min-w-0 flex-1 basis-72",children:[e.jsxs("p",{className:"flex flex-wrap items-baseline gap-x-2 text-sm",children:[e.jsx("span",{className:"font-bold",children:t}),e.jsx("span",{className:"text-muted-foreground tabular-nums",children:l})]}),e.jsx(y,{segments:[a],className:"leading-6"}),e.jsxs("span",{className:"flex flex-wrap items-center gap-x-3 text-sm text-muted-foreground",children:[e.jsx(y,{segments:s}),c===null?null:e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(E,{imageUrl:c.avatarUrl,monogram:c.monogram,className:"size-4"}),c.name]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("a",{href:o,className:V({variant:"default",size:"sm"}),children:e.jsx("span",{className:"text-box-cap",children:"Create Flight Plan"})}),e.jsx(R,{variant:"ghost",size:"sm",disabled:i,onClick:m,children:"Dismiss"})]})]})]}),Ce="before:absolute before:-inset-x-3 before:inset-y-0 before:-z-10 before:rounded-sm before:transition-colors before:duration-[180ms] before:ease-out hover:before:bg-muted",Ae=({title:t,details:a,author:s,repositoryName:c,targetId:l,branchStatus:o,statusLabel:i,updatedLabel:m})=>e.jsxs("li",{className:`group relative isolate grid grid-cols-[2.5rem_minmax(0,1fr)] ${Ce}`,children:[e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx("span",{className:"h-3 w-1 bg-(--line)"}),e.jsx($,{status:o}),e.jsx("span",{className:"w-1 flex-1 bg-(--line) group-last:invisible"})]}),e.jsxs(re,{to:"/pr-reviews/$repoName/$branchId",params:{repoName:c,branchId:l},className:"grid gap-x-4 gap-y-0.5 py-2.5 outline-none after:absolute after:-inset-x-3 after:inset-y-0 after:rounded-sm focus-visible:after:outline-2 focus-visible:after:outline-ring sm:grid-cols-[minmax(0,1fr)_8rem_8rem_7.5rem] sm:items-baseline",children:[e.jsxs("span",{className:"min-w-0",children:[e.jsx(y,{segments:[t],className:"leading-6"}),e.jsx(y,{segments:a,className:"text-sm text-muted-foreground"})]}),e.jsxs("span",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm sm:contents",children:[s===null?e.jsx("span",{className:"hidden sm:block"}):e.jsxs("span",{className:"flex min-w-0 items-center gap-2 sm:h-6 sm:self-start",children:[e.jsx(E,{imageUrl:s.avatarUrl,monogram:s.monogram}),e.jsx("span",{className:"truncate",children:s.name})]}),e.jsx("span",{className:le[o],children:i}),e.jsx("span",{className:"text-muted-foreground tabular-nums sm:text-right",children:m})]})]})]}),A="grid grid-cols-[2.5rem_minmax(0,1fr)]",q=()=>e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx("span",{className:"h-4 w-1 bg-(--line)"}),e.jsx("span",{className:"h-1 w-4 bg-(--line)"})]}),Re=({repositoryName:t,content:a})=>a.kind==="targets"?e.jsx("ol",{children:a.targets.map(s=>e.jsx(Ae,{title:s.title,details:s.details,author:s.author,repositoryName:t,targetId:s.id,branchStatus:s.branchStatus,statusLabel:s.statusLabel,updatedLabel:s.updatedLabel},s.id))}):a.kind==="problem"?e.jsxs("div",{className:A,children:[e.jsx(q,{}),e.jsxs("div",{className:"grid gap-1 py-1.5",children:[e.jsxs("p",{className:"text-sm",children:[a.message," ",e.jsx("a",{href:a.actionHref,className:"underline",children:a.actionLabel})]}),a.detail===null?null:e.jsx("p",{className:"font-mono text-[0.82rem] wrap-anywhere text-muted-foreground",children:a.detail})]})]}):e.jsxs("div",{className:A,children:[e.jsx(q,{}),e.jsx("p",{className:"py-1.5 text-sm text-muted-foreground",children:a.message})]}),Ee=({name:t,lineColor:a,lineLabel:s,source:c,countLabel:l,createReviewHref:o,configurationLabel:i,addTargetLabel:m,newTargets:x,content:d,isDismissing:r,onDismissNewTarget:f,onConfigure:g,onAddTarget:p})=>{const h=j.useId();return e.jsxs("section",{"aria-labelledby":h,className:oe("border-t-2 border-foreground pt-5 pb-6",ie[a]),children:[e.jsxs("div",{className:A,children:[e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx(ue,{label:s}),e.jsx("span",{className:"w-1 flex-1 bg-(--line)"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 pb-2",children:[e.jsxs("div",{className:"min-w-0 flex-1 basis-64",children:[e.jsx("h2",{id:h,className:"text-xl leading-7 font-semibold tracking-[-0.01em] text-foreground",children:t}),e.jsx(y,{segments:c,className:"text-sm text-muted-foreground"})]}),e.jsx("p",{className:"text-sm text-muted-foreground tabular-nums",children:l}),e.jsx("a",{href:o,className:V({variant:"outline",size:"sm"}),children:e.jsx("span",{className:"text-box-cap",children:"Create Flight Plan"})}),e.jsx(O,{icon:"add",label:m,onClick:p}),e.jsx(O,{icon:"settings",label:i,onClick:g})]})]}),e.jsx("ul",{children:x.map(u=>e.jsx(we,{kindLabel:u.kindLabel,title:u.title,details:u.details,author:u.author,updatedLabel:u.updatedLabel,createReviewHref:u.createReviewHref,isDismissing:r,onDismiss:()=>{f(u.id)}},u.id))}),e.jsx(Re,{repositoryName:t,content:d})]})},Fe="Reset to the default statuses",Te=({buttonLabel:t,isDefault:a,options:s,onSelect:c,onReset:l})=>e.jsxs(U,{label:t,children:[s.map(o=>e.jsx(z,{label:o.label,countLabel:o.countLabel,isSelected:o.isSelected,marker:e.jsx($,{status:o.status,className:"size-4 [--line:var(--muted-foreground)]"}),onToggle:()=>{c(o.toggledStatuses)}},o.status)),a?null:e.jsx(G,{label:Fe,onReset:l})]}),De=5e3,ke=({repository:t,onClose:a})=>{const s=Se(t.name,a);return e.jsx(be,{title:t.title,search:s.search,errorMessage:s.errorMessage,onQueryChange:s.onQueryChange,onSelect:s.onSelect,onClose:a})},qe=()=>{var T,D,k,_,I;const t=B(),a=H(),{status:s=null,author:c=null,fixtureCase:l}=P.useSearch(),o=P.useNavigate(),{data:i}=ce({...t.repository.list.queryOptions({statuses:s,authors:c,fixtureCase:l}),refetchInterval:De}),[m,x]=j.useState(!1),d=me(m),[r,f]=j.useState(null),[g,p]=j.useState(null),h=Q({isEnabled:m,folderPath:d.search.query,repositoryName:null,saved:null}),u=S(t.repository.add.mutationOptions({onSuccess:async()=>{x(!1),d.reset(),h.reset(),await a.invalidateQueries(t.repository.list.pathFilter())}})),w=M({...t.repository.configuration.queryOptions({name:(r==null?void 0:r.name)??""}),enabled:r!==null}),b=Q({isEnabled:r!==null,folderPath:"",repositoryName:(r==null?void 0:r.name)??null,saved:w.data??null}),C=()=>{f(null),b.reset()},v=S(t.repository.configure.mutationOptions({onSuccess:async()=>{C(),await a.invalidateQueries(t.repository.pathFilter())}})),L=S(t.repository.remove.mutationOptions({onSuccess:async()=>{C(),await a.invalidateQueries(t.repository.pathFilter())}})),F=S(t.repository.dismissNewTarget.mutationOptions({onSuccess:async()=>{await a.invalidateQueries(t.repository.list.pathFilter())}})),W=()=>{v.reset(),L.reset(),C()},J=()=>{u.reset(),d.reset(),h.reset(),x(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-2 pb-3",children:[e.jsx("h1",{className:de,children:"Repositories"}),i.kind==="repositories"?e.jsx("p",{className:"text-sm text-muted-foreground tabular-nums",children:i.summaryLabel}):null,e.jsx("span",{className:"flex-1"}),e.jsx(R,{onClick:()=>{x(!0)},children:"Add repository"})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-6 gap-y-2 pb-5",children:[i.notice===null?e.jsx("span",{}):e.jsx("p",{className:"text-sm text-muted-foreground",children:i.notice}),i.kind==="repositories"?e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(Te,{buttonLabel:i.statusFilter.buttonLabel,isDefault:i.statusFilter.isDefault,options:i.statusFilter.options,onSelect:n=>{o({search:N=>({...N,status:[...n]})})},onReset:()=>{o({search:n=>({...n,status:void 0})})}}),e.jsx(ve,{buttonLabel:i.authorFilter.buttonLabel,isDefault:i.authorFilter.isDefault,options:i.authorFilter.options,onSelect:n=>{o({search:N=>({...N,author:n==null?void 0:n.slice()})})}})]}):null]}),e.jsx(xe,{isOpen:m,search:d.search,browse:d.browse,authors:h.authors,isAdding:u.isPending,errorMessage:((T=u.error)==null?void 0:T.message)??null,onQueryChange:d.onQueryChange,onChooseFolder:n=>{u.reset(),d.onChooseFolder(n)},onAuthorQueryChange:h.onAuthorQueryChange,onAuthorSelect:h.onAuthorSelect,onSelfAuthorRemove:h.onSelfAuthorRemove,onTrackedAuthorRemove:h.onTrackedAuthorRemove,onSubmit:()=>{u.mutate({path:d.search.query,...h.selection})},onBrowse:()=>{u.reset(),d.onBrowse()},onBrowseFolder:d.onBrowseFolder,onBrowseClose:()=>{u.reset(),d.onBrowseClose()},onClose:J}),e.jsx(he,{isOpen:r!==null,name:(r==null?void 0:r.name)??"",path:((D=w.data)==null?void 0:D.path)??"",configurationHref:(r==null?void 0:r.configurationHref)??"",authors:b.authors,isSaving:v.isPending,isRemoving:L.isPending,errorMessage:((k=v.error)==null?void 0:k.message)??((_=L.error)==null?void 0:_.message)??((I=w.error)==null?void 0:I.message)??null,onAuthorQueryChange:b.onAuthorQueryChange,onAuthorSelect:b.onAuthorSelect,onSelfAuthorRemove:b.onSelfAuthorRemove,onTrackedAuthorRemove:b.onTrackedAuthorRemove,onSave:()=>{r!==null&&v.mutate({repositoryName:r.name,...b.selection})},onRemove:()=>{r!==null&&L.mutate({name:r.name})},onClose:W}),g===null?null:e.jsx(ke,{repository:g,onClose:()=>{p(null)}},g.name),i.kind==="repositories"?i.repositories.map(n=>e.jsx(Ee,{name:n.name,lineColor:n.lineColor,lineLabel:n.lineLabel,source:n.source,countLabel:n.countLabel,createReviewHref:n.createReviewHref,configurationLabel:n.configurationLabel,addTargetLabel:n.addTargetLabel,newTargets:n.newTargets,content:n.content,isDismissing:F.isPending,onConfigure:()=>{f({name:n.name,configurationHref:n.configurationHref})},onAddTarget:()=>{p({name:n.name,title:n.addTargetLabel})},onDismissNewTarget:N=>{F.mutate({repositoryName:n.name,targetId:N})}},n.name)):e.jsx(Le,{}),null]})};export{qe as component};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-XcYy-NBi.js";import"./index-DfRj4oZV.js";const n=r;export{n as errorComponent};
@@ -1 +1 @@
1
- import{r as y,j as e,I as E,f as F,g as I,S as Q,A as k,h as T,i as B,k as P,w as R,m as M,l as j,B as q}from"./index-CX9sF5Fh.js";import{L as _,u as D,a as L,A as H}from"./index-DvVl2gWR.js";import{C as U}from"./index-xoWXUJLW.js";import{S as $}from"./index-BsRx8Pzi.js";import"./index-D3gI7yfx.js";const A="grid grid-cols-[2.5rem_minmax(0,1fr)]",G="You",O=({author:o,isSelf:r})=>e.jsxs("li",{className:A,children:[e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx("span",{className:"h-2 w-1 bg-(--line)"}),e.jsx(Q,{status:"merged"}),e.jsx("span",{className:"w-1 flex-1 bg-(--line)"})]}),e.jsxs("div",{className:"flex max-w-md items-center gap-2 py-1",children:[e.jsx(k,{imageUrl:o.avatarUrl,monogram:o.monogram}),e.jsx("span",{className:"min-w-0 truncate",children:o.name}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:o.detail}),r?e.jsx("span",{className:"text-sm font-bold",children:G}):null]})]}),Y=({name:o,path:r,lineColor:c,lineLabel:d,selfAuthor:m,trackedAuthors:s,emptyMessage:h,onConfigure:n})=>{const a=y.useId();return e.jsxs("section",{"aria-labelledby":a,className:F("border-t-2 border-foreground pt-5 pb-6",I[c]),children:[e.jsxs("div",{className:A,children:[e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx(_,{label:d}),e.jsx("span",{className:"w-1 flex-1 bg-(--line)"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 pb-2",children:[e.jsxs("div",{className:"min-w-0 flex-1 basis-64",children:[e.jsx("h3",{id:a,className:"text-xl leading-7 font-semibold tracking-[-0.01em] text-foreground",children:o}),e.jsx("p",{className:"font-mono text-[0.82rem] wrap-anywhere text-muted-foreground",children:r})]}),e.jsx(E,{icon:"settings",label:`Configure ${o}`,onClick:n})]})]}),e.jsxs("ul",{"aria-label":`Users followed in ${o}`,children:[m===null?null:e.jsx(O,{author:m,isSelf:!0}),s.map(u=>e.jsx(O,{author:u,isSelf:!1},u.id))]}),e.jsxs("div",{className:A,children:[e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx("span",{className:"h-4 w-1 bg-(--line)"}),e.jsx("span",{className:"h-1 w-4 bg-(--line)"})]}),h===null?null:e.jsx("p",{className:"py-1.5 text-sm text-muted-foreground",children:h})]})]})},z="Repositories • Settings • Flight Plan",J="Repositories",ee=()=>{var b,C,N,v,w;const o=T(),r=B(),{data:c}=P(o.settings.get.queryOptions(R)),[d,m]=y.useState(!1),[s,h]=y.useState(null),n=D(d),a=L({isEnabled:d,folderPath:n.search.query,repositoryName:null,saved:null}),u=M({...o.repository.configuration.queryOptions({name:(s==null?void 0:s.name)??""}),enabled:s!==null}),l=L({isEnabled:s!==null,folderPath:"",repositoryName:(s==null?void 0:s.name)??null,saved:u.data??null}),g=async()=>{r.removeQueries({type:"inactive"}),await Promise.all([r.invalidateQueries(o.settings.pathFilter()),r.invalidateQueries(o.repository.pathFilter())])},S=()=>{m(!1),n.reset(),a.reset()},f=()=>{h(null),l.reset()},i=j(o.repository.add.mutationOptions({onSuccess:async()=>{S(),await g()}})),p=j(o.repository.configure.mutationOptions({onSuccess:async()=>{f(),await g()}})),x=j(o.repository.remove.mutationOptions({onSuccess:async()=>{f(),await g()}}));return c.section!==R.section?null:e.jsxs(e.Fragment,{children:[e.jsx("title",{children:z}),e.jsx($,{title:J,children:"Flight Plan lists the pull requests and branches of each repository you add, and follows the users you track in it."}),e.jsx("div",{className:"pb-6",children:e.jsx(q,{type:"button",onClick:()=>{m(!0)},children:"Add repository"})}),c.emptyMessage===null?null:e.jsx("p",{className:"border-t-2 border-foreground pt-5 text-sm text-muted-foreground",children:c.emptyMessage}),c.repositories.map(t=>e.jsx(Y,{name:t.name,path:t.path,lineColor:t.lineColor,lineLabel:t.lineLabel,selfAuthor:t.selfAuthor,trackedAuthors:t.trackedAuthors,emptyMessage:t.emptyMessage,onConfigure:()=>{h({name:t.name,configurationHref:t.configurationHref})}},t.name)),e.jsx(H,{isOpen:d,search:n.search,browse:n.browse,authors:a.authors,isAdding:i.isPending,errorMessage:((b=i.error)==null?void 0:b.message)??null,onQueryChange:n.onQueryChange,onChooseFolder:t=>{i.reset(),n.onChooseFolder(t)},onAuthorQueryChange:a.onAuthorQueryChange,onAuthorSelect:a.onAuthorSelect,onSelfAuthorRemove:a.onSelfAuthorRemove,onTrackedAuthorRemove:a.onTrackedAuthorRemove,onSubmit:()=>{i.mutate({path:n.search.query,...a.selection})},onBrowse:()=>{i.reset(),n.onBrowse()},onBrowseFolder:n.onBrowseFolder,onBrowseClose:()=>{i.reset(),n.onBrowseClose()},onClose:()=>{i.reset(),S()}}),e.jsx(U,{isOpen:s!==null,name:(s==null?void 0:s.name)??"",path:((C=u.data)==null?void 0:C.path)??"",configurationHref:(s==null?void 0:s.configurationHref)??"",authors:l.authors,isSaving:p.isPending,isRemoving:x.isPending,errorMessage:((N=p.error)==null?void 0:N.message)??((v=x.error)==null?void 0:v.message)??((w=u.error)==null?void 0:w.message)??null,onAuthorQueryChange:l.onAuthorQueryChange,onAuthorSelect:l.onAuthorSelect,onSelfAuthorRemove:l.onSelfAuthorRemove,onTrackedAuthorRemove:l.onTrackedAuthorRemove,onSave:()=>{s!==null&&p.mutate({repositoryName:s.name,...l.selection})},onRemove:()=>{s!==null&&x.mutate({name:s.name})},onClose:()=>{p.reset(),x.reset(),f()}})]})};export{ee as component};
1
+ import{r as y,j as e,I as E,t as F,v as I,p as Q,A as k,g as T,h as B,w as P,J as R,i as M,k as j,B as q}from"./index-DfRj4oZV.js";import{L as _,u as D,a as L,A as H}from"./index-D-k5POv5.js";import{C as U}from"./index-QabB0_Qw.js";import{S as $}from"./index-efpZ6EEe.js";import"./index-Dn9qaXzX.js";const A="grid grid-cols-[2.5rem_minmax(0,1fr)]",G="You",O=({author:o,isSelf:r})=>e.jsxs("li",{className:A,children:[e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx("span",{className:"h-2 w-1 bg-(--line)"}),e.jsx(Q,{status:"merged"}),e.jsx("span",{className:"w-1 flex-1 bg-(--line)"})]}),e.jsxs("div",{className:"flex max-w-md items-center gap-2 py-1",children:[e.jsx(k,{imageUrl:o.avatarUrl,monogram:o.monogram}),e.jsx("span",{className:"min-w-0 truncate",children:o.name}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:o.detail}),r?e.jsx("span",{className:"text-sm font-bold",children:G}):null]})]}),J=({name:o,path:r,lineColor:c,lineLabel:d,selfAuthor:m,trackedAuthors:s,emptyMessage:h,onConfigure:n})=>{const a=y.useId();return e.jsxs("section",{"aria-labelledby":a,className:F("border-t-2 border-foreground pt-5 pb-6",I[c]),children:[e.jsxs("div",{className:A,children:[e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx(_,{label:d}),e.jsx("span",{className:"w-1 flex-1 bg-(--line)"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 pb-2",children:[e.jsxs("div",{className:"min-w-0 flex-1 basis-64",children:[e.jsx("h3",{id:a,className:"text-xl leading-7 font-semibold tracking-[-0.01em] text-foreground",children:o}),e.jsx("p",{className:"font-mono text-[0.82rem] wrap-anywhere text-muted-foreground",children:r})]}),e.jsx(E,{icon:"settings",label:`Configure ${o}`,onClick:n})]})]}),e.jsxs("ul",{"aria-label":`Users followed in ${o}`,children:[m===null?null:e.jsx(O,{author:m,isSelf:!0}),s.map(u=>e.jsx(O,{author:u,isSelf:!1},u.id))]}),e.jsxs("div",{className:A,children:[e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx("span",{className:"h-4 w-1 bg-(--line)"}),e.jsx("span",{className:"h-1 w-4 bg-(--line)"})]}),h===null?null:e.jsx("p",{className:"py-1.5 text-sm text-muted-foreground",children:h})]})]})},Y="Repositories • Settings • Flight Plan",z="Repositories",ee=()=>{var C,S,v,N,w;const o=T(),r=B(),{data:c}=P(o.settings.get.queryOptions(R)),[d,m]=y.useState(!1),[s,h]=y.useState(null),n=D(d),a=L({isEnabled:d,folderPath:n.search.query,repositoryName:null,saved:null}),u=M({...o.repository.configuration.queryOptions({name:(s==null?void 0:s.name)??""}),enabled:s!==null}),l=L({isEnabled:s!==null,folderPath:"",repositoryName:(s==null?void 0:s.name)??null,saved:u.data??null}),g=async()=>{r.removeQueries({type:"inactive"}),await Promise.all([r.invalidateQueries(o.settings.pathFilter()),r.invalidateQueries(o.repository.pathFilter())])},b=()=>{m(!1),n.reset(),a.reset()},f=()=>{h(null),l.reset()},i=j(o.repository.add.mutationOptions({onSuccess:async()=>{b(),await g()}})),p=j(o.repository.configure.mutationOptions({onSuccess:async()=>{f(),await g()}})),x=j(o.repository.remove.mutationOptions({onSuccess:async()=>{f(),await g()}}));return c.section!==R.section?null:e.jsxs(e.Fragment,{children:[e.jsx("title",{children:Y}),e.jsx($,{title:z,children:"Flight Plan lists the pull requests and branches of each repository you add, and follows the users you track in it."}),e.jsx("div",{className:"pb-6",children:e.jsx(q,{type:"button",onClick:()=>{m(!0)},children:"Add repository"})}),c.emptyMessage===null?null:e.jsx("p",{className:"border-t-2 border-foreground pt-5 text-sm text-muted-foreground",children:c.emptyMessage}),c.repositories.map(t=>e.jsx(J,{name:t.name,path:t.path,lineColor:t.lineColor,lineLabel:t.lineLabel,selfAuthor:t.selfAuthor,trackedAuthors:t.trackedAuthors,emptyMessage:t.emptyMessage,onConfigure:()=>{h({name:t.name,configurationHref:t.configurationHref})}},t.name)),e.jsx(H,{isOpen:d,search:n.search,browse:n.browse,authors:a.authors,isAdding:i.isPending,errorMessage:((C=i.error)==null?void 0:C.message)??null,onQueryChange:n.onQueryChange,onChooseFolder:t=>{i.reset(),n.onChooseFolder(t)},onAuthorQueryChange:a.onAuthorQueryChange,onAuthorSelect:a.onAuthorSelect,onSelfAuthorRemove:a.onSelfAuthorRemove,onTrackedAuthorRemove:a.onTrackedAuthorRemove,onSubmit:()=>{i.mutate({path:n.search.query,...a.selection})},onBrowse:()=>{i.reset(),n.onBrowse()},onBrowseFolder:n.onBrowseFolder,onBrowseClose:()=>{i.reset(),n.onBrowseClose()},onClose:()=>{i.reset(),b()}}),e.jsx(U,{isOpen:s!==null,name:(s==null?void 0:s.name)??"",path:((S=u.data)==null?void 0:S.path)??"",configurationHref:(s==null?void 0:s.configurationHref)??"",authors:l.authors,isSaving:p.isPending,isRemoving:x.isPending,errorMessage:((v=p.error)==null?void 0:v.message)??((N=x.error)==null?void 0:N.message)??((w=u.error)==null?void 0:w.message)??null,onAuthorQueryChange:l.onAuthorQueryChange,onAuthorSelect:l.onAuthorSelect,onSelfAuthorRemove:l.onSelfAuthorRemove,onTrackedAuthorRemove:l.onTrackedAuthorRemove,onSave:()=>{s!==null&&p.mutate({repositoryName:s.name,...l.selection})},onRemove:()=>{s!==null&&x.mutate({name:s.name})},onClose:()=>{p.reset(),x.reset(),f()}})]})};export{ee as component};
@@ -1 +1 @@
1
- import{j as s,d as n,r as i,n as l,o as c,p as d,q as g,O as t}from"./index-CX9sF5Fh.js";const p="Settings sections",u=[{to:"/settings/agents",label:"Agents",purpose:"The coding agents that write your reviews"},{to:"/settings/forges",label:"Git forge",purpose:"Where your pull requests are hosted"},{to:"/settings/configuration",label:"Default configuration",purpose:"The configuration a new review starts with"},{to:"/settings/profiles",label:"Configurations",purpose:"How the agent writes a review"},{to:"/settings/repositories",label:"Repositories",purpose:"The repositories and users to follow"}],x=()=>s.jsx("nav",{"aria-label":p,children:s.jsx("ul",{children:u.map(e=>s.jsx("li",{children:s.jsxs(n,{to:e.to,className:"group block border-l-4 border-border py-2 pl-4 hover:bg-muted data-[status=active]:border-(--line)",children:[s.jsx("span",{className:"block leading-6 group-data-[status=active]:font-bold group-data-[status=active]:text-signal-text",children:e.label}),s.jsx("span",{className:"block text-sm text-muted-foreground",children:e.purpose})]})},e.to))})}),a="[--line:var(--primary)]",h="text-4xl leading-10 font-bold tracking-[-0.02em]",o="Settings",j=()=>{const e=i.use(l),r=c({from:"/settings/profiles/$id",shouldThrow:!1})!==void 0;return s.jsxs(s.Fragment,{children:[e===null?null:d.createPortal(s.jsxs(s.Fragment,{children:[s.jsx(g,{lineColor:"primary"}),s.jsx("p",{className:"font-bold",children:o})]}),e),s.jsx("header",{className:"pb-8",children:s.jsx("h1",{className:h,children:o})}),r?s.jsx("div",{className:a,children:s.jsx(t,{})}):s.jsxs("div",{className:`grid gap-x-10 gap-y-8 lg:grid-cols-[17rem_minmax(0,1fr)] ${a}`,children:[s.jsx("div",{className:"self-start lg:sticky lg:top-22",children:s.jsx(x,{})}),s.jsx("div",{className:"min-w-0",children:s.jsx(t,{})})]})]})};export{j as component};
1
+ import{j as s,q as i,r as n,x as l,y as c,z as d,C as g,O as t}from"./index-DfRj4oZV.js";const p="Settings sections",u=[{to:"/settings/agents",label:"Agents",purpose:"The coding agents that write your reviews"},{to:"/settings/forges",label:"Git forge",purpose:"Where your pull requests are hosted"},{to:"/settings/configuration",label:"Default configuration",purpose:"The configuration a new review starts with"},{to:"/settings/profiles",label:"Configurations",purpose:"How the agent writes a review"},{to:"/settings/repositories",label:"Repositories",purpose:"The repositories and users to follow"}],x=()=>s.jsx("nav",{"aria-label":p,children:s.jsx("ul",{children:u.map(e=>s.jsx("li",{children:s.jsxs(i,{to:e.to,className:"group block border-l-4 border-border py-2 pl-4 hover:bg-muted data-[status=active]:border-(--line)",children:[s.jsx("span",{className:"block leading-6 group-data-[status=active]:font-bold group-data-[status=active]:text-signal-text",children:e.label}),s.jsx("span",{className:"block text-sm text-muted-foreground",children:e.purpose})]})},e.to))})}),a="[--line:var(--primary)]",h="text-4xl leading-10 font-bold tracking-[-0.02em]",r="Settings",j=()=>{const e=n.use(l),o=c({from:"/settings/profiles/$id",shouldThrow:!1})!==void 0;return s.jsxs(s.Fragment,{children:[e===null?null:d.createPortal(s.jsxs(s.Fragment,{children:[s.jsx(g,{lineColor:"primary"}),s.jsx("p",{className:"font-bold",children:r})]}),e),s.jsx("header",{className:"pb-8",children:s.jsx("h1",{className:h,children:r})}),o?s.jsx("div",{className:a,children:s.jsx(t,{})}):s.jsxs("div",{className:`grid gap-x-10 gap-y-8 lg:grid-cols-[17rem_minmax(0,1fr)] ${a}`,children:[s.jsx("div",{className:"self-start lg:sticky lg:top-22",children:s.jsx(x,{})}),s.jsx("div",{className:"min-w-0",children:s.jsx(t,{})})]})]})};export{j as component};
@@ -5,7 +5,7 @@
5
5
  <title>Flight Plan</title>
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1" />
7
7
  <link rel="icon" type="image/png" href="/logo-small.png" />
8
- <script type="module" crossorigin src="/assets/index-CX9sF5Fh.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-DfRj4oZV.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-ec_xLUMF.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kidlat-dakila/flightplan",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Read a pull request as an ordered walkthrough beside its code, written by your assistant through MCP tools.",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "engines": {
@@ -1 +0,0 @@
1
- import{X as r}from"./index-CX9sF5Fh.js";const e=r;export{e as errorComponent};
@@ -1 +0,0 @@
1
- import{S as r}from"./index-BYtgetD4.js";import"./index-CX9sF5Fh.js";const n=r;export{n as errorComponent};
@@ -1 +0,0 @@
1
- import{S as r}from"./index-BYtgetD4.js";import"./index-CX9sF5Fh.js";const n=r;export{n as errorComponent};
@@ -1 +0,0 @@
1
- import{S as r}from"./index-BYtgetD4.js";import"./index-CX9sF5Fh.js";const n=r;export{n as errorComponent};
@@ -1 +0,0 @@
1
- import{S as r}from"./index-BYtgetD4.js";import"./index-CX9sF5Fh.js";const n=r;export{n as errorComponent};
@@ -1 +0,0 @@
1
- import{S as r}from"./index-BYtgetD4.js";import"./index-CX9sF5Fh.js";const n=r;export{n as errorComponent};
@@ -1 +0,0 @@
1
- import{j as e,F as P,a as Q,A as R,b as B,L as g,c as D,B as H,S as z,d as q,e as $,r as w,I as G,f as V,g as W,h as J,i as K,R as _,k as X,l as v,m as Y}from"./index-CX9sF5Fh.js";import{P as Z}from"./index-s0xxzhVW.js";import{L as ee,u as se,a as I,A as ae}from"./index-DvVl2gWR.js";import{C as te}from"./index-xoWXUJLW.js";import"./index-D3gI7yfx.js";const re="Show all authors",ne=({buttonLabel:s,isDefault:r,options:a,onSelect:c})=>e.jsxs(P,{label:s,children:[a.map(i=>e.jsx(Q,{label:i.label,countLabel:i.countLabel,isSelected:i.isSelected,marker:i.person===null?e.jsx("span",{className:"size-5 shrink-0"}):e.jsx(R,{imageUrl:i.person.avatarUrl,monogram:i.person.monogram}),onToggle:()=>{c(i.toggledAuthors)}},i.key)),r?null:e.jsx(B,{label:re,onReset:()=>{c(null)}})]}),le=()=>e.jsxs("section",{className:"max-w-prose border-t-2 border-foreground pt-5",children:[e.jsx("h2",{className:"text-xl leading-7 font-bold",children:"No repositories yet"}),e.jsx("p",{className:"mt-1 text-muted-foreground",children:"Flight Plan lists the repository it is started in. Start it inside a repository, or add one here by its folder path. Each repository then shows its open pull requests and branches, with the status of their reviews."})]}),ie=({kindLabel:s,title:r,details:a,author:c,updatedLabel:i,createReviewHref:o,isDismissing:l,onDismiss:x})=>e.jsxs("li",{className:"grid grid-cols-[2.5rem_minmax(0,1fr)]",children:[e.jsx("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:e.jsx("span",{className:"w-1 flex-1 bg-(--line)"})}),e.jsxs("div",{className:"my-1 flex flex-wrap items-center gap-x-4 gap-y-2 rounded-sm bg-muted px-3 py-2",children:[e.jsxs("div",{className:"min-w-0 flex-1 basis-72",children:[e.jsxs("p",{className:"flex flex-wrap items-baseline gap-x-2 text-sm",children:[e.jsx("span",{className:"font-bold",children:s}),e.jsx("span",{className:"text-muted-foreground tabular-nums",children:i})]}),e.jsx(g,{segments:[r],className:"leading-6"}),e.jsxs("span",{className:"flex flex-wrap items-center gap-x-3 text-sm text-muted-foreground",children:[e.jsx(g,{segments:a}),c===null?null:e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(R,{imageUrl:c.avatarUrl,monogram:c.monogram,className:"size-4"}),c.name]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("a",{href:o,className:D({variant:"default",size:"sm"}),children:e.jsx("span",{className:"text-box-cap",children:"Create Flight Plan"})}),e.jsx(H,{variant:"ghost",size:"sm",disabled:l,onClick:x,children:"Dismiss"})]})]})]}),oe="before:absolute before:-inset-x-3 before:inset-y-0 before:-z-10 before:rounded-sm before:transition-colors before:duration-[180ms] before:ease-out hover:before:bg-muted",me=({title:s,details:r,author:a,repositoryName:c,targetId:i,branchStatus:o,statusLabel:l,updatedLabel:x})=>e.jsxs("li",{className:`group relative isolate grid grid-cols-[2.5rem_minmax(0,1fr)] ${oe}`,children:[e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx("span",{className:"h-3 w-1 bg-(--line)"}),e.jsx(z,{status:o}),e.jsx("span",{className:"w-1 flex-1 bg-(--line) group-last:invisible"})]}),e.jsxs(q,{to:"/pr-reviews/$repoName/$branchId",params:{repoName:c,branchId:i},className:"grid gap-x-4 gap-y-0.5 py-2.5 outline-none after:absolute after:-inset-x-3 after:inset-y-0 after:rounded-sm focus-visible:after:outline-2 focus-visible:after:outline-ring sm:grid-cols-[minmax(0,1fr)_8rem_8rem_7.5rem] sm:items-baseline",children:[e.jsxs("span",{className:"min-w-0",children:[e.jsx(g,{segments:[s],className:"leading-6"}),e.jsx(g,{segments:r,className:"text-sm text-muted-foreground"})]}),e.jsxs("span",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm sm:contents",children:[a===null?e.jsx("span",{className:"hidden sm:block"}):e.jsxs("span",{className:"flex min-w-0 items-center gap-2 sm:h-6 sm:self-start",children:[e.jsx(R,{imageUrl:a.avatarUrl,monogram:a.monogram}),e.jsx("span",{className:"truncate",children:a.name})]}),e.jsx("span",{className:$[o],children:l}),e.jsx("span",{className:"text-muted-foreground tabular-nums sm:text-right",children:x})]})]})]}),L="grid grid-cols-[2.5rem_minmax(0,1fr)]",O=()=>e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx("span",{className:"h-4 w-1 bg-(--line)"}),e.jsx("span",{className:"h-1 w-4 bg-(--line)"})]}),ce=({repositoryName:s,content:r})=>r.kind==="targets"?e.jsx("ol",{children:r.targets.map(a=>e.jsx(me,{title:a.title,details:a.details,author:a.author,repositoryName:s,targetId:a.id,branchStatus:a.branchStatus,statusLabel:a.statusLabel,updatedLabel:a.updatedLabel},a.id))}):r.kind==="problem"?e.jsxs("div",{className:L,children:[e.jsx(O,{}),e.jsxs("p",{className:"py-1.5 text-sm",children:[r.message," ",e.jsx("a",{href:r.actionHref,className:"underline",children:r.actionLabel})]})]}):e.jsxs("div",{className:L,children:[e.jsx(O,{}),e.jsx("p",{className:"py-1.5 text-sm text-muted-foreground",children:r.message})]}),ue=({name:s,lineColor:r,lineLabel:a,source:c,countLabel:i,createReviewHref:o,configurationLabel:l,newTargets:x,content:p,isDismissing:u,onDismissNewTarget:n,onConfigure:b})=>{const d=w.useId();return e.jsxs("section",{"aria-labelledby":d,className:V("border-t-2 border-foreground pt-5 pb-6",W[r]),children:[e.jsxs("div",{className:L,children:[e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx(ee,{label:a}),e.jsx("span",{className:"w-1 flex-1 bg-(--line)"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2 pb-2",children:[e.jsxs("div",{className:"min-w-0 flex-1 basis-64",children:[e.jsx("h2",{id:d,className:"text-xl leading-7 font-semibold tracking-[-0.01em] text-foreground",children:s}),e.jsx(g,{segments:c,className:"text-sm text-muted-foreground"})]}),e.jsx("p",{className:"text-sm text-muted-foreground tabular-nums",children:i}),e.jsx("a",{href:o,className:D({variant:"outline",size:"sm"}),children:e.jsx("span",{className:"text-box-cap",children:"Create Flight Plan"})}),e.jsx(G,{icon:"settings",label:l,onClick:b})]})]}),e.jsx("ul",{children:x.map(m=>e.jsx(ie,{kindLabel:m.kindLabel,title:m.title,details:m.details,author:m.author,updatedLabel:m.updatedLabel,createReviewHref:m.createReviewHref,isDismissing:u,onDismiss:()=>{n(m.id)}},m.id))}),e.jsx(ce,{repositoryName:s,content:p})]})},de="Reset to the default statuses",xe=({buttonLabel:s,isDefault:r,options:a,onSelect:c,onReset:i})=>e.jsxs(P,{label:s,children:[a.map(o=>e.jsx(Q,{label:o.label,countLabel:o.countLabel,isSelected:o.isSelected,marker:e.jsx(z,{status:o.status,className:"size-4 [--line:var(--muted-foreground)]"}),onToggle:()=>{c(o.toggledStatuses)}},o.status)),r?null:e.jsx(B,{label:de,onReset:i})]}),he=5e3,Ne=()=>{var A,F,E,k,T;const s=J(),r=K(),{status:a=null,author:c=null,fixtureCase:i}=_.useSearch(),o=_.useNavigate(),{data:l}=X({...s.repository.list.queryOptions({statuses:a,authors:c,fixtureCase:i}),refetchInterval:he}),[x,p]=w.useState(!1),u=se(x),[n,b]=w.useState(null),d=I({isEnabled:x,folderPath:u.search.query,repositoryName:null,saved:null}),m=v(s.repository.add.mutationOptions({onSuccess:async()=>{p(!1),u.reset(),d.reset(),await r.invalidateQueries(s.repository.list.pathFilter())}})),y=Y({...s.repository.configuration.queryOptions({name:(n==null?void 0:n.name)??""}),enabled:n!==null}),h=I({isEnabled:n!==null,folderPath:"",repositoryName:(n==null?void 0:n.name)??null,saved:y.data??null}),S=()=>{b(null),h.reset()},j=v(s.repository.configure.mutationOptions({onSuccess:async()=>{S(),await r.invalidateQueries(s.repository.pathFilter())}})),N=v(s.repository.remove.mutationOptions({onSuccess:async()=>{S(),await r.invalidateQueries(s.repository.pathFilter())}})),C=v(s.repository.dismissNewTarget.mutationOptions({onSuccess:async()=>{await r.invalidateQueries(s.repository.list.pathFilter())}})),M=()=>{j.reset(),N.reset(),S()},U=()=>{m.reset(),u.reset(),d.reset(),p(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"flex flex-wrap items-baseline gap-x-4 gap-y-2 pb-3",children:[e.jsx("h1",{className:Z,children:"Repositories"}),l.kind==="repositories"?e.jsx("p",{className:"text-sm text-muted-foreground tabular-nums",children:l.summaryLabel}):null,e.jsx("span",{className:"flex-1"}),e.jsx(H,{onClick:()=>{p(!0)},children:"Add repository"})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-x-6 gap-y-2 pb-5",children:[l.notice===null?e.jsx("span",{}):e.jsx("p",{className:"text-sm text-muted-foreground",children:l.notice}),l.kind==="repositories"?e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(xe,{buttonLabel:l.statusFilter.buttonLabel,isDefault:l.statusFilter.isDefault,options:l.statusFilter.options,onSelect:t=>{o({search:f=>({...f,status:[...t]})})},onReset:()=>{o({search:t=>({...t,status:void 0})})}}),e.jsx(ne,{buttonLabel:l.authorFilter.buttonLabel,isDefault:l.authorFilter.isDefault,options:l.authorFilter.options,onSelect:t=>{o({search:f=>({...f,author:t==null?void 0:t.slice()})})}})]}):null]}),e.jsx(ae,{isOpen:x,search:u.search,browse:u.browse,authors:d.authors,isAdding:m.isPending,errorMessage:((A=m.error)==null?void 0:A.message)??null,onQueryChange:u.onQueryChange,onChooseFolder:t=>{m.reset(),u.onChooseFolder(t)},onAuthorQueryChange:d.onAuthorQueryChange,onAuthorSelect:d.onAuthorSelect,onSelfAuthorRemove:d.onSelfAuthorRemove,onTrackedAuthorRemove:d.onTrackedAuthorRemove,onSubmit:()=>{m.mutate({path:u.search.query,...d.selection})},onBrowse:()=>{m.reset(),u.onBrowse()},onBrowseFolder:u.onBrowseFolder,onBrowseClose:()=>{m.reset(),u.onBrowseClose()},onClose:U}),e.jsx(te,{isOpen:n!==null,name:(n==null?void 0:n.name)??"",path:((F=y.data)==null?void 0:F.path)??"",configurationHref:(n==null?void 0:n.configurationHref)??"",authors:h.authors,isSaving:j.isPending,isRemoving:N.isPending,errorMessage:((E=j.error)==null?void 0:E.message)??((k=N.error)==null?void 0:k.message)??((T=y.error)==null?void 0:T.message)??null,onAuthorQueryChange:h.onAuthorQueryChange,onAuthorSelect:h.onAuthorSelect,onSelfAuthorRemove:h.onSelfAuthorRemove,onTrackedAuthorRemove:h.onTrackedAuthorRemove,onSave:()=>{n!==null&&j.mutate({repositoryName:n.name,...h.selection})},onRemove:()=>{n!==null&&N.mutate({name:n.name})},onClose:M}),l.kind==="repositories"?l.repositories.map(t=>e.jsx(ue,{name:t.name,lineColor:t.lineColor,lineLabel:t.lineLabel,source:t.source,countLabel:t.countLabel,createReviewHref:t.createReviewHref,configurationLabel:t.configurationLabel,newTargets:t.newTargets,content:t.content,isDismissing:C.isPending,onConfigure:()=>{b({name:t.name,configurationHref:t.configurationHref})},onDismissNewTarget:f=>{C.mutate({repositoryName:t.name,targetId:f})}},t.name)):e.jsx(le,{}),null]})};export{Ne as component};
@@ -1 +0,0 @@
1
- import{S as r}from"./index-BYtgetD4.js";import"./index-CX9sF5Fh.js";const n=r;export{n as errorComponent};
@@ -1 +0,0 @@
1
- import{j as e,D as p,x as h,y as m,z as u,C as j,G as g,B as l,f}from"./index-CX9sF5Fh.js";const y={repository:"font-bold","added-repository":"text-muted-foreground",folder:""},N=({folder:t,onOpenFolder:a,onChooseRepository:s})=>t.kind==="added-repository"?null:t.kind==="repository"?e.jsx(l,{type:"button",size:"sm","aria-label":`Choose ${t.name}`,onClick:()=>{s(t.path)},children:"Choose"}):e.jsx(l,{type:"button",variant:"outline",size:"sm","aria-label":`Open ${t.name}`,onClick:()=>{a(t.path)},children:"Open"}),b=({browser:t,onOpenFolder:a,onChooseRepository:s})=>e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("p",{className:"min-w-0 flex-1 font-mono text-[0.82rem] wrap-anywhere",children:t.path}),t.parentPath===null?null:e.jsx(l,{type:"button",variant:"outline",size:"sm",onClick:()=>{t.parentPath!==null&&a(t.parentPath)},children:"Up one folder"})]}),t.message===null?e.jsx("ul",{className:"max-h-[calc(20rem+1px)] overflow-y-auto border-t border-border",children:t.folders.map(n=>e.jsxs("li",{className:"flex h-10 items-center gap-3 border-b border-border",children:[e.jsx("span",{className:f("min-w-0 flex-1 truncate",y[n.kind]),children:n.name}),e.jsx("span",{className:"text-muted-foreground",children:n.kindLabel}),e.jsx(N,{folder:n,onOpenFolder:a,onChooseRepository:s})]},n.path))}):e.jsx("p",{className:"border-t border-border pt-3 text-muted-foreground",children:t.message})]}),D=({isOpen:t,title:a,description:s,browser:n,errorMessage:i,onOpenFolder:o,onChooseRepository:d,onChooseFolder:r,onClose:c})=>e.jsx(p,{open:t,onOpenChange:x=>{x||c()},children:e.jsxs(h,{children:[e.jsxs(m,{children:[e.jsx(u,{children:a}),e.jsx(j,{children:s})]}),n===null?e.jsx("p",{role:"status",className:"text-muted-foreground",children:"Reading the folder…"}):e.jsx(b,{browser:n,onOpenFolder:o,onChooseRepository:d}),i===null?null:e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:i}),n===null||r===null?null:e.jsx(g,{children:e.jsx(l,{type:"button",onClick:()=>{r(n.path)},children:"Use this folder"})})]})});export{D as F};
@@ -1 +0,0 @@
1
- import{j as e,d,L as m,B as p,h as x,i as g,a1 as f,k as h,l as b,c as j}from"./index-CX9sF5Fh.js";import{S as N}from"./index-BsRx8Pzi.js";const L="-mx-3 block min-w-0 flex-1 rounded-sm px-3 py-2.5 transition-colors duration-[180ms] ease-out hover:bg-muted focus-visible:outline-2 focus-visible:outline-ring",v=({title:i,rows:l,emptyMessage:a,isDuplicating:o,onDuplicate:t})=>e.jsxs("section",{className:"border-t-2 border-foreground pt-5 pb-6",children:[e.jsx("h3",{className:"pb-2 text-xl leading-7 font-bold",children:i}),a===null?null:e.jsx("p",{className:"max-w-[62ch] text-sm text-muted-foreground",children:a}),e.jsx("ul",{children:l.map(s=>e.jsxs("li",{className:"flex items-center gap-4 border-b border-border first:border-t",children:[e.jsxs(d,{to:"/settings/profiles/$id",params:{id:s.id},className:L,children:[e.jsxs("span",{className:"flex flex-wrap items-baseline gap-x-3",children:[e.jsx("span",{className:"font-bold underline decoration-input decoration-1 underline-offset-[0.3em]",children:s.name}),s.defaultLabel===null?null:e.jsx("span",{className:"text-sm font-bold",children:s.defaultLabel})]}),s.summary===null?null:e.jsx("span",{className:"block max-w-[62ch] text-sm",children:s.summary}),e.jsx(m,{segments:s.details,className:"text-sm text-muted-foreground"})]}),e.jsx(p,{type:"button",variant:"outline",size:"sm","aria-label":s.duplicateName,disabled:o,onClick:()=>{t(s.id)},children:s.duplicateLabel})]},s.id))})]}),y="Configurations • Settings • Flight Plan",C="Configurations",E="New configuration",T=()=>{var r,c;const i=x(),l=g(),a=f(),{data:o}=h(i.configuration.list.queryOptions()),t=b(i.configuration.create.mutationOptions({onSuccess:async n=>{n.kind!=="rejected"&&(await l.invalidateQueries(i.configuration.pathFilter()),await a({to:"/settings/profiles/$id",params:{id:n.id}}))}})),s=((r=t.data)==null?void 0:r.kind)==="rejected"?t.data.message:((c=t.error)==null?void 0:c.message)??null;return e.jsxs(e.Fragment,{children:[e.jsx("title",{children:y}),e.jsx(N,{title:C,children:"A configuration decides how the agent writes a review: its voice, how each field is worded and which sections it generates. Open one to read or change it, or duplicate one to start your own."}),e.jsx("div",{className:"pb-6",children:e.jsx(d,{to:"/settings/profiles/create",className:j(),children:E})}),s===null?null:e.jsx("p",{role:"alert",className:"pb-4 text-sm text-destructive",children:s}),o.groups.map(n=>e.jsx(v,{title:n.title,rows:n.rows,emptyMessage:n.emptyMessage,isDuplicating:t.isPending,onDuplicate:u=>{t.mutate({name:null,sourceId:u})}},n.title))]})};export{T as component};
@@ -1 +0,0 @@
1
- import{h as B,r as x,m as w,K as D,j as e,Q as P,A as T,I,D as M,x as U,y as _,z as G,C as V,G as v,B as k,E as z,f as $}from"./index-CX9sF5Fh.js";import{F as K}from"./index-D3gI7yfx.js";const W="Searching…",X=[],Y=({id:l,name:o,detail:r,avatarUrl:s,monogram:n})=>({id:l,name:o,detail:r,avatarUrl:s,monogram:n}),re=({isEnabled:l,folderPath:o,repositoryName:r,saved:s})=>{var R,O,N;const n=B(),[t,d]=x.useState(null),[i,u]=x.useState(null),[a,c]=x.useState(null),h=x.useDeferredValue(a),f=x.useDeferredValue(o),m=t===null?(s==null?void 0:s.selfAuthor)??null:t.author,p=i??(s==null?void 0:s.trackedAuthors)??X,A=p.map(j=>j.id),S=w({...n.repository.authorForm.queryOptions({path:f}),enabled:l&&r===null,placeholderData:D}),g=w({...n.repository.searchAuthors.queryOptions({path:f,repositoryName:r,role:(h==null?void 0:h.role)??"tracked",query:(h==null?void 0:h.query)??"",selfAuthorId:(m==null?void 0:m.id)??null,trackedAuthorIds:A}),enabled:l&&h!==null,placeholderData:D}),H=(j,y)=>{var q;const F=(q=g.data)==null?void 0:q.options.find(b=>b.id===y);if(F===void 0)return;const C=Y(F);c(null),j==="self"?(d({author:C}),u(p.filter(b=>b.id!==C.id))):u([...p.filter(b=>b.id!==C.id),C])};return{authors:{form:(s==null?void 0:s.form)??S.data??null,selfAuthor:m,trackedAuthors:p,search:{role:(a==null?void 0:a.role)??null,query:(a==null?void 0:a.query)??"",options:((R=g.data)==null?void 0:R.options)??[],message:((O=g.data)==null?void 0:O.message)??(g.isPending?W:null),errorMessage:((N=g.error)==null?void 0:N.message)??null}},selection:{selfAuthorId:(m==null?void 0:m.id)??null,trackedAuthorIds:A},onAuthorQueryChange:(j,y)=>{c({role:j,query:y})},onAuthorSelect:H,onSelfAuthorRemove:()=>{d({author:null})},onTrackedAuthorRemove:j=>{u(p.filter(y=>y.id!==j))},reset:()=>{d(null),u(null),c(null)}}},J="Searching…",ne=l=>{var h,f,m;const o=B(),[r,s]=x.useState(""),[n,t]=x.useState(!1),[d,i]=x.useState(null),u=x.useDeferredValue(r),a=w({...o.setup.searchFolders.queryOptions({query:u}),enabled:l,placeholderData:D}),c=w({...o.setup.browseFolders.queryOptions({path:d,purpose:"repository"}),enabled:l&&n,placeholderData:D});return{search:{query:r,options:((h=a.data)==null?void 0:h.options)??[],message:((f=a.data)==null?void 0:f.message)??(a.isPending?J:null)},browse:{isOpen:n,browser:c.data??null,errorMessage:((m=c.error)==null?void 0:m.message)??null},onQueryChange:s,onChooseFolder:p=>{s(p),t(!1)},onBrowse:()=>{t(!0)},onBrowseFolder:i,onBrowseClose:()=>{t(!1)},reset:()=>{s(""),i(null),t(!1)}}},Q=({label:l,hint:o,placeholder:r,query:s,options:n,message:t,errorMessage:d,onQueryChange:i,onOpen:u,onSelect:a})=>e.jsx(P,{label:l,hint:o,placeholder:r,value:s,suggestions:n.map(c=>({id:c.id,label:c.name,detail:c.detail,stateLabel:c.stateLabel,isDisabled:c.isTaken,marker:e.jsx(T,{imageUrl:c.avatarUrl,monogram:c.monogram})})),message:t,errorMessage:d,className:"max-w-md",onValueChange:i,onOpen:u,onSelect:a}),Z=[],L=({author:l,stateLabel:o,removeLabel:r,onRemove:s})=>e.jsxs("div",{className:"flex max-w-md items-center gap-2 py-1",children:[e.jsx(T,{imageUrl:l.avatarUrl,monogram:l.monogram}),e.jsx("span",{className:"min-w-0 truncate",children:l.name}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:l.detail}),o===null?null:e.jsx("span",{className:"text-sm font-bold",children:o}),e.jsx(I,{icon:"close",label:r,onClick:s})]}),E=({label:l,hint:o,placeholder:r,authorRole:s,search:n,onAuthorQueryChange:t,onAuthorSelect:d})=>{const i=n.role===s;return e.jsx(Q,{label:l,hint:o,placeholder:r,query:i?n.query:"",options:i?n.options:Z,message:i?n.message:null,errorMessage:i?n.errorMessage:null,onQueryChange:u=>{t(s,u)},onOpen:()=>{t(s,i?n.query:"")},onSelect:u=>{d(s,u)}})},ee=({hint:l,placeholder:o,selfAuthor:r,search:s,onAuthorQueryChange:n,onAuthorSelect:t,onRemove:d})=>r===null?e.jsx(E,{label:"Which user are you?",hint:l,placeholder:o,authorRole:"self",search:s,onAuthorQueryChange:n,onAuthorSelect:t}):e.jsx(L,{author:r,stateLabel:"You",removeLabel:"Choose another user as you",onRemove:d}),se=({authors:l,onAuthorQueryChange:o,onAuthorSelect:r,onSelfAuthorRemove:s,onTrackedAuthorRemove:n})=>{const{form:t,selfAuthor:d,trackedAuthors:i,search:u}=l;return t===null?e.jsx("p",{role:"status",className:"text-muted-foreground",children:"Reading the author settings…"}):e.jsxs("div",{className:"grid gap-4",children:[t.selfAuthorHint===null?null:e.jsx(ee,{hint:t.selfAuthorHint,placeholder:t.searchPlaceholder,selfAuthor:d,search:u,onAuthorQueryChange:o,onAuthorSelect:r,onRemove:s}),e.jsx(E,{label:"Track a user",hint:t.searchHint,placeholder:t.searchPlaceholder,authorRole:"tracked",search:u,onAuthorQueryChange:o,onAuthorSelect:r}),e.jsx("ul",{"aria-label":"Tracked users",children:i.map(a=>e.jsx("li",{children:e.jsx(L,{author:a,stateLabel:null,removeLabel:`Stop tracking ${a.name}`,onRemove:()=>{n(a.id)}})},a.id))})]})},le="/Users/you/projects/storefront",ae=({isOpen:l,search:o,browse:r,authors:s,isAdding:n,errorMessage:t,onQueryChange:d,onChooseFolder:i,onAuthorQueryChange:u,onAuthorSelect:a,onSelfAuthorRemove:c,onTrackedAuthorRemove:h,onSubmit:f,onBrowse:m,onBrowseFolder:p,onBrowseClose:A,onClose:S})=>e.jsx(M,{open:l,onOpenChange:z(S),children:e.jsxs(U,{className:"sm:max-w-lg",children:[e.jsxs(_,{children:[e.jsx(G,{children:"Add repository"}),e.jsx(V,{children:"Search this machine for a folder that holds a git repository, or type its full path. Then choose the users Flight Plan follows in it."})]}),e.jsxs("form",{action:f,className:"grid gap-4",children:[e.jsx(P,{label:"Repository folder",hint:null,placeholder:le,value:o.query,suggestions:o.options.map(g=>({id:g.path,label:g.path,detail:null,stateLabel:g.stateLabel,isDisabled:g.isAdded})),message:o.message,errorMessage:null,isLiteral:!0,onValueChange:d,onSelect:i,onEnter:f}),e.jsx(se,{authors:s,onAuthorQueryChange:u,onAuthorSelect:a,onSelfAuthorRemove:c,onTrackedAuthorRemove:h}),t===null?null:e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:t}),e.jsxs(v,{children:[e.jsx(k,{type:"button",variant:"outline",className:"sm:mr-auto",onClick:m,children:"Browse folders"}),e.jsx(k,{type:"button",variant:"ghost",onClick:S,children:"Cancel"}),e.jsx(k,{type:"submit",disabled:n,children:n?"Adding…":"Add"})]})]}),e.jsx(K,{isOpen:r.isOpen,title:"Browse folders",description:"Open folders until you reach a repository, then choose it.",browser:r.browser,errorMessage:r.errorMessage,onOpenFolder:p,onChooseRepository:i,onChooseFolder:null,onClose:A})]})}),ie=({label:l,className:o})=>e.jsx("span",{"aria-hidden":"true",className:$("inline-flex size-7 shrink-0 items-center justify-center rounded-full bg-(--line) text-sm leading-none font-bold text-line-foreground",o),children:e.jsx("span",{className:"text-box-cap",children:l})});export{ae as A,ie as L,se as R,re as a,Q as b,ne as u};
@@ -1 +0,0 @@
1
- import{S as r}from"./index-BYtgetD4.js";import"./index-CX9sF5Fh.js";const n=r;export{n as errorComponent};