@kidlat-dakila/flightplan 0.1.7 → 0.1.9

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 (91) hide show
  1. package/backend/main.js +944 -2316
  2. package/backend/plugin/skills/live/SKILL.md +79 -0
  3. package/backend/plugin/skills/review/SKILL.md +8 -5
  4. package/frontend/assets/_branchId-7x6qWn3I.js +1 -0
  5. package/frontend/assets/_branchId-OMHvVhfT.js +1 -0
  6. package/frontend/assets/_id-1eTNGJK9.js +1 -0
  7. package/frontend/assets/_id-CHxZrl-p.js +1 -0
  8. package/frontend/assets/agents-C9xHqVQD.js +1 -0
  9. package/frontend/assets/agents-KKXkUQ27.js +1 -0
  10. package/frontend/assets/create-B3JUVzoL.js +1 -0
  11. package/frontend/assets/create-CriuRRQV.js +1 -0
  12. package/frontend/assets/create-CsL8aMCo.js +1 -0
  13. package/frontend/assets/create-DhWyrgF0.js +1 -0
  14. package/frontend/assets/download-B00Se_e0.js +1 -0
  15. package/frontend/assets/forges-BMb9Pcn1.js +1 -0
  16. package/frontend/assets/forges-BOVWBO1B.js +1 -0
  17. package/frontend/assets/index-4USZJYGF.js +1 -0
  18. package/frontend/assets/index-B4xFHIrG.js +1 -0
  19. package/frontend/assets/index-BA8Qwprc.js +6 -0
  20. package/frontend/assets/index-BUcr0tJt.js +1 -0
  21. package/frontend/assets/index-Ba3RqmDE.js +1 -0
  22. package/frontend/assets/index-CFZ7PaJE.js +1 -0
  23. package/frontend/assets/index-COS3U9jZ.js +1 -0
  24. package/frontend/assets/index-COdzqD_M.js +1 -0
  25. package/frontend/assets/index-CTKqkqZN.css +1 -0
  26. package/frontend/assets/index-CZ3Rr8-h.js +1 -0
  27. package/frontend/assets/index-CikPFj0e.js +1 -0
  28. package/frontend/assets/index-Cl1Gcfks.js +1 -0
  29. package/frontend/assets/index-CmrDaRXW.js +1 -0
  30. package/frontend/assets/index-CrCss1qG.js +1 -0
  31. package/frontend/assets/index-D8-ze-TP.js +1 -0
  32. package/frontend/assets/index-DB42uFFk.js +1 -0
  33. package/frontend/assets/index-DGsH5lbQ.js +170 -0
  34. package/frontend/assets/index-DQyWuir1.js +1 -0
  35. package/frontend/assets/index-DRndyOxR.js +463 -0
  36. package/frontend/assets/index-DaFaImds.js +1 -0
  37. package/frontend/assets/index-DbJECumi.js +1 -0
  38. package/frontend/assets/index-DpY8OPAr.js +1 -0
  39. package/frontend/assets/index-DvuJKeYS.js +1 -0
  40. package/frontend/assets/index-paF1osGm.js +1 -0
  41. package/frontend/assets/repositories-AJnxH9f7.js +1 -0
  42. package/frontend/assets/repositories-Dy8KRYwV.js +1 -0
  43. package/frontend/assets/review-B9u6XA77.js +1 -0
  44. package/frontend/assets/review-M5J-BQx7.js +1 -0
  45. package/frontend/assets/route-BLz_XVsx.js +1 -0
  46. package/frontend/index.html +2 -2
  47. package/package.json +1 -2
  48. package/published-review/app.css +1 -1
  49. package/published-review/app.js +114 -108
  50. package/frontend/assets/_branchId-438YLxpk.js +0 -1
  51. package/frontend/assets/_branchId-PhBseeXo.js +0 -1
  52. package/frontend/assets/_id-yAHjl11v.js +0 -1
  53. package/frontend/assets/_id-z15a_Wqg.js +0 -1
  54. package/frontend/assets/agents-CF_BNYuU.js +0 -1
  55. package/frontend/assets/agents-CUULznCR.js +0 -1
  56. package/frontend/assets/create-Byti8N1q.js +0 -1
  57. package/frontend/assets/create-DHjp2cB6.js +0 -1
  58. package/frontend/assets/create-DiPNM_Jx.js +0 -1
  59. package/frontend/assets/create-t6MxPYs8.js +0 -1
  60. package/frontend/assets/download-kIOYm7yl.js +0 -1
  61. package/frontend/assets/forges-5NgJFexV.js +0 -1
  62. package/frontend/assets/forges-Dz31lZmK.js +0 -1
  63. package/frontend/assets/index-9MPLrKh9.js +0 -170
  64. package/frontend/assets/index-BDgPH-og.js +0 -1
  65. package/frontend/assets/index-BDhIIxnY.js +0 -1
  66. package/frontend/assets/index-BUtsWXGk.js +0 -1
  67. package/frontend/assets/index-BrL94etp.js +0 -1
  68. package/frontend/assets/index-C8_4U9zA.js +0 -457
  69. package/frontend/assets/index-CAt5Gv5u.js +0 -1
  70. package/frontend/assets/index-CBObEG9P.js +0 -1
  71. package/frontend/assets/index-CRQLJ5uq.js +0 -1
  72. package/frontend/assets/index-CSy69oc4.js +0 -1
  73. package/frontend/assets/index-Cjx98rmL.js +0 -1
  74. package/frontend/assets/index-CmW92SdM.js +0 -1
  75. package/frontend/assets/index-Cmg8rxUj.css +0 -1
  76. package/frontend/assets/index-DVMDfdCW.js +0 -1
  77. package/frontend/assets/index-DYy-kFEi.js +0 -1
  78. package/frontend/assets/index-Dk3p64fP.js +0 -1
  79. package/frontend/assets/index-Dq71dq4Z.js +0 -1
  80. package/frontend/assets/index-Dz-E4Hhc.js +0 -1
  81. package/frontend/assets/index-EFsgiJx1.js +0 -1
  82. package/frontend/assets/index-EItMs0kz.js +0 -1
  83. package/frontend/assets/index-N0J0txvy.js +0 -1
  84. package/frontend/assets/index-Qxg2C8CP.js +0 -1
  85. package/frontend/assets/index-RYSZy-Ra.js +0 -6
  86. package/frontend/assets/index-WOMODjD2.js +0 -1
  87. package/frontend/assets/repositories-BrbB16PW.js +0 -1
  88. package/frontend/assets/repositories-VWl6aq7K.js +0 -1
  89. package/frontend/assets/review-BMO-QDpl.js +0 -1
  90. package/frontend/assets/review-CXzRf1jk.js +0 -1
  91. package/frontend/assets/route--z3gnt4z.js +0 -1
