@kidlat-dakila/flightplan 0.1.6 → 0.1.8

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 (178) hide show
  1. package/README.md +31 -16
  2. package/backend/configurations/default-configurations/minimal/context.md +9 -54
  3. package/backend/configurations/default-configurations/minimal/traceDiagram.nodes.blockLabels.label.md +19 -0
  4. package/backend/configurations/default-configurations/minimal/{journey.nodes.description.md → traceDiagram.nodes.description.md} +1 -1
  5. package/backend/configurations/default-configurations/minimal/walkthrough.files.waypoints.reading.md +1 -1
  6. package/backend/configurations/default-configurations/onboardee/context.md +16 -62
  7. package/backend/configurations/default-configurations/onboardee/traceDiagram.description.md +16 -0
  8. package/backend/configurations/default-configurations/onboardee/traceDiagram.nodes.blockLabels.label.md +11 -0
  9. package/backend/configurations/default-configurations/onboardee/{journey.nodes.description.md → traceDiagram.nodes.description.md} +1 -1
  10. package/backend/configurations/default-configurations/onboardee/walkthrough.files.waypoints.reading.md +1 -1
  11. package/backend/configurations/default-configurations/standard/context.md +16 -62
  12. package/backend/configurations/default-configurations/standard/traceDiagram.description.md +16 -0
  13. package/backend/configurations/default-configurations/standard/traceDiagram.nodes.blockLabels.label.md +11 -0
  14. package/backend/configurations/default-configurations/standard/{journey.nodes.description.md → traceDiagram.nodes.description.md} +1 -1
  15. package/backend/configurations/default-configurations/standard/walkthrough.files.waypoints.reading.md +1 -1
  16. package/backend/configurations/default-configurations/unfamiliar-territory/context.md +16 -62
  17. package/backend/configurations/default-configurations/unfamiliar-territory/traceDiagram.description.md +16 -0
  18. package/backend/configurations/default-configurations/unfamiliar-territory/traceDiagram.nodes.blockLabels.label.md +11 -0
  19. package/backend/configurations/default-configurations/unfamiliar-territory/{journey.nodes.description.md → traceDiagram.nodes.description.md} +1 -1
  20. package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.waypoints.reading.md +1 -1
  21. package/backend/configurations/system-instructions/artifactFormat.md +20 -16
  22. package/backend/configurations/system-instructions/{blast.md → blastDiagram.md} +5 -5
  23. package/backend/configurations/system-instructions/context.md +18 -9
  24. package/backend/configurations/system-instructions/title.md +36 -4
  25. package/backend/configurations/system-instructions/traceDiagram.description.md +14 -0
  26. package/backend/configurations/system-instructions/{journey.md → traceDiagram.md} +8 -8
  27. package/backend/configurations/system-instructions/traceDiagram.nodes.blockLabels.label.md +6 -0
  28. package/backend/configurations/system-instructions/walkthrough.files.md +5 -11
  29. package/backend/configurations/system-instructions/walkthrough.files.waypoints.coreChange.md +7 -0
  30. package/backend/configurations/system-instructions/walkthrough.files.waypoints.md +3 -3
  31. package/backend/configurations/system-instructions/walkthrough.md +6 -8
  32. package/backend/main.js +56748 -44939
  33. package/backend/plugin/skills/live/SKILL.md +79 -0
  34. package/backend/plugin/skills/review/SKILL.md +39 -52
  35. package/frontend/assets/_branchId-Caxyy__g.js +1 -0
  36. package/frontend/assets/_branchId-IJ4VEzEl.js +1 -0
  37. package/frontend/assets/_id-3L9ONe4W.js +1 -0
  38. package/frontend/assets/_id-CvORsoNj.js +1 -0
  39. package/frontend/assets/agents-DnjhKMUc.js +1 -0
  40. package/frontend/assets/agents-bla75JmI.js +1 -0
  41. package/frontend/assets/create-B82q7ZMu.js +1 -0
  42. package/frontend/assets/create-C9yw-thL.js +1 -0
  43. package/frontend/assets/{create-DBv4ZLt7.js → create-CEpA1s8S.js} +1 -1
  44. package/frontend/assets/create-D0h6PRxn.js +1 -0
  45. package/frontend/assets/download-CwWMZwNG.js +1 -0
  46. package/frontend/assets/forges-BH3uXIQL.js +1 -0
  47. package/frontend/assets/forges-uSh1-w20.js +1 -0
  48. package/frontend/assets/index--nj01XKS.js +1 -0
  49. package/frontend/assets/index-0VAWT0gs.js +1 -0
  50. package/frontend/assets/index-B0zuYONu.js +1 -0
  51. package/frontend/assets/{index-XcYy-NBi.js → index-BQaZ5gZR.js} +1 -1
  52. package/frontend/assets/{index-CZN7BV83.js → index-BZ6iL63Z.js} +1 -1
  53. package/frontend/assets/index-Bar8NyIm.js +1 -0
  54. package/frontend/assets/{index-efpZ6EEe.js → index-BlTfCkr5.js} +1 -1
  55. package/frontend/assets/{index-Dn9qaXzX.js → index-BvuPClj3.js} +1 -1
  56. package/frontend/assets/index-C9xsdcXo.js +1 -0
  57. package/frontend/assets/index-CJDNq1TA.js +1 -0
  58. package/frontend/assets/index-CJslcuJ0.js +1 -0
  59. package/frontend/assets/index-CTKqkqZN.css +1 -0
  60. package/frontend/assets/index-CXyB0ld0.js +1 -0
  61. package/frontend/assets/{index-DyfuBbIJ.js → index-CcORd1N6.js} +1 -1
  62. package/frontend/assets/index-CrAQ5_e4.js +1 -0
  63. package/frontend/assets/index-DG0FDX8u.js +1 -0
  64. package/frontend/assets/index-DKnoo-kT.js +455 -0
  65. package/frontend/assets/{index-s14Wy6CE.js → index-DKzDkR6v.js} +1 -1
  66. package/frontend/assets/{index-CR5UGYQN.js → index-DfKNJbUM.js} +75 -62
  67. package/frontend/assets/{index-BaflOxvR.js → index-DlUHisPA.js} +1 -1
  68. package/frontend/assets/index-Dv5cF6qF.js +1 -0
  69. package/frontend/assets/index-JPWJ3IiN.js +1 -0
  70. package/frontend/assets/index-V1avMli5.js +6 -0
  71. package/frontend/assets/index-iRAoFOv3.js +1 -0
  72. package/frontend/assets/repositories-DqGU7W63.js +1 -0
  73. package/frontend/assets/repositories-DuObN8PJ.js +1 -0
  74. package/frontend/assets/review-BbbMUFsk.js +1 -0
  75. package/frontend/assets/review-C3k0h5Vl.js +1 -0
  76. package/frontend/assets/route-D8s8AylJ.js +1 -0
  77. package/frontend/favicon.ico +0 -0
  78. package/frontend/favicon.svg +5 -0
  79. package/frontend/index.html +10 -3
  80. package/frontend/logo.svg +5 -0
  81. package/frontend/not-found.svg +25 -0
  82. package/frontend/server-error.svg +32 -0
  83. package/package.json +5 -2
  84. package/published-review/app.css +1 -1
  85. package/published-review/app.js +134 -99
  86. package/backend/configurations/default-configurations/minimal/journey.nodes.blockLabels.label.md +0 -13
  87. package/backend/configurations/default-configurations/minimal/walkthrough.files.title.md +0 -7
  88. package/backend/configurations/default-configurations/minimal/walkthrough.intro.md +0 -4
  89. package/backend/configurations/default-configurations/onboardee/journey.description.md +0 -10
  90. package/backend/configurations/default-configurations/onboardee/journey.nodes.blockLabels.label.md +0 -9
  91. package/backend/configurations/default-configurations/onboardee/walkthrough.files.title.md +0 -7
  92. package/backend/configurations/default-configurations/onboardee/walkthrough.intro.md +0 -5
  93. package/backend/configurations/default-configurations/standard/journey.description.md +0 -10
  94. package/backend/configurations/default-configurations/standard/journey.nodes.blockLabels.label.md +0 -9
  95. package/backend/configurations/default-configurations/standard/walkthrough.files.title.md +0 -7
  96. package/backend/configurations/default-configurations/standard/walkthrough.intro.md +0 -5
  97. package/backend/configurations/default-configurations/unfamiliar-territory/journey.description.md +0 -10
  98. package/backend/configurations/default-configurations/unfamiliar-territory/journey.nodes.blockLabels.label.md +0 -9
  99. package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.files.title.md +0 -7
  100. package/backend/configurations/default-configurations/unfamiliar-territory/walkthrough.intro.md +0 -5
  101. package/backend/configurations/system-instructions/journey.description.md +0 -14
  102. package/backend/configurations/system-instructions/journey.nodes.blockLabels.label.md +0 -6
  103. package/backend/configurations/system-instructions/walkthrough.files.summary.md +0 -4
  104. package/backend/configurations/system-instructions/walkthrough.files.title.md +0 -2
  105. package/backend/configurations/system-instructions/walkthrough.files.waypoints.needsAttention.md +0 -8
  106. package/backend/configurations/system-instructions/walkthrough.intro.md +0 -3
  107. package/frontend/assets/_branchId-CPb8-qBw.js +0 -1
  108. package/frontend/assets/_branchId-LiwHskkW.js +0 -1
  109. package/frontend/assets/_id-BDFgPH36.js +0 -1
  110. package/frontend/assets/_id-DlHylI1F.js +0 -1
  111. package/frontend/assets/agents-BGNiGYQQ.js +0 -1
  112. package/frontend/assets/agents-DBPulyWi.js +0 -1
  113. package/frontend/assets/configuration-C8ZTSPna.js +0 -1
  114. package/frontend/assets/configuration-DBU-Fvop.js +0 -1
  115. package/frontend/assets/create-BWsYjEs5.js +0 -1
  116. package/frontend/assets/create-DBNC2wSp.js +0 -1
  117. package/frontend/assets/create-DXgFUVIW.js +0 -1
  118. package/frontend/assets/download-BnmEn_Ca.js +0 -1
  119. package/frontend/assets/forges-BOWrvfZl.js +0 -1
  120. package/frontend/assets/forges-DwSiwqas.js +0 -1
  121. package/frontend/assets/index-B1Rm0SQ5.js +0 -1
  122. package/frontend/assets/index-BKKD-dvv.js +0 -1
  123. package/frontend/assets/index-CSoB1eP_.js +0 -1
  124. package/frontend/assets/index-CUqlioqL.js +0 -1
  125. package/frontend/assets/index-CeY9TXPf.js +0 -1
  126. package/frontend/assets/index-CydhSU9g.js +0 -1
  127. package/frontend/assets/index-D-k5POv5.js +0 -1
  128. package/frontend/assets/index-DCCyA67N.js +0 -1
  129. package/frontend/assets/index-DfRj4oZV.js +0 -441
  130. package/frontend/assets/index-Dw5NpM9d.js +0 -1
  131. package/frontend/assets/index-PzkXPYSX.js +0 -1
  132. package/frontend/assets/index-QabB0_Qw.js +0 -1
  133. package/frontend/assets/index-V8tnJR9v.js +0 -1
  134. package/frontend/assets/index-ec_xLUMF.css +0 -1
  135. package/frontend/assets/index-zxLaxo8R.js +0 -1
  136. package/frontend/assets/repositories-BLLfYDjf.js +0 -1
  137. package/frontend/assets/repositories-of9BXUjW.js +0 -1
  138. package/frontend/assets/route-X94hglR1.js +0 -1
  139. package/frontend/logo-small.png +0 -0
  140. package/frontend/logo.png +0 -0
  141. /package/backend/configurations/default-configurations/minimal/{blast.nodes.impactReason.md → blastDiagram.nodes.impactReason.md} +0 -0
  142. /package/backend/configurations/default-configurations/minimal/{blast.nodes.impactType.behaviour-changes.md → blastDiagram.nodes.impactType.behaviour-changes.md} +0 -0
  143. /package/backend/configurations/default-configurations/minimal/{blast.nodes.impactType.breaks.md → blastDiagram.nodes.impactType.breaks.md} +0 -0
  144. /package/backend/configurations/default-configurations/minimal/{blast.nodes.impactType.md → blastDiagram.nodes.impactType.md} +0 -0
  145. /package/backend/configurations/default-configurations/minimal/{blast.nodes.impactType.unaffected.md → blastDiagram.nodes.impactType.unaffected.md} +0 -0
  146. /package/backend/configurations/default-configurations/minimal/{journey.description.md → traceDiagram.description.md} +0 -0
  147. /package/backend/configurations/default-configurations/minimal/{journey.nodes.label.md → traceDiagram.nodes.label.md} +0 -0
  148. /package/backend/configurations/default-configurations/minimal/{journey.nodes.triggerLabels.label.md → traceDiagram.nodes.triggerLabels.label.md} +0 -0
  149. /package/backend/configurations/default-configurations/minimal/{walkthrough.files.waypoints.needsAttention.md → walkthrough.files.waypoints.coreChange.md} +0 -0
  150. /package/backend/configurations/default-configurations/onboardee/{blast.nodes.impactReason.md → blastDiagram.nodes.impactReason.md} +0 -0
  151. /package/backend/configurations/default-configurations/onboardee/{blast.nodes.impactType.behaviour-changes.md → blastDiagram.nodes.impactType.behaviour-changes.md} +0 -0
  152. /package/backend/configurations/default-configurations/onboardee/{blast.nodes.impactType.breaks.md → blastDiagram.nodes.impactType.breaks.md} +0 -0
  153. /package/backend/configurations/default-configurations/onboardee/{blast.nodes.impactType.md → blastDiagram.nodes.impactType.md} +0 -0
  154. /package/backend/configurations/default-configurations/onboardee/{blast.nodes.impactType.unaffected.md → blastDiagram.nodes.impactType.unaffected.md} +0 -0
  155. /package/backend/configurations/default-configurations/onboardee/{journey.nodes.label.md → traceDiagram.nodes.label.md} +0 -0
  156. /package/backend/configurations/default-configurations/onboardee/{journey.nodes.triggerLabels.label.md → traceDiagram.nodes.triggerLabels.label.md} +0 -0
  157. /package/backend/configurations/default-configurations/onboardee/{walkthrough.files.waypoints.needsAttention.md → walkthrough.files.waypoints.coreChange.md} +0 -0
  158. /package/backend/configurations/default-configurations/standard/{blast.nodes.impactReason.md → blastDiagram.nodes.impactReason.md} +0 -0
  159. /package/backend/configurations/default-configurations/standard/{blast.nodes.impactType.behaviour-changes.md → blastDiagram.nodes.impactType.behaviour-changes.md} +0 -0
  160. /package/backend/configurations/default-configurations/standard/{blast.nodes.impactType.breaks.md → blastDiagram.nodes.impactType.breaks.md} +0 -0
  161. /package/backend/configurations/default-configurations/standard/{blast.nodes.impactType.md → blastDiagram.nodes.impactType.md} +0 -0
  162. /package/backend/configurations/default-configurations/standard/{blast.nodes.impactType.unaffected.md → blastDiagram.nodes.impactType.unaffected.md} +0 -0
  163. /package/backend/configurations/default-configurations/standard/{journey.nodes.label.md → traceDiagram.nodes.label.md} +0 -0
  164. /package/backend/configurations/default-configurations/standard/{journey.nodes.triggerLabels.label.md → traceDiagram.nodes.triggerLabels.label.md} +0 -0
  165. /package/backend/configurations/default-configurations/standard/{walkthrough.files.waypoints.needsAttention.md → walkthrough.files.waypoints.coreChange.md} +0 -0
  166. /package/backend/configurations/default-configurations/unfamiliar-territory/{blast.nodes.impactReason.md → blastDiagram.nodes.impactReason.md} +0 -0
  167. /package/backend/configurations/default-configurations/unfamiliar-territory/{blast.nodes.impactType.behaviour-changes.md → blastDiagram.nodes.impactType.behaviour-changes.md} +0 -0
  168. /package/backend/configurations/default-configurations/unfamiliar-territory/{blast.nodes.impactType.breaks.md → blastDiagram.nodes.impactType.breaks.md} +0 -0
  169. /package/backend/configurations/default-configurations/unfamiliar-territory/{blast.nodes.impactType.md → blastDiagram.nodes.impactType.md} +0 -0
  170. /package/backend/configurations/default-configurations/unfamiliar-territory/{blast.nodes.impactType.unaffected.md → blastDiagram.nodes.impactType.unaffected.md} +0 -0
  171. /package/backend/configurations/default-configurations/unfamiliar-territory/{journey.nodes.label.md → traceDiagram.nodes.label.md} +0 -0
  172. /package/backend/configurations/default-configurations/unfamiliar-territory/{journey.nodes.triggerLabels.label.md → traceDiagram.nodes.triggerLabels.label.md} +0 -0
  173. /package/backend/configurations/default-configurations/unfamiliar-territory/{walkthrough.files.waypoints.needsAttention.md → walkthrough.files.waypoints.coreChange.md} +0 -0
  174. /package/backend/configurations/system-instructions/{blast.nodes.impactReason.md → blastDiagram.nodes.impactReason.md} +0 -0
  175. /package/backend/configurations/system-instructions/{blast.nodes.impactType.md → blastDiagram.nodes.impactType.md} +0 -0
  176. /package/backend/configurations/system-instructions/{journey.nodes.description.md → traceDiagram.nodes.description.md} +0 -0
  177. /package/backend/configurations/system-instructions/{journey.nodes.label.md → traceDiagram.nodes.label.md} +0 -0
  178. /package/backend/configurations/system-instructions/{journey.nodes.triggerLabels.label.md → traceDiagram.nodes.triggerLabels.label.md} +0 -0
