trybeacon 0.1.73 → 0.1.75

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 (383) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.next/BUILD_ID +1 -1
  3. package/.next/app-path-routes-manifest.json +26 -22
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/routes-manifest.json +24 -0
  7. package/.next/server/app/_global-error/page.js +3 -3
  8. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/_global-error.html +1 -1
  10. package/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next/server/app/_not-found/page.js +2 -2
  18. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/_not-found.html +1 -1
  21. package/.next/server/app/_not-found.rsc +23 -22
  22. package/.next/server/app/_not-found.segments/_full.segment.rsc +23 -22
  23. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_index.segment.rsc +12 -11
  25. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  26. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  27. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  28. package/.next/server/app/api/ask/answer/route.js +1 -0
  29. package/.next/server/app/api/ask/answer/route.js.nft.json +1 -0
  30. package/.next/server/app/api/ask/answer/route_client-reference-manifest.js +1 -0
  31. package/.next/server/app/api/ask/route.js +1 -0
  32. package/.next/server/app/api/ask/route.js.nft.json +1 -0
  33. package/.next/server/app/api/ask/route_client-reference-manifest.js +1 -0
  34. package/.next/server/app/api/ask/verdict/route.js +1 -0
  35. package/.next/server/app/api/ask/verdict/route.js.nft.json +1 -0
  36. package/.next/server/app/api/ask/verdict/route_client-reference-manifest.js +1 -0
  37. package/.next/server/app/api/board-annotations/[id]/route.js +1 -1
  38. package/.next/server/app/api/board-annotations/route.js +1 -1
  39. package/.next/server/app/api/board-layout/route.js +1 -1
  40. package/.next/server/app/api/bug-flags/[id]/route.js +1 -1
  41. package/.next/server/app/api/bug-flags/route.js +1 -1
  42. package/.next/server/app/api/changes/comment/answer/route.js +4 -0
  43. package/.next/server/app/api/changes/comment/answer/route.js.nft.json +1 -0
  44. package/.next/server/app/api/changes/comment/answer/route_client-reference-manifest.js +1 -0
  45. package/.next/server/app/api/changes/comment/claim/route.js +4 -1
  46. package/.next/server/app/api/changes/comment/route.js +4 -1
  47. package/.next/server/app/api/changes/quality/route.js +1 -1
  48. package/.next/server/app/api/changes/route.js +1 -1
  49. package/.next/server/app/api/changes/viewed/route.js +1 -1
  50. package/.next/server/app/api/code-graph/position/route.js +1 -1
  51. package/.next/server/app/api/code-graph/route.js +1 -1
  52. package/.next/server/app/api/context/feature/route.js +1 -1
  53. package/.next/server/app/api/context/file/route.js +1 -1
  54. package/.next/server/app/api/context/route.js +1 -1
  55. package/.next/server/app/api/db/arrange/route.js +1 -1
  56. package/.next/server/app/api/db/backfill-access/route.js +1 -1
  57. package/.next/server/app/api/db/position/route.js +1 -1
  58. package/.next/server/app/api/db/prune-planned/route.js +1 -1
  59. package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
  60. package/.next/server/app/api/db/relations/[id]/route.js +1 -1
  61. package/.next/server/app/api/db/tables/[id]/route.js +1 -1
  62. package/.next/server/app/api/draft/approve/route.js +1 -1
  63. package/.next/server/app/api/draft/route.js +1 -1
  64. package/.next/server/app/api/draft/status/route.js +1 -1
  65. package/.next/server/app/api/edges/[id]/route.js +1 -1
  66. package/.next/server/app/api/edges/route.js +1 -1
  67. package/.next/server/app/api/endpoints/[id]/route.js +1 -1
  68. package/.next/server/app/api/entities/route.js +1 -1
  69. package/.next/server/app/api/ingest/route.js +1 -1
  70. package/.next/server/app/api/init/route.js +1 -1
  71. package/.next/server/app/api/lesson/close/route.js +1 -1
  72. package/.next/server/app/api/lesson/presence/route.js +1 -1
  73. package/.next/server/app/api/lesson/questions/route.js +1 -1
  74. package/.next/server/app/api/lesson/route.js +1 -1
  75. package/.next/server/app/api/lesson/save/route.js +1 -1
  76. package/.next/server/app/api/lesson/verdict/route.js +1 -1
  77. package/.next/server/app/api/map/describe/route.js +1 -1
  78. package/.next/server/app/api/map/files/route.js +1 -1
  79. package/.next/server/app/api/map/finish/route.js +1 -1
  80. package/.next/server/app/api/map/route.js +1 -1
  81. package/.next/server/app/api/map/start/route.js +1 -1
  82. package/.next/server/app/api/map/touch-active/route.js +1 -1
  83. package/.next/server/app/api/mention-search/route.js +1 -1
  84. package/.next/server/app/api/nodes/[id]/position/route.js +1 -1
  85. package/.next/server/app/api/nodes/[id]/route.js +1 -1
  86. package/.next/server/app/api/nodes/positions/route.js +1 -1
  87. package/.next/server/app/api/nodes/route.js +1 -1
  88. package/.next/server/app/api/nodes/subtasks/route.js +1 -1
  89. package/.next/server/app/api/notes/[id]/route.js +1 -1
  90. package/.next/server/app/api/notes/route.js +1 -1
  91. package/.next/server/app/api/open/route.js +1 -1
  92. package/.next/server/app/api/plan/annotations/route.js +3 -3
  93. package/.next/server/app/api/plan/approve/route.js +1 -1
  94. package/.next/server/app/api/plan/history/route.js +1 -1
  95. package/.next/server/app/api/plan/markdown/route.js +1 -1
  96. package/.next/server/app/api/plan/presence/route.js +1 -1
  97. package/.next/server/app/api/plan/route.js +1 -1
  98. package/.next/server/app/api/plan/verdict/route.js +1 -1
  99. package/.next/server/app/api/preferences/route.js +1 -1
  100. package/.next/server/app/api/project-meta/route.js +1 -1
  101. package/.next/server/app/api/reset/route.js +1 -1
  102. package/.next/server/app/api/scope-guard/check/route.js +4 -1
  103. package/.next/server/app/api/share/create/route.js +1 -1
  104. package/.next/server/app/api/share/route.js +1 -1
  105. package/.next/server/app/api/stream/route.js +2 -2
  106. package/.next/server/app/api/tab/nav/route.js +1 -1
  107. package/.next/server/app/api/tab/presence/route.js +1 -1
  108. package/.next/server/app/api/telemetry/route.js +1 -1
  109. package/.next/server/app/api/telemetry/stats/route.js +1 -1
  110. package/.next/server/app/api/version/route.js +1 -1
  111. package/.next/server/app/api/workspace/activate/route.js +1 -1
  112. package/.next/server/app/api/workspace/route.js +1 -1
  113. package/.next/server/app/apple-icon.png/route.js +1 -1
  114. package/.next/server/app/docs/page.js +2 -2
  115. package/.next/server/app/docs/page.js.nft.json +1 -1
  116. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  117. package/.next/server/app/docs.html +1 -1
  118. package/.next/server/app/docs.rsc +24 -23
  119. package/.next/server/app/docs.segments/_full.segment.rsc +24 -23
  120. package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  121. package/.next/server/app/docs.segments/_index.segment.rsc +12 -11
  122. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  123. package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
  124. package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  125. package/.next/server/app/help/page.js +2 -2
  126. package/.next/server/app/help/page.js.nft.json +1 -1
  127. package/.next/server/app/help/page_client-reference-manifest.js +1 -1
  128. package/.next/server/app/help.html +1 -1
  129. package/.next/server/app/help.rsc +32 -31
  130. package/.next/server/app/help.segments/_full.segment.rsc +32 -31
  131. package/.next/server/app/help.segments/_head.segment.rsc +1 -1
  132. package/.next/server/app/help.segments/_index.segment.rsc +12 -11
  133. package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
  134. package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
  135. package/.next/server/app/help.segments/help.segment.rsc +1 -1
  136. package/.next/server/app/icon.svg/route.js +1 -1
  137. package/.next/server/app/index.html +1 -1
  138. package/.next/server/app/index.rsc +22 -21
  139. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  140. package/.next/server/app/index.segments/_full.segment.rsc +22 -21
  141. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  142. package/.next/server/app/index.segments/_index.segment.rsc +12 -11
  143. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  144. package/.next/server/app/learn/page.js +4 -4
  145. package/.next/server/app/learn/page.js.nft.json +1 -1
  146. package/.next/server/app/learn/page_client-reference-manifest.js +1 -1
  147. package/.next/server/app/map/page.js +2 -2
  148. package/.next/server/app/map/page.js.nft.json +1 -1
  149. package/.next/server/app/map/page_client-reference-manifest.js +1 -1
  150. package/.next/server/app/page.js +2 -2
  151. package/.next/server/app/page.js.nft.json +1 -1
  152. package/.next/server/app/page_client-reference-manifest.js +1 -1
  153. package/.next/server/app/plan/page.js +3 -3
  154. package/.next/server/app/plan/page.js.nft.json +1 -1
  155. package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
  156. package/.next/server/app/s/[token]/page.js +2 -2
  157. package/.next/server/app/s/[token]/page.js.nft.json +1 -1
  158. package/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
  159. package/.next/server/app/settings/page.js +2 -2
  160. package/.next/server/app/settings/page.js.nft.json +1 -1
  161. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  162. package/.next/server/app-paths-manifest.json +26 -22
  163. package/.next/server/chunks/1179.js +1 -0
  164. package/.next/server/chunks/2031.js +1 -0
  165. package/.next/server/chunks/2693.js +5 -2
  166. package/.next/server/chunks/374.js +1 -0
  167. package/.next/server/chunks/4378.js +1 -1
  168. package/.next/server/chunks/5295.js +1 -0
  169. package/.next/server/chunks/{4700.js → 5704.js} +2 -2
  170. package/.next/server/chunks/8227.js +1 -1
  171. package/.next/server/chunks/9683.js +1 -1
  172. package/.next/server/middleware-build-manifest.js +1 -1
  173. package/.next/server/pages/404.html +1 -1
  174. package/.next/server/pages/500.html +1 -1
  175. package/.next/server/server-reference-manifest.js +1 -1
  176. package/.next/server/server-reference-manifest.json +1 -1
  177. package/.next/static/chunks/1072-351ce2030dee0f4e.js +1 -0
  178. package/.next/static/chunks/3908-80efc60050779adf.js +1 -0
  179. package/.next/static/chunks/5697-5b9719b81806b4cf.js +1 -0
  180. package/.next/static/chunks/7424-d7fa15ef452064dd.js +1 -0
  181. package/.next/static/chunks/app/_global-error/page-d54a69e7dc6b4008.js +1 -0
  182. package/.next/static/chunks/app/api/ask/answer/route-d54a69e7dc6b4008.js +1 -0
  183. package/.next/static/chunks/app/api/ask/route-d54a69e7dc6b4008.js +1 -0
  184. package/.next/static/chunks/app/api/ask/verdict/route-d54a69e7dc6b4008.js +1 -0
  185. package/.next/static/chunks/app/api/board-annotations/[id]/route-d54a69e7dc6b4008.js +1 -0
  186. package/.next/static/chunks/app/api/board-annotations/route-d54a69e7dc6b4008.js +1 -0
  187. package/.next/static/chunks/app/api/board-layout/route-d54a69e7dc6b4008.js +1 -0
  188. package/.next/static/chunks/app/api/bug-flags/[id]/route-d54a69e7dc6b4008.js +1 -0
  189. package/.next/static/chunks/app/api/bug-flags/route-d54a69e7dc6b4008.js +1 -0
  190. package/.next/static/chunks/app/api/changes/comment/answer/route-d54a69e7dc6b4008.js +1 -0
  191. package/.next/static/chunks/app/api/changes/comment/claim/route-d54a69e7dc6b4008.js +1 -0
  192. package/.next/static/chunks/app/api/changes/comment/route-d54a69e7dc6b4008.js +1 -0
  193. package/.next/static/chunks/app/api/changes/quality/route-d54a69e7dc6b4008.js +1 -0
  194. package/.next/static/chunks/app/api/changes/route-d54a69e7dc6b4008.js +1 -0
  195. package/.next/static/chunks/app/api/changes/viewed/route-d54a69e7dc6b4008.js +1 -0
  196. package/.next/static/chunks/app/api/code-graph/position/route-d54a69e7dc6b4008.js +1 -0
  197. package/.next/static/chunks/app/api/code-graph/route-d54a69e7dc6b4008.js +1 -0
  198. package/.next/static/chunks/app/api/context/feature/route-d54a69e7dc6b4008.js +1 -0
  199. package/.next/static/chunks/app/api/context/file/route-d54a69e7dc6b4008.js +1 -0
  200. package/.next/static/chunks/app/api/context/route-d54a69e7dc6b4008.js +1 -0
  201. package/.next/static/chunks/app/api/db/arrange/route-d54a69e7dc6b4008.js +1 -0
  202. package/.next/static/chunks/app/api/db/backfill-access/route-d54a69e7dc6b4008.js +1 -0
  203. package/.next/static/chunks/app/api/db/position/route-d54a69e7dc6b4008.js +1 -0
  204. package/.next/static/chunks/app/api/db/prune-planned/route-d54a69e7dc6b4008.js +1 -0
  205. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-d54a69e7dc6b4008.js +1 -0
  206. package/.next/static/chunks/app/api/db/relations/[id]/route-d54a69e7dc6b4008.js +1 -0
  207. package/.next/static/chunks/app/api/db/tables/[id]/route-d54a69e7dc6b4008.js +1 -0
  208. package/.next/static/chunks/app/api/draft/approve/route-d54a69e7dc6b4008.js +1 -0
  209. package/.next/static/chunks/app/api/draft/route-d54a69e7dc6b4008.js +1 -0
  210. package/.next/static/chunks/app/api/draft/status/route-d54a69e7dc6b4008.js +1 -0
  211. package/.next/static/chunks/app/api/edges/[id]/route-d54a69e7dc6b4008.js +1 -0
  212. package/.next/static/chunks/app/api/edges/route-d54a69e7dc6b4008.js +1 -0
  213. package/.next/static/chunks/app/api/endpoints/[id]/route-d54a69e7dc6b4008.js +1 -0
  214. package/.next/static/chunks/app/api/entities/route-d54a69e7dc6b4008.js +1 -0
  215. package/.next/static/chunks/app/api/ingest/route-d54a69e7dc6b4008.js +1 -0
  216. package/.next/static/chunks/app/api/init/route-d54a69e7dc6b4008.js +1 -0
  217. package/.next/static/chunks/app/api/lesson/close/route-d54a69e7dc6b4008.js +1 -0
  218. package/.next/static/chunks/app/api/lesson/presence/route-d54a69e7dc6b4008.js +1 -0
  219. package/.next/static/chunks/app/api/lesson/questions/route-d54a69e7dc6b4008.js +1 -0
  220. package/.next/static/chunks/app/api/lesson/route-d54a69e7dc6b4008.js +1 -0
  221. package/.next/static/chunks/app/api/lesson/save/route-d54a69e7dc6b4008.js +1 -0
  222. package/.next/static/chunks/app/api/lesson/verdict/route-d54a69e7dc6b4008.js +1 -0
  223. package/.next/static/chunks/app/api/map/describe/route-d54a69e7dc6b4008.js +1 -0
  224. package/.next/static/chunks/app/api/map/files/route-d54a69e7dc6b4008.js +1 -0
  225. package/.next/static/chunks/app/api/map/finish/route-d54a69e7dc6b4008.js +1 -0
  226. package/.next/static/chunks/app/api/map/route-d54a69e7dc6b4008.js +1 -0
  227. package/.next/static/chunks/app/api/map/start/route-d54a69e7dc6b4008.js +1 -0
  228. package/.next/static/chunks/app/api/map/touch-active/route-d54a69e7dc6b4008.js +1 -0
  229. package/.next/static/chunks/app/api/mention-search/route-d54a69e7dc6b4008.js +1 -0
  230. package/.next/static/chunks/app/api/nodes/[id]/position/route-d54a69e7dc6b4008.js +1 -0
  231. package/.next/static/chunks/app/api/nodes/[id]/route-d54a69e7dc6b4008.js +1 -0
  232. package/.next/static/chunks/app/api/nodes/positions/route-d54a69e7dc6b4008.js +1 -0
  233. package/.next/static/chunks/app/api/nodes/route-d54a69e7dc6b4008.js +1 -0
  234. package/.next/static/chunks/app/api/nodes/subtasks/route-d54a69e7dc6b4008.js +1 -0
  235. package/.next/static/chunks/app/api/notes/[id]/route-d54a69e7dc6b4008.js +1 -0
  236. package/.next/static/chunks/app/api/notes/route-d54a69e7dc6b4008.js +1 -0
  237. package/.next/static/chunks/app/api/open/route-d54a69e7dc6b4008.js +1 -0
  238. package/.next/static/chunks/app/api/plan/annotations/route-d54a69e7dc6b4008.js +1 -0
  239. package/.next/static/chunks/app/api/plan/approve/route-d54a69e7dc6b4008.js +1 -0
  240. package/.next/static/chunks/app/api/plan/history/route-d54a69e7dc6b4008.js +1 -0
  241. package/.next/static/chunks/app/api/plan/markdown/route-d54a69e7dc6b4008.js +1 -0
  242. package/.next/static/chunks/app/api/plan/presence/route-d54a69e7dc6b4008.js +1 -0
  243. package/.next/static/chunks/app/api/plan/route-d54a69e7dc6b4008.js +1 -0
  244. package/.next/static/chunks/app/api/plan/verdict/route-d54a69e7dc6b4008.js +1 -0
  245. package/.next/static/chunks/app/api/preferences/route-d54a69e7dc6b4008.js +1 -0
  246. package/.next/static/chunks/app/api/project-meta/route-d54a69e7dc6b4008.js +1 -0
  247. package/.next/static/chunks/app/api/reset/route-d54a69e7dc6b4008.js +1 -0
  248. package/.next/static/chunks/app/api/scope-guard/check/route-d54a69e7dc6b4008.js +1 -0
  249. package/.next/static/chunks/app/api/share/create/route-d54a69e7dc6b4008.js +1 -0
  250. package/.next/static/chunks/app/api/share/route-d54a69e7dc6b4008.js +1 -0
  251. package/.next/static/chunks/app/api/stream/route-d54a69e7dc6b4008.js +1 -0
  252. package/.next/static/chunks/app/api/tab/nav/route-d54a69e7dc6b4008.js +1 -0
  253. package/.next/static/chunks/app/api/tab/presence/route-d54a69e7dc6b4008.js +1 -0
  254. package/.next/static/chunks/app/api/telemetry/route-d54a69e7dc6b4008.js +1 -0
  255. package/.next/static/chunks/app/api/telemetry/stats/route-d54a69e7dc6b4008.js +1 -0
  256. package/.next/static/chunks/app/api/version/route-d54a69e7dc6b4008.js +1 -0
  257. package/.next/static/chunks/app/api/workspace/activate/route-d54a69e7dc6b4008.js +1 -0
  258. package/.next/static/chunks/app/api/workspace/route-d54a69e7dc6b4008.js +1 -0
  259. package/.next/static/chunks/app/layout-f908dc26e06f4302.js +1 -0
  260. package/.next/static/chunks/app/learn/{page-a14eaf5143e2df55.js → page-454e91fdcd29a1ee.js} +1 -1
  261. package/.next/static/chunks/app/map/{page-06282017c592fb3c.js → page-66f3cac308b215a7.js} +1 -1
  262. package/.next/static/chunks/app/plan/page-63b2f0d1f090f26f.js +11 -0
  263. package/.next/static/chunks/app/s/[token]/{page-a4deb16beff21840.js → page-6be414f07f63a402.js} +1 -1
  264. package/.next/static/chunks/app/settings/{page-67cab634be8bfef2.js → page-a751eabdd933f685.js} +1 -1
  265. package/.next/static/chunks/next/dist/client/components/builtin/app-error-d54a69e7dc6b4008.js +1 -0
  266. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-d54a69e7dc6b4008.js +1 -0
  267. package/.next/static/chunks/next/dist/client/components/builtin/not-found-d54a69e7dc6b4008.js +1 -0
  268. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-d54a69e7dc6b4008.js +1 -0
  269. package/.next/static/css/60048003a8c96562.css +1 -0
  270. package/.next/static/ldWTvBCY5D7kyH8PMAEWm/_buildManifest.js +1 -0
  271. package/.next/trace +46 -45
  272. package/.next/trace-build +1 -1
  273. package/.next/types/app/api/ask/answer/route.ts +351 -0
  274. package/.next/types/app/api/ask/route.ts +351 -0
  275. package/.next/types/app/api/ask/verdict/route.ts +351 -0
  276. package/.next/types/app/api/changes/comment/answer/route.ts +351 -0
  277. package/.next/types/routes.d.ts +5 -1
  278. package/.next/types/validator.ts +36 -0
  279. package/dist/bin/answer.js +8 -0
  280. package/dist/bin/ask.js +5 -0
  281. package/dist/bin/beacon.js +5 -5
  282. package/dist/bin/doctor.js +20 -20
  283. package/dist/bin/guard.js +1 -1
  284. package/dist/bin/hook.js +20 -20
  285. package/dist/bin/mcp.js +32 -32
  286. package/dist/bin/plan.js +18 -18
  287. package/dist/bin/remove.js +6 -6
  288. package/dist/bin/stop-hook.js +7 -3
  289. package/dist/bin/uninstall.js +20 -20
  290. package/dist/lib/global-install.js +1 -1
  291. package/dist/lib/telemetry.js +1 -1
  292. package/dist/lib/workspaces.js +1 -1
  293. package/package.json +1 -1
  294. package/.next/server/chunks/4307.js +0 -1
  295. package/.next/server/chunks/5719.js +0 -1
  296. package/.next/server/chunks/8190.js +0 -1
  297. package/.next/static/chunks/2231-63ad38ec8fb7cb6f.js +0 -1
  298. package/.next/static/chunks/5909-387573cddda35a48.js +0 -1
  299. package/.next/static/chunks/766-242213d211df0afd.js +0 -1
  300. package/.next/static/chunks/8997-78a359d0d238622e.js +0 -1
  301. package/.next/static/chunks/app/_global-error/page-5f4c3e6e9cc8e6c9.js +0 -1
  302. package/.next/static/chunks/app/api/board-annotations/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
  303. package/.next/static/chunks/app/api/board-annotations/route-5f4c3e6e9cc8e6c9.js +0 -1
  304. package/.next/static/chunks/app/api/board-layout/route-5f4c3e6e9cc8e6c9.js +0 -1
  305. package/.next/static/chunks/app/api/bug-flags/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
  306. package/.next/static/chunks/app/api/bug-flags/route-5f4c3e6e9cc8e6c9.js +0 -1
  307. package/.next/static/chunks/app/api/changes/comment/claim/route-5f4c3e6e9cc8e6c9.js +0 -1
  308. package/.next/static/chunks/app/api/changes/comment/route-5f4c3e6e9cc8e6c9.js +0 -1
  309. package/.next/static/chunks/app/api/changes/quality/route-5f4c3e6e9cc8e6c9.js +0 -1
  310. package/.next/static/chunks/app/api/changes/route-5f4c3e6e9cc8e6c9.js +0 -1
  311. package/.next/static/chunks/app/api/changes/viewed/route-5f4c3e6e9cc8e6c9.js +0 -1
  312. package/.next/static/chunks/app/api/code-graph/position/route-5f4c3e6e9cc8e6c9.js +0 -1
  313. package/.next/static/chunks/app/api/code-graph/route-5f4c3e6e9cc8e6c9.js +0 -1
  314. package/.next/static/chunks/app/api/context/feature/route-5f4c3e6e9cc8e6c9.js +0 -1
  315. package/.next/static/chunks/app/api/context/file/route-5f4c3e6e9cc8e6c9.js +0 -1
  316. package/.next/static/chunks/app/api/context/route-5f4c3e6e9cc8e6c9.js +0 -1
  317. package/.next/static/chunks/app/api/db/arrange/route-5f4c3e6e9cc8e6c9.js +0 -1
  318. package/.next/static/chunks/app/api/db/backfill-access/route-5f4c3e6e9cc8e6c9.js +0 -1
  319. package/.next/static/chunks/app/api/db/position/route-5f4c3e6e9cc8e6c9.js +0 -1
  320. package/.next/static/chunks/app/api/db/prune-planned/route-5f4c3e6e9cc8e6c9.js +0 -1
  321. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-5f4c3e6e9cc8e6c9.js +0 -1
  322. package/.next/static/chunks/app/api/db/relations/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
  323. package/.next/static/chunks/app/api/db/tables/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
  324. package/.next/static/chunks/app/api/draft/approve/route-5f4c3e6e9cc8e6c9.js +0 -1
  325. package/.next/static/chunks/app/api/draft/route-5f4c3e6e9cc8e6c9.js +0 -1
  326. package/.next/static/chunks/app/api/draft/status/route-5f4c3e6e9cc8e6c9.js +0 -1
  327. package/.next/static/chunks/app/api/edges/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
  328. package/.next/static/chunks/app/api/edges/route-5f4c3e6e9cc8e6c9.js +0 -1
  329. package/.next/static/chunks/app/api/endpoints/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
  330. package/.next/static/chunks/app/api/entities/route-5f4c3e6e9cc8e6c9.js +0 -1
  331. package/.next/static/chunks/app/api/ingest/route-5f4c3e6e9cc8e6c9.js +0 -1
  332. package/.next/static/chunks/app/api/init/route-5f4c3e6e9cc8e6c9.js +0 -1
  333. package/.next/static/chunks/app/api/lesson/close/route-5f4c3e6e9cc8e6c9.js +0 -1
  334. package/.next/static/chunks/app/api/lesson/presence/route-5f4c3e6e9cc8e6c9.js +0 -1
  335. package/.next/static/chunks/app/api/lesson/questions/route-5f4c3e6e9cc8e6c9.js +0 -1
  336. package/.next/static/chunks/app/api/lesson/route-5f4c3e6e9cc8e6c9.js +0 -1
  337. package/.next/static/chunks/app/api/lesson/save/route-5f4c3e6e9cc8e6c9.js +0 -1
  338. package/.next/static/chunks/app/api/lesson/verdict/route-5f4c3e6e9cc8e6c9.js +0 -1
  339. package/.next/static/chunks/app/api/map/describe/route-5f4c3e6e9cc8e6c9.js +0 -1
  340. package/.next/static/chunks/app/api/map/files/route-5f4c3e6e9cc8e6c9.js +0 -1
  341. package/.next/static/chunks/app/api/map/finish/route-5f4c3e6e9cc8e6c9.js +0 -1
  342. package/.next/static/chunks/app/api/map/route-5f4c3e6e9cc8e6c9.js +0 -1
  343. package/.next/static/chunks/app/api/map/start/route-5f4c3e6e9cc8e6c9.js +0 -1
  344. package/.next/static/chunks/app/api/map/touch-active/route-5f4c3e6e9cc8e6c9.js +0 -1
  345. package/.next/static/chunks/app/api/mention-search/route-5f4c3e6e9cc8e6c9.js +0 -1
  346. package/.next/static/chunks/app/api/nodes/[id]/position/route-5f4c3e6e9cc8e6c9.js +0 -1
  347. package/.next/static/chunks/app/api/nodes/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
  348. package/.next/static/chunks/app/api/nodes/positions/route-5f4c3e6e9cc8e6c9.js +0 -1
  349. package/.next/static/chunks/app/api/nodes/route-5f4c3e6e9cc8e6c9.js +0 -1
  350. package/.next/static/chunks/app/api/nodes/subtasks/route-5f4c3e6e9cc8e6c9.js +0 -1
  351. package/.next/static/chunks/app/api/notes/[id]/route-5f4c3e6e9cc8e6c9.js +0 -1
  352. package/.next/static/chunks/app/api/notes/route-5f4c3e6e9cc8e6c9.js +0 -1
  353. package/.next/static/chunks/app/api/open/route-5f4c3e6e9cc8e6c9.js +0 -1
  354. package/.next/static/chunks/app/api/plan/annotations/route-5f4c3e6e9cc8e6c9.js +0 -1
  355. package/.next/static/chunks/app/api/plan/approve/route-5f4c3e6e9cc8e6c9.js +0 -1
  356. package/.next/static/chunks/app/api/plan/history/route-5f4c3e6e9cc8e6c9.js +0 -1
  357. package/.next/static/chunks/app/api/plan/markdown/route-5f4c3e6e9cc8e6c9.js +0 -1
  358. package/.next/static/chunks/app/api/plan/presence/route-5f4c3e6e9cc8e6c9.js +0 -1
  359. package/.next/static/chunks/app/api/plan/route-5f4c3e6e9cc8e6c9.js +0 -1
  360. package/.next/static/chunks/app/api/plan/verdict/route-5f4c3e6e9cc8e6c9.js +0 -1
  361. package/.next/static/chunks/app/api/preferences/route-5f4c3e6e9cc8e6c9.js +0 -1
  362. package/.next/static/chunks/app/api/project-meta/route-5f4c3e6e9cc8e6c9.js +0 -1
  363. package/.next/static/chunks/app/api/reset/route-5f4c3e6e9cc8e6c9.js +0 -1
  364. package/.next/static/chunks/app/api/scope-guard/check/route-5f4c3e6e9cc8e6c9.js +0 -1
  365. package/.next/static/chunks/app/api/share/create/route-5f4c3e6e9cc8e6c9.js +0 -1
  366. package/.next/static/chunks/app/api/share/route-5f4c3e6e9cc8e6c9.js +0 -1
  367. package/.next/static/chunks/app/api/stream/route-5f4c3e6e9cc8e6c9.js +0 -1
  368. package/.next/static/chunks/app/api/tab/nav/route-5f4c3e6e9cc8e6c9.js +0 -1
  369. package/.next/static/chunks/app/api/tab/presence/route-5f4c3e6e9cc8e6c9.js +0 -1
  370. package/.next/static/chunks/app/api/telemetry/route-5f4c3e6e9cc8e6c9.js +0 -1
  371. package/.next/static/chunks/app/api/telemetry/stats/route-5f4c3e6e9cc8e6c9.js +0 -1
  372. package/.next/static/chunks/app/api/version/route-5f4c3e6e9cc8e6c9.js +0 -1
  373. package/.next/static/chunks/app/api/workspace/activate/route-5f4c3e6e9cc8e6c9.js +0 -1
  374. package/.next/static/chunks/app/api/workspace/route-5f4c3e6e9cc8e6c9.js +0 -1
  375. package/.next/static/chunks/app/layout-6e934a2850efd223.js +0 -1
  376. package/.next/static/chunks/app/plan/page-41a3990cb858c5f2.js +0 -11
  377. package/.next/static/chunks/next/dist/client/components/builtin/app-error-5f4c3e6e9cc8e6c9.js +0 -1
  378. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-5f4c3e6e9cc8e6c9.js +0 -1
  379. package/.next/static/chunks/next/dist/client/components/builtin/not-found-5f4c3e6e9cc8e6c9.js +0 -1
  380. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-5f4c3e6e9cc8e6c9.js +0 -1
  381. package/.next/static/css/95dc31edc34789a7.css +0 -1
  382. package/.next/static/mB9lqGEsIvB7tTvv9GU48/_buildManifest.js +0 -1
  383. /package/.next/static/{mB9lqGEsIvB7tTvv9GU48 → ldWTvBCY5D7kyH8PMAEWm}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{434:(e,t,s)=>{"use strict";s.d(t,{PlanBar:()=>u});var a=s(95155),n=s(98500),r=s.n(n),i=s(73321),l=s(86272),o=s(32133),c=s(65738),d=s(48484);function u(){let{status:e,discard:t}=(0,d.j)(),s=(0,i.usePathname)();return e.pending&&"/plan"!==s?(0,a.jsx)("div",{className:"pointer-events-none fixed inset-x-0 top-14 z-40 flex justify-center px-2",children:(0,a.jsxs)("div",{className:"pointer-events-auto flex max-w-3xl items-center gap-2 rounded-xl border border-emerald-500/30 bg-card/85 px-3 py-1.5 shadow-lg backdrop-blur supports-[backdrop-filter]:bg-card/70",children:[(0,a.jsx)(l.A,{className:"size-3.5 shrink-0 text-emerald-300"}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"truncate text-[12px] leading-tight text-foreground",children:[(0,a.jsx)("span",{className:"text-emerald-300/80",children:"Plan ready \xb7 "}),e.description||"(no description)"]}),(0,a.jsxs)("div",{className:"text-[10px] leading-tight text-muted-foreground",children:[e.features," feature(s) \xb7 ",e.tables," table(s) \xb7 ",e.endpoints," ","endpoint(s)"]})]}),(0,a.jsxs)(r(),{href:"/plan",className:"flex shrink-0 items-center gap-1 rounded-md border border-emerald-500/40 bg-emerald-500/15 px-2 py-1 text-[11px] font-semibold text-emerald-300 transition-colors hover:bg-emerald-500/25",title:"Open Plannotator + canvases side by side",children:[(0,a.jsx)(o.A,{className:"size-3"})," Open plan"]}),(0,a.jsxs)("button",{onClick:t,className:"flex shrink-0 items-center gap-1 rounded-md px-2 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",title:"Discard the plan",children:[(0,a.jsx)(c.A,{className:"size-3"})," Discard"]})]})}):null}},10436:(e,t,s)=>{"use strict";s.d(t,{TopNav:()=>b});var a=s(95155),n=s(12115),r=s(98500),i=s.n(r),l=s(73321),o=s(82879),c=s(52965);let d=(0,s(30772).A)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);var u=s(26518),h=s(91337),x=s(60292);function p({fallback:e}){let[t,s]=(0,n.useState)([]),[r,i]=(0,n.useState)(null);if((0,n.useEffect)(()=>{let e=!0,t=()=>fetch("/api/workspace").then(e=>e.ok?e.json():null).then(t=>{e&&t&&(s(t.workspaces??[]),i((0,x.fk)()??t.active??null))}).catch(()=>{});t();let a=setInterval(t,5e3);return()=>{e=!1,clearInterval(a)}},[]),0===t.length)return e?(0,a.jsxs)("span",{className:"font-mono text-xs text-muted-foreground",children:["\xb7 ",e]}):null;async function l(e){i(e),(0,x.aE)(e),await Promise.race([fetch("/api/workspace",{method:"POST",headers:{"content-type":"application/json","x-beacon-workspace":e},body:JSON.stringify({id:e}),signal:AbortSignal.timeout(8e3)}).catch(()=>{}),new Promise(e=>setTimeout(e,2500))]);let t=new URLSearchParams(window.location.search);t.set("ws",e),window.location.href=`${window.location.pathname}?${t.toString()}`}let o=t.find(e=>e.id===r);return(0,a.jsxs)(u.l6,{value:r??"",onValueChange:e=>e&&l(e),children:[(0,a.jsxs)(u.bq,{title:o?.name,className:"h-7 max-w-[180px] gap-1.5 rounded-lg border-white/12 bg-white/[0.04] px-2 text-xs font-medium transition-colors hover:bg-white/[0.07]",children:[(0,a.jsx)(d,{className:"size-3.5 shrink-0 text-muted-foreground"}),(0,a.jsx)(u.yv,{children:()=>o?.name??"Project"})]}),(0,a.jsxs)(u.gC,{align:"start",alignItemWithTrigger:!1,sideOffset:6,className:"min-w-[250px] border border-white/10 bg-popover/95 p-1.5 backdrop-blur-xl",children:[(0,a.jsx)("p",{className:"px-2 pt-1 pb-1.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground/70",children:"Workspace"}),t.map(e=>{var t,s;let n,i=e.id===r;return(0,a.jsx)(u.eb,{value:e.id,className:(0,h.cn)("gap-2.5 rounded-lg py-1.5 pr-8 pl-1.5 transition-colors",i&&"bg-white/[0.05]"),children:(0,a.jsxs)("span",{className:"flex items-center gap-2.5",children:[(0,a.jsx)("span",{className:(0,h.cn)("flex size-7 shrink-0 items-center justify-center rounded-md border",i?"border-sky-400/30 bg-sky-400/10 text-sky-300":"border-white/10 bg-white/[0.03] text-muted-foreground"),children:(0,a.jsx)(d,{className:"size-3.5"})}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,a.jsx)("span",{className:"truncate text-[13px] font-medium leading-tight text-foreground",children:e.name}),(0,a.jsx)("span",{className:"truncate font-mono text-[10px] leading-tight text-muted-foreground",children:(t=e.path,s=e.name,(n=t.replace(/^\/(Users|home)\/[^/]+/,"~").split("/").filter(Boolean))[n.length-1]===s&&n.pop(),(n.length>3?[n[0],"…",n[n.length-1]]:n).join("/")||"~")})]})]})},e.id)})]})]})}var m=s(81984);let f=[{href:"/plan",label:"Plans"},{href:"/map",label:"Map"},{href:"/learn",label:"Learn"},{href:"/settings",label:"Settings"}];function b({repo:e}){let t=(0,l.usePathname)(),{toggle:s,open:r}=(0,m.b)(),[d,u]=(0,n.useState)(null);return(0,n.useEffect)(()=>{u((0,x.fk)())},[t]),(0,a.jsx)("header",{className:"pointer-events-none fixed left-3 top-3 z-30",children:(0,a.jsxs)("div",{className:"glass pointer-events-auto flex h-10 items-center gap-1 rounded-full pl-3 pr-1.5",children:[(0,a.jsxs)(i(),{href:"/",className:"mr-1 flex items-center gap-2 text-sm font-semibold tracking-tight",children:[(0,a.jsx)(c._,{size:18,className:"text-foreground"}),(0,a.jsx)("span",{className:"hidden lg:inline",children:"Beacon"})]}),(0,a.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,a.jsx)(p,{fallback:e}),(0,a.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,a.jsx)("nav",{className:"flex items-center gap-0.5 text-sm",children:f.map(e=>{let s=t===e.href||t.startsWith(e.href+"/");return(0,a.jsx)(i(),{href:(0,x.Fj)(e.href,d),className:(0,h.cn)("rounded-full px-3 py-1 text-[13px] tracking-tight transition-colors",s?"bg-white/[0.09] text-foreground shadow-[inset_0_1px_0_rgba(255,255,255,0.06)]":"text-muted-foreground hover:bg-white/[0.04] hover:text-foreground"),children:e.label},e.href)})}),(0,a.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,a.jsx)("button",{type:"button",onClick:s,"aria-pressed":r,"aria-label":"Notes",title:"Notes",className:(0,h.cn)("flex items-center justify-center rounded-full p-1.5 transition-colors",r?"bg-white/[0.09] text-foreground shadow-[inset_0_1px_0_rgba(255,255,255,0.06)]":"text-muted-foreground hover:bg-white/[0.04] hover:text-foreground"),children:(0,a.jsx)(o.A,{className:"size-4"})})]})})}},15053:(e,t,s)=>{Promise.resolve().then(s.t.bind(s,66872,23)),Promise.resolve().then(s.bind(s,52174)),Promise.resolve().then(s.bind(s,81998)),Promise.resolve().then(s.bind(s,81984)),Promise.resolve().then(s.bind(s,71886)),Promise.resolve().then(s.bind(s,434)),Promise.resolve().then(s.bind(s,48484)),Promise.resolve().then(s.bind(s,77242)),Promise.resolve().then(s.bind(s,10436)),Promise.resolve().then(s.bind(s,29510)),Promise.resolve().then(s.t.bind(s,35353,23)),Promise.resolve().then(s.t.bind(s,63494,23))},29510:(e,t,s)=>{"use strict";s.d(t,{UpdateBanner:()=>h});var a=s(95155),n=s(12115);let r=(0,s(30772).A)("circle-arrow-up",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);var i=s(9005),l=s(64577),o=s(99314),c=s(39593);function d(e){if("string"!=typeof e)return null;let t=e.trim().replace(/^v/i,"").match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?/);return t?[Number(t[1]),Number(t[2]??0),Number(t[3]??0)]:null}let u="beacon:update-dismissed";function h({currentVersion:e}){let[t,s]=(0,n.useState)(null),[x,p]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{let t=!1;return(async()=>{try{let a=await fetch(c.kw);if(!a.ok)return;let n=await a.json(),r="string"==typeof n?.version?n.version:"";if(t||!function(e,t){let s=d(e),a=d(t);if(!s||!a)return!1;for(let e=0;e<3;e++){if(s[e]>a[e])return!0;if(s[e]<a[e])break}return!1}(r,e)||localStorage.getItem(u)===r)return;s(r)}catch{}})(),()=>{t=!0}},[e]),!t)return null;let m=async()=>{try{await navigator.clipboard?.writeText(c.EO),p(!0),setTimeout(()=>p(!1),1600)}catch{}};return(0,a.jsx)("div",{className:"pointer-events-none fixed bottom-4 right-4 z-50 flex justify-end",children:(0,a.jsx)("div",{className:"glass pointer-events-auto w-[320px] rounded-xl p-3.5 shadow-xl",children:(0,a.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,a.jsx)(r,{className:"mt-0.5 size-4 shrink-0 text-[#ff7a45]"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-[13px] font-semibold tracking-tight text-foreground",children:"New version available"}),(0,a.jsx)("button",{type:"button",onClick:()=>{try{localStorage.setItem(u,t)}catch{}s(null)},"aria-label":"Dismiss",className:"shrink-0 rounded-md p-0.5 text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,a.jsx)(i.A,{className:"size-3.5"})})]}),(0,a.jsxs)("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[e," →"," ",(0,a.jsx)("span",{className:"text-foreground",children:t.replace(/^v/i,"")})," \xb7 update Beacon"]}),(0,a.jsxs)("button",{type:"button",onClick:m,title:"Copy the update command",className:"mt-2.5 flex w-full items-center justify-between gap-2 rounded-lg border border-white/10 bg-black/30 px-2.5 py-1.5 text-left font-mono text-[11px] text-muted-foreground transition-colors hover:border-white/20 hover:text-foreground",children:[(0,a.jsx)("span",{className:"truncate",children:c.EO}),x?(0,a.jsx)(l.A,{className:"size-3.5 shrink-0 text-[#ff7a45]"}):(0,a.jsx)(o.A,{className:"size-3.5 shrink-0"})]})]})]})})})}},35353:e=>{e.exports={style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"},className:"__className_246ccd",variable:"__variable_246ccd"}},38332:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(30772).A)("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]])},39593:(e,t,s)=>{"use strict";s.d(t,{EO:()=>i,kw:()=>n});var a=s(41463);let n="https://registry.npmjs.org/trybeacon/latest",r=(a.env.NEXT_PUBLIC_BEACON_SITE_URL??"https://www.trybeacon.sh").replace(/\/$/,""),i=`curl -fsSL ${r}/install.sh | sh`},48484:(e,t,s)=>{"use strict";s.d(t,{PlanProvider:()=>d,j:()=>u});var a=s(95155),n=s(12115),r=s(73321),i=s(60292),l=s(99979);let o={pending:!1,proposedAt:0,tables:0,endpoints:0,features:0},c=(0,n.createContext)(null);function d({children:e}){let t=(0,r.useRouter)(),[s,u]=(0,n.useState)(o),h=(0,n.useCallback)(async()=>{try{let e=await fetch("/api/plan",{method:"GET",cache:"no-store",headers:(0,i.dh)((0,l.X0)())});if(!e.ok)return;let t=await e.json();u(t)}catch{}},[]);(0,n.useEffect)(()=>{h();let e=setInterval(()=>void h(),4e3);return()=>clearInterval(e)},[h]);let x=(0,n.useCallback)(async()=>{await fetch("/api/plan",{method:"DELETE",headers:(0,i.dh)((0,l.X0)())}).catch(()=>{}),u(o),t.refresh()},[t]),p=(0,n.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,i.dh)((0,l.X0)())}).catch(()=>{}),u(o),t.refresh()},[t]);return(0,a.jsx)(c.Provider,{value:{status:s,discard:x,approvePlan:p,refresh:h},children:e})}function u(){let e=(0,n.useContext)(c);if(!e)throw Error("usePlan must be used inside PlanProvider");return e}},52174:(e,t,s)=>{"use strict";s.d(t,{MainRegion:()=>n});var a=s(95155);function n({children:e}){return(0,a.jsx)("main",{className:"flex flex-1 flex-col",children:e})}},52965:(e,t,s)=>{"use strict";s.d(t,{_:()=>n});var a=s(95155);function n({size:e=18,className:t}){return(0,a.jsxs)("svg",{width:e,height:e,viewBox:"20 22 56 56",fill:"none",className:t,"aria-hidden":"true",children:[(0,a.jsx)("path",{d:"M48 33 L72.5 73 L23.5 73 Z",fill:"none",stroke:"var(--accent-2, #ff7a45)",strokeWidth:7,strokeLinejoin:"round",strokeLinecap:"round"}),(0,a.jsx)("circle",{cx:"48",cy:"29.5",r:"7",fill:"var(--accent-2, #ff7a45)"})]})}},63494:e=>{e.exports={style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"},className:"__className_c29908",variable:"__variable_c29908"}},66872:()=>{},71886:(e,t,s)=>{"use strict";s.d(t,{NotesDrawer:()=>A});var a=s(95155),n=s(12115),r=s(82879),i=s(2125),l=s(9005),o=s(30772);let c=(0,o.A)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]),d=(0,o.A)("pin-off",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);var u=s(65738),h=s(82099),x=s(13439),p=s(95112),m=s(67357);let f=(0,o.A)("underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);var b=s(38332),g=s(8143),v=s(58309),w=s(5497),j=s(54682),k=s(93492);function N({value:e,onChange:t}){let s=(0,x.hG)({extensions:j.II,content:e?(0,j.Gd)(e):void 0,immediatelyRender:!1,editorProps:{attributes:{class:"note-prose focus:outline-none"}},onUpdate:({editor:e})=>t((0,j.Z2)(e.getJSON()))});return s?(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col",children:[(0,a.jsx)(y,{editor:s}),(0,a.jsx)(x.$Z,{editor:s,className:"min-h-0 flex-1 overflow-y-auto px-1 py-2 text-[14px] leading-relaxed"})]}):null}function y({editor:e}){(0,k.U)(e);let t=()=>e.chain().focus();return(0,a.jsxs)("div",{className:"flex items-center gap-0.5 border-b border-white/10 pb-2",children:[(0,a.jsx)(k.I,{label:"Bold",active:e.isActive("bold"),onClick:()=>t().toggleBold().run(),children:(0,a.jsx)(p.A,{className:"size-4"})}),(0,a.jsx)(k.I,{label:"Italic",active:e.isActive("italic"),onClick:()=>t().toggleItalic().run(),children:(0,a.jsx)(m.A,{className:"size-4"})}),(0,a.jsx)(k.I,{label:"Underline",active:e.isActive("underline"),onClick:()=>t().toggleUnderline().run(),children:(0,a.jsx)(f,{className:"size-4"})}),(0,a.jsx)(k.I,{label:"Strikethrough",active:e.isActive("strike"),onClick:()=>t().toggleStrike().run(),children:(0,a.jsx)(b.A,{className:"size-4"})}),(0,a.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,a.jsx)(k.I,{label:"Checklist",active:e.isActive("taskList"),onClick:()=>t().toggleTaskList().run(),children:(0,a.jsx)(g.A,{className:"size-4"})}),(0,a.jsx)(k.I,{label:"Bullet list",active:e.isActive("bulletList"),onClick:()=>t().toggleBulletList().run(),children:(0,a.jsx)(v.A,{className:"size-4"})}),(0,a.jsx)(k.I,{label:"Numbered list",active:e.isActive("orderedList"),onClick:()=>t().toggleOrderedList().run(),children:(0,a.jsx)(w.A,{className:"size-4"})})]})}var P=s(81984),S=s(91337);function C(e){return[...e].sort((e,t)=>e.pinned!==t.pinned?Number(t.pinned)-Number(e.pinned):t.updatedAt.localeCompare(e.updatedAt))}function A(){let{open:e,close:t}=(0,P.b)(),[s,o]=(0,n.useState)([]),[x,p]=(0,n.useState)(null),m=(0,n.useRef)({}),f=(0,n.useRef)({}),b=(0,n.useCallback)(e=>{clearTimeout(m.current[e]);let t=f.current[e];t&&(delete f.current[e],fetch(`/api/notes/${e}`,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)}).catch(()=>{}))},[]),g=(0,n.useCallback)((e,t)=>{f.current[e]={...f.current[e],...t},clearTimeout(m.current[e]),m.current[e]=setTimeout(()=>b(e),500)},[b]),v=(0,n.useCallback)(async()=>{try{let e=await fetch("/api/notes",{cache:"no-store"});if(!e.ok)return;let t=await e.json();o(C(t)),p(e=>e??t[0]?.id??null)}catch{}},[]);(0,n.useEffect)(()=>{e?v():Object.keys(f.current).forEach(b)},[e,v,b]);let w=(0,n.useCallback)(async()=>{let e=await fetch("/api/notes",{method:"POST"}).catch(()=>null);if(!e?.ok)return;let t=await e.json();o(e=>C([t,...e])),p(t.id)},[]),j=(0,n.useCallback)(async e=>{clearTimeout(m.current[e]),delete f.current[e],o(t=>{let s=t.filter(t=>t.id!==e);return p(t=>t===e?s[0]?.id??null:t),s}),await fetch(`/api/notes/${e}`,{method:"DELETE"}).catch(()=>{})},[]),k=(0,n.useCallback)((e,t)=>{o(s=>C(s.map(s=>s.id===e?{...s,...t,updatedAt:new Date().toISOString()}:s))),g(e,t)},[g]),y=(0,n.useCallback)(e=>k(e.id,{pinned:!e.pinned}),[k]),A=s.find(e=>e.id===x)??null;return(0,a.jsx)("div",{"aria-hidden":!e,className:(0,S.cn)("fixed inset-y-0 right-0 z-40 flex transition-transform duration-300 ease-out",e?"translate-x-0":"pointer-events-none translate-x-full"),children:(0,a.jsxs)(h.b,{className:"flex h-full w-[420px] flex-col rounded-l-2xl border-l border-white/10",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 border-b border-white/10 px-3 py-2.5",children:[(0,a.jsx)(r.A,{className:"size-4 text-[var(--accent-2,#ff7a45)]"}),(0,a.jsx)("span",{className:"text-sm font-semibold tracking-tight",children:"Notes"}),(0,a.jsx)("span",{className:"ml-auto"}),(0,a.jsx)("button",{type:"button",onClick:w,"aria-label":"New note",title:"New note",className:"rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,a.jsx)(i.A,{className:"size-4"})}),(0,a.jsx)("button",{type:"button",onClick:t,"aria-label":"Close notes",title:"Close",className:"rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,a.jsx)(l.A,{className:"size-4"})})]}),(0,a.jsx)("div",{className:"max-h-44 shrink-0 overflow-y-auto border-b border-white/10 p-1.5",children:0===s.length?(0,a.jsxs)("p",{className:"px-2 py-3 text-[13px] text-muted-foreground",children:["No notes yet. Hit ",(0,a.jsx)("span",{className:"text-foreground",children:"+"})," to start one."]}):s.map(e=>(0,a.jsxs)("div",{className:(0,S.cn)("group flex items-center gap-1 rounded-md px-2 py-1.5 text-[13px]",e.id===x?"bg-white/[0.09] text-foreground":"text-muted-foreground hover:bg-white/[0.04]"),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>p(e.id),className:"min-w-0 flex-1 truncate text-left",children:[e.pinned&&(0,a.jsx)(c,{className:"mr-1 inline size-3 -translate-y-px"}),e.title||"Untitled"]}),(0,a.jsx)("button",{type:"button",onClick:()=>y(e),"aria-label":e.pinned?"Unpin":"Pin",title:e.pinned?"Unpin":"Pin",className:"rounded p-1 opacity-0 transition hover:bg-white/[0.08] hover:text-foreground group-hover:opacity-100",children:e.pinned?(0,a.jsx)(d,{className:"size-3.5"}):(0,a.jsx)(c,{className:"size-3.5"})}),(0,a.jsx)("button",{type:"button",onClick:()=>j(e.id),"aria-label":"Delete note",title:"Delete",className:"rounded p-1 opacity-0 transition hover:bg-white/[0.08] hover:text-red-300 group-hover:opacity-100",children:(0,a.jsx)(u.A,{className:"size-3.5"})})]},e.id))}),A?(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-2 p-3",children:[(0,a.jsx)("input",{value:A.title,onChange:e=>k(A.id,{title:e.target.value}),placeholder:"Untitled",className:"w-full bg-transparent text-base font-semibold tracking-tight text-foreground placeholder:text-muted-foreground/60 focus:outline-none"}),(0,a.jsx)(N,{value:A.body,onChange:e=>k(A.id,{body:e})},A.id)]}):(0,a.jsxs)("div",{className:"flex flex-1 items-center justify-center p-6 text-center text-[13px] text-muted-foreground",children:["Select a note, or create one. Then ",(0,a.jsx)("span",{className:"px-1 text-foreground",children:"@"}),"-mention it in your terminal to turn it into features."]})]})})}},77242:(e,t,s)=>{"use strict";s.d(t,{TabWorkspace:()=>i});var a=s(12115),n=s(73321),r=s(60292);function i(){let e=(0,n.useRouter)(),t=(0,n.usePathname)();return(0,a.useEffect)(()=>{let e=window.fetch;if(e.__beaconPinned)return;let t=(t,s)=>{try{let a=(0,r.fk)();if(a){let n=window.location.origin;if(t instanceof Request){if((0,r.q0)(t.url,n)&&!t.headers.has("x-beacon-workspace")){let n=new Headers(t.headers);return n.set("x-beacon-workspace",a),e(new Request(t,{headers:n}),s)}}else{let i="string"==typeof t?t:t.href;if((0,r.q0)(i,n)){let n=new Headers(s?.headers);if(!n.has("x-beacon-workspace"))return n.set("x-beacon-workspace",a),e(t,{...s,headers:n})}}}}catch{}return e(t,s)};return t.__beaconPinned=!0,window.fetch=t,()=>{window.fetch=e}},[]),(0,a.useEffect)(()=>{let s=new URLSearchParams(window.location.search).get("ws");if(s){try{sessionStorage.setItem(r.Bz,s)}catch{}return}let a=null;try{a=sessionStorage.getItem(r.Bz)}catch{}if(!a)return;let n=new URLSearchParams(window.location.search);n.set("ws",a),e.replace(`${t}?${n.toString()}`)},[t,e]),null}},81984:(e,t,s)=>{"use strict";s.d(t,{NotesProvider:()=>i,b:()=>l});var a=s(95155),n=s(12115);let r=(0,n.createContext)(null);function i({children:e}){let[t,s]=(0,n.useState)(!1),l=(0,n.useCallback)(()=>s(!0),[]),o=(0,n.useCallback)(()=>s(!1),[]),c=(0,n.useCallback)(()=>s(e=>!e),[]),d=(0,n.useMemo)(()=>({open:t,openDrawer:l,close:o,toggle:c}),[t,l,o,c]);return(0,a.jsx)(r.Provider,{value:d,children:e})}function l(){let e=(0,n.useContext)(r);if(!e)throw Error("useNotes must be used inside NotesProvider");return e}},81998:(e,t,s)=>{"use strict";s.d(t,{LiveRefresh:()=>l});var a=s(12115),n=s(73321);let r={primed:!1,lastV:-1,lastNavSeq:-1};var i=s(60292);function l(){let e=(0,n.useRouter)();return(0,a.useEffect)(()=>{let t=(0,i.fk)(),s=new EventSource(t?`/api/stream?ws=${encodeURIComponent(t)}`:"/api/stream"),a=r;return s.onopen=()=>{a=r},s.onmessage=t=>{var s,n;let r;try{r=JSON.parse(t.data)}catch{e.refresh();return}let{state:i,action:l}=(s=a,n={v:"number"==typeof r.v?r.v:0,navSeq:r.nav?.seq??0,navPath:r.nav?.path??""},s.primed?n.navSeq!==s.lastNavSeq?{state:{primed:!0,lastV:n.v,lastNavSeq:n.navSeq},action:{kind:"push",path:n.navPath}}:n.v!==s.lastV?{state:{...s,lastV:n.v},action:{kind:"refresh"}}:{state:s,action:{kind:"none"}}:{state:{primed:!0,lastV:n.v,lastNavSeq:n.navSeq},action:{kind:"none"}});if(a=i,"refresh"===l.kind)e.refresh();else if("push"===l.kind&&l.path){e.push(l.path);try{window.focus()}catch{}}},()=>s.close()},[e]),null}},82879:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(30772).A)("sticky-note",[["path",{d:"M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",key:"1dfntj"}],["path",{d:"M15 3v5a1 1 0 0 0 1 1h5",key:"6s6qgf"}]])},99979:(e,t,s)=>{"use strict";function a(){return new URLSearchParams(window.location.search).get("ws")}function n(){return new URLSearchParams(window.location.search).get("plan")}function r(e){let t=new URLSearchParams,s=a();s&&t.set("ws",s);let r=n();for(let[s,a]of(r&&t.set("plan",r),Object.entries(e??{})))""===a?t.delete(s):t.set(s,a);let i=t.toString();return i?`/plan?${i}`:"/plan"}s.d(t,{X0:()=>a,d8:()=>n,rc:()=>r})}},e=>{e.O(0,[7513,7352,5004,277,8500,4888,8997,9887,2231,8441,3794,7358],()=>e(e.s=15053)),_N_E=e.O()}]);
@@ -1,11 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6624],{22137:(e,t,n)=>{Promise.resolve().then(n.bind(n,87883))},48484:(e,t,n)=>{"use strict";n.d(t,{PlanProvider:()=>c,j:()=>u});var s=n(95155),r=n(12115),a=n(73321),o=n(60292),l=n(99979);let i={pending:!1,proposedAt:0,tables:0,endpoints:0,features:0},d=(0,r.createContext)(null);function c({children:e}){let t=(0,a.useRouter)(),[n,u]=(0,r.useState)(i),h=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/plan",{method:"GET",cache:"no-store",headers:(0,o.dh)((0,l.X0)())});if(!e.ok)return;let t=await e.json();u(t)}catch{}},[]);(0,r.useEffect)(()=>{h();let e=setInterval(()=>void h(),4e3);return()=>clearInterval(e)},[h]);let m=(0,r.useCallback)(async()=>{await fetch("/api/plan",{method:"DELETE",headers:(0,o.dh)((0,l.X0)())}).catch(()=>{}),u(i),t.refresh()},[t]),x=(0,r.useCallback)(async()=>{await fetch("/api/plan/approve",{method:"POST",headers:(0,o.dh)((0,l.X0)())}).catch(()=>{}),u(i),t.refresh()},[t]);return(0,s.jsx)(d.Provider,{value:{status:n,discard:m,approvePlan:x,refresh:h},children:e})}function u(){let e=(0,r.useContext)(d);if(!e)throw Error("usePlan must be used inside PlanProvider");return e}},87883:(e,t,n)=>{"use strict";n.d(t,{PlanWorkspace:()=>eZ});var s=n(95155),r=n(12115),a=n(32159),o=n(6059),l=n(64577),i=n(25640),d=n(34306),c=n(92571),u=n(65408),h=n(45486),m=n(25494),x=n(17356),p=n(9383),f=n(9005),g=n(65738),b=n(8962),v=n(73321),j=n(48484),y=n(99979),w=n(60292),k=n(32133),N=n(38332),C=n(91337);function S(e,t,n,s,r,a,o=8){return{left:Math.max(o,Math.min(e,r-n-o)),top:Math.max(o,Math.min(t,a-s-o))}}var A=n(51909);let z="u">typeof CSS&&"highlights"in CSS&&"u">typeof Highlight,E="beacon-pending",$="beacon-annotation",R="beacon-deletion";function M(){return z?CSS.highlights:null}function D(...e){return new globalThis.Highlight(...e)}function P(e){let t=e.getClientRects(),n=t.length?t[t.length-1]:e.getBoundingClientRect();return{x:n.right,y:n.bottom}}function O({markdown:e,round:t,onApi:n,hideSubmit:a=!1,getExtraSubmitPayload:o}){let[i,d]=(0,r.useState)([]),[c,u]=(0,r.useState)(""),[h,m]=(0,r.useState)(!1),[x,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),[j,A]=(0,r.useState)(null),[I,F]=(0,r.useState)(!1),[B,H]=(0,r.useState)(!1),U=(0,r.useRef)(null),K=(0,r.useRef)(null),q=(0,r.useRef)(null);(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let t=await fetch("/api/plan/annotations",{cache:"no-store",headers:(0,w.dh)((0,y.X0)())});if(!t.ok)return;let n=await t.json();if(!e)return;d(n.annotations??[]),u(n.globalComment??""),H(!!n.submitted)}catch{}})(),()=>{e=!1}},[e,t]),(0,r.useEffect)(()=>{if(B)return;let e=setTimeout(()=>{fetch("/api/plan/annotations",{method:"PUT",headers:{"content-type":"application/json",...(0,w.dh)((0,y.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t})}).catch(()=>{})},400);return()=>clearTimeout(e)},[i,c,B,t]);let X=(0,r.useCallback)(()=>{let e=window.getSelection();if(!e||e.isCollapsed)return void g(null);let t=e.toString().trim();if(!t)return void g(null);if(!U.current?.contains(e.anchorNode))return;let{x:n,y:s}=P(e.getRangeAt(0));g({x:n,y:s,excerpt:t})},[]);(0,r.useEffect)(()=>{let e=()=>setTimeout(X,0);return document.addEventListener("mouseup",e),document.addEventListener("selectionchange",e),()=>{document.removeEventListener("mouseup",e),document.removeEventListener("selectionchange",e)}},[X]);let G=(0,r.useCallback)((e,t="comment",n="")=>{let s=`a-${Date.now()}-${Math.floor(1e6*Math.random())}`;d(r=>[...r,{id:s,excerpt:e,comment:n,kind:t}]),"comment"===t&&A(s),g(null),window.getSelection()?.removeAllRanges()},[]);(0,r.useEffect)(()=>{let e=e=>{let t=window.getSelection();if(!t||t.isCollapsed)return;let n=t.toString().trim();if(!n||!U.current?.contains(t.anchorNode))return;let s=document.activeElement;if(s&&/^(TEXTAREA|INPUT)$/.test(s.tagName)||!(1===e.key.length&&!e.metaKey&&!e.ctrlKey&&!e.altKey))return;e.preventDefault();let r=t.getRangeAt(0);q.current=r.cloneRange();let{x:a,y:o}=P(r);v({x:a,y:o,excerpt:n,seed:e.key}),g(null),window.getSelection()?.removeAllRanges()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),(0,r.useEffect)(()=>{let e=M();if(!b||!e)return;let t=q.current;if(t)return e.set(E,D(t)),()=>{e.delete(E)}},[b]),(0,r.useEffect)(()=>{let e=M();if(!e||!U.current)return;let t=[],n=[];for(let e of i){let s=function(e,t){if(!t)return null;let n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:e=>e.parentElement?.closest("pre, table")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),s=[],r="";for(let e=n.nextNode();e;e=n.nextNode())s.push({node:e,start:r.length}),r+=e.nodeValue??"";let a=r.indexOf(t);if(a<0)return null;let o=e=>{for(let t=s.length-1;t>=0;t--)if(s[t].start<=e)return{node:s[t].node,offset:e-s[t].start};return null},l=o(a),i=o(a+t.length);if(!l||!i)return null;let d=document.createRange();return d.setStart(l.node,l.offset),d.setEnd(i.node,i.offset),d}(U.current,e.excerpt);s&&((e.kind??"comment")==="deletion"?n:t).push(s)}let s=(t,n)=>n.length?e.set(t,D(...n)):e.delete(t);return s($,t),s(R,n),()=>{e.delete($),e.delete(R)}},[i,e]),(0,r.useEffect)(()=>{if(!h)return;let e=e=>{let t=e.target;!t||K.current?.contains(t)||t.closest("[data-overall-toggle]")||m(!1)},t=e=>{"Escape"===e.key&&m(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[h]);let _=(e,t)=>d(n=>n.map(n=>n.id===e?{...n,comment:t}:n)),V=e=>d(t=>t.filter(t=>t.id!==e)),W=()=>{d([]),u(""),m(!1),fetch("/api/plan/annotations",{method:"DELETE",headers:(0,w.dh)((0,y.X0)())}).catch(()=>{})},J=async()=>{if(!I){F(!0);try{let e=o?.()??{},n=await fetch("/api/plan/annotations",{method:"POST",headers:{"content-type":"application/json",...(0,w.dh)((0,y.X0)())},body:JSON.stringify({annotations:i,globalComment:c,round:t,...e})});n.ok?H(!0):409===n.status&&window.location.reload()}finally{F(!1)}}},Q=(0,r.useMemo)(()=>i.filter(e=>"deletion"===e.kind||e.comment.trim()).length+ +!!c.trim(),[i,c]);return(0,r.useEffect)(()=>{n?.({liveCount:Q,submitting:I,submitted:B,submit:()=>void J(),clearAll:W,annotationCount:i.length,hasGlobalComment:!!c.trim(),globalOpen:h,toggleOverall:()=>m(e=>!e),annotations:i,updateComment:_,removeAnnotation:V,focusOnAnnotation:e=>A(e),addComment:e=>G(e,"comment")})},[Q,I,B,i,c,h]),(0,s.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,s.jsx)("div",{className:"relative shrink-0",children:(0,s.jsxs)("div",{className:"absolute right-3 top-2 z-30 flex items-center gap-1",children:[!a&&(0,s.jsxs)("button",{onClick:()=>void J(),disabled:I||0===Q,className:(0,C.cn)("flex items-center gap-1 rounded-md border px-2 py-1 text-[11px] font-semibold transition-colors",B?"border-emerald-500/40 bg-emerald-500/15 text-emerald-300":0===Q?"border-white/10 text-muted-foreground opacity-50":"border-sky-500/40 bg-sky-500/15 text-sky-300 hover:bg-sky-500/25"),title:B?"Submitted — your terminal session is reading the feedback":"Submit all feedback so the agent can revise the plan",children:[B?(0,s.jsx)(l.A,{className:"size-3"}):(0,s.jsx)(p.A,{className:"size-3"}),B?"Submitted":"Submit feedback"]}),h&&(0,s.jsxs)("div",{ref:K,className:"absolute right-0 top-[calc(100%+6px)] z-50 w-[320px] rounded-md border border-white/10 bg-card p-2 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("button",{onClick:()=>m(!1),title:"Close (Esc)",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(f.A,{className:"size-3"})})]}),(0,s.jsx)("textarea",{autoFocus:!0,value:c,onChange:e=>u(e.target.value),onKeyDown:e=>{e.stopPropagation(),"Enter"===e.key&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),!I&&Q>0&&(J(),m(!1))):"Escape"===e.key&&(e.preventDefault(),m(!1))},placeholder:"Plan-level notes — e.g. 'split this into two phases' or 'wrong abstraction'…",rows:4,className:"w-full resize-y rounded border border-white/5 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("div",{className:"mt-1 text-right text-[9px] text-muted-foreground/70",children:"⌘/Ctrl+Enter to submit \xb7 Esc to close"})]})]})}),(0,s.jsx)("div",{ref:U,className:"min-h-0 flex-1 overflow-y-auto px-5 pb-5 pt-16 text-[15px] leading-[1.6] selection:bg-[var(--accent-2,#ff7a45)]/30",children:(0,s.jsx)(L,{markdown:e,annotations:b&&!z?[...i,{id:"__pending",excerpt:b.excerpt,comment:"",kind:"comment"}]:i,focusOnId:j,onClearFocus:()=>A(null),onUpdate:_,onRemove:V})}),x&&(0,s.jsxs)("div",{style:function(e,t){let{left:n,top:s}=S(e,t,76,34,window.innerWidth,window.innerHeight);return{position:"fixed",left:n,top:s,zIndex:60}}(x.x+4,x.y+6),className:"flex items-center gap-0.5 rounded-md border border-white/15 bg-card/95 p-0.5 shadow-lg backdrop-blur",children:[(0,s.jsx)("button",{onClick:()=>{let e=window.getSelection();q.current=e&&e.rangeCount?e.getRangeAt(0).cloneRange():null,v({...x,seed:""}),g(null),e?.removeAllRanges()},title:"Comment on this text",className:"rounded p-1 text-sky-300 hover:bg-sky-500/15",children:(0,s.jsx)(k.A,{className:"size-3.5"})}),(0,s.jsx)("button",{onClick:()=>G(x.excerpt,"deletion"),title:"Mark this for deletion",className:"rounded p-1 text-red-300 hover:bg-red-500/15",children:(0,s.jsx)(N.A,{className:"size-3.5"})})]}),b&&(0,s.jsx)(T,{excerpt:b.excerpt,x:b.x,y:b.y,seed:b.seed,onConfirm:e=>{G(b.excerpt,"comment",e),v(null)},onCancel:()=>v(null)})]})}function T({excerpt:e,x:t,y:n,seed:a,onConfirm:o,onCancel:i}){let[d,c]=(0,r.useState)(a),u=(0,r.useRef)(null),[h,m]=(0,r.useState)(()=>S(t+4,n+6,256,130,window.innerWidth,window.innerHeight));(0,r.useLayoutEffect)(()=>{let e=u.current;if(!e)return;let{width:s,height:r}=e.getBoundingClientRect();m(S(t+4,n+6,s,r,window.innerWidth,window.innerHeight))},[t,n]);let x=()=>d.trim()?o(d.trim()):i();return(0,s.jsxs)("div",{ref:u,style:{position:"fixed",left:h.left,top:h.top,zIndex:60},className:"w-64 rounded-md border border-white/15 bg-card/95 p-1.5 shadow-xl backdrop-blur",onBlur:e=>{u.current?.contains(e.relatedTarget)||x()},children:[(0,s.jsxs)("div",{className:"mb-1 line-clamp-1 text-[10px] text-muted-foreground",children:["“",e,"”"]}),(0,s.jsx)("textarea",{autoFocus:!0,value:d,onChange:e=>c(e.target.value),onFocus:e=>e.currentTarget.setSelectionRange(d.length,d.length),placeholder:"Comment… (Enter to add \xb7 Esc to discard)",onKeyDown:e=>{e.stopPropagation(),"Enter"!==e.key||e.shiftKey?"Escape"===e.key&&(e.preventDefault(),i()):(e.preventDefault(),x())},className:"h-16 w-full resize-none rounded bg-white/[0.05] px-1.5 py-1 text-xs outline-none placeholder:text-muted-foreground/50 focus:bg-white/[0.08]"}),(0,s.jsxs)("div",{className:"mt-1 flex items-center justify-end gap-1",children:[(0,s.jsxs)("button",{type:"button",onClick:i,title:"Discard this comment (Esc)",className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",children:[(0,s.jsx)(f.A,{className:"size-3"}),"Discard"]}),(0,s.jsxs)("button",{type:"button",onClick:x,disabled:!d.trim(),title:"Add this comment (Enter)",className:"flex items-center gap-1 rounded bg-sky-500/15 px-1.5 py-0.5 text-[10px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/25 disabled:opacity-40",children:[(0,s.jsx)(l.A,{className:"size-3"}),"Add"]})]})]})}function I({annotations:e,updateComment:t,removeAnnotation:n,focusOnAnnotation:r,onClose:a}){return 0===e.length?(0,s.jsx)("div",{className:"rounded-lg border border-dashed border-white/10 px-3 py-6 text-center text-[11px] text-muted-foreground",children:"Highlight any text in the plan to leave an inline comment."}):(0,s.jsx)("ul",{className:"space-y-1.5",children:e.map(e=>(0,s.jsx)("li",{className:(0,C.cn)("group rounded-md border bg-background/30 px-2 py-1.5 transition-colors hover:bg-background/50","deletion"===e.kind?"border-red-500/25":"border-sky-500/15"),children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>{r(e.id),a?.()},title:"Jump to this excerpt in the plan",className:(0,C.cn)("block w-full truncate text-left text-[10.5px] font-mono","deletion"===e.kind?"text-red-300/90 line-through":"text-foreground/80 hover:text-foreground"),children:["“",e.excerpt,"”"]}),"deletion"!==e.kind&&(0,s.jsx)("textarea",{value:e.comment,onChange:n=>t(e.id,n.target.value),placeholder:"Write your comment…",rows:1,className:"field-sizing-content mt-1 w-full resize-none bg-transparent text-[11px] leading-snug text-foreground/90 outline-none placeholder:text-muted-foreground/60 focus:text-foreground"})]}),(0,s.jsx)("button",{onClick:()=>n(e.id),title:"Remove this annotation",className:"shrink-0 rounded p-1 text-muted-foreground/70 opacity-0 transition-opacity hover:bg-red-500/15 hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(g.A,{className:"size-3"})})]})},e.id))})}function L({markdown:e,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l}){let i=(0,r.useMemo)(()=>(0,A.n$)(e),[e]);return(0,s.jsx)("div",{className:"mx-auto w-full max-w-[66ch] space-y-4",children:i.map((e,r)=>(0,s.jsx)(F,{block:e,index:r,annotations:t,focusOnId:n,onClearFocus:a,onUpdate:o,onRemove:l},r))})}function F({block:e,index:t,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}){if("code"===e.kind)return(0,s.jsx)(A.NG,{text:e.text});if("table"===e.kind)return(0,s.jsx)(A.QH,{block:e});let i=(0,s.jsx)(B,{text:e.text,annotations:n,focusOnId:r,onClearFocus:a,onUpdate:o,onRemove:l}),d=(0,A.Vq)(e.kind)?(0,A.vB)(t):void 0;return(0,s.jsx)(s.Fragment,{children:(0,A.aM)(e,i,"reading",d)})}function B({text:e,annotations:t,focusOnId:n,onClearFocus:r,onUpdate:a,onRemove:o}){let l=(z?[]:t).map(t=>({a:t,idx:e.indexOf(t.excerpt)})).filter(e=>e.idx>=0).sort((e,t)=>e.idx-t.idx);if(!l.length)return(0,s.jsx)(U,{text:e});let i=[],d=0;for(let{a:t,idx:c}of l)c<d||(c>d&&i.push((0,s.jsx)(U,{text:e.slice(d,c)},`p-${d}`)),i.push((0,s.jsx)(H,{annotation:t,autoFocus:n===t.id,onClearFocus:r,onUpdate:a,onRemove:o},t.id)),d=c+t.excerpt.length);return d<e.length&&i.push((0,s.jsx)(U,{text:e.slice(d)},"p-tail")),(0,s.jsx)(s.Fragment,{children:i})}function H({annotation:e,autoFocus:t,onClearFocus:n,onUpdate:a,onRemove:o}){let l=(0,r.useRef)(null);return((0,r.useEffect)(()=>{if(t&&l.current){l.current.focus();let e=l.current.value;l.current.setSelectionRange(e.length,e.length),n()}},[t,n]),"deletion"===(e.kind??"comment"))?(0,s.jsxs)("span",{className:"relative inline",children:[(0,s.jsx)("span",{className:"rounded bg-red-500/15 px-0.5 text-red-200/90 line-through decoration-red-300/70 decoration-2",children:(0,s.jsx)(U,{text:e.excerpt})}),(0,s.jsx)("button",{type:"button",onClick:()=>o(e.id),title:"Unmark",className:"ml-0.5 inline-flex translate-y-[-1px] items-center text-red-300/70 hover:text-red-300",children:(0,s.jsx)(g.A,{className:"size-3"})})]}):(0,s.jsx)("span",{className:"rounded bg-[var(--accent-2,#ff7a45)]/15 px-0.5","data-annotation-id":e.id,children:(0,s.jsx)(U,{text:e.excerpt})})}function U({text:e}){return(0,s.jsx)(A.cV,{text:e})}var K=n(31966),q=n(69058),X=n(69272),G=n(85909),_=n(44853),V=n(5937),W=n(74350),J=n(89793),Q=n(96719);function Y({planId:e,className:t,title:n="Share a read-only link to this plan"}){let[a,o]=(0,r.useState)(!1),{status:l,url:i,error:d,copied:u,mint:h,copy:m,reset:x}=(0,J.b)();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",title:n,onClick:function(){x(),o(!0),h({kind:"plan",...e?{planId:e}:{}})},className:t??"glass flex size-8 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground",children:(0,s.jsx)(V.A,{className:"size-3.5"})}),(0,s.jsx)(W.lG,{open:a,onOpenChange:o,children:(0,s.jsxs)(W.Cf,{children:[(0,s.jsxs)(W.c7,{children:[(0,s.jsx)(W.L3,{children:"Share this plan"}),(0,s.jsx)(W.rr,{children:"Anyone with the link can view this plan and its boards — no Beacon needed. Links expire after 7 days."})]}),"loading"===l&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[12px] text-muted-foreground",children:[(0,s.jsx)(c.A,{className:"size-4 animate-spin"})," Creating link…"]}),"done"===l&&(0,s.jsx)(Q.F,{url:i,copied:u,onCopy:m}),"error"===l&&(0,s.jsx)("p",{className:"text-[12px] text-red-400",children:d})]})})]})}var Z=n(66616),ee=n(36849);let et="beacon:plan-history-sidebar";function en({pendingPlan:e=!1,workspaceId:t}){let n=(0,v.useRouter)(),[o,c]=(0,r.useState)([]),[u,h]=(0,r.useState)(null),[m,x]=(0,r.useState)(null),[p,g]=(0,r.useState)(null),[b,j]=(0,r.useState)("map"),[w,k]=(0,r.useState)(()=>{try{return"0"!==window.localStorage.getItem(et)}catch{return!0}}),N=(0,r.useCallback)(()=>{k(e=>{let t=!e;try{localStorage.setItem(et,t?"1":"0")}catch{}return t})},[]),S=(0,r.useCallback)(e=>{h(e);try{window.history.replaceState(window.history.state,"",(0,y.rc)({view:"history",plan:e}))}catch{}},[]);(0,r.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/plan/history");if(!e.ok)return;let t=await e.json();if(c(t.items),g(t.activePlanId??null),t.items.length&&!u){let e=(0,y.d8)();h(e&&t.items.some(t=>t.id===e)?e:t.items[0].id)}}catch{}})()},[]),(0,r.useEffect)(()=>{u&&(async()=>{let e=await fetch(`/api/plan/history?id=${encodeURIComponent(u)}`);e.ok&&x(await e.json())})()},[u]);let z=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let n of e){let e=new Date(n.archivedAt).toLocaleDateString(void 0,{weekday:"short",month:"short",day:"numeric"});t.has(e)||t.set(e,[]),t.get(e).push(n)}return Array.from(t.entries())})(o),[o]),E=(0,r.useMemo)(()=>(function(e){let t=e?.features??[];if(0===t.length)return{nodes:[],edges:[]};let n=new Map;t.forEach((e,t)=>{let s=e.title.trim();n.has(s)||n.set(s,`arch-${t}`)});let s=(e,t)=>n.get(e.title.trim())??`arch-${t}`,r=t.map((e,t)=>({id:s(e,t),parentId:null,cluster:e.cluster??null,status:"PENDING",priority:e.priority??2,title:e.title,role:e.role??null})),a=(0,ee.VI)(r,"cluster"),o=t.map((e,t)=>{let n=s(e,t),r=a.get(n)??{x:0,y:0};return{id:n,view:"ROADMAP",kind:e.kind??"FEATURE",cluster:e.cluster??null,layer:e.layer??null,title:e.title,role:e.role??null,plain:e.plain??null,status:"PENDING",priority:e.priority??2,x:r.x,y:r.y,source:"DRAFT",sourceRef:null,parentId:null,isCriterion:!1,files:[],bugFlags:[]}}),l=[];return t.forEach((e,t)=>{let r=s(e,t);for(let t of e.dependsOn??[]){let e=n.get(t.trim());e&&e!==r&&l.push({id:`arch-edge-${r}-${e}`,fromId:r,toId:e,kind:"DEPENDS",label:"depends on",sourceHandle:null,targetHandle:null})}}),{nodes:o,edges:l}})(m?.featureGraph),[m]),$=E.nodes.length>0,R=(m?.draftDoc?.tables.length??0)>0||(m?.draftDoc?.endpoints.length??0)>0,M=$||R,D="map"!==b||$?"db"!==b||R?b:"map":"db",P=!!m&&""===m.markdown.replace(/^#[^\n]*\n?/,"").trim(),O=e?(0,s.jsxs)("button",{onClick:()=>n.push((0,y.rc)()),className:"glass pointer-events-auto mb-1 ml-3 mt-1 flex h-8 w-fit shrink-0 items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-sky-300 transition-colors hover:bg-sky-500/15",title:"Return to the plan that's still pending review",children:[(0,s.jsx)(K.A,{className:"size-3.5"})," Back to current plan"]}):null;return 0===o.length?(0,s.jsxs)("div",{className:"flex h-screen min-h-0 flex-col pt-14",children:[O,(0,s.jsx)("div",{className:"flex flex-1 items-center justify-center px-6 text-center",children:(0,s.jsxs)("div",{className:"max-w-md text-sm text-muted-foreground",children:[(0,s.jsx)(a.A,{className:"mx-auto mb-3 size-7 text-muted-foreground/40"}),(0,s.jsx)("div",{className:"mb-2 text-base font-semibold text-foreground",children:"No plans yet."}),"Ask the agent to propose a feature in your terminal session — it lands here via MCP and you can review + annotate on both sides. Past plans get archived to this page for browsing."]})})]}):(0,s.jsxs)("div",{className:"flex h-screen min-h-0 flex-col pt-14",children:[O,m&&(0,s.jsxs)("div",{className:"glass pointer-events-auto fixed right-3 top-3 z-30 flex h-9 items-center gap-2 rounded-full px-3",children:[(0,s.jsx)("span",{className:(0,C.cn)("rounded px-1.5 py-0.5 text-[9px] font-semibold uppercase tracking-wide","approved"===m.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),children:m.verdict}),(0,s.jsx)("span",{className:"text-[10px] text-muted-foreground",children:new Date(m.archivedAt).toLocaleString()}),(0,s.jsx)("span",{"aria-hidden":!0,className:"h-4 w-px bg-white/10"}),(0,s.jsx)(Y,{planId:m.id,className:"flex size-6 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground"})]}),(0,s.jsxs)("div",{className:"flex min-h-0 flex-1",children:[w?(0,s.jsxs)("aside",{className:"flex w-64 min-w-0 shrink-0 flex-col border-r border-white/5 bg-card/30",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-white/5 px-3 py-2",children:[(0,s.jsxs)("span",{className:"text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground",children:["Plan history \xb7 ",o.length]}),(0,s.jsx)("button",{onClick:N,title:"Collapse history",className:"flex size-5 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(q.A,{className:"size-3.5"})})]}),(0,s.jsx)("ul",{className:"min-h-0 flex-1 overflow-y-auto",children:z.map(([e,t])=>(0,s.jsxs)("li",{children:[(0,s.jsx)("div",{className:"px-3 pb-1 pt-3 text-[9px] font-semibold uppercase tracking-widest text-muted-foreground/60",children:e}),(0,s.jsx)("ul",{children:t.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("button",{onClick:()=>S(e.id),className:(0,C.cn)("flex w-full items-start gap-1.5 px-3 py-1.5 text-left text-[12px] transition-colors",u===e.id?"bg-white/[0.06] text-foreground":"text-muted-foreground hover:bg-white/[0.03] hover:text-foreground"),children:[(0,s.jsx)("span",{className:(0,C.cn)("mt-0.5 inline-flex size-3.5 shrink-0 items-center justify-center rounded-full","approved"===e.verdict?"bg-emerald-500/15 text-emerald-300":"bg-red-500/15 text-red-300"),title:e.verdict,children:"approved"===e.verdict?(0,s.jsx)(l.A,{className:"size-2.5"}):(0,s.jsx)(f.A,{className:"size-2.5"})}),(0,s.jsx)("span",{className:"line-clamp-2 min-w-0 flex-1",children:e.description}),p===e.id&&(0,s.jsxs)("span",{title:"This plan is currently being executed",className:"mt-0.5 flex shrink-0 items-center gap-1 text-[9px] font-semibold uppercase tracking-wide text-[#ff7a45]",children:[(0,s.jsxs)("span",{className:"relative flex size-1.5",children:[(0,s.jsx)("span",{className:"absolute inline-flex size-full animate-ping rounded-full bg-[#ff7a45] opacity-75"}),(0,s.jsx)("span",{className:"relative inline-flex size-1.5 rounded-full bg-[#ff7a45]"})]}),"Live"]})]})},e.id))})]},e))})]}):(0,s.jsx)("aside",{className:"flex w-10 shrink-0 flex-col items-center border-r border-white/5 bg-card/30 py-2",children:(0,s.jsx)("button",{onClick:N,title:`Show plan history \xb7 ${o.length}`,className:"flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(X.A,{className:"size-4"})})}),m?(0,s.jsxs)("div",{className:"flex min-h-0 min-w-0 flex-1",children:[(0,s.jsx)("div",{className:(0,C.cn)("relative flex min-h-0 min-w-0 flex-col",!M&&"flex-1"),style:M?{width:"44%"}:void 0,children:(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:[(0,s.jsx)(A.pO,{markdown:m.markdown}),P&&(0,s.jsx)("p",{className:"mt-2 text-[13px] text-muted-foreground",children:(m.featureGraph?.features?.length??0)===0&&(m.draftDoc?.tables?.length??0)===0&&(m.draftDoc?.endpoints?.length??0)===0?"This plan was approved without a detailed write-up — no features or schema were attached either.":"This plan has no written body. See the Features and Schema canvases for what it proposed."}),m.globalComment&&(0,s.jsxs)("div",{className:"mt-4 rounded-lg border border-white/5 bg-card/40 p-3",children:[(0,s.jsx)("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Overall feedback"}),(0,s.jsx)("div",{className:"text-[12px] whitespace-pre-wrap",children:m.globalComment})]})]})}),M&&(0,s.jsxs)("div",{className:"relative flex min-h-0 min-w-0 flex-1 flex-col border-l border-white/5",children:[$&&R&&(0,s.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,s.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,s.jsx)(Z.E,{active:"map"===D,onClick:()=>j("map"),icon:(0,s.jsx)(i.A,{className:"size-3"}),children:"Features"}),(0,s.jsx)(Z.E,{active:"db"===D,onClick:()=>j("db"),icon:(0,s.jsx)(d.A,{className:"size-3"}),children:"Schema"})]})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===D?(0,s.jsx)(G.MapClient,{view:"ROADMAP",nodes:E.nodes,edges:E.edges,embedded:!0,readOnly:!0}):(0,s.jsx)(_.DbMapClient,{tables:[],relations:[],endpoints:[],draft:m.draftDoc??null,workspaceId:t,embedded:!0,readOnly:!0})})]})]}):(0,s.jsx)("section",{className:"flex min-h-0 min-w-0 flex-1 items-center justify-center text-sm text-muted-foreground",children:"Select a plan on the left to view it."})]})]})}var es=n(36483),er=n(1275),ea=n(94421),eo=n(36338),el=n(5497),ei=n(9083),ed=n(76721),ec=n(99314),eu=n(11012);function eh(e){return"added"===e?"Added":"deleted"===e?"Deleted":"renamed"===e?"Renamed":"Edited"}let em={Added:"text-emerald-300",Deleted:"text-rose-300",Renamed:"text-sky-300",Edited:"text-foreground/80"};function ex({file:e,view:t,unseen:n,transient:r,commentCount:a=0,quality:o,expanded:l=!1,rank:i,ago:d,onOpen:c,onToggleViewed:u,onFlag:h}){let m=eh(e.status),x=e.additions+e.deletions,p=[];e.cues&&(e.cues.todos&&p.push({label:`TODO ${e.cues.todos}`,title:"TODO/FIXME/HACK markers added",prefill:`[quality scan] \`${e.path}\` adds ${e.cues.todos} TODO/FIXME marker(s). Resolve them now or explain why they're deferred.`}),e.cues.consoles&&p.push({label:`log ${e.cues.consoles}`,title:"console.* calls added",prefill:`[quality scan] \`${e.path}\` adds ${e.cues.consoles} console.* call(s). Remove debug logging before finishing.`}),e.cues.anys&&p.push({label:`any ${e.cues.anys}`,title:"`any` types added",prefill:`[quality scan] \`${e.path}\` adds ${e.cues.anys} \`any\` type(s). Replace them with real types.`}),e.cues.maxIndent>=5&&p.push({label:"deep",title:`Deep nesting added (${e.cues.maxIndent} levels)`,prefill:`[quality scan] \`${e.path}\` adds deeply nested code (${e.cues.maxIndent} indent levels). Flatten it — early returns or extracted helpers.`}));let f=o?.clones[0];return(0,s.jsxs)("div",{className:(0,C.cn)("group flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-white/[0.035]",r&&"animate-[card-arrive_1.6s_ease-out]",l&&"bg-white/[0.03]","viewed"===t&&!l&&"opacity-50"),children:[(0,s.jsx)("span",{className:(0,C.cn)("size-1.5 shrink-0 rounded-full",n?"bg-[#ff7a45]":"bg-transparent")}),void 0!==i&&(0,s.jsx)("span",{className:"w-5 shrink-0 text-right text-[10px] font-semibold tabular-nums text-muted-foreground/50",title:"Importance rank — size \xd7 how many files import it",children:i}),(0,s.jsxs)("button",{type:"button",onClick:()=>c(e.path),className:"flex min-w-0 flex-1 items-baseline gap-2.5",children:[(0,s.jsx)(ed.A,{className:(0,C.cn)("size-3 shrink-0 self-center text-muted-foreground/40 transition-transform",l&&"rotate-90")}),(0,s.jsx)("span",{className:(0,C.cn)("w-12 shrink-0 text-[9.5px] font-bold uppercase tracking-[0.08em]",em[m]),children:m}),(0,s.jsx)("span",{className:"truncate font-mono text-[12.5px] text-foreground/90",title:e.path,children:e.oldPath?`${e.oldPath} → ${e.path}`:e.path}),e.symbols.length>0&&(0,s.jsxs)("span",{className:"hidden truncate text-[10.5px] text-muted-foreground/60 md:inline",children:["↳ ",e.symbols.slice(0,3).join(", "),e.symbols.length>3?"…":""]}),d&&(0,s.jsx)("span",{className:"shrink-0 text-[10px] tabular-nums text-muted-foreground/50",children:d})]}),e.formattingOnly&&(0,s.jsx)("span",{className:"shrink-0 rounded-full border border-white/10 px-1.5 py-0.5 text-[9px] uppercase tracking-wide text-muted-foreground/70",children:"formatting"}),p.map(t=>(0,s.jsx)("button",{type:"button",title:`${t.title} — click to flag it to the agent`,onClick:()=>h?.(e,t.prefill),className:"hidden shrink-0 cursor-pointer rounded-full border border-white/10 px-1.5 py-0.5 text-[9px] text-muted-foreground/80 transition-colors hover:border-white/25 hover:text-foreground lg:inline",children:t.label},t.label)),o?.lint&&o.lint.errors+o.lint.warnings>0&&(0,s.jsxs)("button",{type:"button",title:`Repo linter on this file: ${o.lint.errors} error(s), ${o.lint.warnings} warning(s) — click to flag it to the agent`,onClick:()=>h?.(e,`[quality scan] \`${e.path}\` has ${o.lint.errors} lint error(s) and ${o.lint.warnings} warning(s) from the repo's own linter. Run it on this file and fix what it reports.`),className:(0,C.cn)("shrink-0 cursor-pointer rounded-full border px-1.5 py-0.5 text-[9px] font-medium transition-colors",o.lint.errors>0?"border-rose-400/30 bg-rose-400/10 text-rose-300 hover:bg-rose-400/20":"border-amber-400/25 bg-amber-400/10 text-amber-300/90 hover:bg-amber-400/20"),children:["lint ",o.lint.errors>0?`${o.lint.errors}✕`:`${o.lint.warnings}⚠`]}),f&&(0,s.jsxs)("button",{type:"button",title:`Added code resembles ${f.path} ~L${f.line} (${f.hits} matching fingerprints)${o.clones.length>1?` — and ${o.clones.length-1} more`:""} — click to flag it to the agent`,onClick:()=>h?.(e,`[quality scan] The code added to \`${e.path}\` looks duplicated from ${o.clones.map(e=>`\`${e.path}\` ~L${e.line} (${e.hits} matches)`).join(", ")}. Reuse or extract the shared logic instead of duplicating it.`),className:"flex shrink-0 cursor-pointer items-center gap-0.5 rounded-full border border-amber-400/30 bg-amber-400/10 px-1.5 py-0.5 text-[9px] font-medium text-amber-300 transition-colors hover:bg-amber-400/20",children:[(0,s.jsx)(ec.A,{className:"size-2.5"})," dup?"]}),a>0&&(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-0.5 text-[10px] text-[#ff7a45]",children:[(0,s.jsx)(k.A,{className:"size-3"}),a]}),(e.inDegree??0)>=8&&(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-0.5 text-[10px] text-amber-300/90",title:`${e.inDegree} files import this — check the blast radius`,children:[(0,s.jsx)(eu.A,{className:"size-3"}),e.inDegree]}),(0,s.jsxs)("span",{className:"w-24 shrink-0 text-right text-[11.5px] tabular-nums",title:`${x} changed lines`,children:[(0,s.jsxs)("span",{className:"text-emerald-400",children:["+",e.additions]})," ",(0,s.jsxs)("span",{className:"text-rose-400",children:["−",e.deletions]})]}),(0,s.jsx)(ep,{view:t,onToggle:t=>u(e,t)})]})}function ep({view:e,onToggle:t}){return(0,s.jsx)("button",{type:"button",onClick:()=>t("viewed"!==e),title:"viewed"===e?"Viewed — click to unmark":"invalidated"===e?"Changed since you viewed it — click to re-mark":"Mark as viewed",className:(0,C.cn)("flex size-5 shrink-0 items-center justify-center rounded border text-[10px] transition-colors","viewed"===e?"border-emerald-400/40 bg-emerald-500/15 text-emerald-300":"invalidated"===e?"border-amber-400/40 bg-amber-500/10 text-amber-300":"border-white/15 text-transparent hover:text-muted-foreground"),children:"invalidated"===e?"!":(0,s.jsx)(l.A,{className:"size-3"})})}var ef=n(92476);n(68091);var eg=n(40006),eb=n(1185),ev=n(30707),ej=n(7542);let ey={highlight:(e,t)=>eg.L.highlight(e,t).children},ew=`
2
- .beacon-diff .token.comment,.beacon-diff .token.prolog,.beacon-diff .token.doctype,.beacon-diff .token.cdata{color:#6b7684;font-style:italic}
3
- .beacon-diff .token.punctuation{color:#9aa4b2}
4
- .beacon-diff .token.keyword,.beacon-diff .token.atrule,.beacon-diff .token.important,.beacon-diff .token.rule{color:#c792ea}
5
- .beacon-diff .token.string,.beacon-diff .token.char,.beacon-diff .token.attr-value,.beacon-diff .token.regex{color:#a5d6a7}
6
- .beacon-diff .token.number,.beacon-diff .token.boolean,.beacon-diff .token.constant,.beacon-diff .token.symbol{color:#f78c6c}
7
- .beacon-diff .token.function,.beacon-diff .token.class-name,.beacon-diff .token.maybe-class-name{color:#82aaff}
8
- .beacon-diff .token.tag,.beacon-diff .token.property,.beacon-diff .token.selector,.beacon-diff .token.attr-name,.beacon-diff .token.builtin{color:#ffcb6b}
9
- .beacon-diff .token.operator,.beacon-diff .token.entity,.beacon-diff .token.url{color:#89ddff}
10
- .beacon-diff .token.variable{color:#f07178}
11
- `;function ek(e){fetch(`/api/open?path=${encodeURIComponent(e)}`).catch(()=>{})}function eN({file:e,defaultMode:t="split",onFocus:n,maxBodyHeight:a,className:o}){let[l,i]=(0,r.useState)(t),[d,c]=(0,r.useState)(null),[u,h]=(0,r.useState)(!1),[m,x]=(0,r.useState)(0);(0,r.useEffect)(()=>{if(e.binary||e.tooLarge)return;let t=!1,n=(0,w.fk)();return fetch(`/api/changes?path=${encodeURIComponent(e.path)}&old=${encodeURIComponent(e.oldPath??"")}`,{cache:"no-store",headers:n?{"x-beacon-workspace":n}:void 0}).then(e=>e.json()).then(n=>{t||(c({path:e.path,diff:n.diff??""}),h(!1))}).catch(()=>{t||h(!0)}),()=>{t=!0}},[e.path,e.oldPath,e.binary,e.tooLarge,e.additions,e.deletions,m]);let p=(0,r.useMemo)(()=>{if(!d?.diff)return null;try{let e=(0,ef.FR)(d.diff);return e.find(e=>e.newPath===d.path)??e[0]??null}catch{return null}},[d]),f=(0,r.useMemo)(()=>{if(p)try{return(0,ef.qw)(p.hunks,{highlight:eg.L.registered(e.lang),refractor:ey,language:e.lang,enhancers:[(0,ef.Zc)(p.hunks,{type:"block"})]})}catch{return}},[p,e.lang]),g=d&&d.path===e.path,[v,j]=(0,r.useState)(new Set),[y,N]=(0,r.useState)([]),[S,A]=(0,r.useState)(null),[z,E]=(0,r.useState)(""),[$,R]=(0,r.useState)(!1),M=(0,r.useCallback)(async()=>{let t=(0,w.fk)(),n=await fetch(`/api/changes/comment?file=${encodeURIComponent(e.path)}`,{cache:"no-store",headers:t?{"x-beacon-workspace":t}:void 0}).then(e=>e.json()).catch(()=>null);N(n?.comments??[])},[e.path]);(0,r.useEffect)(()=>{let t=!1,n=(0,w.fk)();return fetch(`/api/changes/comment?file=${encodeURIComponent(e.path)}`,{cache:"no-store",headers:n?{"x-beacon-workspace":n}:void 0}).then(e=>e.json()).then(e=>{t||N(e?.comments??[])}).catch(()=>{}),()=>{t=!0}},[e.path]);let D=(0,r.useCallback)(async()=>{if(!S||!z.trim())return;let t=(0,w.fk)();await fetch("/api/changes/comment",{method:"POST",headers:{"content-type":"application/json",...t?{"x-beacon-workspace":t}:{}},body:JSON.stringify({file:e.path,line:S.line,side:S.side,body:z.trim(),text:S.text,held:$||void 0})}).catch(()=>{}),A(null),E(""),R(!1),M()},[S,z,$,e.path,M]),P=(0,r.useCallback)(async e=>{let t=(0,w.fk)();await fetch("/api/changes/comment",{method:"PATCH",headers:{"content-type":"application/json",...t?{"x-beacon-workspace":t}:{}},body:JSON.stringify(e)}).catch(()=>{}),M()},[M]),O=(0,r.useCallback)(async e=>{let t=(0,w.fk)();await fetch(`/api/changes/comment?id=${encodeURIComponent(e)}`,{method:"DELETE",headers:t?{"x-beacon-workspace":t}:void 0}).catch(()=>{}),M()},[M]),T=(0,r.useMemo)(()=>{let e=new Map,t={old:new Map,new:new Map};if(!p)return{byLine:e,byContent:t};let n=(e,n,s,r)=>{if(!n)return;let a=t[e].get(n);a?a.push({key:s,line:r}):t[e].set(n,[{key:s,line:r}])};for(let t of p.hunks)for(let s of t.changes){let t=(0,ef.k2)(s),r=s.content.trim(),a=(0,ef.zi)(s);a&&a>0&&(e.set(`new:${a}`,t),n("new",r,t,a));let o=(0,ef.Cg)(s);o&&o>0&&(e.set(`old:${o}`,t),n("old",r,t,o))}return{byLine:e,byContent:t}},[p]),I=(0,r.useCallback)((e,t)=>{let n="old"===t||void 0===t&&(0,ef.Ob)(e)?"old":"new",s="old"===n?(0,ef.Cg)(e):(0,ef.zi)(e);s&&!(s<=0)&&(A({key:(0,ef.k2)(e),line:s,side:n,text:e.content.trim()}),E(""))},[]),L=(0,r.useMemo)(()=>({onClick:e=>{let t=e.change;t&&I(t,e.side)}}),[I]),F=(0,r.useCallback)(({change:e,side:t,inHoverState:n,renderDefault:r})=>{let a=e&&(0,ef.Ob)(e)?"old":"new";return n&&e&&t===a?(0,s.jsx)("button",{type:"button",title:"Comment on this line — the agent gets it at its next edit",className:"flex w-full items-center justify-center rounded-sm bg-[#ff7a45] text-[13px] font-bold leading-none text-white",onClick:n=>{n.stopPropagation(),I(e,t)},children:"+"}):r()},[I]),{widgets:B,orphans:H}=(0,r.useMemo)(()=>{let e=new Map,t=[],n=t=>{let n=e.get(t);return n||(n={comments:[],composer:!1},e.set(t,n)),n};for(let e of y){let s=e.text?T.byContent[e.side].get(e.text):void 0;if(s?.length)n(s.reduce((t,n)=>Math.abs(t.line-e.line)<=Math.abs(n.line-e.line)?t:n).key).comments.push(e);else{let s=T.byLine.get(`${e.side}:${e.line}`);!e.text&&s?n(s).comments.push(e):t.push(e)}}S&&(n(S.key).composer=!0);let r={};for(let[t,n]of e)r[t]=(0,s.jsxs)("div",{className:"border-y border-[#ff7a45]/20 bg-[#ff7a45]/[0.04] px-3 py-2",children:[n.comments.map(e=>(0,s.jsx)(eC,{c:e,onDelete:()=>void O(e.id),onToggleHeld:t=>void P({id:e.id,held:t})},e.id)),n.composer&&(0,s.jsx)(eS,{value:z,onChange:E,hold:$,onHold:R,onSubmit:()=>void D(),onCancel:()=>{A(null),E("")}})]});return{widgets:r,orphans:t}},[y,T,S,z,$,D,O,P]),U=y.filter(e=>e.held&&!e.deliveredAt).length;return(0,s.jsxs)("div",{className:(0,C.cn)("flex min-h-0 flex-col",o),children:[(0,s.jsx)("style",{children:ew}),(0,s.jsxs)("div",{className:"flex items-center gap-2 border-b border-white/5 px-4 py-1.5",children:[y.length>0&&(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-1 rounded-full border border-[#ff7a45]/25 bg-[#ff7a45]/10 px-1.5 py-0.5 text-[10px] font-medium text-[#ff7a45]",title:"Line-comments on this file (sent to the agent at its next edit)",children:[(0,s.jsx)(k.A,{className:"size-3"})," ",y.length]}),U>0&&(0,s.jsxs)("button",{type:"button",onClick:()=>void P({release:!0}),title:"Send the held comments to the agent as one batch (delivered at its next edit)",className:"flex shrink-0 items-center gap-1 rounded-full border border-[#ff7a45]/40 bg-[#ff7a45]/15 px-2 py-0.5 text-[10px] font-semibold text-[#ff7a45] transition-colors hover:bg-[#ff7a45]/25",children:["Release ",U," held"]}),(0,s.jsx)("span",{className:"shrink-0 text-[10px] text-muted-foreground/45",children:"hover a line \xb7 + to comment"}),(0,s.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-0.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-0.5 rounded-full border border-white/10 p-0.5",children:[(0,s.jsx)("button",{type:"button",onClick:()=>i("split"),title:"Split view",className:(0,C.cn)("flex size-5 items-center justify-center rounded-full transition-colors","split"===l?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:(0,s.jsx)(eb.A,{className:"size-3"})}),(0,s.jsx)("button",{type:"button",onClick:()=>i("unified"),title:"Unified view",className:(0,C.cn)("flex size-5 items-center justify-center rounded-full transition-colors","unified"===l?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),children:(0,s.jsx)(ev.A,{className:"size-3"})})]}),n&&(0,s.jsx)("button",{type:"button",onClick:n,title:"Focus — open this file full-page",className:"flex size-5 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(b.A,{className:"size-3"})}),(0,s.jsx)("button",{type:"button",onClick:()=>ek(e.path),title:"Open in editor",className:"flex size-5 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(er.A,{className:"size-3"})})]})]}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-auto",style:a?{maxHeight:a}:void 0,children:[H.length>0&&(0,s.jsxs)("div",{className:"border-b border-amber-400/20 bg-amber-400/[0.05] px-3 py-2",children:[(0,s.jsx)("div",{className:"mb-1 text-[10px] font-semibold uppercase tracking-wide text-amber-300/90",children:"The agent changed these lines since your comment"}),H.map(e=>(0,s.jsx)(eC,{c:e,orphaned:!0,onDelete:()=>void O(e.id),onToggleHeld:t=>void P({id:e.id,held:t})},e.id))]}),e.binary?(0,s.jsx)(eA,{icon:!0,children:"Binary file — no text diff."}):e.tooLarge?(0,s.jsx)(eA,{icon:!0,onOpen:()=>ek(e.path),children:"Diff too large to render here."}):g?p&&0!==p.hunks.length?(0,s.jsx)(ef.oO,{className:"beacon-diff",viewType:l,diffType:p.type,hunks:p.hunks,tokens:f,widgets:B,gutterEvents:L,renderGutter:F,children:e=>e.map(e=>{let t,n;return(t=e.changes.filter(e=>"delete"===e.type).map(e=>e.content),n=e.changes.filter(e=>"insert"===e.type).map(e=>e.content),(t.length>0||n.length>0)&&function(e,t){let n=e=>{let t=new Map;for(let n of e){let e=n.trim();e&&t.set(e,(t.get(e)??0)+1)}return t},s=n(e),r=n(t);if(s.size!==r.size)return!1;for(let[e,t]of s)if(r.get(e)!==t)return!1;return!0}(t,n)&&!v.has(e.content))?(0,s.jsx)(ef.NZ,{children:(0,s.jsxs)("div",{className:"flex items-center gap-2 bg-white/[0.02] px-4 py-1 text-[11px] text-muted-foreground",children:[(0,s.jsxs)("span",{children:["\xb7 formatting-only hunk (",e.changes.filter(e=>"normal"!==e.type).length," lines)"]}),(0,s.jsx)("button",{type:"button",onClick:()=>j(t=>new Set([...t,e.content])),className:"rounded-full border border-white/12 px-2 py-0.5 text-[10px] hover:bg-white/[0.06]",children:"show"})]})},e.content):(0,s.jsx)(ef.D9,{hunk:e},e.content)})}):(0,s.jsx)(eA,{children:"No textual changes."}):u?(0,s.jsx)(eA,{icon:!0,onOpen:()=>x(e=>e+1),openLabel:"Retry",children:"Couldn't load the diff."}):(0,s.jsx)(eA,{children:"Loading diff…"})]})]})}function eC({c:e,orphaned:t=!1,onDelete:n,onToggleHeld:r}){let a=e.deliveredAt?"sent to agent":e.held?"held — release to send":"pending — sent on the agent's next edit";return(0,s.jsxs)("div",{className:"group mb-1 flex items-start gap-2 rounded-md border border-white/10 bg-background/60 px-2.5 py-1.5",children:[(0,s.jsx)(k.A,{className:"mt-0.5 size-3.5 shrink-0 text-[#ff7a45]"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[t&&e.text&&(0,s.jsxs)("div",{className:"mb-0.5 truncate font-mono text-[10px] text-muted-foreground/70",title:e.text,children:["was: ",(0,s.jsx)("span",{className:"line-through",children:e.text})]}),(0,s.jsx)("div",{className:"whitespace-pre-wrap text-[12px] leading-snug text-foreground/90",children:e.body}),(0,s.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5 text-[9px] uppercase tracking-wide text-muted-foreground/60",children:[(0,s.jsxs)("span",{children:["line ",e.line," \xb7 ",a]}),!e.deliveredAt&&(0,s.jsx)("button",{type:"button",onClick:()=>r(!e.held),className:(0,C.cn)("rounded-full border px-1.5 py-px font-semibold transition-colors",e.held?"border-[#ff7a45]/40 text-[#ff7a45] hover:bg-[#ff7a45]/15":"border-white/15 text-muted-foreground hover:text-foreground"),title:e.held?"Release this comment (sends at the agent's next edit)":"Hold this comment back to batch it",children:e.held?"release":"hold"})]})]}),(0,s.jsx)("button",{type:"button",onClick:n,title:"Delete comment",className:"shrink-0 rounded p-0.5 text-muted-foreground/60 opacity-0 transition-opacity hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(g.A,{className:"size-3"})})]})}function eS({value:e,onChange:t,hold:n,onHold:r,onSubmit:a,onCancel:o}){return(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsx)("textarea",{autoFocus:!0,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),a()):"Escape"===e.key&&(e.preventDefault(),o())},rows:2,placeholder:"Comment on this line — the agent gets it at its next edit (⌘/Ctrl+Enter to send)",className:"w-full resize-y rounded border border-white/10 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-[#ff7a45]/40"}),(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:a,disabled:!e.trim(),className:(0,C.cn)("rounded-md px-2 py-1 text-[11px] font-semibold transition-colors",e.trim()?"bg-[#ff7a45]/20 text-[#ff7a45] hover:bg-[#ff7a45]/30":"text-muted-foreground opacity-50"),children:"Comment"}),(0,s.jsx)("button",{type:"button",onClick:o,className:"rounded-md px-2 py-1 text-[11px] text-muted-foreground transition-colors hover:text-foreground",children:"Cancel"}),(0,s.jsxs)("label",{className:"ml-auto flex cursor-pointer items-center gap-1 text-[10px] text-muted-foreground",title:"Hold this comment back — batch several, then Release to send them together",children:[(0,s.jsx)("input",{type:"checkbox",checked:n,onChange:e=>r(e.target.checked),className:"size-3 accent-[#ff7a45]"}),"hold (batch)"]})]})]})}function eA({children:e,icon:t,onOpen:n,openLabel:r="Open in editor"}){return(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-6 text-[12px] text-muted-foreground",children:[t&&(0,s.jsx)(ej.A,{className:"size-4 shrink-0 text-amber-300/80"}),(0,s.jsx)("span",{children:e}),n&&(0,s.jsx)("button",{type:"button",onClick:n,className:"rounded-full border border-white/12 px-2 py-0.5 text-[11px] text-foreground transition-colors hover:bg-white/[0.06]",children:r})]})}let ez=[/(^|\/)bun\.lock$/,/(^|\/)package-lock\.json$/,/(^|\/)yarn\.lock$/,/\.lock$/,/\.min\.\w+$/,/\.map$/,/(^|\/)(\.next|dist|build|node_modules|coverage)\//,/(^|\/)generated\//];function eE(e){return ez.some(t=>t.test(e))}function e$(e){return(e.additions+e.deletions)*(1+Math.log2(1+(e.inDegree??0)))}function eR(e){let t=e.split("/").pop()??"",n=/^(.+?)\.(test|spec)\.\w+$/.exec(t);return n?n[1]:null}function eM(e){let t=Math.max(1,Math.round(e/1e3));if(t<60)return`${t}s ago`;let n=Math.round(t/60);return n<60?`${n}m ago`:`${Math.round(n/60)}h ago`}function eD({files:e,touched:t,views:n,unseen:a,transients:l,commentCounts:i,lens:d,onLens:u,onOpen:h,onSeen:m,onToggleViewed:x,quality:p,scanning:g,onScan:b,onCommentAdded:v}){let[j,y]=(0,r.useState)(()=>Date.now());(0,r.useEffect)(()=>{let e=setInterval(()=>y(Date.now()),3e4);return()=>clearInterval(e)},[]);let k=(0,r.useMemo)(()=>e.reduce((e,t)=>({add:e.add+t.additions,del:e.del+t.deletions}),{add:0,del:0}),[e]),N=k.add+k.del,S=Math.min(100,N/400*100),A=(0,r.useMemo)(()=>{let e=null;for(let[n,s]of Object.entries(t))(!e||s.lastAt>e.lastAt)&&(e={path:n,lastAt:s.lastAt});return e},[t]),z=!!A&&j-A.lastAt<6e4,E=e.filter(e=>"viewed"===n[e.path]).length,$=(0,r.useMemo)(()=>new Map(e.map(e=>[e.path,e])),[e]),R=(0,r.useMemo)(()=>{let n,s,r;return n=e=>t[e.path]?.lastAt??(e.oldPath?t[e.oldPath]?.lastAt:void 0),s=(e,t)=>(n(t)??0)-(n(e)??0),r=e.filter(e=>(n(e)??0)>=j-3e5).sort(s),[{key:"now",label:"Now",files:r},{key:"session",label:"Earlier this session",files:e.filter(e=>void 0!==n(e)&&n(e)<j-3e5).sort(s)},{key:"before",label:"Before this session",files:e.filter(e=>void 0===n(e)).sort((e,t)=>e.path.localeCompare(t.path))}].filter(e=>e.files.length>0)},[e,t,j]),M=(0,r.useMemo)(()=>(function(e){let t=e.filter(e=>eE(e.path)),n=e.filter(e=>!eE(e.path)),s=n.filter(e=>null!==eR(e.path)),r=n.filter(e=>null===eR(e.path)).sort((e,t)=>e$(t)-e$(e)),a=[],o=new Set;for(let e of r){a.push(e);let t=(e.path.split("/").pop()??"").replace(/\.\w+$/,"");for(let e of s)o.has(e.path)||eR(e.path)!==t||(a.push(e),o.add(e.path))}for(let e of[...s].sort((e,t)=>e$(t)-e$(e)))o.has(e.path)||a.push(e);return{main:a,noise:[...t].sort((e,t)=>e$(t)-e$(e))}})(e),[e]),[D,P]=(0,r.useState)(new Set),O=e=>{m(e),P(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},T=(0,r.useMemo)(()=>"activity"===d?R.map(e=>({key:e.key,label:e.label,accent:"now"===e.key,paths:e.files.map(e=>e.path)})):[{key:"ranked",label:"Riskiest first — change size \xd7 importers",ranked:!0,paths:M.main.map(e=>e.path)},...M.noise.length?[{key:"noise",label:"Generated & lockfiles",dim:!0,paths:M.noise.map(e=>e.path)}]:[]],[d,R,M]),[I,L]=(0,r.useState)(null);D.size>0&&(null===I||I.lens!==d)?L({lens:d,sections:T}):0===D.size&&null!==I&&L(null);let F=I?I.sections:T,B=(0,r.useMemo)(()=>new Set(F.flatMap(e=>e.paths)),[F]),H=I?e.filter(e=>!B.has(e.path)).length:0,[U,K]=(0,r.useState)(null),q=async()=>{if(!U||!U.text.trim()||U.sending)return;K({...U,sending:!0});let e=(0,w.fk)();await fetch("/api/changes/comment",{method:"POST",headers:{"content-type":"application/json",...e?{"x-beacon-workspace":e}:{}},body:JSON.stringify({file:U.file.path,line:1,side:"new",body:U.text.trim(),held:U.hold||void 0})}).catch(()=>{}),K(null),v()};return(0,s.jsxs)("div",{className:"mx-auto flex h-full w-full min-h-0 flex-col px-4",children:[(0,s.jsxs)("div",{className:"glass mt-3 shrink-0 space-y-2 rounded-2xl px-4 py-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[13px]",children:[(0,s.jsxs)("span",{className:(0,C.cn)("relative flex size-2 shrink-0",!z&&"opacity-30"),children:[z&&(0,s.jsx)("span",{className:"absolute inline-flex size-full animate-ping rounded-full bg-[#ff7a45] opacity-75"}),(0,s.jsx)("span",{className:"relative inline-flex size-2 rounded-full bg-[#ff7a45]"})]}),A?(0,s.jsxs)("span",{className:"min-w-0 truncate",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:z?"Editing":"Last edited"})," ",(0,s.jsx)("span",{className:"font-mono text-[12px] text-foreground/90",children:A.path})," ",(0,s.jsxs)("span",{className:"text-muted-foreground",children:["\xb7 ",eM(j-A.lastAt)]})]}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"No agent edits this session"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,s.jsx)(o.A,{className:"size-3.5 shrink-0 text-[#ff7a45]"}),(0,s.jsxs)("span",{className:"tabular-nums",children:[e.length," files \xb7 ",(0,s.jsxs)("span",{className:"text-emerald-400",children:["+",k.add]})," ",(0,s.jsxs)("span",{className:"text-rose-400",children:["−",k.del]})]}),(0,s.jsx)("span",{"aria-hidden":!0,className:"h-1 w-24 overflow-hidden rounded-full bg-white/10",title:"~400 changed lines is the review-attention budget",children:(0,s.jsx)("span",{className:(0,C.cn)("block h-full",S>=100?"bg-amber-400/80":"bg-white/35"),style:{width:`${S}%`}})}),N>400&&(0,s.jsx)("span",{className:"rounded-full border border-amber-400/25 bg-amber-400/10 px-2 py-0.5 text-[10px] font-medium text-amber-300/90",children:"over the review budget — review soon"}),(0,s.jsxs)("span",{className:"ml-auto tabular-nums",children:[a.size>0&&(0,s.jsxs)("span",{className:"text-[#ff7a45]",children:[a.size," unseen \xb7 "]}),E,"/",e.length," viewed"]}),(0,s.jsxs)("button",{type:"button",onClick:b,disabled:g||0===e.length,title:"Run the repo's linter on the changed files + scan added code for duplicated logic (deterministic, local)",className:(0,C.cn)("flex items-center gap-1 rounded-full border border-white/10 px-2 py-0.5 text-[10px] font-medium transition-colors",g?"text-muted-foreground":"text-muted-foreground hover:bg-white/[0.04] hover:text-foreground"),children:[g?(0,s.jsx)(c.A,{className:"size-3 animate-spin"}):(0,s.jsx)(ea.A,{className:"size-3"}),g?"Scanning…":p?"Re-scan":"Quality scan"]}),(0,s.jsx)("div",{className:"flex items-center gap-0.5 rounded-full border border-white/10 p-0.5",children:["activity","review"].map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>u(e),className:(0,C.cn)("flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium transition-colors",d===e?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground"),title:"activity"===e?"What the agent is doing, newest first":"Importance-first for a careful pass",children:["activity"===e?(0,s.jsx)(eo.A,{className:"size-3"}):(0,s.jsx)(el.A,{className:"size-3"}),"activity"===e?"Activity":"Review"]},e))})]})]}),U&&(0,s.jsxs)("div",{className:"fixed right-6 top-20 z-40 w-96 rounded-xl border border-white/10 bg-card p-3 shadow-2xl",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:[(0,s.jsx)(ei.A,{className:"size-3 text-[#ff7a45]"})," Flag to the agent"]}),(0,s.jsx)("button",{type:"button",onClick:()=>K(null),title:"Close",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(f.A,{className:"size-3.5"})})]}),(0,s.jsx)("div",{className:"mb-1.5 truncate font-mono text-[11px] text-muted-foreground",title:U.file.path,children:U.file.path}),(0,s.jsx)("textarea",{autoFocus:!0,value:U.text,onChange:e=>K({...U,text:e.target.value}),onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),q()):"Escape"===e.key&&(e.preventDefault(),K(null))},rows:4,className:"w-full resize-y rounded border border-white/10 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-[#ff7a45]/40"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>void q(),disabled:!U.text.trim()||U.sending,className:(0,C.cn)("rounded-md px-2.5 py-1 text-[11px] font-semibold transition-colors",U.text.trim()&&!U.sending?"bg-[#ff7a45]/20 text-[#ff7a45] hover:bg-[#ff7a45]/30":"text-muted-foreground opacity-50"),children:U.sending?"Sending…":"Send to agent"}),(0,s.jsxs)("label",{className:"ml-auto flex cursor-pointer items-center gap-1 text-[10px] text-muted-foreground",title:"Hold this flag back — batch several, then Release to send them together",children:[(0,s.jsx)("input",{type:"checkbox",checked:U.hold,onChange:e=>K({...U,hold:e.target.checked}),className:"size-3 accent-[#ff7a45]"}),"hold (batch)"]})]}),(0,s.jsx)("p",{className:"mt-1.5 text-[10px] text-muted-foreground/70",children:"Delivered at the agent's next edit."})]}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 space-y-3 overflow-y-auto py-3",children:[H>0&&(0,s.jsx)("div",{className:"sticky top-0 z-10 flex justify-center",children:(0,s.jsxs)("button",{type:"button",onClick:()=>L({lens:d,sections:T}),title:"The list is pinned while you read — click to bring the new changes in",className:"rounded-full border border-[#ff7a45]/40 bg-[#191009] px-3 py-1 text-[11px] font-semibold text-[#ff7a45] shadow-lg transition-colors hover:bg-[#ff7a45]/15",children:[H," new change",1===H?"":"s"," — show"]})}),0===e.length?(0,s.jsx)("p",{className:"py-8 text-center text-[12px] text-muted-foreground",children:"No uncommitted changes yet — the agent's edits land here live."}):F.map(e=>{let r=e.paths.map(e=>$.get(e)).filter(e=>!!e);return 0===r.length?null:(0,s.jsx)(eP,{section:e,count:r.length,children:r.map((r,o)=>{var c;let u,m;return c={rank:e.ranked?o+1:void 0,ago:"activity"===d?(u=t[r.path]?.lastAt??(r.oldPath?t[r.oldPath]?.lastAt:void 0))?eM(j-u):void 0:void 0},m=D.has(r.path),(0,s.jsxs)("div",{children:[(0,s.jsx)(ex,{file:r,view:n[r.path]??"unviewed",unseen:a.has(r.path),transient:l.has(r.path),commentCount:i[r.path]??0,quality:p?.[r.path],expanded:m,rank:c?.rank,ago:c?.ago,onOpen:O,onToggleViewed:x,onFlag:(e,t)=>K({file:e,text:t,hold:!1,sending:!1})}),m&&(0,s.jsx)("div",{className:"border-t border-white/5 bg-black/25",children:(0,s.jsx)(eN,{file:r,defaultMode:"split",maxBodyHeight:520,onFocus:()=>h(r.path)},r.path)})]},r.path)})},e.key)})]})]})}function eP({section:e,count:t,children:n}){let[a,o]=(0,r.useState)(!e.dim);return(0,s.jsxs)("section",{className:(0,C.cn)("overflow-hidden rounded-xl border border-white/6 bg-white/[0.015]",e.accent&&"border-l-2 border-l-[#ff7a45]/40",e.dim&&"opacity-80"),children:[(0,s.jsxs)("button",{type:"button",onClick:()=>e.dim&&o(e=>!e),className:(0,C.cn)("flex w-full items-center gap-1.5 border-b border-white/5 px-4 py-2 text-left text-[10px] font-semibold uppercase tracking-widest text-muted-foreground/80",e.dim&&"cursor-pointer hover:text-muted-foreground"),disabled:!e.dim,children:[e.dim&&(0,s.jsx)(ed.A,{className:(0,C.cn)("size-3 shrink-0 transition-transform",a&&"rotate-90")}),(0,s.jsx)("span",{className:"truncate",children:e.label}),(0,s.jsx)("span",{className:"ml-auto tabular-nums opacity-60",children:t})]}),a&&(0,s.jsx)("div",{className:"divide-y divide-white/[0.04]",children:n})]})}var eO=n(6923),eT=n(58309),eI=n(17494),eL=n(47409);let eF="beacon:changes-sidebar-open",eB="beacon:changes-sidebar-w";function eH(e){return e.map(e=>{var t;return{path:e.path,status:"added"===(t=e.status)?"added":"deleted"===t?"deleted":"modified",meta:`+${e.additions} −${e.deletions}`}})}function eU({repo:e,files:t,touched:n,contract:a,initialPath:l,onBack:i,views:d,onToggleViewed:c}){let u=(0,r.useMemo)(()=>new Set(n),[n]),h=e=>u.has(e.path)||!!e.oldPath&&u.has(e.oldPath),m=(0,r.useMemo)(()=>a?new Set([...a.declaredFiles,...a.authorizedExtras]):null,[a]),x=!!m&&m.size>0,p=e=>!!m&&(m.has(e.path)||!!e.oldPath&&m.has(e.oldPath)),[f,g]=(0,r.useState)(l),[b,v]=(0,r.useState)(()=>{try{return"0"!==window.localStorage.getItem(eF)}catch{return!0}}),[j,y]=(0,r.useState)(()=>{try{let e=Number(window.localStorage.getItem(eB));return e?Math.max(220,Math.min(620,e)):320}catch{return 320}}),w=(0,r.useCallback)(()=>{v(e=>{let t=!e;try{localStorage.setItem(eF,t?"1":"0")}catch{}return t})},[]),k=(0,r.useRef)(null),N=(0,r.useRef)(!1),S=(0,r.useCallback)(e=>{e.preventDefault(),N.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]);(0,r.useEffect)(()=>{let e=e=>{if(!N.current||!k.current)return;let t=k.current.getBoundingClientRect().left;y(Math.max(220,Math.min(620,e.clientX-t)))},t=()=>{if(N.current){N.current=!1,document.body.style.cursor="",document.body.style.userSelect="";try{localStorage.setItem(eB,String(j))}catch{}}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[j]);let A=(0,r.useMemo)(()=>x?{onPlan:t.filter(p),strayed:t.filter(e=>!p(e)&&h(e)),other:t.filter(e=>!p(e)&&!h(e))}:null,[t,x,m,u]),z=t.some(h),[E,$]=(0,r.useState)("session"),R="session"!==E||z?E:"all",M=(0,r.useMemo)(()=>A?[...A.onPlan,...A.strayed,...A.other]:"all"===R?t:t.filter(h),[A,t,R,u]),D=(0,r.useMemo)(()=>new Map(t.map(e=>[e.path,e])),[t]),P=f&&M.some(e=>e.path===f)?f:M[0]?.path??null,O=P?D.get(P)??null:null,T=!!O&&!!A&&A.strayed.some(e=>e.path===O.path),I=j<300,L={session:{label:"This session",Icon:eO.A,title:"Files edited this session"},all:{label:"All",Icon:eT.A,title:"All uncommitted changes"}},F=(0,s.jsx)("div",{className:"ml-auto flex items-center gap-0.5 rounded-full border border-white/10 p-0.5",children:["session","all"].map(e=>{let{label:t,Icon:n,title:r}=L[e],a="session"===e&&!z;return(0,s.jsx)("button",{type:"button",onClick:()=>$(e),disabled:a,className:(0,C.cn)("flex items-center justify-center rounded-full text-[10px] font-medium transition-colors",I?"size-5":"px-2 py-0.5",R===e?"bg-white/10 text-foreground":"text-muted-foreground hover:text-foreground",a&&"opacity-40"),title:r,children:I?(0,s.jsx)(n,{className:"size-3"}):t},e)})});return(0,s.jsxs)("div",{ref:k,className:"flex min-h-0 flex-1",children:[b?(0,s.jsxs)("aside",{style:{width:j},className:"flex min-w-0 shrink-0 flex-col border-r border-white/10 bg-background",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 pb-2 pt-3",children:[(0,s.jsx)("button",{type:"button",onClick:i,title:"Back to overview",className:"flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(K.A,{className:"size-3.5"})}),(0,s.jsx)("button",{type:"button",onClick:w,title:"Hide the file list",className:"flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(q.A,{className:"size-3.5"})}),(0,s.jsx)(o.A,{className:"size-4 shrink-0 text-[#ff7a45]"}),!I&&(0,s.jsx)("h1",{className:"text-sm font-semibold tracking-tight",children:"Changes"}),(0,s.jsx)("span",{className:"text-[11px] tabular-nums text-muted-foreground",children:M.length}),x?(0,s.jsx)("span",{className:(0,C.cn)("ml-auto flex items-center rounded-full border border-emerald-400/25 bg-emerald-400/10 font-medium text-emerald-300/90",I?"size-5 justify-center":"gap-1 px-2 py-0.5 text-[10px]"),title:`Scoped to this plan — ${m.size} file${1===m.size?"":"s"} in scope`,children:I?(0,s.jsx)(eI.A,{className:"size-3"}):"Plan-scoped"}):e&&t.length>0?F:null]}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto px-1.5 pb-4",children:e?0===t.length?(0,s.jsx)("p",{className:"px-2 py-4 text-[11px] leading-relaxed text-muted-foreground",children:"No uncommitted changes yet — edits the agent makes as it executes the plan show up here live."}):A?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eq,{label:"On plan",tone:"plan",files:A.onPlan,onSelect:g,emptyNote:"No plan files changed yet."}),A.strayed.length>0?(0,s.jsx)(eq,{label:"Strayed",tone:"warn",files:A.strayed,onSelect:g}):A.onPlan.length>0?(0,s.jsx)("p",{className:"mb-1 px-2 py-1 text-[10px] text-emerald-400/70",children:"✓ No strays — all session edits are on-plan."}):null,A.other.length>0&&(0,s.jsx)(eq,{label:"Other uncommitted",tone:"muted",files:A.other,onSelect:g,defaultOpen:!1})]}):(0,s.jsx)(eL.h,{files:eH(M),onSelect:g}):(0,s.jsx)("p",{className:"px-2 py-4 text-[11px] text-muted-foreground",children:"Not a git repository."})})]}):null,b?(0,s.jsx)("div",{onPointerDown:S,className:"group relative w-px shrink-0 cursor-col-resize bg-white/10 hover:bg-white/20",title:"Drag to resize",children:(0,s.jsx)("div",{className:"absolute inset-y-0 -left-1.5 right-[-6px] z-10"})}):(0,s.jsxs)("aside",{className:"flex w-10 shrink-0 flex-col items-center gap-1 border-r border-white/10 bg-background py-2",children:[(0,s.jsx)("button",{type:"button",onClick:i,title:"Back to overview",className:"flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(K.A,{className:"size-4"})}),(0,s.jsx)("button",{type:"button",onClick:w,title:`Show the file list \xb7 ${M.length}`,className:"flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(X.A,{className:"size-4"})})]}),(0,s.jsx)("main",{className:"flex min-w-0 flex-1 flex-col bg-background p-3",children:O?(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl border border-white/6 bg-white/[0.015]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2.5 border-b border-white/5 px-4 py-2.5",children:[T&&(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-1 rounded-full border border-amber-400/30 bg-amber-400/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-300",title:"This file is outside the plan's declared scope",children:[(0,s.jsx)(eu.A,{className:"size-3"})," Strayed"]}),(0,s.jsx)("span",{className:(0,C.cn)("shrink-0 text-[9.5px] font-bold uppercase tracking-[0.08em]",em[eh(O.status)]),children:eh(O.status)}),(0,s.jsx)("span",{className:"truncate font-mono text-[12.5px] text-foreground/90",title:O.path,children:O.oldPath?`${O.oldPath} → ${O.path}`:O.path}),(0,s.jsxs)("span",{className:"ml-auto w-24 shrink-0 text-right text-[11.5px] tabular-nums",children:[(0,s.jsxs)("span",{className:"text-emerald-400",children:["+",O.additions]})," ",(0,s.jsxs)("span",{className:"text-rose-400",children:["−",O.deletions]})]}),d&&c&&(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5 text-[10px] text-muted-foreground/70",children:["invalidated"===d[O.path]&&"changed since you viewed","viewed"===d[O.path]&&"viewed",(0,s.jsx)(ep,{view:d[O.path]??"unviewed",onToggle:e=>c(O,e)})]})]}),(0,s.jsx)(eN,{file:O,defaultMode:"split",className:"flex-1"},O.path)]}):(0,s.jsx)("div",{className:"flex flex-1 items-center justify-center px-6 text-center text-sm text-muted-foreground",children:e?0===t.length?"No uncommitted changes yet — edits the agent makes show up here live.":"Select a file to see its diff.":"Not a git repository."})})]})}let eK={plan:{text:"text-emerald-300/80"},warn:{text:"text-amber-300",icon:!0},muted:{text:"text-muted-foreground"}};function eq({label:e,tone:t,files:n,onSelect:a,defaultOpen:o=!0,emptyNote:l}){let[i,d]=(0,r.useState)(o),c=eK[t];return(0,s.jsxs)("div",{className:"mb-1",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>d(e=>!e),className:(0,C.cn)("flex w-full items-center gap-1.5 rounded px-2 py-1 text-[10px] font-semibold uppercase tracking-wide transition-colors hover:bg-white/[0.04]",c.text),children:[(0,s.jsx)(ed.A,{className:(0,C.cn)("size-3 shrink-0 transition-transform",i&&"rotate-90")}),c.icon&&(0,s.jsx)(eu.A,{className:"size-3 shrink-0"}),(0,s.jsx)("span",{className:"truncate",children:e}),(0,s.jsx)("span",{className:"ml-auto tabular-nums opacity-70",children:n.length})]}),i&&(n.length>0?(0,s.jsx)(eL.h,{files:eH(n),onSelect:a}):l?(0,s.jsx)("p",{className:"px-2 py-1 pl-6 text-[10px] text-muted-foreground/70",children:l}):null)]})}function eX(e){return`${e.status}:${e.additions}:${e.deletions}`}function eG({repo:e,files:t,touched:n,viewed:a,contract:o=null}){let[l,i]=(0,r.useState)("activity"),[d,c]=(0,r.useState)(null),[u,h]=(0,r.useState)(a),[m,x]=(0,r.useState)(a);m!==a&&(x(a),h(a));let p=(0,r.useMemo)(()=>new Map(t.map(e=>[e.path,eX(e)])),[t]),[f,g]=(0,r.useState)(null),[b,v]=(0,r.useState)(new Set),[j,y]=(0,r.useState)(new Set);if(f!==p&&(g(p),f)){let e=[];for(let[t,n]of p)f.get(t)!==n&&e.push(t);v(t=>new Set([...[...t].filter(e=>p.has(e)),...e])),e.length&&y(new Set(e))}(0,r.useEffect)(()=>{if(0===j.size)return;let e=setTimeout(()=>y(new Set),1800);return()=>clearTimeout(e)},[j]);let k=(0,r.useMemo)(()=>(function(e,t){let n={};for(let s of e){let e=t[s.path];n[s.path]=e?e.sig===eX(s)?"viewed":"invalidated":"unviewed"}return n})(t,u),[t,u]),[N,C]=(0,r.useState)({}),[S,A]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=(0,w.fk)();fetch("/api/changes/comment",{cache:"no-store",headers:e?{"x-beacon-workspace":e}:void 0}).then(e=>e.json()).then(e=>{let t={};for(let n of e.comments??[])t[n.file]=(t[n.file]??0)+1;C(t)}).catch(()=>{})},[t,S]);let[z,E]=(0,r.useState)(null),[$,R]=(0,r.useState)(!1),M=async()=>{R(!0);let e=(0,w.fk)(),t=await fetch("/api/changes/quality",{method:"POST",cache:"no-store",headers:e?{"x-beacon-workspace":e}:void 0}).then(e=>e.json()).catch(()=>null);E(t?.files??null),R(!1)},D=e=>v(t=>{let n=new Set(t);return n.delete(e),n}),P=(e,t)=>{let n=t?eX(e):null;h(t=>{let s={...t};return n?s[e.path]={viewedAt:Date.now(),sig:n}:delete s[e.path],s}),D(e.path);let s=(0,w.fk)();fetch("/api/changes/viewed",{method:"POST",headers:{"content-type":"application/json",...s?{"x-beacon-workspace":s}:{}},body:JSON.stringify({path:e.path,sig:n})}).catch(()=>{})};return null!==d?(0,s.jsx)(eU,{repo:e,files:t,touched:Object.keys(n),contract:o,initialPath:d,onBack:()=>c(null),views:k,onToggleViewed:P}):(0,s.jsx)(eD,{files:t,touched:n,views:k,unseen:b,transients:j,commentCounts:N,lens:l,onLens:i,onOpen:e=>{D(e),c(e)},onSeen:D,onToggleViewed:P,quality:z,scanning:$,onScan:()=>void M(),onCommentAdded:()=>A(e=>e+1)})}function e_({files:e}){return(0,s.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col bg-background",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 border-b border-white/10 px-4 py-3",children:[(0,s.jsx)(o.A,{className:"size-4 shrink-0 text-[#ff7a45]"}),(0,s.jsx)("h1",{className:"text-sm font-semibold tracking-tight",children:"Plan files"}),(0,s.jsx)("span",{className:"text-[11px] tabular-nums text-muted-foreground",children:e.length}),(0,s.jsx)("span",{className:"ml-auto truncate text-[11px] text-muted-foreground/80",children:"Files this plan declared \xb7 live diffs show only for the plan that's executing"})]}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto p-3",children:0===e.length?(0,s.jsx)("p",{className:"px-2 py-4 text-[11px] leading-relaxed text-muted-foreground",children:"No files were saved for this plan."}):(0,s.jsx)("ul",{className:"space-y-0.5",children:e.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("button",{type:"button",onClick:()=>ek(e),title:"Open in editor",className:"group flex w-full items-center gap-2 rounded px-2 py-1 text-left font-mono text-[12px] text-foreground/90 transition-colors hover:bg-white/[0.05]",children:[(0,s.jsx)(es.A,{className:"size-3.5 shrink-0 text-muted-foreground/60"}),(0,s.jsx)("span",{className:"truncate",children:e}),(0,s.jsx)(er.A,{className:"ml-auto size-3 shrink-0 text-transparent transition-colors group-hover:text-muted-foreground/70"})]})},e))})})]})}function eV({markdown:e}){let t=(0,r.useMemo)(()=>(0,A.n$)(e).map((e,t)=>({b:e,i:t})).filter(({b:e})=>(0,A.Vq)(e.kind)).map(({b:e,i:t})=>({id:(0,A.vB)(t),level:(0,A.F8)(e.kind),label:(0,A.kz)(e.text)})).filter(e=>e.label.length>0),[e]),[n,a]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if("u"<typeof IntersectionObserver||0===t.length)return;let e=t.map(e=>document.getElementById(e.id)).filter(e=>null!==e);if(0===e.length)return;let n=new IntersectionObserver(e=>{let t=e.filter(e=>e.isIntersecting).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top);t[0]&&a(t[0].target.id)},{rootMargin:"-12% 0px -70% 0px",threshold:0});return e.forEach(e=>n.observe(e)),()=>n.disconnect()},[t]),(0,s.jsxs)("aside",{className:"flex w-60 shrink-0 flex-col overflow-y-auto border-r border-white/5 bg-background pt-16",children:[(0,s.jsx)("div",{className:"px-4 pb-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Sections"}),0===t.length?(0,s.jsx)("p",{className:"px-4 text-[12px] text-muted-foreground/70",children:"No headings in this plan."}):(0,s.jsx)("nav",{className:"space-y-0.5 px-2 pb-6",children:t.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;let n;return t=e.id,void((n=document.getElementById(t))&&(n.scrollIntoView({behavior:"smooth",block:"start"}),a(t)))},title:e.label,style:{paddingLeft:`${.5+.75*e.level}rem`},className:(0,C.cn)("block w-full truncate rounded py-1 pr-2 text-left text-[12px] leading-snug transition-colors",n===e.id?"bg-white/10 font-medium text-foreground":"text-muted-foreground hover:bg-white/[0.05] hover:text-foreground"),children:e.label},e.id))})]})}var eW=n(50981),eJ=n(4474),eQ=n(97358);function eY({open:e,onOpenChange:t,onConfirmed:n}){let[a,o]=(0,r.useState)("bypassPermissions"),[i,d]=(0,r.useState)(!1);async function c(){d(!0);try{await fetch("/api/preferences",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({planApprovalMode:a})}).catch(()=>{}),t(!1),n()}finally{d(!1)}}return(0,s.jsx)(W.lG,{open:e,onOpenChange:t,children:(0,s.jsxs)(W.Cf,{className:"max-w-lg",children:[(0,s.jsxs)(W.c7,{children:[(0,s.jsxs)(W.L3,{className:"flex items-center gap-2",children:[(0,s.jsx)(eW.A,{className:"size-4 text-emerald-400"}),"After approving, the agent should…"]}),(0,s.jsx)(W.rr,{children:"Pick the permission mode your terminal session enters when you approve a plan. We ask once and remember it for every project — change it anytime in Settings."})]}),(0,s.jsx)("div",{className:"space-y-2 py-1",children:eQ.pC.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>o(e.value),className:(0,C.cn)("flex w-full items-start gap-3 rounded-lg border p-3 text-left transition-colors",a===e.value?"border-emerald-500/50 bg-emerald-500/10":"border-white/10 bg-white/[0.03] hover:bg-white/[0.06]"),children:[(0,s.jsx)("span",{className:(0,C.cn)("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border",a===e.value?"border-emerald-400 bg-emerald-400/20":"border-white/30"),children:a===e.value&&(0,s.jsx)(l.A,{className:"size-3 text-emerald-300"})}),(0,s.jsxs)("span",{className:"min-w-0",children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-foreground",children:e.label}),(0,s.jsx)("span",{className:"block text-xs text-muted-foreground",children:e.description})]})]},e.value))}),(0,s.jsxs)(W.Es,{className:"items-center justify-between gap-2 sm:justify-between",children:[(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"You can change this later in Settings."}),(0,s.jsx)(eJ.$,{onClick:c,disabled:i,size:"sm",children:i?"Saving…":"Save & approve"})]})]})})}function eZ({dbProps:e,mapProps:t,planMarkdown:n,repoFiles:k=[],forceHistory:N=!1,changesView:S=!1,changes:z=null,contract:E=null,planFiles:$=null}){let R=(0,v.useRouter)(),{status:M,discard:D}=(0,j.j)(),P=t.nodes.length>0,T=e.tables.length>0||e.endpoints.length>0||(e.draft?.tables.length??0)>0||(e.draft?.endpoints.length??0)>0,[L,F]=(0,r.useState)(P?"map":"db"),B="map"!==L||P?"db"!==L||T?L:"map":"db",[H,U]=(0,r.useState)(!1),K=(0,r.useRef)(!1),[q,X]=(0,r.useState)(!1),[V,W]=(0,r.useState)(null),J=(0,r.useRef)(!1),[Q,ee]=(0,r.useState)(null),et=(0,r.useCallback)(async()=>{ee(null);let e=(0,y.X0)();try{let t=await fetch("/api/plan/approve",{method:"POST",headers:(0,w.dh)(e)});if(!t.ok)throw Error(`approve ${t.status}`);let n=await fetch("/api/plan/verdict",{headers:(0,w.dh)(e),cache:"no-store"}).then(e=>e.json()).catch(()=>null);if(n?.kind!=="approved")throw Error("verdict not confirmed")}catch{ee("Approval didn't reach your terminal session — it wasn't confirmed. Please try Approve again.");return}W({features:M.features,tables:M.tables,endpoints:M.endpoints})},[M.features,M.tables,M.endpoints]);(0,r.useEffect)(()=>{if(!V)return;J.current=!1;let e=V.features>0?"/map?view=ROADMAP":V.tables>0||V.endpoints>0?"/map?view=DATABASE":"/map?view=ROADMAP",t=setTimeout(()=>{J.current||(J.current=!0,R.push(e))},3e3);return()=>clearTimeout(t)},[V,R]);let es=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/preferences",{cache:"no-store"});if((await e.json()).planApprovalModeConfigured)return void et()}catch{et();return}X(!0)},[et]),[er,ea]=(0,r.useState)(null),eo=(0,r.useCallback)(e=>ea(e),[]),el=(0,r.useRef)(null),ei=(0,r.useRef)(null),ed=(0,r.useRef)(e.draft),[ec,eu]=(0,r.useState)(!1),eh=(0,r.useCallback)(()=>eu(!0),[]),[em,ex]=(0,r.useState)([]),[ep,ef]=(0,r.useState)(!1),[eg,eb]=(0,r.useState)(""),ev=(0,r.useCallback)(e=>{eb(e),ef(!0)},[]),ej=(0,r.useRef)(em);(0,r.useEffect)(()=>{ej.current=em},[em]),(0,r.useEffect)(()=>{ex([]),ef(!1),eu(!1)},[M.proposedAt]),(0,r.useEffect)(()=>{let e=()=>void fetch("/api/plan/presence",{method:"POST",cache:"no-store",headers:(0,w.dh)((0,y.X0)())}).catch(()=>{});e();let t=setInterval(e,5e3);return()=>clearInterval(t)},[]);let ey=(0,r.useCallback)(()=>({draft:ed.current,questions:ej.current}),[]),ew=(0,r.useMemo)(()=>{let n=[];for(let e of t.nodes)n.push(`feature: ${e.title}`);for(let t of e.draft?.tables??[])n.push(`table: ${t.name}`);for(let t of e.tables)n.push(`table: ${t.name}`);for(let t of e.draft?.endpoints??[])n.push(`endpoint: ${t.method} ${t.path}`);for(let t of e.endpoints)n.push(`endpoint: ${t.method} ${t.path}`);return Array.from(new Set(n))},[t.nodes,e]),ek=er?(0,s.jsx)(I,{annotations:er.annotations,updateComment:er.updateComment,removeAnnotation:er.removeAnnotation,focusOnAnnotation:er.focusOnAnnotation,onClose:()=>"db"===B?ei.current?.close():el.current?.close()}):null,eN=(0,r.useCallback)(()=>{if(H){K.current=!0,U(!1);return}"db"===B?ei.current?.open():el.current?.open()},[B,H]);(0,r.useEffect)(()=>{!H&&K.current&&(K.current=!1,"db"===B?ei.current?.open():el.current?.open())},[H,B]);let eC=(0,r.useCallback)(e=>{er?.addComment(e)},[er]),eS=(0,r.useCallback)(e=>{er?.focusOnAnnotation(e),"db"===B?ei.current?.openComments():el.current?.openComments()},[er,B]),[eA,ez]=(0,r.useState)(()=>{try{let e=window.localStorage.getItem("beacon:plan-left-pct");return e?Math.max(20,Math.min(80,Number(e))):50}catch{return 50}}),eE=(0,r.useRef)(null),e$=(0,r.useRef)(!1),eR=(0,r.useCallback)(e=>{e.preventDefault(),e$.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"},[]);(0,r.useEffect)(()=>{let e=e=>{if(!e$.current||!eE.current)return;let t=eE.current.getBoundingClientRect();ez(Math.max(20,Math.min(80,(e.clientX-t.left)/t.width*100)))},t=()=>{if(e$.current){e$.current=!1,document.body.style.cursor="",document.body.style.userSelect="";try{localStorage.setItem("beacon:plan-left-pct",String(eA))}catch{}}};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[eA]);let eM=async()=>{await fetch("/api/plan/annotations",{method:"DELETE",headers:(0,w.dh)((0,y.X0)())}).catch(()=>{}),await D(),R.refresh()};if((!M.pending||N||S)&&!V)return(0,s.jsxs)(A.Ue,{files:k,children:[(0,s.jsx)("div",{className:"pointer-events-none fixed left-1/2 top-3 z-30 -translate-x-1/2",children:(0,s.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-0.5 rounded-full p-0.5",children:[(0,s.jsx)(Z.E,{active:!S,onClick:()=>R.push((0,y.rc)({view:"history"})),icon:(0,s.jsx)(a.A,{className:"size-3"}),children:"Plan history"}),(0,s.jsx)(Z.E,{active:S,onClick:()=>R.push((0,y.rc)({view:"changes"})),icon:(0,s.jsx)(o.A,{className:"size-3"}),children:"Changes"})]})}),S&&$?(0,s.jsx)("div",{className:"flex h-screen min-h-0 flex-col pt-14",children:(0,s.jsx)(e_,{files:$})}):S&&z?(0,s.jsx)("div",{className:"flex h-screen min-h-0 flex-col pt-14",children:(0,s.jsx)(eG,{repo:z.repo,files:z.files,touched:z.touched,viewed:z.viewed,contract:E})}):(0,s.jsx)(en,{pendingPlan:M.pending,workspaceId:e.workspaceId})]});let eD=P||T,eP=eD&&!H,eO=!eD||H,eT=((er?.liveCount??0)>0||ec||em.length>0)&&!er?.submitted;return(0,s.jsxs)("div",{className:"relative flex h-screen flex-col",children:[Q&&(0,s.jsx)("div",{className:"fixed bottom-4 left-1/2 z-[60] -translate-x-1/2 rounded-lg border border-red-500/40 bg-red-500/15 px-4 py-2 text-sm text-red-200 shadow-xl backdrop-blur",children:Q}),V&&(0,s.jsxs)("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center gap-5 bg-background/97 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-emerald-500/15",children:(0,s.jsx)(l.A,{className:"size-6 text-emerald-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Plan approved"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:V.features>0||V.tables>0||V.endpoints>0?"It's committed. Here's where to find it:":"It's archived to your plan history."}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground/70",children:"Taking you to the map in 3 seconds…"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[V.features>0&&(0,s.jsxs)("button",{onClick:()=>{J.current=!0,R.push("/map?view=ROADMAP")},className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(i.A,{className:"size-4 text-sky-300"})," ",V.features," feature",1===V.features?"":"s"," → Map"]}),(V.tables>0||V.endpoints>0)&&(0,s.jsxs)("button",{onClick:()=>{J.current=!0,R.push("/map?view=DATABASE")},className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(d.A,{className:"size-4 text-violet-300"})," ",V.tables," table",1===V.tables?"":"s"," \xb7 ",V.endpoints," endpoint",1===V.endpoints?"":"s"," → Database"]}),(0,s.jsxs)("button",{onClick:()=>{J.current=!0,W(null),R.push((0,y.rc)({view:"changes"}))},className:"flex items-center gap-2 rounded-lg border border-white/12 px-3 py-2 text-sm text-foreground transition-colors hover:bg-white/[0.06]",children:[(0,s.jsx)(o.A,{className:"size-4 text-[#ff7a45]"})," Watch changes"]})]}),(0,s.jsx)("button",{onClick:()=>{J.current=!0,W(null),R.push((0,y.rc)({view:"history"}))},className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Done — browse plan history"})]}),er?.submitted&&(0,s.jsxs)("div",{className:"absolute inset-0 z-40 flex flex-col items-center justify-center gap-4 bg-background/95 px-6 text-center backdrop-blur-sm",children:[(0,s.jsx)("div",{className:"flex size-12 items-center justify-center rounded-full bg-sky-500/15",children:(0,s.jsx)(c.A,{className:"size-6 animate-spin text-sky-300"})}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-foreground",children:"Feedback sent"}),(0,s.jsx)("p",{className:"max-w-sm text-sm text-muted-foreground",children:"Your terminal session is revising the plan based on your comments. The updated plan will appear here automatically — no need to refresh."})]}),(0,s.jsx)("button",{onClick:()=>R.push((0,y.rc)({view:"history"})),className:"rounded-full border border-white/12 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:"Browse past plans"})]}),(0,s.jsxs)("div",{className:"pointer-events-none fixed right-3 top-3 z-30 flex items-center gap-2",children:[eD&&H&&(0,s.jsx)("button",{onClick:()=>U(!1),title:"Collapse — show the board again",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(u.A,{className:"size-3.5"})}),(0,s.jsxs)("div",{className:"glass pointer-events-auto flex h-10 items-center gap-0.5 rounded-full px-1",children:[(0,s.jsx)("button",{onClick:()=>R.push((0,y.rc)({view:"history"})),title:"Browse past plans (you can come back to this one)",className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(a.A,{className:"size-3.5"})}),(0,s.jsx)(Y,{className:"flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground"}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),eD&&(0,s.jsxs)("button",{onClick:eN,disabled:!er,title:er?.annotationCount?`Open the side panel \xb7 ${er.annotationCount} comment${1===er.annotationCount?"":"s"} so far`:"Open the side panel (details + comments)",className:"relative flex size-8 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:[(0,s.jsx)(h.A,{className:"size-3.5"}),er&&(er.annotationCount??0)>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:er.annotationCount})]}),(0,s.jsxs)("button",{"data-overall-toggle":!0,onClick:()=>er?.toggleOverall?.(),disabled:!er?.toggleOverall,title:er?.hasGlobalComment?"Edit your overall feedback":"Add overall plan-level feedback",className:(0,C.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",er?.globalOpen?"bg-white/10 text-foreground":er?.hasGlobalComment?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(m.A,{className:"size-3.5"}),er?.hasGlobalComment&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 size-2 rounded-full bg-sky-400"})]}),(0,s.jsxs)("button",{onClick:()=>ef(e=>!e),title:"Ask the agent a question about a node (answered in its next round)",className:(0,C.cn)("relative flex size-8 shrink-0 items-center justify-center rounded-full transition-colors",ep?"bg-white/10 text-foreground":em.length?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground hover:bg-white/[0.06] hover:text-foreground"),children:[(0,s.jsx)(x.A,{className:"size-3.5"}),em.length>0&&(0,s.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-3.5 min-w-3.5 items-center justify-center rounded-full bg-sky-500 px-1 text-[9px] font-semibold text-white",children:em.length})]}),(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1 h-5 w-px bg-white/10"}),(0,s.jsxs)("button",{onClick:()=>er?.submit(),disabled:!er||er.submitting||0===er.liveCount&&!ec&&0===em.length,title:er&&(0!==er.liveCount||ec||0!==em.length)?er.submitted?"Submitted — your terminal session is reading the feedback":"Submit feedback (comments + canvas edits) so the agent can revise the plan":"Highlight text or edit the canvas, then submit",className:(0,C.cn)("flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-semibold transition-colors",er?.submitted?"text-sky-300":er&&(0!==er.liveCount||ec||0!==em.length)?"text-sky-300 hover:bg-sky-500/15":"text-muted-foreground opacity-50"),children:[er?.submitted?(0,s.jsx)(l.A,{className:"size-3"}):(0,s.jsx)(p.A,{className:"size-3"}),er?.submitted?"Submitted":"Feedback"]}),eT&&(0,s.jsxs)("button",{onClick:()=>{er?.clearAll?.(),eu(!1),ex([])},title:"Discard your unsubmitted comments / canvas edits so you can approve the plan as-is",className:"flex shrink-0 items-center gap-1 rounded-full px-2 py-1 text-[11px] font-medium text-amber-300/90 transition-colors hover:bg-amber-500/15",children:[(0,s.jsx)(f.A,{className:"size-3"})," Clear to approve"]}),(0,s.jsxs)("button",{onClick:()=>void es(),disabled:eT,title:eT?"You have unsubmitted feedback — submit it, or click ‘Clear to approve’ to drop it":"Approve the plan",className:(0,C.cn)("flex shrink-0 items-center gap-1 rounded-full border border-emerald-500/40 bg-emerald-500/15 px-2.5 py-1 text-[11px] font-semibold text-emerald-300 transition-colors hover:bg-emerald-500/25",eT&&"opacity-40 hover:bg-emerald-500/15"),children:[(0,s.jsx)(l.A,{className:"size-3"})," Approve"]}),(0,s.jsxs)("button",{onClick:eM,className:"flex shrink-0 items-center gap-1 rounded-full px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-red-500/15 hover:text-red-300",title:"Discard the plan",children:[(0,s.jsx)(g.A,{className:"size-3"})," Discard"]}),(0,s.jsx)(eY,{open:q,onOpenChange:X,onConfirmed:()=>void et()})]})]}),ep&&(0,s.jsxs)("div",{className:"fixed right-3 top-16 z-30 w-80 rounded-xl border border-white/10 bg-card p-3 shadow-xl",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:"Ask the agent"}),(0,s.jsx)("button",{onClick:()=>ef(!1),title:"Close",className:"rounded p-0.5 text-muted-foreground hover:text-foreground",children:(0,s.jsx)(f.A,{className:"size-3.5"})})]}),(0,s.jsx)(e0,{targets:ew,initialTarget:eg,onAdd:e=>ex(t=>[...t,e])}),em.length>0&&(0,s.jsx)("ul",{className:"mt-2 space-y-1",children:em.map((e,t)=>(0,s.jsxs)("li",{className:"group flex items-start justify-between gap-2 rounded-md border border-white/5 bg-background/40 px-2 py-1",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"truncate font-mono text-[10px] text-sky-300/90",children:e.target}),(0,s.jsx)("div",{className:"text-[11px] text-foreground/90",children:e.question})]}),(0,s.jsx)("button",{onClick:()=>ex(e=>e.filter((e,n)=>n!==t)),title:"Remove",className:"shrink-0 rounded p-0.5 text-muted-foreground/70 opacity-0 transition-opacity hover:text-red-300 group-hover:opacity-100",children:(0,s.jsx)(f.A,{className:"size-3"})})]},t))}),(0,s.jsx)("p",{className:"mt-2 text-[10px] text-muted-foreground",children:"Questions are sent with your feedback on Submit — the agent answers them in its next round."})]}),(0,s.jsxs)("div",{ref:eE,className:"flex min-h-0 flex-1",children:[eO&&(0,s.jsx)(eV,{markdown:n}),(0,s.jsxs)("div",{className:(0,C.cn)("relative flex min-w-0 flex-col",!eP&&"flex-1"),style:eP?{width:`${eA}%`}:void 0,children:[eP&&(0,s.jsx)("div",{className:"pointer-events-none absolute right-3 top-3 z-20",children:(0,s.jsx)("button",{onClick:()=>U(!0),title:"Expand the plan to full width",className:"glass pointer-events-auto flex size-8 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-white/[0.06] hover:text-foreground",children:(0,s.jsx)(b.A,{className:"size-3.5"})})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:(0,s.jsx)(A.Ue,{files:k,children:(0,s.jsx)(O,{markdown:n,round:M.proposedAt,onApi:eo,hideSubmit:!0,getExtraSubmitPayload:ey})})})]}),eP&&(0,s.jsx)("div",{onPointerDown:eR,className:"group relative w-px shrink-0 cursor-col-resize bg-white/5 hover:bg-white/15",title:"Drag to resize",children:(0,s.jsx)("div",{className:"absolute inset-y-0 -left-1.5 right-[-6px] z-10"})}),eP&&(0,s.jsxs)("div",{className:"relative flex min-w-0 flex-col",style:{width:`${100-eA}%`},children:[P&&T&&(0,s.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 z-20",children:(0,s.jsxs)("div",{className:"glass pointer-events-auto flex items-center gap-1 rounded-full p-0.5",children:[(0,s.jsx)(Z.E,{active:"map"===B,onClick:()=>F("map"),icon:(0,s.jsx)(i.A,{className:"size-3"}),children:"Map"}),(0,s.jsx)(Z.E,{active:"db"===B,onClick:()=>F("db"),icon:(0,s.jsx)(d.A,{className:"size-3"}),children:"Database"})]})}),(0,s.jsx)("div",{className:"min-h-0 flex-1 overflow-hidden bg-background",children:"map"===B?(0,s.jsx)(G.MapClient,{view:t.view,nodes:t.nodes,edges:t.edges,hasFrontend:t.hasFrontend,embedded:!0,commentsContent:ek,commentsCount:er?.annotationCount??0,controlRef:el,onAskAgent:ev,onAddComment:eC,annotations:er?.annotations,onPinClick:eS,onUpdateComment:er?.updateComment,onRemoveComment:er?.removeAnnotation}):(0,s.jsx)(_.DbMapClient,{tables:e.tables,relations:e.relations,endpoints:e.endpoints,draft:e.draft,workspaceId:e.workspaceId,diffBase:e.diffBase,embedded:!0,draftRef:ed,onEdit:eh,controlRef:ei,commentsContent:ek,commentsCount:er?.annotationCount??0,onAddComment:eC,annotations:er?.annotations,onPinClick:eS,onUpdateComment:er?.updateComment,onRemoveComment:er?.removeAnnotation})})]})]})]})}function e0({targets:e,onAdd:t,initialTarget:n}){let[a,o]=(0,r.useState)(n||e[0]||""),[l,i]=(0,r.useState)("");(0,r.useEffect)(()=>{n&&o(n)},[n]),(0,r.useEffect)(()=>{!a&&e[0]&&o(e[0])},[e,a]);let d=()=>{let e=l.trim();e&&(t({target:a||"(plan)",question:e}),i(""))};return(0,s.jsxs)("div",{className:"space-y-1.5",children:[e.length>0&&(0,s.jsx)("select",{value:a,onChange:e=>o(e.target.value),className:"w-full rounded border border-white/10 bg-background px-2 py-1 text-[11px] outline-none focus:border-sky-400/40",children:e.map(e=>(0,s.jsx)("option",{value:e,className:"bg-card",children:e},e))}),(0,s.jsx)("textarea",{value:l,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())},rows:2,placeholder:"e.g. why a new table instead of reusing users? (⌘/Ctrl+Enter to add)",className:"w-full resize-y rounded border border-white/10 bg-background px-2 py-1.5 text-[12px] leading-snug outline-none focus:border-sky-400/40"}),(0,s.jsx)("button",{onClick:d,disabled:!l.trim(),className:(0,C.cn)("w-full rounded-md px-2 py-1 text-[11px] font-semibold transition-colors",l.trim()?"bg-sky-500/15 text-sky-300 hover:bg-sky-500/25":"text-muted-foreground opacity-50"),children:"Add question"})]})}},97358:(e,t,n)=>{"use strict";n.d(t,{pC:()=>s});let s=[{value:"default",label:"Manual approval",description:"Approve each tool call yourself — Claude Code's default."},{value:"acceptEdits",label:"Auto-accept edits",description:"Auto-approve file edits; still ask before running other tools."},{value:"bypassPermissions",label:"Bypass permissions",description:"Auto-approve every tool call (like --dangerously-skip-permissions)."},{value:"auto",label:"Auto",description:"Autonomous, gated by a safety classifier (needs a recent Claude Code + Sonnet 4.6+)."}]},99979:(e,t,n)=>{"use strict";function s(){return new URLSearchParams(window.location.search).get("ws")}function r(){return new URLSearchParams(window.location.search).get("plan")}function a(e){let t=new URLSearchParams,n=s();n&&t.set("ws",n);let a=r();for(let[n,s]of(a&&t.set("plan",a),Object.entries(e??{})))""===s?t.delete(n):t.set(n,s);let o=t.toString();return o?`/plan?${o}`:"/plan"}n.d(t,{X0:()=>s,d8:()=>r,rc:()=>a})}},e=>{e.O(0,[2574,1770,3862,5004,277,8500,4888,8997,9887,5957,766,2059,654,2231,5909,4853,1909,8441,3794,7358],()=>e(e.s=22137)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44,134,204,439,730,763,1108,1145,1235,1288,1361,1403,1570,1617,1662,1918,1929,1979,2113,2442,2449,2681,2752,2821,2922,3087,3185,3290,3519,3688,3979,4039,4284,4360,4480,4505,4636,4816,4852,4896,5022,5152,5190,5412,5545,5807,5819,5884,6426,6600,6630,6714,6760,6805,6819,6886,6950,6988,7137,7317,7423,7612,7691,7705,7851,7914,8167,8235,8617,8650,8696,8773,8906,9140,9363,9560,9751,9861],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);