@@ -1 +0,0 @@
1
- import{a9 as e,j as t,aa as o}from"./index-C8_4U9zA.js";const n=()=>{const a=e.useNavigate();return t.jsx(o,{params:e.useParams(),search:e.useSearch(),onSearchChange:s=>{a({search:r=>({...r,...s}),replace:!0,resetScroll:!1})}})};export{n as component};
@@ -1 +0,0 @@
1
- import{a8 as r}from"./index-C8_4U9zA.js";const e=r;export{e as errorComponent};
@@ -1 +0,0 @@
1
- import{u as M,r as g,j as e,x as I,Y as P,B as m,s as S,z,g as O,h as U,ab as $,ad as R,F as q,k as w}from"./index-C8_4U9zA.js";import{T as H}from"./index-9MPLrKh9.js";function V(t,a){if(t===void 0)return{shouldBlockFn:()=>!0,withResolver:!1};if("shouldBlockFn"in t)return t;if(typeof t=="function")return{shouldBlockFn:async()=>await t(),enableBeforeUnload:!0,withResolver:!1};const s=!!(t.condition??!0),n=t.blockerFn;return{shouldBlockFn:async()=>s&&n!==void 0?await n():s,enableBeforeUnload:s,withResolver:n===void 0}}function Y(t,a){const{shouldBlockFn:s,enableBeforeUnload:n=!0,disabled:l=!1,withResolver:r=!1}=V(t),x=M(),{history:p}=x,[j,o]=g.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return g.useEffect(()=>{const h=async u=>{function i(f){const k=x.parseLocation(f),[,L,N]=x.getMatchedRoutes(k.pathname);return N===void 0?{routeId:"__notFound__",fullPath:k.pathname,pathname:k.pathname,params:L,search:x.options.parseSearch(f.search)}:{routeId:N.id,fullPath:N.fullPath,pathname:k.pathname,params:L,search:x.options.parseSearch(f.search)}}const b=i(u.currentLocation),v=i(u.nextLocation);if(b.routeId==="__notFound__"&&v.routeId!=="__notFound__")return!1;const y=await s({action:u.action,current:b,next:v});if(!r)return y;if(!y)return!1;const c=await new Promise(f=>{o({status:"blocked",current:b,next:v,action:u.action,proceed:()=>f(!1),reset:()=>f(!0)})});return o({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),c};return l?void 0:p.block({blockerFn:h,enableBeforeUnload:n})},[s,n,l,r,p,x]),j}const Q="All configurations",G="Rename",X="Name",W="Save name",J="Cancel",F="Delete",Z="Keep",ee="text-2xl leading-8 font-bold tracking-[-0.015em] text-signal-text",te=t=>{const[a,s]=g.useState("none"),[n,l]=g.useState(t.name);return e.jsxs("header",{className:"pb-6",children:[e.jsx(I,{to:"/settings/profiles",className:"text-sm text-muted-foreground underline decoration-input underline-offset-[0.3em] hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",children:Q}),e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-3",children:[a==="renaming"?e.jsxs("form",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",onSubmit:S(()=>{t.onRename(n),s("none")}),children:[e.jsx(P,{value:n,"aria-label":X,className:"max-w-sm flex-1",onChange:r=>{l(r.target.value)}}),e.jsx(m,{type:"submit",size:"sm",children:W}),e.jsx(m,{type:"button",variant:"ghost",size:"sm",onClick:()=>{s("none")},children:J})]}):e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:ee,children:t.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t.originLabel})]}),a==="deleting"?e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-sm",children:`Delete ${t.name}? This cannot be undone.`}),e.jsx(m,{type:"button",variant:"ghost",size:"sm",onClick:()=>{s("none")},children:Z}),e.jsx(m,{type:"button",variant:"destructive",size:"sm",disabled:t.isBusy,onClick:t.onDelete,children:F})]}):e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.canRename&&a==="none"?e.jsx(m,{type:"button",variant:"ghost",size:"sm",onClick:()=>{l(t.name),s("renaming")},children:G}):null,t.canDelete?e.jsx(m,{type:"button",variant:"ghost",size:"sm",onClick:()=>{s("deleting")},children:F}):null,t.notice===null?e.jsx(m,{type:"button",variant:"outline",size:"sm",disabled:t.isBusy,onClick:t.onDuplicate,children:t.duplicateLabel}):null]})]}),t.errorMessage===null?null:e.jsx("p",{role:"alert",className:"pt-3 text-sm text-destructive",children:t.errorMessage}),t.notice===null?null:e.jsxs("div",{role:"note",className:"mt-4 flex flex-wrap items-center gap-x-4 gap-y-2 border-y border-border py-2.5",children:[e.jsxs("p",{className:"min-w-0 flex-1 text-sm",children:[e.jsx("strong",{className:"font-bold",children:t.notice.lead}),` ${t.notice.advice}`]}),e.jsx(m,{type:"button",variant:"outline",size:"sm",disabled:t.isBusy,onClick:t.onDuplicate,children:t.duplicateLabel})]})]})},ne="cursor-pointer text-sm text-muted-foreground underline decoration-input underline-offset-[0.3em] hover:text-foreground focus-visible:outline-2 focus-visible:outline-ring",se="mt-2 max-w-[75ch] border-l border-input pl-4 text-sm leading-6 whitespace-pre-wrap text-muted-foreground",ae="You have not saved this field. Leave it and lose what you wrote?",re="Not saved yet",ie="Keep editing",le="Leave",oe=t=>Object.fromEntries(t.map(a=>[a.key,a.value])),ce=({title:t,summary:a,path:s,offMessage:n,texts:l,renderActions:r,onSubmit:x})=>{const[p,j]=g.useState(()=>oe(l)),o=l.some(i=>p[i.key]!==i.value),h=Y({shouldBlockFn:()=>o,enableBeforeUnload:o,withResolver:!0}),u=h.status==="blocked"?e.jsxs("div",{role:"alert",className:"flex flex-wrap items-center justify-end gap-2 pb-3",children:[e.jsx("p",{className:"text-sm",children:ae}),e.jsx(m,{type:"button",variant:"ghost",size:"sm",onClick:h.reset,children:ie}),e.jsx(m,{type:"button",variant:"destructive",size:"sm",onClick:h.proceed,children:le})]}):null;return e.jsxs("form",{onSubmit:S(()=>{x(l.map(i=>({key:i.key,text:p[i.key]??i.value})))}),children:[e.jsx("h3",{className:"text-xl leading-7 font-bold",children:t}),e.jsx("p",{className:"mt-1 max-w-[62ch] text-muted-foreground",children:a}),e.jsx("p",{className:"mt-1 font-mono text-[0.8125rem] wrap-anywhere text-muted-foreground",children:s}),n===null?null:e.jsx("p",{className:"mt-4 max-w-[62ch] border-y border-border py-2.5 text-sm",children:n}),l.map(i=>e.jsxs("section",{className:"mt-6",children:[e.jsx("h4",{className:"pb-1.5 text-sm font-bold",children:i.label}),e.jsx(H,{label:`${t}: ${i.label}`,value:i.value,errorMessage:null,onChange:b=>{j(v=>({...v,[i.key]:b}))}}),i.isChanged?e.jsxs("details",{className:"mt-2",children:[e.jsx("summary",{className:ne,children:i.shippedLabel}),e.jsx("p",{className:se,children:i.shippedValue})]}):null]},i.key)),r(o?re:null,u)]})},de="Fields of this configuration",ue="What the marks mean",me=[{mark:"changed",label:"Changed"},{mark:"unchanged",label:"Unchanged"},{mark:"off",label:"Not written"}],xe={changed:"border-foreground bg-foreground",unchanged:"border-muted-foreground",off:"border-dashed border-muted-foreground"},he="group flex items-center gap-3 border-l-4 border-border py-1.5 pr-2 pl-4 transition-colors duration-[180ms] ease-out hover:bg-muted focus-visible:outline-2 focus-visible:outline-ring aria-[current=page]:border-(--line)",K=({mark:t})=>e.jsx("span",{"aria-hidden":"true",className:z("size-2.5 shrink-0 rounded-[2px] border-[1.5px]",xe[t])}),fe=({configurationId:t,groups:a})=>e.jsxs("nav",{"aria-label":de,className:"flex flex-col lg:max-h-[calc(100dvh-7rem)]",children:[e.jsx("div",{className:"min-h-0 overflow-y-auto",children:a.map(s=>e.jsxs("section",{children:[s.title===null?null:e.jsx("div",{className:"flex items-center gap-3 border-l-4 border-border pt-4 pr-2 pb-1 pl-4",children:e.jsx("h3",{className:"min-w-0 flex-1 text-xs leading-4 font-bold text-muted-foreground",children:s.title})}),e.jsx("ul",{children:s.entries.map(n=>e.jsx("li",{children:e.jsxs(I,{to:"/settings/profiles/$id",params:{id:t},search:{field:n.key},"aria-current":n.isOpen?"page":void 0,className:he,children:[e.jsx("span",{className:"min-w-0 flex-1 text-sm leading-5 group-aria-[current=page]:font-bold group-aria-[current=page]:text-signal-text",children:n.label}),e.jsx(K,{mark:n.mark}),e.jsx("span",{className:"sr-only",children:n.markLabel})]})},n.key))})]},s.title??""))}),e.jsx("ul",{"aria-label":ue,className:"flex shrink-0 flex-wrap gap-x-4 gap-y-1 border-t border-border pt-3 text-xs text-muted-foreground",children:me.map(s=>e.jsxs("li",{className:"flex items-center gap-1.5",children:[e.jsx(K,{mark:s.mark}),s.label]},s.mark))})]}),ge="Save",be="Saving…",D=({isPending:t,errorMessage:a,savedMessage:s,unsavedLabel:n=null,question:l=null,children:r})=>e.jsxs("footer",{className:"sticky bottom-0 z-10 mt-6 border-t border-border bg-background py-4 before:absolute before:-inset-x-1 before:inset-y-0 before:-z-10 before:bg-background",children:[l,a===null?null:e.jsx("p",{role:"alert",className:"pb-3 text-sm text-destructive",children:a}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[r,n===null?e.jsx("p",{role:"status",className:"ml-auto text-sm text-muted-foreground",children:t?null:s}):e.jsx("p",{className:"ml-auto text-sm font-bold",children:n}),e.jsx(m,{type:"submit",disabled:t,children:t?be:ge})]})]}),pe=(t,a)=>t.includes(a)?t.filter(s=>s!==a):[...t,a],je=({label:t,description:a,isChecked:s,onToggle:n})=>{const l=g.useId(),r=g.useId();return e.jsxs("li",{className:"flex items-start gap-3 border-b border-border py-3",children:[e.jsx("input",{id:l,type:"checkbox",checked:s,"aria-describedby":r,className:"mt-1 size-4 shrink-0 accent-(--primary)",onChange:n}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("label",{htmlFor:l,className:"block cursor-pointer font-bold",children:t}),e.jsx("p",{id:r,className:"max-w-[62ch] text-sm text-muted-foreground",children:a})]})]})},ve=t=>{const[a,s]=g.useState(()=>t.contextKinds.filter(n=>n.isRequired).map(n=>n.kind));return e.jsxs("form",{onSubmit:S(()=>{t.onSubmit(a)}),children:[e.jsx("h3",{className:"text-xl leading-7 font-bold",children:t.title}),e.jsx("p",{className:"mt-1 max-w-[62ch] text-muted-foreground",children:t.summary}),e.jsxs("fieldset",{className:"mt-6",children:[e.jsx("legend",{className:"text-sm font-bold",children:t.contextKindsTitle}),e.jsx("p",{className:"max-w-[62ch] pb-2 text-sm text-muted-foreground",children:t.contextKindsHint}),e.jsx("ul",{className:"border-t border-border",children:t.contextKinds.map(n=>e.jsx(je,{label:n.label,description:n.description,isChecked:a.includes(n.kind),onToggle:()=>{s(l=>pe(l,n.kind))}},n.kind))})]}),t.children]})},ke="Prompt configurations • Settings • Flight Plan",Le=()=>{var f,k,L,N,_,B,A,C;const t=O(),a=U(),s=$(),{id:n}=R.useParams(),{field:l=null}=R.useSearch(),{data:r}=q(t.configuration.get.queryOptions({id:n,field:l})),[x,p]=g.useState(0),j=async()=>{await a.invalidateQueries(t.configuration.pathFilter())},o=w(t.configuration.save.mutationOptions({onSuccess:async(d,E)=>{d.kind!=="rejected"&&(await j(),E.change==="reset"&&p(T=>T+1))}})),h=w(t.configuration.create.mutationOptions({onSuccess:async d=>{d.kind!=="rejected"&&(await j(),await s({to:"/settings/profiles/$id",params:{id:d.id}}))}})),u=w(t.configuration.delete.mutationOptions({onSuccess:async d=>{d.kind!=="rejected"&&(await s({to:"/settings/profiles"}),await j())}})),i=((f=o.variables)==null?void 0:f.change)==="rename",b=((k=o.data)==null?void 0:k.kind)==="rejected"?o.data.message:((L=o.error)==null?void 0:L.message)??null,v=(i?b:null)??(((N=h.data)==null?void 0:N.kind)==="rejected"?h.data.message:(_=h.error)==null?void 0:_.message)??(((B=u.data)==null?void 0:B.kind)==="rejected"?u.data.message:(A=u.error)==null?void 0:A.message)??null,y={isPending:o.isPending,errorMessage:i?null:b,savedMessage:((C=o.data)==null?void 0:C.kind)==="saved"&&!i?o.data.message:null},{panel:c}=r;return e.jsxs(e.Fragment,{children:[e.jsx("title",{children:`${r.name} • ${ke}`}),e.jsx(te,{name:r.name,originLabel:r.originLabel,notice:r.notice,canRename:r.canRename,canDelete:r.canDelete,duplicateLabel:r.duplicateLabel,isBusy:h.isPending||u.isPending,errorMessage:v,onDuplicate:()=>{h.mutate({name:null,sourceId:n})},onRename:d=>{o.mutate({change:"rename",id:n,name:d})},onDelete:()=>{u.mutate({id:n})}}),e.jsxs("div",{className:"grid gap-x-10 gap-y-8 lg:grid-cols-[17rem_minmax(0,1fr)]",children:[e.jsx("div",{className:"self-start lg:sticky lg:top-22",children:e.jsx(fe,{configurationId:n,groups:r.index})}),e.jsx("div",{className:"min-w-0",children:c.kind==="switches"?e.jsx(ve,{title:c.title,summary:c.summary,contextKindsTitle:c.contextKindsTitle,contextKindsHint:c.contextKindsHint,contextKinds:c.contextKinds,onSubmit:d=>{o.mutate({change:"switches",id:n,contextCodeBlockKinds:d})},children:e.jsx(D,{...y})},`${n}:${c.contextKinds.map(d=>String(d.isRequired)).join()}`):e.jsx(ce,{title:c.title,summary:c.summary,path:c.path,offMessage:c.offMessage,texts:c.texts,renderActions:(d,E)=>e.jsx(D,{...y,unsavedLabel:d,question:E,children:c.resetLabel===null?null:e.jsx(m,{type:"button",variant:"outline",size:"sm",disabled:o.isPending,onClick:()=>{o.mutate({change:"reset",id:n,path:c.path})},children:c.resetLabel})}),onSubmit:d=>{o.mutate({change:"field",id:n,path:c.path,texts:d})}},`${n}:${c.path}:${String(x)}`)})]})]})};export{Le as component};
@@ -1 +0,0 @@
1
- import{S as r}from"./index-WOMODjD2.js";import"./index-C8_4U9zA.js";const n=r;export{n as errorComponent};
@@ -1 +0,0 @@
1
- import{S as r}from"./index-WOMODjD2.js";import"./index-C8_4U9zA.js";const n=r;export{n as errorComponent};
@@ -1 +0,0 @@
1
- import{g as u,F as d,M as r,r as p,i as c,j as e}from"./index-C8_4U9zA.js";import{u as m,S as h}from"./index-BUtsWXGk.js";import{A as f,a as S}from"./index-BDgPH-og.js";import{S as w}from"./index-EFsgiJx1.js";import"./index-RYSZy-Ra.js";import"./index-Dz-E4Hhc.js";const x="Agent integration • Settings • Flight Plan",A="Agent integration",b=()=>{var l;const o=u(),{data:t}=d(o.settings.get.queryOptions(r)),s=m(),[n,a]=p.useState(null),i=c({...o.setup.browseFolders.queryOptions({path:n??"",purpose:"install-folder"}),enabled:n!==null});return t.section!==r.section?null:e.jsxs(e.Fragment,{children:[e.jsx("title",{children:x}),e.jsx(w,{title:A,children:"Configure which agent you prefer and where Flight Plan installs the agent plugin and the MCP server."}),e.jsxs(f,{agents:t.agents,defaultAgent:t.defaultAgent,problem:s.problem,folderBrowser:n===null?null:i.data??null,folderBrowserErrorMessage:((l=i.error)==null?void 0:l.message)??null,onBrowseFolder:a,onBrowseEnd:()=>{a(null)},onSubmit:g=>{s.save({...r,...g})},children:[e.jsx(S,{}),e.jsx(h,{isPending:s.isPending,errorMessage:s.errorMessage,savedMessage:s.savedMessage})]})]})};export{b as component};
@@ -1 +0,0 @@
1
- import{j as t,S as d,g as h,ab as p,r as l,F as x,i as S,l as v,ac as F}from"./index-C8_4U9zA.js";const j=({creationForm:a,targetSearch:e,onTargetQueryChange:r,onTargetSelect:s})=>t.jsx("div",{className:"grid max-w-208 gap-4",children:t.jsx(d,{label:a.target.label,hint:a.target.hint,placeholder:a.target.placeholder,value:e.value,suggestions:e.options,message:e.message,errorMessage:null,className:"max-w-xl",onValueChange:r,onSelect:s})}),y="Searching…",C="",N=a=>{var o,c;const e=h(),r=p(),[s,i]=l.useState(C),g=l.useDeferredValue(s),{data:u}=x(e.review.creationForm.queryOptions({repositoryName:a})),n=S({...e.review.searchTargets.queryOptions({repositoryName:a,query:g}),placeholderData:v});return{creationForm:u,targetSearch:{value:s,options:((o=n.data)==null?void 0:o.options)??[],message:((c=n.data)==null?void 0:c.message)??(n.isPending?y:null)},onTargetQueryChange:i,onTargetSelect:m=>{r({to:"/pr-reviews/$repoName/$branchId",params:{repoName:a,branchId:m}})}}},Q=()=>{const{repoName:a}=F.useParams(),e=N(a);return t.jsxs(t.Fragment,{children:[t.jsxs("header",{className:"pb-6",children:[t.jsx("h1",{className:"text-4xl leading-10 font-bold tracking-[-0.02em]",children:e.creationForm.title}),t.jsx("p",{className:"mt-2 max-w-[62ch] text-muted-foreground",children:e.creationForm.description})]}),t.jsx(j,{creationForm:e.creationForm,targetSearch:e.targetSearch,onTargetQueryChange:e.onTargetQueryChange,onTargetSelect:e.onTargetSelect})]})};export{Q as component};
@@ -1 +0,0 @@
1
- import{r as c,j as e,Y as p,L as f,s as N,g as b,h as j,ab as I,F as C,k as S,x as y,v as L,B as E}from"./index-C8_4U9zA.js";import{S as v}from"./index-EFsgiJx1.js";const w="Name",T="How the configuration is listed when you create a Flight Plan.",k="Start from",A="The new configuration is a copy of the same instructions, yours to change.",B=({sources:i,selectedSourceId:d,nameError:r,sourceError:o,children:t,onSubmit:s})=>{const l=c.useId(),n=c.useId(),m=c.useId(),[u,h]=c.useState(""),[x,g]=c.useState(d);return e.jsxs("form",{onSubmit:N(()=>{s(u,x)}),children:[e.jsxs("div",{className:"max-w-md",children:[e.jsx("label",{htmlFor:l,className:"block text-sm font-bold",children:w}),e.jsx("p",{className:"pb-2 text-sm text-muted-foreground",children:T}),e.jsx(p,{id:l,value:u,"aria-invalid":r!==null,"aria-describedby":r===null?void 0:n,onChange:a=>{h(a.target.value)}}),r===null?null:e.jsx("p",{id:n,role:"alert",className:"pt-1.5 text-sm text-destructive",children:r})]}),e.jsxs("fieldset",{className:"mt-8",children:[e.jsx("legend",{className:"text-sm font-bold",children:k}),e.jsx("p",{className:"max-w-[62ch] pb-2 text-sm text-muted-foreground",children:A}),e.jsx("ul",{className:"border-t border-border",children:i.map(a=>e.jsx("li",{className:"border-b border-border py-3",children:e.jsxs("label",{className:"flex cursor-pointer items-start gap-3",children:[e.jsx("input",{type:"radio",name:m,checked:x===a.id,className:"mt-1 size-4 shrink-0 accent-(--primary)",onChange:()=>{g(a.id)}}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block font-bold",children:a.name}),a.summary===null?null:e.jsx("span",{className:"block max-w-[62ch] text-sm",children:a.summary}),e.jsx(f,{segments:a.details,className:"text-sm text-muted-foreground"})]})]})},a.id))}),o===null?null:e.jsx("p",{role:"alert",className:"pt-2 text-sm text-destructive",children:o})]}),t]})},F="New configuration • Settings • Flight Plan",_="New configuration",P="Create",O="Creating…",M="Cancel",U=()=>{var l;const i=b(),d=j(),r=I(),{data:o}=C(i.configuration.creationForm.queryOptions()),t=S(i.configuration.create.mutationOptions({onSuccess:async n=>{n.kind!=="rejected"&&(await d.invalidateQueries(i.configuration.pathFilter()),await r({to:"/settings/profiles/$id",params:{id:n.id}}))}})),s=((l=t.data)==null?void 0:l.kind)==="rejected"?t.data:null;return e.jsxs(e.Fragment,{children:[e.jsx("title",{children:F}),e.jsx(v,{title:_,children:"Name the configuration and choose what it starts from. You change its instructions on the next page."}),e.jsx(B,{sources:o.sources,selectedSourceId:o.selectedSourceId,nameError:(s==null?void 0:s.field)==="name"?s.message:null,sourceError:(s==null?void 0:s.field)==="source"?s.message:null,onSubmit:(n,m)=>{t.mutate({name:n,sourceId:m})},children:e.jsxs("footer",{className:"mt-6 border-t border-border pt-4",children:[t.error===null?null:e.jsx("p",{role:"alert",className:"pb-3 text-sm text-destructive",children:t.error.message}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[e.jsx(y,{to:"/settings/profiles",className:L({variant:"ghost"}),children:M}),e.jsx(E,{type:"submit",disabled:t.isPending,children:t.isPending?O:P})]})]})})]})};export{U as component};
@@ -1 +0,0 @@
1
- import{S as r}from"./index-WOMODjD2.js";import"./index-C8_4U9zA.js";const n=r;export{n as errorComponent};
@@ -1 +0,0 @@
1
- import{u as t,j as e,B as n,x as r}from"./index-C8_4U9zA.js";const a="The backend did not say what went wrong.",i=({error:o})=>{const s=t();return e.jsxs("section",{role:"alert",className:"max-w-prose",children:[e.jsx("h1",{className:"text-4xl leading-10 font-bold tracking-[-0.02em]",children:"Could not open this page"}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:o instanceof Error?o.message:a}),e.jsxs("div",{className:"mt-4 flex items-center gap-4",children:[e.jsx(n,{onClick:()=>{s.invalidate()},children:"Try again"}),e.jsx(r,{to:"/",className:"underline",children:"Go to your repositories"})]})]})},c=i;export{c as errorComponent};
@@ -1 +0,0 @@
1
- import{j as s,a4 as g,z as h,g as N,h as f,a5 as u,a6 as b,r as j,F as I,k as v,a7 as w,B as y,x as L}from"./index-C8_4U9zA.js";const F=({label:t,className:l})=>s.jsxs("p",{role:"status",className:h("flex items-center gap-2 font-bold",l),children:[s.jsx(g,{"aria-hidden":"true",className:"size-4 motion-safe:animate-spin"}),t]}),R=2e3,k=()=>{var c,d;const t=N(),l=f(),r=u.useSearch(),i=u.useLoaderData(),o=b(r),[p,x]=j.useState(i.importId),{data:e}=I({...t.review.importForm.queryOptions(o),refetchInterval:R}),a=v(t.review.import.mutationOptions({onSuccess:async({importId:n})=>{x(n),await l.invalidateQueries(t.review.importForm.pathFilter())}})),m=((c=a.error)==null?void 0:c.message)??(((d=a.data)==null?void 0:d.importId)===null?a.data.message:i.refusal);return e.isFinished&&e.importId!==null&&e.importId===p?s.jsx(w,{to:"/pr-reviews/$repoName/$branchId",params:{repoName:r.repository,branchId:r.target},replace:!0}):s.jsxs("section",{className:"max-w-prose",children:[s.jsx("h1",{className:"text-4xl leading-10 font-bold tracking-[-0.02em]",children:e.heading}),s.jsx("p",{className:"mt-2 text-muted-foreground",children:e.message}),e.details.length===0?null:s.jsx("dl",{className:"mt-6 grid grid-cols-[auto_minmax(0,1fr)] gap-x-6 gap-y-1 text-sm",children:e.details.map(n=>s.jsxs("div",{className:"contents",children:[s.jsx("dt",{className:"text-muted-foreground",children:n.label}),s.jsx("dd",{className:"font-mono break-all",children:n.value})]},n.label))}),e.warning===null?null:s.jsx("p",{className:"mt-6 font-bold text-signal-text",children:e.warning}),e.isImporting||a.isPending?s.jsx(F,{label:e.pendingLabel,className:"mt-6"}):null,m===null||e.isImporting?null:s.jsx("p",{role:"alert",className:"mt-6 text-destructive",children:m}),s.jsxs("div",{className:"mt-6 flex items-center gap-4",children:[e.submitLabel===null||e.isImporting?null:s.jsx(y,{disabled:a.isPending,onClick:()=>{a.mutate(o)},children:e.submitLabel}),e.reviewHref===null?null:s.jsx(L,{to:"/pr-reviews/$repoName/$branchId",params:{repoName:r.repository,branchId:r.target},className:"underline",children:"Open the review page"})]})]})};export{k as component};
@@ -1 +0,0 @@
1
- import{g as i,F as a,N as n,j as e}from"./index-C8_4U9zA.js";import{u as g,S as c}from"./index-BUtsWXGk.js";import{F as m}from"./index-Dk3p64fP.js";import{S as d}from"./index-EFsgiJx1.js";const l="Git integration • Settings • Flight Plan",u="Git integration",f=()=>{const o=i(),{data:t}=a(o.settings.get.queryOptions(n)),s=g();return t.section!==n.section?null:e.jsxs(e.Fragment,{children:[e.jsx("title",{children:l}),e.jsxs(d,{title:u,children:["By default, Flight Plan uses the"," ",e.jsx("code",{className:"rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[0.875em]",children:"git"})," ","command to read and fetch your local and remote branches and their commits."]}),e.jsx(m,{codeHostFeatures:t.codeHostFeatures,forges:t.forges,problem:s.problem,onSubmit:r=>{s.save({...n,...r})},children:e.jsx(c,{isPending:s.isPending,errorMessage:s.errorMessage,savedMessage:s.savedMessage})})]})};export{f as component};
@@ -1 +0,0 @@
1
- import{S as r}from"./index-WOMODjD2.js";import"./index-C8_4U9zA.js";const n=r;export{n as errorComponent};