@@ -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
 
@@ -63,7 +66,7 @@ are reaching for one of those to write a title, a reading, a label or the
63
66
  context, the answer is already in a call below.
64
67
 
65
68
  ```
66
- 0 get-instructions which sections are on, and an index of what you can ask for
69
+ 0 get-instructions an index of what you can ask for
67
70
  get-instructions { fields: ["writingStyle", "codeLinks", "artifactFormat"] }
68
71
  the voice, how a code link is written, the
69
72
  artifact's shape and what a write is refused for
@@ -73,11 +76,11 @@ context, the answer is already in a call below.
73
76
  3 nodes { unfilled: true, needs: ["impact"] }
74
77
  update-nodes { segmentId, blast }
75
78
  what the change does to the files it did not touch
76
- 4 update-nodes { segmentId, order } the order the reviewer chose for the File Sections
79
+ 4 (no call) Flight Plan orders the File Sections itself
77
80
  5 update-nodes { segmentId, context, title }
78
81
  why the change matters, and a very short title for it
79
82
  6 nodes { unfilled: true } the next few pieces of work, code attached
80
- update-nodes { segmentId, waypoints | files | journey | journeyDescription }
83
+ update-nodes { segmentId, waypoints | traceDiagram | traceDiagramDescription }
81
84
  …repeat until only `context-description` is left
82
85
  7 nodes { unfilled: true, needs: ["context-description"] }
83
86
  update-nodes { segmentId, contextCodeBlocks }
@@ -87,14 +90,11 @@ context, the answer is already in a call below.
87
90
  ```
88
91
 
89
92
  **Step 0 is a read, and it comes before the prose.** `get-instructions` with no
90
- `fields` returns which of the Journey Flow Diagram, the Blast Diagram, the
91
- Code Walkthrough and the findings this review generates, and an index of the
92
- fields you can ask about. A section that is on you write as normal. A section
93
- that is off is not yours to write: the reviewer chose not to generate it, the
94
- artifact holds no structure for it, its fields are not in the index, and
95
- `read`, `get-instructions` and `update-nodes` refuse it and say so. Do not ask
96
- the reviewer about it. They generate it from the page when they want it, and
97
- Flight Plan then sends you a message that asks for that section alone.
93
+ `fields` returns an index of the fields you can ask about. Every review has a
94
+ Trace Diagram, a Blast Diagram and a Code Walkthrough. What you write is what
95
+ Flight Plan marked required: `nodes { unfilled: true }` and the overview's
96
+ `unwritten` list only required nodes, so a part with nothing required is not
97
+ yours to write. Do not ask the reviewer about it.
98
98
 
99
99
  The same call returns `requiresContextCodeBlocks`. Where it is `false`, the
100
100
  context code blocks are not yours to write either: their fields are not in the
@@ -107,14 +107,14 @@ written a word.
107
107
 
