vibedoc 1.6.1 → 1.8.0

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 (651) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +11 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +69 -13
  5. package/.next/routes-manifest.json +66 -0
  6. package/.next/server/app/(app)/activity/page.js.nft.json +1 -1
  7. package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/(app)/board/page.js.nft.json +1 -1
  9. package/.next/server/app/(app)/board/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/(app)/chat/page/app-paths-manifest.json +3 -0
  11. package/.next/server/app/(app)/chat/page/build-manifest.json +20 -0
  12. package/.next/server/app/(app)/chat/page/next-font-manifest.json +11 -0
  13. package/.next/server/app/(app)/chat/page/react-loadable-manifest.json +1 -0
  14. package/.next/server/app/(app)/chat/page/server-reference-manifest.json +4 -0
  15. package/.next/server/app/(app)/chat/page.js +15 -0
  16. package/.next/server/app/(app)/chat/page.js.map +5 -0
  17. package/.next/server/app/(app)/chat/page.js.nft.json +1 -0
  18. package/.next/server/app/(app)/chat/page_client-reference-manifest.js +3 -0
  19. package/.next/server/app/(app)/docs/page.js.nft.json +1 -1
  20. package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -1
  21. package/.next/server/app/(app)/explorer/page.js.nft.json +1 -1
  22. package/.next/server/app/(app)/explorer/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/(app)/manual-tests/page/app-paths-manifest.json +3 -0
  24. package/.next/server/app/(app)/manual-tests/page/build-manifest.json +20 -0
  25. package/.next/server/app/(app)/manual-tests/page/next-font-manifest.json +11 -0
  26. package/.next/server/app/(app)/manual-tests/page/react-loadable-manifest.json +1 -0
  27. package/.next/server/app/(app)/manual-tests/page/server-reference-manifest.json +4 -0
  28. package/.next/server/app/(app)/manual-tests/page.js +15 -0
  29. package/.next/server/app/(app)/manual-tests/page.js.map +5 -0
  30. package/.next/server/app/(app)/manual-tests/page.js.nft.json +1 -0
  31. package/.next/server/app/(app)/manual-tests/page_client-reference-manifest.js +3 -0
  32. package/.next/server/app/(app)/memory/page.js.nft.json +1 -1
  33. package/.next/server/app/(app)/memory/page_client-reference-manifest.js +1 -1
  34. package/.next/server/app/(app)/roadmap/page.js.nft.json +1 -1
  35. package/.next/server/app/(app)/roadmap/page_client-reference-manifest.js +1 -1
  36. package/.next/server/app/(app)/settings/page.js.nft.json +1 -1
  37. package/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/(app)/setup/page.js.nft.json +1 -1
  39. package/.next/server/app/(app)/setup/page_client-reference-manifest.js +1 -1
  40. package/.next/server/app/_global-error.html +1 -1
  41. package/.next/server/app/_global-error.rsc +1 -1
  42. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  43. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  44. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  45. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  46. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  47. package/.next/server/app/_not-found.html +1 -1
  48. package/.next/server/app/_not-found.rsc +3 -2
  49. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -2
  50. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -2
  51. package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -2
  52. package/.next/server/app/activity.html +1 -1
  53. package/.next/server/app/activity.rsc +14 -13
  54. package/.next/server/app/activity.segments/!KGFwcCk/activity/__PAGE__.segment.rsc +10 -10
  55. package/.next/server/app/activity.segments/_full.segment.rsc +14 -13
  56. package/.next/server/app/activity.segments/_tree.segment.rsc +3 -2
  57. package/.next/server/app/api/activity/route.js +2 -2
  58. package/.next/server/app/api/activity/route.js.nft.json +1 -1
  59. package/.next/server/app/api/backlinks/route.js +2 -2
  60. package/.next/server/app/api/backlinks/route.js.nft.json +1 -1
  61. package/.next/server/app/api/chat/route.js +1 -1
  62. package/.next/server/app/api/chat/route.js.nft.json +1 -1
  63. package/.next/server/app/api/context/route.js +2 -2
  64. package/.next/server/app/api/context/route.js.nft.json +1 -1
  65. package/.next/server/app/api/conversations/route/app-paths-manifest.json +3 -0
  66. package/.next/server/app/api/conversations/route/build-manifest.json +12 -0
  67. package/.next/server/app/api/conversations/route/server-reference-manifest.json +4 -0
  68. package/.next/server/app/api/conversations/route.js +9 -0
  69. package/.next/server/app/api/conversations/route.js.map +5 -0
  70. package/.next/server/app/api/conversations/route.js.nft.json +1 -0
  71. package/.next/server/app/api/conversations/route_client-reference-manifest.js +3 -0
  72. package/.next/server/app/api/decisions/route.js +2 -2
  73. package/.next/server/app/api/decisions/route.js.nft.json +1 -1
  74. package/.next/server/app/api/docs/route.js +1 -1
  75. package/.next/server/app/api/docs/route.js.nft.json +1 -1
  76. package/.next/server/app/api/explorer/route.js +2 -2
  77. package/.next/server/app/api/explorer/route.js.nft.json +1 -1
  78. package/.next/server/app/api/mcp/route.js +1 -1
  79. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  80. package/.next/server/app/api/memory/route.js +2 -2
  81. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  82. package/.next/server/app/api/plan/apply/route.js +3 -3
  83. package/.next/server/app/api/plan/apply/route.js.nft.json +1 -1
  84. package/.next/server/app/api/projects/route.js +2 -2
  85. package/.next/server/app/api/projects/route.js.nft.json +1 -1
  86. package/.next/server/app/api/registry/route.js +2 -2
  87. package/.next/server/app/api/registry/route.js.nft.json +1 -1
  88. package/.next/server/app/api/roadmap/create/route.js +3 -3
  89. package/.next/server/app/api/roadmap/create/route.js.nft.json +1 -1
  90. package/.next/server/app/api/roadmap/delete/route.js +3 -3
  91. package/.next/server/app/api/roadmap/delete/route.js.nft.json +1 -1
  92. package/.next/server/app/api/roadmap/generate/route.js +3 -3
  93. package/.next/server/app/api/roadmap/generate/route.js.nft.json +1 -1
  94. package/.next/server/app/api/roadmap/layout/route.js +3 -3
  95. package/.next/server/app/api/roadmap/layout/route.js.nft.json +1 -1
  96. package/.next/server/app/api/roadmap/restore/route/app-paths-manifest.json +3 -0
  97. package/.next/server/app/api/roadmap/restore/route/build-manifest.json +12 -0
  98. package/.next/server/app/api/roadmap/restore/route/server-reference-manifest.json +4 -0
  99. package/.next/server/app/api/roadmap/restore/route.js +9 -0
  100. package/.next/server/app/api/roadmap/restore/route.js.map +5 -0
  101. package/.next/server/app/api/roadmap/restore/route.js.nft.json +1 -0
  102. package/.next/server/app/api/roadmap/restore/route_client-reference-manifest.js +3 -0
  103. package/.next/server/app/api/roadmap/route.js +3 -3
  104. package/.next/server/app/api/roadmap/route.js.nft.json +1 -1
  105. package/.next/server/app/api/roadmap/update/route.js +3 -3
  106. package/.next/server/app/api/roadmap/update/route.js.nft.json +1 -1
  107. package/.next/server/app/api/sessions/route.js +2 -2
  108. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  109. package/.next/server/app/api/settings/route.js +3 -3
  110. package/.next/server/app/api/settings/route.js.nft.json +1 -1
  111. package/.next/server/app/api/setup/generate/route.js +1 -1
  112. package/.next/server/app/api/setup/generate/route.js.nft.json +1 -1
  113. package/.next/server/app/api/setup/write/route.js +2 -2
  114. package/.next/server/app/api/setup/write/route.js.nft.json +1 -1
  115. package/.next/server/app/api/summary/route.js +2 -2
  116. package/.next/server/app/api/summary/route.js.nft.json +1 -1
  117. package/.next/server/app/api/tasks/bulk/route/app-paths-manifest.json +3 -0
  118. package/.next/server/app/api/tasks/bulk/route/build-manifest.json +12 -0
  119. package/.next/server/app/api/tasks/bulk/route/server-reference-manifest.json +4 -0
  120. package/.next/server/app/api/tasks/bulk/route.js +9 -0
  121. package/.next/server/app/api/tasks/bulk/route.js.map +5 -0
  122. package/.next/server/app/api/tasks/bulk/route.js.nft.json +1 -0
  123. package/.next/server/app/api/tasks/bulk/route_client-reference-manifest.js +3 -0
  124. package/.next/server/app/api/tasks/create/route.js +2 -2
  125. package/.next/server/app/api/tasks/create/route.js.nft.json +1 -1
  126. package/.next/server/app/api/tasks/delete/route/app-paths-manifest.json +3 -0
  127. package/.next/server/app/api/tasks/delete/route/build-manifest.json +12 -0
  128. package/.next/server/app/api/tasks/delete/route/server-reference-manifest.json +4 -0
  129. package/.next/server/app/api/tasks/delete/route.js +9 -0
  130. package/.next/server/app/api/tasks/delete/route.js.map +5 -0
  131. package/.next/server/app/api/tasks/delete/route.js.nft.json +1 -0
  132. package/.next/server/app/api/tasks/delete/route_client-reference-manifest.js +3 -0
  133. package/.next/server/app/api/tasks/manual-tests/route/app-paths-manifest.json +3 -0
  134. package/.next/server/app/api/tasks/manual-tests/route/build-manifest.json +12 -0
  135. package/.next/server/app/api/tasks/manual-tests/route/server-reference-manifest.json +4 -0
  136. package/.next/server/app/api/tasks/manual-tests/route.js +8 -0
  137. package/.next/server/app/api/tasks/manual-tests/route.js.map +5 -0
  138. package/.next/server/app/api/tasks/manual-tests/route.js.nft.json +1 -0
  139. package/.next/server/app/api/tasks/manual-tests/route_client-reference-manifest.js +3 -0
  140. package/.next/server/app/api/tasks/restore/route/app-paths-manifest.json +3 -0
  141. package/.next/server/app/api/tasks/restore/route/build-manifest.json +12 -0
  142. package/.next/server/app/api/tasks/restore/route/server-reference-manifest.json +4 -0
  143. package/.next/server/app/api/tasks/restore/route.js +9 -0
  144. package/.next/server/app/api/tasks/restore/route.js.map +5 -0
  145. package/.next/server/app/api/tasks/restore/route.js.nft.json +1 -0
  146. package/.next/server/app/api/tasks/restore/route_client-reference-manifest.js +3 -0
  147. package/.next/server/app/api/tasks/review/route/app-paths-manifest.json +3 -0
  148. package/.next/server/app/api/tasks/review/route/build-manifest.json +12 -0
  149. package/.next/server/app/api/tasks/review/route/server-reference-manifest.json +4 -0
  150. package/.next/server/app/api/tasks/review/route.js +9 -0
  151. package/.next/server/app/api/tasks/review/route.js.map +5 -0
  152. package/.next/server/app/api/tasks/review/route.js.nft.json +1 -0
  153. package/.next/server/app/api/tasks/review/route_client-reference-manifest.js +3 -0
  154. package/.next/server/app/api/tasks/route.js +2 -2
  155. package/.next/server/app/api/tasks/route.js.nft.json +1 -1
  156. package/.next/server/app/api/tasks/update/route/app-paths-manifest.json +3 -0
  157. package/.next/server/app/api/tasks/update/route/build-manifest.json +12 -0
  158. package/.next/server/app/api/tasks/update/route/server-reference-manifest.json +4 -0
  159. package/.next/server/app/api/tasks/update/route.js +9 -0
  160. package/.next/server/app/api/tasks/update/route.js.map +5 -0
  161. package/.next/server/app/api/tasks/update/route.js.nft.json +1 -0
  162. package/.next/server/app/api/tasks/update/route_client-reference-manifest.js +3 -0
  163. package/.next/server/app/api/views/route/app-paths-manifest.json +3 -0
  164. package/.next/server/app/api/views/route/build-manifest.json +12 -0
  165. package/.next/server/app/api/views/route/server-reference-manifest.json +4 -0
  166. package/.next/server/app/api/views/route.js +9 -0
  167. package/.next/server/app/api/views/route.js.map +5 -0
  168. package/.next/server/app/api/views/route.js.nft.json +1 -0
  169. package/.next/server/app/api/views/route_client-reference-manifest.js +3 -0
  170. package/.next/server/app/board.html +1 -1
  171. package/.next/server/app/board.rsc +14 -13
  172. package/.next/server/app/board.segments/!KGFwcCk/board/__PAGE__.segment.rsc +10 -10
  173. package/.next/server/app/board.segments/_full.segment.rsc +14 -13
  174. package/.next/server/app/board.segments/_tree.segment.rsc +3 -2
  175. package/.next/server/app/chat.html +1 -0
  176. package/.next/server/app/chat.meta +31 -0
  177. package/.next/server/app/chat.rsc +31 -0
  178. package/.next/server/app/chat.segments/!KGFwcCk/chat/__PAGE__.segment.rsc +34 -0
  179. package/.next/server/app/chat.segments/_full.segment.rsc +31 -0
  180. package/.next/server/app/chat.segments/_tree.segment.rsc +5 -0
  181. package/.next/server/app/docs.html +1 -1
  182. package/.next/server/app/docs.rsc +24 -27
  183. package/.next/server/app/docs.segments/!KGFwcCk/docs/__PAGE__.segment.rsc +7 -6
  184. package/.next/server/app/docs.segments/_full.segment.rsc +24 -27
  185. package/.next/server/app/docs.segments/_tree.segment.rsc +3 -2
  186. package/.next/server/app/explorer.html +1 -1
  187. package/.next/server/app/explorer.rsc +14 -13
  188. package/.next/server/app/explorer.segments/!KGFwcCk/explorer/__PAGE__.segment.rsc +6 -5
  189. package/.next/server/app/explorer.segments/_full.segment.rsc +14 -13
  190. package/.next/server/app/explorer.segments/_tree.segment.rsc +3 -2
  191. package/.next/server/app/index.html +1 -1
  192. package/.next/server/app/index.rsc +3 -2
  193. package/.next/server/app/index.segments/__PAGE__.segment.rsc +3 -2
  194. package/.next/server/app/index.segments/_full.segment.rsc +3 -2
  195. package/.next/server/app/index.segments/_tree.segment.rsc +3 -2
  196. package/.next/server/app/manual-tests.html +1 -0
  197. package/.next/server/app/manual-tests.meta +31 -0
  198. package/.next/server/app/manual-tests.rsc +31 -0
  199. package/.next/server/app/manual-tests.segments/!KGFwcCk/manual-tests/__PAGE__.segment.rsc +33 -0
  200. package/.next/server/app/manual-tests.segments/_full.segment.rsc +31 -0
  201. package/.next/server/app/manual-tests.segments/_tree.segment.rsc +5 -0
  202. package/.next/server/app/memory.html +1 -1
  203. package/.next/server/app/memory.rsc +14 -13
  204. package/.next/server/app/memory.segments/!KGFwcCk/memory/__PAGE__.segment.rsc +6 -5
  205. package/.next/server/app/memory.segments/_full.segment.rsc +14 -13
  206. package/.next/server/app/memory.segments/_tree.segment.rsc +3 -2
  207. package/.next/server/app/page.js.nft.json +1 -1
  208. package/.next/server/app/page_client-reference-manifest.js +1 -1
  209. package/.next/server/app/roadmap.html +1 -1
  210. package/.next/server/app/roadmap.rsc +24 -26
  211. package/.next/server/app/roadmap.segments/!KGFwcCk/roadmap/__PAGE__.segment.rsc +10 -11
  212. package/.next/server/app/roadmap.segments/_full.segment.rsc +24 -26
  213. package/.next/server/app/roadmap.segments/_tree.segment.rsc +3 -2
  214. package/.next/server/app/settings.html +1 -1
  215. package/.next/server/app/settings.rsc +14 -13
  216. package/.next/server/app/settings.segments/!KGFwcCk/settings/__PAGE__.segment.rsc +10 -10
  217. package/.next/server/app/settings.segments/_full.segment.rsc +14 -13
  218. package/.next/server/app/settings.segments/_tree.segment.rsc +3 -2
  219. package/.next/server/app/setup.html +1 -1
  220. package/.next/server/app/setup.rsc +14 -13
  221. package/.next/server/app/setup.segments/!KGFwcCk/setup/__PAGE__.segment.rsc +6 -5
  222. package/.next/server/app/setup.segments/_full.segment.rsc +14 -13
  223. package/.next/server/app/setup.segments/_tree.segment.rsc +3 -2
  224. package/.next/server/app-paths-manifest.json +11 -0
  225. package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0-5bkpj._.js → 11mp_@anthropic-ai_sdk_00p3fu1._.js} +1 -1
  226. package/.next/server/chunks/{11mp_@anthropic-ai_sdk_01l5h3i._.js → 11mp_@anthropic-ai_sdk_01amtux._.js} +1 -1
  227. package/.next/server/chunks/{11mp_@anthropic-ai_sdk_00psb_y._.js → 11mp_@anthropic-ai_sdk_01jjl08._.js} +1 -1
  228. package/.next/server/chunks/{11mp_@anthropic-ai_sdk_072r2bd._.js → 11mp_@anthropic-ai_sdk_071zfm8._.js} +1 -1
  229. package/.next/server/chunks/11mp_@anthropic-ai_sdk_07v3boe._.js +3 -0
  230. package/.next/server/chunks/11mp_@anthropic-ai_sdk_09iva72._.js +3 -0
  231. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0bom1b1._.js +3 -0
  232. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0dvji7p._.js +3 -0
  233. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0dzo8jn._.js +3 -0
  234. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0hvqsqq._.js +3 -0
  235. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0i7i-jw._.js +3 -0
  236. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0k0iop5._.js +3 -0
  237. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0l3-6aq._.js +3 -0
  238. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0oegm3y._.js +3 -0
  239. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0p5cyes._.js +3 -0
  240. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0qw8i6_._.js +3 -0
  241. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0yk-a7v._.js +3 -0
  242. package/.next/server/chunks/11mp_@anthropic-ai_sdk_11fsqvb._.js +3 -0
  243. package/.next/server/chunks/11mp_@anthropic-ai_sdk_143_7ez._.js +3 -0
  244. package/.next/server/chunks/11mp_@anthropic-ai_sdk_14a4-64._.js +3 -0
  245. package/.next/server/chunks/11mp_@anthropic-ai_sdk_17d_oma._.js +3 -0
  246. package/.next/server/chunks/11mp_@anthropic-ai_sdk_18qwuyb._.js +3 -0
  247. package/.next/server/chunks/11mp_@anthropic-ai_sdk_19au8y6._.js +3 -0
  248. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1ak_hy5._.js +3 -0
  249. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1cqa0nq._.js +3 -0
  250. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1i-x_q0._.js +3 -0
  251. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1i-x_q0._.js.map +1 -0
  252. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1jmtliz._.js +3 -0
  253. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1jmtliz._.js.map +1 -0
  254. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1jouwlj._.js +3 -0
  255. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1jouwlj._.js.map +1 -0
  256. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1r_q5um._.js +3 -0
  257. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1r_q5um._.js.map +1 -0
  258. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1t959xd._.js +3 -0
  259. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1t959xd._.js.map +1 -0
  260. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1vkprw9._.js +3 -0
  261. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1vkprw9._.js.map +1 -0
  262. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1y95ax9._.js +3 -0
  263. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1y95ax9._.js.map +1 -0
  264. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1y9misr._.js +3 -0
  265. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1y9misr._.js.map +1 -0
  266. package/.next/server/chunks/11mp_@anthropic-ai_sdk_21b8wwy._.js +3 -0
  267. package/.next/server/chunks/11mp_@anthropic-ai_sdk_21b8wwy._.js.map +1 -0
  268. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_08ecfgc._.js +3 -0
  269. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_09--sd6._.js +3 -0
  270. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0e3mwc6._.js +3 -0
  271. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0go4301._.js +3 -0
  272. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0iq9dmt._.js +3 -0
  273. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0n9ijke._.js +3 -0
  274. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0szcyrx._.js +3 -0
  275. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0xy2s3x._.js +3 -0
  276. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0yaujn7._.js +3 -0
  277. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0z9ly74._.js +3 -0
  278. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1hmq3al._.js +3 -0
  279. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1tqk4bp._.js +3 -0
  280. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1x-hr6f._.js +3 -0
  281. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1zsdhg0._.js +3 -0
  282. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_20t__fe._.js +3 -0
  283. package/.next/server/chunks/{[root-of-the-server]__1u_q61h._.js → [root-of-the-server]__0-pmfg2._.js} +2 -2
  284. package/.next/server/chunks/[root-of-the-server]__02co2yq._.js +3 -0
  285. package/.next/server/chunks/[root-of-the-server]__02co2yq._.js.map +1 -0
  286. package/.next/server/chunks/{[root-of-the-server]__1y3u5ud._.js → [root-of-the-server]__04tibmn._.js} +2 -2
  287. package/.next/server/chunks/{[root-of-the-server]__17xb02p._.js → [root-of-the-server]__05g5cgo._.js} +2 -2
  288. package/.next/server/chunks/{[root-of-the-server]__0aynzrb._.js → [root-of-the-server]__0b5pwze._.js} +2 -2
  289. package/.next/server/chunks/{[root-of-the-server]__142icjb._.js → [root-of-the-server]__0druay_._.js} +2 -2
  290. package/.next/server/chunks/{[root-of-the-server]__106gpvh._.js → [root-of-the-server]__0p6ja6l._.js} +2 -2
  291. package/.next/server/chunks/[root-of-the-server]__0q3-t8a._.js +3 -0
  292. package/.next/server/chunks/[root-of-the-server]__0q3-t8a._.js.map +1 -0
  293. package/.next/server/chunks/[root-of-the-server]__0vcsqzd._.js +3 -0
  294. package/.next/server/chunks/[root-of-the-server]__0vcsqzd._.js.map +1 -0
  295. package/.next/server/chunks/{[root-of-the-server]__0nfvvy9._.js → [root-of-the-server]__1-e3i_5._.js} +2 -2
  296. package/.next/server/chunks/[root-of-the-server]__1-ic3af._.js +3 -0
  297. package/.next/server/chunks/[root-of-the-server]__1-ic3af._.js.map +1 -0
  298. package/.next/server/chunks/[root-of-the-server]__11a4ptn._.js +3 -0
  299. package/.next/server/chunks/[root-of-the-server]__11a4ptn._.js.map +1 -0
  300. package/.next/server/chunks/{[root-of-the-server]__0e59y5j._.js → [root-of-the-server]__11c8641._.js} +2 -2
  301. package/.next/server/chunks/[root-of-the-server]__11c8641._.js.map +1 -0
  302. package/.next/server/chunks/[root-of-the-server]__12nzy_6._.js +3 -0
  303. package/.next/server/chunks/[root-of-the-server]__12nzy_6._.js.map +1 -0
  304. package/.next/server/chunks/[root-of-the-server]__15ck1wv._.js +3 -0
  305. package/.next/server/chunks/[root-of-the-server]__15ck1wv._.js.map +1 -0
  306. package/.next/server/chunks/[root-of-the-server]__1613hjb._.js +30 -19
  307. package/.next/server/chunks/[root-of-the-server]__1613hjb._.js.map +1 -1
  308. package/.next/server/chunks/{[root-of-the-server]__06zf_sh._.js → [root-of-the-server]__197vw9g._.js} +2 -2
  309. package/.next/server/chunks/{[root-of-the-server]__1j0rrps._.js → [root-of-the-server]__19k8t87._.js} +2 -2
  310. package/.next/server/chunks/{[root-of-the-server]__0eqd-tw._.js → [root-of-the-server]__1ezzeji._.js} +2 -2
  311. package/.next/server/chunks/[root-of-the-server]__1jxu2x9._.js +3 -0
  312. package/.next/server/chunks/[root-of-the-server]__1jxu2x9._.js.map +1 -0
  313. package/.next/server/chunks/[root-of-the-server]__1mrmaf9._.js +3 -0
  314. package/.next/server/chunks/{[root-of-the-server]__17p0rkn._.js → [root-of-the-server]__1n68akx._.js} +2 -2
  315. package/.next/server/chunks/[root-of-the-server]__1n68akx._.js.map +1 -0
  316. package/.next/server/chunks/{[root-of-the-server]__11s76m8._.js → [root-of-the-server]__1npya5q._.js} +2 -2
  317. package/.next/server/chunks/[root-of-the-server]__1npya5q._.js.map +1 -0
  318. package/.next/server/chunks/[root-of-the-server]__1qusy4g._.js +3 -0
  319. package/.next/server/chunks/[root-of-the-server]__1qusy4g._.js.map +1 -0
  320. package/.next/server/chunks/{[root-of-the-server]__1q4ahvz._.js → [root-of-the-server]__1umrorf._.js} +2 -2
  321. package/.next/server/chunks/{[root-of-the-server]__093hlkh._.js → [root-of-the-server]__1vh9g2o._.js} +2 -2
  322. package/.next/server/chunks/{[root-of-the-server]__1y-tt29._.js → [root-of-the-server]__1vq38ov._.js} +2 -2
  323. package/.next/server/chunks/[root-of-the-server]__1xb0fmp._.js +1 -1
  324. package/.next/server/chunks/[root-of-the-server]__1xb0fmp._.js.map +1 -1
  325. package/.next/server/chunks/_04byth9._.js +24 -19
  326. package/.next/server/chunks/_04byth9._.js.map +1 -1
  327. package/.next/server/chunks/_1au4syj._.js +1 -1
  328. package/.next/server/chunks/_1au4syj._.js.map +1 -1
  329. package/.next/server/chunks/_1b5fqxy._.js.map +1 -1
  330. package/.next/server/chunks/_1ivswa9._.js +3 -0
  331. package/.next/server/chunks/_1ivswa9._.js.map +1 -0
  332. package/.next/server/chunks/_next-internal_server_app_api_conversations_route_actions_1-pu7gs.js +3 -0
  333. package/.next/server/chunks/_next-internal_server_app_api_conversations_route_actions_1-pu7gs.js.map +1 -0
  334. package/.next/server/chunks/_next-internal_server_app_api_roadmap_restore_route_actions_0skshp1.js +3 -0
  335. package/.next/server/chunks/_next-internal_server_app_api_roadmap_restore_route_actions_0skshp1.js.map +1 -0
  336. package/.next/server/chunks/_next-internal_server_app_api_tasks_bulk_route_actions_1k75mlb.js +3 -0
  337. package/.next/server/chunks/_next-internal_server_app_api_tasks_bulk_route_actions_1k75mlb.js.map +1 -0
  338. package/.next/server/chunks/_next-internal_server_app_api_tasks_delete_route_actions_1k1g6mw.js +3 -0
  339. package/.next/server/chunks/_next-internal_server_app_api_tasks_delete_route_actions_1k1g6mw.js.map +1 -0
  340. package/.next/server/chunks/_next-internal_server_app_api_tasks_manual-tests_route_actions_1rpog0y.js +3 -0
  341. package/.next/server/chunks/_next-internal_server_app_api_tasks_manual-tests_route_actions_1rpog0y.js.map +1 -0
  342. package/.next/server/chunks/_next-internal_server_app_api_tasks_restore_route_actions_1ecsti8.js +3 -0
  343. package/.next/server/chunks/_next-internal_server_app_api_tasks_restore_route_actions_1ecsti8.js.map +1 -0
  344. package/.next/server/chunks/_next-internal_server_app_api_tasks_review_route_actions_1dly07f.js +3 -0
  345. package/.next/server/chunks/_next-internal_server_app_api_tasks_review_route_actions_1dly07f.js.map +1 -0
  346. package/.next/server/chunks/_next-internal_server_app_api_tasks_update_route_actions_0z-ho6g.js +3 -0
  347. package/.next/server/chunks/_next-internal_server_app_api_tasks_update_route_actions_0z-ho6g.js.map +1 -0
  348. package/.next/server/chunks/_next-internal_server_app_api_views_route_actions_10-2c0e.js +3 -0
  349. package/.next/server/chunks/_next-internal_server_app_api_views_route_actions_10-2c0e.js.map +1 -0
  350. package/.next/server/chunks/ssr/{_0qyglif._.js → 0_g__next_dist_000c5_m._.js} +2 -4
  351. package/.next/server/chunks/ssr/0_g__next_dist_000c5_m._.js.map +1 -0
  352. package/.next/server/chunks/ssr/{0_nd_mermaid_dist_mermaid_core_mjs_1vulg1x._.js → 0_nd_mermaid_dist_mermaid_core_mjs_027n2yl._.js} +2 -2
  353. package/.next/server/chunks/ssr/0_nd_mermaid_dist_mermaid_core_mjs_027n2yl._.js.map +1 -0
  354. package/.next/server/chunks/ssr/{1u84_katex_dist_katex_mjs_0mwkb-i._.js → 1u84_katex_dist_katex_mjs_1kb5xea._.js} +1 -1
  355. package/.next/server/chunks/ssr/1u84_katex_dist_katex_mjs_1kb5xea._.js.map +1 -0
  356. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_05ggp3i._.js +1 -1
  357. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_05ggp3i._.js.map +1 -1
  358. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0wurouw._.js +3 -0
  359. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0wurouw._.js.map +1 -0
  360. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_14hl50o._.js +3 -0
  361. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_14hl50o._.js.map +1 -0
  362. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_folder-open_mjs_117ipzw._.js +3 -0
  363. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_folder-open_mjs_117ipzw._.js.map +1 -0
  364. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_triangle-alert_mjs_0ei-mpz._.js +3 -0
  365. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_triangle-alert_mjs_0ei-mpz._.js.map +1 -0
  366. package/.next/server/chunks/ssr/[root-of-the-server]__0hcextx._.js +3 -0
  367. package/.next/server/chunks/ssr/[root-of-the-server]__0hcextx._.js.map +1 -0
  368. package/.next/server/chunks/ssr/[root-of-the-server]__0xt_0w2._.js.map +1 -1
  369. package/.next/server/chunks/ssr/[root-of-the-server]__11lfnu0._.js +3 -0
  370. package/.next/server/chunks/ssr/[root-of-the-server]__11lfnu0._.js.map +1 -0
  371. package/.next/server/chunks/ssr/_04xff_2._.js +1 -1
  372. package/.next/server/chunks/ssr/_04xff_2._.js.map +1 -1
  373. package/.next/server/chunks/ssr/_071j6mr._.js +4 -0
  374. package/.next/server/chunks/ssr/_071j6mr._.js.map +1 -0
  375. package/.next/server/chunks/ssr/_09b02z-._.js +3 -0
  376. package/.next/server/chunks/ssr/_09b02z-._.js.map +1 -0
  377. package/.next/server/chunks/ssr/_0d0f1s1._.js +3 -0
  378. package/.next/server/chunks/ssr/_0d0f1s1._.js.map +1 -0
  379. package/.next/server/chunks/ssr/_0idb-vo._.js +151 -0
  380. package/.next/server/chunks/ssr/_0idb-vo._.js.map +1 -0
  381. package/.next/server/chunks/ssr/_0lnt_va._.js +4 -0
  382. package/.next/server/chunks/ssr/_0lnt_va._.js.map +1 -0
  383. package/.next/server/chunks/ssr/_0qlymco._.js +3 -0
  384. package/.next/server/chunks/ssr/_0qlymco._.js.map +1 -0
  385. package/.next/server/chunks/ssr/_0qp3gu7._.js +3 -0
  386. package/.next/server/chunks/ssr/_0qp3gu7._.js.map +1 -0
  387. package/.next/server/chunks/ssr/_0sg1oeq._.js +3 -0
  388. package/.next/server/chunks/ssr/_0sg1oeq._.js.map +1 -0
  389. package/.next/server/chunks/ssr/_14emfpq._.js +3 -0
  390. package/.next/server/chunks/ssr/_14emfpq._.js.map +1 -0
  391. package/.next/server/chunks/ssr/_1ftruw6._.js +4 -0
  392. package/.next/server/chunks/ssr/_1ftruw6._.js.map +1 -0
  393. package/.next/server/chunks/ssr/_1gxjjvh._.js +1 -1
  394. package/.next/server/chunks/ssr/_1gxjjvh._.js.map +1 -1
  395. package/.next/server/chunks/ssr/_1ncdakv._.js +4 -0
  396. package/.next/server/chunks/ssr/_1ncdakv._.js.map +1 -0
  397. package/.next/server/chunks/ssr/_1t76zdx._.js +3 -0
  398. package/.next/server/chunks/ssr/_1t76zdx._.js.map +1 -0
  399. package/.next/server/chunks/ssr/_1x7ggg5._.js +4 -0
  400. package/.next/server/chunks/ssr/_1x7ggg5._.js.map +1 -0
  401. package/.next/server/chunks/ssr/_next-internal_server_app_(app)_chat_page_actions_0g4tbzt.js +3 -0
  402. package/.next/server/chunks/ssr/_next-internal_server_app_(app)_chat_page_actions_0g4tbzt.js.map +1 -0
  403. package/.next/server/chunks/ssr/_next-internal_server_app_(app)_manual-tests_page_actions_1g5zjb7.js +3 -0
  404. package/.next/server/chunks/ssr/_next-internal_server_app_(app)_manual-tests_page_actions_1g5zjb7.js.map +1 -0
  405. package/.next/server/chunks/ssr/{node_modules__pnpm_0w9uewb._.js → node_modules__pnpm_01bjcv9._.js} +1 -1
  406. package/.next/server/chunks/ssr/{node_modules__pnpm_0p10j87._.js → node_modules__pnpm_03qrzdb._.js} +1 -1
  407. package/.next/server/chunks/ssr/{node_modules__pnpm_1a3fo7j._.js → node_modules__pnpm_06d-fdo._.js} +2 -2
  408. package/.next/server/chunks/ssr/{node_modules__pnpm_1o30a9w._.js → node_modules__pnpm_0ctisl0._.js} +1 -1
  409. package/.next/server/chunks/ssr/{node_modules__pnpm_17o8zbz._.js → node_modules__pnpm_0fwp8jm._.js} +1 -1
  410. package/.next/server/chunks/ssr/{node_modules__pnpm_19ys1iv._.js → node_modules__pnpm_0kpu0-2._.js} +1 -1
  411. package/.next/server/chunks/ssr/{node_modules__pnpm_1r4w_7k._.js → node_modules__pnpm_0vry74x._.js} +2 -2
  412. package/.next/server/chunks/ssr/{node_modules__pnpm_11lluiq._.js → node_modules__pnpm_0ycbjbd._.js} +2 -2
  413. package/.next/server/chunks/ssr/{node_modules__pnpm_1_34wt2._.js → node_modules__pnpm_1-76qxg._.js} +1 -1
  414. package/.next/server/chunks/ssr/{node_modules__pnpm_0ma8hho._.js → node_modules__pnpm_1-r94f7._.js} +1 -1
  415. package/.next/server/chunks/ssr/{node_modules__pnpm_0--x5-5._.js → node_modules__pnpm_14piqi4._.js} +1 -1
  416. package/.next/server/chunks/ssr/node_modules__pnpm_14piqi4._.js.map +1 -0
  417. package/.next/server/chunks/ssr/{node_modules__pnpm_04xoqd9._.js → node_modules__pnpm_16u1vfb._.js} +2 -2
  418. package/.next/server/chunks/ssr/node_modules__pnpm_16u1vfb._.js.map +1 -0
  419. package/.next/server/chunks/ssr/{node_modules__pnpm_19ejwjv._.js → node_modules__pnpm_17i6z2d._.js} +1 -1
  420. package/.next/server/chunks/ssr/{node_modules__pnpm_0cj37c-._.js → node_modules__pnpm_189m48n._.js} +1 -1
  421. package/.next/server/chunks/ssr/node_modules__pnpm_189m48n._.js.map +1 -0
  422. package/.next/server/chunks/ssr/{node_modules__pnpm_18pu1wl._.js → node_modules__pnpm_192f222._.js} +1 -1
  423. package/.next/server/chunks/ssr/{node_modules__pnpm_1zsbfem._.js → node_modules__pnpm_1a48_nl._.js} +1 -1
  424. package/.next/server/chunks/ssr/{node_modules__pnpm_00i3mh2._.js → node_modules__pnpm_1aa37e1._.js} +1 -1
  425. package/.next/server/chunks/ssr/{node_modules__pnpm_0kna82c._.js → node_modules__pnpm_1f440kx._.js} +1 -1
  426. package/.next/server/chunks/ssr/{node_modules__pnpm_1-poetj._.js → node_modules__pnpm_1fn3ejy._.js} +1 -1
  427. package/.next/server/chunks/ssr/{node_modules__pnpm_0yixxj2._.js → node_modules__pnpm_1min2jl._.js} +1 -1
  428. package/.next/server/chunks/ssr/node_modules__pnpm_1q89l7p._.js +3 -0
  429. package/.next/server/chunks/ssr/node_modules__pnpm_1q89l7p._.js.map +1 -0
  430. package/.next/server/chunks/ssr/{node_modules__pnpm_1l-posw._.js → node_modules__pnpm_1q_hhr3._.js} +2 -2
  431. package/.next/server/chunks/ssr/{node_modules__pnpm_0fk-8nl._.js → node_modules__pnpm_1qmkxyo._.js} +1 -1
  432. package/.next/server/chunks/ssr/{node_modules__pnpm_1xolwvc._.js → node_modules__pnpm_1qp_jvj._.js} +2 -2
  433. package/.next/server/chunks/ssr/{node_modules__pnpm_07j8gcu._.js → node_modules__pnpm_1ssjj4u._.js} +1 -1
  434. package/.next/server/chunks/ssr/{node_modules__pnpm_042y3e-._.js → node_modules__pnpm_1txccoj._.js} +1 -1
  435. package/.next/server/chunks/ssr/{node_modules__pnpm_0nbxdp_._.js → node_modules__pnpm_1uwkcin._.js} +1 -1
  436. package/.next/server/chunks/ssr/node_modules__pnpm_1xeothw._.js +3 -0
  437. package/.next/server/chunks/ssr/node_modules__pnpm_1xeothw._.js.map +1 -0
  438. package/.next/server/chunks/ssr/{node_modules__pnpm_00wjhj4._.js → node_modules__pnpm_1ygal0c._.js} +1 -1
  439. package/.next/server/chunks/ssr/src_app_(app)_activity_page_tsx_13jd6bn._.js +1 -1
  440. package/.next/server/chunks/ssr/src_app_(app)_activity_page_tsx_13jd6bn._.js.map +1 -1
  441. package/.next/server/chunks/ssr/src_app_(app)_board_page_tsx_0gpfc77._.js +3 -0
  442. package/.next/server/chunks/ssr/src_app_(app)_board_page_tsx_0gpfc77._.js.map +1 -0
  443. package/.next/server/chunks/ssr/src_app_(app)_chat_page_tsx_0c3e4l4._.js +3 -0
  444. package/.next/server/chunks/ssr/src_app_(app)_chat_page_tsx_0c3e4l4._.js.map +1 -0
  445. package/.next/server/chunks/ssr/src_app_(app)_layout_tsx_1yu5hom._.js +3 -0
  446. package/.next/server/chunks/ssr/src_app_(app)_layout_tsx_1yu5hom._.js.map +1 -0
  447. package/.next/server/chunks/ssr/src_app_(app)_manual-tests_page_tsx_01tnunf._.js +3 -0
  448. package/.next/server/chunks/ssr/src_app_(app)_manual-tests_page_tsx_01tnunf._.js.map +1 -0
  449. package/.next/server/chunks/ssr/src_app_(app)_roadmap_page_tsx_0vcq3jr._.js +5 -0
  450. package/.next/server/chunks/ssr/src_app_(app)_roadmap_page_tsx_0vcq3jr._.js.map +1 -0
  451. package/.next/server/chunks/ssr/src_app_(app)_settings_page_tsx_0zevtee._.js +2 -2
  452. package/.next/server/chunks/ssr/src_app_(app)_settings_page_tsx_0zevtee._.js.map +1 -1
  453. package/.next/server/chunks/ssr/src_app_(app)_setup_page_tsx_1yids_n._.js +1 -1
  454. package/.next/server/chunks/ssr/src_app_(app)_setup_page_tsx_1yids_n._.js.map +1 -1
  455. package/.next/server/chunks/ssr/src_components_chat_ChatView_tsx_0h5j-e2._.js +3 -0
  456. package/.next/server/chunks/ssr/src_components_chat_ChatView_tsx_0h5j-e2._.js.map +1 -0
  457. package/.next/server/chunks/ssr/src_context_ChatContext_tsx_0lowp8p._.js +5 -0
  458. package/.next/server/chunks/ssr/src_context_ChatContext_tsx_0lowp8p._.js.map +1 -0
  459. package/.next/server/chunks/ssr/{_1wf14_u._.js → src_lib_templates_index_ts_1s61uk7._.js} +2 -2
  460. package/.next/server/chunks/ssr/{_1wf14_u._.js.map → src_lib_templates_index_ts_1s61uk7._.js.map} +1 -1
  461. package/.next/server/middleware-build-manifest.js +3 -3
  462. package/.next/server/next-font-manifest.js +1 -1
  463. package/.next/server/next-font-manifest.json +8 -0
  464. package/.next/server/pages/404.html +1 -1
  465. package/.next/server/pages/500.html +1 -1
  466. package/.next/server/prefetch-hints.json +38 -0
  467. package/.next/server/server-reference-manifest.js +1 -1
  468. package/.next/server/server-reference-manifest.json +1 -1
  469. package/.next/static/chunks/02cj5_i9np4sg.js +3 -0
  470. package/.next/static/chunks/02i5hsdat1nuq.css +9 -0
  471. package/.next/static/chunks/0mgifb98wbesa.js +1 -0
  472. package/.next/static/chunks/0p1-hkgnm2ll2.js +1 -0
  473. package/.next/static/chunks/0pgu5q5vodev6.js +1 -0
  474. package/.next/static/chunks/0rqzvayflendx.js +2 -0
  475. package/.next/static/chunks/0vcfs7dii85tw.js +21 -0
  476. package/.next/static/chunks/13l4l-boqg8fx.js +1 -0
  477. package/.next/static/chunks/14hxe1qiaram9.js +1 -0
  478. package/.next/static/chunks/150y5rwg6gwvx.css +1 -0
  479. package/.next/static/chunks/16k196zyl-n9q.js +1 -0
  480. package/.next/static/chunks/18b5l8p0vd9f8.js +1 -0
  481. package/.next/static/chunks/1c_8t2kecjnua.js +1 -0
  482. package/.next/static/chunks/1fd43t9y42wd3.js +1 -0
  483. package/.next/static/chunks/1q50zh5z-fq2k.js +2 -0
  484. package/.next/static/chunks/1tu8lforstp1o.js +1 -0
  485. package/.next/static/chunks/23-xknrz6o748.js +1 -0
  486. package/.next/static/chunks/2_xpm7qhr69n8.js +2 -0
  487. package/.next/static/chunks/2ls_yp4-qgb42.js +1 -0
  488. package/.next/static/chunks/2zz0ip2l_29c3.js +3 -0
  489. package/.next/static/chunks/3ly7b47esdb7j.js +1 -0
  490. package/.next/static/chunks/3ruw8lu2_re-h.js +1 -0
  491. package/.next/static/chunks/3vf5nnd4xjo5_.js +1 -0
  492. package/.next/static/chunks/{0eggcu0ovk8sd.js → 40jaenrnspnlh.js} +26 -26
  493. package/.next/static/chunks/41oxcdcw-pcwt.js +1 -0
  494. package/README.md +3 -2
  495. package/package.json +1 -1
  496. package/skills/work-epic/SKILL.md +22 -3
  497. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0am8bw2._.js +0 -3
  498. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0enefn6._.js +0 -3
  499. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0k3n_5f._.js +0 -3
  500. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0lcfjm4._.js +0 -3
  501. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0lfx9av._.js +0 -3
  502. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0qau3qw._.js +0 -3
  503. package/.next/server/chunks/11mp_@anthropic-ai_sdk_0r1pmvm._.js +0 -3
  504. package/.next/server/chunks/11mp_@anthropic-ai_sdk_11t-z2t._.js +0 -3
  505. package/.next/server/chunks/11mp_@anthropic-ai_sdk_15hyn79._.js +0 -3
  506. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1_qk07x._.js +0 -3
  507. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1b2929e._.js +0 -3
  508. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1e72c89._.js +0 -3
  509. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1eq7asn._.js +0 -3
  510. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1fhdojs._.js +0 -3
  511. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1lh_vwq._.js +0 -3
  512. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1ludf-o._.js +0 -3
  513. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1m3luz3._.js +0 -3
  514. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1x1iz3d._.js +0 -3
  515. package/.next/server/chunks/11mp_@anthropic-ai_sdk_1xsmwlh._.js +0 -3
  516. package/.next/server/chunks/11mp_@anthropic-ai_sdk_202spah._.js +0 -3
  517. package/.next/server/chunks/11mp_@anthropic-ai_sdk_215hw9u._.js +0 -3
  518. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_0n-i0pd._.js +0 -3
  519. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_13pos4j._.js +0 -3
  520. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_17b4pqr._.js +0 -3
  521. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1bkcmom._.js +0 -3
  522. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1hlj_3l._.js +0 -3
  523. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1ip-sor._.js +0 -3
  524. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1pex5o1._.js +0 -3
  525. package/.next/server/chunks/11mp_@anthropic-ai_sdk_index_mjs_1s8lc8_._.js +0 -3
  526. package/.next/server/chunks/[root-of-the-server]__1o4a-4j._.js +0 -3
  527. package/.next/server/chunks/[root-of-the-server]__1o4a-4j._.js.map +0 -1
  528. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_08ca0b4._.js +0 -3
  529. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_08ca0b4._.js.map +0 -1
  530. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0c1k9is._.js +0 -3
  531. package/.next/server/chunks/ssr/1x05_lucide-react_dist_esm_icons_0c1k9is._.js.map +0 -1
  532. package/.next/server/chunks/ssr/_0qyglif._.js.map +0 -1
  533. package/.next/server/chunks/ssr/_0skuoxv._.js +0 -6
  534. package/.next/server/chunks/ssr/_0skuoxv._.js.map +0 -1
  535. package/.next/server/chunks/ssr/_14i_6yb._.js +0 -3
  536. package/.next/server/chunks/ssr/_14i_6yb._.js.map +0 -1
  537. package/.next/server/chunks/ssr/_1c95ems._.js +0 -151
  538. package/.next/server/chunks/ssr/_1c95ems._.js.map +0 -1
  539. package/.next/server/chunks/ssr/_1cbhuz4._.js +0 -3
  540. package/.next/server/chunks/ssr/_1cbhuz4._.js.map +0 -1
  541. package/.next/server/chunks/ssr/_1ewk_mn._.js +0 -3
  542. package/.next/server/chunks/ssr/_1ewk_mn._.js.map +0 -1
  543. package/.next/server/chunks/ssr/_1y-ofyw._.js +0 -3
  544. package/.next/server/chunks/ssr/_1y-ofyw._.js.map +0 -1
  545. package/.next/server/chunks/ssr/node_modules__pnpm_0bmkw6o._.js +0 -3
  546. package/.next/server/chunks/ssr/node_modules__pnpm_0bmkw6o._.js.map +0 -1
  547. package/.next/server/chunks/ssr/node_modules__pnpm_1imm4ut._.js +0 -3
  548. package/.next/server/chunks/ssr/node_modules__pnpm_1imm4ut._.js.map +0 -1
  549. package/.next/server/chunks/ssr/src_components_008q3v8._.js +0 -3
  550. package/.next/server/chunks/ssr/src_components_008q3v8._.js.map +0 -1
  551. package/.next/server/chunks/ssr/src_components_14pwej-._.js +0 -3
  552. package/.next/server/chunks/ssr/src_components_14pwej-._.js.map +0 -1
  553. package/.next/server/chunks/ssr/src_components_ui_scroll-area_tsx_0i-n_27._.js +0 -3
  554. package/.next/server/chunks/ssr/src_components_ui_scroll-area_tsx_0i-n_27._.js.map +0 -1
  555. package/.next/static/chunks/0-vk2d2nnzav2.js +0 -3
  556. package/.next/static/chunks/0-z7kyblalrea.js +0 -1
  557. package/.next/static/chunks/02sab26ica2x3.js +0 -1
  558. package/.next/static/chunks/0iva6rdtfqpbz.js +0 -1
  559. package/.next/static/chunks/0k2qhx29amdgs.js +0 -1
  560. package/.next/static/chunks/0qm101bdsxdyh.css +0 -10
  561. package/.next/static/chunks/0wg9n5zb8mo2p.js +0 -1
  562. package/.next/static/chunks/0z_y7el6m76yk.js +0 -1
  563. package/.next/static/chunks/1-ekntoveuxzd.js +0 -4
  564. package/.next/static/chunks/10neasnz6hhq1.js +0 -1
  565. package/.next/static/chunks/1r7z33e9jk3vp.js +0 -1
  566. package/.next/static/chunks/22dw7r8x0h2sx.js +0 -1
  567. package/.next/static/chunks/26ee8jsbellqk.js +0 -21
  568. package/.next/static/chunks/3kkg030rcpz7l.js +0 -1
  569. package/.next/static/chunks/3pf_4ye6ju8gt.js +0 -1
  570. package/.next/static/chunks/3smp1lj103j-l.js +0 -1
  571. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0-5bkpj._.js.map → 11mp_@anthropic-ai_sdk_00p3fu1._.js.map} +0 -0
  572. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_00psb_y._.js.map → 11mp_@anthropic-ai_sdk_01amtux._.js.map} +0 -0
  573. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_01l5h3i._.js.map → 11mp_@anthropic-ai_sdk_01jjl08._.js.map} +0 -0
  574. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_072r2bd._.js.map → 11mp_@anthropic-ai_sdk_071zfm8._.js.map} +0 -0
  575. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0am8bw2._.js.map → 11mp_@anthropic-ai_sdk_07v3boe._.js.map} +0 -0
  576. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0enefn6._.js.map → 11mp_@anthropic-ai_sdk_09iva72._.js.map} +0 -0
  577. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0k3n_5f._.js.map → 11mp_@anthropic-ai_sdk_0bom1b1._.js.map} +0 -0
  578. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0lcfjm4._.js.map → 11mp_@anthropic-ai_sdk_0dvji7p._.js.map} +0 -0
  579. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0lfx9av._.js.map → 11mp_@anthropic-ai_sdk_0dzo8jn._.js.map} +0 -0
  580. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0qau3qw._.js.map → 11mp_@anthropic-ai_sdk_0hvqsqq._.js.map} +0 -0
  581. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_0r1pmvm._.js.map → 11mp_@anthropic-ai_sdk_0i7i-jw._.js.map} +0 -0
  582. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_11t-z2t._.js.map → 11mp_@anthropic-ai_sdk_0k0iop5._.js.map} +0 -0
  583. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_15hyn79._.js.map → 11mp_@anthropic-ai_sdk_0l3-6aq._.js.map} +0 -0
  584. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1_qk07x._.js.map → 11mp_@anthropic-ai_sdk_0oegm3y._.js.map} +0 -0
  585. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1b2929e._.js.map → 11mp_@anthropic-ai_sdk_0p5cyes._.js.map} +0 -0
  586. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1e72c89._.js.map → 11mp_@anthropic-ai_sdk_0qw8i6_._.js.map} +0 -0
  587. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1eq7asn._.js.map → 11mp_@anthropic-ai_sdk_0yk-a7v._.js.map} +0 -0
  588. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1fhdojs._.js.map → 11mp_@anthropic-ai_sdk_11fsqvb._.js.map} +0 -0
  589. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1lh_vwq._.js.map → 11mp_@anthropic-ai_sdk_143_7ez._.js.map} +0 -0
  590. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1ludf-o._.js.map → 11mp_@anthropic-ai_sdk_14a4-64._.js.map} +0 -0
  591. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1m3luz3._.js.map → 11mp_@anthropic-ai_sdk_17d_oma._.js.map} +0 -0
  592. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1x1iz3d._.js.map → 11mp_@anthropic-ai_sdk_18qwuyb._.js.map} +0 -0
  593. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_1xsmwlh._.js.map → 11mp_@anthropic-ai_sdk_19au8y6._.js.map} +0 -0
  594. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_202spah._.js.map → 11mp_@anthropic-ai_sdk_1ak_hy5._.js.map} +0 -0
  595. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_215hw9u._.js.map → 11mp_@anthropic-ai_sdk_1cqa0nq._.js.map} +0 -0
  596. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_0n-i0pd._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_08ecfgc._.js.map} +0 -0
  597. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_13pos4j._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_09--sd6._.js.map} +0 -0
  598. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_17b4pqr._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0e3mwc6._.js.map} +0 -0
  599. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1bkcmom._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0go4301._.js.map} +0 -0
  600. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1hlj_3l._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0iq9dmt._.js.map} +0 -0
  601. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1ip-sor._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0n9ijke._.js.map} +0 -0
  602. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1pex5o1._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0szcyrx._.js.map} +0 -0
  603. /package/.next/server/chunks/{11mp_@anthropic-ai_sdk_index_mjs_1s8lc8_._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0xy2s3x._.js.map} +0 -0
  604. /package/.next/server/chunks/{[root-of-the-server]__0e59y5j._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0yaujn7._.js.map} +0 -0
  605. /package/.next/server/chunks/{[root-of-the-server]__11s76m8._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_0z9ly74._.js.map} +0 -0
  606. /package/.next/server/chunks/{ssr/0_nd_mermaid_dist_mermaid_core_mjs_1vulg1x._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1hmq3al._.js.map} +0 -0
  607. /package/.next/server/chunks/{ssr/1u84_katex_dist_katex_mjs_0mwkb-i._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1tqk4bp._.js.map} +0 -0
  608. /package/.next/server/chunks/{ssr/node_modules__pnpm_0--x5-5._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1x-hr6f._.js.map} +0 -0
  609. /package/.next/server/chunks/{ssr/node_modules__pnpm_04xoqd9._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_1zsdhg0._.js.map} +0 -0
  610. /package/.next/server/chunks/{ssr/node_modules__pnpm_0cj37c-._.js.map → 11mp_@anthropic-ai_sdk_index_mjs_20t__fe._.js.map} +0 -0
  611. /package/.next/server/chunks/{[root-of-the-server]__1u_q61h._.js.map → [root-of-the-server]__0-pmfg2._.js.map} +0 -0
  612. /package/.next/server/chunks/{[root-of-the-server]__1y3u5ud._.js.map → [root-of-the-server]__04tibmn._.js.map} +0 -0
  613. /package/.next/server/chunks/{[root-of-the-server]__17xb02p._.js.map → [root-of-the-server]__05g5cgo._.js.map} +0 -0
  614. /package/.next/server/chunks/{[root-of-the-server]__0aynzrb._.js.map → [root-of-the-server]__0b5pwze._.js.map} +0 -0
  615. /package/.next/server/chunks/{[root-of-the-server]__142icjb._.js.map → [root-of-the-server]__0druay_._.js.map} +0 -0
  616. /package/.next/server/chunks/{[root-of-the-server]__106gpvh._.js.map → [root-of-the-server]__0p6ja6l._.js.map} +0 -0
  617. /package/.next/server/chunks/{[root-of-the-server]__0nfvvy9._.js.map → [root-of-the-server]__1-e3i_5._.js.map} +0 -0
  618. /package/.next/server/chunks/{[root-of-the-server]__06zf_sh._.js.map → [root-of-the-server]__197vw9g._.js.map} +0 -0
  619. /package/.next/server/chunks/{[root-of-the-server]__1j0rrps._.js.map → [root-of-the-server]__19k8t87._.js.map} +0 -0
  620. /package/.next/server/chunks/{[root-of-the-server]__0eqd-tw._.js.map → [root-of-the-server]__1ezzeji._.js.map} +0 -0
  621. /package/.next/server/chunks/{[root-of-the-server]__17p0rkn._.js.map → [root-of-the-server]__1mrmaf9._.js.map} +0 -0
  622. /package/.next/server/chunks/{[root-of-the-server]__1q4ahvz._.js.map → [root-of-the-server]__1umrorf._.js.map} +0 -0
  623. /package/.next/server/chunks/{[root-of-the-server]__093hlkh._.js.map → [root-of-the-server]__1vh9g2o._.js.map} +0 -0
  624. /package/.next/server/chunks/{[root-of-the-server]__1y-tt29._.js.map → [root-of-the-server]__1vq38ov._.js.map} +0 -0
  625. /package/.next/server/chunks/ssr/{node_modules__pnpm_0w9uewb._.js.map → node_modules__pnpm_01bjcv9._.js.map} +0 -0
  626. /package/.next/server/chunks/ssr/{node_modules__pnpm_0p10j87._.js.map → node_modules__pnpm_03qrzdb._.js.map} +0 -0
  627. /package/.next/server/chunks/ssr/{node_modules__pnpm_1a3fo7j._.js.map → node_modules__pnpm_06d-fdo._.js.map} +0 -0
  628. /package/.next/server/chunks/ssr/{node_modules__pnpm_1o30a9w._.js.map → node_modules__pnpm_0ctisl0._.js.map} +0 -0
  629. /package/.next/server/chunks/ssr/{node_modules__pnpm_17o8zbz._.js.map → node_modules__pnpm_0fwp8jm._.js.map} +0 -0
  630. /package/.next/server/chunks/ssr/{node_modules__pnpm_19ys1iv._.js.map → node_modules__pnpm_0kpu0-2._.js.map} +0 -0
  631. /package/.next/server/chunks/ssr/{node_modules__pnpm_1r4w_7k._.js.map → node_modules__pnpm_0vry74x._.js.map} +0 -0
  632. /package/.next/server/chunks/ssr/{node_modules__pnpm_11lluiq._.js.map → node_modules__pnpm_0ycbjbd._.js.map} +0 -0
  633. /package/.next/server/chunks/ssr/{node_modules__pnpm_1_34wt2._.js.map → node_modules__pnpm_1-76qxg._.js.map} +0 -0
  634. /package/.next/server/chunks/ssr/{node_modules__pnpm_0ma8hho._.js.map → node_modules__pnpm_1-r94f7._.js.map} +0 -0
  635. /package/.next/server/chunks/ssr/{node_modules__pnpm_19ejwjv._.js.map → node_modules__pnpm_17i6z2d._.js.map} +0 -0
  636. /package/.next/server/chunks/ssr/{node_modules__pnpm_18pu1wl._.js.map → node_modules__pnpm_192f222._.js.map} +0 -0
  637. /package/.next/server/chunks/ssr/{node_modules__pnpm_1zsbfem._.js.map → node_modules__pnpm_1a48_nl._.js.map} +0 -0
  638. /package/.next/server/chunks/ssr/{node_modules__pnpm_00i3mh2._.js.map → node_modules__pnpm_1aa37e1._.js.map} +0 -0
  639. /package/.next/server/chunks/ssr/{node_modules__pnpm_0kna82c._.js.map → node_modules__pnpm_1f440kx._.js.map} +0 -0
  640. /package/.next/server/chunks/ssr/{node_modules__pnpm_1-poetj._.js.map → node_modules__pnpm_1fn3ejy._.js.map} +0 -0
  641. /package/.next/server/chunks/ssr/{node_modules__pnpm_0yixxj2._.js.map → node_modules__pnpm_1min2jl._.js.map} +0 -0
  642. /package/.next/server/chunks/ssr/{node_modules__pnpm_1l-posw._.js.map → node_modules__pnpm_1q_hhr3._.js.map} +0 -0
  643. /package/.next/server/chunks/ssr/{node_modules__pnpm_0fk-8nl._.js.map → node_modules__pnpm_1qmkxyo._.js.map} +0 -0
  644. /package/.next/server/chunks/ssr/{node_modules__pnpm_1xolwvc._.js.map → node_modules__pnpm_1qp_jvj._.js.map} +0 -0
  645. /package/.next/server/chunks/ssr/{node_modules__pnpm_07j8gcu._.js.map → node_modules__pnpm_1ssjj4u._.js.map} +0 -0
  646. /package/.next/server/chunks/ssr/{node_modules__pnpm_042y3e-._.js.map → node_modules__pnpm_1txccoj._.js.map} +0 -0
  647. /package/.next/server/chunks/ssr/{node_modules__pnpm_0nbxdp_._.js.map → node_modules__pnpm_1uwkcin._.js.map} +0 -0
  648. /package/.next/server/chunks/ssr/{node_modules__pnpm_00wjhj4._.js.map → node_modules__pnpm_1ygal0c._.js.map} +0 -0
  649. /package/.next/static/{gJtrYenzL6_deB-6pdvIL → fGPda81_8-K4GmaNUE6KA}/_buildManifest.js +0 -0
  650. /package/.next/static/{gJtrYenzL6_deB-6pdvIL → fGPda81_8-K4GmaNUE6KA}/_clientMiddlewareManifest.js +0 -0
  651. /package/.next/static/{gJtrYenzL6_deB-6pdvIL → fGPda81_8-K4GmaNUE6KA}/_ssgManifest.js +0 -0
