@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
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: live
3
+ description: Use when the reviewer runs /flightplan:live <repository>/<target> to keep this session serving one Flight Plan review. Waits on the review's listening stream for parts to write up and chat messages, does each one, keeps Flight Plan told that the session is online, and goes back to waiting until the reviewer closes the terminal.
4
+ argument-hint: <repository>/<target>
5
+ allowed-tools: mcp__plugin_flightplan_flightplan__* Bash(curl -sN *)
6
+ ---
7
+
8
+ # Serve a Flight Plan review live
9
+
10
+ The reviewer reads a review in Flight Plan's web app, and this session is the
11
+ agent behind it. Flight Plan asks for work on the review's listening stream:
12
+ parts of the review to write up, and the reviewer's chat messages and answers.
13
+ You do each one and go back to listening. You keep doing that until the reviewer
14
+ closes this terminal.
15
+
16
+ **The review comes from the argument:** `$ARGUMENTS`. It is
17
+ `<repository>/<target>`, such as `storefront/pr-412`: everything before the last
18
+ `/` is the `repositoryName`, and the rest is the `targetId`, `pr-<number>` for a
19
+ pull request or `branch-<name>` for a branch. Every Flight Plan tool takes both.
20
+ If the argument is missing or has no `/`, ask the reviewer in this terminal which
21
+ review to serve, and wait for the answer.
22
+
23
+ ## Stay online
24
+
25
+ Flight Plan shows the reviewer whether an agent is online for their review.
26
+ Every call to a Flight Plan tool counts. When you go a while without one, say
27
+ while you read files, search the code or think something through, call `ping`
28
+ with the review's `repositoryName` and `targetId` at least every 5 seconds.
29
+ While the listen command waits, the open connection counts, so do nothing else.
30
+
31
+ ## Start
32
+
33
+ 1. Call `ping`. If it refuses the review, tell the reviewer in this terminal what
34
+ it said, and stop.
35
+ 2. Call `nodes` with `unfilled: true`. If it lists parts that are required and
36
+ unwritten, write them up as the `flightplan:review` skill says, before you
37
+ listen. An earlier session may have stopped halfway.
38
+ 3. Listen.
39
+
40
+ ## Listen
41
+
42
+ Run the listen command the tools give you, in the foreground, with a timeout of
43
+ 10 minutes:
44
+
45
+ ```
46
+ curl -sN "<server>/api/<repositoryName>/<targetId>/live/agent"
47
+ ```
48
+
49
+ The `ping` result and the other tools' results name the exact command. It waits
50
+ until Flight Plan has something for you, prints it as one server-sent event and
51
+ exits. Its output is one of these:
52
+
53
+ - **`event: work`**: the reviewer's messages, answers to your questions, or a
54
+ request from Flight Plan, such as a part to write up, a Flight Plan to publish
55
+ or one to fetch. Do all of it, then listen again.
56
+ - **`event: idle`**: nothing came for a while. Listen again at once.
57
+ - **Nothing, or an error:** Flight Plan restarted or is not running. Wait a few
58
+ seconds, call `ping`, and listen again. If `ping` keeps failing, tell the
59
+ reviewer in this terminal that Flight Plan cannot be reached, and stop.
60
+
61
+ Never run the listen command in the background, and never two at a time. The
62
+ stream hands each request to exactly one listener.
63
+
64
+ ## Do the work
65
+
66
+ - **A part to write up**, or a whole review: follow the `flightplan:review`
67
+ skill. It says how to read the change, how the reviewer wants it written, and
68
+ how to finish with `complete`.
69
+ - **A chat message:** answer it with `send-message`. When it asks you to change
70
+ the review, change it through `read`, `nodes` and `update-nodes`, then say what
71
+ you changed. The reviewer reads only what you send through Flight Plan, never
72
+ this terminal.
73
+ - **Something you need the reviewer to decide:** ask with `ask-questions`, then
74
+ listen. The answers come on the stream like any other work.
75
+ - **A Flight Plan to publish or to fetch:** do what the request says, then call
76
+ `record-publication` or `record-import`.
77
+
78
+ When everything in a packet is done, listen again. Do not end your turn between
79
+ packets: the reviewer is waiting on the stream, not on you.
@@ -50,11 +50,14 @@ A fourth, `record-import`, is the other direction. When Flight Plan asks you to
50
50
  fetch a Flight Plan from a Claude artifact, read the file it names with your
51
51
  Artifact tool, copy it unchanged to the path it gives, and call `record-import`.
52
52
 
53
- How the answer comes back depends on who started you. If Flight Plan started
54
- your session, its system prompt says so: end your turn after asking, and you are
55
- resumed with the answers. Otherwise the result of `ask-questions` gives a `curl`
56
- command. Run it in the background; it exits when the reviewer replies, and its
57
- output holds the reply and the command for the next one.
53
+ The answers come back on the review's listening stream. If you serve the
54
+ review with `/flightplan:live`, that skill already listens: go back to it after
55
+ asking. Otherwise the result of `ask-questions` gives a `curl` command. Run it in
56
+ the foreground; it exits when the reviewer replies, and its output holds the
57
+ reply and the command for the next one.
58
+
59
+ While you work without calling Flight Plan's tools, call `ping` at least every
60
+ 5 seconds, so the reviewer sees that an agent is online for the review.
58
61
 
59
62
  ## The order of work
60
63
 