108
108
  ```
109
109
  before the first write { fields: ["writingStyle", "codeLinks", "artifactFormat"] }
110
- before step 3 { fields: ["blast", "blast.nodes.impactType", "blast.nodes.impactReason"] }
110
+ before step 3 { fields: ["blastDiagram", "blastDiagram.nodes.impactType", "blastDiagram.nodes.impactReason"] }
111
111
  before step 5 { fields: ["context", "title"] }
112
- before step 6 { fields: ["walkthrough.files", "walkthrough.files.title", "walkthrough.files.waypoints",
112
+ before step 6 { fields: ["walkthrough.files", "walkthrough.files.waypoints",
113
113
  "walkthrough.files.waypoints.title", "walkthrough.files.waypoints.reading"] }
114
- before a journey label { fields: ["journey", "journey.nodes.label", "journey.nodes.description",
115
- "journey.nodes.triggerLabels.label"] }
116
- before a journey description
117
- { fields: ["journey.description"] }
114
+ before a trace label { fields: ["traceDiagram", "traceDiagram.nodes.label", "traceDiagram.nodes.description",
115
+ "traceDiagram.nodes.triggerLabels.label"] }
116
+ before a trace description
117
+ { fields: ["traceDiagram.description"] }
118
118
  before a finding { fields: ["walkthrough.files.waypoints.findings"] }
119
119
  before step 7 { fields: ["contextCodeBlocks", "contextCodeBlocks.description"] }
120
120
  ```
@@ -172,7 +172,7 @@ Only where the overview shows a Blast Diagram.
172
172
  nodes { unfilled: true, needs: ["impact"] }
173
173
  → the files the change did not touch that import it, each with
174
174
  `importsCarryingTheChange`: the files it imports that bring the change to it