@@ -0,0 +1,3 @@
1
+ module.exports=[712125,544428,a=>{"use strict";var b=a.i(662145),c=a.i(174897),d=a.i(913975),e=a.i(498053),f=a.i(256857);let g={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};g.node;let h=(0,f.default)(g);a.s(["ArrowUpRight",0,h],544428);let i={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};i.node;let j=(0,f.default)(i),k={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};k.node;let l=(0,f.default)(k);var m=a.i(28386),n=a.i(544394),o=a.i(685698),p=a.i(149350),q=a.i(368114),r=a.i(107742);function s({proposal:a,onResolve:d}){let{rootParam:e,openDoc:f}=(0,n.useApp)(),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(null),[k,l]=(0,c.useState)(!1);(0,c.useEffect)(()=>{fetch(`/api/docs${e}&read=${encodeURIComponent(a.path)}`).then(a=>a.ok?a.json():null).then(b=>h(b?.path===a.path.replace(/^\.\//,"")&&"string"==typeof b.content?b.content:"")).catch(()=>h(""))},[a.path,e]);let m=(0,c.useMemo)(()=>null===g?null:function(a,b){let c=a;for(let[a,d]of b.entries()){if("string"!=typeof d?.old_string||"string"!=typeof d?.new_string)return{error:`Edit ${a+1}: old_string and new_string must be strings`};if(""===d.old_string){if(""!==c)return{error:`Edit ${a+1}: empty old_string is only allowed for a new, empty doc`};c=d.new_string;continue}let b=c.indexOf(d.old_string);if(-1===b)return{error:`Edit ${a+1}: old_string not found in the doc`};if(-1!==c.indexOf(d.old_string,b+1))return{error:`Edit ${a+1}: old_string matches more than once; include more surrounding text`};c=c.slice(0,b)+d.new_string+c.slice(b+d.old_string.length)}return{content:c}}(g,a.edits),[g,a.edits]),o=null!==m&&"error"in m?m.error:null,p=(0,c.useMemo)(()=>{var a;let b,c;return null===g||!m||"error"in m?[]:(b=(a=function(a,b){let c=a.split("\n"),d=b.split("\n"),e=0;for(;e<c.length&&e<d.length&&c[e]===d[e];)e++;let f=c.length,g=d.length;for(;f>e&&g>e&&c[f-1]===d[g-1];)f--,g--;let h=c.slice(e,f),i=d.slice(e,g),j=Array.from({length:h.length+1},()=>Array(i.length+1).fill(0));for(let a=h.length-1;a>=0;a--)for(let b=i.length-1;b>=0;b--)j[a][b]=h[a]===i[b]?j[a+1][b+1]+1:Math.max(j[a+1][b],j[a][b+1]);let k=[],l=0,m=0;for(;l<h.length||m<i.length;)l<h.length&&m<i.length&&h[l]===i[m]?(k.push({op:" ",text:h[l]}),l++,m++):l<h.length&&(m===i.length||j[l+1][m]>=j[l][m+1])?(k.push({op:"-",text:h[l]}),l++):(k.push({op:"+",text:i[m]}),m++);return[...c.slice(0,e).map(a=>({op:" ",text:a})),...k,...c.slice(f).map(a=>({op:" ",text:a}))]}(g,m.content)).map(()=>!1),a.forEach((c,d)=>{if(" "!==c.op)for(let c=Math.max(0,d-2);c<=Math.min(a.length-1,d+2);c++)b[c]=!0}),c=[],a.forEach((a,d)=>{b[d]?c.push(a):"number"==typeof c[c.length-1]?c[c.length-1]=c[c.length-1]+1:c.push(1)}),c)},[g,m]),r=p.filter(a=>"number"!=typeof a&&"+"===a.op).length,t=p.filter(a=>"number"!=typeof a&&"-"===a.op).length;async function u(){l(!0),j(null);try{let b=await fetch(`/api/docs${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:a.path,edits:a.edits,actor:"ai"})});if(!b.ok)throw Error((await b.json().catch(()=>null))?.error??"Save failed");d("accepted")}catch(a){j(a.message)}finally{l(!1)}}return(0,b.jsxs)("div",{className:"my-2 rounded-md border border-border overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-surface2 border-b border-border",children:[(0,b.jsx)("button",{onClick:()=>f(a.path),className:"text-xs font-mono text-accent truncate hover:underline",title:a.path,children:a.path}),(0,b.jsxs)("span",{className:"text-[10px] font-mono text-teal-400",children:["+",r]}),(0,b.jsxs)("span",{className:"text-[10px] font-mono text-red-400",children:["-",t]})]}),a.summary&&(0,b.jsx)("div",{className:"px-2 py-1 text-xs text-muted border-b border-border",children:a.summary}),(0,b.jsxs)("div",{className:"max-h-72 overflow-auto text-[11px] font-mono leading-5",children:[null===g&&(0,b.jsx)("div",{className:"px-2 py-1 text-muted",children:"Loading diff…"}),o&&(0,b.jsxs)("div",{className:"px-2 py-1 text-red-400",children:["Doc changed since this proposal (",o,"). Ask the agent to propose again."]}),null!==g&&!o&&0===p.length&&(0,b.jsx)("div",{className:"px-2 py-1 text-muted",children:"No changes"}),p.map((a,c)=>"number"==typeof a?(0,b.jsxs)("div",{className:"px-2 text-muted bg-surface2/50",children:["⋯ ",a," unchanged line",a>1?"s":""]},c):(0,b.jsxs)("div",{className:(0,q.cn)("px-2 whitespace-pre-wrap break-words","+"===a.op&&"bg-teal-500/10 text-teal-300","-"===a.op&&"bg-red-500/10 text-red-300 line-through decoration-red-400/40"),children:[a.op," ",a.text||" "]},c))]}),(0,b.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 border-t border-border",children:["pending"===a.status?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:u,disabled:k||null===g||!!o,className:"text-xs px-2 py-0.5 rounded-sm bg-accent/20 text-accent hover:bg-accent/30 disabled:opacity-50",children:k?"Applying…":"Accept"}),(0,b.jsx)("button",{onClick:()=>d("rejected"),disabled:k,className:"text-xs px-2 py-0.5 rounded-sm text-muted hover:text-txt",children:"Reject"})]}):(0,b.jsx)("span",{className:(0,q.cn)("text-xs","accepted"===a.status?"text-teal-400":"text-muted"),children:"accepted"===a.status?"✓ Applied":"Rejected"}),i&&(0,b.jsx)("span",{className:"text-xs text-red-400 truncate",children:i})]})]})}function t({proposal:a,onResolve:d}){let{rootParam:e,openDoc:f}=(0,n.useApp)(),g=a.plan,h="breakdown"===g.kind?g.tasks:[],i="roadmap"===g.kind?g.horizons??[]:[],j="roadmap"===g.kind?g.epics??[]:[],k="breakdown"===g.kind?(g.epic??"").trim().toUpperCase():"",l="breakdown"===g.kind?g.newEpic:void 0,[m,o]=(0,c.useState)(new Map),[p,q]=(0,c.useState)(new Set),[r,s]=(0,c.useState)(null),[v,w]=(0,c.useState)(null),[x,y]=(0,c.useState)(!1);(0,c.useEffect)(()=>{fetch(`/api/roadmap${e}`).then(a=>a.ok?a.json():null).then(a=>o(new Map((a?.items??[]).map(a=>[a.id,a.title])))).catch(()=>o(new Map))},[e]);let z=("breakdown"===g.kind?h.map(a=>a.key):[...i,...j].map(a=>a.key)).filter(a=>!p.has(a)),A="pending"===a.status,B=new Set(i.map(a=>a.key)),C=(a,c,d,e,f=!1)=>(0,b.jsx)(u,{rowKey:a,title:c,meta:d,body:e,indent:f,checked:!p.has(a),disabled:!A||x,onToggle:()=>{w(null),q(b=>{let c=new Set(b),d=c.has(a);for(let b of B.has(a)?[a,...j.filter(b=>b.parent.trim()===a).map(a=>a.key)]:[a])d?c.delete(b):c.add(b);let e=j.find(b=>b.key===a)?.parent.trim();return d&&e&&B.has(e)&&c.delete(e),c})},open:r===a,onOpen:()=>s(r===a?null:a)},a),D=a=>a.trim().split("\n")[0]??"",E=[...new Set(j.map(a=>a.parent.trim()).filter(a=>!B.has(a)))];async function F(){y(!0),w(null);try{let a=await fetch(`/api/plan/apply${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plan:g,selected:z})}),b=await a.json().catch(()=>null);if(!a.ok)throw Error(b?.error??`Apply failed (${a.status})`);d("accepted",b?.created??[],[...p])}catch(a){w(a.message)}finally{y(!1)}}return(0,b.jsxs)("div",{className:"my-2 rounded-md border border-border overflow-hidden",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-surface2 border-b border-border",children:[(0,b.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-widest text-muted",children:"Plan"}),"breakdown"===g.kind?(0,b.jsxs)(b.Fragment,{children:[k?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-xs font-mono text-accent",children:k}),(0,b.jsx)("span",{className:"text-xs text-txt truncate",children:m.get(k)??""})]}):l?(0,b.jsxs)("span",{className:"text-xs text-txt truncate",children:["New epic: ",l.title,(0,b.jsxs)("span",{className:"text-muted",children:[" (under ",l.parent.trim().toUpperCase()," ",m.get(l.parent.trim().toUpperCase())??"",")"]})]}):(0,b.jsx)("span",{className:"text-xs text-muted",children:"No epic"}),(0,b.jsxs)("span",{className:"ml-auto text-[10px] font-mono text-muted",children:[h.length," tasks"]})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-xs text-txt",children:"Roadmap"}),(0,b.jsxs)("span",{className:"ml-auto text-[10px] font-mono text-muted",children:[i.length?`${i.length} horizons \xb7 `:"",j.length," epics"]})]})]}),(0,b.jsxs)("ul",{className:"max-h-80 overflow-auto",children:[h.map(a=>C(a.key,a.title,[a.size,a.dependsOn?.length?`after ${a.dependsOn.join(", ")}`:null,a.due?`due ${a.due}`:null].filter(Boolean).join(" · "),a.body)),i.map(a=>[C(a.key,a.title,"new horizon",a.body),...j.filter(b=>b.parent.trim()===a.key).map(a=>C(a.key,a.title,D(a.body),a.body,!0))]),E.map(a=>[(0,b.jsxs)("li",{className:"px-2 py-1.5 border-b border-border text-xs text-muted",children:[(0,b.jsx)("span",{className:"font-mono text-accent mr-1",children:a.toUpperCase()}),m.get(a.toUpperCase())??""]},`parent-${a}`),...j.filter(b=>b.parent.trim()===a).map(a=>C(a.key,a.title,D(a.body),a.body,!0))])]}),v&&(0,b.jsx)("div",{className:"px-2 py-1 text-xs text-red-400 whitespace-pre-wrap border-t border-border",children:v}),(0,b.jsx)("div",{className:"flex items-center gap-2 px-2 py-1.5 border-t border-border",children:A?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("button",{onClick:F,disabled:x||0===z.length,className:"text-xs px-2 py-0.5 rounded-sm bg-accent/20 text-accent hover:bg-accent/30 disabled:opacity-50",children:x?"Creating…":`Accept (${z.length})`}),(0,b.jsx)("button",{onClick:()=>d("rejected",[],[]),disabled:x,className:"text-xs px-2 py-0.5 rounded-sm text-muted hover:text-txt",children:"Reject"})]}):"accepted"===a.status?(0,b.jsxs)("span",{className:"text-xs text-teal-400",children:["✓ Created"," ",(a.created??[]).map((a,c)=>(0,b.jsxs)("span",{children:[c>0&&", ",(0,b.jsx)("button",{onClick:()=>f(a.file),className:"font-mono hover:underline",children:a.id})]},a.id))]}):(0,b.jsx)("span",{className:"text-xs text-muted",children:"Rejected"})})]})}function u({rowKey:a,title:c,meta:d,body:e,indent:f,checked:g,disabled:h,onToggle:i,open:j,onOpen:k}){return(0,b.jsxs)("li",{"data-plan-row":a,className:"border-b border-border last:border-b-0",children:[(0,b.jsxs)("div",{className:(0,q.cn)("flex items-start gap-2 px-2 py-1.5",f&&"pl-6"),children:[(0,b.jsx)("input",{type:"checkbox","aria-label":`Include ${c}`,checked:g,disabled:h,onChange:i,className:"mt-0.5 accent-accent"}),(0,b.jsxs)("button",{onClick:k,className:"flex-1 min-w-0 text-left",children:[(0,b.jsxs)("div",{className:(0,q.cn)("text-xs text-txt",!g&&"line-through text-muted"),children:[(0,b.jsx)("span",{className:"font-mono text-muted mr-1",children:a}),c]}),d&&(0,b.jsx)("div",{className:"text-[10px] font-mono text-muted truncate",children:d})]})]}),j&&e&&(0,b.jsx)("div",{className:"px-3 pb-2 border-t border-border bg-surface2/40",children:(0,b.jsx)(p.MarkdownRenderer,{content:e,className:"text-xs"})})]})}var v=a.i(429672),w=a.i(598984);let x="grid size-8 shrink-0 place-items-center rounded-md text-muted transition-colors duration-(--duration-fast) hover:bg-surface2 hover:text-txt";function y({chat:a,hidden:d,wide:e}){let{send:f,resolveProposal:g,resolvePlan:h,answerQuestions:i}=(0,o.useChats)(),j=(0,c.useRef)(null),k=a.messages;return(0,c.useEffect)(()=>{let a=j.current;a&&!d&&(a.scrollTop=a.scrollHeight)},[k,d]),(0,b.jsx)("div",{ref:j,hidden:d,role:"log","aria-live":"polite",className:"min-h-0 flex-1 overflow-y-auto",children:(0,b.jsxs)("div",{className:(0,q.cn)("mx-auto flex flex-col gap-5 px-5 py-6 text-sm",e?"max-w-3xl":"max-w-none"),children:[0===k.length&&(0,b.jsx)(B,{chat:a,onPick:b=>f(a.id,b)}),k.map((c,d)=>(0,b.jsx)(z,{m:c,thinking:a.busy&&d===k.length-1,busy:a.busy,onProposal:(b,c,d)=>g(a.id,b,c,d),onPlan:(b,c,d,e)=>h(a.id,b,c,d,e),onAnswers:(b,c)=>i(a.id,b,c)},d))]})})}function z({m:a,thinking:c,busy:d,onProposal:e,onPlan:f,onAnswers:g}){return"user"===a.role?(0,b.jsx)("div",{className:"flex justify-end animate-fade-in",children:(0,b.jsx)("div",{className:"max-w-[85%] whitespace-pre-wrap rounded-2xl rounded-br-md border border-accent/20 bg-accent/10 px-3.5 py-2 text-txt",children:a.text})}):(0,b.jsxs)("div",{className:"flex gap-3 animate-fade-in",children:[(0,b.jsx)("div",{className:"mt-0.5 grid size-6 shrink-0 place-items-center rounded-md bg-linear-to-br from-accent to-teal text-[10px] text-white","aria-hidden":!0,children:"⬡"}),(0,b.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[a.tools.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1",children:a.tools.map((a,c)=>(0,b.jsx)("span",{className:"rounded-sm border border-border bg-surface2 px-1.5 py-0.5 font-mono text-[10px] text-muted animate-slide-in",children:a},c))}),a.proposals.map(a=>(0,b.jsx)(s,{proposal:a,onResolve:b=>e(a.id,a.path,b)},a.id)),a.plans.map(a=>(0,b.jsx)(t,{proposal:a,onResolve:(b,c,d)=>f(a,b,c,d)},a.id)),a.questions.map(a=>(0,b.jsx)(v.QuestionCard,{set:a,disabled:d,onSubmit:b=>g(a,b)},a.id)),a.text&&(0,b.jsx)(p.MarkdownRenderer,{content:a.text,className:"text-sm"}),c&&!a.text&&!a.error&&(0,b.jsx)(A,{}),a.error&&(0,b.jsx)("p",{className:"whitespace-pre-wrap text-xs text-danger",children:a.error})]})]})}function A(){return(0,b.jsxs)("span",{className:"inline-flex items-center gap-2 text-xs text-muted",children:[(0,b.jsx)("span",{className:"inline-flex gap-1","aria-hidden":!0,children:[0,150,300].map(a=>(0,b.jsx)("span",{className:"size-1.5 rounded-full bg-accent animate-pulse-dot",style:{animationDelay:`${a}ms`}},a))}),"Thinking…"]})}function B({chat:a,onPick:c}){let d=a.attach;return(0,b.jsxs)("div",{className:"flex flex-col items-start gap-4 py-6 animate-fade-in",children:[(0,b.jsx)("div",{className:"grid size-9 place-items-center rounded-lg bg-linear-to-br from-accent to-teal text-sm text-white","aria-hidden":!0,children:"⬡"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("h3",{className:"text-lg font-semibold text-txt",children:d?`Ask about ${d.id}`:"Ask the agent"}),(0,b.jsx)("p",{className:"mt-1 max-w-md text-sm text-muted",children:d?`The agent reads ${"epic"===d.kind?"the epic and its tasks":"the task"} first. It proposes changes; nothing is written until you accept.`:"It reads your docs, tasks and roadmap and proposes edits you review. Runs on your local Claude Code login."})]}),(0,b.jsx)("div",{className:"flex flex-col gap-1.5",children:(0,r.suggestions)(d).map((a,d)=>(0,b.jsxs)("button",{type:"button",onClick:()=>c(a),style:{animationDelay:`${60*d}ms`},className:"group flex items-center gap-2 rounded-lg border border-border px-3 py-2 text-left text-sm text-txt/90 transition-colors duration-(--duration-fast) animate-slide-in [animation-fill-mode:both] hover:border-accent/50 hover:bg-accent/5",children:[(0,b.jsx)(h,{className:"size-3.5 text-muted transition-transform duration-(--duration-fast) group-hover:-translate-y-px group-hover:translate-x-px group-hover:text-accent"}),a]},a))})]})}function C({chat:a,wide:f}){let{send:g,stop:h,queue:i}=(0,o.useChats)(),{selectedDoc:j}=(0,n.useApp)(),k=(0,d.usePathname)(),[m,p]=(0,c.useState)(""),r="/docs"===k?j?.path:void 0,s=a.messages[a.messages.length-1],t=!!s?.questions.some(a=>!a.answers),u=Math.min(8,Math.max(1,m.split("\n").length));function v(){m.trim()&&!a.busy&&(g(a.id,m),p(""))}return(0,b.jsx)("div",{className:"shrink-0 px-5 pb-4 pt-1",children:(0,b.jsxs)("div",{className:(0,q.cn)("mx-auto rounded-xl border border-border bg-surface2 transition-[border-color,box-shadow] duration-(--duration-base) focus-within:border-accent/60 focus-within:shadow-[0_0_0_3px_rgb(var(--rgb-accent)/0.12)]",f?"max-w-3xl":"max-w-none"),children:[(0,b.jsx)("textarea",{autoFocus:!i.some(b=>b.id===a.id),value:m,onChange:a=>p(a.target.value),onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||a.nativeEvent.isComposing||(a.preventDefault(),v())},rows:u,placeholder:a.busy?"Agent is working…":t?"Answer the questions above…":"Ask the agent… (Enter to send)",className:"block w-full resize-none bg-transparent px-3.5 pt-3 text-sm text-txt placeholder:text-muted focus:outline-hidden"}),(0,b.jsxs)("div",{className:"flex items-center gap-2 px-2.5 pb-2 pt-1",children:[(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[10px] text-muted",children:r?`@ ${r}`:"Shift+Enter for a new line"}),a.busy?(0,b.jsxs)("button",{type:"button",onClick:()=>h(a.id),title:"Stop the agent",className:"grid size-7 place-items-center rounded-full border border-border text-muted transition-colors hover:text-txt",children:[(0,b.jsx)(l,{className:"size-3 fill-current"}),(0,b.jsx)("span",{className:"sr-only",children:"Stop"})]}):(0,b.jsxs)("button",{type:"button",onClick:v,disabled:!m.trim(),title:"Send (Enter)",className:"grid size-7 place-items-center rounded-full bg-accent text-accent-fg transition-[opacity,transform] duration-(--duration-fast) enabled:hover:scale-105 disabled:opacity-30",children:[(0,b.jsx)(e.ArrowUp,{className:"size-3.5"}),(0,b.jsx)("span",{className:"sr-only",children:"Send"})]})]})]})})}a.s(["ChatView",0,function({chatId:a,variant:e,onExpand:f,onNavigate:g}){let{chats:h,stop:i,remove:k,notice:n,dismissNotice:p}=(0,o.useChats)(),s=(0,d.useRouter)(),t=h.find(b=>b.id===a),[u,v]=(0,c.useState)([a]);if(u.includes(a)||v([...u,a]),!t)return(0,b.jsx)("div",{className:"grid h-full place-items-center p-8 text-sm text-muted",children:"This chat was closed."});let z=(0,r.chatStatus)(t);return(0,b.jsxs)("section",{"aria-label":`Chat: ${t.title}`,className:"flex h-full min-h-0 flex-col",children:[(0,b.jsxs)("header",{className:(0,q.cn)("flex h-14 shrink-0 items-center gap-3 border-b border-border px-5","modal"===e&&"pr-14"),children:[(0,b.jsx)(w.StatusMarker,{status:z,showIdle:!0}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsx)("h2",{className:"truncate text-sm font-medium text-txt",children:t.title}),(0,b.jsx)("p",{className:"font-mono text-[10px] text-muted",children:r.STATUS_LABEL[z]})]}),t.attach&&(0,b.jsx)("button",{type:"button",onClick:()=>{var a;return t.attach&&(a=(0,w.attachHref)(t.attach),void(g?.(),s.push(a)))},title:`Open ${t.attach.id} in the ${"epic"===t.attach.kind?"roadmap":"board"}`,className:"rounded-full border border-border px-2 py-1 text-muted transition-colors duration-(--duration-fast) hover:border-accent/50 hover:text-accent",children:(0,b.jsx)(w.AttachLabel,{attach:t.attach})}),t.busy&&(0,b.jsxs)("button",{type:"button",onClick:()=>i(t.id),title:"Stop the agent",className:x,children:[(0,b.jsx)(l,{className:"size-3.5 fill-current"}),(0,b.jsx)("span",{className:"sr-only",children:"Stop"})]}),"modal"===e&&f&&(0,b.jsxs)("button",{type:"button",onClick:f,title:"Open as page",className:x,children:[(0,b.jsx)(j,{className:"size-3.5"}),(0,b.jsx)("span",{className:"sr-only",children:"Open as page"})]}),"page"===e&&(0,b.jsx)("button",{type:"button",onClick:()=>k(t.id),"aria-label":`Delete ${t.title}`,title:"Delete chat",className:(0,q.cn)(x,"hover:text-danger"),children:(0,b.jsx)(m.Trash2,{className:"size-3.5"})})]}),u.map(c=>{let d=h.find(a=>a.id===c);return d?(0,b.jsx)(y,{chat:d,hidden:c!==a,wide:"page"===e},c):null}),n&&(0,b.jsxs)("div",{role:"status",className:"mx-5 mb-2 flex items-start gap-2 rounded-md border border-amber/30 bg-amber/10 px-3 py-2 text-xs text-amber animate-fade-in",children:[(0,b.jsx)("span",{className:"flex-1",children:n}),(0,b.jsx)("button",{onClick:p,"aria-label":"Dismiss",className:"leading-none text-muted hover:text-txt",children:"×"})]}),(0,b.jsx)(C,{chat:t,wide:"page"===e},t.id)]})}],712125)}];
2
+
3
+ //# sourceMappingURL=src_components_chat_ChatView_tsx_0h5j-e2._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/chat/ChatView.tsx","../../../../src/components/chat/ProposalCard.tsx","../../../../src/components/chat/PlanCard.tsx","../../../../src/lib/diff.ts","../../../../node_modules/.pnpm/lucide-react%401.48.0_react%4019.3.0/node_modules/lucide-react/src/icons/square.ts","../../../../node_modules/.pnpm/lucide-react%401.48.0_react%4019.3.0/node_modules/lucide-react/src/icons/maximize-2.ts","../../../../node_modules/.pnpm/lucide-react%401.48.0_react%4019.3.0/node_modules/lucide-react/src/icons/arrow-up-right.ts"],"sourcesContent":["\"use client\"\n\nimport { useEffect, useRef, useState } from \"react\"\nimport { usePathname, useRouter } from \"next/navigation\"\nimport { ArrowUp, ArrowUpRight, Maximize2, Square, Trash2 } from \"lucide-react\"\nimport { useApp } from \"@/context/AppContext\"\nimport { useChats, type ChatMessage, type ChatTab } from \"@/context/ChatContext\"\nimport { MarkdownRenderer } from \"@/components/docs/MarkdownRenderer\"\nimport { cn } from \"@/lib/utils\"\nimport { STATUS_LABEL, chatStatus, suggestions } from \"@/lib/chats\"\nimport { ProposalCard, type ProposalStatus } from \"./ProposalCard\"\nimport { PlanCard, type PlanCreated, type PlanProposal, type PlanStatus } from \"./PlanCard\"\nimport { QuestionCard, type QuestionSet } from \"./QuestionCard\"\nimport { AttachLabel, StatusMarker, attachHref } from \"./StatusMarker\"\n\n/**\n * One conversation. The chat modal and the /chat page both render this, so they are the same chat UI.\n * Chats shown here before stay mounted (hidden) so card state, e.g. unchecked plan rows, survives switching.\n */\nexport function ChatView({ chatId, variant, onExpand, onNavigate }: {\n chatId: string\n variant: \"modal\" | \"page\"\n /** Modal: open this chat as a page */\n onExpand?: () => void\n /** Called before following a link out of the chat (the modal closes itself) */\n onNavigate?: () => void\n}) {\n const { chats, stop, remove, notice, dismissNotice } = useChats()\n const router = useRouter()\n const chat = chats.find((c) => c.id === chatId)\n // Adjust-state-during-render: remember every chat this view has shown\n const [mounted, setMounted] = useState<string[]>([chatId])\n if (!mounted.includes(chatId)) setMounted([...mounted, chatId])\n\n if (!chat) {\n return <div className=\"grid h-full place-items-center p-8 text-sm text-muted\">This chat was closed.</div>\n }\n\n const status = chatStatus(chat)\n const go = (href: string) => { onNavigate?.(); router.push(href) }\n\n return (\n <section aria-label={`Chat: ${chat.title}`} className=\"flex h-full min-h-0 flex-col\">\n <header className={cn(\"flex h-14 shrink-0 items-center gap-3 border-b border-border px-5\", variant === \"modal\" && \"pr-14\")}>\n <StatusMarker status={status} showIdle />\n <div className=\"min-w-0 flex-1\">\n <h2 className=\"truncate text-sm font-medium text-txt\">{chat.title}</h2>\n <p className=\"font-mono text-[10px] text-muted\">{STATUS_LABEL[status]}</p>\n </div>\n {chat.attach && (\n <button\n type=\"button\"\n onClick={() => chat.attach && go(attachHref(chat.attach))}\n title={`Open ${chat.attach.id} in the ${chat.attach.kind === \"epic\" ? \"roadmap\" : \"board\"}`}\n className=\"rounded-full border border-border px-2 py-1 text-muted transition-colors duration-(--duration-fast) hover:border-accent/50 hover:text-accent\"\n >\n <AttachLabel attach={chat.attach} />\n </button>\n )}\n {chat.busy && (\n <button type=\"button\" onClick={() => stop(chat.id)} title=\"Stop the agent\" className={ICON_BTN}>\n <Square className=\"size-3.5 fill-current\" />\n <span className=\"sr-only\">Stop</span>\n </button>\n )}\n {variant === \"modal\" && onExpand && (\n <button type=\"button\" onClick={onExpand} title=\"Open as page\" className={ICON_BTN}>\n <Maximize2 className=\"size-3.5\" />\n <span className=\"sr-only\">Open as page</span>\n </button>\n )}\n {variant === \"page\" && (\n <button type=\"button\" onClick={() => remove(chat.id)} aria-label={`Delete ${chat.title}`} title=\"Delete chat\" className={cn(ICON_BTN, \"hover:text-danger\")}>\n <Trash2 className=\"size-3.5\" />\n </button>\n )}\n </header>\n\n {mounted.map((id) => {\n const c = chats.find((x) => x.id === id)\n return c ? <Conversation key={id} chat={c} hidden={id !== chatId} wide={variant === \"page\"} /> : null\n })}\n\n {notice && (\n <div role=\"status\" className=\"mx-5 mb-2 flex items-start gap-2 rounded-md border border-amber/30 bg-amber/10 px-3 py-2 text-xs text-amber animate-fade-in\">\n <span className=\"flex-1\">{notice}</span>\n <button onClick={dismissNotice} aria-label=\"Dismiss\" className=\"leading-none text-muted hover:text-txt\">×</button>\n </div>\n )}\n <Composer key={chat.id} chat={chat} wide={variant === \"page\"} />\n </section>\n )\n}\n\nconst ICON_BTN = \"grid size-8 shrink-0 place-items-center rounded-md text-muted transition-colors duration-(--duration-fast) hover:bg-surface2 hover:text-txt\"\n\nfunction Conversation({ chat, hidden, wide }: { chat: ChatTab; hidden: boolean; wide: boolean }) {\n const { send, resolveProposal, resolvePlan, answerQuestions } = useChats()\n const scrollRef = useRef<HTMLDivElement>(null)\n const messages = chat.messages\n\n // Follow the stream while visible\n useEffect(() => {\n const el = scrollRef.current\n if (el && !hidden) el.scrollTop = el.scrollHeight\n }, [messages, hidden])\n\n return (\n <div ref={scrollRef} hidden={hidden} role=\"log\" aria-live=\"polite\" className=\"min-h-0 flex-1 overflow-y-auto\">\n <div className={cn(\"mx-auto flex flex-col gap-5 px-5 py-6 text-sm\", wide ? \"max-w-3xl\" : \"max-w-none\")}>\n {messages.length === 0 && <EmptyChat chat={chat} onPick={(s) => send(chat.id, s)} />}\n {messages.map((m, i) => (\n <Message\n key={i}\n m={m}\n thinking={chat.busy && i === messages.length - 1}\n busy={chat.busy}\n onProposal={(id, path, status) => resolveProposal(chat.id, id, path, status)}\n onPlan={(p, status, created, unchecked) => resolvePlan(chat.id, p, status, created, unchecked)}\n onAnswers={(set, answers) => answerQuestions(chat.id, set, answers)}\n />\n ))}\n </div>\n </div>\n )\n}\n\nfunction Message({ m, thinking, busy, onProposal, onPlan, onAnswers }: {\n m: ChatMessage\n thinking: boolean\n busy: boolean\n onProposal: (id: string, path: string, status: ProposalStatus) => void\n onPlan: (p: PlanProposal, status: PlanStatus, created: PlanCreated[], unchecked: string[]) => void\n onAnswers: (set: QuestionSet, answers: string[]) => void\n}) {\n if (m.role === \"user\") {\n return (\n <div className=\"flex justify-end animate-fade-in\">\n <div className=\"max-w-[85%] whitespace-pre-wrap rounded-2xl rounded-br-md border border-accent/20 bg-accent/10 px-3.5 py-2 text-txt\">\n {m.text}\n </div>\n </div>\n )\n }\n return (\n <div className=\"flex gap-3 animate-fade-in\">\n <div className=\"mt-0.5 grid size-6 shrink-0 place-items-center rounded-md bg-linear-to-br from-accent to-teal text-[10px] text-white\" aria-hidden>⬡</div>\n <div className=\"min-w-0 flex-1 space-y-2\">\n {m.tools.length > 0 && (\n <div className=\"flex flex-wrap gap-1\">\n {m.tools.map((t, j) => (\n <span key={j} className=\"rounded-sm border border-border bg-surface2 px-1.5 py-0.5 font-mono text-[10px] text-muted animate-slide-in\">{t}</span>\n ))}\n </div>\n )}\n {m.proposals.map((p) => (\n <ProposalCard key={p.id} proposal={p} onResolve={(status) => onProposal(p.id, p.path, status)} />\n ))}\n {m.plans.map((p) => (\n <PlanCard key={p.id} proposal={p} onResolve={(status, created, unchecked) => onPlan(p, status, created, unchecked)} />\n ))}\n {m.questions.map((q) => (\n <QuestionCard key={q.id} set={q} disabled={busy} onSubmit={(answers) => onAnswers(q, answers)} />\n ))}\n {m.text && <MarkdownRenderer content={m.text} className=\"text-sm\" />}\n {thinking && !m.text && !m.error && <Thinking />}\n {m.error && <p className=\"whitespace-pre-wrap text-xs text-danger\">{m.error}</p>}\n </div>\n </div>\n )\n}\n\nfunction Thinking() {\n return (\n <span className=\"inline-flex items-center gap-2 text-xs text-muted\">\n <span className=\"inline-flex gap-1\" aria-hidden>\n {[0, 150, 300].map((d) => (\n <span key={d} className=\"size-1.5 rounded-full bg-accent animate-pulse-dot\" style={{ animationDelay: `${d}ms` }} />\n ))}\n </span>\n Thinking…\n </span>\n )\n}\n\nfunction EmptyChat({ chat, onPick }: { chat: ChatTab; onPick: (s: string) => void }) {\n const a = chat.attach\n return (\n <div className=\"flex flex-col items-start gap-4 py-6 animate-fade-in\">\n <div className=\"grid size-9 place-items-center rounded-lg bg-linear-to-br from-accent to-teal text-sm text-white\" aria-hidden>⬡</div>\n <div>\n <h3 className=\"text-lg font-semibold text-txt\">{a ? `Ask about ${a.id}` : \"Ask the agent\"}</h3>\n <p className=\"mt-1 max-w-md text-sm text-muted\">\n {a\n ? `The agent reads ${a.kind === \"epic\" ? \"the epic and its tasks\" : \"the task\"} first. It proposes changes; nothing is written until you accept.`\n : \"It reads your docs, tasks and roadmap and proposes edits you review. Runs on your local Claude Code login.\"}\n </p>\n </div>\n <div className=\"flex flex-col gap-1.5\">\n {suggestions(a).map((s, i) => (\n <button\n key={s}\n type=\"button\"\n onClick={() => onPick(s)}\n style={{ animationDelay: `${60 * i}ms` }}\n className=\"group flex items-center gap-2 rounded-lg border border-border px-3 py-2 text-left text-sm text-txt/90 transition-colors duration-(--duration-fast) animate-slide-in [animation-fill-mode:both] hover:border-accent/50 hover:bg-accent/5\"\n >\n <ArrowUpRight className=\"size-3.5 text-muted transition-transform duration-(--duration-fast) group-hover:-translate-y-px group-hover:translate-x-px group-hover:text-accent\" />\n {s}\n </button>\n ))}\n </div>\n </div>\n )\n}\n\nfunction Composer({ chat, wide }: { chat: ChatTab; wide: boolean }) {\n const { send, stop, queue } = useChats()\n const { selectedDoc } = useApp()\n const pathname = usePathname()\n const [input, setInput] = useState(\"\")\n const docPath = pathname === \"/docs\" ? selectedDoc?.path : undefined\n const last = chat.messages[chat.messages.length - 1]\n const questionsPending = !!last?.questions.some((q) => !q.answers)\n const rows = Math.min(8, Math.max(1, input.split(\"\\n\").length))\n\n function submit() {\n if (!input.trim() || chat.busy) return\n send(chat.id, input)\n setInput(\"\")\n }\n\n return (\n <div className=\"shrink-0 px-5 pb-4 pt-1\">\n <div className={cn(\"mx-auto rounded-xl border border-border bg-surface2 transition-[border-color,box-shadow] duration-(--duration-base) focus-within:border-accent/60 focus-within:shadow-[0_0_0_3px_rgb(var(--rgb-accent)/0.12)]\", wide ? \"max-w-3xl\" : \"max-w-none\")}>\n <textarea\n // Not for a queued chat, so a second `c` walks the queue instead of typing into the composer\n autoFocus={!queue.some((q) => q.id === chat.id)}\n value={input}\n onChange={(e) => setInput(e.target.value)}\n onKeyDown={(e) => {\n if (e.key === \"Enter\" && !e.shiftKey && !e.nativeEvent.isComposing) {\n e.preventDefault()\n submit()\n }\n }}\n rows={rows}\n placeholder={chat.busy ? \"Agent is working…\" : questionsPending ? \"Answer the questions above…\" : \"Ask the agent… (Enter to send)\"}\n className=\"block w-full resize-none bg-transparent px-3.5 pt-3 text-sm text-txt placeholder:text-muted focus:outline-hidden\"\n />\n <div className=\"flex items-center gap-2 px-2.5 pb-2 pt-1\">\n <span className=\"min-w-0 flex-1 truncate font-mono text-[10px] text-muted\">\n {docPath ? `@ ${docPath}` : \"Shift+Enter for a new line\"}\n </span>\n {chat.busy ? (\n <button type=\"button\" onClick={() => stop(chat.id)} title=\"Stop the agent\" className=\"grid size-7 place-items-center rounded-full border border-border text-muted transition-colors hover:text-txt\">\n <Square className=\"size-3 fill-current\" />\n <span className=\"sr-only\">Stop</span>\n </button>\n ) : (\n <button\n type=\"button\"\n onClick={submit}\n disabled={!input.trim()}\n title=\"Send (Enter)\"\n className=\"grid size-7 place-items-center rounded-full bg-accent text-accent-fg transition-[opacity,transform] duration-(--duration-fast) enabled:hover:scale-105 disabled:opacity-30\"\n >\n <ArrowUp className=\"size-3.5\" />\n <span className=\"sr-only\">Send</span>\n </button>\n )}\n </div>\n </div>\n </div>\n )\n}\n","\"use client\"\n\nimport { useEffect, useMemo, useState } from \"react\"\nimport { useApp } from \"@/context/AppContext\"\nimport { applyEdits, lineDiff, type DiffLine, type TextEdit } from \"@/lib/diff\"\nimport { cn } from \"@/lib/utils\"\n\nexport type ProposalStatus = \"pending\" | \"accepted\" | \"rejected\"\n\nexport interface Proposal {\n id: string\n path: string\n edits: TextEdit[]\n summary?: string\n status: ProposalStatus\n}\n\nconst CONTEXT = 2\n\n// Keep changed lines plus CONTEXT lines around them; collapse the rest into a count.\nfunction visibleHunks(lines: DiffLine[]): (DiffLine | number)[] {\n const keep = lines.map(() => false)\n lines.forEach((l, i) => {\n if (l.op === \" \") return\n for (let k = Math.max(0, i - CONTEXT); k <= Math.min(lines.length - 1, i + CONTEXT); k++) keep[k] = true\n })\n const out: (DiffLine | number)[] = []\n lines.forEach((l, i) => {\n if (keep[i]) out.push(l)\n else if (typeof out[out.length - 1] === \"number\") out[out.length - 1] = (out[out.length - 1] as number) + 1\n else out.push(1)\n })\n return out\n}\n\nexport function ProposalCard({ proposal, onResolve }: { proposal: Proposal; onResolve: (status: ProposalStatus) => void }) {\n const { rootParam, openDoc } = useApp()\n const [before, setBefore] = useState<string | null>(null)\n const [error, setError] = useState<string | null>(null)\n const [saving, setSaving] = useState(false)\n\n useEffect(() => {\n fetch(`/api/docs${rootParam}&read=${encodeURIComponent(proposal.path)}`)\n .then((r) => (r.ok ? r.json() : null))\n // readDoc falls back to fuzzy matching; a different path means this doc doesn't exist yet\n .then((d) => setBefore(d?.path === proposal.path.replace(/^\\.\\//, \"\") && typeof d.content === \"string\" ? d.content : \"\"))\n .catch(() => setBefore(\"\"))\n }, [proposal.path, rootParam])\n\n const applied = useMemo(() => (before === null ? null : applyEdits(before, proposal.edits)), [before, proposal.edits])\n const stale = applied !== null && \"error\" in applied ? applied.error : null\n const hunks = useMemo(\n () => (before === null || !applied || \"error\" in applied ? [] : visibleHunks(lineDiff(before, applied.content))),\n [before, applied],\n )\n const added = hunks.filter((h) => typeof h !== \"number\" && h.op === \"+\").length\n const removed = hunks.filter((h) => typeof h !== \"number\" && h.op === \"-\").length\n\n async function accept() {\n setSaving(true)\n setError(null)\n try {\n // Server re-applies the edits to the file as it is now, so unrelated changes since the proposal survive\n const res = await fetch(`/api/docs${rootParam}`, {\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ path: proposal.path, edits: proposal.edits, actor: \"ai\" }),\n })\n if (!res.ok) throw new Error((await res.json().catch(() => null))?.error ?? \"Save failed\")\n onResolve(\"accepted\")\n } catch (e) {\n setError((e as Error).message)\n } finally {\n setSaving(false)\n }\n }\n\n return (\n <div className=\"my-2 rounded-md border border-border overflow-hidden\">\n <div className=\"flex items-center gap-2 px-2 py-1.5 bg-surface2 border-b border-border\">\n <button onClick={() => openDoc(proposal.path)} className=\"text-xs font-mono text-accent truncate hover:underline\" title={proposal.path}>\n {proposal.path}\n </button>\n <span className=\"text-[10px] font-mono text-teal-400\">+{added}</span>\n <span className=\"text-[10px] font-mono text-red-400\">-{removed}</span>\n </div>\n {proposal.summary && <div className=\"px-2 py-1 text-xs text-muted border-b border-border\">{proposal.summary}</div>}\n\n <div className=\"max-h-72 overflow-auto text-[11px] font-mono leading-5\">\n {before === null && <div className=\"px-2 py-1 text-muted\">Loading diff…</div>}\n {stale && <div className=\"px-2 py-1 text-red-400\">Doc changed since this proposal ({stale}). Ask the agent to propose again.</div>}\n {before !== null && !stale && hunks.length === 0 && <div className=\"px-2 py-1 text-muted\">No changes</div>}\n {hunks.map((h, i) =>\n typeof h === \"number\" ? (\n <div key={i} className=\"px-2 text-muted bg-surface2/50\">⋯ {h} unchanged line{h > 1 ? \"s\" : \"\"}</div>\n ) : (\n <div\n key={i}\n className={cn(\n \"px-2 whitespace-pre-wrap break-words\",\n h.op === \"+\" && \"bg-teal-500/10 text-teal-300\",\n h.op === \"-\" && \"bg-red-500/10 text-red-300 line-through decoration-red-400/40\",\n )}\n >\n {h.op}{\" \"}{h.text || \" \"}\n </div>\n ),\n )}\n </div>\n\n <div className=\"flex items-center gap-2 px-2 py-1.5 border-t border-border\">\n {proposal.status === \"pending\" ? (\n <>\n <button\n onClick={accept}\n disabled={saving || before === null || !!stale}\n className=\"text-xs px-2 py-0.5 rounded-sm bg-accent/20 text-accent hover:bg-accent/30 disabled:opacity-50\"\n >\n {saving ? \"Applying…\" : \"Accept\"}\n </button>\n <button onClick={() => onResolve(\"rejected\")} disabled={saving} className=\"text-xs px-2 py-0.5 rounded-sm text-muted hover:text-txt\">\n Reject\n </button>\n </>\n ) : (\n <span className={cn(\"text-xs\", proposal.status === \"accepted\" ? \"text-teal-400\" : \"text-muted\")}>\n {proposal.status === \"accepted\" ? \"✓ Applied\" : \"Rejected\"}\n </span>\n )}\n {error && <span className=\"text-xs text-red-400 truncate\">{error}</span>}\n </div>\n </div>\n )\n}\n","\"use client\"\n\nimport { useEffect, useState } from \"react\"\nimport { useApp } from \"@/context/AppContext\"\nimport { MarkdownRenderer } from \"@/components/docs/MarkdownRenderer\"\nimport { cn } from \"@/lib/utils\"\nimport type { Plan, PlanEpic, PlanTask } from \"@/lib/plan\"\n\nexport type PlanStatus = \"pending\" | \"accepted\" | \"rejected\"\nexport interface PlanCreated { key: string; id: string; file: string }\n\nexport interface PlanProposal {\n id: string\n plan: Plan\n status: PlanStatus\n created?: PlanCreated[]\n}\n\nexport function PlanCard({ proposal, onResolve }: {\n proposal: PlanProposal\n onResolve: (status: PlanStatus, created: PlanCreated[], unchecked: string[]) => void\n}) {\n const { rootParam, openDoc } = useApp()\n const plan = proposal.plan\n const tasks: PlanTask[] = plan.kind === \"breakdown\" ? plan.tasks : []\n const horizons = plan.kind === \"roadmap\" ? plan.horizons ?? [] : []\n const epics: PlanEpic[] = plan.kind === \"roadmap\" ? plan.epics ?? [] : []\n const epicId = plan.kind === \"breakdown\" ? (plan.epic ?? \"\").trim().toUpperCase() : \"\"\n const newEpic = plan.kind === \"breakdown\" ? plan.newEpic : undefined\n const [titles, setTitles] = useState<Map<string, string>>(new Map())\n const [unchecked, setUnchecked] = useState<Set<string>>(new Set())\n const [open, setOpen] = useState<string | null>(null)\n const [error, setError] = useState<string | null>(null)\n const [saving, setSaving] = useState(false)\n\n useEffect(() => {\n fetch(`/api/roadmap${rootParam}`)\n .then((r) => (r.ok ? r.json() : null))\n .then((d) => setTitles(new Map((d?.items ?? []).map((i: { id: string; title: string }) => [i.id, i.title]))))\n .catch(() => setTitles(new Map()))\n }, [rootParam])\n\n const keys = plan.kind === \"breakdown\" ? tasks.map((t) => t.key) : [...horizons, ...epics].map((x) => x.key)\n const selected = keys.filter((k) => !unchecked.has(k))\n const pending = proposal.status === \"pending\"\n\n // Roadmap: a horizon toggles its epics; checking an epic re-checks its horizon (never an epic without its horizon).\n const epicsOf = (h: string) => epics.filter((e) => e.parent.trim() === h).map((e) => e.key)\n const horizonKeys = new Set(horizons.map((h) => h.key))\n function toggle(key: string) {\n setError(null)\n setUnchecked((prev) => {\n const next = new Set(prev)\n const on = next.has(key)\n const group = horizonKeys.has(key) ? [key, ...epicsOf(key)] : [key]\n for (const k of group) if (on) next.delete(k); else next.add(k)\n const parent = epics.find((e) => e.key === key)?.parent.trim()\n if (on && parent && horizonKeys.has(parent)) next.delete(parent)\n return next\n })\n }\n\n const row = (key: string, title: string, meta: string, body: string | undefined, indent = false) => (\n <PlanRow\n key={key} rowKey={key} title={title} meta={meta} body={body} indent={indent}\n checked={!unchecked.has(key)} disabled={!pending || saving} onToggle={() => toggle(key)}\n open={open === key} onOpen={() => setOpen(open === key ? null : key)}\n />\n )\n const outcome = (body: string) => body.trim().split(\"\\n\")[0] ?? \"\"\n // Existing horizons that the plan adds epics to, in first-use order.\n const existingParents = [...new Set(epics.map((e) => e.parent.trim()).filter((p) => !horizonKeys.has(p)))]\n\n async function accept() {\n setSaving(true)\n setError(null)\n try {\n const res = await fetch(`/api/plan/apply${rootParam}`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ plan, selected }),\n })\n const data = await res.json().catch(() => null)\n if (!res.ok) throw new Error(data?.error ?? `Apply failed (${res.status})`)\n onResolve(\"accepted\", data?.created ?? [], [...unchecked])\n } catch (e) {\n setError((e as Error).message)\n } finally {\n setSaving(false)\n }\n }\n\n return (\n <div className=\"my-2 rounded-md border border-border overflow-hidden\">\n <div className=\"flex items-center gap-2 px-2 py-1.5 bg-surface2 border-b border-border\">\n <span className=\"text-[10px] font-mono uppercase tracking-widest text-muted\">Plan</span>\n {plan.kind === \"breakdown\" ? (\n <>\n {epicId ? (\n <>\n <span className=\"text-xs font-mono text-accent\">{epicId}</span>\n <span className=\"text-xs text-txt truncate\">{titles.get(epicId) ?? \"\"}</span>\n </>\n ) : newEpic ? (\n <span className=\"text-xs text-txt truncate\">\n New epic: {newEpic.title}\n <span className=\"text-muted\"> (under {newEpic.parent.trim().toUpperCase()} {titles.get(newEpic.parent.trim().toUpperCase()) ?? \"\"})</span>\n </span>\n ) : (\n <span className=\"text-xs text-muted\">No epic</span>\n )}\n <span className=\"ml-auto text-[10px] font-mono text-muted\">{tasks.length} tasks</span>\n </>\n ) : (\n <>\n <span className=\"text-xs text-txt\">Roadmap</span>\n <span className=\"ml-auto text-[10px] font-mono text-muted\">\n {horizons.length ? `${horizons.length} horizons · ` : \"\"}{epics.length} epics\n </span>\n </>\n )}\n </div>\n\n <ul className=\"max-h-80 overflow-auto\">\n {tasks.map((t) => row(\n t.key, t.title,\n [t.size, t.dependsOn?.length ? `after ${t.dependsOn.join(\", \")}` : null, t.due ? `due ${t.due}` : null].filter(Boolean).join(\" · \"),\n t.body,\n ))}\n {horizons.map((h) => [\n row(h.key, h.title, \"new horizon\", h.body),\n ...epics.filter((e) => e.parent.trim() === h.key).map((e) => row(e.key, e.title, outcome(e.body), e.body, true)),\n ])}\n {existingParents.map((p) => [\n <li key={`parent-${p}`} className=\"px-2 py-1.5 border-b border-border text-xs text-muted\">\n <span className=\"font-mono text-accent mr-1\">{p.toUpperCase()}</span>{titles.get(p.toUpperCase()) ?? \"\"}\n </li>,\n ...epics.filter((e) => e.parent.trim() === p).map((e) => row(e.key, e.title, outcome(e.body), e.body, true)),\n ])}\n </ul>\n\n {error && <div className=\"px-2 py-1 text-xs text-red-400 whitespace-pre-wrap border-t border-border\">{error}</div>}\n\n <div className=\"flex items-center gap-2 px-2 py-1.5 border-t border-border\">\n {pending ? (\n <>\n <button\n onClick={accept}\n disabled={saving || selected.length === 0}\n className=\"text-xs px-2 py-0.5 rounded-sm bg-accent/20 text-accent hover:bg-accent/30 disabled:opacity-50\"\n >\n {saving ? \"Creating…\" : `Accept (${selected.length})`}\n </button>\n <button onClick={() => onResolve(\"rejected\", [], [])} disabled={saving} className=\"text-xs px-2 py-0.5 rounded-sm text-muted hover:text-txt\">\n Reject\n </button>\n </>\n ) : proposal.status === \"accepted\" ? (\n <span className=\"text-xs text-teal-400\">\n ✓ Created{\" \"}\n {(proposal.created ?? []).map((c, i) => (\n <span key={c.id}>\n {i > 0 && \", \"}\n <button onClick={() => openDoc(c.file)} className=\"font-mono hover:underline\">{c.id}</button>\n </span>\n ))}\n </span>\n ) : (\n <span className=\"text-xs text-muted\">Rejected</span>\n )}\n </div>\n </div>\n )\n}\n\nfunction PlanRow({ rowKey, title, meta, body, indent, checked, disabled, onToggle, open, onOpen }: {\n rowKey: string\n title: string\n meta: string\n body?: string\n indent: boolean\n checked: boolean\n disabled: boolean\n onToggle: () => void\n open: boolean\n onOpen: () => void\n}) {\n return (\n <li data-plan-row={rowKey} className=\"border-b border-border last:border-b-0\">\n <div className={cn(\"flex items-start gap-2 px-2 py-1.5\", indent && \"pl-6\")}>\n <input\n type=\"checkbox\"\n aria-label={`Include ${title}`}\n checked={checked}\n disabled={disabled}\n onChange={onToggle}\n className=\"mt-0.5 accent-accent\"\n />\n <button onClick={onOpen} className=\"flex-1 min-w-0 text-left\">\n <div className={cn(\"text-xs text-txt\", !checked && \"line-through text-muted\")}>\n <span className=\"font-mono text-muted mr-1\">{rowKey}</span>{title}\n </div>\n {meta && <div className=\"text-[10px] font-mono text-muted truncate\">{meta}</div>}\n </button>\n </div>\n {open && body && (\n <div className=\"px-3 pb-2 border-t border-border bg-surface2/40\">\n <MarkdownRenderer content={body} className=\"text-xs\" />\n </div>\n )}\n </li>\n )\n}\n","export type DiffLine = { op: \" \" | \"+\" | \"-\"; text: string }\n\n// ponytail: O(n·m) LCS on the changed middle; fine for docs, swap for Myers if huge files show up.\nexport function lineDiff(before: string, after: string): DiffLine[] {\n const a = before.split(\"\\n\")\n const b = after.split(\"\\n\")\n let start = 0\n while (start < a.length && start < b.length && a[start] === b[start]) start++\n let endA = a.length\n let endB = b.length\n while (endA > start && endB > start && a[endA - 1] === b[endB - 1]) { endA--; endB-- }\n\n const x = a.slice(start, endA)\n const y = b.slice(start, endB)\n // lcs[i][j] = LCS length of x[i..] and y[j..]\n const lcs = Array.from({ length: x.length + 1 }, () => new Array<number>(y.length + 1).fill(0))\n for (let i = x.length - 1; i >= 0; i--) {\n for (let j = y.length - 1; j >= 0; j--) {\n lcs[i][j] = x[i] === y[j] ? lcs[i + 1][j + 1] + 1 : Math.max(lcs[i + 1][j], lcs[i][j + 1])\n }\n }\n\n const middle: DiffLine[] = []\n let i = 0\n let j = 0\n while (i < x.length || j < y.length) {\n if (i < x.length && j < y.length && x[i] === y[j]) { middle.push({ op: \" \", text: x[i] }); i++; j++ }\n else if (i < x.length && (j === y.length || lcs[i + 1][j] >= lcs[i][j + 1])) { middle.push({ op: \"-\", text: x[i] }); i++ }\n else { middle.push({ op: \"+\", text: y[j] }); j++ }\n }\n\n return [\n ...a.slice(0, start).map((text) => ({ op: \" \" as const, text })),\n ...middle,\n ...a.slice(endA).map((text) => ({ op: \" \" as const, text })),\n ]\n}\n\nexport type TextEdit = { old_string: string; new_string: string }\n\n// Same contract as Claude Code's Edit tool: each old_string must match exactly once, applied in order.\n// An empty old_string is only allowed on an empty/new file (write the first content).\nexport function applyEdits(text: string, edits: TextEdit[]): { content: string } | { error: string } {\n let content = text\n for (const [i, e] of edits.entries()) {\n if (typeof e?.old_string !== \"string\" || typeof e?.new_string !== \"string\") {\n return { error: `Edit ${i + 1}: old_string and new_string must be strings` }\n }\n if (e.old_string === \"\") {\n if (content !== \"\") return { error: `Edit ${i + 1}: empty old_string is only allowed for a new, empty doc` }\n content = e.new_string\n continue\n }\n const at = content.indexOf(e.old_string)\n if (at === -1) return { error: `Edit ${i + 1}: old_string not found in the doc` }\n if (content.indexOf(e.old_string, at + 1) !== -1) {\n return { error: `Edit ${i + 1}: old_string matches more than once; include more surrounding text` }\n }\n content = content.slice(0, at) + e.new_string + content.slice(at + e.old_string.length)\n }\n return { content }\n}\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'square',\n size: 24,\n node: [['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }]],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Square\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/square\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Square = createLucideIcon(__iconData);\n\nexport default Square;\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'maximize-2',\n size: 24,\n node: [\n ['path', { d: 'M15 3h6v6', key: '1q9fwt' }],\n ['path', { d: 'm21 3-7 7', key: '1l2asr' }],\n ['path', { d: 'm3 21 7-7', key: 'tjx5ai' }],\n ['path', { d: 'M9 21H3v-6', key: 'wtvkvv' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name Maximize2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgM2g2djYiIC8+CiAgPHBhdGggZD0ibTIxIDMtNyA3IiAvPgogIDxwYXRoIGQ9Im0zIDIxIDctNyIgLz4KICA8cGF0aCBkPSJNOSAyMUgzdi02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/maximize-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Maximize2 = createLucideIcon(__iconData);\n\nexport default Maximize2;\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'arrow-up-right',\n size: 24,\n node: [\n ['path', { d: 'M7 7h10v10', key: '1tivn9' }],\n ['path', { d: 'M7 17 17 7', key: '1vkiza' }],\n ],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name ArrowUpRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNyA3aDEwdjEwIiAvPgogIDxwYXRoIGQ9Ik03IDE3IDE3IDciIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/arrow-up-right\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ArrowUpRight = createLucideIcon(__iconData);\n\nexport default ArrowUpRight;\n"],"names":["__iconData","node"],"mappings":"iEAEA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,gEMEQ,CACJ,4BAAiC,CDAD,ACAC,CDAD,ACAC,CDAD,ACAC,CDAD,ACAC,CDAD,ACAC,CDAD,ACAC,CAAA,GAAU,yBACf,CDAD,ACAC,CDAD,ACAC,CDAD,ACAC,CAAA,eAOuB,CAAA,GAAA,CAavD,CDhBA,ACgBA,CAAA,CAAA,CAAA,AAAM,CAAN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EAAC,SAAA,CAAO,KAAK,SAAS,QAAS,IAAM,EAAO,EAAK,EAAE,EAAG,aAAY,CAAC,OAAO,EAAE,EAAK,KAAK,CAAA,CAAE,CAAE,MAAM,cAAc,UAAW,CAAA,EAAA,EAAA,EAAA,AAAE,EAAC,EAAU,8BACpI,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,MAAM,CAAA,CAAC,UAAU,kBAKvB,EAAQ,GAAG,CAAC,AAAC,IACZ,IAAM,EAAI,EAAM,IAAI,CAAC,AAAC,GAAM,EAAE,EAAE,GAAK,GACrC,OAAO,EAAI,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAsB,KAAM,EAAG,OAAQ,IAAO,EAAQ,KAAkB,SAAZ,GAA1C,GAAmE,IACnG,GAEC,GACC,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,KAAK,SAAS,UAAU,wIAC3B,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,kBAAU,IAC1B,CAAA,EAAA,EAAA,GAAA,EAAC,SAAA,CAAO,QAAS,EAAe,aAAW,UAAU,UAAU,kDAAyC,SAG5G,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAuB,KAAM,EAAM,KAAkB,SAAZ,GAA3B,EAAK,EAAE,IAG5B","ignoreList":[4,5,6]}
@@ -0,0 +1,5 @@
1
+ module.exports=[685698,429672,107742,598984,a=>{"use strict";var b=a.i(662145),c=a.i(174897),d=a.i(913975),e=a.i(544394),f=a.i(368114);function g(a){return Array.isArray(a)&&a.length>0&&a.every(a=>!!a&&"object"==typeof a&&"string"==typeof a.question&&"string"==typeof a.header&&Array.isArray(a.options)&&a.options.every(a=>!!a&&"object"==typeof a&&"string"==typeof a.label))}let h="\0other";function i(a,b){return["Answers:",...a.map((a,c)=>`- ${a.header}: ${b[c]}`)].join("\n")}a.s(["QuestionCard",0,function({set:a,disabled:d,onSubmit:e}){let[g,i]=(0,c.useState)(()=>a.questions.map(()=>[])),[j,k]=(0,c.useState)(()=>a.questions.map(()=>"")),l=!!a.answers,m=a.questions.map((a,b)=>{let c=a.options.map(a=>a.label).filter(a=>g[b].includes(a));return g[b].includes(h)&&j[b].trim()&&c.push(`Other: "${j[b].trim()}"`),c.join(", ")}),n=m.every(Boolean);return(0,b.jsxs)("div",{className:"my-2 rounded-md border border-border overflow-hidden","data-question-card":!0,children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-surface2 border-b border-border",children:[(0,b.jsx)("span",{className:"text-[10px] font-mono uppercase tracking-widest text-muted",children:"Questions"}),l&&(0,b.jsx)("span",{className:"ml-auto text-[10px] font-mono text-accent",children:"✓ Answered"})]}),(0,b.jsxs)("div",{className:"p-2 space-y-3",children:[a.questions.map((c,d)=>(0,b.jsxs)("fieldset",{disabled:l,className:"space-y-1",children:[(0,b.jsxs)("legend",{className:"mb-1",children:[(0,b.jsx)("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded-sm bg-surface2 border border-border text-accent mr-1.5",children:c.header}),(0,b.jsx)("span",{className:"text-xs text-txt",children:c.question})]}),l?(0,b.jsx)("p",{className:"text-xs text-txt pl-1",children:a.answers?.[d]}):(0,b.jsxs)(b.Fragment,{children:[[...c.options,{label:"Other",value:h}].map(e=>{let h="value"in e?e.value:e.label,j=g[d].includes(h);return(0,b.jsxs)("label",{className:(0,f.cn)("flex gap-2 items-start rounded-sm px-1 py-0.5 cursor-pointer hover:bg-surface2",j&&"bg-surface2"),children:[(0,b.jsx)("input",{type:c.multiSelect?"checkbox":"radio",name:`${a.id}-${d}`,checked:j,onChange:()=>{var a;return a=c.multiSelect,void i(b=>b.map((b,c)=>c!==d?b:a?b.includes(h)?b.filter(a=>a!==h):[...b,h]:[h]))},className:"mt-0.5 accent-accent"}),(0,b.jsxs)("span",{className:"text-xs",children:[(0,b.jsx)("span",{className:"text-txt",children:e.label}),"description"in e&&e.description&&(0,b.jsx)("span",{className:"block text-muted",children:e.description})]})]},h)}),g[d].includes(h)&&(0,b.jsx)("input",{value:j[d],onChange:a=>k(b=>b.map((b,c)=>c===d?a.target.value:b)),placeholder:"Your answer","aria-label":`Other answer for ${c.header}`,className:"ml-6 w-[calc(100%-1.5rem)] rounded-sm bg-surface2 border border-border px-2 py-1 text-xs text-txt placeholder:text-muted focus:outline-hidden focus:border-accent"})]})]},d)),!l&&(0,b.jsx)("button",{onClick:()=>e(m),disabled:!n||d,className:"text-xs px-2 py-0.5 rounded-sm bg-accent/20 text-accent hover:bg-accent/30 disabled:opacity-50",children:"Submit"})]})]})},"formatAnswers",0,i,"isRenderableQuestions",0,g],429672);let j=a=>!!a&&"object"==typeof a&&!Array.isArray(a),k=a=>"string"==typeof a?a.trim():"";var l=a.i(525395);function m(a,b=Math.random()){return`c-${a.toString(36)}${b.toString(36).slice(2,6)}`}function n(a,b,c={}){var d;let e=c.now??new Date().toISOString();return[...a,{id:b,title:c.title??(c.attach?"epic"===(d=c.attach).kind?`Epic ${d.id}`:`Task ${d.id}`:"New chat"),messages:[],sessionId:null,busy:!1,notes:[],attach:c.attach??null,createdAt:e,updatedAt:e}]}function o(a,b,c){return a.map(a=>a.id===b?c(a):a)}let p={running:"Running","needs-answer":"Waiting for your answers",review:"Plan or edit to review",error:"Error",idle:"Idle"};function q(a){return a.messages.reduce((a,b)=>a+b.plans.filter(a=>"pending"===a.status).length+b.proposals.filter(a=>"pending"===a.status).length,0)}function r(a){if(a.busy)return"running";let b=a.messages[a.messages.length-1];if(b?.questions.some(a=>!a.answers))return"needs-answer";if(q(a))return"review";let c=a.messages.findLast(a=>"assistant"===a.role);return c?.error?"error":"idle"}function s(a,b){return!a.dismissed&&b-Date.parse(a.updatedAt)<864e5&&"error"===r(a)}let t=a=>"needs-answer"===a||"review"===a;function u(a,b,c={}){if((c.running??a.filter(a=>a.busy).length)>=4)return{refused:"Too many agents running (4). Stop or close a chat, or wait."};let d=a.find(a=>a.id===b);return!d||d.busy||c.newChat?{newChat:!0}:{chatId:d.id}}let v=a=>`${a.kind}:${a.id}`;function w(a){return a.trim().match(/^Break down epic (R\d+)/i)?.[1].toUpperCase()??null}function x(a,b){return a.filter(a=>{let c;return c=a.attach,!!c&&!!b&&c.kind===b.kind&&c.id===b.id}).sort((a,b)=>b.updatedAt.localeCompare(a.updatedAt))[0]}let y={running:3,"needs-answer":2,review:1};function z(a){let b={};for(let c of a){let a=r(c);if(!c.attach||"idle"===a||"error"===a)continue;let d=v(c.attach),e=b[d];(!e||y[a]>y[e.status])&&(b[d]={status:a,chatId:c.id})}return b}function A(a){return"epic"===a.kind?`[This chat is about epic ${a.id}. Read it with vibedoc_get_roadmap (and its tasks with vibedoc_get_task) before answering.]`:`[This chat is about task ${a.id}. Read it with vibedoc_get_task before answering.]`}function B(a,b){let c=[...a].sort((a,b)=>b.updatedAt.localeCompare(a.updatedAt)),d={needsYou:[],errors:[],running:[],recent:[]};for(let a of c){let c=r(a);t(c)?d.needsYou.push(a):void 0!==b&&s(a,b)?d.errors.push(a):"running"===c?d.running.push(a):d.recent.push(a)}return d}function C(a,b){let c=B(a,b);return[...c.needsYou,...c.errors]}function D(a,b){let c=a.findIndex(a=>a.id===b);return a[c+1]}function E(a,b=Date.now()){let c=B(a,b);return c.needsYou[0]??c.errors[0]??c.running[0]??c.recent[0]}function F(a){return a.messages.length?{...a,busy:!1}:null}function G(a){if(!a||"string"!=typeof a.id||!Array.isArray(a.messages))return null;let b=a.messages[a.messages.length-1],c=b?.role!=="assistant"||b.text||b.error||b.tools?.length||b.plans?.length||b.proposals?.length||b.questions?.length?a.messages:[...a.messages.slice(0,-1),{...b,error:"Interrupted: the page reloaded while the agent was working."}],d=a.updatedAt??a.createdAt??new Date(0).toISOString();return{...a,messages:c,busy:!1,notes:a.notes??[],attach:a.attach??null,createdAt:a.createdAt??d,updatedAt:d}}function H(a,b){return b.flatMap(b=>{let c=r(b);return t(c)&&a[b.id]!==c?[{chat:b,status:c}]:[]})}function I(a,b){let c=a.replace(/^\(\d+\) /,"");return b>0?`(${b}) ${c}`:c}function J(a){let b=w(a);if(b)return`Break down ${b}`;let c=a.trim().split("\n")[0];return c.length>40?`${c.slice(0,40).trimEnd()}…`:c}a.s(["MAX_RUNNING_CHATS",0,4,"STATUS_LABEL",0,p,"addChat",0,n,"ago",0,function(a,b){let c=Math.max(0,Math.floor((b-Date.parse(a))/6e4));return c<1?"now":c<60?`${c}m`:c<1440?`${Math.floor(c/60)}h`:`${Math.floor(c/1440)}d`},"attachContext",0,A,"attachKey",0,v,"attentionQueue",0,C,"chatFor",0,x,"chatStatus",0,r,"chatTitle",0,J,"defaultChat",0,E,"epicOf",0,w,"fromSaved",0,G,"groupChats",0,B,"isActionableError",0,s,"isWaiting",0,t,"itemAgents",0,z,"newChatId",0,m,"newlyWaiting",0,H,"nextInQueue",0,D,"patchChat",0,o,"pendingReviews",0,q,"routeAsk",0,u,"shellStatus",0,function(a,b){let c=r(a);return"error"!==c||s(a,b)?c:"idle"},"suggestions",0,function(a){return a?"epic"===a.kind?[`Break down epic ${a.id} into tasks.`,"Summarize this epic's progress.","What is at risk in this epic?"]:["Refine this task's spec.","Split this task into smaller tasks.","What blocks this task?"]:["What should I work on next?","Plan a roadmap for this project.","What is blocked right now?"]},"toSaved",0,F,"waitingTitle",0,I],107742);let K=(a,b="")=>({role:a,text:b,tools:[],proposals:[],plans:[],questions:[]}),L=(0,c.createContext)(null),M=(0,c.createContext)({});a.s(["ChatProvider",0,function({children:a}){let{rootParam:f,activeProject:h,selectedDoc:p}=(0,e.useApp)(),v=(0,d.usePathname)(),y=(0,d.useRouter)(),[B,N]=(0,c.useState)([]),[O,P]=(0,c.useState)(!1),[Q,R]=(0,c.useState)(null),[S,T]=(0,c.useState)(null),[U,V]=(0,c.useState)(null),W=(0,c.useRef)(new Map),X=(0,c.useRef)(new Set),Y=(0,c.useRef)({}),[Z,$]=(0,c.useState)(()=>Date.now());(0,c.useEffect)(()=>{let a=setInterval(()=>$(Date.now()),6e4);return()=>clearInterval(a)},[]);let _="/chat"===v,aa="/docs"===v?p?.path:void 0;(0,c.useEffect)(()=>{for(let a of W.current.values())a.abort();W.current.clear(),X.current.clear();let a=!1;return fetch(`/api/conversations${f}`).then(a=>a.ok?a.json():{chats:[]}).then(b=>{if(a)return;let c=(b.chats??[]).map(a=>G(a)).filter(a=>!!a);Y.current=Object.fromEntries(c.map(a=>[a.id,r(a)])),N(c),R(null),T(null),P(!0)}).catch(b=>{console.warn("[vibedoc] could not load chats:",b),a||(N([]),P(!0))}),()=>{a=!0}},[h,f]),(0,c.useEffect)(()=>{for(let a of[...X.current]){let b=B.find(b=>b.id===a);X.current.delete(a);let c=b&&F(b);c&&fetch(`/api/conversations${f}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({chat:c})}).catch(b=>console.warn(`[vibedoc] could not save chat ${a}:`,b))}},[B,f]);let ab=(0,c.useRef)({key:"{}",value:{}}),ac=(0,c.useMemo)(()=>{let a=z(B),b=JSON.stringify(a);return b!==ab.current.key&&(ab.current={key:b,value:a}),ab.current.value},[B]),ad=B.filter(a=>a.busy).length,ae=B.filter(a=>t(r(a))).length,af=B.filter(a=>s(a,Z)).length,ag=(0,c.useMemo)(()=>C(B,Z),[B,Z]);function ah(a){X.current.add(a)}function ai(a={}){a.keep||N(a=>a.filter(a=>a.id!==Q||a.messages.length>0)),R(null)}function aj(a){T(a),_?(R(null),y.replace(`/chat?id=${encodeURIComponent(a)}`,{scroll:!1})):R(a)}function ak(a=null){let b=m(Date.now());return N(c=>n(c,b,{attach:a})),b}function al(a,b){N(c=>o(c,a,a=>({...a,messages:[...a.messages.slice(0,-1),b(a.messages[a.messages.length-1])]})))}async function am(a,b){let c=b.trim(),d=B.find(b=>b.id===a);if(!c||d?.busy)return;"Notification"in window&&"default"===Notification.permission&&Notification.requestPermission().catch(()=>{});let e=!d?.messages.length,h=w(c),i=d?.attach??(h?{kind:"epic",id:h}:null);N(b=>o(b,a,a=>({...a,title:a.messages.length?a.title:J(c),attach:a.attach??i,busy:!0,dismissed:!1,notes:[],updatedAt:new Date().toISOString(),messages:[...a.messages,K("user",c),K("assistant")]}))),ah(a);let k=[...e&&d?.attach?[A(d.attach)]:[],...d?.notes.length?[`[${d.notes.join(" ")}]`]:[]],l=k.length?`${k.join("\n")}
2
+
3
+ ${c}`:c,m=new AbortController;W.current.set(a,m);try{let b=await fetch(`/api/chat${f}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:l,sessionId:d?.sessionId??null,docPath:aa}),signal:m.signal});if(!b.ok||!b.body){let a=await b.json().catch(()=>null);throw Error(a?.error??`Request failed (${b.status})`)}let c=b.body.getReader(),e=new TextDecoder,h="";for(;;){let{done:b,value:d}=await c.read();if(b)break;let f=(h+=e.decode(d,{stream:!0})).split("\n");for(let b of(h=f.pop()??"",f))if(b.trim())try{!function(a,b){if(b.session_id&&N(c=>o(c,a,a=>a.sessionId===b.session_id?a:{...a,sessionId:b.session_id})),"stream_event"===b.type){let c=b.event;c?.type==="message_start"?al(a,a=>a.text&&!a.text.endsWith("\n\n")?{...a,text:a.text+"\n\n"}:a):c?.type==="content_block_delta"&&c.delta?.type==="text_delta"&&al(a,a=>({...a,text:a.text+c.delta.text}))}else if("assistant"===b.type){let c=(b.message?.content??[]).filter(a=>"tool_use"===a.type),d=c.filter(a=>a.name.endsWith("vibedoc_propose_edit")&&"string"==typeof a.input?.path&&Array.isArray(a.input?.edits)).map(a=>({id:a.id,path:a.input.path,edits:a.input.edits,summary:"string"==typeof a.input.summary?a.input.summary:void 0,status:"pending"})),e=c.filter(a=>a.name.endsWith("vibedoc_propose_plan")).flatMap(a=>{let b=function(a){if(!j(a))return null;let b=(a,b)=>Array.isArray(a)&&a.every(a=>j(a)&&b.every(b=>"string"==typeof a[b])&&(void 0===a.dependsOn||Array.isArray(a.dependsOn)));if("breakdown"===a.kind){let c=void 0===a.epic||"string"==typeof a.epic,d=void 0===a.newEpic||j(a.newEpic)&&"string"==typeof a.newEpic.title&&"string"==typeof a.newEpic.parent;return c&&d&&b(a.tasks,["key","title"])&&a.tasks.length>0?a:null}if("roadmap"===a.kind){let c=a.horizons??[],d=a.epics??[];return b(c,["key","title"])&&b(d,["key","title","parent"])?{kind:"roadmap",horizons:c,epics:d}:null}return null}(a.input?.plan);return b?[{id:a.id,plan:b,status:"pending"}]:[]}),f=c.filter(a=>a.name.endsWith("vibedoc_ask_questions")&&g(a.input?.questions)).map(a=>({id:a.id,questions:a.input.questions})),h=["vibedoc_propose_edit","vibedoc_propose_plan","vibedoc_ask_questions"],i=c.filter(a=>!h.some(b=>a.name.endsWith(b))).map(a=>a.name.replace(/^mcp__vibedoc__vibedoc_/,""));(i.length||d.length||e.length||f.length)&&al(a,a=>({...a,tools:[...a.tools,...i],proposals:[...a.proposals,...d],plans:[...a.plans,...e],questions:[...a.questions,...f]}))}else if("user"===b.type){let c=new Set((b.message?.content??[]).filter(a=>"tool_result"===a.type&&a.is_error).map(a=>a.tool_use_id));c.size&&al(a,a=>({...a,proposals:a.proposals.filter(a=>!c.has(a.id)),plans:a.plans.filter(a=>!c.has(a.id)),questions:a.questions.filter(a=>!c.has(a.id))}))}else"result"===b.type&&b.is_error?al(a,a=>({...a,error:b.result??b.subtype??"Agent error"})):"error"===b.type&&al(a,a=>({...a,error:b.message}))}(a,JSON.parse(b))}catch{}}}catch(b){m.signal.aborted?al(a,a=>a.text||a.error?a:{...a,error:"Stopped."}):al(a,a=>({...a,error:b.message}))}finally{W.current.get(a)===m&&(W.current.delete(a),ah(a)),N(b=>o(b,a,a=>({...a,busy:!1,updatedAt:new Date().toISOString()})))}}function an(a){W.current.get(a)?.abort()}function ao(a,b,c){N(d=>o(d,a,a=>({...a,notes:c?[...a.notes,c]:a.notes,messages:a.messages.map(b)}))),ah(a)}return(0,c.useEffect)(()=>{document.title=I(document.title,ag.length)},[ag.length,v]),(0,c.useEffect)(()=>{let a=H(Y.current,B);if(Y.current=Object.fromEntries(B.map(a=>[a.id,r(a)])),a.length&&document.hidden&&"Notification"in window&&"granted"===Notification.permission)for(let{chat:b,status:c}of a){let a=new Notification("needs-answer"===c?"Agent needs your answer":"Plan ready to review",{body:b.title,tag:b.id});a.onclick=()=>{window.focus(),(0,l.openAgentChat)(b.id),a.close()}}},[B]),(0,c.useEffect)(()=>{function a(a){let{message:b,newChat:c}=a.detail??{};if(!b)return;let d=u(B,S,{newChat:c,running:W.current.size});if("refused"in d)return V(d.refused);V(null);let e=w(b),f="chatId"in d?d.chatId:ak(e?{kind:"epic",id:e}:null);am(f,b),c||aj(f)}function b(a){let b=a.detail?.chatId;b&&B.some(a=>a.id===b)&&aj(b)}return window.addEventListener(l.ASK_AGENT_EVENT,a),window.addEventListener(l.OPEN_CHAT_EVENT,b),()=>{window.removeEventListener(l.ASK_AGENT_EVENT,a),window.removeEventListener(l.OPEN_CHAT_EVENT,b)}}),(0,b.jsx)(L.Provider,{value:{chats:B,loaded:O,modalId:Q,closeModal:ai,show:aj,showDefault:function(){let a=D(ag,Q??(_?S:null));if(a)return aj(a.id);if(Q)return ai();let b=E(B,Z);aj(b?b.id:ak())},showAbout:function(a){let b=x(B,a);aj(b?b.id:ak(a))},create:ak,send:am,stop:an,dismiss:function(a){N(b=>o(b,a,a=>({...a,dismissed:!0}))),ah(a)},remove:function(a){let b=B.find(b=>b.id===a),c=b?q(b):0;return(!c||!!window.confirm(`Discard ${c} unreviewed proposal${1===c?"":"s"}?`))&&(an(a),W.current.delete(a),X.current.delete(a),N(b=>b.filter(b=>b.id!==a)),Q===a&&R(null),S===a&&T(null),fetch(`/api/conversations${f}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({delete:a})}).catch(b=>console.warn(`[vibedoc] could not delete chat ${a}:`,b)),!0)},resolveProposal:function(a,b,c,d){ao(a,a=>({...a,proposals:a.proposals.map(a=>a.id===b?{...a,status:d}:a)}),`User ${d} your proposed edit to ${c}.`)},resolvePlan:function(a,b,c,d,e){var f;let g="breakdown"===b.plan.kind?k((f=b.plan).epic)?k(f.epic).toUpperCase():f.newEpic?`new epic "${k(f.newEpic.title)}"`:"no epic":"the roadmap";ao(a,a=>({...a,plans:a.plans.map(a=>a.id===b.id?{...a,status:c,created:d}:a)}),"accepted"===c?`User accepted plan for ${g}: created ${d.map(a=>a.id).join(", ")}${e.length?` (unchecked: ${e.join(", ")})`:""}.`:`User rejected the plan for ${g}.`)},answerQuestions:function(a,b,c){B.find(b=>b.id===a)?.busy||(ao(a,a=>({...a,questions:a.questions.map(a=>a.id===b.id?{...a,answers:c}:a)})),am(a,i(b.questions,c)))},agents:ac,runningCount:ad,waitingCount:ae,errorCount:af,queue:ag,now:Z,notice:U,dismissNotice:()=>V(null)},children:(0,b.jsx)(M.Provider,{value:ac,children:a})})},"useChats",0,function(){let a=(0,c.useContext)(L);if(!a)throw Error("useChats() must be used inside <ChatProvider>");return a},"useItemAgent",0,function(a){return(0,c.useContext)(M)[v(a)]}],685698);var N=a.i(108280),O=a.i(899593),P=a.i(256857);let Q={name:"square-check",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-square-2"]};Q.node;let R=(0,P.default)(Q);a.s(["AttachLabel",0,function({attach:a,className:c}){let d="epic"===a.kind?O.Map:R;return(0,b.jsxs)("span",{className:(0,f.cn)("inline-flex items-center gap-1 font-mono text-[10px] leading-none",c),children:[(0,b.jsx)(d,{className:"size-3"}),a.id]})},"StatusMarker",0,function({status:a,showIdle:c=!1,label:d,className:e}){if("idle"===a&&!c)return null;let g=d??p[a];return(0,b.jsx)("span",{role:"img","aria-label":g,title:g,className:(0,f.cn)("inline-flex size-3 shrink-0 items-center justify-center",e),children:"running"===a?(0,b.jsx)(N.Loader2,{className:"size-3 animate-spin text-accent"}):(0,b.jsx)("span",{className:(0,f.cn)("size-1.5","review"===a?"size-2 rotate-45 rounded-[1px] bg-accent animate-pulse-dot":"rounded-full","needs-answer"===a&&"bg-amber animate-pulse-dot","error"===a&&"bg-danger","idle"===a&&"border border-muted/60")})})},"attachHref",0,function(a){return"epic"===a.kind?`/roadmap?item=${a.id}`:`/board?task=${a.id}`}],598984)}];
4
+
5
+ //# sourceMappingURL=src_context_ChatContext_tsx_0lowp8p._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/chat/QuestionCard.tsx","../../../../src/context/ChatContext.tsx","../../../../src/components/chat/StatusMarker.tsx","../../../../node_modules/.pnpm/lucide-react%401.48.0_react%4019.3.0/node_modules/lucide-react/src/icons/square-check.ts","../../../../src/lib/plan.ts","../../../../src/lib/chats.ts"],"sourcesContent":["\"use client\"\n\nimport { useState } from \"react\"\nimport { cn } from \"@/lib/utils\"\n\nexport interface QuestionOption { label: string; description?: string }\nexport interface Question { question: string; header: string; multiSelect: boolean; options: QuestionOption[] }\n\nexport interface QuestionSet {\n id: string\n questions: Question[]\n /** Set once submitted: one answer string per question, in the same order */\n answers?: string[]\n}\n\n/** Just enough shape to render, checked before the server has validated the tool input. */\nexport function isRenderableQuestions(v: unknown): v is Question[] {\n const isStr = (x: unknown) => typeof x === \"string\"\n return Array.isArray(v) && v.length > 0 && v.every((q) =>\n !!q && typeof q === \"object\" && isStr(q.question) && isStr(q.header) && Array.isArray(q.options) &&\n q.options.every((o: unknown) => !!o && typeof o === \"object\" && isStr((o as QuestionOption).label)))\n}\n\nconst OTHER = \"\\u0000other\"\n\n/** Answer message format the agent parses: one line per question, keyed by header, labels verbatim. */\nexport function formatAnswers(questions: Question[], answers: string[]): string {\n return [\"Answers:\", ...questions.map((q, i) => `- ${q.header}: ${answers[i]}`)].join(\"\\n\")\n}\n\nexport function QuestionCard({ set, disabled, onSubmit }: {\n set: QuestionSet\n disabled?: boolean\n onSubmit: (answers: string[]) => void\n}) {\n const [picked, setPicked] = useState<string[][]>(() => set.questions.map(() => []))\n const [other, setOther] = useState<string[]>(() => set.questions.map(() => \"\"))\n const done = !!set.answers\n\n function toggle(qi: number, value: string, multi: boolean) {\n setPicked((prev) => prev.map((p, i) => {\n if (i !== qi) return p\n if (!multi) return [value]\n return p.includes(value) ? p.filter((v) => v !== value) : [...p, value]\n }))\n }\n\n // Keep the order the options were offered in, with Other last\n const answers = set.questions.map((q, i) => {\n const labels = q.options.map((o) => o.label).filter((l) => picked[i].includes(l))\n if (picked[i].includes(OTHER) && other[i].trim()) labels.push(`Other: \"${other[i].trim()}\"`)\n return labels.join(\", \")\n })\n const complete = answers.every(Boolean)\n\n return (\n <div className=\"my-2 rounded-md border border-border overflow-hidden\" data-question-card>\n <div className=\"flex items-center gap-2 px-2 py-1.5 bg-surface2 border-b border-border\">\n <span className=\"text-[10px] font-mono uppercase tracking-widest text-muted\">Questions</span>\n {done && <span className=\"ml-auto text-[10px] font-mono text-accent\">✓ Answered</span>}\n </div>\n <div className=\"p-2 space-y-3\">\n {set.questions.map((q, qi) => (\n <fieldset key={qi} disabled={done} className=\"space-y-1\">\n <legend className=\"mb-1\">\n <span className=\"text-[10px] font-mono px-1.5 py-0.5 rounded-sm bg-surface2 border border-border text-accent mr-1.5\">{q.header}</span>\n <span className=\"text-xs text-txt\">{q.question}</span>\n </legend>\n {done ? (\n <p className=\"text-xs text-txt pl-1\">{set.answers?.[qi]}</p>\n ) : (\n <>\n {[...q.options, { label: \"Other\", value: OTHER }].map((o) => {\n const value = \"value\" in o ? o.value : o.label\n const checked = picked[qi].includes(value)\n return (\n <label key={value} className={cn(\"flex gap-2 items-start rounded-sm px-1 py-0.5 cursor-pointer hover:bg-surface2\", checked && \"bg-surface2\")}>\n <input\n type={q.multiSelect ? \"checkbox\" : \"radio\"}\n name={`${set.id}-${qi}`}\n checked={checked}\n onChange={() => toggle(qi, value, q.multiSelect)}\n className=\"mt-0.5 accent-accent\"\n />\n <span className=\"text-xs\">\n <span className=\"text-txt\">{o.label}</span>\n {\"description\" in o && o.description && <span className=\"block text-muted\">{o.description}</span>}\n </span>\n </label>\n )\n })}\n {picked[qi].includes(OTHER) && (\n <input\n value={other[qi]}\n onChange={(e) => setOther((prev) => prev.map((v, i) => (i === qi ? e.target.value : v)))}\n placeholder=\"Your answer\"\n aria-label={`Other answer for ${q.header}`}\n className=\"ml-6 w-[calc(100%-1.5rem)] rounded-sm bg-surface2 border border-border px-2 py-1 text-xs text-txt placeholder:text-muted focus:outline-hidden focus:border-accent\"\n />\n )}\n </>\n )}\n </fieldset>\n ))}\n {!done && (\n <button\n onClick={() => onSubmit(answers)}\n disabled={!complete || disabled}\n className=\"text-xs px-2 py-0.5 rounded-sm bg-accent/20 text-accent hover:bg-accent/30 disabled:opacity-50\"\n >\n Submit\n </button>\n )}\n </div>\n </div>\n )\n}\n","\"use client\"\n\n/**\n * Agent chats: one store for the sidebar list, the chat modal, the /chat page and the roadmap/board markers.\n * Each chat is its own `claude -p` session (POST /api/chat per turn); chats are saved to\n * .vibedoc/chats/<id>.json (/api/conversations) at turn end, card resolution and attach changes.\n */\n\nimport { createContext, useContext, useEffect, useMemo, useRef, useState, type ReactNode } from \"react\"\nimport { usePathname, useRouter } from \"next/navigation\"\nimport { useApp } from \"@/context/AppContext\"\nimport type { Proposal, ProposalStatus } from \"@/components/chat/ProposalCard\"\nimport type { PlanCreated, PlanProposal, PlanStatus } from \"@/components/chat/PlanCard\"\nimport { formatAnswers, isRenderableQuestions, type Question, type QuestionSet } from \"@/components/chat/QuestionCard\"\nimport { asRenderablePlan, planTarget } from \"@/lib/plan\"\nimport type { TextEdit } from \"@/lib/diff\"\nimport { ASK_AGENT_EVENT, OPEN_CHAT_EVENT, openAgentChat, type AskAgentDetail } from \"@/lib/ask-agent\"\nimport {\n addChat, attachContext, attachKey, attentionQueue, chatFor, chatStatus, chatTitle, defaultChat, epicOf, fromSaved, isActionableError, isWaiting,\n itemAgents, newChatId, newlyWaiting, nextInQueue, patchChat, pendingReviews, routeAsk, toSaved, waitingTitle,\n type Attach, type Chat, type ChatStatus, type ItemAgent,\n} from \"@/lib/chats\"\n\nexport interface ChatMessage {\n role: \"user\" | \"assistant\"\n text: string\n tools: string[]\n proposals: Proposal[]\n plans: PlanProposal[]\n questions: QuestionSet[]\n error?: string\n}\n\nexport type ChatTab = Chat<ChatMessage>\n\nconst blank = (role: ChatMessage[\"role\"], text = \"\"): ChatMessage =>\n ({ role, text, tools: [], proposals: [], plans: [], questions: [] })\n\ninterface ChatApi {\n chats: ChatTab[]\n loaded: boolean\n /** Chat shown in the modal; null = closed */\n modalId: string | null\n /** keep: don't drop an empty chat (it is moving to the /chat page) */\n closeModal: (opts?: { keep?: boolean }) => void\n /** Open a chat: in the modal, or selected in place when already on /chat */\n show: (chatId: string) => void\n /**\n * Header button / `c`: walks the attention queue (the open chat's next item, else its head); past its end closes\n * the modal; with nothing open and nothing queued, the running or newest chat, else a fresh one.\n */\n showDefault: () => void\n /** Resume the chat attached to `a`, or start one */\n showAbout: (a: Attach) => void\n /** A new empty chat (not saved until its first message); returns its id */\n create: (attach?: Attach | null) => string\n send: (chatId: string, text: string) => void\n stop: (chatId: string) => void\n /** Stop counting an errored chat in the header / rail (saved; the next turn clears it) */\n dismiss: (chatId: string) => void\n /** Delete a chat (asks first when cards are unreviewed); returns false if the user cancelled */\n remove: (chatId: string) => boolean\n resolveProposal: (chatId: string, id: string, path: string, status: ProposalStatus) => void\n resolvePlan: (chatId: string, p: PlanProposal, status: PlanStatus, created: PlanCreated[], unchecked: string[]) => void\n answerQuestions: (chatId: string, set: QuestionSet, answers: string[]) => void\n /** attachKey → the most urgent chat working on that epic/task */\n agents: Record<string, ItemAgent>\n runningCount: number\n waitingCount: number\n /** Errored chats worth an alarm: recent and not dismissed (isActionableError) */\n errorCount: number\n /** Chats that need the user: waiting, then actionable errors (attentionQueue) */\n queue: ChatTab[]\n /** Minute clock the error counts use; pass to isActionableError for per-row checks */\n now: number\n /** An askAgent() refused at the running-chat cap */\n notice: string | null\n dismissNotice: () => void\n}\n\nconst ChatContext = createContext<ChatApi | null>(null)\n// Split out so roadmap nodes and board cards re-render only when some item's status flips, not per stream delta\nconst ItemAgentsContext = createContext<Record<string, ItemAgent>>({})\n\nexport function useChats(): ChatApi {\n const ctx = useContext(ChatContext)\n if (!ctx) throw new Error(\"useChats() must be used inside <ChatProvider>\")\n return ctx\n}\n\n/** The chat working on an epic/task, if any (roadmap nodes, sheets, board cards). */\nexport function useItemAgent(a: Attach): ItemAgent | undefined {\n return useContext(ItemAgentsContext)[attachKey(a)]\n}\n\nexport function ChatProvider({ children }: { children: ReactNode }) {\n const { rootParam, activeProject, selectedDoc } = useApp()\n const pathname = usePathname()\n const router = useRouter()\n const [chats, setChats] = useState<ChatTab[]>([])\n const [loaded, setLoaded] = useState(false)\n const [modalId, setModalId] = useState<string | null>(null)\n // The chat last shown (modal or page): where an askAgent() goes when that chat is idle\n const [currentId, setCurrentId] = useState<string | null>(null)\n const [notice, setNotice] = useState<string | null>(null)\n // One in-flight request per chat; a stream only ever writes into the chat id it was started for\n const abortsRef = useRef(new Map<string, AbortController>())\n // Chats changed since their last save; saved by the effect below once they aren't busy\n const dirtyRef = useRef(new Set<string>())\n const notifiedRef = useRef<Record<string, ChatStatus>>({})\n // Re-read each minute so a day-old error drops out of the alarm counts without a reload\n const [now, setNow] = useState(() => Date.now())\n useEffect(() => {\n const t = setInterval(() => setNow(Date.now()), 60_000)\n return () => clearInterval(t)\n }, [])\n\n const onChatPage = pathname === \"/chat\"\n const docPath = pathname === \"/docs\" ? selectedDoc?.path : undefined\n\n // A Claude session belongs to one project: stop everything and load that project's chats\n useEffect(() => {\n for (const ac of abortsRef.current.values()) ac.abort()\n abortsRef.current.clear()\n dirtyRef.current.clear()\n let cancelled = false\n fetch(`/api/conversations${rootParam}`)\n .then((r) => (r.ok ? r.json() : { chats: [] }))\n .then((d: { chats?: unknown[] }) => {\n if (cancelled) return\n const loadedChats = (d.chats ?? []).map((c) => fromSaved<ChatMessage>(c)).filter((c): c is ChatTab => !!c)\n notifiedRef.current = Object.fromEntries(loadedChats.map((c) => [c.id, chatStatus(c)]))\n setChats(loadedChats)\n setModalId(null)\n setCurrentId(null)\n setLoaded(true)\n })\n .catch((e) => {\n console.warn(\"[vibedoc] could not load chats:\", e)\n if (!cancelled) { setChats([]); setLoaded(true) }\n })\n return () => { cancelled = true }\n }, [activeProject, rootParam])\n\n // Save chats marked dirty: at turn start (so a reload shows it as interrupted), turn end and card resolution.\n // Never per stream delta: nothing marks a chat dirty while it streams.\n useEffect(() => {\n for (const id of [...dirtyRef.current]) {\n const chat = chats.find((c) => c.id === id)\n dirtyRef.current.delete(id)\n const saved = chat && toSaved(chat)\n if (!saved) continue\n fetch(`/api/conversations${rootParam}`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ chat: saved }),\n }).catch((e) => console.warn(`[vibedoc] could not save chat ${id}:`, e))\n }\n }, [chats, rootParam])\n\n // Reference-stable while no item's status changes (streaming text changes `chats` many times a second)\n const agentsRef = useRef<{ key: string; value: Record<string, ItemAgent> }>({ key: \"{}\", value: {} })\n const agents = useMemo(() => {\n const next = itemAgents(chats)\n const key = JSON.stringify(next)\n if (key !== agentsRef.current.key) agentsRef.current = { key, value: next }\n return agentsRef.current.value\n }, [chats])\n const runningCount = chats.filter((c) => c.busy).length\n const waitingCount = chats.filter((c) => isWaiting(chatStatus(c))).length\n const errorCount = chats.filter((c) => isActionableError(c, now)).length\n const queue = useMemo(() => attentionQueue(chats, now), [chats, now])\n\n // \"(n) VibeDoc\" in the browser tab; pathname is a dep because a navigation can put Next's metadata title back\n useEffect(() => { document.title = waitingTitle(document.title, queue.length) }, [queue.length, pathname])\n\n // Desktop notification when a chat starts waiting while this browser tab is in the background\n useEffect(() => {\n const fresh = newlyWaiting(notifiedRef.current, chats)\n notifiedRef.current = Object.fromEntries(chats.map((c) => [c.id, chatStatus(c)]))\n if (!fresh.length || !document.hidden || !(\"Notification\" in window) || Notification.permission !== \"granted\") return\n for (const { chat, status } of fresh) {\n const n = new Notification(status === \"needs-answer\" ? \"Agent needs your answer\" : \"Plan ready to review\", { body: chat.title, tag: chat.id })\n n.onclick = () => { window.focus(); openAgentChat(chat.id); n.close() }\n }\n }, [chats])\n\n function markDirty(id: string) { dirtyRef.current.add(id) }\n\n // A chat closed before its first message was never saved; drop it so empty chats don't pile up\n function closeModal(opts: { keep?: boolean } = {}) {\n if (!opts.keep) setChats((cs) => cs.filter((c) => c.id !== modalId || c.messages.length > 0))\n setModalId(null)\n }\n\n function show(chatId: string) {\n setCurrentId(chatId)\n if (onChatPage) {\n setModalId(null)\n router.replace(`/chat?id=${encodeURIComponent(chatId)}`, { scroll: false })\n } else {\n setModalId(chatId)\n }\n }\n\n function create(attach: Attach | null = null) {\n const id = newChatId(Date.now())\n setChats((cs) => addChat(cs, id, { attach }))\n return id\n }\n\n function showDefault() {\n const next = nextInQueue(queue, modalId ?? (onChatPage ? currentId : null))\n if (next) return show(next.id)\n if (modalId) return closeModal()\n const c = defaultChat(chats, now)\n show(c ? c.id : create())\n }\n\n function showAbout(a: Attach) {\n const c = chatFor(chats, a)\n show(c ? c.id : create(a))\n }\n\n // askAgent() from anywhere: into the current chat when it is idle, otherwise into a new one; then show it.\n // No deps on purpose: re-subscribes each render so the handler sees the current `chats`/`send`.\n useEffect(() => {\n function onAsk(e: Event) {\n const { message, newChat } = (e as CustomEvent<AskAgentDetail>).detail ?? {}\n if (!message) return\n // abortsRef is updated synchronously by send(), so it counts asks fired earlier in this same tick\n const route = routeAsk(chats, currentId, { newChat, running: abortsRef.current.size })\n if (\"refused\" in route) return setNotice(route.refused)\n setNotice(null)\n const epic = epicOf(message)\n const id = \"chatId\" in route ? route.chatId : create(epic ? { kind: \"epic\", id: epic } : null)\n send(id, message)\n // newChat asks (the multi-epic breakdown dialog) run in the background: the sidebar and roadmap show them\n if (!newChat) show(id)\n }\n function onOpen(e: Event) {\n const chatId = (e as CustomEvent<{ chatId: string }>).detail?.chatId\n if (chatId && chats.some((c) => c.id === chatId)) show(chatId)\n }\n window.addEventListener(ASK_AGENT_EVENT, onAsk)\n window.addEventListener(OPEN_CHAT_EVENT, onOpen)\n return () => {\n window.removeEventListener(ASK_AGENT_EVENT, onAsk)\n window.removeEventListener(OPEN_CHAT_EVENT, onOpen)\n }\n })\n\n function patchLast(chatId: string, fn: (m: ChatMessage) => ChatMessage) {\n setChats((cs) => patchChat(cs, chatId, (c) => ({ ...c, messages: [...c.messages.slice(0, -1), fn(c.messages[c.messages.length - 1])] })))\n }\n\n // Handles one line of `claude -p --output-format stream-json` for chat `chatId`\n function handleEvent(chatId: string, ev: any) {\n if (ev.session_id) setChats((cs) => patchChat(cs, chatId, (c) => (c.sessionId === ev.session_id ? c : { ...c, sessionId: ev.session_id })))\n if (ev.type === \"stream_event\") {\n const e = ev.event\n if (e?.type === \"message_start\") {\n patchLast(chatId, (m) => (m.text && !m.text.endsWith(\"\\n\\n\") ? { ...m, text: m.text + \"\\n\\n\" } : m))\n } else if (e?.type === \"content_block_delta\" && e.delta?.type === \"text_delta\") {\n patchLast(chatId, (m) => ({ ...m, text: m.text + e.delta.text }))\n }\n } else if (ev.type === \"assistant\") {\n const uses: { type: string; id: string; name: string; input: Record<string, unknown> }[] =\n (ev.message?.content ?? []).filter((b: { type: string }) => b.type === \"tool_use\")\n const proposals: Proposal[] = uses\n .filter((b) => b.name.endsWith(\"vibedoc_propose_edit\") && typeof b.input?.path === \"string\" && Array.isArray(b.input?.edits))\n .map((b) => ({\n id: b.id,\n path: b.input.path as string,\n edits: b.input.edits as TextEdit[],\n summary: typeof b.input.summary === \"string\" ? b.input.summary : undefined,\n status: \"pending\",\n }))\n // Cards render before the server validates the input, so drop shapes they can't draw instead of crashing\n const plans: PlanProposal[] = uses\n .filter((b) => b.name.endsWith(\"vibedoc_propose_plan\"))\n .flatMap((b) => {\n const plan = asRenderablePlan(b.input?.plan)\n return plan ? [{ id: b.id, plan, status: \"pending\" as const }] : []\n })\n const questions: QuestionSet[] = uses\n .filter((b) => b.name.endsWith(\"vibedoc_ask_questions\") && isRenderableQuestions(b.input?.questions))\n .map((b) => ({ id: b.id, questions: b.input.questions as Question[] }))\n const cards = [\"vibedoc_propose_edit\", \"vibedoc_propose_plan\", \"vibedoc_ask_questions\"]\n const tools = uses\n .filter((b) => !cards.some((c) => b.name.endsWith(c)))\n .map((b) => b.name.replace(/^mcp__vibedoc__vibedoc_/, \"\"))\n if (tools.length || proposals.length || plans.length || questions.length) {\n patchLast(chatId, (m) => ({\n ...m,\n tools: [...m.tools, ...tools],\n proposals: [...m.proposals, ...proposals],\n plans: [...m.plans, ...plans],\n questions: [...m.questions, ...questions],\n }))\n }\n } else if (ev.type === \"user\") {\n // A proposal the server rejected (bad old_string) is retried by the agent; don't show it\n const failed = new Set(\n (ev.message?.content ?? [])\n .filter((b: { type: string; is_error?: boolean }) => b.type === \"tool_result\" && b.is_error)\n .map((b: { tool_use_id: string }) => b.tool_use_id),\n )\n if (failed.size) {\n patchLast(chatId, (m) => ({\n ...m,\n proposals: m.proposals.filter((p) => !failed.has(p.id)),\n plans: m.plans.filter((p) => !failed.has(p.id)),\n questions: m.questions.filter((q) => !failed.has(q.id)),\n }))\n }\n } else if (ev.type === \"result\" && ev.is_error) {\n patchLast(chatId, (m) => ({ ...m, error: ev.result ?? ev.subtype ?? \"Agent error\" }))\n } else if (ev.type === \"error\") {\n patchLast(chatId, (m) => ({ ...m, error: ev.message }))\n }\n }\n\n // `chatId` may be a chat create() just queued, so a missing chat means a fresh one.\n async function send(chatId: string, text: string) {\n const message = text.trim()\n const chat = chats.find((c) => c.id === chatId)\n if (!message || chat?.busy) return\n // Ask once, from this click/Enter (browsers want a user gesture), so waiting chats can notify later\n if (\"Notification\" in window && Notification.permission === \"default\") void Notification.requestPermission().catch(() => {})\n const first = !chat?.messages.length\n const epic = epicOf(message)\n const attach: Attach | null = chat?.attach ?? (epic ? { kind: \"epic\", id: epic } : null)\n setChats((cs) => patchChat(cs, chatId, (c) => ({\n ...c,\n // An attached chat keeps its item title until the first message names what it's for\n title: c.messages.length ? c.title : chatTitle(message),\n attach: c.attach ?? attach,\n busy: true,\n dismissed: false,\n notes: [],\n updatedAt: new Date().toISOString(),\n messages: [...c.messages, blank(\"user\", message), blank(\"assistant\")],\n })))\n markDirty(chatId)\n // Context only for a chat opened from an epic/task (showAbout); an ask like \"Break down epic R004…\" names it already\n const prefix = [\n ...(first && chat?.attach ? [attachContext(chat.attach)] : []),\n ...(chat?.notes.length ? [`[${chat.notes.join(\" \")}]`] : []),\n ]\n const outgoing = prefix.length ? `${prefix.join(\"\\n\")}\\n\\n${message}` : message\n const ac = new AbortController()\n abortsRef.current.set(chatId, ac)\n try {\n const res = await fetch(`/api/chat${rootParam}`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ message: outgoing, sessionId: chat?.sessionId ?? null, docPath }),\n signal: ac.signal,\n })\n if (!res.ok || !res.body) {\n const data = await res.json().catch(() => null)\n throw new Error(data?.error ?? `Request failed (${res.status})`)\n }\n const reader = res.body.getReader()\n const decoder = new TextDecoder()\n let buf = \"\"\n for (;;) {\n const { done, value } = await reader.read()\n if (done) break\n buf += decoder.decode(value, { stream: true })\n const lines = buf.split(\"\\n\")\n buf = lines.pop() ?? \"\"\n for (const line of lines) {\n if (!line.trim()) continue\n try { handleEvent(chatId, JSON.parse(line)) } catch { /* partial or non-JSON line */ }\n }\n }\n } catch (e) {\n if (!ac.signal.aborted) patchLast(chatId, (m) => ({ ...m, error: (e as Error).message }))\n else patchLast(chatId, (m) => (m.text || m.error ? m : { ...m, error: \"Stopped.\" }))\n } finally {\n // Only save a turn that is still ours: a project switch or delete clears the map first,\n // and saving then would write this chat into the next project (or resurrect a deleted one)\n if (abortsRef.current.get(chatId) === ac) {\n abortsRef.current.delete(chatId)\n markDirty(chatId)\n }\n setChats((cs) => patchChat(cs, chatId, (c) => ({ ...c, busy: false, updatedAt: new Date().toISOString() })))\n }\n }\n\n // Aborting the fetch makes /api/chat kill its `claude -p` child\n function stop(chatId: string) {\n abortsRef.current.get(chatId)?.abort()\n }\n\n function dismiss(chatId: string) {\n setChats((cs) => patchChat(cs, chatId, (c) => ({ ...c, dismissed: true })))\n markDirty(chatId)\n }\n\n function remove(chatId: string) {\n const chat = chats.find((c) => c.id === chatId)\n const n = chat ? pendingReviews(chat) : 0\n if (n && !window.confirm(`Discard ${n} unreviewed proposal${n === 1 ? \"\" : \"s\"}?`)) return false\n stop(chatId)\n abortsRef.current.delete(chatId)\n dirtyRef.current.delete(chatId)\n // Functional update so a stream chunk queued since this render isn't dropped from the other chats\n setChats((cs) => cs.filter((c) => c.id !== chatId))\n if (modalId === chatId) setModalId(null)\n if (currentId === chatId) setCurrentId(null)\n fetch(`/api/conversations${rootParam}`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ delete: chatId }),\n }).catch((e) => console.warn(`[vibedoc] could not delete chat ${chatId}:`, e))\n return true\n }\n\n function mapMessages(chatId: string, fn: (m: ChatMessage) => ChatMessage, note?: string) {\n setChats((cs) => patchChat(cs, chatId, (c) => ({\n ...c,\n notes: note ? [...c.notes, note] : c.notes,\n messages: c.messages.map(fn),\n })))\n markDirty(chatId)\n }\n\n function resolveProposal(chatId: string, id: string, path: string, status: ProposalStatus) {\n mapMessages(chatId, (m) => ({\n ...m,\n proposals: m.proposals.map((p) => (p.id === id ? { ...p, status } : p)),\n }), `User ${status} your proposed edit to ${path}.`)\n }\n\n function resolvePlan(chatId: string, p: PlanProposal, status: PlanStatus, created: PlanCreated[], unchecked: string[]) {\n const epic = p.plan.kind === \"breakdown\" ? planTarget(p.plan) : \"the roadmap\"\n mapMessages(chatId, (m) => ({\n ...m,\n plans: m.plans.map((x) => (x.id === p.id ? { ...x, status, created } : x)),\n }), status === \"accepted\"\n ? `User accepted plan for ${epic}: created ${created.map((c) => c.id).join(\", \")}${unchecked.length ? ` (unchecked: ${unchecked.join(\", \")})` : \"\"}.`\n : `User rejected the plan for ${epic}.`)\n }\n\n function answerQuestions(chatId: string, set: QuestionSet, answers: string[]) {\n if (chats.find((c) => c.id === chatId)?.busy) return\n mapMessages(chatId, (m) => ({\n ...m,\n questions: m.questions.map((q) => (q.id === set.id ? { ...q, answers } : q)),\n }))\n send(chatId, formatAnswers(set.questions, answers))\n }\n\n const api: ChatApi = {\n chats, loaded, modalId,\n closeModal,\n show, showDefault, showAbout, create, send, stop, dismiss, remove,\n resolveProposal, resolvePlan, answerQuestions,\n agents, runningCount, waitingCount, errorCount, queue, now,\n notice, dismissNotice: () => setNotice(null),\n }\n return (\n <ChatContext.Provider value={api}>\n <ItemAgentsContext.Provider value={agents}>{children}</ItemAgentsContext.Provider>\n </ChatContext.Provider>\n )\n}\n","\"use client\"\n\nimport { Loader2, Map as MapIcon, SquareCheck } from \"lucide-react\"\nimport { cn } from \"@/lib/utils\"\nimport { STATUS_LABEL, type Attach, type ChatStatus } from \"@/lib/chats\"\n\n/**\n * Running = spinner; needs answers = pulsing amber dot; review = pulsing accent diamond; error = red dot; idle = hollow dot.\n * Shape and motion differ, not only hue: the accent can be green, close to the teal used for done.\n */\nexport function StatusMarker({ status, showIdle = false, label, className }: { status: ChatStatus; showIdle?: boolean; label?: string; className?: string }) {\n if (status === \"idle\" && !showIdle) return null\n const text = label ?? STATUS_LABEL[status]\n return (\n <span role=\"img\" aria-label={text} title={text} className={cn(\"inline-flex size-3 shrink-0 items-center justify-center\", className)}>\n {status === \"running\" ? (\n <Loader2 className=\"size-3 animate-spin text-accent\" />\n ) : (\n <span\n className={cn(\n \"size-1.5\",\n status === \"review\" ? \"size-2 rotate-45 rounded-[1px] bg-accent animate-pulse-dot\" : \"rounded-full\",\n status === \"needs-answer\" && \"bg-amber animate-pulse-dot\",\n status === \"error\" && \"bg-danger\",\n status === \"idle\" && \"border border-muted/60\",\n )}\n />\n )}\n </span>\n )\n}\n\n/** \"R004\" / \"T055\" with an epic/task icon. Rendered as a span; the caller decides whether it's a link. */\nexport function AttachLabel({ attach, className }: { attach: Attach; className?: string }) {\n const Icon = attach.kind === \"epic\" ? MapIcon : SquareCheck\n return (\n <span className={cn(\"inline-flex items-center gap-1 font-mono text-[10px] leading-none\", className)}>\n <Icon className=\"size-3\" />\n {attach.id}\n </span>\n )\n}\n\nexport function attachHref(a: Attach): string {\n return a.kind === \"epic\" ? `/roadmap?item=${a.id}` : `/board?task=${a.id}`\n}\n","import createLucideIcon from '../createLucideIcon';\nimport type { LucideIconNode, LucideIconData } from '../types';\n\nexport const __iconData: LucideIconData = {\n name: 'square-check',\n size: 24,\n node: [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'm16 9-5.5 5.5L8 12', key: 'xofnsj' }],\n ],\n aliases: ['check-square-2'],\n};\n\n/**\n * @deprecated Access `__iconData` instead.\n */\nexport const __iconNode: LucideIconNode[] = __iconData.node;\n\n/**\n * @component @name SquareCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Im0xNiA5LTUuNSA1LjVMOCAxMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/square-check\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst SquareCheck = createLucideIcon(__iconData);\n\nexport default SquareCheck;\n","// Pure plan model for \"plan from the chat\": the agent proposes, the user reviews, the server applies.\n// No fs here; core.applyPlan() does the writing. Self-check: node src/lib/plan.check.mts\nimport type { RoadmapItem, RoadmapStatus } from './core'\n\nexport interface PlanTask {\n key: string // stable within the plan, e.g. \"t1\"; becomes a T id on apply\n title: string\n size?: string // \"S (~1 hr)\" | \"M (2–3 hrs)\" | \"L (half day)\"\n dependsOn?: string[] // keys in this plan, or existing task ids (\"T030\")\n due?: string // YYYY-MM-DD\n body: string // full markdown below the meta block: Goal, Context, Scope, Files, …\n}\nexport interface PlanHorizon { key: string; title: string; body?: string }\nexport interface PlanEpic { key: string; title: string; parent: string; status?: RoadmapStatus; body: string } // parent: existing horizon id or a horizon key\nexport interface PlanNewEpic { title: string; parent: string; body: string } // parent: existing horizon id\n/** breakdown: exactly one of `epic` (existing) or `newEpic`, or neither (loose tasks, no Phase). */\nexport type Plan =\n | { kind: 'breakdown'; epic?: string; newEpic?: PlanNewEpic; tasks: PlanTask[] }\n | { kind: 'roadmap'; horizons: PlanHorizon[]; epics: PlanEpic[] }\n\nexport interface PlanContext { roadmap: RoadmapItem[]; taskIds: string[] }\n\n/** A real calendar date \"YYYY-MM-DD\" (rejects 2026-02-30), else null. Same rule as core's parseDue. */\nfunction isDate(raw: string): boolean {\n const m = raw.match(/^(\\d{4})-(\\d{2})-(\\d{2})$/)\n if (!m) return false\n return new Date(Date.UTC(+m[1], +m[2] - 1, +m[3])).toISOString().slice(0, 10) === raw\n}\n\nconst isObj = (v: unknown): v is Record<string, unknown> => !!v && typeof v === 'object' && !Array.isArray(v)\nconst str = (v: unknown) => (typeof v === 'string' ? v.trim() : '')\n\n/** Where a breakdown's tasks go, for one-line summaries: \"R002\", `new epic \"X\"`, or \"no epic\". */\nexport function planTarget(plan: Extract<Plan, { kind: 'breakdown' }>): string {\n if (str(plan.epic)) return str(plan.epic).toUpperCase()\n return plan.newEpic ? `new epic \"${str(plan.newEpic.title)}\"` : 'no epic'\n}\n\n/** An existing roadmap item that can parent an epic (a horizon), else the reason it can't. */\nfunction resolveHorizon(parent: string, roadmap: RoadmapItem[], missing = 'is not an existing roadmap item'): { id: string } | { error: string } {\n const p = roadmap.find(r => r.id === parent.toUpperCase())\n if (!p) return { error: `parent \"${parent}\" ${missing}` }\n if (p.parent !== null) return { error: `parent ${p.id} is an epic, not a horizon (max depth is 2)` }\n return { id: p.id }\n}\n\n/** Id of an existing item with this title under `parent` ('' = horizon level), case-insensitive. */\nconst titleTaken = (roadmap: RoadmapItem[], parent: string, title: string) =>\n roadmap.find(i => (i.parent ?? '') === parent && i.title.trim().toLowerCase() === title.toLowerCase())?.id\n\n/**\n * Just enough shape for the chat UI to render a proposal before the server has validated it\n * (the tool_use streams in before its tool_result). Returns null for anything a card can't draw.\n */\nexport function asRenderablePlan(p: unknown): Plan | null {\n if (!isObj(p)) return null\n const items = (v: unknown, need: string[]) => Array.isArray(v) && v.every(x =>\n isObj(x) && need.every(k => typeof x[k] === 'string') && (x.dependsOn === undefined || Array.isArray(x.dependsOn)))\n if (p.kind === 'breakdown') {\n const target = p.epic === undefined || typeof p.epic === 'string'\n const newEpic = p.newEpic === undefined || (isObj(p.newEpic) && typeof p.newEpic.title === 'string' && typeof p.newEpic.parent === 'string')\n return target && newEpic && items(p.tasks, ['key', 'title']) && (p.tasks as unknown[]).length > 0\n ? (p as unknown as Plan) : null\n }\n if (p.kind === 'roadmap') {\n const horizons = p.horizons ?? [], epics = p.epics ?? []\n return items(horizons, ['key', 'title']) && items(epics, ['key', 'title', 'parent'])\n ? ({ kind: 'roadmap', horizons, epics } as Plan) : null\n }\n return null\n}\n\n/** Every problem with the plan against the current files; [] = valid. */\nexport function validatePlan(plan: unknown, ctx: PlanContext): string[] {\n if (!isObj(plan)) return ['plan must be an object']\n if (plan.kind === 'roadmap') return validateRoadmapPlan(plan, ctx)\n if (plan.kind !== 'breakdown') return [`plan.kind must be \"breakdown\" or \"roadmap\" (got ${JSON.stringify(plan.kind)})`]\n\n const errors: string[] = []\n const epicId = str(plan.epic).toUpperCase()\n if (plan.epic !== undefined && typeof plan.epic !== 'string') errors.push('epic must be a string (an epic id)')\n else if (epicId && plan.newEpic !== undefined) errors.push('pass either epic (an existing epic) or newEpic, not both')\n else if (epicId) {\n const epic = ctx.roadmap.find(i => i.id === epicId)\n if (!epic) errors.push(`Epic ${JSON.stringify(plan.epic)} not found`)\n else if (!epic.parent) errors.push(`${epic.id} is a horizon, not an epic; pass an epic id`)\n } else if (plan.newEpic !== undefined) {\n const e = plan.newEpic\n if (!isObj(e)) errors.push('newEpic must be an object { title, parent, body }')\n else {\n const title = str(e.title), parent = str(e.parent)\n if (!title) errors.push('newEpic: title is required')\n if (typeof e.body !== 'string') errors.push('newEpic: body must be a markdown string')\n if (!parent) errors.push('newEpic: parent is required (an existing horizon id)')\n else {\n const h = resolveHorizon(parent, ctx.roadmap)\n if ('error' in h) errors.push(`newEpic: ${h.error}`)\n else if (title) {\n const other = titleTaken(ctx.roadmap, h.id, title)\n if (other) errors.push(`newEpic: \"${title}\" already exists under ${h.id} (${other})`)\n }\n }\n }\n }\n\n if (!Array.isArray(plan.tasks) || plan.tasks.length === 0) {\n errors.push('tasks must be a non-empty array')\n return errors\n }\n const tasks = plan.tasks as unknown[]\n const existing = new Set(ctx.taskIds.map(t => t.toUpperCase()))\n\n const index = new Map<string, number>()\n tasks.forEach((t, i) => {\n const key = isObj(t) ? str(t.key) : ''\n if (!key) errors.push(`task #${i + 1}: key is required`)\n else if (index.has(key)) errors.push(`duplicate key \"${key}\"`)\n else index.set(key, i)\n })\n\n const deps = new Map<string, string[]>() // key → plan keys it depends on\n tasks.forEach((t, i) => {\n if (!isObj(t)) { errors.push(`task #${i + 1} must be an object`); return }\n const label = str(t.key) || `task #${i + 1}`\n if (!str(t.title)) errors.push(`${label}: title is required`)\n if (typeof t.body !== 'string') errors.push(`${label}: body must be a markdown string`)\n if (t.size !== undefined && typeof t.size !== 'string') errors.push(`${label}: size must be a string`)\n if (t.due !== undefined && !(typeof t.due === 'string' && isDate(t.due))) {\n errors.push(`${label}: due must be a date YYYY-MM-DD (got ${JSON.stringify(t.due)})`)\n }\n if (t.dependsOn === undefined) return\n if (!Array.isArray(t.dependsOn)) { errors.push(`${label}: dependsOn must be an array`); return }\n const own: string[] = []\n for (const d of t.dependsOn) {\n const dep = str(d)\n if (index.has(dep)) own.push(dep)\n else if (!existing.has(dep.toUpperCase())) {\n errors.push(`${label}: dependsOn \"${String(d)}\" is neither a key in this plan nor an existing task`)\n }\n }\n if (str(t.key)) deps.set(str(t.key), own)\n })\n\n // Cycles (DFS, report each once), then forward references: apply creates in order,\n // so a dependency must come earlier in the list to already have its T id.\n const state = new Map<string, 'open' | 'done'>()\n const cyclic = new Set<string>()\n const visit = (k: string, stack: string[]) => {\n if (state.get(k) === 'done') return\n if (state.get(k) === 'open') {\n const cycle = [...stack.slice(stack.indexOf(k)), k]\n if (!cycle.some(c => cyclic.has(c))) errors.push(`dependency cycle: ${cycle.join(' → ')}`)\n cycle.forEach(c => cyclic.add(c))\n return\n }\n state.set(k, 'open')\n for (const d of deps.get(k) ?? []) visit(d, [...stack, k])\n state.set(k, 'done')\n }\n for (const k of deps.keys()) visit(k, [])\n for (const [k, ds] of deps) {\n if (cyclic.has(k)) continue\n for (const d of ds) {\n if ((index.get(d) ?? 0) > (index.get(k) ?? 0)) errors.push(`${k} depends on ${d}, which comes later; list ${d} first`)\n }\n }\n return errors\n}\n\nconst STATUSES = ['planned', 'in-progress', 'done']\n\nfunction validateRoadmapPlan(plan: Record<string, unknown>, ctx: PlanContext): string[] {\n const errors: string[] = []\n const horizons = plan.horizons ?? []\n const epics = plan.epics ?? []\n if (!Array.isArray(horizons)) errors.push('horizons must be an array')\n if (!Array.isArray(epics)) errors.push('epics must be an array')\n if (errors.length > 0) return errors\n const hs = horizons as unknown[]\n const es = epics as unknown[]\n if (hs.length + es.length === 0) return ['a roadmap plan needs at least one horizon or epic']\n\n const keys = new Set<string>()\n const horizonKeys = new Set<string>()\n const checkKey = (v: unknown, label: string, isHorizon: boolean) => {\n const key = isObj(v) ? str(v.key) : ''\n if (!key) errors.push(`${label}: key is required`)\n else if (keys.has(key)) errors.push(`duplicate key \"${key}\"`)\n else { keys.add(key); if (isHorizon) horizonKeys.add(key) }\n }\n hs.forEach((h, i) => checkKey(h, `horizon #${i + 1}`, true))\n es.forEach((e, i) => checkKey(e, `epic #${i + 1}`, false))\n\n // Titles are unique per level (spine, or one horizon), against existing items and within the plan.\n const seen = new Map<string, string>() // \"parent\\0title\" → who in this plan has it\n const claimTitle = (parent: string, title: string, label: string) => {\n const k = `${parent}\\0${title.toLowerCase()}`\n const other = titleTaken(ctx.roadmap, parent, title) ?? seen.get(k)\n if (other) errors.push(`${label}: \"${title}\" already exists ${parent ? `under ${parent}` : 'as a horizon'} (${other})`)\n else seen.set(k, label)\n }\n\n hs.forEach((h, i) => {\n if (!isObj(h)) { errors.push(`horizon #${i + 1} must be an object`); return }\n const label = str(h.key) || `horizon #${i + 1}`\n const title = str(h.title)\n if (!title) errors.push(`${label}: title is required`)\n else claimTitle('', title, label)\n if (h.body !== undefined && typeof h.body !== 'string') errors.push(`${label}: body must be a markdown string`)\n })\n\n es.forEach((e, i) => {\n if (!isObj(e)) { errors.push(`epic #${i + 1} must be an object`); return }\n const label = str(e.key) || `epic #${i + 1}`\n const title = str(e.title)\n if (!title) errors.push(`${label}: title is required`)\n if (typeof e.body !== 'string') errors.push(`${label}: body must be a markdown string`)\n if (e.status !== undefined && !STATUSES.includes(e.status as string)) {\n errors.push(`${label}: status must be one of ${STATUSES.join(', ')} (got ${JSON.stringify(e.status)})`)\n }\n const parent = str(e.parent)\n let parentId = ''\n if (!parent) errors.push(`${label}: parent is required (an existing horizon id or a horizon key in this plan)`)\n else if (horizonKeys.has(parent)) parentId = parent\n else if (keys.has(parent)) errors.push(`${label}: parent \"${parent}\" is an epic in this plan; an epic's parent must be a horizon`)\n else {\n const h = resolveHorizon(parent, ctx.roadmap, 'is neither a horizon key in this plan nor an existing roadmap item')\n if ('id' in h) parentId = h.id\n else errors.push(`${label}: ${h.error}`)\n }\n if (title && parentId) claimTitle(parentId, title, label)\n })\n return errors\n}\n\n/** Keep only the selected items. A kept item depending on an unchecked one is an error. */\nexport function selectPlan(plan: Plan, selected: string[]): { plan: Plan; errors: string[] } {\n if (plan.kind === 'roadmap') return selectRoadmapPlan(plan, selected)\n const errors: string[] = []\n // Trim like validatePlan/applyPlan do, or \" t1 \" vs \"t1\" slips past the unchecked-dependency check\n const keys = new Set(plan.tasks.map(t => t.key.trim()))\n const sel = new Set(selected.map(k => k.trim()))\n for (const k of sel) if (!keys.has(k)) errors.push(`unknown key \"${k}\"`)\n const tasks = plan.tasks.filter(t => sel.has(t.key.trim()))\n if (tasks.length === 0) errors.push('nothing selected')\n for (const t of tasks) {\n for (const d of (t.dependsOn ?? []).map(d => d.trim())) {\n if (keys.has(d) && !sel.has(d)) errors.push(`${t.key.trim()} depends on ${d}, which you unchecked`)\n }\n }\n return { plan: { ...plan, tasks }, errors }\n}\n\nfunction selectRoadmapPlan(plan: Extract<Plan, { kind: 'roadmap' }>, selected: string[]): { plan: Plan; errors: string[] } {\n const errors: string[] = []\n const horizons = plan.horizons ?? []\n const epics = plan.epics ?? []\n const hKeys = new Set(horizons.map(h => h.key))\n const keys = new Set([...hKeys, ...epics.map(e => e.key)])\n const sel = new Set(selected)\n for (const k of sel) if (!keys.has(k)) errors.push(`unknown key \"${k}\"`)\n const keptH = horizons.filter(h => sel.has(h.key))\n const keptE = epics.filter(e => sel.has(e.key))\n if (keptH.length + keptE.length === 0) errors.push('nothing selected')\n for (const e of keptE) {\n const p = e.parent.trim()\n if (hKeys.has(p) && !sel.has(p)) errors.push(`${e.key} is under ${p}, which you unchecked; check ${p} or uncheck ${e.key}`)\n }\n return { plan: { ...plan, horizons: keptH, epics: keptE }, errors }\n}\n","// Pure helpers for agent chats (ChatContext, ChatView, sidebar, /chat page). No React, no fs:\n// `node src/lib/chats.check.mts` runs them.\n\n/** What a chat is about: the roadmap/board show its status there, and the first turn tells the agent. */\nexport interface Attach { kind: \"epic\" | \"task\"; id: string }\n\nexport interface Chat<M = unknown> {\n id: string\n title: string\n messages: M[]\n /** Claude session to `--resume`; set by the first `session_id` in the stream */\n sessionId: string | null\n busy: boolean\n /** Accept/reject outcomes the agent hasn't heard about yet; sent with this chat's next message */\n notes: string[]\n attach: Attach | null\n createdAt: string\n updatedAt: string\n /** The user dismissed this chat's error; cleared by the next turn */\n dismissed?: boolean\n}\n\nexport function newChatId(now: number, salt = Math.random()): string {\n return `c-${now.toString(36)}${salt.toString(36).slice(2, 6)}`\n}\n\nexport function addChat<M>(chats: Chat<M>[], id: string, opts: { title?: string; attach?: Attach | null; now?: string } = {}): Chat<M>[] {\n const now = opts.now ?? new Date().toISOString()\n const title = opts.title ?? (opts.attach ? attachTitle(opts.attach) : \"New chat\")\n return [...chats, { id, title, messages: [], sessionId: null, busy: false, notes: [], attach: opts.attach ?? null, createdAt: now, updatedAt: now }]\n}\n\n/** A missing id (e.g. a closed chat whose stream is still unwinding) is a no-op. */\nexport function patchChat<M>(chats: Chat<M>[], id: string, fn: (c: Chat<M>) => Chat<M>): Chat<M>[] {\n return chats.map((c) => (c.id === id ? fn(c) : c))\n}\n\n/** The fields of a chat message the status reads (ChatContext's ChatMessage has more). */\nexport interface StatusMessage {\n role: \"user\" | \"assistant\"\n text?: string\n tools?: unknown[]\n questions: { answers?: unknown }[]\n proposals: { status: string }[]\n plans: { status: string }[]\n error?: string\n}\n\nexport type ChatStatus = \"running\" | \"needs-answer\" | \"review\" | \"idle\" | \"error\"\n\nexport const STATUS_LABEL: Record<ChatStatus, string> = {\n running: \"Running\",\n \"needs-answer\": \"Waiting for your answers\",\n review: \"Plan or edit to review\",\n error: \"Error\",\n idle: \"Idle\",\n}\n\n/** Plan and edit cards the user hasn't accepted or rejected yet, across the whole chat. */\nexport function pendingReviews(chat: Chat<StatusMessage>): number {\n return chat.messages.reduce(\n (n, m) => n + m.plans.filter((p) => p.status === \"pending\").length + m.proposals.filter((p) => p.status === \"pending\").length,\n 0,\n )\n}\n\n/** Precedence: running > needs-answer > review > error > idle. */\nexport function chatStatus(chat: Chat<StatusMessage>): ChatStatus {\n if (chat.busy) return \"running\"\n const last = chat.messages[chat.messages.length - 1]\n // Same rule as the composer hint: only the latest reply's questions block\n if (last?.questions.some((q) => !q.answers)) return \"needs-answer\"\n if (pendingReviews(chat)) return \"review\"\n const lastReply = chat.messages.findLast((m) => m.role === \"assistant\")\n return lastReply?.error ? \"error\" : \"idle\"\n}\n\n/** Errors older than this stop alarming in the shell; the chat itself still shows them. */\nexport const ERROR_ALARM_MS = 24 * 60 * 60 * 1000\n\n/** An error worth a count in the header / collapsed rail: recent and not dismissed. */\nexport function isActionableError(chat: Chat<StatusMessage>, now: number): boolean {\n return !chat.dismissed && now - Date.parse(chat.updatedAt) < ERROR_ALARM_MS && chatStatus(chat) === \"error\"\n}\n\n/** The status the shell (sidebar, palette) shows: an error that no longer alarms reads as idle. */\nexport function shellStatus(chat: Chat<StatusMessage>, now: number): ChatStatus {\n const s = chatStatus(chat)\n return s === \"error\" && !isActionableError(chat, now) ? \"idle\" : s\n}\n\nexport const isWaiting = (s: ChatStatus): s is \"needs-answer\" | \"review\" => s === \"needs-answer\" || s === \"review\"\n\n/** Each running chat is one `claude -p` process. */\nexport const MAX_RUNNING_CHATS = 4\nexport const TOO_MANY_CHATS = `Too many agents running (${MAX_RUNNING_CHATS}). Stop or close a chat, or wait.`\n\n/**\n * Where an askAgent() message goes: the current chat when it is idle, otherwise a new chat.\n * Refused at the cap. `running` overrides the busy count when `chats` may be stale (several asks in one tick).\n */\nexport function routeAsk(\n chats: Chat[],\n currentId: string | null,\n opts: { newChat?: boolean; running?: number } = {},\n): { chatId: string } | { newChat: true } | { refused: string } {\n if ((opts.running ?? chats.filter((c) => c.busy).length) >= MAX_RUNNING_CHATS) return { refused: TOO_MANY_CHATS }\n const current = chats.find((c) => c.id === currentId)\n return current && !current.busy && !opts.newChat ? { chatId: current.id } : { newChat: true }\n}\n\n// ─── Attachments ──────────────────────────────────────────────────────────────\n\nexport const attachKey = (a: Attach) => `${a.kind}:${a.id}`\nexport const sameAttach = (a: Attach | null, b: Attach | null) => !!a && !!b && a.kind === b.kind && a.id === b.id\n\nexport function attachTitle(a: Attach): string {\n return a.kind === \"epic\" ? `Epic ${a.id}` : `Task ${a.id}`\n}\n\n/** The epic a message asks to break down: the roadmap's \"Break down with agent\" wording, or the same typed by hand. */\nexport function epicOf(message: string): string | null {\n return message.trim().match(/^Break down epic (R\\d+)/i)?.[1].toUpperCase() ?? null\n}\n\n/** The chat to resume for `a`: the most recently updated one attached to it. */\nexport function chatFor<C extends Chat>(chats: C[], a: Attach): C | undefined {\n return chats.filter((c) => sameAttach(c.attach, a)).sort((x, y) => y.updatedAt.localeCompare(x.updatedAt))[0]\n}\n\n/** What the roadmap/board show on an item while a chat works on it. Idle and errored chats show nothing. */\nexport interface ItemAgent { status: \"running\" | \"needs-answer\" | \"review\"; chatId: string }\n\nconst RANK = { running: 3, \"needs-answer\": 2, review: 1 } as const\n\n/** attachKey → the most urgent chat on it (running > needs-answer > review). */\nexport function itemAgents(chats: Chat<StatusMessage>[]): Record<string, ItemAgent> {\n const out: Record<string, ItemAgent> = {}\n for (const c of chats) {\n const status = chatStatus(c)\n if (!c.attach || status === \"idle\" || status === \"error\") continue\n const key = attachKey(c.attach)\n const cur = out[key]\n if (!cur || RANK[status] > RANK[cur.status]) out[key] = { status, chatId: c.id }\n }\n return out\n}\n\n/** First-turn context for an attached chat; later turns resume the Claude session, which remembers it. */\nexport function attachContext(a: Attach): string {\n return a.kind === \"epic\"\n ? `[This chat is about epic ${a.id}. Read it with vibedoc_get_roadmap (and its tasks with vibedoc_get_task) before answering.]`\n : `[This chat is about task ${a.id}. Read it with vibedoc_get_task before answering.]`\n}\n\n/** Starter prompts shown in an empty chat. Each is something the agent can do with only the vibedoc_* tools. */\nexport function suggestions(a: Attach | null): string[] {\n if (!a) return [\"What should I work on next?\", \"Plan a roadmap for this project.\", \"What is blocked right now?\"]\n if (a.kind === \"epic\") return [`Break down epic ${a.id} into tasks.`, \"Summarize this epic's progress.\", \"What is at risk in this epic?\"]\n return [\"Refine this task's spec.\", \"Split this task into smaller tasks.\", \"What blocks this task?\"]\n}\n\n// ─── Lists ────────────────────────────────────────────────────────────────────\n\nexport interface ChatGroups<C> { needsYou: C[]; errors: C[]; running: C[]; recent: C[] }\n\n/**\n * Sidebar and /chat list order: waiting on you, actionable errors, running, then the rest; newest first within a group.\n * `errors` fills only when `now` is given (actionable is time-dependent); without it errored chats stay in `recent`.\n */\nexport function groupChats<C extends Chat<StatusMessage>>(chats: C[], now?: number): ChatGroups<C> {\n const byNew = [...chats].sort((a, b) => b.updatedAt.localeCompare(a.updatedAt))\n const groups: ChatGroups<C> = { needsYou: [], errors: [], running: [], recent: [] }\n for (const c of byNew) {\n const s = chatStatus(c)\n if (isWaiting(s)) groups.needsYou.push(c)\n else if (now !== undefined && isActionableError(c, now)) groups.errors.push(c)\n else if (s === \"running\") groups.running.push(c)\n else groups.recent.push(c)\n }\n return groups\n}\n\n/** What needs the user, in order: chats waiting on you, then actionable errors. `c`, the header strip and ⌘K open its head. */\nexport function attentionQueue<C extends Chat<StatusMessage>>(chats: C[], now: number): C[] {\n const g = groupChats(chats, now)\n return [...g.needsYou, ...g.errors]\n}\n\n/** Where `c` goes from `currentId`: the next queue item after it, the head when it isn't queued, undefined past the end. */\nexport function nextInQueue<C extends Chat>(queue: C[], currentId: string | null): C | undefined {\n const i = queue.findIndex((c) => c.id === currentId)\n return queue[i + 1]\n}\n\n/** The chat the header button / `c` opens: the queue head, else running, else the newest, else none. */\nexport function defaultChat<C extends Chat<StatusMessage>>(chats: C[], now = Date.now()): C | undefined {\n const g = groupChats(chats, now)\n return g.needsYou[0] ?? g.errors[0] ?? g.running[0] ?? g.recent[0]\n}\n\n// ─── Persistence (.vibedoc/chats/<id>.json via /api/conversations) ───────────\n\n/** What gets saved: never busy (a running turn can't survive a reload). Empty chats aren't saved. */\nexport function toSaved<M>(c: Chat<M>): Chat<M> | null {\n return c.messages.length ? { ...c, busy: false } : null\n}\n\n/** A saved chat as loaded: a turn that was cut off (empty last reply, no error) gets an \"interrupted\" error. */\nexport function fromSaved<M extends StatusMessage>(raw: unknown): Chat<M> | null {\n const c = raw as Chat<M> | null\n if (!c || typeof c.id !== \"string\" || !Array.isArray(c.messages)) return null\n const last = c.messages[c.messages.length - 1]\n const cut = last?.role === \"assistant\" && !last.text && !last.error && !last.tools?.length && !last.plans?.length && !last.proposals?.length && !last.questions?.length\n const messages = cut ? [...c.messages.slice(0, -1), { ...last, error: \"Interrupted: the page reloaded while the agent was working.\" }] : c.messages\n const at = c.updatedAt ?? c.createdAt ?? new Date(0).toISOString()\n return { ...c, messages, busy: false, notes: c.notes ?? [], attach: c.attach ?? null, createdAt: c.createdAt ?? at, updatedAt: at }\n}\n\n// ─── Waiting on the user: header badge, page title, desktop notification ─────\n\n/** Chats that became waiting since `prev` (id → last status), so each one notifies once per change. */\nexport function newlyWaiting<C extends Chat<StatusMessage>>(prev: Record<string, ChatStatus>, chats: C[]): { chat: C; status: \"needs-answer\" | \"review\" }[] {\n return chats.flatMap((chat) => {\n const status = chatStatus(chat)\n return isWaiting(status) && prev[chat.id] !== status ? [{ chat, status }] : []\n })\n}\n\n/** \"(2) VibeDoc\" while 2 chats need you (the attention queue); the plain title otherwise. Idempotent. */\nexport function waitingTitle(title: string, n: number): string {\n const base = title.replace(/^\\(\\d+\\) /, \"\")\n return n > 0 ? `(${n}) ${base}` : base\n}\n\nexport function chatTitle(firstMessage: string): string {\n const epic = epicOf(firstMessage)\n if (epic) return `Break down ${epic}`\n const line = firstMessage.trim().split(\"\\n\")[0]\n return line.length > 40 ? `${line.slice(0, 40).trimEnd()}…` : line\n}\n\n/** \"now\", \"5m\", \"3h\", \"2d\" since `iso` (list rows). */\nexport function ago(iso: string, nowMs: number): string {\n const min = Math.max(0, Math.floor((nowMs - Date.parse(iso)) / 60_000))\n if (min < 1) return \"now\"\n if (min < 60) return `${min}m`\n if (min < 60 * 24) return `${Math.floor(min / 60)}h`\n return `${Math.floor(min / (60 * 24))}d`\n}\n"],"names":["q","o","isRenderableQuestions","v","isStr","x","Array","isArray","length","every","question","header","options","label","OTHER","other","setOther","QuestionCard","toggle","formatAnswers","value","questions","answers","prev","map","i","join","onSubmit","includes","p","set","disabled","qi","picked","setPicked","done","multi","filter","labels","l","trim","push","complete","Boolean","className","checked","e","type","multiSelect","name","id","onChange","description","target","placeholder","onClick"],"mappings":"+ECQA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,QACA,EAAA,EAAA,CAAA,CAAA,QDPA,EAAA,EAAA,CAAA,CAAA,QAaO,SAASE,EAAsBC,CAAU,EAE9C,OAAOG,MAAMC,OAAO,CAACJ,IAAMA,EAAEK,MAAM,CAAG,GAAKL,EAAEM,KAAK,CAAC,AAACT,GAClD,CAAC,CAACA,GAAkB,UAAb,EAAyBI,KAAlBJ,oBAAwBA,EAAEU,QAAQ,KAAKN,cAAMJ,EAAEW,MAAM,EAAKL,MAAMC,OAAO,CAACP,EAAEY,OAAO,GAC/FZ,EAAEY,OAAO,CAACH,KAAK,CAAC,AAACR,GAAe,CAAC,CAACA,GAAkB,AAAb,YAAyBG,KAAlBH,GAHL,UAAb,OAG2CA,AAHpCI,EAGyDQ,KAAK,EACrG,CAEA,IAAMC,EAAQ,UAGP,SAASK,EAAcE,CAAqB,CAAEC,CAAiB,EACpE,MAAO,CAAC,cAAeD,EAAUG,GAAG,CAAC,CAACxB,EAAGyB,IAAM,CAAC,EAAE,EAAEzB,EAAEW,MAAM,CAAC,EAAE,EAAEW,CAAO,CAACG,EAAE,CAAA,CAAE,EAAE,CAACC,IAAI,CAAC,KACvF,uBAEO,SAAST,AAAa,KAAEa,CAAG,UAAEC,CAAQ,UAAEJ,CAAQ,CAIrD,EACC,GAAM,CAACM,EAAQC,EAAU,CAAG,CAAA,EAAA,EAAA,QAAA,AAAQ,EAAa,IAAMJ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,CAAS,CAA0C,EACvF,IAAM,EAAuB,SAAhB,EAAO,IAAIc,CAAc,EAAA,GAAO,CAAGZ,EAChD,MACE,CAAA,EAAA,EAAA,IAAA,EAAC,OAAA,CAAK,UAAW,CAAA,EAAA,EAAA,EAAA,AAAE,EAAC,oEAAqE,aACvF,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAK,UAAU,WACf,EAAO,EAAE,GAGhB,mBA/BO,SAAS,AAAa,CAAE,QAAM,UAAE,GAAW,CAAK,OAAE,CAAK,WAAE,CAAS,CAAkF,EACzJ,GAAe,SAAX,GAAqB,CAAC,EAAU,OAAO,KAC3C,IAAM,EAAO,GAAS,CAAY,CAAC,EAAO,CAC1C,MACE,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,KAAK,MAAM,aAAY,EAAM,MAAO,EAAM,UAAW,CAAA,EAAA,EAAA,EAAA,AAAE,EAAClB,0DAA2D,YAC3G,YAAX,EACCC,CAAAA,EAAAA,EAAAA,GAAAA,EAAC,EAAA,OAAO,CAAA,CAAC,UAAU,oCAEnB,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CACC,UAAW,CAAA,EAAA,EAAA,EAAE,AAAF,EACT,WACA,AAAW,aAAW,6DAA+D,eAC1E,iBAAX,GAA6B,6BAClB,UAAXD,GAAsB,YACXiB,SAAX,GAAqB,6BAMjC,iBAaO,SAAS,AAAWY,CAAS,EAClC,MAAkB,SAAX,EAAE,IAAI,CAAc,CAAC,cAAc,EAAE,EAAE,EAAE,CAAA,CAAE,CAAG,CAAC,YAAY,EAAE,EAAE,EAAE,CAAA,CAAE,AAC5E","ignoreList":[3]}
@@ -1,4 +1,4 @@
1
- module.exports=[72551,a=>{"use strict";var b=a.i(256857);let c={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};c.node;let d=(0,b.default)(c);a.s(["Search",0,d],72551)},694194,a=>{"use strict";let b=[{id:"claude-md",name:"CLAUDE.md",description:"AI agent instructions for Claude Code",defaultPath:"CLAUDE.md",category:"ai-agent",content:`# {{PROJECT_NAME}} — Agent Instructions
1
+ module.exports=[694194,a=>{"use strict";let b=[{id:"claude-md",name:"CLAUDE.md",description:"AI agent instructions for Claude Code",defaultPath:"CLAUDE.md",category:"ai-agent",content:`# {{PROJECT_NAME}} — Agent Instructions
2
2
 
3
3
  ## What this is
4
4
  {{DESCRIPTION}}
@@ -2106,4 +2106,4 @@ readinessProbe:
2106
2106
  <!-- Key takeaways to share with the wider team -->
2107
2107
  `}];a.s(["TEMPLATES",0,f],694194)}];
2108
2108
 
2109
- //# sourceMappingURL=_1wf14_u._.js.map
2109
+ //# sourceMappingURL=src_lib_templates_index_ts_1s61uk7._.js.map