@@ -0,0 +1 @@
1
+ import{a9 as r}from"./index-DRndyOxR.js";const e=r;export{e as errorComponent};
@@ -0,0 +1 @@
1
+ import{c as l,aa as c,j as u,ab as m}from"./index-DRndyOxR.js";const R=()=>{const e=l.c(6),t=c.useNavigate(),r=c.useParams(),o=c.useSearch();let a;e[0]!==t?(a=n=>{t({search:i=>({...i,...n}),replace:!0,resetScroll:!1})},e[0]=t,e[1]=a):a=e[1];let s;return e[2]!==r||e[3]!==o||e[4]!==a?(s=u.jsx(m,{params:r,search:o,onSearchChange:a}),e[2]=r,e[3]=o,e[4]=a,e[5]=s):s=e[5],s};export{R as component};
@@ -0,0 +1 @@
1
+ import{u as ae,r as K,c as F,j as n,Z as oe,B as w,s as H,z as se,E as re,h as ce,i as de,ac as ue,ae as ee,G as me,m as q}from"./index-DRndyOxR.js";import{T as fe}from"./index-DGsH5lbQ.js";function xe(t,e){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 i=!!(t.condition??!0),a=t.blockerFn;return{shouldBlockFn:async()=>i&&a!==void 0?await a():i,enableBeforeUnload:i,withResolver:a===void 0}}function he(t,e){const{shouldBlockFn:i,enableBeforeUnload:a=!0,disabled:l=!1,withResolver:x=!1}=xe(t),o=ae(),{history:u}=o,[s,m]=K.useState({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0});return K.useEffect(()=>{const r=async h=>{function c(N){const y=o.parseLocation(N),[,E,S]=o.getMatchedRoutes(y.pathname);return S===void 0?{routeId:"__notFound__",fullPath:y.pathname,pathname:y.pathname,params:E,search:o.options.parseSearch(N.search)}:{routeId:S.id,fullPath:S.fullPath,pathname:y.pathname,params:E,search:o.options.parseSearch(N.search)}}const g=c(h.currentLocation),f=c(h.nextLocation);if(g.routeId==="__notFound__"&&f.routeId!=="__notFound__")return!1;const b=await i({action:h.action,current:g,next:f});if(!x)return b;if(!b)return!1;const j=await new Promise(N=>{m({status:"blocked",current:g,next:f,action:h.action,proceed:()=>N(!1),reset:()=>N(!0)})});return m({status:"idle",current:void 0,next:void 0,action:void 0,proceed:void 0,reset:void 0}),j};return l?void 0:u.block({blockerFn:r,enableBeforeUnload:a})},[i,a,l,x,u,o]),s}const ge="All configurations",be="Rename",ve="Name",je="Save name",ke="Cancel",te="Delete",Ne="Keep",ye="text-2xl leading-8 font-bold tracking-[-0.015em] text-signal-text",Le=t=>{const e=F.c(29),[i,a]=K.useState("none"),[l,x]=K.useState(t.name);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(se,{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:ge}),e[0]=o):o=e[0];let u;e[1]!==l||e[2]!==t||e[3]!==i?(u=i==="renaming"?n.jsxs("form",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",onSubmit:H(()=>{t.onRename(l),a("none")}),children:[n.jsx(oe,{value:l,"aria-label":ve,className:"max-w-sm flex-1",onChange:g=>{x(g.target.value)}}),n.jsx(w,{type:"submit",size:"sm",children:je}),n.jsx(w,{type:"button",variant:"ghost",size:"sm",onClick:()=>{a("none")},children:ke})]}):n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("h2",{className:ye,children:t.name}),n.jsx("p",{className:"text-sm text-muted-foreground",children:t.originLabel})]}),e[1]=l,e[2]=t,e[3]=i,e[4]=u):u=e[4];let s;e[5]!==t.canDelete||e[6]!==t.canRename||e[7]!==t.duplicateLabel||e[8]!==t.isBusy||e[9]!==t.name||e[10]!==t.notice||e[11]!==t.onDelete||e[12]!==t.onDuplicate||e[13]!==i?(s=i==="deleting"?n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx("p",{className:"text-sm",children:`Delete ${t.name}? This cannot be undone.`}),n.jsx(w,{type:"button",variant:"ghost",size:"sm",onClick:()=>{a("none")},children:Ne}),n.jsx(w,{type:"button",variant:"destructive",size:"sm",disabled:t.isBusy,onClick:t.onDelete,children:te})]}):n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t.canRename&&i==="none"?n.jsx(w,{type:"button",variant:"ghost",size:"sm",onClick:()=>{x(t.name),a("renaming")},children:be}):null,t.canDelete?n.jsx(w,{type:"button",variant:"ghost",size:"sm",onClick:()=>{a("deleting")},children:te}):null,t.notice===null?n.jsx(w,{type:"button",variant:"outline",size:"sm",disabled:t.isBusy,onClick:t.onDuplicate,children:t.duplicateLabel}):null]}),e[5]=t.canDelete,e[6]=t.canRename,e[7]=t.duplicateLabel,e[8]=t.isBusy,e[9]=t.name,e[10]=t.notice,e[11]=t.onDelete,e[12]=t.onDuplicate,e[13]=i,e[14]=s):s=e[14];let m;e[15]!==u||e[16]!==s?(m=n.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-4 gap-y-3",children:[u,s]}),e[15]=u,e[16]=s,e[17]=m):m=e[17];let r;e[18]!==t.errorMessage?(r=t.errorMessage===null?null:n.jsx("p",{role:"alert",className:"pt-3 text-sm text-destructive",children:t.errorMessage}),e[18]=t.errorMessage,e[19]=r):r=e[19];let h;e[20]!==t.duplicateLabel||e[21]!==t.isBusy||e[22]!==t.notice||e[23]!==t.onDuplicate?(h=t.notice===null?null:n.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:[n.jsxs("p",{className:"min-w-0 flex-1 text-sm",children:[n.jsx("strong",{className:"font-bold",children:t.notice.lead}),` ${t.notice.advice}`]}),n.jsx(w,{type:"button",variant:"outline",size:"sm",disabled:t.isBusy,onClick:t.onDuplicate,children:t.duplicateLabel})]}),e[20]=t.duplicateLabel,e[21]=t.isBusy,e[22]=t.notice,e[23]=t.onDuplicate,e[24]=h):h=e[24];let c;return e[25]!==m||e[26]!==r||e[27]!==h?(c=n.jsxs("header",{className:"pb-6",children:[o,m,r,h]}),e[25]=m,e[26]=r,e[27]=h,e[28]=c):c=e[28],c},Ee="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",we="You have not saved this field. Leave it and lose what you wrote?",Be="Not saved yet",pe="Keep editing",_e="Leave",Ae=t=>Object.fromEntries(t.map(e=>[e.key,e.value])),Ke=t=>{const e=F.c(45),{title:i,summary:a,path:l,offMessage:x,texts:o,renderActions:u,onSubmit:s}=t;let m;e[0]!==o?(m=()=>Ae(o),e[0]=o,e[1]=m):m=e[1];const[r,h]=K.useState(m);let c;if(e[2]!==r||e[3]!==o){let k;e[5]!==r?(k=L=>r[L.key]!==L.value,e[5]=r,e[6]=k):k=e[6],c=o.some(k),e[2]=r,e[3]=o,e[4]=c}else c=e[4];const g=c;let f;e[7]!==g?(f=()=>g,e[7]=g,e[8]=f):f=e[8];let b;e[9]!==g||e[10]!==f?(b={shouldBlockFn:f,enableBeforeUnload:g,withResolver:!0},e[9]=g,e[10]=f,e[11]=b):b=e[11];const j=he(b);let N;e[12]!==j.proceed||e[13]!==j.reset||e[14]!==j.status?(N=j.status==="blocked"?n.jsxs("div",{role:"alert",className:"flex flex-wrap items-center justify-end gap-2 pb-3",children:[n.jsx("p",{className:"text-sm",children:we}),n.jsx(w,{type:"button",variant:"ghost",size:"sm",onClick:j.reset,children:pe}),n.jsx(w,{type:"button",variant:"destructive",size:"sm",onClick:j.proceed,children:_e})]}):null,e[12]=j.proceed,e[13]=j.reset,e[14]=j.status,e[15]=N):N=e[15];const y=N;let E;e[16]!==r||e[17]!==s||e[18]!==o?(E=H(()=>{s(o.map(k=>({key:k.key,text:r[k.key]??k.value})))}),e[16]=r,e[17]=s,e[18]=o,e[19]=E):E=e[19];let S;e[20]!==i?(S=n.jsx("h3",{className:"text-xl leading-7 font-bold",children:i}),e[20]=i,e[21]=S):S=e[21];let p;e[22]!==a?(p=n.jsx("p",{className:"mt-1 max-w-[62ch] text-muted-foreground",children:a}),e[22]=a,e[23]=p):p=e[23];let _;e[24]!==l?(_=n.jsx("p",{className:"mt-1 font-mono text-[0.8125rem] wrap-anywhere text-muted-foreground",children:l}),e[24]=l,e[25]=_):_=e[25];let A;e[26]!==x?(A=x===null?null:n.jsx("p",{className:"mt-4 max-w-[62ch] border-y border-border py-2.5 text-sm",children:x}),e[26]=x,e[27]=A):A=e[27];let B;if(e[28]!==o||e[29]!==i){let k;e[31]!==i?(k=L=>n.jsxs("section",{className:"mt-6",children:[n.jsx("h4",{className:"pb-1.5 text-sm font-bold",children:L.label}),n.jsx(fe,{label:`${i}: ${L.label}`,value:L.value,errorMessage:null,onChange:D=>{h(M=>({...M,[L.key]:D}))}}),L.isChanged?n.jsxs("details",{className:"mt-2",children:[n.jsx("summary",{className:Ee,children:L.shippedLabel}),n.jsx("p",{className:Se,children:L.shippedValue})]}):null]},L.key),e[31]=i,e[32]=k):k=e[32],B=o.map(k),e[28]=o,e[29]=i,e[30]=B}else B=e[30];const R=g?Be:null;let d;e[33]!==y||e[34]!==u||e[35]!==R?(d=u(R,y),e[33]=y,e[34]=u,e[35]=R,e[36]=d):d=e[36];let C;return e[37]!==A||e[38]!==B||e[39]!==d||e[40]!==E||e[41]!==S||e[42]!==p||e[43]!==_?(C=n.jsxs("form",{onSubmit:E,children:[S,p,_,A,B,d]}),e[37]=A,e[38]=B,e[39]=d,e[40]=E,e[41]=S,e[42]=p,e[43]=_,e[44]=C):C=e[44],C},Re="Fields of this configuration",Ce="What the marks mean",De=[{mark:"changed",label:"Changed"},{mark:"unchanged",label:"Unchanged"},{mark:"off",label:"Not written"}],Me={changed:"border-foreground bg-foreground",unchanged:"border-muted-foreground",off:"border-dashed border-muted-foreground"},Te="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)",le=t=>{const e=F.c(4),{mark:i}=t,a=Me[i];let l;e[0]!==a?(l=re("size-2.5 shrink-0 rounded-[2px] border-[1.5px]",a),e[0]=a,e[1]=l):l=e[1];let x;return e[2]!==l?(x=n.jsx("span",{"aria-hidden":"true",className:l}),e[2]=l,e[3]=x):x=e[3],x},Fe=t=>{const e=F.c(10),{configurationId:i,groups:a}=t;let l;if(e[0]!==i||e[1]!==a){let s;e[3]!==i?(s=m=>n.jsxs("section",{children:[m.title===null?null:n.jsx("div",{className:"flex items-center gap-3 border-l-4 border-border pt-4 pr-2 pb-1 pl-4",children:n.jsx("h3",{className:"min-w-0 flex-1 text-xs leading-4 font-bold text-muted-foreground",children:m.title})}),n.jsx("ul",{children:m.entries.map(r=>n.jsx("li",{children:n.jsxs(se,{to:"/settings/profiles/$id",params:{id:i},search:{field:r.key},"aria-current":r.isOpen?"page":void 0,className:Te,children:[n.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:r.label}),n.jsx(le,{mark:r.mark}),n.jsx("span",{className:"sr-only",children:r.markLabel})]})},r.key))})]},m.title??""),e[3]=i,e[4]=s):s=e[4],l=a.map(s),e[0]=i,e[1]=a,e[2]=l}else l=e[2];let x;e[5]!==l?(x=n.jsx("div",{className:"min-h-0 overflow-y-auto",children:l}),e[5]=l,e[6]=x):x=e[6];let o;e[7]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("ul",{"aria-label":Ce,className:"flex shrink-0 flex-wrap gap-x-4 gap-y-1 border-t border-border pt-3 text-xs text-muted-foreground",children:De.map($e)}),e[7]=o):o=e[7];let u;return e[8]!==x?(u=n.jsxs("nav",{"aria-label":Re,className:"flex flex-col lg:max-h-[calc(100dvh-7rem)]",children:[x,o]}),e[8]=x,e[9]=u):u=e[9],u};function $e(t){return n.jsxs("li",{className:"flex items-center gap-1.5",children:[n.jsx(le,{mark:t.mark}),t.label]},t.mark)}const Ie="Save",Pe="Saving…",ne=t=>{const e=F.c(17),{isPending:i,errorMessage:a,savedMessage:l,unsavedLabel:x,question:o,children:u}=t,s=x===void 0?null:x,m=o===void 0?null:o;let r;e[0]!==a?(r=a===null?null:n.jsx("p",{role:"alert",className:"pb-3 text-sm text-destructive",children:a}),e[0]=a,e[1]=r):r=e[1];let h;e[2]!==i||e[3]!==l||e[4]!==s?(h=s===null?n.jsx("p",{role:"status",className:"ml-auto text-sm text-muted-foreground",children:i?null:l}):n.jsx("p",{className:"ml-auto text-sm font-bold",children:s}),e[2]=i,e[3]=l,e[4]=s,e[5]=h):h=e[5];const c=i?Pe:Ie;let g;e[6]!==i||e[7]!==c?(g=n.jsx(w,{type:"submit",disabled:i,children:c}),e[6]=i,e[7]=c,e[8]=g):g=e[8];let f;e[9]!==u||e[10]!==h||e[11]!==g?(f=n.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[u,h,g]}),e[9]=u,e[10]=h,e[11]=g,e[12]=f):f=e[12];let b;return e[13]!==m||e[14]!==r||e[15]!==f?(b=n.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:[m,r,f]}),e[13]=m,e[14]=r,e[15]=f,e[16]=b):b=e[16],b},ze=(t,e)=>t.includes(e)?t.filter(i=>i!==e):[...t,e],Oe=t=>{const e=F.c(17),{label:i,description:a,isChecked:l,onToggle:x}=t,o=K.useId(),u=K.useId();let s;e[0]!==u||e[1]!==o||e[2]!==l||e[3]!==x?(s=n.jsx("input",{id:o,type:"checkbox",checked:l,"aria-describedby":u,className:"mt-1 size-4 shrink-0 accent-(--primary)",onChange:x}),e[0]=u,e[1]=o,e[2]=l,e[3]=x,e[4]=s):s=e[4];let m;e[5]!==o||e[6]!==i?(m=n.jsx("label",{htmlFor:o,className:"block cursor-pointer font-bold",children:i}),e[5]=o,e[6]=i,e[7]=m):m=e[7];let r;e[8]!==a||e[9]!==u?(r=n.jsx("p",{id:u,className:"max-w-[62ch] text-sm text-muted-foreground",children:a}),e[8]=a,e[9]=u,e[10]=r):r=e[10];let h;e[11]!==m||e[12]!==r?(h=n.jsxs("div",{className:"min-w-0",children:[m,r]}),e[11]=m,e[12]=r,e[13]=h):h=e[13];let c;return e[14]!==s||e[15]!==h?(c=n.jsxs("li",{className:"flex items-start gap-3 border-b border-border py-3",children:[s,h]}),e[14]=s,e[15]=h,e[16]=c):c=e[16],c},Ue=t=>{const e=F.c(30);let i;e[0]!==t.contextKinds?(i=()=>t.contextKinds.filter(qe).map(He),e[0]=t.contextKinds,e[1]=i):i=e[1];const[a,l]=K.useState(i);let x;e[2]!==t||e[3]!==a?(x=H(()=>{t.onSubmit(a)}),e[2]=t,e[3]=a,e[4]=x):x=e[4];let o;e[5]!==t.title?(o=n.jsx("h3",{className:"text-xl leading-7 font-bold",children:t.title}),e[5]=t.title,e[6]=o):o=e[6];let u;e[7]!==t.summary?(u=n.jsx("p",{className:"mt-1 max-w-[62ch] text-muted-foreground",children:t.summary}),e[7]=t.summary,e[8]=u):u=e[8];let s;e[9]!==t.contextKindsTitle?(s=n.jsx("legend",{className:"text-sm font-bold",children:t.contextKindsTitle}),e[9]=t.contextKindsTitle,e[10]=s):s=e[10];let m;e[11]!==t.contextKindsHint?(m=n.jsx("p",{className:"max-w-[62ch] pb-2 text-sm text-muted-foreground",children:t.contextKindsHint}),e[11]=t.contextKindsHint,e[12]=m):m=e[12];let r;if(e[13]!==t.contextKinds||e[14]!==a){let f;e[16]!==a?(f=b=>n.jsx(Oe,{label:b.label,description:b.description,isChecked:a.includes(b.kind),onToggle:()=>{l(j=>ze(j,b.kind))}},b.kind),e[16]=a,e[17]=f):f=e[17],r=t.contextKinds.map(f),e[13]=t.contextKinds,e[14]=a,e[15]=r}else r=e[15];let h;e[18]!==r?(h=n.jsx("ul",{className:"border-t border-border",children:r}),e[18]=r,e[19]=h):h=e[19];let c;e[20]!==s||e[21]!==m||e[22]!==h?(c=n.jsxs("fieldset",{className:"mt-6",children:[s,m,h]}),e[20]=s,e[21]=m,e[22]=h,e[23]=c):c=e[23];let g;return e[24]!==t.children||e[25]!==x||e[26]!==o||e[27]!==u||e[28]!==c?(g=n.jsxs("form",{onSubmit:x,children:[o,u,c,t.children]}),e[24]=t.children,e[25]=x,e[26]=o,e[27]=u,e[28]=c,e[29]=g):g=e[29],g};function qe(t){return t.isRequired}function He(t){return t.kind}const Ve="Prompt configurations • Settings • Flight Plan",We=()=>{var V,G,Q,Y,X,W,Z,J;const t=F.c(78),e=ce(),i=de(),a=ue(),{id:l}=ee.useParams(),{field:x}=ee.useSearch(),o=x===void 0?null:x;let u;t[0]!==o||t[1]!==l||t[2]!==e.configuration.get?(u=e.configuration.get.queryOptions({id:l,field:o}),t[0]=o,t[1]=l,t[2]=e.configuration.get,t[3]=u):u=t[3];const{data:s}=me(u),[m,r]=K.useState(0);let h;t[4]!==i||t[5]!==e.configuration?(h=async()=>{await i.invalidateQueries(e.configuration.pathFilter())},t[4]=i,t[5]=e.configuration,t[6]=h):h=t[6];const c=h;let g;if(t[7]!==c||t[8]!==e.configuration.save){let v;t[10]!==c?(v=async(T,ie)=>{T.kind!=="rejected"&&(await c(),ie.change==="reset"&&r(Ge))},t[10]=c,t[11]=v):v=t[11],g=e.configuration.save.mutationOptions({onSuccess:v}),t[7]=c,t[8]=e.configuration.save,t[9]=g}else g=t[9];const f=q(g);let b;if(t[12]!==a||t[13]!==c||t[14]!==e.configuration.create){let v;t[16]!==a||t[17]!==c?(v=async T=>{T.kind!=="rejected"&&(await c(),await a({to:"/settings/profiles/$id",params:{id:T.id}}))},t[16]=a,t[17]=c,t[18]=v):v=t[18],b=e.configuration.create.mutationOptions({onSuccess:v}),t[12]=a,t[13]=c,t[14]=e.configuration.create,t[15]=b}else b=t[15];const j=q(b);let N;if(t[19]!==a||t[20]!==c||t[21]!==e.configuration.delete){let v;t[23]!==a||t[24]!==c?(v=async T=>{T.kind!=="rejected"&&(await a({to:"/settings/profiles"}),await c())},t[23]=a,t[24]=c,t[25]=v):v=t[25],N=e.configuration.delete.mutationOptions({onSuccess:v}),t[19]=a,t[20]=c,t[21]=e.configuration.delete,t[22]=N}else N=t[22];const y=q(N),E=((V=f.variables)==null?void 0:V.change)==="rename",S=((G=f.data)==null?void 0:G.kind)==="rejected"?f.data.message:((Q=f.error)==null?void 0:Q.message)??null,p=(E?S:null)??(((Y=j.data)==null?void 0:Y.kind)==="rejected"?j.data.message:(X=j.error)==null?void 0:X.message)??(((W=y.data)==null?void 0:W.kind)==="rejected"?y.data.message:(Z=y.error)==null?void 0:Z.message)??null,_=E?null:S,A=((J=f.data)==null?void 0:J.kind)==="saved"&&!E?f.data.message:null;let B;t[26]!==f.isPending||t[27]!==_||t[28]!==A?(B={isPending:f.isPending,errorMessage:_,savedMessage:A},t[26]=f.isPending,t[27]=_,t[28]=A,t[29]=B):B=t[29];const R=B,{panel:d}=s,C=`${s.name} • ${Ve}`;let k;t[30]!==C?(k=n.jsx("title",{children:C}),t[30]=C,t[31]=k):k=t[31];const L=j.isPending||y.isPending;let D;t[32]!==j||t[33]!==l?(D=()=>{j.mutate({name:null,sourceId:l})},t[32]=j,t[33]=l,t[34]=D):D=t[34];let M;t[35]!==l||t[36]!==f?(M=v=>{f.mutate({change:"rename",id:l,name:v})},t[35]=l,t[36]=f,t[37]=M):M=t[37];let $;t[38]!==l||t[39]!==y?($=()=>{y.mutate({id:l})},t[38]=l,t[39]=y,t[40]=$):$=t[40];let I;t[41]!==p||t[42]!==s.canDelete||t[43]!==s.canRename||t[44]!==s.duplicateLabel||t[45]!==s.name||t[46]!==s.notice||t[47]!==s.originLabel||t[48]!==L||t[49]!==D||t[50]!==M||t[51]!==$?(I=n.jsx(Le,{name:s.name,originLabel:s.originLabel,notice:s.notice,canRename:s.canRename,canDelete:s.canDelete,duplicateLabel:s.duplicateLabel,isBusy:L,errorMessage:p,onDuplicate:D,onRename:M,onDelete:$}),t[41]=p,t[42]=s.canDelete,t[43]=s.canRename,t[44]=s.duplicateLabel,t[45]=s.name,t[46]=s.notice,t[47]=s.originLabel,t[48]=L,t[49]=D,t[50]=M,t[51]=$,t[52]=I):I=t[52];let P;t[53]!==l||t[54]!==s.index?(P=n.jsx("div",{className:"self-start lg:sticky lg:top-22",children:n.jsx(Fe,{configurationId:l,groups:s.index})}),t[53]=l,t[54]=s.index,t[55]=P):P=t[55];let z;t[56]!==l||t[57]!==d.contextKinds||t[58]!==d.contextKindsHint||t[59]!==d.contextKindsTitle||t[60]!==d.kind||t[61]!==d.offMessage||t[62]!==d.path||t[63]!==d.resetLabel||t[64]!==d.summary||t[65]!==d.texts||t[66]!==d.title||t[67]!==R||t[68]!==m||t[69]!==f?(z=n.jsx("div",{className:"min-w-0",children:d.kind==="switches"?n.jsx(Ue,{title:d.title,summary:d.summary,contextKindsTitle:d.contextKindsTitle,contextKindsHint:d.contextKindsHint,contextKinds:d.contextKinds,onSubmit:v=>{f.mutate({change:"switches",id:l,contextCodeBlockKinds:v})},children:n.jsx(ne,{...R})},`${l}:${d.contextKinds.map(Qe).join()}`):n.jsx(Ke,{title:d.title,summary:d.summary,path:d.path,offMessage:d.offMessage,texts:d.texts,renderActions:(v,T)=>n.jsx(ne,{...R,unsavedLabel:v,question:T,children:d.resetLabel===null?null:n.jsx(w,{type:"button",variant:"outline",size:"sm",disabled:f.isPending,onClick:()=>{f.mutate({change:"reset",id:l,path:d.path})},children:d.resetLabel})}),onSubmit:v=>{f.mutate({change:"field",id:l,path:d.path,texts:v})}},`${l}:${d.path}:${String(m)}`)}),t[56]=l,t[57]=d.contextKinds,t[58]=d.contextKindsHint,t[59]=d.contextKindsTitle,t[60]=d.kind,t[61]=d.offMessage,t[62]=d.path,t[63]=d.resetLabel,t[64]=d.summary,t[65]=d.texts,t[66]=d.title,t[67]=R,t[68]=m,t[69]=f,t[70]=z):z=t[70];let O;t[71]!==P||t[72]!==z?(O=n.jsxs("div",{className:"grid gap-x-10 gap-y-8 lg:grid-cols-[17rem_minmax(0,1fr)]",children:[P,z]}),t[71]=P,t[72]=z,t[73]=O):O=t[73];let U;return t[74]!==k||t[75]!==I||t[76]!==O?(U=n.jsxs(n.Fragment,{children:[k,I,O]}),t[74]=k,t[75]=I,t[76]=O,t[77]=U):U=t[77],U};function Ge(t){return t+1}function Qe(t){return String(t.isRequired)}export{We as component};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-Cl1Gcfks.js";import"./index-DRndyOxR.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
1
+ import{c as E,h as j,N as w,G as v,r as y,l as F,j as n}from"./index-DRndyOxR.js";import{u as T,S as _}from"./index-CikPFj0e.js";import{A as B,a as C}from"./index-CFZ7PaJE.js";import{S as I}from"./index-DvuJKeYS.js";import"./index-BA8Qwprc.js";import"./index-COdzqD_M.js";const O="Agent integration • Settings • Flight Plan",N="Agent integration",U=()=>{var M;const e=E.c(26),r=j();let g;e[0]!==r.settings.get?(g=r.settings.get.queryOptions(w),e[0]=r.settings.get,e[1]=g):g=e[1];const{data:s}=v(g),t=T(),[i,x]=y.useState(null);let o;e[2]!==i||e[3]!==r.setup.browseFolders?(o=r.setup.browseFolders.queryOptions({path:i??"",purpose:"install-folder"}),e[2]=i,e[3]=r.setup.browseFolders,e[4]=o):o=e[4];const h=i!==null;let c;e[5]!==o||e[6]!==h?(c={...o,enabled:h},e[5]=o,e[6]=h,e[7]=c):c=e[7];const A=F(c);if(s.section!==w.section)return null;let u,d;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("title",{children:O}),d=n.jsx(I,{title:N,children:"Configure which agent you prefer and where Flight Plan installs the agent plugin and the MCP server."}),e[8]=u,e[9]=d):(u=e[8],d=e[9]);const S=i===null?null:A.data??null,b=((M=A.error)==null?void 0:M.message)??null;let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{x(null)},e[10]=m):m=e[10];let l;e[11]!==t?(l=P=>{t.save({...w,...P})},e[11]=t,e[12]=l):l=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(C,{}),e[13]=p):p=e[13];let a;e[14]!==t.errorMessage||e[15]!==t.isPending||e[16]!==t.savedMessage?(a=n.jsx(_,{isPending:t.isPending,errorMessage:t.errorMessage,savedMessage:t.savedMessage}),e[14]=t.errorMessage,e[15]=t.isPending,e[16]=t.savedMessage,e[17]=a):a=e[17];let f;return e[18]!==s.agents||e[19]!==s.defaultAgent||e[20]!==t.problem||e[21]!==a||e[22]!==S||e[23]!==b||e[24]!==l?(f=n.jsxs(n.Fragment,{children:[u,d,n.jsxs(B,{agents:s.agents,defaultAgent:s.defaultAgent,problem:t.problem,folderBrowser:S,folderBrowserErrorMessage:b,onBrowseFolder:x,onBrowseEnd:m,onSubmit:l,children:[p,a]})]}),e[18]=s.agents,e[19]=s.defaultAgent,e[20]=t.problem,e[21]=a,e[22]=S,e[23]=b,e[24]=l,e[25]=f):f=e[25],f};export{U as component};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-Cl1Gcfks.js";import"./index-DRndyOxR.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
1
+ import{c as x,j as c,S as j,h as b,ac as P,r as Q,G as E,k as y,l as R,ad as $}from"./index-DRndyOxR.js";const q=t=>{const e=x.c(9),{creationForm:a,targetSearch:r,onTargetQueryChange:s,onTargetSelect:o}=t;let n;return e[0]!==a.target.hint||e[1]!==a.target.label||e[2]!==a.target.placeholder||e[3]!==s||e[4]!==o||e[5]!==r.message||e[6]!==r.options||e[7]!==r.value?(n=c.jsx("div",{className:"grid max-w-208 gap-4",children:c.jsx(j,{label:a.target.label,hint:a.target.hint,placeholder:a.target.placeholder,value:r.value,suggestions:r.options,message:r.message,errorMessage:null,className:"max-w-xl",onValueChange:s,onSelect:o})}),e[0]=a.target.hint,e[1]=a.target.label,e[2]=a.target.placeholder,e[3]=s,e[4]=o,e[5]=r.message,e[6]=r.options,e[7]=r.value,e[8]=n):n=e[8],n},k="Searching…",D="",G=t=>{var f,v,T,C;const e=x.c(22),a=b(),r=P(),[s,o]=Q.useState(D),n=Q.useDeferredValue(s);let l;e[0]!==t||e[1]!==a.review.creationForm?(l=a.review.creationForm.queryOptions({repositoryName:t}),e[0]=t,e[1]=a.review.creationForm,e[2]=l):l=e[2];const{data:F}=E(l);let i;e[3]!==n||e[4]!==t||e[5]!==a.review.searchTargets?(i=a.review.searchTargets.queryOptions({repositoryName:t,query:n}),e[3]=n,e[4]=t,e[5]=a.review.searchTargets,e[6]=i):i=e[6];let d;e[7]!==i?(d={...i,placeholderData:y},e[7]=i,e[8]=d):d=e[8];const m=R(d);let g;e[9]!==((f=m.data)==null?void 0:f.options)?(g=((v=m.data)==null?void 0:v.options)??[],e[9]=(T=m.data)==null?void 0:T.options,e[10]=g):g=e[10];const S=((C=m.data)==null?void 0:C.message)??(m.isPending?k:null);let u;e[11]!==s||e[12]!==g||e[13]!==S?(u={value:s,options:g,message:S},e[11]=s,e[12]=g,e[13]=S,e[14]=u):u=e[14];let h;e[15]!==r||e[16]!==t?(h=w=>{r({to:"/pr-reviews/$repoName/$branchId",params:{repoName:t,branchId:w}})},e[15]=r,e[16]=t,e[17]=h):h=e[17];let p;return e[18]!==F||e[19]!==u||e[20]!==h?(p={creationForm:F,targetSearch:u,onTargetQueryChange:o,onTargetSelect:h},e[18]=F,e[19]=u,e[20]=h,e[21]=p):p=e[21],p},N=()=>{const t=x.c(15),{repoName:e}=$.useParams(),a=G(e);let r;t[0]!==a.creationForm.title?(r=c.jsx("h1",{className:"text-4xl leading-10 font-bold tracking-[-0.02em]",children:a.creationForm.title}),t[0]=a.creationForm.title,t[1]=r):r=t[1];let s;t[2]!==a.creationForm.description?(s=c.jsx("p",{className:"mt-2 max-w-[62ch] text-muted-foreground",children:a.creationForm.description}),t[2]=a.creationForm.description,t[3]=s):s=t[3];let o;t[4]!==r||t[5]!==s?(o=c.jsxs("header",{className:"pb-6",children:[r,s]}),t[4]=r,t[5]=s,t[6]=o):o=t[6];let n;t[7]!==a.creationForm||t[8]!==a.onTargetQueryChange||t[9]!==a.onTargetSelect||t[10]!==a.targetSearch?(n=c.jsx(q,{creationForm:a.creationForm,targetSearch:a.targetSearch,onTargetQueryChange:a.onTargetQueryChange,onTargetSelect:a.onTargetSelect}),t[7]=a.creationForm,t[8]=a.onTargetQueryChange,t[9]=a.onTargetSelect,t[10]=a.targetSearch,t[11]=n):n=t[11];let l;return t[12]!==o||t[13]!==n?(l=c.jsxs(c.Fragment,{children:[o,n]}),t[12]=o,t[13]=n,t[14]=l):l=t[14],l};export{N as component};
@@ -0,0 +1 @@
1
+ import{c as B,r as F,s as O,j as s,Z as M,L as R,h as H,i as U,ac as Q,G as $,m as q,z,w as D,B as G}from"./index-DRndyOxR.js";import{S as V}from"./index-DvuJKeYS.js";const Y="Name",Z="How the configuration is listed when you create a Flight Plan.",J="Start from",K="The new configuration is a copy of the same instructions, yours to change.",W=t=>{const e=B.c(41),{sources:j,selectedSourceId:v,nameError:l,sourceError:o,children:g,onSubmit:n}=t,r=F.useId(),h=F.useId(),d=F.useId(),[u,T]=F.useState(""),[a,p]=F.useState(v);let i;e[0]!==u||e[1]!==n||e[2]!==a?(i=O(()=>{n(u,a)}),e[0]=u,e[1]=n,e[2]=a,e[3]=i):i=e[3];let f;e[4]!==r?(f=s.jsx("label",{htmlFor:r,className:"block text-sm font-bold",children:Y}),e[4]=r,e[5]=f):f=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("p",{className:"pb-2 text-sm text-muted-foreground",children:Z}),e[6]=c):c=e[6];const x=l!==null,b=l===null?void 0:h;let S;e[7]===Symbol.for("react.memo_cache_sentinel")?(S=w=>{T(w.target.value)},e[7]=S):S=e[7];let m;e[8]!==u||e[9]!==r||e[10]!==x||e[11]!==b?(m=s.jsx(M,{id:r,value:u,"aria-invalid":x,"aria-describedby":b,onChange:S}),e[8]=u,e[9]=r,e[10]=x,e[11]=b,e[12]=m):m=e[12];let N;e[13]!==l||e[14]!==h?(N=l===null?null:s.jsx("p",{id:h,role:"alert",className:"pt-1.5 text-sm text-destructive",children:l}),e[13]=l,e[14]=h,e[15]=N):N=e[15];let y;e[16]!==f||e[17]!==m||e[18]!==N?(y=s.jsxs("div",{className:"max-w-md",children:[f,c,m,N]}),e[16]=f,e[17]=m,e[18]=N,e[19]=y):y=e[19];let P,k;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("legend",{className:"text-sm font-bold",children:J}),k=s.jsx("p",{className:"max-w-[62ch] pb-2 text-sm text-muted-foreground",children:K}),e[20]=P,e[21]=k):(P=e[20],k=e[21]);let I;if(e[22]!==d||e[23]!==a||e[24]!==j){let w;e[26]!==d||e[27]!==a?(w=E=>s.jsx("li",{className:"border-b border-border py-3",children:s.jsxs("label",{className:"flex cursor-pointer items-start gap-3",children:[s.jsx("input",{type:"radio",name:d,checked:a===E.id,className:"mt-1 size-4 shrink-0 accent-(--primary)",onChange:()=>{p(E.id)}}),s.jsxs("span",{className:"min-w-0",children:[s.jsx("span",{className:"block font-bold",children:E.name}),E.summary===null?null:s.jsx("span",{className:"block max-w-[62ch] text-sm",children:E.summary}),s.jsx(R,{segments:E.details,className:"text-sm text-muted-foreground"})]})]})},E.id),e[26]=d,e[27]=a,e[28]=w):w=e[28],I=j.map(w),e[22]=d,e[23]=a,e[24]=j,e[25]=I}else I=e[25];let _;e[29]!==I?(_=s.jsx("ul",{className:"border-t border-border",children:I}),e[29]=I,e[30]=_):_=e[30];let C;e[31]!==o?(C=o===null?null:s.jsx("p",{role:"alert",className:"pt-2 text-sm text-destructive",children:o}),e[31]=o,e[32]=C):C=e[32];let L;e[33]!==_||e[34]!==C?(L=s.jsxs("fieldset",{className:"mt-8",children:[P,k,_,C]}),e[33]=_,e[34]=C,e[35]=L):L=e[35];let A;return e[36]!==g||e[37]!==i||e[38]!==L||e[39]!==y?(A=s.jsxs("form",{onSubmit:i,children:[y,L,g]}),e[36]=g,e[37]=i,e[38]=L,e[39]=y,e[40]=A):A=e[40],A},X="New configuration • Settings • Flight Plan",ee="New configuration",te="Create",se="Creating…",ne="Cancel",le=()=>{var S;const t=B.c(26),e=H(),j=U(),v=Q();let l;t[0]!==e.configuration.creationForm?(l=e.configuration.creationForm.queryOptions(),t[0]=e.configuration.creationForm,t[1]=l):l=t[1];const{data:o}=$(l);let g;t[2]!==v||t[3]!==j||t[4]!==e.configuration?(g=e.configuration.create.mutationOptions({onSuccess:async m=>{m.kind!=="rejected"&&(await j.invalidateQueries(e.configuration.pathFilter()),await v({to:"/settings/profiles/$id",params:{id:m.id}}))}}),t[2]=v,t[3]=j,t[4]=e.configuration,t[5]=g):g=t[5];const n=q(g),r=((S=n.data)==null?void 0:S.kind)==="rejected"?n.data:null;let h,d;t[6]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx("title",{children:X}),d=s.jsx(V,{title:ee,children:"Name the configuration and choose what it starts from. You change its instructions on the next page."}),t[6]=h,t[7]=d):(h=t[6],d=t[7]);const u=(r==null?void 0:r.field)==="name"?r.message:null,T=(r==null?void 0:r.field)==="source"?r.message:null;let a;t[8]!==n?(a=(m,N)=>{n.mutate({name:m,sourceId:N})},t[8]=n,t[9]=a):a=t[9];let p;t[10]!==n.error?(p=n.error===null?null:s.jsx("p",{role:"alert",className:"pb-3 text-sm text-destructive",children:n.error.message}),t[10]=n.error,t[11]=p):p=t[11];let i;t[12]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(z,{to:"/settings/profiles",className:D({variant:"ghost"}),children:ne}),t[12]=i):i=t[12];const f=n.isPending?se:te;let c;t[13]!==n.isPending||t[14]!==f?(c=s.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[i,s.jsx(G,{type:"submit",disabled:n.isPending,children:f})]}),t[13]=n.isPending,t[14]=f,t[15]=c):c=t[15];let x;t[16]!==c||t[17]!==p?(x=s.jsxs("footer",{className:"mt-6 border-t border-border pt-4",children:[p,c]}),t[16]=c,t[17]=p,t[18]=x):x=t[18];let b;return t[19]!==o.selectedSourceId||t[20]!==o.sources||t[21]!==x||t[22]!==u||t[23]!==T||t[24]!==a?(b=s.jsxs(s.Fragment,{children:[h,d,s.jsx(W,{sources:o.sources,selectedSourceId:o.selectedSourceId,nameError:u,sourceError:T,onSubmit:a,children:x})]}),t[19]=o.selectedSourceId,t[20]=o.sources,t[21]=x,t[22]=u,t[23]=T,t[24]=a,t[25]=b):b=t[25],b};export{le as component};
@@ -0,0 +1 @@
1
+ import{c as x,u as p,j as r,B as f,z as u}from"./index-DRndyOxR.js";const h="The backend did not say what went wrong.",g=d=>{const e=x.c(11),{error:m}=d,i=p();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsx("h1",{className:"text-4xl leading-10 font-bold tracking-[-0.02em]",children:"Could not open this page"}),e[0]=n):n=e[0];const c=m instanceof Error?m.message:h;let t;e[1]!==c?(t=r.jsx("p",{className:"mt-2 text-muted-foreground",children:c}),e[1]=c,e[2]=t):t=e[2];let s;e[3]!==i?(s=r.jsx(f,{onClick:()=>{i.invalidate()},children:"Try again"}),e[3]=i,e[4]=s):s=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(u,{to:"/",className:"underline",children:"Go to your repositories"}),e[5]=l):l=e[5];let o;e[6]!==s?(o=r.jsxs("div",{className:"mt-4 flex items-center gap-4",children:[s,l]}),e[6]=s,e[7]=o):o=e[7];let a;return e[8]!==t||e[9]!==o?(a=r.jsxs("section",{role:"alert",className:"max-w-prose",children:[n,t,o]}),e[8]=t,e[9]=o,e[10]=a):a=e[10],a},E=g;export{E as errorComponent};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-Cl1Gcfks.js";import"./index-DRndyOxR.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
1
+ import{c as S,E as $,j as r,a5 as C,h as k,i as q,a6 as E,a7 as H,r as O,G as B,m as Q,a8 as z,B as D,z as M}from"./index-DRndyOxR.js";const T=e=>{const s=S.c(6),{label:l,className:i}=e;let n;s[0]!==i?(n=$("flex items-center gap-2 font-bold",i),s[0]=i,s[1]=n):n=s[1];let o;s[2]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(C,{"aria-hidden":"true",className:"size-4 motion-safe:animate-spin"}),s[2]=o):o=s[2];let c;return s[3]!==l||s[4]!==n?(c=r.jsxs("p",{role:"status",className:n,children:[o,l]}),s[3]=l,s[4]=n,s[5]=c):c=s[5],c},A=2e3,J=()=>{var F,R;const e=S.c(48),s=k(),l=q(),i=E.useSearch(),n=E.useLoaderData(),o=H(i),[c,w]=O.useState(n.importId),L=s.review.importForm.queryOptions(o);let v;e[0]!==L?(v={...L,refetchInterval:A},e[0]=L,e[1]=v):v=e[1];const{data:t}=B(v);let N;if(e[2]!==l||e[3]!==w||e[4]!==s.review.import||e[5]!==s.review.importForm){let m;e[7]!==l||e[8]!==w||e[9]!==s.review.importForm?(m=async P=>{const{importId:_}=P;w(_),await l.invalidateQueries(s.review.importForm.pathFilter())},e[7]=l,e[8]=w,e[9]=s.review.importForm,e[10]=m):m=e[10],N=s.review.import.mutationOptions({onSuccess:m}),e[2]=l,e[3]=w,e[4]=s.review.import,e[5]=s.review.importForm,e[6]=N}else N=e[6];const a=Q(N),j=((F=a.error)==null?void 0:F.message)??(((R=a.data)==null?void 0:R.importId)===null?a.data.message:n.refusal);if(t.isFinished&&t.importId!==null&&t.importId===c){let m;return e[11]!==i.repository||e[12]!==i.target?(m=r.jsx(z,{to:"/pr-reviews/$repoName/$branchId",params:{repoName:i.repository,branchId:i.target},replace:!0}),e[11]=i.repository,e[12]=i.target,e[13]=m):m=e[13],m}let d;e[14]!==t.heading?(d=r.jsx("h1",{className:"text-4xl leading-10 font-bold tracking-[-0.02em]",children:t.heading}),e[14]=t.heading,e[15]=d):d=e[15];let p;e[16]!==t.message?(p=r.jsx("p",{className:"mt-2 text-muted-foreground",children:t.message}),e[16]=t.message,e[17]=p):p=e[17];let u;e[18]!==t.details?(u=t.details.length===0?null:r.jsx("dl",{className:"mt-6 grid grid-cols-[auto_minmax(0,1fr)] gap-x-6 gap-y-1 text-sm",children:t.details.map(G)}),e[18]=t.details,e[19]=u):u=e[19];let g;e[20]!==t.warning?(g=t.warning===null?null:r.jsx("p",{className:"mt-6 font-bold text-signal-text",children:t.warning}),e[20]=t.warning,e[21]=g):g=e[21];let f;e[22]!==t.isImporting||e[23]!==t.pendingLabel||e[24]!==a.isPending?(f=t.isImporting||a.isPending?r.jsx(T,{label:t.pendingLabel,className:"mt-6"}):null,e[22]=t.isImporting,e[23]=t.pendingLabel,e[24]=a.isPending,e[25]=f):f=e[25];let x;e[26]!==t.isImporting||e[27]!==j?(x=j===null||t.isImporting?null:r.jsx("p",{role:"alert",className:"mt-6 text-destructive",children:j}),e[26]=t.isImporting,e[27]=j,e[28]=x):x=e[28];let h;e[29]!==t.isImporting||e[30]!==t.submitLabel||e[31]!==o||e[32]!==a?(h=t.submitLabel===null||t.isImporting?null:r.jsx(D,{disabled:a.isPending,onClick:()=>{a.mutate(o)},children:t.submitLabel}),e[29]=t.isImporting,e[30]=t.submitLabel,e[31]=o,e[32]=a,e[33]=h):h=e[33];let b;e[34]!==t.reviewHref||e[35]!==i?(b=t.reviewHref===null?null:r.jsx(M,{to:"/pr-reviews/$repoName/$branchId",params:{repoName:i.repository,branchId:i.target},className:"underline",children:"Open the review page"}),e[34]=t.reviewHref,e[35]=i,e[36]=b):b=e[36];let I;e[37]!==b||e[38]!==h?(I=r.jsxs("div",{className:"mt-6 flex items-center gap-4",children:[h,b]}),e[37]=b,e[38]=h,e[39]=I):I=e[39];let y;return e[40]!==I||e[41]!==d||e[42]!==p||e[43]!==u||e[44]!==g||e[45]!==f||e[46]!==x?(y=r.jsxs("section",{className:"max-w-prose",children:[d,p,u,g,f,x,I]}),e[40]=I,e[41]=d,e[42]=p,e[43]=u,e[44]=g,e[45]=f,e[46]=x,e[47]=y):y=e[47],y};function G(e){return r.jsxs("div",{className:"contents",children:[r.jsx("dt",{className:"text-muted-foreground",children:e.label}),r.jsx("dd",{className:"font-mono break-all",children:e.value})]},e.label)}export{J as component};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-Cl1Gcfks.js";import"./index-DRndyOxR.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
1
+ import{c as u,h as f,P as m,G as p,j as o}from"./index-DRndyOxR.js";import{u as h,S}from"./index-CikPFj0e.js";import{F as x}from"./index-DpY8OPAr.js";import{S as F}from"./index-DvuJKeYS.js";const b="Git integration • Settings • Flight Plan",M="Git integration",T=()=>{const e=u.c(16),l=f();let i;e[0]!==l.settings.get?(i=l.settings.get.queryOptions(m),e[0]=l.settings.get,e[1]=i):i=e[1];const{data:t}=p(i),s=h();if(t.section!==m.section)return null;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("title",{children:b}),e[2]=a):a=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsxs(F,{title:M,children:["By default, Flight Plan uses the"," ",o.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[3]=g):g=e[3];let r;e[4]!==s?(r=d=>{s.save({...m,...d})},e[4]=s,e[5]=r):r=e[5];let n;e[6]!==s.errorMessage||e[7]!==s.isPending||e[8]!==s.savedMessage?(n=o.jsx(S,{isPending:s.isPending,errorMessage:s.errorMessage,savedMessage:s.savedMessage}),e[6]=s.errorMessage,e[7]=s.isPending,e[8]=s.savedMessage,e[9]=n):n=e[9];let c;return e[10]!==t.codeHostFeatures||e[11]!==t.forges||e[12]!==s.problem||e[13]!==r||e[14]!==n?(c=o.jsxs(o.Fragment,{children:[a,g,o.jsx(x,{codeHostFeatures:t.codeHostFeatures,forges:t.forges,problem:s.problem,onSubmit:r,children:n})]}),e[10]=t.codeHostFeatures,e[11]=t.forges,e[12]=s.problem,e[13]=r,e[14]=n,e[15]=c):c=e[15],c};export{T as component};
@@ -0,0 +1 @@
1
+ import{c as _,j as s,z as F,L as M,B as O,h as A,i as H,ac as Q,G as R,m as T,r as $,w as z}from"./index-DRndyOxR.js";import{S as B}from"./index-DvuJKeYS.js";const G="-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",q=e=>{const t=_.c(19),{title:r,rows:g,emptyMessage:m,defaultChoice:i,isDuplicating:d,onDuplicate:a}=e;let c;t[0]!==r?(c=s.jsx("h3",{className:"pb-2 text-xl leading-7 font-bold",children:r}),t[0]=r,t[1]=c):c=t[1];let n;t[2]!==m?(n=m===null?null:s.jsx("p",{className:"max-w-[62ch] text-sm text-muted-foreground",children:m}),t[2]=m,t[3]=n):n=t[3];let o;if(t[4]!==i||t[5]!==d||t[6]!==a||t[7]!==g){let p;t[9]!==i||t[10]!==d||t[11]!==a?(p=l=>s.jsxs("li",{className:"flex items-center gap-4 border-b border-border first:border-t",children:[s.jsxs(F,{to:"/settings/profiles/$id",params:{id:l.id},className:G,children:[s.jsx("span",{className:"font-bold underline decoration-input decoration-1 underline-offset-[0.3em]",children:l.name}),l.summary===null?null:s.jsx("span",{className:"block max-w-[62ch] text-sm",children:l.summary}),s.jsx(M,{segments:l.details,className:"text-sm text-muted-foreground"})]}),s.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 text-sm has-disabled:cursor-default has-disabled:text-muted-foreground",children:[s.jsx("input",{type:"radio",name:i.groupName,checked:i.chosenId===l.id,disabled:i.isPending,className:"size-4 shrink-0 accent-primary",onChange:()=>{i.onChoose(l.id)}}),s.jsx("span",{"aria-hidden":"true",className:"text-box-cap",children:i.label}),s.jsx("span",{className:"sr-only",children:l.defaultChoiceLabel})]}),s.jsx(O,{type:"button",variant:"outline",size:"sm","aria-label":l.duplicateName,disabled:d,onClick:()=>{a(l.id)},children:l.duplicateLabel})]},l.id),t[9]=i,t[10]=d,t[11]=a,t[12]=p):p=t[12],o=g.map(p),t[4]=i,t[5]=d,t[6]=a,t[7]=g,t[8]=o}else o=t[8];let u;t[13]!==o?(u=s.jsx("ul",{children:o}),t[13]=o,t[14]=u):u=t[14];let f;return t[15]!==c||t[16]!==n||t[17]!==u?(f=s.jsxs("section",{className:"border-t-2 border-foreground pt-5 pb-6",children:[c,n,u]}),t[15]=c,t[16]=n,t[17]=u,t[18]=f):f=t[18],f},K="Prompt configurations • Settings • Flight Plan",U="Prompt configurations",V="New configuration",ee=()=>{var S,D,L,P,w;const e=_.c(36),t=A(),r=H(),g=Q();let m;e[0]!==t.configuration.list?(m=t.configuration.list.queryOptions(),e[0]=t.configuration.list,e[1]=m):m=e[1];const{data:i}=R(m);let d;e[2]!==g||e[3]!==r||e[4]!==t.configuration?(d=t.configuration.create.mutationOptions({onSuccess:async h=>{h.kind!=="rejected"&&(await r.invalidateQueries(t.configuration.pathFilter()),await g({to:"/settings/profiles/$id",params:{id:h.id}}))}}),e[2]=g,e[3]=r,e[4]=t.configuration,e[5]=d):d=e[5];const a=T(d);let c;e[6]!==r||e[7]!==t.configuration||e[8]!==t.settings?(c=t.settings.save.mutationOptions({onSuccess:async()=>{r.removeQueries({...t.settings.pathFilter(),type:"inactive"}),await r.invalidateQueries(t.configuration.pathFilter())}}),e[6]=r,e[7]=t.configuration,e[8]=t.settings,e[9]=c):c=e[9];const n=T(c),o=$.useId(),u=((S=a.data)==null?void 0:S.kind)==="rejected"?a.data.message:((D=a.error)==null?void 0:D.message)??null,f=((L=n.data)==null?void 0:L.kind)==="rejected"?n.data.message:((P=n.error)==null?void 0:P.message)??null;let p;e[10]!==i.groups?(p=((w=i.groups.flatMap(W).find(J))==null?void 0:w.id)??"",e[10]=i.groups,e[11]=p):p=e[11];const l=p,N=(n.isPending&&n.variables.section==="configuration"?n.variables.configurationId:null)??l;let y,C;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("title",{children:K}),C=s.jsx(B,{title:U,children:"A prompt configuration is the set of instructions the agent follows when it writes a review: the tone it writes in and how it words each part. A new Flight Plan uses the default unless you pick another. Open one to read or change its instructions, or duplicate one to make your own."}),e[12]=y,e[13]=C):(y=e[12],C=e[13]);let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("div",{className:"pb-6",children:s.jsx(F,{to:"/settings/profiles/create",className:z(),children:V})}),e[14]=v):v=e[14];let x;e[15]!==u?(x=u===null?null:s.jsx("p",{role:"alert",className:"pb-4 text-sm text-destructive",children:u}),e[15]=u,e[16]=x):x=e[16];let b;e[17]!==f?(b=f===null?null:s.jsx("p",{role:"alert",className:"pb-4 text-sm text-destructive",children:f}),e[17]=f,e[18]=b):b=e[18];let j;if(e[19]!==N||e[20]!==o||e[21]!==a||e[22]!==i.defaultChoiceHeading||e[23]!==i.groups||e[24]!==n){let h;e[26]!==N||e[27]!==o||e[28]!==a||e[29]!==i.defaultChoiceHeading||e[30]!==n?(h=k=>s.jsx(q,{title:k.title,rows:k.rows,emptyMessage:k.emptyMessage,defaultChoice:{groupName:o,label:i.defaultChoiceHeading,chosenId:N,isPending:n.isPending,onChoose:E=>{n.mutate({section:"configuration",configurationId:E})}},isDuplicating:a.isPending,onDuplicate:E=>{a.mutate({name:null,sourceId:E})}},k.title),e[26]=N,e[27]=o,e[28]=a,e[29]=i.defaultChoiceHeading,e[30]=n,e[31]=h):h=e[31],j=i.groups.map(h),e[19]=N,e[20]=o,e[21]=a,e[22]=i.defaultChoiceHeading,e[23]=i.groups,e[24]=n,e[25]=j}else j=e[25];let I;return e[32]!==x||e[33]!==b||e[34]!==j?(I=s.jsxs(s.Fragment,{children:[y,C,v,x,b,j]}),e[32]=x,e[33]=b,e[34]=j,e[35]=I):I=e[35],I};function W(e){return e.rows}function J(e){return e.isDefault}export{ee as component};
@@ -0,0 +1 @@
1
+ import{c as r,j as i}from"./index-DRndyOxR.js";import{T as m}from"./index-DGsH5lbQ.js";const l="font-sans text-sm [&_.tiptap]:min-h-20 [&_.tiptap]:text-sm [&_.tiptap]:leading-6",u=n=>{const t=r.c(4),{label:e,shouldFocus:o,onChange:a}=n;let s;return t[0]!==e||t[1]!==a||t[2]!==o?(s=i.jsx(m,{label:e,value:"",errorMessage:null,shouldFocus:o,className:l,onChange:a}),t[0]=e,t[1]=a,t[2]=o,t[3]=s):s=t[3],s};export{u as default};
@@ -0,0 +1,6 @@
1
+ import{a3 as p,c as f,E as u,j as n,a4 as m}from"./index-DRndyOxR.js";/**
2
+ * @license lucide-react v1.49.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const x={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};x.node;const g=p(x),v=m("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function h(r){const e=f.c(10);let t,a,s;e[0]!==r?({className:t,variant:s,...a}=r,e[0]=r,e[1]=t,e[2]=a,e[3]=s):(t=e[1],a=e[2],s=e[3]);let l;e[4]!==t||e[5]!==s?(l=u(v({variant:s}),t),e[4]=t,e[5]=s,e[6]=l):l=e[6];let o;return e[7]!==a||e[8]!==l?(o=n.jsx("div",{"data-slot":"alert",role:"alert",className:l,...a}),e[7]=a,e[8]=l,e[9]=o):o=e[9],o}function b(r){const e=f.c(8);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=u("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=n.jsx("div",{"data-slot":"alert-title",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}function _(r){const e=f.c(8);let t,a;e[0]!==r?({className:t,...a}=r,e[0]=r,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let s;e[3]!==t?(s=u("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",t),e[3]=t,e[4]=s):s=e[4];let l;return e[5]!==a||e[6]!==s?(l=n.jsx("div",{"data-slot":"alert-description",className:s,...a}),e[5]=a,e[6]=s,e[7]=l):l=e[7],l}const N=r=>{const e=f.c(11),{title:t,children:a,className:s}=r;let l;e[0]!==s?(l=u("border-line-blue/40 bg-line-blue/10 px-3 py-2.5 *:[svg]:text-line-blue",s),e[0]=s,e[1]=l):l=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(g,{"aria-hidden":"true"}),e[2]=o):o=e[2];let i;e[3]!==t?(i=n.jsx(b,{className:"font-bold",children:t}),e[3]=t,e[4]=i):i=e[4];let c;e[5]!==a?(c=n.jsx(_,{className:"text-foreground/80",children:a}),e[5]=a,e[6]=c):c=e[6];let d;return e[7]!==l||e[8]!==i||e[9]!==c?(d=n.jsxs(h,{role:"note",className:l,children:[o,i,c]}),e[7]=l,e[8]=i,e[9]=c,e[10]=d):d=e[10],d};export{N as I};
@@ -0,0 +1 @@
1
+ import{c as R,j as l,E as T,A as L,I as _,B as E}from"./index-DRndyOxR.js";import{b as F}from"./index-COS3U9jZ.js";const O=(c,e)=>{const t=e.get(c.path)??null;return{path:c.path,name:c.name,stateLabel:t===null?c.stateLabel:null,followed:t}},I=c=>({path:c.path,name:c.name,stateLabel:null,followed:c}),D=(c,e)=>{const t=new Map(e.map(s=>[s.path,s])),r=new Set(c.map(s=>s.path));return[...c.map(s=>O(s,t)),...e.filter(s=>!r.has(s.path)).map(I)]},U="mt-1 size-4 shrink-0 accent-(--primary)",v="flex max-w-md items-center gap-2 py-1",P=[],H="Recent repositories",M="Can't find your repository?",Q=c=>{const e=R.c(19),{label:t,hint:r,placeholder:s,authorRole:a,repositoryName:i,authorSearch:o,onQueryChange:m,onSelect:d}=c,n=o.repositoryName===i&&o.role===a,h=n?o.options:P,y=n?o.query:"",N=n?o.message:null,g=n?o.errorMessage:null;let u;e[0]!==a||e[1]!==m?(u=x=>{m(a,x)},e[0]=a,e[1]=m,e[2]=u):u=e[2];let p;e[3]!==a||e[4]!==o.query||e[5]!==n||e[6]!==m?(p=()=>{m(a,n?o.query:"")},e[3]=a,e[4]=o.query,e[5]=n,e[6]=m,e[7]=p):p=e[7];let f;return e[8]!==h||e[9]!==r||e[10]!==t||e[11]!==d||e[12]!==s||e[13]!==y||e[14]!==N||e[15]!==g||e[16]!==u||e[17]!==p?(f=l.jsx(F,{label:t,hint:r,placeholder:s,query:y,options:h,message:N,errorMessage:g,onQueryChange:u,onOpen:p,onSelect:d}),e[8]=h,e[9]=r,e[10]=t,e[11]=d,e[12]=s,e[13]=y,e[14]=N,e[15]=g,e[16]=u,e[17]=p,e[18]=f):f=e[18],f},$=c=>{const e=R.c(11),{author:t}=c;let r;e[0]!==t.avatarUrl||e[1]!==t.monogram?(r=l.jsx(L,{imageUrl:t.avatarUrl,monogram:t.monogram}),e[0]=t.avatarUrl,e[1]=t.monogram,e[2]=r):r=e[2];let s;e[3]!==t.name?(s=l.jsx("span",{className:"min-w-0 truncate",children:t.name}),e[3]=t.name,e[4]=s):s=e[4];let a;e[5]!==t.detail?(a=l.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:t.detail}),e[5]=t.detail,e[6]=a):a=e[6];let i;return e[7]!==r||e[8]!==s||e[9]!==a?(i=l.jsxs("div",{className:v,children:[r,s,a]}),e[7]=r,e[8]=s,e[9]=a,e[10]=i):i=e[10],i},q=c=>{const e=R.c(19),{repository:t,authorSearch:r,onAuthorQueryChange:s,onAuthorTrackingChange:a}=c;let i;e[0]!==t.selfAuthor?(i=t.selfAuthor===null?null:l.jsx($,{author:t.selfAuthor}),e[0]=t.selfAuthor,e[1]=i):i=e[1];let o;e[2]!==a?(o=h=>{a(h,!0)},e[2]=a,e[3]=o):o=e[3];let m;e[4]!==r||e[5]!==s||e[6]!==t.authorSearchHint||e[7]!==t.authorSearchPlaceholder||e[8]!==t.name||e[9]!==o?(m=l.jsx(Q,{label:"Track branches from specific team members",hint:t.authorSearchHint,placeholder:t.authorSearchPlaceholder,authorRole:"tracked",repositoryName:t.name,authorSearch:r,onQueryChange:s,onSelect:o}),e[4]=r,e[5]=s,e[6]=t.authorSearchHint,e[7]=t.authorSearchPlaceholder,e[8]=t.name,e[9]=o,e[10]=m):m=e[10];let d;e[11]!==a||e[12]!==t.name||e[13]!==t.trackedAuthors?(d=t.trackedAuthors.length===0?null:l.jsx("ul",{"aria-label":`Tracked team members of ${t.name}`,children:t.trackedAuthors.map(h=>l.jsxs("li",{className:v,children:[l.jsx(L,{imageUrl:h.avatarUrl,monogram:h.monogram}),l.jsx("span",{className:"min-w-0 truncate",children:h.name}),l.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:h.detail}),l.jsx(_,{icon:"close",label:`Stop tracking ${h.name}`,onClick:()=>{a(h.id,!1)}})]},h.id))}),e[11]=a,e[12]=t.name,e[13]=t.trackedAuthors,e[14]=d):d=e[14];let n;return e[15]!==i||e[16]!==m||e[17]!==d?(n=l.jsxs("div",{className:"grid max-w-xl gap-3 pt-3 pl-7",children:[i,m,d]}),e[15]=i,e[16]=m,e[17]=d,e[18]=n):n=e[18],n},B=c=>{const e=R.c(33),{row:t,isChanging:r,followedFooter:s,authorSearch:a,onFollow:i,onUnfollow:o,onAuthorQueryChange:m,onAuthorTrackingChange:d}=c,{followed:n}=t,h=n===null&&t.stateLabel!==null;let y;e[0]!==n||e[1]!==i||e[2]!==o?(y=()=>{n===null?i():o(n.name)},e[0]=n,e[1]=i,e[2]=o,e[3]=y):y=e[3];const N=y,g=h?"":"cursor-pointer";let u;e[4]!==g?(u=T("flex min-w-0 items-start gap-3",g),e[4]=g,e[5]=u):u=e[5];const p=n!==null||h,f=h||r;let x;e[6]!==N||e[7]!==p||e[8]!==f?(x=l.jsx("input",{type:"checkbox",checked:p,disabled:f,className:U,onChange:N}),e[6]=N,e[7]=p,e[8]=f,e[9]=x):x=e[9];let j;e[10]!==t.name?(j=l.jsx("span",{className:"font-bold",children:t.name}),e[10]=t.name,e[11]=j):j=e[11];let S;e[12]!==t.stateLabel?(S=t.stateLabel===null?null:l.jsx("span",{className:"ml-2 text-sm text-muted-foreground",children:t.stateLabel}),e[12]=t.stateLabel,e[13]=S):S=e[13];let b;e[14]!==t.path?(b=l.jsx("span",{className:"block font-mono text-[0.82rem] wrap-anywhere text-muted-foreground",children:t.path}),e[14]=t.path,e[15]=b):b=e[15];let w;e[16]!==j||e[17]!==S||e[18]!==b?(w=l.jsxs("span",{className:"min-w-0",children:[j,S,b]}),e[16]=j,e[17]=S,e[18]=b,e[19]=w):w=e[19];let C;e[20]!==w||e[21]!==u||e[22]!==x?(C=l.jsxs("label",{className:u,children:[x,w]}),e[20]=w,e[21]=u,e[22]=x,e[23]=C):C=e[23];let A;e[24]!==a||e[25]!==n||e[26]!==s||e[27]!==m||e[28]!==d?(A=n===null?null:l.jsxs(l.Fragment,{children:[l.jsx(q,{repository:n,authorSearch:a,onAuthorQueryChange:m,onAuthorTrackingChange:d}),s===void 0?null:l.jsx("div",{className:"pt-3 pl-7",children:s(n)})]}),e[24]=a,e[25]=n,e[26]=s,e[27]=m,e[28]=d,e[29]=A):A=e[29];let k;return e[30]!==C||e[31]!==A?(k=l.jsxs("li",{className:"border-b border-border py-3 last:border-b-0",children:[C,A]}),e[30]=C,e[31]=A,e[32]=k):k=e[32],k},Y=c=>{const e=R.c(24),{rows:t,listMessage:r,repositoryErrorMessage:s,isChangingRepositories:a,authorSearch:i,followedFooter:o,onOpenAddRepository:m,onFollow:d,onUnfollow:n,onAuthorQueryChange:h,onAuthorTrackingChange:y}=c;let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx("h3",{className:"pb-2 text-sm font-bold",children:H}),e[0]=N):N=e[0];let g;e[1]!==r?(g=r===null?null:l.jsx("p",{className:"pb-3 text-sm text-muted-foreground",children:r}),e[1]=r,e[2]=g):g=e[2];let u;e[3]!==i||e[4]!==o||e[5]!==a||e[6]!==h||e[7]!==y||e[8]!==d||e[9]!==n||e[10]!==t?(u=t.length===0?null:l.jsx("ul",{"aria-label":"Repositories",className:"border-t border-border",children:t.map(b=>l.jsx(B,{row:b,isChanging:a,followedFooter:o,authorSearch:i,onFollow:()=>{d(b.path)},onUnfollow:n,onAuthorQueryChange:(w,C)=>{var A;h(((A=b.followed)==null?void 0:A.name)??b.name,w,C)},onAuthorTrackingChange:(w,C)=>{var A;y(((A=b.followed)==null?void 0:A.name)??b.name,w,C)}},b.path))}),e[3]=i,e[4]=o,e[5]=a,e[6]=h,e[7]=y,e[8]=d,e[9]=n,e[10]=t,e[11]=u):u=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx("p",{className:"text-sm text-muted-foreground",children:M}),e[12]=p):p=e[12];let f;e[13]!==m?(f=l.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[p,l.jsx(E,{type:"button",variant:"outline",onClick:m,children:"Add repository"})]}),e[13]=m,e[14]=f):f=e[14];let x;e[15]!==s?(x=s===null?null:l.jsx("p",{role:"alert",className:"pt-2 text-sm text-destructive",children:s}),e[15]=s,e[16]=x):x=e[16];let j;e[17]!==f||e[18]!==x?(j=l.jsxs("div",{className:"border-t border-border pt-4",children:[f,x]}),e[17]=f,e[18]=x,e[19]=j):j=e[19];let S;return e[20]!==g||e[21]!==u||e[22]!==j?(S=l.jsxs(l.Fragment,{children:[N,g,u,j]}),e[20]=g,e[21]=u,e[22]=j,e[23]=S):S=e[23],S};export{Y as R,D as t};
@@ -0,0 +1 @@
1
+ import{c as b,r as h,s as C,j as r,B as j}from"./index-DRndyOxR.js";import{T as E}from"./index-DGsH5lbQ.js";const B=v=>{const e=b.c(20),{label:d,markdown:o,isSaving:l,errorMessage:f,renderCodeLinkDialog:m,onSave:u,onCancel:x}=v,[p,S]=h.useState(o);let t;e[0]!==p||e[1]!==u?(t=C(()=>{u(p)}),e[0]=p,e[1]=u,e[2]=t):t=e[2];let s;e[3]!==f||e[4]!==d||e[5]!==o||e[6]!==m?(s=r.jsx(E,{label:d,value:o,errorMessage:f,canUseSections:!0,renderCodeLinkDialog:m,onChange:S}),e[3]=f,e[4]=d,e[5]=o,e[6]=m,e[7]=s):s=e[7];let a;e[8]!==x?(a=r.jsx(j,{type:"button",variant:"ghost",onClick:x,children:"Cancel"}),e[8]=x,e[9]=a):a=e[9];const g=l?"Saving…":"Save";let n;e[10]!==l||e[11]!==g?(n=r.jsx(j,{type:"submit",disabled:l,children:g}),e[10]=l,e[11]=g,e[12]=n):n=e[12];let i;e[13]!==a||e[14]!==n?(i=r.jsxs("div",{className:"flex justify-end gap-2",children:[a,n]}),e[13]=a,e[14]=n,e[15]=i):i=e[15];let c;return e[16]!==t||e[17]!==s||e[18]!==i?(c=r.jsxs("form",{onSubmit:t,className:"grid gap-3",children:[s,i]}),e[16]=t,e[17]=s,e[18]=i,e[19]=c):c=e[19],c};export{B as default};
@@ -0,0 +1 @@
1
+ import{c as z,j as s,W as se,C as le,X as ae,Y as ne,r as O,E as V,Z as oe,B as re,_ as ie}from"./index-DRndyOxR.js";import{I as ce}from"./index-BA8Qwprc.js";import{F as de}from"./index-COdzqD_M.js";const fe="How does Flight Plan interact with the agent?",ue="What Flight Plan builds and what your agent writes",he="Flight Plan builds the review artifact from the code. Your agent reads the same change and writes the explanations into it, through the Flight Plan plugin and its MCP server. Each time Flight Plan starts, it updates the plugin if its skills changed.",me="What Flight Plan does",ge="Flight Plan draws the Trace Diagram and the Blast Diagram, and arranges the Code Walkthrough based on your preferences. You can read a review before your agent writes anything.",xe="What the agent does",pe="How your agent starts",be="rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[0.875em]",je="Your agent explains why the change exists and how the code works, and points out potential issues as findings. It writes into the review Flight Plan built and cannot change its structure. While you read, you can ask it about the change and it can ask you questions back.",K=a=>{const e=z.c(7),{heading:t,text:i}=a;let l;e[0]!==t?(l=s.jsx("h3",{className:"font-bold",children:t}),e[0]=t,e[1]=l):l=e[1];let o;e[2]!==i?(o=s.jsx("p",{className:"mt-1 text-muted-foreground",children:i}),e[2]=i,e[3]=o):o=e[3];let r;return e[4]!==l||e[5]!==o?(r=s.jsxs("section",{children:[l,o]}),e[4]=l,e[5]=o,e[6]=r):r=e[6],r},Ne=()=>{const a=z.c(1);let e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs(ce,{title:pe,children:["Flight Plan can open your terminal app and start your agent there. Or you can start it yourself by prompting your agent with"," ",s.jsx("code",{className:be,children:"/flightplan:live <repository>/<target>"}),"."]}),a[0]=e):e=a[0],e},Re=()=>{const a=z.c(2);let e;a[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs(se,{className:"group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-3 rounded-sm px-2 py-4 text-left transition-colors duration-180 ease-out outline-none hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[s.jsxs("span",{className:"min-w-0 flex-1",children:[s.jsx("span",{className:"block text-lg leading-7 font-bold",children:fe}),s.jsx("span",{className:"block text-sm text-muted-foreground",children:ue})]}),s.jsx(le,{"aria-hidden":"true",className:"size-5 shrink-0 text-muted-foreground transition-transform duration-180 ease-out group-data-panel-open:rotate-180"})]}),a[0]=e):e=a[0];let t;return a[1]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs(ae,{children:[e,s.jsxs(ne,{className:"grid max-w-[62ch] gap-5 pb-2",children:[s.jsx("p",{children:he}),s.jsx(K,{heading:me,text:ge}),s.jsx(K,{heading:xe,text:je}),s.jsx(Ne,{})]})]}),a[1]=t):t=a[1],t},Ee=a=>{const e=z.c(19),{label:t,options:i,value:l,className:o,onChange:r}=a,g=O.useId();let u;e[0]!==o?(u=V("grid gap-1.5",o),e[0]=o,e[1]=u):u=e[1];let c;e[2]!==t?(c=s.jsx("legend",{className:"float-left text-sm font-bold",children:t}),e[2]=t,e[3]=c):c=e[3];let h;if(e[4]!==g||e[5]!==r||e[6]!==i||e[7]!==l){let d;e[9]!==g||e[10]!==r||e[11]!==l?(d=w=>s.jsxs("label",{className:"flex h-[calc(2rem-2px)] cursor-pointer items-center border-l border-input px-3 text-sm transition-colors duration-[180ms] ease-out first:border-l-0 hover:bg-muted has-checked:bg-foreground has-checked:font-bold has-checked:text-background has-focus-visible:outline-2 has-focus-visible:-outline-offset-2 has-focus-visible:outline-ring",children:[s.jsx("input",{type:"radio",name:g,className:"sr-only",checked:l===w.value,onChange:()=>{r(w.value)}}),s.jsx("span",{className:"text-box-cap",children:w.label})]},w.value),e[9]=g,e[10]=r,e[11]=l,e[12]=d):d=e[12],h=i.map(d),e[4]=g,e[5]=r,e[6]=i,e[7]=l,e[8]=h}else h=e[8];let m;e[13]!==h?(m=s.jsx("span",{className:"clear-left inline-flex w-fit overflow-hidden rounded-lg border border-input bg-card",children:h}),e[13]=h,e[14]=m):m=e[14];let x;return e[15]!==u||e[16]!==c||e[17]!==m?(x=s.jsxs("fieldset",{className:u,children:[c,m]}),e[15]=u,e[16]=c,e[17]=m,e[18]=x):x=e[18],x},Q="size-4 shrink-0 accent-(--primary)",we="Open folders until you reach the one to install into, then use it.",ee="model",te="effort",Ce=[ee,te],ve=()=>{},ye=a=>{const e=z.c(26),{option:t,model:i,effort:l,modelErrorMessage:o,effortErrorMessage:r,onModelChange:g,onEffortChange:u}=a;let c;if(e[0]!==l||e[1]!==i||e[2]!==o||e[3]!==u||e[4]!==g||e[5]!==t.label||e[6]!==t.modelOptions){let x;e[8]!==i?(x=C=>C.model===i,e[8]=i,e[9]=x):x=e[9];const d=t.modelOptions.find(x),w=`Model for ${t.label}`;let b;e[10]!==t.modelOptions?(b=t.modelOptions.map(Pe),e[10]=t.modelOptions,e[11]=b):b=e[11];let f;e[12]!==g||e[13]!==t.modelOptions?(f=C=>{const p=t.modelOptions.find(W=>W.model===C);p!==void 0&&g(p)},e[12]=g,e[13]=t.modelOptions,e[14]=f):f=e[14];let k;e[15]!==i||e[16]!==o||e[17]!==w||e[18]!==b||e[19]!==f?(k=s.jsx(ie,{label:w,options:b,value:i,errorMessage:o,className:"w-60",onChange:f}),e[15]=i,e[16]=o,e[17]=w,e[18]=b,e[19]=f,e[20]=k):k=e[20],c=s.jsxs("div",{className:"flex flex-wrap items-start gap-x-6 gap-y-3 pt-3",children:[k,(d==null?void 0:d.hasEffortChoice)===!0?s.jsx(Ee,{label:`Effort for ${t.label}`,options:d.effortOptions.map(ke),value:l,onChange:u}):null]}),e[0]=l,e[1]=i,e[2]=o,e[3]=u,e[4]=g,e[5]=t.label,e[6]=t.modelOptions,e[7]=c}else c=e[7];let h;e[21]!==r?(h=r===null?null:s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:r}),e[21]=r,e[22]=h):h=e[22];let m;return e[23]!==c||e[24]!==h?(m=s.jsxs(s.Fragment,{children:[c,h]}),e[23]=c,e[24]=h,e[25]=m):m=e[25],m},Ie=a=>{const e=z.c(53),{option:t,groupName:i,isPicked:l,isDefault:o,installPath:r,model:g,effort:u,pathErrorMessage:c,modelErrorMessage:h,effortErrorMessage:m,onPickedChange:x,onDefaultChange:d,onInstallPathChange:w,onModelChange:b,onEffortChange:f,onBrowse:k}=a,C=O.useId(),p=O.useId(),W=O.useId(),D=c!==null,A=t.unavailableReason===null,_=A?"cursor-pointer":"";let j;e[0]!==_?(j=V("flex min-w-0 flex-1 items-start gap-3",_),e[0]=_,e[1]=j):j=e[1];const q=!A;let N;e[2]!==x?(N=E=>{x(E.target.checked)},e[2]=x,e[3]=N):N=e[3];let L;e[4]!==l||e[5]!==q||e[6]!==N?(L=s.jsx("input",{type:"checkbox",checked:l,disabled:q,className:`${Q} mt-0.5`,onChange:N}),e[4]=l,e[5]=q,e[6]=N,e[7]=L):L=e[7];let S;e[8]!==t.label?(S=s.jsx("span",{className:"font-bold",children:t.label}),e[8]=t.label,e[9]=S):S=e[9];let P;e[10]!==t.unavailableReason?(P=t.unavailableReason===null?null:s.jsxs("span",{className:"block max-w-[62ch] text-sm text-destructive",children:[s.jsx("span",{className:"font-bold",children:"Unavailable."}),` ${t.unavailableReason}`]}),e[10]=t.unavailableReason,e[11]=P):P=e[11];let F;e[12]!==S||e[13]!==P?(F=s.jsxs("span",{className:"min-w-0",children:[S,P]}),e[12]=S,e[13]=P,e[14]=F):F=e[14];let v;e[15]!==j||e[16]!==L||e[17]!==F?(v=s.jsxs("label",{className:j,children:[L,F]}),e[15]=j,e[16]=L,e[17]=F,e[18]=v):v=e[18];const Y=!l;let M;e[19]!==i||e[20]!==o||e[21]!==d||e[22]!==Y?(M=s.jsx("input",{type:"radio",name:i,checked:o,disabled:Y,className:Q,onChange:d}),e[19]=i,e[20]=o,e[21]=d,e[22]=Y,e[23]=M):M=e[23];let B;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("span",{"aria-hidden":"true",className:"text-box-cap",children:"Default"}),e[24]=B):B=e[24];const R=`Default agent: ${t.label}`;let y;e[25]!==R?(y=s.jsx("span",{className:"sr-only",children:R}),e[25]=R,e[26]=y):y=e[26];let T;e[27]!==M||e[28]!==y?(T=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:[M,B,y]}),e[27]=M,e[28]=y,e[29]=T):T=e[29];let $;e[30]!==T||e[31]!==v?($=s.jsxs("div",{className:"flex items-start gap-4",children:[v,T]}),e[30]=T,e[31]=v,e[32]=$):$=e[32];let I;e[33]!==u||e[34]!==m||e[35]!==W||e[36]!==D||e[37]!==p||e[38]!==r||e[39]!==l||e[40]!==g||e[41]!==h||e[42]!==k||e[43]!==f||e[44]!==w||e[45]!==b||e[46]!==t||e[47]!==c||e[48]!==C?(I=l?s.jsxs("div",{className:"mt-3 grid gap-1.5 pl-7",children:[s.jsx("label",{htmlFor:C,className:"text-sm font-bold",children:`Install folder for ${t.label}`}),s.jsx("p",{id:p,className:"text-sm text-muted-foreground",children:t.pathHint}),s.jsxs("div",{className:"flex max-w-xl items-center gap-2",children:[s.jsx(oe,{id:C,value:r,autoComplete:"off",spellCheck:!1,"aria-invalid":D,"aria-describedby":D?`${p} ${W}`:p,className:"min-w-0 flex-1 font-mono",onChange:E=>{w(E.target.value)}}),s.jsx(re,{type:"button",variant:"outline","aria-label":`Browse for the ${t.label} install folder`,onClick:k,children:"Browse"})]}),D?s.jsx("p",{id:W,role:"alert",className:"text-sm text-destructive",children:c}):null,s.jsx(ye,{option:t,model:g,effort:u,modelErrorMessage:h,effortErrorMessage:m,onModelChange:b,onEffortChange:f})]}):null,e[33]=u,e[34]=m,e[35]=W,e[36]=D,e[37]=p,e[38]=r,e[39]=l,e[40]=g,e[41]=h,e[42]=k,e[43]=f,e[44]=w,e[45]=b,e[46]=t,e[47]=c,e[48]=C,e[49]=I):I=e[49];let H;return e[50]!==$||e[51]!==I?(H=s.jsxs("li",{className:"border-b border-border py-3",children:[$,I]}),e[50]=$,e[51]=I,e[52]=H):H=e[52],H},Te=a=>{const e=z.c(58),{agents:t,defaultAgent:i,problem:l,children:o,folderBrowser:r,folderBrowserErrorMessage:g,onBrowseFolder:u,onBrowseEnd:c,onSubmit:h}=a,m=O.useId();let x;e[0]!==t?(x=()=>Object.fromEntries(t.map(Ae)),e[0]=t,e[1]=x):x=e[1];const[d,w]=O.useState(x);let b;e[2]!==t?(b=()=>Object.fromEntries(t.map(Se)),e[2]=t,e[3]=b):b=e[3];const[f,k]=O.useState(b);let C;e[4]!==t?(C=()=>Object.fromEntries(t.map(Fe)),e[4]=t,e[5]=C):C=e[5];const[p,W]=O.useState(C);let D;e[6]!==t?(D=()=>Object.fromEntries(t.map(Be)),e[6]=t,e[7]=D):D=e[7];const[A,_]=O.useState(D),[j,q]=O.useState(i),[N,L]=O.useState(null);let S;e[8]!==u||e[9]!==f?(S=E=>{L(E),u(f[E.agent]??"")},e[8]=u,e[9]=f,e[10]=S):S=e[10];const P=S;let F;e[11]!==c?(F=()=>{L(null),c()},e[11]=c,e[12]=F):F=e[12];const v=F;let Y;e[13]!==N||e[14]!==v?(Y=E=>{N!==null&&k(n=>({...n,[N.agent]:E})),v()},e[13]=N,e[14]=v,e[15]=Y):Y=e[15];const M=Y;let B;if(e[16]!==t||e[17]!==j||e[18]!==A||e[19]!==p||e[20]!==h||e[21]!==f||e[22]!==d){const E=()=>{h({agents:t.map(n=>({agent:n.agent,isPicked:d[n.agent]??!1,installPath:f[n.agent]??"",model:p[n.agent]??n.model,effort:A[n.agent]??n.effort})),defaultAgent:j})};B=n=>{n.preventDefault(),E()},e[16]=t,e[17]=j,e[18]=A,e[19]=p,e[20]=h,e[21]=f,e[22]=d,e[23]=B}else B=e[23];let R;if(e[24]!==t||e[25]!==j||e[26]!==m||e[27]!==A||e[28]!==P||e[29]!==p||e[30]!==f||e[31]!==d||e[32]!==l){let E;e[34]!==j||e[35]!==m||e[36]!==A||e[37]!==P||e[38]!==p||e[39]!==f||e[40]!==d||e[41]!==l?(E=n=>{var X,Z,J;return s.jsx(Ie,{option:n,groupName:m,isPicked:d[n.agent]??!1,isDefault:j===n.agent,installPath:f[n.agent]??"",model:p[n.agent]??n.model,effort:A[n.agent]??n.effort,pathErrorMessage:((X=l==null?void 0:l.field)==null?void 0:X.owner)===n.agent&&!Ce.includes(l.field.name)?l.message:null,modelErrorMessage:((Z=l==null?void 0:l.field)==null?void 0:Z.owner)===n.agent&&l.field.name===ee?l.message:null,effortErrorMessage:((J=l==null?void 0:l.field)==null?void 0:J.owner)===n.agent&&l.field.name===te?l.message:null,onPickedChange:U=>{w(G=>({...G,[n.agent]:U}))},onDefaultChange:()=>{q(n.agent)},onInstallPathChange:U=>{k(G=>({...G,[n.agent]:U}))},onModelChange:U=>{W(G=>({...G,[n.agent]:U.model})),_(G=>({...G,[n.agent]:U.selectedEffort}))},onEffortChange:U=>{_(G=>({...G,[n.agent]:U}))},onBrowse:()=>{P(n)}},n.agent)},e[34]=j,e[35]=m,e[36]=A,e[37]=P,e[38]=p,e[39]=f,e[40]=d,e[41]=l,e[42]=E):E=e[42],R=t.map(E),e[24]=t,e[25]=j,e[26]=m,e[27]=A,e[28]=P,e[29]=p,e[30]=f,e[31]=d,e[32]=l,e[33]=R}else R=e[33];let y;e[43]!==R?(y=s.jsx("ul",{className:"border-t border-border",children:R}),e[43]=R,e[44]=y):y=e[44];const T=N!==null,$=`Install folder for ${(N==null?void 0:N.label)??""}`;let I;e[45]!==r||e[46]!==g||e[47]!==v||e[48]!==M||e[49]!==u||e[50]!==T||e[51]!==$?(I=s.jsx(de,{isOpen:T,title:$,description:we,browser:r,errorMessage:g,onOpenFolder:u,onChooseRepository:ve,onChooseFolder:M,onClose:v}),e[45]=r,e[46]=g,e[47]=v,e[48]=M,e[49]=u,e[50]=T,e[51]=$,e[52]=I):I=e[52];let H;return e[53]!==o||e[54]!==y||e[55]!==I||e[56]!==B?(H=s.jsxs("form",{onSubmit:B,children:[y,o,I]}),e[53]=o,e[54]=y,e[55]=I,e[56]=B,e[57]=H):H=e[57],H};function Pe(a){return{value:a.model,label:a.label}}function ke(a){return{value:a.effort,label:a.label}}function Ae(a){return[a.agent,a.isPicked]}function Se(a){return[a.agent,a.installPath]}function Fe(a){return[a.agent,a.model]}function Be(a){return[a.agent,a.effort]}export{Te as A,Re as a};
@@ -0,0 +1 @@
1
+ import{c as T,h as le,r as M,k as I,l as Q,j as m,A as re,S as ae,I as ne,a as ie,d as ce,D as ue,b as de,s as he,B as G,e as me,f as fe,g as pe}from"./index-DRndyOxR.js";import{F as ge}from"./index-COdzqD_M.js";const ye="Searching…",be=[],xe=({id:c,name:e,detail:l,avatarUrl:n,monogram:a})=>({id:c,name:e,detail:l,avatarUrl:n,monogram:a}),qe=c=>{var X,z,J,K,W,Y,Z;const e=T.c(35),{isEnabled:l,folderPath:n,repositoryName:a,saved:o}=c,t=le(),[u,f]=M.useState(null),[s,i]=M.useState(null),h=M.useDeferredValue(s),d=M.useDeferredValue(n),r=u??(o==null?void 0:o.trackedAuthors)??be,p=r.map(Ae);let g;e[0]!==d||e[1]!==t.repository.authorForm?(g=t.repository.authorForm.queryOptions({path:d}),e[0]=d,e[1]=t.repository.authorForm,e[2]=g):g=e[2];const x=l&&a===null;let y;e[3]!==g||e[4]!==x?(y={...g,enabled:x,placeholderData:I},e[3]=g,e[4]=x,e[5]=y):y=e[5];const A=Q(y),w=t.repository.searchAuthors.queryOptions({path:d,repositoryName:a,role:(h==null?void 0:h.role)??"tracked",query:(h==null?void 0:h.query)??"",trackedAuthorIds:p}),D=l&&h!==null;let B;e[6]!==w||e[7]!==D?(B={...w,enabled:D,placeholderData:I},e[6]=w,e[7]=D,e[8]=B):B=e[8];const b=Q(B);let S;e[9]!==((X=b.data)==null?void 0:X.options)||e[10]!==r?(S=(L,$)=>{var se;const ee=(se=b.data)==null?void 0:se.options.find(V=>V.id===$);if(ee===void 0)return;const te=xe(ee);i(null),f([...r.filter(V=>V.id!==te.id),te])},e[9]=(z=b.data)==null?void 0:z.options,e[10]=r,e[11]=S):S=e[11];const F=S,O=(o==null?void 0:o.form)??A.data??null,R=(s==null?void 0:s.role)??null,_=(s==null?void 0:s.query)??"";let q;e[12]!==((J=b.data)==null?void 0:J.options)?(q=((K=b.data)==null?void 0:K.options)??[],e[12]=(W=b.data)==null?void 0:W.options,e[13]=q):q=e[13];const v=((Y=b.data)==null?void 0:Y.message)??(b.isPending?ye:null),N=((Z=b.error)==null?void 0:Z.message)??null;let j;e[14]!==_||e[15]!==q||e[16]!==v||e[17]!==N||e[18]!==R?(j={role:R,query:_,options:q,message:v,errorMessage:N},e[14]=_,e[15]=q,e[16]=v,e[17]=N,e[18]=R,e[19]=j):j=e[19];let C;e[20]!==j||e[21]!==O||e[22]!==r?(C={form:O,trackedAuthors:r,search:j},e[20]=j,e[21]=O,e[22]=r,e[23]=C):C=e[23];let k;e[24]!==p?(k={trackedAuthorIds:p},e[24]=p,e[25]=k):k=e[25];let P;e[26]===Symbol.for("react.memo_cache_sentinel")?(P=(L,$)=>{i({role:L,query:$})},e[26]=P):P=e[26];let H;e[27]!==r?(H=L=>{f(r.filter($=>$.id!==L))},e[27]=r,e[28]=H):H=e[28];let E;e[29]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{f(null),i(null)},e[29]=E):E=e[29];let U;return e[30]!==F||e[31]!==C||e[32]!==k||e[33]!==H?(U={authors:C,selection:k,onAuthorQueryChange:P,onAuthorSelect:F,onTrackedAuthorRemove:H,reset:E},e[30]=F,e[31]=C,e[32]=k,e[33]=H,e[34]=U):U=e[34],U};function Ae(c){return c.id}const Se="Searching…",ve=c=>{var q,v,N,j,C;const e=T.c(29),l=le(),[n,a]=M.useState(""),[o,t]=M.useState(!1),[u,f]=M.useState(null),s=M.useDeferredValue(n);let i;e[0]!==s||e[1]!==l.setup.searchFolders?(i=l.setup.searchFolders.queryOptions({query:s}),e[0]=s,e[1]=l.setup.searchFolders,e[2]=i):i=e[2];let h;e[3]!==c||e[4]!==i?(h={...i,enabled:c,placeholderData:I},e[3]=c,e[4]=i,e[5]=h):h=e[5];const d=Q(h);let r;e[6]!==u||e[7]!==l.setup.browseFolders?(r=l.setup.browseFolders.queryOptions({path:u,purpose:"repository"}),e[6]=u,e[7]=l.setup.browseFolders,e[8]=r):r=e[8];const p=c&&o;let g;e[9]!==r||e[10]!==p?(g={...r,enabled:p,placeholderData:I},e[9]=r,e[10]=p,e[11]=g):g=e[11];const x=Q(g);let y;e[12]!==((q=d.data)==null?void 0:q.options)?(y=((v=d.data)==null?void 0:v.options)??[],e[12]=(N=d.data)==null?void 0:N.options,e[13]=y):y=e[13];const A=((j=d.data)==null?void 0:j.message)??(d.isPending?Se:null);let w;e[14]!==n||e[15]!==y||e[16]!==A?(w={query:n,options:y,message:A},e[14]=n,e[15]=y,e[16]=A,e[17]=w):w=e[17];const D=x.data??null,B=((C=x.error)==null?void 0:C.message)??null;let b;e[18]!==o||e[19]!==D||e[20]!==B?(b={isOpen:o,browser:D,errorMessage:B},e[18]=o,e[19]=D,e[20]=B,e[21]=b):b=e[21];let S,F;e[22]===Symbol.for("react.memo_cache_sentinel")?(S=k=>{a(k),t(!1)},F=()=>{t(!0)},e[22]=S,e[23]=F):(S=e[22],F=e[23]);let O,R;e[24]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{t(!1)},R=()=>{a(""),f(null),t(!1)},e[24]=O,e[25]=R):(O=e[24],R=e[25]);let _;return e[26]!==b||e[27]!==w?(_={search:w,browse:b,onQueryChange:a,onChooseFolder:S,onBrowse:F,onBrowseFolder:f,onBrowseClose:O,reset:R},e[26]=b,e[27]=w,e[28]=_):_=e[28],_},je=c=>{const e=T.c(13),{label:l,hint:n,placeholder:a,query:o,options:t,message:u,errorMessage:f,onQueryChange:s,onOpen:i,onSelect:h}=c;let d;e[0]!==t?(d=t.map(Ce),e[0]=t,e[1]=d):d=e[1];let r;return e[2]!==f||e[3]!==n||e[4]!==l||e[5]!==u||e[6]!==i||e[7]!==s||e[8]!==h||e[9]!==a||e[10]!==o||e[11]!==d?(r=m.jsx(ae,{label:l,hint:n,placeholder:a,value:o,suggestions:d,message:u,errorMessage:f,className:"max-w-md",onValueChange:s,onOpen:i,onSelect:h}),e[2]=f,e[3]=n,e[4]=l,e[5]=u,e[6]=i,e[7]=s,e[8]=h,e[9]=a,e[10]=o,e[11]=d,e[12]=r):r=e[12],r};function Ce(c){return{id:c.id,label:c.name,detail:c.detail,stateLabel:c.stateLabel,isDisabled:c.isTaken,marker:m.jsx(re,{imageUrl:c.avatarUrl,monogram:c.monogram})}}const we=[],oe=c=>{const e=T.c(17),{author:l,stateLabel:n,removal:a}=c;let o;e[0]!==l.avatarUrl||e[1]!==l.monogram?(o=m.jsx(re,{imageUrl:l.avatarUrl,monogram:l.monogram}),e[0]=l.avatarUrl,e[1]=l.monogram,e[2]=o):o=e[2];let t;e[3]!==l.name?(t=m.jsx("span",{className:"min-w-0 truncate",children:l.name}),e[3]=l.name,e[4]=t):t=e[4];let u;e[5]!==l.detail?(u=m.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:l.detail}),e[5]=l.detail,e[6]=u):u=e[6];let f;e[7]!==n?(f=n===null?null:m.jsx("span",{className:"text-sm font-bold",children:n}),e[7]=n,e[8]=f):f=e[8];let s;e[9]!==a?(s=a===null?null:m.jsx(ne,{icon:"close",label:a.label,onClick:a.onRemove}),e[9]=a,e[10]=s):s=e[10];let i;return e[11]!==o||e[12]!==t||e[13]!==u||e[14]!==f||e[15]!==s?(i=m.jsxs("div",{className:"flex max-w-md items-center gap-2 py-1",children:[o,t,u,f,s]}),e[11]=o,e[12]=t,e[13]=u,e[14]=f,e[15]=s,e[16]=i):i=e[16],i},Fe=c=>{const e=T.c(22),{label:l,hint:n,placeholder:a,authorRole:o,search:t,onAuthorQueryChange:u,onAuthorSelect:f}=c,s=t.role===o,i=s?t.query:"",h=s?t.options:we,d=s?t.message:null,r=s?t.errorMessage:null;let p;e[0]!==o||e[1]!==u?(p=A=>{u(o,A)},e[0]=o,e[1]=u,e[2]=p):p=e[2];let g;e[3]!==o||e[4]!==s||e[5]!==u||e[6]!==t.query?(g=()=>{u(o,s?t.query:"")},e[3]=o,e[4]=s,e[5]=u,e[6]=t.query,e[7]=g):g=e[7];let x;e[8]!==o||e[9]!==f?(x=A=>{f(o,A)},e[8]=o,e[9]=f,e[10]=x):x=e[10];let y;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==i||e[15]!==h||e[16]!==d||e[17]!==r||e[18]!==p||e[19]!==g||e[20]!==x?(y=m.jsx(je,{label:l,hint:n,placeholder:a,query:i,options:h,message:d,errorMessage:r,onQueryChange:p,onOpen:g,onSelect:x}),e[11]=n,e[12]=l,e[13]=a,e[14]=i,e[15]=h,e[16]=d,e[17]=r,e[18]=p,e[19]=g,e[20]=x,e[21]=y):y=e[21],y},Oe=c=>{const e=T.c(20),{authors:l,onAuthorQueryChange:n,onAuthorSelect:a,onTrackedAuthorRemove:o}=c,{form:t,trackedAuthors:u,search:f}=l;if(t===null){let p;return e[0]===Symbol.for("react.memo_cache_sentinel")?(p=m.jsx("p",{role:"status",className:"text-muted-foreground",children:"Reading the author settings…"}),e[0]=p):p=e[0],p}let s;e[1]!==t.gitSelfAuthor?(s=t.gitSelfAuthor===null?null:m.jsx(oe,{author:t.gitSelfAuthor.author,stateLabel:null,removal:null}),e[1]=t.gitSelfAuthor,e[2]=s):s=e[2];let i;e[3]!==t.searchHint||e[4]!==t.searchPlaceholder||e[5]!==n||e[6]!==a||e[7]!==f?(i=m.jsx(Fe,{label:"Track branches from specific team members",hint:t.searchHint,placeholder:t.searchPlaceholder,authorRole:"tracked",search:f,onAuthorQueryChange:n,onAuthorSelect:a}),e[3]=t.searchHint,e[4]=t.searchPlaceholder,e[5]=n,e[6]=a,e[7]=f,e[8]=i):i=e[8];let h;if(e[9]!==o||e[10]!==u){let p;e[12]!==o?(p=g=>m.jsx("li",{children:m.jsx(oe,{author:g,stateLabel:null,removal:{label:`Stop tracking ${g.name}`,onRemove:()=>{o(g.id)}}})},g.id),e[12]=o,e[13]=p):p=e[13],h=u.map(p),e[9]=o,e[10]=u,e[11]=h}else h=e[11];let d;e[14]!==h?(d=m.jsx("ul",{"aria-label":"Tracked team members",children:h}),e[14]=h,e[15]=d):d=e[15];let r;return e[16]!==s||e[17]!==i||e[18]!==d?(r=m.jsxs("div",{className:"grid gap-4",children:[s,i,d]}),e[16]=s,e[17]=i,e[18]=d,e[19]=r):r=e[19],r},Re="/Users/you/projects/storefront",Ne=c=>{const e=T.c(52),{isOpen:l,search:n,browse:a,authors:o,isAdding:t,errorMessage:u,onQueryChange:f,onChooseFolder:s,onAuthorQueryChange:i,onAuthorSelect:h,onTrackedAuthorRemove:d,onSubmit:r,onBrowse:p,onBrowseFolder:g,onBrowseClose:x,onClose:y}=c;let A;e[0]!==y?(A=ie(y),e[0]=y,e[1]=A):A=e[1];let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w=m.jsxs(ce,{children:[m.jsx(ue,{children:"Add repository"}),m.jsx(de,{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[2]=w):w=e[2];let D;e[3]!==r?(D=he(r),e[3]=r,e[4]=D):D=e[4];const B=n.query;let b;e[5]!==n.options?(b=n.options.map(_e),e[5]=n.options,e[6]=b):b=e[6];let S;e[7]!==s||e[8]!==f||e[9]!==r||e[10]!==n.message||e[11]!==n.query||e[12]!==b?(S=m.jsx(ae,{label:"Repository folder",hint:null,placeholder:Re,value:B,suggestions:b,message:n.message,errorMessage:null,isLiteral:!0,onValueChange:f,onSelect:s,onEnter:r}),e[7]=s,e[8]=f,e[9]=r,e[10]=n.message,e[11]=n.query,e[12]=b,e[13]=S):S=e[13];let F;e[14]!==o||e[15]!==i||e[16]!==h||e[17]!==d?(F=m.jsx(Oe,{authors:o,onAuthorQueryChange:i,onAuthorSelect:h,onTrackedAuthorRemove:d}),e[14]=o,e[15]=i,e[16]=h,e[17]=d,e[18]=F):F=e[18];let O;e[19]!==u?(O=u===null?null:m.jsx("p",{role:"alert",className:"text-sm text-destructive",children:u}),e[19]=u,e[20]=O):O=e[20];let R;e[21]!==p?(R=m.jsx(G,{type:"button",variant:"outline",className:"sm:mr-auto",onClick:p,children:"Browse folders"}),e[21]=p,e[22]=R):R=e[22];let _;e[23]!==y?(_=m.jsx(G,{type:"button",variant:"ghost",onClick:y,children:"Cancel"}),e[23]=y,e[24]=_):_=e[24];const q=t?"Adding…":"Add";let v;e[25]!==t||e[26]!==q?(v=m.jsx(G,{type:"submit",disabled:t,children:q}),e[25]=t,e[26]=q,e[27]=v):v=e[27];let N;e[28]!==_||e[29]!==v||e[30]!==R?(N=m.jsxs(me,{children:[R,_,v]}),e[28]=_,e[29]=v,e[30]=R,e[31]=N):N=e[31];let j;e[32]!==N||e[33]!==D||e[34]!==S||e[35]!==F||e[36]!==O?(j=m.jsxs("form",{onSubmit:D,className:"grid gap-4",children:[S,F,O,N]}),e[32]=N,e[33]=D,e[34]=S,e[35]=F,e[36]=O,e[37]=j):j=e[37];let C;e[38]!==a.browser||e[39]!==a.errorMessage||e[40]!==a.isOpen||e[41]!==x||e[42]!==g||e[43]!==s?(C=m.jsx(ge,{isOpen:a.isOpen,title:"Browse folders",description:"Open folders until you reach a repository, then choose it.",browser:a.browser,errorMessage:a.errorMessage,onOpenFolder:g,onChooseRepository:s,onChooseFolder:null,onClose:x}),e[38]=a.browser,e[39]=a.errorMessage,e[40]=a.isOpen,e[41]=x,e[42]=g,e[43]=s,e[44]=C):C=e[44];let k;e[45]!==j||e[46]!==C?(k=m.jsxs(fe,{className:"sm:max-w-lg",children:[w,j,C]}),e[45]=j,e[46]=C,e[47]=k):k=e[47];let P;return e[48]!==l||e[49]!==A||e[50]!==k?(P=m.jsx(pe,{open:l,onOpenChange:A,children:k}),e[48]=l,e[49]=A,e[50]=k,e[51]=P):P=e[51],P};function _e(c){return{id:c.path,label:c.path,detail:null,stateLabel:c.stateLabel,isDisabled:c.isAdded}}export{Ne as A,Oe as R,qe as a,je as b,ve as u};
@@ -0,0 +1 @@
1
+ import{c as N,j as s,D,b as F,d as w,e as O,B as y,f as v,g as R,E}from"./index-DRndyOxR.js";const P={repository:"font-bold","added-repository":"text-muted-foreground",folder:""},$=b=>{const e=N.c(6),{folder:t,onOpenFolder:o,onChooseRepository:n}=b;if(t.kind==="added-repository")return null;let l;return e[0]!==t.kind||e[1]!==t.name||e[2]!==t.path||e[3]!==n||e[4]!==o?(l=t.kind==="repository"?s.jsx(y,{type:"button",size:"sm","aria-label":`Choose ${t.name}`,onClick:()=>{n(t.path)},children:"Choose"}):s.jsx(y,{type:"button",variant:"outline",size:"sm","aria-label":`Open ${t.name}`,onClick:()=>{o(t.path)},children:"Open"}),e[0]=t.kind,e[1]=t.name,e[2]=t.path,e[3]=n,e[4]=o,e[5]=l):l=e[5],l},z=b=>{const e=N.c(16),{browser:t,onOpenFolder:o,onChooseRepository:n}=b;let l;e[0]!==t.path?(l=s.jsx("p",{className:"min-w-0 flex-1 font-mono text-[0.82rem] wrap-anywhere",children:t.path}),e[0]=t.path,e[1]=l):l=e[1];let r;e[2]!==t.parentPath||e[3]!==o?(r=t.parentPath===null?null:s.jsx(y,{type:"button",variant:"outline",size:"sm",onClick:()=>{t.parentPath!==null&&o(t.parentPath)},children:"Up one folder"}),e[2]=t.parentPath,e[3]=o,e[4]=r):r=e[4];let a;e[5]!==l||e[6]!==r?(a=s.jsxs("div",{className:"flex items-center gap-3",children:[l,r]}),e[5]=l,e[6]=r,e[7]=a):a=e[7];let i;e[8]!==t.folders||e[9]!==t.message||e[10]!==n||e[11]!==o?(i=t.message===null?s.jsx("ul",{className:"max-h-[calc(20rem+1px)] overflow-y-auto border-t border-border",children:t.folders.map(c=>s.jsxs("li",{className:"flex h-10 items-center gap-3 border-b border-border",children:[s.jsx("span",{className:E("min-w-0 flex-1 truncate",P[c.kind]),children:c.name}),s.jsx("span",{className:"text-muted-foreground",children:c.kindLabel}),s.jsx($,{folder:c,onOpenFolder:o,onChooseRepository:n})]},c.path))}):s.jsx("p",{className:"border-t border-border pt-3 text-muted-foreground",children:t.message}),e[8]=t.folders,e[9]=t.message,e[10]=n,e[11]=o,e[12]=i):i=e[12];let d;return e[13]!==a||e[14]!==i?(d=s.jsxs("div",{className:"grid gap-3",children:[a,i]}),e[13]=a,e[14]=i,e[15]=d):d=e[15],d},B=b=>{const e=N.c(27),{isOpen:t,title:o,description:n,browser:l,errorMessage:r,onOpenFolder:a,onChooseRepository:i,onChooseFolder:d,onClose:c}=b;let p;e[0]!==c?(p=k=>{k||c()},e[0]=c,e[1]=p):p=e[1];let h;e[2]!==o?(h=s.jsx(D,{children:o}),e[2]=o,e[3]=h):h=e[3];let m;e[4]!==n?(m=s.jsx(F,{children:n}),e[4]=n,e[5]=m):m=e[5];let x;e[6]!==h||e[7]!==m?(x=s.jsxs(w,{children:[h,m]}),e[6]=h,e[7]=m,e[8]=x):x=e[8];let u;e[9]!==l||e[10]!==i||e[11]!==a?(u=l===null?s.jsx("p",{role:"status",className:"text-muted-foreground",children:"Reading the folder…"}):s.jsx(z,{browser:l,onOpenFolder:a,onChooseRepository:i}),e[9]=l,e[10]=i,e[11]=a,e[12]=u):u=e[12];let f;e[13]!==r?(f=r===null?null:s.jsx("p",{role:"alert",className:"text-sm text-destructive",children:r}),e[13]=r,e[14]=f):f=e[14];let j;e[15]!==l||e[16]!==d?(j=l===null||d===null?null:s.jsx(O,{children:s.jsx(y,{type:"button",onClick:()=>{d(l.path)},children:"Use this folder"})}),e[15]=l,e[16]=d,e[17]=j):j=e[17];let g;e[18]!==x||e[19]!==u||e[20]!==f||e[21]!==j?(g=s.jsxs(v,{children:[x,u,f,j]}),e[18]=x,e[19]=u,e[20]=f,e[21]=j,e[22]=g):g=e[22];let C;return e[23]!==t||e[24]!==p||e[25]!==g?(C=s.jsx(R,{open:t,onOpenChange:p,children:g}),e[23]=t,e[24]=p,e[25]=g,e[26]=C):C=e[26],C};export{B as F};