175
- update-nodes { segmentId, blast: [{ path, impactType, impactReason } | { path, impactType: "unaffected" }] }
175
+ update-nodes { segmentId, blastDiagram: [{ path, impactType, impactReason } | { path, impactType: "unaffected" }] }
176
176
  ```
177
177
 
178
178
  The Blast Diagram is the files the change is connected to through imports.
@@ -196,31 +196,19 @@ a case the author did not handle.
196
196
  the change, of which one breaks" is what the reviewer wants before they hear
197
197
  anything else. Send it with `send-message`.
198
198
 
199
- ## 4. Put the files in the reviewer's order
200
-
201
- The reviewer chose the order of the Code Walkthrough when they started the
202
- review, and the prompt carries it as a line that starts "Order the Code
203
- Walkthrough". Apply it:
204
-
205
- ```
206
- update-nodes { segmentId, order: { files: [every File Section's path, once] } }
207
- ```
208
-
209
- **Do not ask the reviewer how to order it when the prompt says.** If you were
210
- started by hand and the prompt names no order, ask with `ask-questions`, with
211
- these as the options and your proposal first: foundations first, along the
212
- path, core change first, risk first. Until an order is written the files are in
213
- path order, which is nobody's choice.
199
+ ## 4. Leave the order of the files to Flight Plan
214
200
 
215
- Risk first needs the waypoints read before it can be decided. Write the order
216
- again once you have read them.
201
+ Flight Plan sorts the File Sections of the Code Walkthrough itself: by the
202
+ import graph, from the bottom up or from the top down, or with the reviewer's
203
+ spotlight and the core changes first, as the reviewer chose. It sorts them again
204
+ when you mark a core change. Write no `order`, and do not ask the reviewer how
205
+ to order the walkthrough.
217
206
 
218
207
  ## 5. Write the context and the segment's title
219
208
 
220
209
  ```
221
210
  update-nodes { segmentId, context } the Context Section, as one string of Markdown
222
211
  update-nodes { segmentId, title } the segment's title, a very short text of that context
223
- update-nodes { segmentId, intro } one optional line that frames the tour
224
212
  ```
225
213
 
226
214
  One call can carry all of them. A context replaces the one that was there.
@@ -228,21 +216,20 @@ One call can carry all of them. A context replaces the one that was there.
228
216
  **Write the context first, then the title that sums it up.** A segment arrives
229
217
  with no title, and `complete` refuses an artifact where one is still missing.
230
218
 
231
- ## 6. Write the waypoints, the File Sections and the diagram labels
219
+ ## 6. Write the waypoints and the diagram labels
232
220
 
233
221
  ```
234
222
  nodes { unfilled: true, limit: 10 }
235
223
  → the next pieces of work, each with:
236
224
  segmentId the segment it belongs to, which the write names
237
- needs what to write: title, reading, file-title, segment-title, label, trigger-label,
238
- journey-description …
225
+ needs what to write: title, reading, segment-title, label, trigger-label,
226
+ trace-description …
239
227
  node what it holds now
240
228
  code the lines it covers, with what the change did to them
241
229
  lineage its ancestors, for a nested waypoint
242
230
  update-nodes { segmentId, waypoints: [{ id, title, reading }],
243
- files: [{ path, title, summary }],
244
- journey: [{ id, label, description, triggerLabels: [{ codeBlockId, label }] }],
245
- journeyDescription }
231
+ traceDiagram: [{ id, label, description, triggerLabels: [{ codeBlockId, label }] }],
232
+ traceDiagramDescription }
246
233
  nodes { unfilled: true } → total falls
247
234
  …until total is 0
248
235
  ```
@@ -271,16 +258,16 @@ the call names, a code link that does not resolve, a `question` carrying a
271
258
  solution. A batch is all or nothing. Fix the entry it names and send the batch
272
259
  again. Do not work around a refusal.
273
260
 
274
- **Every Journey Flow Diagram needs a description.** It is the diagram told in
261
+ **Every Trace Diagram needs a description.** It is the diagram told in
275
262
  words, in five sentences at most, and the reviewer reads it above the diagram.
276
- `nodes` hands it out as `journey-description`, after the nodes of its diagram,
263
+ `nodes` hands it out as `trace-description`, after the nodes of its diagram,
277
264
  with the diagram's nodes and edges. Write it with
278
- `update-nodes { segmentId, journeyDescription }` once the labels of that
265
+ `update-nodes { segmentId, traceDiagramDescription }` once the labels of that
279
266
  diagram are written, so it uses their words. `complete` refuses an artifact
280
267
  where a diagram has none.
281
268
 
282
- **Decide which waypoints carry `needsAttention`** from
283
- `get-instructions { fields: ["walkthrough.files.waypoints.needsAttention"] }`.
269
+ **Decide which waypoints carry `coreChange`** from
270
+ `get-instructions { fields: ["walkthrough.files.waypoints.coreChange"] }`.
284
271
  One to three in a pull request is usual.
285
272
 
286
273
  ### Findings
@@ -0,0 +1 @@
1
+ import{a8 as r}from"./index-DKnoo-kT.js";const e=r;export{e as errorComponent};
@@ -0,0 +1 @@
1
+ import{a9 as e,j as t,aa as o}from"./index-DKnoo-kT.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};
@@ -0,0 +1 @@
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-DKnoo-kT.js";import{T as H}from"./index-DfKNJbUM.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};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-BQaZ5gZR.js";import"./index-DKnoo-kT.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
1
+ import{g as u,F as d,M as r,r as p,i as c,j as e}from"./index-DKnoo-kT.js";import{u as m,S as h}from"./index-BZ6iL63Z.js";import{A as f,a as S}from"./index-0VAWT0gs.js";import{S as w}from"./index-BlTfCkr5.js";import"./index-V1avMli5.js";import"./index-BvuPClj3.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};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-BQaZ5gZR.js";import"./index-DKnoo-kT.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
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-DKnoo-kT.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};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-BQaZ5gZR.js";import"./index-DKnoo-kT.js";const n=r;export{n as errorComponent};
@@ -1 +1 @@
1
- import{u as t,j as e,B as n,q as r}from"./index-DfRj4oZV.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
+ import{u as t,j as e,B as n,x as r}from"./index-DKnoo-kT.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};
@@ -0,0 +1 @@
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-DKnoo-kT.js";import{S as v}from"./index-BlTfCkr5.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};
@@ -0,0 +1 @@
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-DKnoo-kT.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};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-BQaZ5gZR.js";import"./index-DKnoo-kT.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
1
+ import{g as i,F as a,N as n,j as e}from"./index-DKnoo-kT.js";import{u as g,S as c}from"./index-BZ6iL63Z.js";import{F as m}from"./index-iRAoFOv3.js";import{S as d}from"./index-BlTfCkr5.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};
@@ -0,0 +1 @@
1
+ import{r,j as e,T as R,B as m,Y as A,I as x,D as k,_ as L,a as P,b as F,c as W,d as G,e as B,$ as H,a0 as U,a1 as M,s as z,V as $,W as Y,C as K,X}from"./index-DKnoo-kT.js";import{I as Z}from"./index-V1avMli5.js";const V="Add pattern",q="**/*.stories.tsx",J=t=>`Path pattern ${String(t+1)}`,Q=(t,s,n)=>t.map((a,o)=>o===s?n:a),ee=(t,s)=>t.filter((n,a)=>a!==s),se=({pattern:t,position:s,problemMessage:n,onChange:a,onRemove:o})=>{const i=r.useId(),l=J(s);return e.jsxs("li",{className:"grid gap-1",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(A,{"aria-label":l,"aria-invalid":n!==null,"aria-describedby":n===null?void 0:i,value:t,placeholder:q,spellCheck:!1,autoComplete:"off",className:"font-mono",onChange:c=>{a(c.target.value)}}),e.jsx(x,{icon:"remove",label:`Remove ${t===""?l:t}`,onClick:o})]}),n===null?null:e.jsx("span",{id:i,className:"text-sm text-destructive",children:n})]})},te=({labelledBy:t,value:s,problem:n,onChange:a})=>{const o=r.useRef(null),i=r.useRef(!1);return r.useEffect(()=>{var l,c;i.current&&(i.current=!1,(c=(l=o.current)==null?void 0:l.querySelector("li:last-child input"))==null||c.focus())},[s.length]),e.jsxs("div",{className:"grid max-w-md gap-3",children:[e.jsx("ol",{ref:o,"aria-labelledby":t,className:"grid gap-2",children:R(s).map(({key:l,item:c},u)=>e.jsx(se,{pattern:c,position:u,problemMessage:(n==null?void 0:n.position)===u?n.message:null,onChange:g=>{a(Q(s,u,g))},onRemove:()=>{a(ee(s,u))}},l))}),e.jsx(m,{type:"button",variant:"outline",className:"w-fit",onClick:()=>{i.current=!0,a([...s,""])},children:V})]})},ne={context:"Context",traceDiagram:"Trace Diagram",blastDiagram:"Blast Diagram",walkthrough:"Code Walkthrough"},T=(t,s,n)=>{const a=s+n;return t.map((o,i)=>i===s?t[a]??o:i===a?t[s]??o:o)},ae=({labelledBy:t,value:s,onChange:n})=>e.jsx("ol",{"aria-labelledby":t,className:"grid max-w-md gap-1",children:s.map((a,o)=>{const i=ne[a];return e.jsxs("li",{className:"flex items-center gap-2 rounded-md border border-border px-2.5 py-1.5",children:[e.jsx("span",{className:"min-w-0 flex-1 font-semibold",children:i}),e.jsx(x,{icon:"previous",label:`Move ${i} up`,isDisabled:o===0,onClick:()=>{n(T(s,o,-1))}}),e.jsx(x,{icon:"next",label:`Move ${i} down`,isDisabled:o===s.length-1,onClick:()=>{n(T(s,o,1))}})]},a)})}),oe="flex h-9 cursor-pointer items-center gap-2 rounded-lg border border-input bg-card pr-3.5 pl-3 text-sm transition-colors duration-[180ms] ease-out select-none hover:bg-muted has-checked:border-foreground has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-ring",ie="size-4 shrink-0 cursor-pointer accent-(--primary) focus-visible:outline-none",w=({label:t,description:s,isChecked:n,onToggle:a})=>{const o=r.useId();return e.jsxs(e.Fragment,{children:[e.jsxs("label",{className:oe,children:[e.jsx("input",{type:"checkbox",checked:n,"aria-describedby":s===null?void 0:o,className:ie,onChange:a}),e.jsx("span",{className:"text-box-cap",children:t})]}),s===null?null:e.jsx("span",{id:o,className:"sr-only",children:s})]})},re=[{section:"context",label:"Context"},{section:"traceDiagram",label:"Trace Diagram"},{section:"blastDiagram",label:"Blast Diagram"},{section:"walkthrough",label:"Code Walkthrough"},{section:"findings",label:"Findings"}],le=t=>t==="always"?"on-demand":"always",ce=({labelledBy:t,value:s,onChange:n})=>e.jsx("div",{role:"group","aria-labelledby":t,children:e.jsx("ul",{className:"flex flex-wrap gap-2",children:re.map(({section:a,label:o})=>e.jsx("li",{children:e.jsx(w,{label:o,description:null,isChecked:s[a]==="always",onToggle:()=>{n({...s,[a]:le(s[a])})}})},a))})}),de="Show all topics",he="All topics",ue="Pick as many as you like. Each topic says which code it covers.",ge="Done",me="size-4 shrink-0 cursor-pointer accent-(--primary) focus-visible:outline-none",xe="grid cursor-pointer grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3 rounded-sm px-2 py-2.5 transition-colors duration-[180ms] ease-out hover:bg-muted has-focus-visible:outline-2 has-focus-visible:outline-offset-2 has-focus-visible:outline-ring",pe=t=>t.flatMap(s=>s.choices),fe=(t,s,n)=>{const a=s.includes(n);return t.map(o=>o.classification).filter(o=>o===n?!a:s.includes(o))},be=(t,s)=>t.map(n=>({...n,choices:n.choices.filter(a=>a.isFeatured||s.includes(a.classification))})).filter(n=>n.choices.length>0),je=({choice:t,isPicked:s,onToggle:n})=>{const a=r.useId();return e.jsx("li",{className:"border-b border-border",children:e.jsxs("label",{className:xe,children:[e.jsx("input",{type:"checkbox",checked:s,"aria-describedby":a,className:`mt-0.5 ${me}`,onChange:n}),e.jsx("span",{className:"min-w-0 font-bold",children:t.label}),e.jsx("span",{id:a,className:"col-start-2 text-muted-foreground",children:t.description})]})})},Ne=({group:t,picked:s,onToggle:n})=>{const a=r.useId();return e.jsxs("li",{role:"group","aria-labelledby":a,className:"grid items-start gap-x-4 gap-y-2 border-b border-border py-3 sm:grid-cols-[7.5rem_minmax(0,1fr)]",children:[e.jsx("span",{id:a,className:"text-sm font-bold sm:pt-2",children:t.label}),e.jsx("ul",{className:"flex flex-wrap gap-2",children:t.choices.map(o=>e.jsx("li",{children:e.jsx(w,{label:o.label,description:o.description,isChecked:s.includes(o.classification),onToggle:()=>{n(o.classification)}})},o.classification))})]})},Ie=({group:t,picked:s,onToggle:n})=>{const a=r.useId();return e.jsxs("section",{"aria-labelledby":a,children:[e.jsx("h4",{id:a,className:"border-b-2 border-foreground pb-2 font-bold",children:t.label}),e.jsx("ul",{className:"grid gap-x-6 sm:grid-cols-2",children:t.choices.map(o=>e.jsx(je,{choice:o,isPicked:s.includes(o.classification),onToggle:()=>{n(o.classification)}},o.classification))})]})},Te=({groups:t,picked:s,onToggle:n})=>e.jsxs(k,{children:[e.jsx(L,{render:e.jsx(m,{type:"button",variant:"outline"}),children:de}),e.jsxs(P,{className:"gap-5 sm:max-w-3xl",children:[e.jsxs(F,{children:[e.jsx(W,{children:he}),e.jsx(G,{children:ue})]}),e.jsx("div",{className:"-mr-2 grid max-h-[62dvh] gap-6 overflow-y-auto pr-2",children:t.map(a=>e.jsx(Ie,{group:a,picked:s,onToggle:n},a.label))}),e.jsx(B,{children:e.jsx(H,{render:e.jsx(m,{type:"button"}),children:ge})})]})]}),we=({labelledBy:t,groups:s,picked:n,onChange:a})=>{const o=i=>{a(fe(pe(s),n,i))};return e.jsxs("div",{role:"group","aria-labelledby":t,children:[e.jsx("ul",{className:"border-t border-border",children:be(s,n).map(i=>e.jsx(Ne,{group:i,picked:n,onToggle:o},i.label))}),e.jsx("div",{className:"pt-3",children:e.jsx(Te,{groups:s,picked:n,onToggle:o})})]})},Se="text-lg leading-7 font-semibold text-signal-text",Ce="mt-1 max-w-[62ch] pb-4 text-muted-foreground",ye="Which topics do you care about most in a code review?",Oe="Selecting a topic helps Flight Plan organize the changes based on what you think are the most important bits when reviewing a pull request, and makes it easier for you to navigate the changes.",Ee="Which parts should the agent write for you by default?",ve="Pick the sections you want the agent to write in every review. For anything else, you can ask it to explain just the code you want, right from the review.",_e="Which writing style should the agent use?",De="Each prompt configuration gives the agent a different way of writing, from short notes to explanations for someone new to the code. The structure of the review stays the same.",Re="You can fully customize the prompt instructions",Ae="You can make your own prompt configuration in Settings > Prompt configurations and rewrite how the agent words each part of the review, down to its writing style. You can also pick a different configuration each time you create a Flight Plan.",ke="Review organization",Le="Choose whether a review is split into segments.",Pe="Code Walkthrough order",Fe="Choose the order the Code Walkthrough takes you through the changed files.",We="Split reviews into segments",Ge="Flight Plan groups the changed files into segments, each with its own Context, Trace Diagram, Blast Diagram and Code Walkthrough. With segments off, a review is one segment with one Context for the whole change, and each Trace Diagram gets a tab of its own.",Be="Display arrangement",He="Choose the order of the four sections in each segment.",Ue="Ignored files",Me="Flight Plan leaves the files these patterns match out of every review. Write each pattern from the root of the repository, as in a .gitignore. To start with, the list leaves out tests in TypeScript and Python, e2e tests included.",ze="ignoredPaths",$e="Advanced options",Ye="Segments, section order and ignored files",Ke=t=>{var s;return((s=t==null?void 0:t.field)==null?void 0:s.owner)===ze?{position:Number(t.field.name),message:t.message}:null},h=({title:t,intro:s,children:n})=>{const a=r.useId();return e.jsxs("section",{"aria-labelledby":a,children:[e.jsx("h3",{id:a,className:Se,children:t}),e.jsx("p",{className:Ce,children:s}),n(a)]})},Xe=({isOpen:t,onOpenChange:s,children:n})=>e.jsxs($,{open:t,onOpenChange:s,className:"border-t border-border",children:[e.jsxs(Y,{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-[180ms] ease-out outline-none hover:bg-muted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-lg leading-7 font-bold",children:$e}),e.jsx("span",{className:"block text-sm text-muted-foreground",children:Ye})]}),e.jsx(K,{"aria-hidden":"true",className:"size-5 shrink-0 text-muted-foreground transition-transform duration-[180ms] ease-out group-data-[panel-open]:rotate-180"})]}),e.jsx(X,{className:"grid gap-10 pt-6",children:n})]}),Ze=({isSegmented:t,onChange:s})=>{const n=r.useId();return e.jsxs("label",{className:"grid cursor-pointer grid-cols-[auto_minmax(0,1fr)] items-start gap-x-3",children:[e.jsx("input",{type:"checkbox",checked:t,"aria-describedby":n,className:"mt-1 size-4 shrink-0 accent-(--primary)",onChange:a=>{s(a.target.checked)}}),e.jsx("span",{className:"font-bold",children:We}),e.jsx("span",{id:n,className:"col-start-2 max-w-[62ch] text-sm text-muted-foreground",children:Ge})]})},Je=({presets:t,selectedConfigurationId:s,preferences:n,spotlightGroups:a,problem:o,children:i,onSubmit:l})=>{const[c,u]=r.useState(s),[g,S]=r.useState(n.spotlight),[p,C]=r.useState(n.sectionWriteUps),[f,y]=r.useState(n.isSegmented),[b,O]=r.useState(n.walkthroughOrder),[j,E]=r.useState(n.sectionOrder),[N,v]=r.useState(n.ignoredPaths),[_,D]=r.useState(!1),I=Ke(o);return e.jsxs("form",{className:"grid gap-10",onSubmit:z(()=>{l({configurationId:c,preferences:{spotlight:g,sectionWriteUps:p,isSegmented:f,walkthroughOrder:b,sectionOrder:j,ignoredPaths:N}})}),children:[e.jsx(h,{title:ye,intro:Oe,children:d=>e.jsx(we,{labelledBy:d,groups:a,picked:g,onChange:S})}),e.jsx(h,{title:Ee,intro:ve,children:d=>e.jsx(ce,{labelledBy:d,value:p,onChange:C})}),e.jsx(h,{title:_e,intro:De,children:()=>e.jsxs(e.Fragment,{children:[e.jsx(U,{options:t,value:c,onChange:u}),e.jsx(Z,{title:Re,className:"mt-4 max-w-xl",children:Ae})]})}),e.jsx(h,{title:Pe,intro:Fe,children:()=>e.jsx(M,{value:b,onChange:O})}),e.jsxs(Xe,{isOpen:_||I!==null,onOpenChange:D,children:[e.jsx(h,{title:ke,intro:Le,children:()=>e.jsx(Ze,{isSegmented:f,onChange:y})}),e.jsx(h,{title:Be,intro:He,children:d=>e.jsx(ae,{labelledBy:d,value:j,onChange:E})}),e.jsx(h,{title:Ue,intro:Me,children:d=>e.jsx(te,{labelledBy:d,value:N,problem:I,onChange:v})})]}),e.jsx("div",{children:i})]})};export{Je as R};
@@ -0,0 +1 @@
1
+ import{j as e,V as $,W as H,C as M,X as G,r,z as B,Y as W,B as Y,Z as U}from"./index-DKnoo-kT.js";import{I as z}from"./index-V1avMli5.js";import{F as q}from"./index-BvuPClj3.js";const V="How does Flight Plan interact with the agent?",X="What Flight Plan builds and what your agent writes",Z="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.",J="What Flight Plan does",K="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.",Q="What the agent does",ee="How your agent starts",se="rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[0.875em]",ae="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.",S=({heading:a,text:o})=>e.jsxs("section",{children:[e.jsx("h3",{className:"font-bold",children:a}),e.jsx("p",{className:"mt-1 text-muted-foreground",children:o})]}),te=()=>e.jsxs(z,{title:ee,children:["Flight Plan can open your terminal app and start your agent there. Or you can start it yourself by prompting your agent with"," ",e.jsx("code",{className:se,children:"/flightplan:live <repository>/<target>"}),"."]}),ge=()=>e.jsxs($,{children:[e.jsxs(H,{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:[e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-lg leading-7 font-bold",children:V}),e.jsx("span",{className:"block text-sm text-muted-foreground",children:X})]}),e.jsx(M,{"aria-hidden":"true",className:"size-5 shrink-0 text-muted-foreground transition-transform duration-180 ease-out group-data-panel-open:rotate-180"})]}),e.jsxs(G,{className:"grid max-w-[62ch] gap-5 pb-2",children:[e.jsx("p",{children:Z}),e.jsx(S,{heading:J,text:K}),e.jsx(S,{heading:Q,text:ae}),e.jsx(te,{})]})]}),ne=({label:a,options:o,value:t,className:g,onChange:u})=>{const f=r.useId();return e.jsxs("fieldset",{className:B("grid gap-1.5",g),children:[e.jsx("legend",{className:"float-left text-sm font-bold",children:a}),e.jsx("span",{className:"clear-left inline-flex w-fit overflow-hidden rounded-lg border border-input bg-card",children:o.map(l=>e.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:[e.jsx("input",{type:"radio",name:f,className:"sr-only",checked:t===l.value,onChange:()=>{u(l.value)}}),e.jsx("span",{className:"text-box-cap",children:l.label})]},l.value))})]})},D="size-4 shrink-0 accent-(--primary)",le="Open folders until you reach the one to install into, then use it.",O="model",T="effort",re=[O,T],oe=()=>{},ie=({option:a,model:o,effort:t,modelErrorMessage:g,effortErrorMessage:u,onModelChange:f,onEffortChange:l})=>{const i=a.modelOptions.find(n=>n.model===o);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap items-start gap-x-6 gap-y-3 pt-3",children:[e.jsx(U,{label:`Model for ${a.label}`,options:a.modelOptions.map(n=>({value:n.model,label:n.label})),value:o,errorMessage:g,className:"w-60",onChange:n=>{const m=a.modelOptions.find(x=>x.model===n);m!==void 0&&f(m)}}),(i==null?void 0:i.hasEffortChoice)===!0?e.jsx(ne,{label:`Effort for ${a.label}`,options:i.effortOptions.map(n=>({value:n.effort,label:n.label})),value:t,onChange:l}):null]}),u===null?null:e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:u})]})},ce=({option:a,groupName:o,isPicked:t,isDefault:g,installPath:u,model:f,effort:l,pathErrorMessage:i,modelErrorMessage:n,effortErrorMessage:m,onPickedChange:x,onDefaultChange:E,onInstallPathChange:N,onModelChange:y,onEffortChange:C,onBrowse:A})=>{const p=r.useId(),b=r.useId(),v=r.useId(),w=i!==null,c=a.unavailableReason===null;return e.jsxs("li",{className:"border-b border-border py-3",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsxs("label",{className:B("flex min-w-0 flex-1 items-start gap-3",c?"cursor-pointer":""),children:[e.jsx("input",{type:"checkbox",checked:t,disabled:!c,className:`${D} mt-0.5`,onChange:j=>{x(j.target.checked)}}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"font-bold",children:a.label}),a.unavailableReason===null?null:e.jsxs("span",{className:"block max-w-[62ch] text-sm text-destructive",children:[e.jsx("span",{className:"font-bold",children:"Unavailable."}),` ${a.unavailableReason}`]})]})]}),e.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:[e.jsx("input",{type:"radio",name:o,checked:g,disabled:!t,className:D,onChange:E}),e.jsx("span",{"aria-hidden":"true",className:"text-box-cap",children:"Default"}),e.jsx("span",{className:"sr-only",children:`Default agent: ${a.label}`})]})]}),t?e.jsxs("div",{className:"mt-3 grid gap-1.5 pl-7",children:[e.jsx("label",{htmlFor:p,className:"text-sm font-bold",children:`Install folder for ${a.label}`}),e.jsx("p",{id:b,className:"text-sm text-muted-foreground",children:a.pathHint}),e.jsxs("div",{className:"flex max-w-xl items-center gap-2",children:[e.jsx(W,{id:p,value:u,autoComplete:"off",spellCheck:!1,"aria-invalid":w,"aria-describedby":w?`${b} ${v}`:b,className:"min-w-0 flex-1 font-mono",onChange:j=>{N(j.target.value)}}),e.jsx(Y,{type:"button",variant:"outline","aria-label":`Browse for the ${a.label} install folder`,onClick:A,children:"Browse"})]}),w?e.jsx("p",{id:v,role:"alert",className:"text-sm text-destructive",children:i}):null,e.jsx(ie,{option:a,model:f,effort:l,modelErrorMessage:n,effortErrorMessage:m,onModelChange:y,onEffortChange:C})]}):null]})},fe=({agents:a,defaultAgent:o,problem:t,children:g,folderBrowser:u,folderBrowserErrorMessage:f,onBrowseFolder:l,onBrowseEnd:i,onSubmit:n})=>{const m=r.useId(),[x,E]=r.useState(()=>Object.fromEntries(a.map(s=>[s.agent,s.isPicked]))),[N,y]=r.useState(()=>Object.fromEntries(a.map(s=>[s.agent,s.installPath]))),[C,A]=r.useState(()=>Object.fromEntries(a.map(s=>[s.agent,s.model]))),[p,b]=r.useState(()=>Object.fromEntries(a.map(s=>[s.agent,s.effort]))),[v,w]=r.useState(o),[c,j]=r.useState(null),R=s=>{j(s),l(N[s.agent]??"")},k=()=>{j(null),i()},L=s=>{c!==null&&y(I=>({...I,[c.agent]:s})),k()},_=()=>{n({agents:a.map(s=>({agent:s.agent,isPicked:x[s.agent]??!1,installPath:N[s.agent]??"",model:C[s.agent]??s.model,effort:p[s.agent]??s.effort})),defaultAgent:v})};return e.jsxs("form",{onSubmit:s=>{s.preventDefault(),_()},children:[e.jsx("ul",{className:"border-t border-border",children:a.map(s=>{var I,P,F;return e.jsx(ce,{option:s,groupName:m,isPicked:x[s.agent]??!1,isDefault:v===s.agent,installPath:N[s.agent]??"",model:C[s.agent]??s.model,effort:p[s.agent]??s.effort,pathErrorMessage:((I=t==null?void 0:t.field)==null?void 0:I.owner)===s.agent&&!re.includes(t.field.name)?t.message:null,modelErrorMessage:((P=t==null?void 0:t.field)==null?void 0:P.owner)===s.agent&&t.field.name===O?t.message:null,effortErrorMessage:((F=t==null?void 0:t.field)==null?void 0:F.owner)===s.agent&&t.field.name===T?t.message:null,onPickedChange:h=>{E(d=>({...d,[s.agent]:h}))},onDefaultChange:()=>{w(s.agent)},onInstallPathChange:h=>{y(d=>({...d,[s.agent]:h}))},onModelChange:h=>{A(d=>({...d,[s.agent]:h.model})),b(d=>({...d,[s.agent]:h.selectedEffort}))},onEffortChange:h=>{b(d=>({...d,[s.agent]:h}))},onBrowse:()=>{R(s)}},s.agent)})}),g,e.jsx(q,{isOpen:c!==null,title:`Install folder for ${(c==null?void 0:c.label)??""}`,description:le,browser:u,errorMessage:f,onOpenFolder:l,onChooseRepository:oe,onChooseFolder:L,onClose:k})]})};export{fe as A,ge as a};
@@ -0,0 +1 @@
1
+ import{g as S,h as y,k as I,r as a,j as e,Y as A,B as p,s as k}from"./index-DKnoo-kT.js";import{T as N}from"./index-DfKNJbUM.js";const w=(d,{segmentId:h,waypointId:g},u)=>{var n,i;const t=S(),l=y(),s=I(t.review.editWalkthrough.mutationOptions({onSuccess:async r=>{r.kind==="saved"&&(await l.invalidateQueries(t.review.get.pathFilter()),u())}})),c=((n=s.data)==null?void 0:n.kind)==="rejected"?s.data.message:null;return{isSaving:s.isPending,errorMessage:c??((i=s.error)==null?void 0:i.message)??null,onSave:r=>{s.mutate({...d,segmentId:h,edit:{kind:"change-waypoint",waypointId:g,...r}})}}},R="Title",j="Reading",_="Say what you changed in this code and what the change is for.",L="Core change",M="Mark this change as an important part of the code review. This helps the reviewer see where to look first.",v="Additional context (optional)",O="Say why this change is important, or what the reviewer should check in it.",W=({reviewKey:d,segmentId:h,waypointId:g,legend:u,text:t,renderCodeLinkDialog:l,onClose:s})=>{const c=a.useId(),n=a.useId(),[i,r]=a.useState(t.title),[C,T]=a.useState(t.reading),[m,f]=a.useState(t.coreChange!==null),[E,b]=a.useState(t.coreChange??""),o=w(d,{segmentId:h,waypointId:g},s);return e.jsxs("form",{"aria-label":u,onSubmit:k(()=>{o.onSave({title:i,reading:C,coreChange:m?E:null})}),className:"grid gap-3",children:[e.jsxs("div",{className:"grid gap-1.5",children:[e.jsx("label",{htmlFor:c,className:"text-sm font-bold",children:R}),e.jsx(A,{id:c,value:i,onChange:x=>{r(x.target.value)}})]}),e.jsxs("div",{className:"grid gap-1.5",children:[e.jsx("p",{"aria-hidden":"true",className:"text-sm font-bold",children:j}),e.jsx("p",{className:"text-sm text-muted-foreground",children:_}),e.jsx(N,{label:j,value:t.reading,errorMessage:null,renderCodeLinkDialog:l,onChange:T})]}),e.jsxs("label",{className:"flex items-center gap-2 text-sm font-bold",children:[e.jsx("input",{type:"checkbox","aria-describedby":n,checked:m,onChange:x=>{f(x.target.checked)}}),L]}),e.jsx("p",{id:n,className:"-mt-2 text-sm text-muted-foreground",children:M}),e.jsxs("div",{hidden:!m,className:"grid gap-1.5",children:[e.jsx("p",{"aria-hidden":"true",className:"text-sm font-bold",children:v}),e.jsx("p",{className:"text-sm text-muted-foreground",children:O}),e.jsx(N,{label:v,value:t.coreChange??"",errorMessage:null,renderCodeLinkDialog:l,onChange:b})]}),o.errorMessage===null?null:e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:o.errorMessage}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(p,{type:"button",variant:"ghost",onClick:s,children:"Cancel"}),e.jsx(p,{type:"submit",disabled:o.isSaving,children:o.isSaving?"Saving…":"Save"})]})]})};export{W as default};
@@ -1 +1 @@
1
- import{u as n,j as t,B as a}from"./index-DfRj4oZV.js";const o="The backend did not say what went wrong.",i=({error:e})=>{const s=n();return t.jsxs("section",{role:"alert",className:"max-w-prose",children:[t.jsx("h2",{className:"text-2xl leading-8 font-bold tracking-[-0.015em]",children:"Could not load the settings"}),t.jsx("p",{className:"mt-2 text-muted-foreground",children:e instanceof Error?e.message:o}),t.jsx(a,{className:"mt-4",onClick:()=>{s.invalidate()},children:"Try again"})]})};export{i as S};
1
+ import{u as n,j as t,B as a}from"./index-DKnoo-kT.js";const o="The backend did not say what went wrong.",i=({error:e})=>{const s=n();return t.jsxs("section",{role:"alert",className:"max-w-prose",children:[t.jsx("h2",{className:"text-2xl leading-8 font-bold tracking-[-0.015em]",children:"Could not load the settings"}),t.jsx("p",{className:"mt-2 text-muted-foreground",children:e instanceof Error?e.message:o}),t.jsx(a,{className:"mt-4",onClick:()=>{s.invalidate()},children:"Try again"})]})};export{i as S};
@@ -1 +1 @@
1
- import{g as u,h as c,k as d,j as a,B as m}from"./index-DfRj4oZV.js";const v=()=>{var r,l;const s=u(),t=c(),e=d(s.settings.save.mutationOptions({onSuccess:async o=>{o.kind!=="rejected"&&(t.removeQueries({type:"inactive"}),await t.invalidateQueries(s.settings.pathFilter()))}})),i=((r=e.data)==null?void 0:r.kind)==="rejected"?e.data:null,n=e.error===null?i:{message:e.error.message,field:null};return{problem:n,errorMessage:n!==null&&n.field===null?n.message:null,savedMessage:((l=e.data)==null?void 0:l.kind)==="saved"?e.data.message:null,isPending:e.isPending,save:e.mutate}},g="Save",p="Saving…",j=({isPending:s,errorMessage:t,savedMessage:e})=>a.jsxs("footer",{className:"mt-6 border-t border-border pt-4",children:[t===null?null:a.jsx("p",{role:"alert",className:"pb-3 text-sm text-destructive",children:t}),a.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-2",children:[a.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:s?null:e}),a.jsx(m,{type:"submit",disabled:s,children:s?p:g})]})]});export{j as S,v as u};
1
+ import{g as u,h as c,k as d,j as a,B as m}from"./index-DKnoo-kT.js";const v=()=>{var r,l;const s=u(),t=c(),e=d(s.settings.save.mutationOptions({onSuccess:async o=>{o.kind!=="rejected"&&(t.removeQueries({type:"inactive"}),await t.invalidateQueries(s.settings.pathFilter()))}})),i=((r=e.data)==null?void 0:r.kind)==="rejected"?e.data:null,n=e.error===null?i:{message:e.error.message,field:null};return{problem:n,errorMessage:n!==null&&n.field===null?n.message:null,savedMessage:((l=e.data)==null?void 0:l.kind)==="saved"?e.data.message:null,isPending:e.isPending,save:e.mutate}},g="Save",p="Saving…",j=({isPending:s,errorMessage:t,savedMessage:e})=>a.jsxs("footer",{className:"mt-6 border-t border-border pt-4",children:[t===null?null:a.jsx("p",{role:"alert",className:"pb-3 text-sm text-destructive",children:t}),a.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-2",children:[a.jsx("p",{role:"status",className:"text-sm text-muted-foreground",children:s?null:e}),a.jsx(m,{type:"submit",disabled:s,children:s?p:g})]})]});export{j as S,v as u};
@@ -0,0 +1 @@
1
+ import{g as j,h as S,k as y,r as v,j as a,Z as b,B as h,s as R}from"./index-DKnoo-kT.js";import{T as M}from"./index-DfKNJbUM.js";const T=(u,d,t)=>{var r,c;const e=j(),p=S(),s=y(e.review.editBlast.mutationOptions({onSuccess:async n=>{n.kind==="saved"&&(await p.invalidateQueries(e.review.get.pathFilter()),t())}})),i=((r=s.data)==null?void 0:r.kind)==="rejected"?s.data.message:null;return{isSaving:s.isPending,errorMessage:i??((c=s.error)==null?void 0:c.message)??null,onSave:n=>{s.mutate({...u,path:d,...n})}}},C=({reviewKey:u,path:d,assessment:t,form:e,renderCodeLinkDialog:p,onClose:s})=>{const[i,r]=v.useState(t.impactType),[c,n]=v.useState(t.impactReason),o=T(u,d,s),g=e.choices.some(l=>l.value===i&&l.hasReason);return a.jsxs("form",{onSubmit:R(()=>{o.onSave({impactType:i,impactReason:c})}),className:"grid gap-3",children:[a.jsx(b,{label:e.impactTypeLabel,options:e.choices,value:i,errorMessage:g?null:o.errorMessage,onChange:l=>{const m=e.choices.find(x=>x.value===l);m!==void 0&&r(m.value)}}),a.jsx("div",{hidden:!g,children:a.jsx(M,{label:e.impactReasonLabel,value:t.impactReason,errorMessage:g?o.errorMessage:null,renderCodeLinkDialog:p,onChange:n})}),a.jsxs("div",{className:"flex justify-end gap-2",children:[a.jsx(h,{type:"button",variant:"ghost",onClick:s,children:"Cancel"}),a.jsx(h,{type:"submit",disabled:o.isSaving,children:o.isSaving?"Saving…":"Save"})]})]})};export{C as default};
@@ -1 +1 @@
1
- import{j as t}from"./index-DfRj4oZV.js";const x=({title:e,children:s})=>t.jsxs("header",{className:"pb-6",children:[t.jsx("h2",{className:"text-2xl leading-8 font-bold tracking-[-0.015em] text-signal-text",children:e}),t.jsx("p",{className:"mt-2 max-w-[62ch] text-muted-foreground",children:s})]});export{x as S};
1
+ import{j as t}from"./index-DKnoo-kT.js";const x=({title:e,children:s})=>t.jsxs("header",{className:"pb-6",children:[t.jsx("h2",{className:"text-2xl leading-8 font-bold tracking-[-0.015em] text-signal-text",children:e}),t.jsx("p",{className:"mt-2 max-w-[62ch] text-muted-foreground",children:s})]});export{x as S};
@@ -1 +1 @@
1
- import{j as e,D as p,a as h,b as m,c as u,d as j,e as g,B as l,t as f}from"./index-DfRj4oZV.js";const N={repository:"font-bold","added-repository":"text-muted-foreground",folder:""},b=({folder:t,onOpenFolder:a,onChooseRepository:s})=>t.kind==="added-repository"?null:t.kind==="repository"?e.jsx(l,{type:"button",size:"sm","aria-label":`Choose ${t.name}`,onClick:()=>{s(t.path)},children:"Choose"}):e.jsx(l,{type:"button",variant:"outline",size:"sm","aria-label":`Open ${t.name}`,onClick:()=>{a(t.path)},children:"Open"}),y=({browser:t,onOpenFolder:a,onChooseRepository:s})=>e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("p",{className:"min-w-0 flex-1 font-mono text-[0.82rem] wrap-anywhere",children:t.path}),t.parentPath===null?null:e.jsx(l,{type:"button",variant:"outline",size:"sm",onClick:()=>{t.parentPath!==null&&a(t.parentPath)},children:"Up one folder"})]}),t.message===null?e.jsx("ul",{className:"max-h-[calc(20rem+1px)] overflow-y-auto border-t border-border",children:t.folders.map(n=>e.jsxs("li",{className:"flex h-10 items-center gap-3 border-b border-border",children:[e.jsx("span",{className:f("min-w-0 flex-1 truncate",N[n.kind]),children:n.name}),e.jsx("span",{className:"text-muted-foreground",children:n.kindLabel}),e.jsx(b,{folder:n,onOpenFolder:a,onChooseRepository:s})]},n.path))}):e.jsx("p",{className:"border-t border-border pt-3 text-muted-foreground",children:t.message})]}),k=({isOpen:t,title:a,description:s,browser:n,errorMessage:i,onOpenFolder:o,onChooseRepository:d,onChooseFolder:r,onClose:c})=>e.jsx(p,{open:t,onOpenChange:x=>{x||c()},children:e.jsxs(h,{children:[e.jsxs(m,{children:[e.jsx(u,{children:a}),e.jsx(j,{children:s})]}),n===null?e.jsx("p",{role:"status",className:"text-muted-foreground",children:"Reading the folder…"}):e.jsx(y,{browser:n,onOpenFolder:o,onChooseRepository:d}),i===null?null:e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:i}),n===null||r===null?null:e.jsx(g,{children:e.jsx(l,{type:"button",onClick:()=>{r(n.path)},children:"Use this folder"})})]})});export{k as F};
1
+ import{j as e,D as p,a as h,b as m,c as u,d as j,e as g,B as l,z as f}from"./index-DKnoo-kT.js";const N={repository:"font-bold","added-repository":"text-muted-foreground",folder:""},b=({folder:t,onOpenFolder:a,onChooseRepository:s})=>t.kind==="added-repository"?null:t.kind==="repository"?e.jsx(l,{type:"button",size:"sm","aria-label":`Choose ${t.name}`,onClick:()=>{s(t.path)},children:"Choose"}):e.jsx(l,{type:"button",variant:"outline",size:"sm","aria-label":`Open ${t.name}`,onClick:()=>{a(t.path)},children:"Open"}),y=({browser:t,onOpenFolder:a,onChooseRepository:s})=>e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("p",{className:"min-w-0 flex-1 font-mono text-[0.82rem] wrap-anywhere",children:t.path}),t.parentPath===null?null:e.jsx(l,{type:"button",variant:"outline",size:"sm",onClick:()=>{t.parentPath!==null&&a(t.parentPath)},children:"Up one folder"})]}),t.message===null?e.jsx("ul",{className:"max-h-[calc(20rem+1px)] overflow-y-auto border-t border-border",children:t.folders.map(n=>e.jsxs("li",{className:"flex h-10 items-center gap-3 border-b border-border",children:[e.jsx("span",{className:f("min-w-0 flex-1 truncate",N[n.kind]),children:n.name}),e.jsx("span",{className:"text-muted-foreground",children:n.kindLabel}),e.jsx(b,{folder:n,onOpenFolder:a,onChooseRepository:s})]},n.path))}):e.jsx("p",{className:"border-t border-border pt-3 text-muted-foreground",children:t.message})]}),k=({isOpen:t,title:a,description:s,browser:n,errorMessage:i,onOpenFolder:o,onChooseRepository:d,onChooseFolder:r,onClose:c})=>e.jsx(p,{open:t,onOpenChange:x=>{x||c()},children:e.jsxs(h,{children:[e.jsxs(m,{children:[e.jsx(u,{children:a}),e.jsx(j,{children:s})]}),n===null?e.jsx("p",{role:"status",className:"text-muted-foreground",children:"Reading the folder…"}):e.jsx(y,{browser:n,onOpenFolder:o,onChooseRepository:d}),i===null?null:e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:i}),n===null||r===null?null:e.jsx(g,{children:e.jsx(l,{type:"button",onClick:()=>{r(n.path)},children:"Use this folder"})})]})});export{k as F};
@@ -0,0 +1 @@
1
+ import{S as r}from"./index-BQaZ5gZR.js";import"./index-DKnoo-kT.js";const n=r;export{n as errorComponent};
@@ -0,0 +1 @@
1
+ import{j as e,x as b,L as v,B as y,g as I,h as k,ab as C,F as E,k as f,r as L,v as P}from"./index-DKnoo-kT.js";import{S}from"./index-BlTfCkr5.js";const D="-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",w=({title:i,rows:r,emptyMessage:l,defaultChoice:a,isDuplicating:o,onDuplicate:n})=>e.jsxs("section",{className:"border-t-2 border-foreground pt-5 pb-6",children:[e.jsx("h3",{className:"pb-2 text-xl leading-7 font-bold",children:i}),l===null?null:e.jsx("p",{className:"max-w-[62ch] text-sm text-muted-foreground",children:l}),e.jsx("ul",{children:r.map(t=>e.jsxs("li",{className:"flex items-center gap-4 border-b border-border first:border-t",children:[e.jsxs(b,{to:"/settings/profiles/$id",params:{id:t.id},className:D,children:[e.jsx("span",{className:"font-bold underline decoration-input decoration-1 underline-offset-[0.3em]",children:t.name}),t.summary===null?null:e.jsx("span",{className:"block max-w-[62ch] text-sm",children:t.summary}),e.jsx(v,{segments:t.details,className:"text-sm text-muted-foreground"})]}),e.jsxs("label",{className:"flex shrink-0 cursor-pointer items-center gap-2 text-sm has-disabled:cursor-default has-disabled:text-muted-foreground",children:[e.jsx("input",{type:"radio",name:a.groupName,checked:a.chosenId===t.id,disabled:a.isPending,className:"size-4 shrink-0 accent-primary",onChange:()=>{a.onChoose(t.id)}}),e.jsx("span",{"aria-hidden":"true",className:"text-box-cap",children:a.label}),e.jsx("span",{className:"sr-only",children:t.defaultChoiceLabel})]}),e.jsx(y,{type:"button",variant:"outline",size:"sm","aria-label":t.duplicateName,disabled:o,onClick:()=>{n(t.id)},children:t.duplicateLabel})]},t.id))})]}),F="Prompt configurations • Settings • Flight Plan",T="Prompt configurations",O="New configuration",R=()=>{var m,p,g,h,x;const i=I(),r=k(),l=C(),{data:a}=E(i.configuration.list.queryOptions()),o=f(i.configuration.create.mutationOptions({onSuccess:async s=>{s.kind!=="rejected"&&(await r.invalidateQueries(i.configuration.pathFilter()),await l({to:"/settings/profiles/$id",params:{id:s.id}}))}})),n=f(i.settings.save.mutationOptions({onSuccess:async()=>{r.removeQueries({...i.settings.pathFilter(),type:"inactive"}),await r.invalidateQueries(i.configuration.pathFilter())}})),t=L.useId(),d=((m=o.data)==null?void 0:m.kind)==="rejected"?o.data.message:((p=o.error)==null?void 0:p.message)??null,u=((g=n.data)==null?void 0:g.kind)==="rejected"?n.data.message:((h=n.error)==null?void 0:h.message)??null,j=((x=a.groups.flatMap(s=>s.rows).find(s=>s.isDefault))==null?void 0:x.id)??"",N=(n.isPending&&n.variables.section==="configuration"?n.variables.configurationId:null)??j;return e.jsxs(e.Fragment,{children:[e.jsx("title",{children:F}),e.jsx(S,{title:T,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.jsx("div",{className:"pb-6",children:e.jsx(b,{to:"/settings/profiles/create",className:P(),children:O})}),d===null?null:e.jsx("p",{role:"alert",className:"pb-4 text-sm text-destructive",children:d}),u===null?null:e.jsx("p",{role:"alert",className:"pb-4 text-sm text-destructive",children:u}),a.groups.map(s=>e.jsx(w,{title:s.title,rows:s.rows,emptyMessage:s.emptyMessage,defaultChoice:{groupName:t,label:a.defaultChoiceHeading,chosenId:N,isPending:n.isPending,onChoose:c=>{n.mutate({section:"configuration",configurationId:c})}},isDuplicating:o.isPending,onDuplicate:c=>{o.mutate({name:null,sourceId:c})}},s.title))]})};export{R as component};
@@ -0,0 +1 @@
1
+ import{j as e,x as Q,v as J,B as K,w as W,z,T as X,L as Y,g as F,h as Z,U as V,r as N,G as ee,F as se,k as b,J as te,K as ne,i as k,l as $}from"./index-DKnoo-kT.js";import{P as oe}from"./index-CqVakH8R.js";import{u as re,a as ae,A as ie}from"./index-Dv5cF6qF.js";import{R as le,t as ce}from"./index-DG0FDX8u.js";import{A as ue,a as de}from"./index-0VAWT0gs.js";import{R as pe}from"./index--nj01XKS.js";import{F as me}from"./index-iRAoFOv3.js";import"./index-BvuPClj3.js";import"./index-V1avMli5.js";const ge="Back",he="Skip for now",R=({backStep:s,submitLabel:t,pendingLabel:a,isPending:i,isReady:c=!0,hint:r=null,errorMessage:u,onSkip:n=null})=>e.jsxs("footer",{className:"mt-6 border-t border-border pt-4",children:[u===null?null:e.jsx("p",{role:"alert",className:"pb-3 text-sm text-destructive",children:u}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[s===null?null:e.jsx(Q,{to:"/setup",search:{step:s},className:J({variant:"ghost"}),children:e.jsx("span",{className:"text-box-cap",children:ge})}),e.jsx("span",{className:"flex-1"}),r===null?null:e.jsx("p",{className:"text-sm text-muted-foreground",children:r}),n===null?null:e.jsx(K,{type:"button",variant:"outline",disabled:i,onClick:n,children:he}),e.jsx(K,{type:"submit",disabled:i||!c,children:i?a:t})]})]}),T=({title:s,children:t})=>e.jsxs("header",{className:"pb-6",children:[e.jsx("h2",{className:"text-2xl leading-8 font-bold tracking-[-0.015em] text-signal-text",children:s}),e.jsx("p",{className:"mt-2 max-w-[62ch] text-muted-foreground",children:t})]}),xe="Agent integration",fe=({backStep:s,problem:t,isPending:a,...i})=>e.jsxs(e.Fragment,{children:[e.jsx(T,{title:xe,children:"Configure which agent you prefer and where Flight Plan installs the agent plugin and the MCP server."}),e.jsxs(ue,{...i,problem:t,children:[e.jsx(de,{}),e.jsx(R,{backStep:s,submitLabel:"Save and continue",pendingLabel:"Saving…",isPending:a,errorMessage:t!==null&&t.field===null?t.message:null})]})]}),Se=({presets:s,selectedConfigurationId:t,preferences:a,spotlightGroups:i,backStep:c,problem:r,isPending:u,onSubmit:n})=>e.jsx(pe,{presets:s,selectedConfigurationId:t,preferences:a,spotlightGroups:i,problem:r,onSubmit:n,children:e.jsx(R,{backStep:c,submitLabel:"Finish setup",pendingLabel:"Finishing…",isPending:u,errorMessage:r!==null&&r.field===null?r.message:null})}),je="Git integration",ye=({backStep:s,problem:t,isPending:a,onSkip:i,...c})=>e.jsxs(e.Fragment,{children:[e.jsxs(T,{title:je,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(me,{...c,problem:t,children:e.jsx(R,{backStep:s,submitLabel:"Save and continue",pendingLabel:"Saving…",isPending:a,errorMessage:t!==null&&t.field===null?t.message:null,onSkip:i})})]}),be="Select your repositories",ve=({isReadyToContinue:s,continueHint:t,backStep:a,errorMessage:i,isPending:c,onContinue:r,...u})=>e.jsxs("form",{onSubmit:n=>{n.preventDefault(),r()},children:[e.jsx(T,{title:be,children:"Choose the repositories you review. Flight Plan shows their pull requests and branches on your home page."}),e.jsx(le,{...u}),e.jsx(R,{backStep:a,submitLabel:"Save and continue",pendingLabel:"Saving…",isPending:c,isReady:s,hint:t,errorMessage:i})]}),Ne="Setup steps",Ae={saved:"merged",current:"no-review",upcoming:"draft"},we={saved:"text-signal-text",current:"font-bold text-signal-text",upcoming:"text-muted-foreground"},Re=({stop:s})=>s.state==="current"?e.jsx("span",{"aria-current":"step",children:s.label}):s.isReachable?e.jsx(Q,{to:"/setup",search:{step:s.step},className:"rounded-sm underline decoration-input underline-offset-4 hover:decoration-foreground",children:s.label}):e.jsx("span",{children:s.label}),Ee=({stops:s})=>e.jsx("nav",{"aria-label":Ne,children:e.jsx("ol",{children:s.map(t=>e.jsxs("li",{className:"group grid min-h-22 grid-cols-[2.5rem_minmax(0,1fr)]",children:[e.jsxs("span",{"aria-hidden":"true",className:"flex flex-col items-center",children:[e.jsx("span",{className:"h-0.5 w-1 bg-(--line) group-first:invisible"}),e.jsx(W,{status:Ae[t.state]}),e.jsx("span",{className:"w-1 flex-1 bg-(--line) group-last:invisible"})]}),e.jsxs("div",{className:"pb-5",children:[e.jsxs("p",{className:z("leading-6",we[t.state]),children:[e.jsx(Re,{stop:t}),e.jsx("span",{className:"sr-only",children:`, ${t.stateLabel}`})]}),X(t.lines).map(a=>e.jsx(Y,{segments:a.item,className:"text-sm text-muted-foreground"},a.key))]})]},t.step))})}),Pe="[--line:var(--primary)]",Le="Setup",Ce="Setup • Flight Plan",ke="Searching…",Fe="Looking for your recent repositories…",Te=6e4,Be=({repositories:s,isReadyToContinue:t,continueHint:a,backStep:i,errorMessage:c,isPending:r,onChanged:u,onContinue:n})=>{var B,I,O,_,M,G,q,D,H,U;const g=F(),[x,v]=N.useState(!1),[p,A]=N.useState(null),d=re(x),S=ae({isEnabled:x,folderPath:d.search.query,repositoryName:null,saved:null}),m=N.useDeferredValue(p),h=k({...g.setup.recentRepositories.queryOptions({}),staleTime:Te,placeholderData:$}),o=k({...g.setup.searchAuthors.queryOptions({repositoryName:(m==null?void 0:m.repositoryName)??"",role:(m==null?void 0:m.role)??"tracked",query:(m==null?void 0:m.query)??""}),enabled:m!==null,placeholderData:$}),f=b(g.setup.addRepository.mutationOptions({onSuccess:async()=>{v(!1),d.reset(),S.reset(),await u()}})),y=b(g.setup.addRepository.mutationOptions({onSuccess:u})),l=b(g.setup.removeRepository.mutationOptions({onSuccess:u})),w=b(g.setup.setAuthorTracking.mutationOptions({onSuccess:u})),E=()=>{f.reset(),d.reset(),S.reset(),v(!1)},P=h.isPending?Fe:((B=h.error)==null?void 0:B.message)??((I=h.data)==null?void 0:I.message)??null;return e.jsxs(e.Fragment,{children:[e.jsx(ve,{rows:ce(((O=h.data)==null?void 0:O.repositories)??[],s),listMessage:P,repositoryErrorMessage:((_=y.error)==null?void 0:_.message)??((M=l.error)==null?void 0:M.message)??null,isChangingRepositories:y.isPending||l.isPending,authorSearch:{repositoryName:(p==null?void 0:p.repositoryName)??null,role:(p==null?void 0:p.role)??null,query:(p==null?void 0:p.query)??"",options:((G=o.data)==null?void 0:G.options)??[],message:((q=o.data)==null?void 0:q.message)??(o.isPending?ke:null),errorMessage:((D=o.error)==null?void 0:D.message)??((H=w.error)==null?void 0:H.message)??null},isReadyToContinue:t,continueHint:a,backStep:i,errorMessage:c,isPending:r,onOpenAddRepository:()=>{v(!0)},onFollow:j=>{l.reset(),y.mutate({path:j,trackedAuthorIds:[]})},onUnfollow:j=>{y.reset(),l.mutate({name:j})},onAuthorQueryChange:(j,L,C)=>{A({repositoryName:j,role:L,query:C})},onAuthorTrackingChange:(j,L,C)=>{A(null),w.mutate({repositoryName:j,authorId:L,isTracked:C})},onContinue:n}),e.jsx(ie,{isOpen:x,search:d.search,browse:d.browse,authors:S.authors,isAdding:f.isPending,errorMessage:((U=f.error)==null?void 0:U.message)??null,onQueryChange:d.onQueryChange,onChooseFolder:j=>{f.reset(),d.onChooseFolder(j)},onAuthorQueryChange:S.onAuthorQueryChange,onAuthorSelect:S.onAuthorSelect,onTrackedAuthorRemove:S.onTrackedAuthorRemove,onSubmit:()=>{f.mutate({path:d.search.query,...S.selection})},onBrowse:()=>{f.reset(),d.onBrowse()},onBrowseFolder:d.onBrowseFolder,onBrowseClose:()=>{f.reset(),d.onBrowseClose()},onClose:E})]})},Ie=({form:s})=>{var r;const t=F(),[a,i]=N.useState(null),c=k({...t.setup.browseFolders.queryOptions({path:a??"",purpose:"install-folder"}),enabled:a!==null});return e.jsx(fe,{...s,folderBrowser:a===null?null:c.data??null,folderBrowserErrorMessage:((r=c.error)==null?void 0:r.message)??null,onBrowseFolder:i,onBrowseEnd:()=>{i(null)}})},Ve=()=>{var f,y;const s=F(),t=Z(),a=V.useNavigate(),i=N.use(ee),{step:c=null}=V.useSearch(),{data:r}=se(s.setup.get.queryOptions({step:c})),u=async()=>{t.removeQueries({...s.setup.pathFilter(),type:"inactive"}),await t.invalidateQueries(s.setup.pathFilter())},n=b(s.setup.saveStep.mutationOptions({onSuccess:async l=>{l.kind!=="rejected"&&(await u(),await a({search:{step:l.nextStep}}))}})),g=b(s.setup.complete.mutationOptions({onSuccess:async l=>{t.removeQueries({type:"inactive"}),await a({to:l.redirectTo})}})),x=b(s.reviewPreferences.save.mutationOptions()),v=({configurationId:l,preferences:w})=>{n.reset(),x.mutate(w,{onSuccess:E=>{E.kind!=="rejected"&&n.mutate({step:"configuration",configurationId:l},{onSuccess:P=>{P.kind==="accepted"&&g.mutate({})}})}})},p=((f=x.data)==null?void 0:f.kind)==="rejected"?x.data:null,A=x.error===null?p:{message:x.error.message,field:null},d=((y=n.data)==null?void 0:y.kind)==="rejected"?n.data:null,S=n.error===null?d:{message:n.error.message,field:null},m=A??S,h=g.error===null?m:{message:g.error.message,field:null},{form:o}=r;return e.jsxs(e.Fragment,{children:[e.jsx("title",{children:Ce}),i===null?null:te.createPortal(e.jsxs(e.Fragment,{children:[e.jsx(ne,{lineColor:"primary"}),e.jsxs("p",{className:"flex items-baseline gap-3",children:[e.jsx("span",{className:"font-bold",children:Le}),e.jsx("span",{className:"text-sm text-sign-muted tabular-nums",children:r.progressLabel})]})]}),i),e.jsxs("header",{className:"pb-8",children:[e.jsx("h1",{className:oe,children:"Welcome to Flight Plan"}),e.jsx("p",{className:"mt-1 max-w-[62ch] text-muted-foreground",children:"Let's get you ready for your first review. It takes four short steps, and each one is saved as you go, so you can stop and pick up where you left off."})]}),e.jsxs("div",{className:z("grid gap-x-10 gap-y-8 lg:grid-cols-[17rem_minmax(0,1fr)]",Pe),children:[e.jsx("div",{className:"self-start lg:sticky lg:top-22",children:e.jsx(Ee,{stops:r.route})}),e.jsxs("div",{className:"min-w-0",children:[o.step==="agents"?e.jsx(Ie,{form:{agents:o.agents,defaultAgent:o.defaultAgent,backStep:r.backStep,problem:h,isPending:n.isPending,onSubmit:l=>{n.mutate({step:"agents",...l})}}},o.step):null,o.step==="forges"?e.jsx(ye,{codeHostFeatures:o.codeHostFeatures,forges:o.forges,backStep:r.backStep,problem:h,isPending:n.isPending,onSubmit:l=>{n.mutate({step:"forges",...l})},onSkip:()=>{n.mutate({step:"forges",forges:[]})}},o.step):null,o.step==="configuration"?e.jsx(Se,{presets:o.presets,selectedConfigurationId:o.selectedConfigurationId,preferences:o.preferences,spotlightGroups:o.spotlightGroups,backStep:r.backStep,problem:h,isPending:x.isPending||n.isPending||g.isPending,onSubmit:v},o.step):null,o.step==="repositories"?e.jsx(Be,{repositories:o.repositories,isReadyToContinue:o.isReadyToContinue,continueHint:o.continueHint,backStep:r.backStep,errorMessage:(h==null?void 0:h.message)??null,isPending:n.isPending,onChanged:u,onContinue:()=>{n.mutate({step:"repositories"})}}):null]})]})]})};export{Ve as component};