commandmate 0.11.4 → 0.12.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 (591) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +395 -303
  3. package/.next/app-path-routes-manifest.json +31 -22
  4. package/.next/build-manifest.json +5 -5
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/react-loadable-manifest.json +8 -6
  7. package/.next/required-server-files.json +1 -1
  8. package/.next/routes-manifest.json +66 -0
  9. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  10. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/app/update-check/route.js +1 -1
  13. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/daily-summary/route.js +1 -1
  25. package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
  26. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/daily-summary/status/route.js +1 -1
  28. package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
  29. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  31. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  36. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
  40. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
  42. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/skills/[id]/route.js +1 -0
  52. package/.next/server/app/api/skills/[id]/route.js.nft.json +1 -0
  53. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -0
  54. package/.next/server/app/api/skills/route.js +1 -0
  55. package/.next/server/app/api/skills/route.js.nft.json +1 -0
  56. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
  57. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/todos/route.js +1 -1
  61. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  65. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  67. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  70. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +1 -1
  72. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  75. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js.nft.json +1 -1
  76. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  77. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  78. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js.nft.json +1 -1
  79. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  80. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  81. package/.next/server/app/api/worktrees/[id]/git/branches/route.js.nft.json +1 -1
  82. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  84. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js.nft.json +1 -1
  85. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  87. package/.next/server/app/api/worktrees/[id]/git/commit/route.js.nft.json +1 -1
  88. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  90. package/.next/server/app/api/worktrees/[id]/git/diff/route.js.nft.json +1 -1
  91. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  93. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js.nft.json +1 -1
  94. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  96. package/.next/server/app/api/worktrees/[id]/git/log/route.js.nft.json +1 -1
  97. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  99. package/.next/server/app/api/worktrees/[id]/git/pull/route.js.nft.json +1 -1
  100. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  102. package/.next/server/app/api/worktrees/[id]/git/push/route.js.nft.json +1 -1
  103. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  105. package/.next/server/app/api/worktrees/[id]/git/reset/route.js.nft.json +1 -1
  106. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/git/revert/route.js.nft.json +1 -1
  109. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js.nft.json +1 -1
  112. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/git/stage/route.js.nft.json +1 -1
  115. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/git/staged/route.js.nft.json +1 -1
  118. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js.nft.json +1 -1
  121. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js.nft.json +1 -1
  124. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js.nft.json +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js.nft.json +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/stash/route.js.nft.json +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/status/route.js.nft.json +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js.nft.json +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js.nft.json +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  161. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/schedules/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  171. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js +1 -0
  173. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route.js.nft.json +1 -0
  174. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -0
  175. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js +1 -0
  176. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route.js.nft.json +1 -0
  177. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -0
  178. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js +1 -0
  179. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.js.nft.json +1 -0
  180. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -0
  181. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js +1 -0
  182. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.js.nft.json +1 -0
  183. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -0
  184. package/.next/server/app/api/worktrees/[id]/skills/route.js +23 -0
  185. package/.next/server/app/api/worktrees/[id]/skills/route.js.nft.json +1 -0
  186. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -0
  187. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  192. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  206. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/chat/page.js +2 -2
  208. package/.next/server/app/chat/page.js.nft.json +1 -1
  209. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  210. package/.next/server/app/login/page.js.nft.json +1 -1
  211. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  212. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/more/page.js +2 -2
  214. package/.next/server/app/more/page.js.nft.json +1 -1
  215. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  216. package/.next/server/app/offline/page.js.nft.json +1 -1
  217. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  218. package/.next/server/app/page.js +1 -1
  219. package/.next/server/app/page.js.nft.json +1 -1
  220. package/.next/server/app/page_client-reference-manifest.js +1 -1
  221. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  222. package/.next/server/app/repositories/page.js +1 -1
  223. package/.next/server/app/repositories/page.js.nft.json +1 -1
  224. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  225. package/.next/server/app/review/page.js +1 -1
  226. package/.next/server/app/review/page.js.nft.json +1 -1
  227. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  228. package/.next/server/app/sessions/page.js +1 -1
  229. package/.next/server/app/sessions/page.js.nft.json +1 -1
  230. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  231. package/.next/server/app/skills/[skillId]/page.js +2 -0
  232. package/.next/server/app/skills/[skillId]/page.js.nft.json +1 -0
  233. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -0
  234. package/.next/server/app/skills/page.js +2 -0
  235. package/.next/server/app/skills/page.js.nft.json +1 -0
  236. package/.next/server/app/skills/page_client-reference-manifest.js +1 -0
  237. package/.next/server/app/worktrees/[id]/files/[...path]/page.js +2 -2
  238. package/.next/server/app/worktrees/[id]/files/[...path]/page.js.nft.json +1 -1
  239. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  240. package/.next/server/app/worktrees/[id]/page.js +9 -9
  241. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  242. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  243. package/.next/server/app/worktrees/[id]/terminal/page.js +3 -3
  244. package/.next/server/app/worktrees/[id]/terminal/page.js.nft.json +1 -1
  245. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  246. package/.next/server/app-paths-manifest.json +31 -22
  247. package/.next/server/chunks/1117.js +1 -1
  248. package/.next/server/chunks/120.js +1 -0
  249. package/.next/server/chunks/1808.js +1 -0
  250. package/.next/server/chunks/186.js +1 -0
  251. package/.next/server/chunks/2119.js +1 -1
  252. package/.next/server/chunks/22.js +1 -0
  253. package/.next/server/chunks/2328.js +1 -0
  254. package/.next/server/chunks/2445.js +1 -1
  255. package/.next/server/chunks/3042.js +2 -0
  256. package/.next/server/chunks/3543.js +1 -1
  257. package/.next/server/chunks/3708.js +1 -0
  258. package/.next/server/chunks/3945.js +1 -1
  259. package/.next/server/chunks/5064.js +1 -0
  260. package/.next/server/chunks/5226.js +28 -0
  261. package/.next/server/chunks/5306.js +2 -0
  262. package/.next/server/chunks/5312.js +1 -0
  263. package/.next/server/chunks/5326.js +1 -0
  264. package/.next/server/chunks/5381.js +1 -1
  265. package/.next/server/chunks/5456.js +1 -0
  266. package/.next/server/chunks/5571.js +1 -1
  267. package/.next/server/chunks/5959.js +2 -2
  268. package/.next/server/chunks/6065.js +1 -0
  269. package/.next/server/chunks/6130.js +1 -0
  270. package/.next/server/chunks/6285.js +1 -1
  271. package/.next/server/chunks/646.js +6 -6
  272. package/.next/server/chunks/{9968.js → 7587.js} +1 -1
  273. package/.next/server/chunks/8584.js +1 -0
  274. package/.next/server/chunks/8681.js +1 -1
  275. package/.next/server/chunks/8807.js +950 -804
  276. package/.next/server/chunks/9123.js +1 -1
  277. package/.next/server/middleware-build-manifest.js +1 -1
  278. package/.next/server/middleware-manifest.json +5 -5
  279. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  280. package/.next/server/pages/500.html +1 -1
  281. package/.next/server/server-reference-manifest.json +1 -1
  282. package/.next/static/D-aoE4gWfuCUN0GqEPIX3/_buildManifest.js +1 -0
  283. package/.next/static/chunks/1668-7484081c45a44f89.js +1 -0
  284. package/.next/static/chunks/3418-7e47651340d940b0.js +1 -0
  285. package/.next/static/chunks/4027-0c529b322be7d4d8.js +1 -0
  286. package/.next/static/chunks/{4560-64b1461fd996127a.js → 4560-04e5aebcab96bfa1.js} +1 -1
  287. package/.next/static/chunks/6007-de36119357dcd418.js +1 -0
  288. package/.next/static/chunks/{6488-76295bf0184b101f.js → 6488-e257111ca7389d05.js} +1 -1
  289. package/.next/static/chunks/{8965-872d8de254196cec.js → 6497-dc26c6c6b0b15adf.js} +1 -1
  290. package/.next/static/chunks/790-d8e6acd26e03679c.js +1 -0
  291. package/.next/static/chunks/8361.4bf062be2d2962f4.js +1 -0
  292. package/.next/static/chunks/app/api/app/update/route-56dad0523d3c4a92.js +1 -0
  293. package/.next/static/chunks/app/api/app/update-check/route-56dad0523d3c4a92.js +1 -0
  294. package/.next/static/chunks/app/api/assistant/conversation/route-56dad0523d3c4a92.js +1 -0
  295. package/.next/static/chunks/app/api/assistant/current-output/route-56dad0523d3c4a92.js +1 -0
  296. package/.next/static/chunks/app/api/assistant/messages/route-56dad0523d3c4a92.js +1 -0
  297. package/.next/static/chunks/app/api/assistant/session/route-56dad0523d3c4a92.js +1 -0
  298. package/.next/static/chunks/app/api/assistant/start/route-56dad0523d3c4a92.js +1 -0
  299. package/.next/static/chunks/app/api/assistant/terminal/route-56dad0523d3c4a92.js +1 -0
  300. package/.next/static/chunks/app/api/assistant/tools/route-56dad0523d3c4a92.js +1 -0
  301. package/.next/static/chunks/app/api/auth/login/route-56dad0523d3c4a92.js +1 -0
  302. package/.next/static/chunks/app/api/auth/logout/route-56dad0523d3c4a92.js +1 -0
  303. package/.next/static/chunks/app/api/auth/status/route-56dad0523d3c4a92.js +1 -0
  304. package/.next/static/chunks/app/api/daily-summary/route-56dad0523d3c4a92.js +1 -0
  305. package/.next/static/chunks/app/api/daily-summary/status/route-56dad0523d3c4a92.js +1 -0
  306. package/.next/static/chunks/app/api/external-apps/[id]/health/route-56dad0523d3c4a92.js +1 -0
  307. package/.next/static/chunks/app/api/external-apps/[id]/route-56dad0523d3c4a92.js +1 -0
  308. package/.next/static/chunks/app/api/external-apps/route-56dad0523d3c4a92.js +1 -0
  309. package/.next/static/chunks/app/api/hooks/claude-done/route-56dad0523d3c4a92.js +1 -0
  310. package/.next/static/chunks/app/api/ollama/models/route-56dad0523d3c4a92.js +1 -0
  311. package/.next/static/chunks/app/api/push/subscriptions/route-56dad0523d3c4a92.js +1 -0
  312. package/.next/static/chunks/app/api/push/vapid/route-56dad0523d3c4a92.js +1 -0
  313. package/.next/static/chunks/app/api/repositories/[id]/route-56dad0523d3c4a92.js +1 -0
  314. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +1 -0
  315. package/.next/static/chunks/app/api/repositories/[id]/todos/route-56dad0523d3c4a92.js +1 -0
  316. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-56dad0523d3c4a92.js +1 -0
  317. package/.next/static/chunks/app/api/repositories/clone/route-56dad0523d3c4a92.js +1 -0
  318. package/.next/static/chunks/app/api/repositories/excluded/route-56dad0523d3c4a92.js +1 -0
  319. package/.next/static/chunks/app/api/repositories/restore/route-56dad0523d3c4a92.js +1 -0
  320. package/.next/static/chunks/app/api/repositories/route-56dad0523d3c4a92.js +1 -0
  321. package/.next/static/chunks/app/api/repositories/scan/route-56dad0523d3c4a92.js +1 -0
  322. package/.next/static/chunks/app/api/repositories/sync/route-56dad0523d3c4a92.js +1 -0
  323. package/.next/static/chunks/app/api/sidebar/group-order/route-56dad0523d3c4a92.js +1 -0
  324. package/.next/static/chunks/app/api/skills/[id]/route-56dad0523d3c4a92.js +1 -0
  325. package/.next/static/chunks/app/api/skills/route-56dad0523d3c4a92.js +1 -0
  326. package/.next/static/chunks/app/api/slash-commands/route-56dad0523d3c4a92.js +1 -0
  327. package/.next/static/chunks/app/api/templates/[id]/route-56dad0523d3c4a92.js +1 -0
  328. package/.next/static/chunks/app/api/templates/route-56dad0523d3c4a92.js +1 -0
  329. package/.next/static/chunks/app/api/todos/route-56dad0523d3c4a92.js +1 -0
  330. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-56dad0523d3c4a92.js +1 -0
  331. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-56dad0523d3c4a92.js +1 -0
  332. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-56dad0523d3c4a92.js +1 -0
  333. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-56dad0523d3c4a92.js +1 -0
  334. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-56dad0523d3c4a92.js +1 -0
  335. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-56dad0523d3c4a92.js +1 -0
  336. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-56dad0523d3c4a92.js +1 -0
  337. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-56dad0523d3c4a92.js +1 -0
  338. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-56dad0523d3c4a92.js +1 -0
  339. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-56dad0523d3c4a92.js +1 -0
  340. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-56dad0523d3c4a92.js +1 -0
  341. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-56dad0523d3c4a92.js +1 -0
  342. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-56dad0523d3c4a92.js +1 -0
  343. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-56dad0523d3c4a92.js +1 -0
  344. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-56dad0523d3c4a92.js +1 -0
  345. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-56dad0523d3c4a92.js +1 -0
  346. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-56dad0523d3c4a92.js +1 -0
  347. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-56dad0523d3c4a92.js +1 -0
  348. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-56dad0523d3c4a92.js +1 -0
  349. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-56dad0523d3c4a92.js +1 -0
  350. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-56dad0523d3c4a92.js +1 -0
  351. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-56dad0523d3c4a92.js +1 -0
  352. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-56dad0523d3c4a92.js +1 -0
  353. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-56dad0523d3c4a92.js +1 -0
  354. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-56dad0523d3c4a92.js +1 -0
  355. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-56dad0523d3c4a92.js +1 -0
  356. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-56dad0523d3c4a92.js +1 -0
  357. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-56dad0523d3c4a92.js +1 -0
  358. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-56dad0523d3c4a92.js +1 -0
  359. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-56dad0523d3c4a92.js +1 -0
  360. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-56dad0523d3c4a92.js +1 -0
  361. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-56dad0523d3c4a92.js +1 -0
  362. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-56dad0523d3c4a92.js +1 -0
  363. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-56dad0523d3c4a92.js +1 -0
  364. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-56dad0523d3c4a92.js +1 -0
  365. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-56dad0523d3c4a92.js +1 -0
  366. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-56dad0523d3c4a92.js +1 -0
  367. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-56dad0523d3c4a92.js +1 -0
  368. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-56dad0523d3c4a92.js +1 -0
  369. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-56dad0523d3c4a92.js +1 -0
  370. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-56dad0523d3c4a92.js +1 -0
  371. package/.next/static/chunks/app/api/worktrees/[id]/route-56dad0523d3c4a92.js +1 -0
  372. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-56dad0523d3c4a92.js +1 -0
  373. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-56dad0523d3c4a92.js +1 -0
  374. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-56dad0523d3c4a92.js +1 -0
  375. package/.next/static/chunks/app/api/worktrees/[id]/search/route-56dad0523d3c4a92.js +1 -0
  376. package/.next/static/chunks/app/api/worktrees/[id]/send/route-56dad0523d3c4a92.js +1 -0
  377. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-56dad0523d3c4a92.js +1 -0
  378. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-56dad0523d3c4a92.js +1 -0
  379. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-56dad0523d3c4a92.js +1 -0
  380. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-56dad0523d3c4a92.js +1 -0
  381. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-56dad0523d3c4a92.js +1 -0
  382. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-56dad0523d3c4a92.js +1 -0
  383. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-56dad0523d3c4a92.js +1 -0
  384. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-56dad0523d3c4a92.js +1 -0
  385. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-56dad0523d3c4a92.js +1 -0
  386. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-56dad0523d3c4a92.js +1 -0
  387. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-56dad0523d3c4a92.js +1 -0
  388. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-56dad0523d3c4a92.js +1 -0
  389. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-56dad0523d3c4a92.js +1 -0
  390. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-56dad0523d3c4a92.js +1 -0
  391. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-56dad0523d3c4a92.js +1 -0
  392. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-56dad0523d3c4a92.js +1 -0
  393. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-56dad0523d3c4a92.js +1 -0
  394. package/.next/static/chunks/app/api/worktrees/route-56dad0523d3c4a92.js +1 -0
  395. package/.next/static/chunks/app/chat/{page-9ed2ffd98eb4ae18.js → page-9cf4ba62e21d9074.js} +1 -1
  396. package/.next/static/chunks/app/manifest.webmanifest/route-56dad0523d3c4a92.js +1 -0
  397. package/.next/static/chunks/app/more/{page-a496425bba427b48.js → page-082d4ae496f9a36e.js} +1 -1
  398. package/.next/static/chunks/app/{page-15bfd76bcf65842d.js → page-af457ca5876ed616.js} +1 -1
  399. package/.next/static/chunks/app/proxy/[...path]/route-56dad0523d3c4a92.js +1 -0
  400. package/.next/static/chunks/app/repositories/{page-d214522ab8792ce7.js → page-75f0d70452c6b6c0.js} +1 -1
  401. package/.next/static/chunks/app/review/{page-1dadf0b5d7129598.js → page-f431d630097c2e85.js} +1 -1
  402. package/.next/static/chunks/app/sessions/{page-96f007d986c5f327.js → page-20f07a99db64d2ca.js} +1 -1
  403. package/.next/static/chunks/app/skills/[skillId]/page-68ed5e9186efe56d.js +1 -0
  404. package/.next/static/chunks/app/skills/page-46242c428ee8bccf.js +1 -0
  405. package/.next/static/chunks/app/worktrees/[id]/page-bf811e793052c917.js +1 -0
  406. package/.next/static/chunks/app/worktrees/[id]/terminal/page-a75fe180a7233b2b.js +1 -0
  407. package/.next/static/chunks/webpack-0f9275e279c058eb.js +1 -0
  408. package/.next/static/css/b4bdb1f3457fe9a7.css +1 -0
  409. package/.next/trace +11 -10
  410. package/.next/types/app/api/skills/[id]/route.ts +347 -0
  411. package/.next/types/app/api/skills/route.ts +347 -0
  412. package/.next/types/app/api/worktrees/[id]/skills/[skillId]/install/route.ts +347 -0
  413. package/.next/types/app/api/worktrees/[id]/skills/[skillId]/plan/route.ts +347 -0
  414. package/.next/types/app/api/worktrees/[id]/skills/[skillId]/uninstall/route.ts +347 -0
  415. package/.next/types/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route.ts +347 -0
  416. package/.next/types/app/api/worktrees/[id]/skills/route.ts +347 -0
  417. package/.next/types/app/skills/[skillId]/page.ts +84 -0
  418. package/.next/types/app/skills/page.ts +84 -0
  419. package/.next/types/routes.d.ts +11 -2
  420. package/.next/types/validator.ts +81 -0
  421. package/dist/cli/commands/skill-format.d.ts +28 -0
  422. package/dist/cli/commands/skill-format.d.ts.map +1 -0
  423. package/dist/cli/commands/skill-format.js +163 -0
  424. package/dist/cli/commands/skill-guards.d.ts +53 -0
  425. package/dist/cli/commands/skill-guards.d.ts.map +1 -0
  426. package/dist/cli/commands/skill-guards.js +188 -0
  427. package/dist/cli/commands/skill.d.ts +24 -0
  428. package/dist/cli/commands/skill.d.ts.map +1 -0
  429. package/dist/cli/commands/skill.js +365 -0
  430. package/dist/cli/docs/agent-operations.d.ts +1 -1
  431. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  432. package/dist/cli/docs/agent-operations.js +36 -0
  433. package/dist/cli/program.d.ts.map +1 -1
  434. package/dist/cli/program.js +11 -0
  435. package/dist/cli/types/api-responses.d.ts +215 -0
  436. package/dist/cli/types/api-responses.d.ts.map +1 -1
  437. package/dist/cli/types/index.d.ts +60 -0
  438. package/dist/cli/types/index.d.ts.map +1 -1
  439. package/dist/cli/types/index.js +23 -1
  440. package/dist/cli/utils/api-client.d.ts +19 -1
  441. package/dist/cli/utils/api-client.d.ts.map +1 -1
  442. package/dist/cli/utils/api-client.js +41 -4
  443. package/dist/server/server.js +57 -0
  444. package/dist/server/src/config/activity-bar-config.js +2 -0
  445. package/dist/server/src/config/git-status-config.js +83 -0
  446. package/dist/server/src/config/skill-security-config.js +139 -0
  447. package/dist/server/src/lib/db/migrations/index.js +8 -0
  448. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  449. package/dist/server/src/lib/db/migrations/v44-skill-operations.js +81 -0
  450. package/dist/server/src/lib/db/migrations/v45-skill-installations.js +59 -0
  451. package/dist/server/src/lib/db/migrations/v46-skill-installations-cascade.js +107 -0
  452. package/dist/server/src/lib/db/migrations/v47-skill-installations-roots.js +70 -0
  453. package/dist/server/src/lib/db/worktree-db.js +9 -4
  454. package/dist/server/src/lib/git/git-errors.js +336 -0
  455. package/dist/server/src/lib/git/git-exec.js +285 -0
  456. package/dist/server/src/lib/skills/compatibility.js +194 -0
  457. package/dist/server/src/lib/skills/constants.js +252 -0
  458. package/dist/server/src/lib/skills/errors.js +82 -0
  459. package/dist/server/src/lib/skills/index.js +91 -0
  460. package/dist/server/src/lib/skills/install-apply.js +670 -0
  461. package/dist/server/src/lib/skills/install-plan.js +582 -0
  462. package/dist/server/src/lib/skills/installed-state.js +127 -0
  463. package/dist/server/src/lib/skills/integrity.js +225 -0
  464. package/dist/server/src/lib/skills/json-schema.js +365 -0
  465. package/dist/server/src/lib/skills/operation-audit.js +120 -0
  466. package/dist/server/src/lib/skills/operation-journal.js +286 -0
  467. package/dist/server/src/lib/skills/operation-lock.js +339 -0
  468. package/dist/server/src/lib/skills/operation-reconciler.js +107 -0
  469. package/dist/server/src/lib/skills/operation-store.js +153 -0
  470. package/dist/server/src/lib/skills/package-reader.js +495 -0
  471. package/dist/server/src/lib/skills/package-validator.js +451 -0
  472. package/dist/server/src/lib/skills/preview-diff.js +627 -0
  473. package/dist/server/src/lib/skills/safe-yaml.js +593 -0
  474. package/dist/server/src/lib/skills/schema.js +1248 -0
  475. package/dist/server/src/lib/skills/semver.js +193 -0
  476. package/dist/server/src/lib/skills/snapshot-store.js +334 -0
  477. package/dist/server/src/lib/skills/startup-reconcile.js +138 -0
  478. package/dist/server/src/lib/skills/uninstall-apply.js +495 -0
  479. package/dist/server/src/lib/skills/uninstall-plan.js +479 -0
  480. package/dist/server/src/types/skills.js +17 -0
  481. package/package.json +1 -1
  482. package/.next/server/chunks/129.js +0 -1
  483. package/.next/server/chunks/2478.js +0 -1
  484. package/.next/server/chunks/9886.js +0 -1
  485. package/.next/static/0_lnKsT0DH-MnHhnV5n-l/_buildManifest.js +0 -1
  486. package/.next/static/chunks/3165-87bf884f7f3d15cf.js +0 -1
  487. package/.next/static/chunks/6416.6756b7ad06dd96f7.js +0 -1
  488. package/.next/static/chunks/8676.57260a06f6554e7e.js +0 -1
  489. package/.next/static/chunks/app/api/app/update/route-7536041a7a89616d.js +0 -1
  490. package/.next/static/chunks/app/api/app/update-check/route-7536041a7a89616d.js +0 -1
  491. package/.next/static/chunks/app/api/assistant/conversation/route-7536041a7a89616d.js +0 -1
  492. package/.next/static/chunks/app/api/assistant/current-output/route-7536041a7a89616d.js +0 -1
  493. package/.next/static/chunks/app/api/assistant/messages/route-7536041a7a89616d.js +0 -1
  494. package/.next/static/chunks/app/api/assistant/session/route-7536041a7a89616d.js +0 -1
  495. package/.next/static/chunks/app/api/assistant/start/route-7536041a7a89616d.js +0 -1
  496. package/.next/static/chunks/app/api/assistant/terminal/route-7536041a7a89616d.js +0 -1
  497. package/.next/static/chunks/app/api/assistant/tools/route-7536041a7a89616d.js +0 -1
  498. package/.next/static/chunks/app/api/auth/login/route-7536041a7a89616d.js +0 -1
  499. package/.next/static/chunks/app/api/auth/logout/route-7536041a7a89616d.js +0 -1
  500. package/.next/static/chunks/app/api/auth/status/route-7536041a7a89616d.js +0 -1
  501. package/.next/static/chunks/app/api/daily-summary/route-7536041a7a89616d.js +0 -1
  502. package/.next/static/chunks/app/api/daily-summary/status/route-7536041a7a89616d.js +0 -1
  503. package/.next/static/chunks/app/api/external-apps/[id]/health/route-7536041a7a89616d.js +0 -1
  504. package/.next/static/chunks/app/api/external-apps/[id]/route-7536041a7a89616d.js +0 -1
  505. package/.next/static/chunks/app/api/external-apps/route-7536041a7a89616d.js +0 -1
  506. package/.next/static/chunks/app/api/hooks/claude-done/route-7536041a7a89616d.js +0 -1
  507. package/.next/static/chunks/app/api/ollama/models/route-7536041a7a89616d.js +0 -1
  508. package/.next/static/chunks/app/api/push/subscriptions/route-7536041a7a89616d.js +0 -1
  509. package/.next/static/chunks/app/api/push/vapid/route-7536041a7a89616d.js +0 -1
  510. package/.next/static/chunks/app/api/repositories/[id]/route-7536041a7a89616d.js +0 -1
  511. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-7536041a7a89616d.js +0 -1
  512. package/.next/static/chunks/app/api/repositories/[id]/todos/route-7536041a7a89616d.js +0 -1
  513. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-7536041a7a89616d.js +0 -1
  514. package/.next/static/chunks/app/api/repositories/clone/route-7536041a7a89616d.js +0 -1
  515. package/.next/static/chunks/app/api/repositories/excluded/route-7536041a7a89616d.js +0 -1
  516. package/.next/static/chunks/app/api/repositories/restore/route-7536041a7a89616d.js +0 -1
  517. package/.next/static/chunks/app/api/repositories/route-7536041a7a89616d.js +0 -1
  518. package/.next/static/chunks/app/api/repositories/scan/route-7536041a7a89616d.js +0 -1
  519. package/.next/static/chunks/app/api/repositories/sync/route-7536041a7a89616d.js +0 -1
  520. package/.next/static/chunks/app/api/sidebar/group-order/route-7536041a7a89616d.js +0 -1
  521. package/.next/static/chunks/app/api/slash-commands/route-7536041a7a89616d.js +0 -1
  522. package/.next/static/chunks/app/api/templates/[id]/route-7536041a7a89616d.js +0 -1
  523. package/.next/static/chunks/app/api/templates/route-7536041a7a89616d.js +0 -1
  524. package/.next/static/chunks/app/api/todos/route-7536041a7a89616d.js +0 -1
  525. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-7536041a7a89616d.js +0 -1
  526. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-7536041a7a89616d.js +0 -1
  527. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-7536041a7a89616d.js +0 -1
  528. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-7536041a7a89616d.js +0 -1
  529. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-7536041a7a89616d.js +0 -1
  530. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-7536041a7a89616d.js +0 -1
  531. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-7536041a7a89616d.js +0 -1
  532. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-7536041a7a89616d.js +0 -1
  533. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-7536041a7a89616d.js +0 -1
  534. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-7536041a7a89616d.js +0 -1
  535. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-7536041a7a89616d.js +0 -1
  536. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-7536041a7a89616d.js +0 -1
  537. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-7536041a7a89616d.js +0 -1
  538. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-7536041a7a89616d.js +0 -1
  539. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-7536041a7a89616d.js +0 -1
  540. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-7536041a7a89616d.js +0 -1
  541. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-7536041a7a89616d.js +0 -1
  542. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-7536041a7a89616d.js +0 -1
  543. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-7536041a7a89616d.js +0 -1
  544. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-7536041a7a89616d.js +0 -1
  545. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-7536041a7a89616d.js +0 -1
  546. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-7536041a7a89616d.js +0 -1
  547. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-7536041a7a89616d.js +0 -1
  548. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-7536041a7a89616d.js +0 -1
  549. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-7536041a7a89616d.js +0 -1
  550. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-7536041a7a89616d.js +0 -1
  551. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-7536041a7a89616d.js +0 -1
  552. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-7536041a7a89616d.js +0 -1
  553. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-7536041a7a89616d.js +0 -1
  554. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-7536041a7a89616d.js +0 -1
  555. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-7536041a7a89616d.js +0 -1
  556. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-7536041a7a89616d.js +0 -1
  557. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-7536041a7a89616d.js +0 -1
  558. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-7536041a7a89616d.js +0 -1
  559. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-7536041a7a89616d.js +0 -1
  560. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-7536041a7a89616d.js +0 -1
  561. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-7536041a7a89616d.js +0 -1
  562. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-7536041a7a89616d.js +0 -1
  563. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-7536041a7a89616d.js +0 -1
  564. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-7536041a7a89616d.js +0 -1
  565. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-7536041a7a89616d.js +0 -1
  566. package/.next/static/chunks/app/api/worktrees/[id]/route-7536041a7a89616d.js +0 -1
  567. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-7536041a7a89616d.js +0 -1
  568. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-7536041a7a89616d.js +0 -1
  569. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-7536041a7a89616d.js +0 -1
  570. package/.next/static/chunks/app/api/worktrees/[id]/search/route-7536041a7a89616d.js +0 -1
  571. package/.next/static/chunks/app/api/worktrees/[id]/send/route-7536041a7a89616d.js +0 -1
  572. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-7536041a7a89616d.js +0 -1
  573. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-7536041a7a89616d.js +0 -1
  574. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-7536041a7a89616d.js +0 -1
  575. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-7536041a7a89616d.js +0 -1
  576. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-7536041a7a89616d.js +0 -1
  577. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-7536041a7a89616d.js +0 -1
  578. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-7536041a7a89616d.js +0 -1
  579. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-7536041a7a89616d.js +0 -1
  580. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-7536041a7a89616d.js +0 -1
  581. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-7536041a7a89616d.js +0 -1
  582. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-7536041a7a89616d.js +0 -1
  583. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-7536041a7a89616d.js +0 -1
  584. package/.next/static/chunks/app/api/worktrees/route-7536041a7a89616d.js +0 -1
  585. package/.next/static/chunks/app/manifest.webmanifest/route-7536041a7a89616d.js +0 -1
  586. package/.next/static/chunks/app/proxy/[...path]/route-7536041a7a89616d.js +0 -1
  587. package/.next/static/chunks/app/worktrees/[id]/page-9a4ce51e697baac6.js +0 -1
  588. package/.next/static/chunks/app/worktrees/[id]/terminal/page-ed4590b024edd8d6.js +0 -1
  589. package/.next/static/chunks/webpack-2e3739a831868daa.js +0 -1
  590. package/.next/static/css/d7e2e8d1b8d69d36.css +0 -1
  591. /package/.next/static/{0_lnKsT0DH-MnHhnV5n-l → D-aoE4gWfuCUN0GqEPIX3}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8975],{46892:(e,t,a)=>{"use strict";a.d(t,{PL:()=>s,sb:()=>n});let r={idle:"bg-muted-foreground",ready:"bg-success",spinner:"border-info",waiting:"bg-warning"},s={idle:{className:r.idle,labelKey:"status.idle",type:"dot"},ready:{className:r.ready,labelKey:"status.ready",type:"dot"},running:{className:r.spinner,labelKey:"status.running",type:"spinner"},waiting:{className:r.waiting,labelKey:"status.waiting",type:"dot"},generating:{className:r.spinner,labelKey:"status.generating",type:"spinner"}},n={idle:"detailStatus.idle",ready:"detailStatus.ready",running:"detailStatus.running",waiting:"detailStatus.waiting"}},60322:(e,t,a)=>{"use strict";a.d(t,{l:()=>s});let r=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;async function s(e){var t;if(!e||0===e.trim().length)return;let a=e.replace(r,"");if(null==(t=navigator.clipboard)?void 0:t.writeText)try{await navigator.clipboard.writeText(a);return}catch(e){}let s=document.createElement("textarea");s.value=a,s.style.position="fixed",s.style.left="-9999px",s.style.top="-9999px",s.style.opacity="0",document.body.appendChild(s),s.focus(),s.select();try{document.execCommand("copy")}finally{document.body.removeChild(s)}}},60426:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>z});var r=a(95155),s=a(12115),n=a(18955),l=a(4560),i=a(744),d=a(52619),o=a.n(d),c=a(87531);let m=["claude","codex","copilot","antigravity"];var u=a(63001),p=a(55142),x=a(54014),g=a(46892);let h={in_review:"status.inReview",approval:"status.approval",stalled:"status.stalled"},f=["in_review","approval","stalled"],v={in_review:e=>"in_review"===e.status,approval:e=>!0===e.isWaitingForResponse,stalled:e=>!0===e.isStalled};function b(e){let{status:t,label:a}=e,s=(0,n.c)("common"),l=g.PL[t],i="".concat(a,": ").concat(s(l.labelKey)),d="w-2.5 h-2.5 rounded-full flex-shrink-0";return"spinner"===l.type?(0,r.jsx)("span",{className:"".concat(d," border-2 border-t-transparent animate-spin ").concat(l.className),title:i}):(0,r.jsx)("span",{className:"".concat(d," ").concat(l.className),title:i})}function y(){let e=(0,n.c)("review"),[t,a]=(0,s.useState)([]),[l,d]=(0,s.useState)(!0),[m,g]=(0,s.useState)("in_review"),y=(0,s.useRef)(null),j=(0,s.useCallback)(async()=>{try{let t=await fetch("/api/worktrees?include=review");if(t.ok){var e;let r=await t.json();a(null!=(e=r.worktrees)?e:[])}}catch(e){}finally{d(!1)}},[]);(0,s.useEffect)(()=>(j(),y.current=setInterval(j,7e3),()=>{y.current&&clearInterval(y.current)}),[j]);let w=(0,s.useMemo)(()=>t.filter(v[m]),[t,m]),N=(0,s.useMemo)(()=>({in_review:t.filter(v.in_review).length,approval:t.filter(v.approval).length,stalled:t.filter(v.stalled).length}),[t]),S=(0,s.useMemo)(()=>{switch(m){case"in_review":return e("empty.inReview");case"approval":return e("empty.approval");case"stalled":return e("empty.stalled")}},[m,e]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-6 inline-flex items-center gap-1 rounded-lg bg-muted p-1",role:"group","aria-label":e("filters.ariaLabel"),"data-testid":"review-filters",children:f.map(t=>{let a=m===t;return(0,r.jsxs)("button",{type:"button","aria-pressed":a,onClick:()=>g(t),"data-testid":"review-filter-".concat(t),className:(0,c.cn)("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",a?"bg-accent-500/15 text-accent-700 dark:text-accent-300":"text-muted-foreground hover:text-foreground"),children:[e(h[t]),(0,r.jsx)("span",{className:(0,c.cn)("text-xs font-semibold tabular-nums",a?"text-accent-700 dark:text-accent-300":"text-muted-foreground"),children:N[t]})]},t)})}),l&&(0,r.jsx)("div",{className:"space-y-2","data-testid":"review-loading",role:"status","aria-label":e("filters.loading"),children:[0,1,2].map(e=>(0,r.jsx)(i.Zp,{padding:"md",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,r.jsx)(i.EA,{className:"h-4 w-40 max-w-full"}),(0,r.jsx)(i.EA,{className:"h-3 w-24 max-w-full"})]}),(0,r.jsx)(i.EA,{className:"ml-4 h-5 w-16 flex-shrink-0"})]})},e))}),!l&&(0,r.jsx)("div",{className:"space-y-2","data-testid":"review-list",children:0===w.length?(0,r.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"review-empty",children:S}):w.map(t=>{var a;let s=null!=(a=t.selectedAgents)?a:u.fJ;return(0,r.jsx)(o(),{href:"/worktrees/".concat(t.id),className:"block","data-testid":"review-item-".concat(t.id),children:(0,r.jsxs)(i.Zp,{padding:"md",className:"transition-colors ".concat(function(e){switch(e){case"in_review":return"border-info-border hover:border-info-border";case"approval":return"border-warning-border hover:border-warning-border";case"stalled":return"border-danger-border hover:border-danger-border"}}(m)),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),(0,r.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:t.repositoryName})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 ml-4 flex-shrink-0",children:[(0,r.jsx)("span",{className:"px-2 py-0.5 text-xs font-medium rounded ".concat(function(e){switch(e){case"in_review":return"bg-info-subtle text-info-foreground";case"approval":return"bg-warning-subtle text-warning-foreground";case"stalled":return"bg-danger-subtle text-danger-foreground"}}(m)),children:e(h[m])}),s.map(e=>{var a;let s=(0,p.kA)(null==(a=t.sessionStatusByCli)?void 0:a[e]);return(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(b,{status:s,label:(0,x.oo)(e)}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,x.oo)(e)})]},e)})]})]}),t.description&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 whitespace-pre-wrap",children:t.description})})]})},t.id)})})]})}function j(e){let t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(a,"-").concat(r)}function w(e){let{value:t,onChange:a}=e,s=(0,n.c)("review"),l=j(new Date),d=t===l;return(0,r.jsxs)("div",{className:"flex items-center gap-2","data-testid":"report-date-picker",children:[(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:()=>{let e=new Date(t+"T00:00:00");e.setDate(e.getDate()-1),a(j(e))},"data-testid":"date-prev","aria-label":s("datePicker.previousDay"),children:"<"}),(0,r.jsx)(i.pd,{type:"date",inputSize:"sm",value:t,max:l,onChange:e=>a(e.target.value),className:"w-auto","data-testid":"date-input"}),(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:()=>{if(d)return;let e=new Date(t+"T00:00:00");e.setDate(e.getDate()+1);let r=j(e);r>l||a(r)},disabled:d,"data-testid":"date-next","aria-label":s("datePicker.nextDay"),children:">"})]})}var N=a(36402),S=a(60322),k=a(9900);let C=[{value:"none",labelKey:"report.modes.none"},{value:"template",labelKey:"report.modes.template"},{value:"custom",labelKey:"report.modes.custom"}];function T(){let e=(0,n.c)("review"),t=(0,N.SC)(),[a,l]=(0,s.useState)(function(){let e=new Date,t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(a,"-").concat(r)}()),[d,o]=(0,s.useState)("claude"),[c,u]=(0,s.useState)(""),[p,x]=(0,s.useState)(null),[g,h]=(0,s.useState)(0),[f,v]=(0,s.useState)(""),[b,y]=(0,s.useState)(!1),[j,T]=(0,s.useState)(!1),[E,_]=(0,s.useState)(!1),[z,A]=(0,s.useState)(!1),[D,P]=(0,s.useState)(!1),[K,L]=(0,s.useState)(null),{mode:O,setMode:$,userInstruction:R,setUserInstruction:M,isUserInstructionReadOnly:I,templates:Z,selectedTemplateId:F,selectTemplate:J,isLoadingTemplates:U}=function(){let[e,t]=(0,s.useState)("none"),[a,r]=(0,s.useState)(""),[n,l]=(0,s.useState)([]),[i,d]=(0,s.useState)(null),[o,c]=(0,s.useState)(!1),m=(0,s.useCallback)(async()=>{c(!0);try{let e=await fetch("/api/templates");if(e.ok){let t=await e.json();l(t.templates||[])}}catch(e){}finally{c(!1)}},[]);(0,s.useEffect)(()=>{m()},[m]);let u=(0,s.useCallback)(e=>{t(e),r(""),d(null)},[]),p=(0,s.useCallback)(t=>{"custom"===e&&r(t)},[e]),x=(0,s.useCallback)(t=>{let a=n.find(e=>e.id===t);a&&"template"===e&&(d(t),r(a.content))},[n,e]);return{mode:e,setMode:u,userInstruction:a,setUserInstruction:p,isUserInstructionReadOnly:"template"===e,templates:n,selectedTemplateId:i,selectTemplate:x,isLoadingTemplates:o,refreshTemplates:m}}(),B=function(e){let[t,a]=(0,s.useState)({generating:!1}),r=(0,s.useRef)(null),n=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/daily-summary/status");if(e.ok){let t=await e.json();a(t)}}catch(e){}},[]);return(0,s.useEffect)(()=>e?(n(),r.current=setInterval(n,5e3),()=>{r.current&&(clearInterval(r.current),r.current=null)}):void a({generating:!1}),[e,n]),t}(!E),V=B.generating&&!E,q=(0,s.useCallback)(async t=>{T(!0),L(null);try{let a=await fetch("/api/daily-summary?date=".concat(t));if(!a.ok){let t=await a.json();L(t.error||e("report.errors.fetch"));return}let r=await a.json();x(r.report),h(r.messageCount),r.report?v(r.report.content):v(""),y(!1)}catch(t){L(e("report.errors.fetch"))}finally{T(!1)}},[e]);(0,s.useEffect)(()=>{q(a)},[a,q]);let[W,X]=(0,s.useState)(!1);(0,s.useEffect)(()=>{B.generating?X(!0):W&&(X(!1),q(a))},[B.generating,W,q,a]);let Y=async()=>{if(!p||await t({description:e("report.regenerateConfirm")})){_(!0),L(null);try{let t={date:a,tool:d};"copilot"===d&&c.trim()&&(t.model=c.trim()),"none"!==O&&R.trim()&&(t.userInstruction=R.trim());let r=await fetch("/api/daily-summary",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(429===r.status)return void L(e("report.errors.rateLimited"));if(!r.ok){let t=await r.json();L(t.error||e("report.errors.generate"));return}let s=await r.json();x(s.report),v(s.report.content),y(!1)}catch(t){L(e("report.errors.generate"))}finally{_(!1)}}},G=async()=>{if(!f.trim())return void L(e("report.errors.emptyContent"));A(!0),L(null);try{let t=await fetch("/api/daily-summary",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({date:a,content:f})});if(!t.ok){let a=await t.json();L(a.error||e("report.errors.save"));return}let r=await t.json();x(r.report),y(!1)}catch(t){L(e("report.errors.save"))}finally{A(!1)}};return(0,r.jsxs)("div",{"data-testid":"report-tab",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-4 mb-6",children:[(0,r.jsx)(w,{value:a,onChange:e=>{l(e)}}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-sm text-muted-foreground",children:e("report.toolLabel")}),(0,r.jsx)("select",{value:d,onChange:e=>o(e.target.value),className:"px-3 py-1 text-sm rounded border border-input bg-surface dark:bg-surface-2 text-surface-foreground","data-testid":"tool-selector",children:m.map(e=>(0,r.jsx)("option",{value:e,children:e},e))}),"copilot"===d&&(0,r.jsx)(i.pd,{type:"text",inputSize:"sm",placeholder:e("report.modelPlaceholder"),value:c,onChange:e=>u(e.target.value),className:"w-auto","data-testid":"model-input"})]})]}),(0,r.jsxs)("div",{className:"mb-4","data-testid":"generation-mode-selector",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-foreground mb-2 block",children:e("report.generationMode")}),(0,r.jsx)(i.z6,{value:O,onValueChange:e=>$(e),name:"generation-mode",className:"flex flex-row gap-4",children:C.map(t=>(0,r.jsxs)("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[(0,r.jsx)(i.CU,{value:t.value,"data-testid":"mode-radio-".concat(t.value)}),(0,r.jsx)("span",{className:"text-foreground",children:e(t.labelKey)})]},t.value))})]}),"template"===O&&(0,r.jsxs)("div",{className:"mb-4","data-testid":"template-selector",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-foreground mb-2 block",children:e("report.selectTemplate")}),U?(0,r.jsx)(i.EA,{className:"h-9 w-full","data-testid":"report-template-loading",role:"status","aria-label":e("report.loadingTemplates"),"aria-hidden":void 0}):0===Z.length?(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:e("report.noTemplates")}):(0,r.jsxs)("select",{value:F||"",onChange:e=>J(e.target.value),className:"px-3 py-1 text-sm rounded border border-input bg-surface dark:bg-surface-2 text-surface-foreground","data-testid":"template-select",children:[(0,r.jsx)("option",{value:"",children:e("report.templatePlaceholderOption")}),Z.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),"none"!==O&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(i.k_,{value:R,onChange:e=>M(e.target.value),rows:3,maxLength:1e3,readOnly:I,placeholder:"template"===O?e("report.instructionPlaceholderTemplate"):e("report.instructionPlaceholderCustom"),className:"resize-y ".concat(I?"bg-muted cursor-not-allowed":""),"data-testid":"user-instruction-input"})}),(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(i.$n,{variant:"primary",onClick:Y,disabled:E||V||0===g,"data-testid":"generate-button",children:E||V?e("report.generating"):e("report.generate")})}),(0,r.jsx)("div",{className:"mb-4 text-sm text-muted-foreground","data-testid":"message-count",children:j?(0,r.jsx)(i.EA,{className:"h-4 w-48"}):0===g?e("report.noMessages"):e("report.messagesFound",{count:g})}),K&&(0,r.jsx)("div",{className:"mb-4 p-3 bg-danger-subtle text-danger-foreground rounded-lg text-sm","data-testid":"report-error",children:K}),(E||V)&&(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-4 text-sm text-muted-foreground","data-testid":"generating-spinner",children:[(0,r.jsx)(i.y$,{size:"sm",variant:"muted"}),V&&B.tool?B.startedAt?e("report.generatingRemoteWithTime",{tool:B.tool,seconds:Math.round((Date.now()-new Date(B.startedAt).getTime())/1e3)}):e("report.generatingRemote",{tool:B.tool}):e("report.generatingSummary")]}),!j&&p&&(0,r.jsxs)(i.Zp,{"data-testid":"report-content",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsxs)("div",{className:"text-xs text-muted-foreground",children:[e("report.generatedBy",{tool:p.generatedByTool}),p.model&&" (".concat(p.model,")")]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:async()=>{await (0,S.l)(p.content),P(!0),setTimeout(()=>P(!1),k.pX)},"data-testid":"copy-report-button",children:D?e("report.copied"):e("report.copy")}),(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:()=>{b?G():y(!0)},disabled:z,"data-testid":"edit-save-button",children:z?e("report.saving"):b?e("report.save"):e("report.edit")})]})]}),b?(0,r.jsx)(i.k_,{value:f,onChange:e=>v(e.target.value),className:"h-64 p-3 font-mono","data-testid":"report-editor"}):(0,r.jsx)("div",{className:"prose dark:prose-invert max-w-none text-sm whitespace-pre-wrap","data-testid":"report-preview",children:p.content})]})]})}function E(){let e=(0,n.c)("review"),t=(0,N.SC)(),[a,l]=(0,s.useState)([]),[d,o]=(0,s.useState)(!1),[c,m]=(0,s.useState)(null),[u,p]=(0,s.useState)(""),[x,g]=(0,s.useState)(""),[h,f]=(0,s.useState)(!1),[v,b]=(0,s.useState)(null),[y,j]=(0,s.useState)(""),[w,S]=(0,s.useState)(""),[k,C]=(0,s.useState)(!1),T=(0,s.useCallback)(async()=>{o(!0),m(null);try{let t=await fetch("/api/templates");if(!t.ok){let a=await t.json();m(a.error||e("template.errors.fetch"));return}let a=await t.json();l(a.templates||[])}catch(t){m(e("template.errors.fetch"))}finally{o(!1)}},[e]);(0,s.useEffect)(()=>{T()},[T]);let E=async()=>{if(!u.trim()||!x.trim())return void m(e("template.errors.nameAndContentRequired"));f(!0),m(null);try{let t=await fetch("/api/templates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:u.trim(),content:x.trim()})});if(!t.ok){let a=await t.json();m(a.error||e("template.errors.create"));return}p(""),g(""),await T()}catch(t){m(e("template.errors.create"))}finally{f(!1)}},_=async()=>{if(!v||!y.trim()||!w.trim())return void m(e("template.errors.nameAndContentRequired"));C(!0),m(null);try{let t=await fetch("/api/templates/".concat(v),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:y.trim(),content:w.trim()})});if(!t.ok){let a=await t.json();m(a.error||e("template.errors.update"));return}b(null),await T()}catch(t){m(e("template.errors.update"))}finally{C(!1)}},z=async a=>{if(await t({description:e("template.deleteConfirm"),variant:"danger"})){m(null);try{let t=await fetch("/api/templates/".concat(a),{method:"DELETE"});if(!t.ok){let a=await t.json();m(a.error||e("template.errors.delete"));return}await T()}catch(t){m(e("template.errors.delete"))}}},A=()=>{b(null),j(""),S("")};return(0,r.jsxs)("div",{"data-testid":"template-tab",children:[c&&(0,r.jsx)("div",{className:"mb-4 p-3 bg-danger-subtle text-danger-foreground rounded-lg text-sm","data-testid":"template-error",children:c}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-foreground mb-3",children:e("template.heading",{count:a.length,max:5})}),d?(0,r.jsx)("div",{className:"space-y-3","data-testid":"template-loading",role:"status","aria-label":e("template.loading"),children:[0,1].map(e=>(0,r.jsx)(i.Zp,{padding:"md",children:(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(i.EA,{className:"h-4 w-32"}),(0,r.jsx)(i.EA,{className:"h-3 w-full"}),(0,r.jsx)(i.EA,{className:"h-3 w-2/3"})]})},e))}):0===a.length?(0,r.jsx)("div",{className:"text-sm text-muted-foreground","data-testid":"template-empty",children:e("template.empty")}):(0,r.jsx)("div",{className:"space-y-3","data-testid":"template-list",children:a.map(t=>(0,r.jsx)(i.Zp,{padding:"sm","data-testid":"template-item-".concat(t.id),children:v===t.id?(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(i.pd,{type:"text",inputSize:"sm",value:y,onChange:e=>j(e.target.value),maxLength:100,"data-testid":"edit-name-input"}),(0,r.jsx)(i.k_,{value:w,onChange:e=>S(e.target.value),maxLength:1e3,rows:3,className:"resize-y","data-testid":"edit-content-input"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{variant:"primary",size:"sm",onClick:_,disabled:k,"data-testid":"edit-save-button",children:k?e("template.saving"):e("template.save")}),(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:A,"data-testid":"edit-cancel-button",children:e("template.cancel")})]})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,r.jsx)("span",{className:"font-medium text-sm text-foreground","data-testid":"template-name",children:t.name}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:()=>{b(t.id),j(t.name),S(t.content)},"data-testid":"edit-button-".concat(t.id),children:e("template.edit")}),(0,r.jsx)(i.$n,{variant:"danger",size:"sm",onClick:()=>z(t.id),"data-testid":"delete-button-".concat(t.id),children:e("template.delete")})]})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground whitespace-pre-wrap","data-testid":"template-content",children:t.content})]})},t.id))})]}),a.length<5&&(0,r.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg shadow-sm","data-testid":"create-form",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-3",children:e("template.newHeading")}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)(i.pd,{type:"text",value:u,onChange:e=>p(e.target.value),maxLength:100,placeholder:e("template.namePlaceholder"),"data-testid":"new-name-input"}),(0,r.jsx)(i.k_,{value:x,onChange:e=>g(e.target.value),maxLength:1e3,rows:3,placeholder:e("template.contentPlaceholder"),className:"resize-y","data-testid":"new-content-input"}),(0,r.jsx)(i.$n,{variant:"primary",onClick:E,disabled:h||!u.trim()||!x.trim(),"data-testid":"create-button",children:h?e("template.creating"):e("template.create")})]})]})]})}let _=[{value:"review",labelKey:"tabs.review"},{value:"report",labelKey:"tabs.report"},{value:"template",labelKey:"tabs.template"}];function z(){let e=(0,n.c)("review"),[t,a]=(0,s.useState)("review");return(0,r.jsx)(l.GV,{children:(0,r.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:e("page.title")}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:e("page.description")})]}),(0,r.jsxs)(i.tU,{value:t,onValueChange:e=>a(e),children:[(0,r.jsx)(i.j7,{className:"mb-6 w-full justify-start","data-testid":"page-tabs",children:_.map(t=>(0,r.jsx)(i.Xi,{value:t.value,"data-testid":"page-tab-".concat(t.value),children:e(t.labelKey)},t.value))}),(0,r.jsx)(i.av,{value:"review",children:(0,r.jsx)(y,{})}),(0,r.jsx)(i.av,{value:"report",children:(0,r.jsx)(T,{})}),(0,r.jsx)(i.av,{value:"template",children:(0,r.jsx)(E,{})})]})]})})}},80488:(e,t,a)=>{Promise.resolve().then(a.bind(a,60426))}},e=>{e.O(0,[6809,4909,2770,3165,4974,6402,744,6488,4560,8441,1255,7358],()=>e(e.s=80488)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8975],{46892:(e,t,a)=>{"use strict";a.d(t,{PL:()=>s,sb:()=>n});let r={idle:"bg-muted-foreground",ready:"bg-success",spinner:"border-info",waiting:"bg-warning"},s={idle:{className:r.idle,labelKey:"status.idle",type:"dot"},ready:{className:r.ready,labelKey:"status.ready",type:"dot"},running:{className:r.spinner,labelKey:"status.running",type:"spinner"},waiting:{className:r.waiting,labelKey:"status.waiting",type:"dot"},generating:{className:r.spinner,labelKey:"status.generating",type:"spinner"}},n={idle:"detailStatus.idle",ready:"detailStatus.ready",running:"detailStatus.running",waiting:"detailStatus.waiting"}},60322:(e,t,a)=>{"use strict";a.d(t,{l:()=>s});let r=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;async function s(e){var t;if(!e||0===e.trim().length)return;let a=e.replace(r,"");if(null==(t=navigator.clipboard)?void 0:t.writeText)try{await navigator.clipboard.writeText(a);return}catch(e){}let s=document.createElement("textarea");s.value=a,s.style.position="fixed",s.style.left="-9999px",s.style.top="-9999px",s.style.opacity="0",document.body.appendChild(s),s.focus(),s.select();try{document.execCommand("copy")}finally{document.body.removeChild(s)}}},60426:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>z});var r=a(95155),s=a(12115),n=a(18955),l=a(4560),i=a(744),d=a(52619),o=a.n(d),c=a(87531);let m=["claude","codex","copilot","antigravity"];var u=a(63001),p=a(55142),x=a(54014),g=a(46892);let h={in_review:"status.inReview",approval:"status.approval",stalled:"status.stalled"},f=["in_review","approval","stalled"],v={in_review:e=>"in_review"===e.status,approval:e=>!0===e.isWaitingForResponse,stalled:e=>!0===e.isStalled};function b(e){let{status:t,label:a}=e,s=(0,n.c)("common"),l=g.PL[t],i="".concat(a,": ").concat(s(l.labelKey)),d="w-2.5 h-2.5 rounded-full flex-shrink-0";return"spinner"===l.type?(0,r.jsx)("span",{className:"".concat(d," border-2 border-t-transparent animate-spin ").concat(l.className),title:i}):(0,r.jsx)("span",{className:"".concat(d," ").concat(l.className),title:i})}function y(){let e=(0,n.c)("review"),[t,a]=(0,s.useState)([]),[l,d]=(0,s.useState)(!0),[m,g]=(0,s.useState)("in_review"),y=(0,s.useRef)(null),j=(0,s.useCallback)(async()=>{try{let t=await fetch("/api/worktrees?include=review");if(t.ok){var e;let r=await t.json();a(null!=(e=r.worktrees)?e:[])}}catch(e){}finally{d(!1)}},[]);(0,s.useEffect)(()=>(j(),y.current=setInterval(j,7e3),()=>{y.current&&clearInterval(y.current)}),[j]);let w=(0,s.useMemo)(()=>t.filter(v[m]),[t,m]),N=(0,s.useMemo)(()=>({in_review:t.filter(v.in_review).length,approval:t.filter(v.approval).length,stalled:t.filter(v.stalled).length}),[t]),S=(0,s.useMemo)(()=>{switch(m){case"in_review":return e("empty.inReview");case"approval":return e("empty.approval");case"stalled":return e("empty.stalled")}},[m,e]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-6 inline-flex items-center gap-1 rounded-lg bg-muted p-1",role:"group","aria-label":e("filters.ariaLabel"),"data-testid":"review-filters",children:f.map(t=>{let a=m===t;return(0,r.jsxs)("button",{type:"button","aria-pressed":a,onClick:()=>g(t),"data-testid":"review-filter-".concat(t),className:(0,c.cn)("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",a?"bg-accent-500/15 text-accent-700 dark:text-accent-300":"text-muted-foreground hover:text-foreground"),children:[e(h[t]),(0,r.jsx)("span",{className:(0,c.cn)("text-xs font-semibold tabular-nums",a?"text-accent-700 dark:text-accent-300":"text-muted-foreground"),children:N[t]})]},t)})}),l&&(0,r.jsx)("div",{className:"space-y-2","data-testid":"review-loading",role:"status","aria-label":e("filters.loading"),children:[0,1,2].map(e=>(0,r.jsx)(i.Zp,{padding:"md",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,r.jsx)(i.EA,{className:"h-4 w-40 max-w-full"}),(0,r.jsx)(i.EA,{className:"h-3 w-24 max-w-full"})]}),(0,r.jsx)(i.EA,{className:"ml-4 h-5 w-16 flex-shrink-0"})]})},e))}),!l&&(0,r.jsx)("div",{className:"space-y-2","data-testid":"review-list",children:0===w.length?(0,r.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"review-empty",children:S}):w.map(t=>{var a;let s=null!=(a=t.selectedAgents)?a:u.fJ;return(0,r.jsx)(o(),{href:"/worktrees/".concat(t.id),className:"block","data-testid":"review-item-".concat(t.id),children:(0,r.jsxs)(i.Zp,{padding:"md",className:"transition-colors ".concat(function(e){switch(e){case"in_review":return"border-info-border hover:border-info-border";case"approval":return"border-warning-border hover:border-warning-border";case"stalled":return"border-danger-border hover:border-danger-border"}}(m)),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{className:"text-sm font-medium text-foreground truncate",children:t.name}),(0,r.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:t.repositoryName})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 ml-4 flex-shrink-0",children:[(0,r.jsx)("span",{className:"px-2 py-0.5 text-xs font-medium rounded ".concat(function(e){switch(e){case"in_review":return"bg-info-subtle text-info-foreground";case"approval":return"bg-warning-subtle text-warning-foreground";case"stalled":return"bg-danger-subtle text-danger-foreground"}}(m)),children:e(h[m])}),s.map(e=>{var a;let s=(0,p.kA)(null==(a=t.sessionStatusByCli)?void 0:a[e]);return(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(b,{status:s,label:(0,x.oo)(e)}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,x.oo)(e)})]},e)})]})]}),t.description&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 whitespace-pre-wrap",children:t.description})})]})},t.id)})})]})}function j(e){let t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(a,"-").concat(r)}function w(e){let{value:t,onChange:a}=e,s=(0,n.c)("review"),l=j(new Date),d=t===l;return(0,r.jsxs)("div",{className:"flex items-center gap-2","data-testid":"report-date-picker",children:[(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:()=>{let e=new Date(t+"T00:00:00");e.setDate(e.getDate()-1),a(j(e))},"data-testid":"date-prev","aria-label":s("datePicker.previousDay"),children:"<"}),(0,r.jsx)(i.pd,{type:"date",inputSize:"sm",value:t,max:l,onChange:e=>a(e.target.value),className:"w-auto","data-testid":"date-input"}),(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:()=>{if(d)return;let e=new Date(t+"T00:00:00");e.setDate(e.getDate()+1);let r=j(e);r>l||a(r)},disabled:d,"data-testid":"date-next","aria-label":s("datePicker.nextDay"),children:">"})]})}var N=a(36402),S=a(60322),k=a(9900);let C=[{value:"none",labelKey:"report.modes.none"},{value:"template",labelKey:"report.modes.template"},{value:"custom",labelKey:"report.modes.custom"}];function T(){let e=(0,n.c)("review"),t=(0,N.SC)(),[a,l]=(0,s.useState)(function(){let e=new Date,t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return"".concat(t,"-").concat(a,"-").concat(r)}()),[d,o]=(0,s.useState)("claude"),[c,u]=(0,s.useState)(""),[p,x]=(0,s.useState)(null),[g,h]=(0,s.useState)(0),[f,v]=(0,s.useState)(""),[b,y]=(0,s.useState)(!1),[j,T]=(0,s.useState)(!1),[E,_]=(0,s.useState)(!1),[z,A]=(0,s.useState)(!1),[D,P]=(0,s.useState)(!1),[K,L]=(0,s.useState)(null),{mode:O,setMode:$,userInstruction:R,setUserInstruction:M,isUserInstructionReadOnly:I,templates:Z,selectedTemplateId:F,selectTemplate:J,isLoadingTemplates:U}=function(){let[e,t]=(0,s.useState)("none"),[a,r]=(0,s.useState)(""),[n,l]=(0,s.useState)([]),[i,d]=(0,s.useState)(null),[o,c]=(0,s.useState)(!1),m=(0,s.useCallback)(async()=>{c(!0);try{let e=await fetch("/api/templates");if(e.ok){let t=await e.json();l(t.templates||[])}}catch(e){}finally{c(!1)}},[]);(0,s.useEffect)(()=>{m()},[m]);let u=(0,s.useCallback)(e=>{t(e),r(""),d(null)},[]),p=(0,s.useCallback)(t=>{"custom"===e&&r(t)},[e]),x=(0,s.useCallback)(t=>{let a=n.find(e=>e.id===t);a&&"template"===e&&(d(t),r(a.content))},[n,e]);return{mode:e,setMode:u,userInstruction:a,setUserInstruction:p,isUserInstructionReadOnly:"template"===e,templates:n,selectedTemplateId:i,selectTemplate:x,isLoadingTemplates:o,refreshTemplates:m}}(),B=function(e){let[t,a]=(0,s.useState)({generating:!1}),r=(0,s.useRef)(null),n=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/daily-summary/status");if(e.ok){let t=await e.json();a(t)}}catch(e){}},[]);return(0,s.useEffect)(()=>e?(n(),r.current=setInterval(n,5e3),()=>{r.current&&(clearInterval(r.current),r.current=null)}):void a({generating:!1}),[e,n]),t}(!E),V=B.generating&&!E,q=(0,s.useCallback)(async t=>{T(!0),L(null);try{let a=await fetch("/api/daily-summary?date=".concat(t));if(!a.ok){let t=await a.json();L(t.error||e("report.errors.fetch"));return}let r=await a.json();x(r.report),h(r.messageCount),r.report?v(r.report.content):v(""),y(!1)}catch(t){L(e("report.errors.fetch"))}finally{T(!1)}},[e]);(0,s.useEffect)(()=>{q(a)},[a,q]);let[W,X]=(0,s.useState)(!1);(0,s.useEffect)(()=>{B.generating?X(!0):W&&(X(!1),q(a))},[B.generating,W,q,a]);let Y=async()=>{if(!p||await t({description:e("report.regenerateConfirm")})){_(!0),L(null);try{let t={date:a,tool:d};"copilot"===d&&c.trim()&&(t.model=c.trim()),"none"!==O&&R.trim()&&(t.userInstruction=R.trim());let r=await fetch("/api/daily-summary",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(429===r.status)return void L(e("report.errors.rateLimited"));if(!r.ok){let t=await r.json();L(t.error||e("report.errors.generate"));return}let s=await r.json();x(s.report),v(s.report.content),y(!1)}catch(t){L(e("report.errors.generate"))}finally{_(!1)}}},G=async()=>{if(!f.trim())return void L(e("report.errors.emptyContent"));A(!0),L(null);try{let t=await fetch("/api/daily-summary",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({date:a,content:f})});if(!t.ok){let a=await t.json();L(a.error||e("report.errors.save"));return}let r=await t.json();x(r.report),y(!1)}catch(t){L(e("report.errors.save"))}finally{A(!1)}};return(0,r.jsxs)("div",{"data-testid":"report-tab",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-4 mb-6",children:[(0,r.jsx)(w,{value:a,onChange:e=>{l(e)}}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-sm text-muted-foreground",children:e("report.toolLabel")}),(0,r.jsx)("select",{value:d,onChange:e=>o(e.target.value),className:"px-3 py-1 text-sm rounded border border-input bg-surface dark:bg-surface-2 text-surface-foreground","data-testid":"tool-selector",children:m.map(e=>(0,r.jsx)("option",{value:e,children:e},e))}),"copilot"===d&&(0,r.jsx)(i.pd,{type:"text",inputSize:"sm",placeholder:e("report.modelPlaceholder"),value:c,onChange:e=>u(e.target.value),className:"w-auto","data-testid":"model-input"})]})]}),(0,r.jsxs)("div",{className:"mb-4","data-testid":"generation-mode-selector",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-foreground mb-2 block",children:e("report.generationMode")}),(0,r.jsx)(i.z6,{value:O,onValueChange:e=>$(e),name:"generation-mode",className:"flex flex-row gap-4",children:C.map(t=>(0,r.jsxs)("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[(0,r.jsx)(i.CU,{value:t.value,"data-testid":"mode-radio-".concat(t.value)}),(0,r.jsx)("span",{className:"text-foreground",children:e(t.labelKey)})]},t.value))})]}),"template"===O&&(0,r.jsxs)("div",{className:"mb-4","data-testid":"template-selector",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-foreground mb-2 block",children:e("report.selectTemplate")}),U?(0,r.jsx)(i.EA,{className:"h-9 w-full","data-testid":"report-template-loading",role:"status","aria-label":e("report.loadingTemplates"),"aria-hidden":void 0}):0===Z.length?(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:e("report.noTemplates")}):(0,r.jsxs)("select",{value:F||"",onChange:e=>J(e.target.value),className:"px-3 py-1 text-sm rounded border border-input bg-surface dark:bg-surface-2 text-surface-foreground","data-testid":"template-select",children:[(0,r.jsx)("option",{value:"",children:e("report.templatePlaceholderOption")}),Z.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),"none"!==O&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(i.k_,{value:R,onChange:e=>M(e.target.value),rows:3,maxLength:1e3,readOnly:I,placeholder:"template"===O?e("report.instructionPlaceholderTemplate"):e("report.instructionPlaceholderCustom"),className:"resize-y ".concat(I?"bg-muted cursor-not-allowed":""),"data-testid":"user-instruction-input"})}),(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(i.$n,{variant:"primary",onClick:Y,disabled:E||V||0===g,"data-testid":"generate-button",children:E||V?e("report.generating"):e("report.generate")})}),(0,r.jsx)("div",{className:"mb-4 text-sm text-muted-foreground","data-testid":"message-count",children:j?(0,r.jsx)(i.EA,{className:"h-4 w-48"}):0===g?e("report.noMessages"):e("report.messagesFound",{count:g})}),K&&(0,r.jsx)("div",{className:"mb-4 p-3 bg-danger-subtle text-danger-foreground rounded-lg text-sm","data-testid":"report-error",children:K}),(E||V)&&(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-4 text-sm text-muted-foreground","data-testid":"generating-spinner",children:[(0,r.jsx)(i.y$,{size:"sm",variant:"muted"}),V&&B.tool?B.startedAt?e("report.generatingRemoteWithTime",{tool:B.tool,seconds:Math.round((Date.now()-new Date(B.startedAt).getTime())/1e3)}):e("report.generatingRemote",{tool:B.tool}):e("report.generatingSummary")]}),!j&&p&&(0,r.jsxs)(i.Zp,{"data-testid":"report-content",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsxs)("div",{className:"text-xs text-muted-foreground",children:[e("report.generatedBy",{tool:p.generatedByTool}),p.model&&" (".concat(p.model,")")]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:async()=>{await (0,S.l)(p.content),P(!0),setTimeout(()=>P(!1),k.pX)},"data-testid":"copy-report-button",children:D?e("report.copied"):e("report.copy")}),(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:()=>{b?G():y(!0)},disabled:z,"data-testid":"edit-save-button",children:z?e("report.saving"):b?e("report.save"):e("report.edit")})]})]}),b?(0,r.jsx)(i.k_,{value:f,onChange:e=>v(e.target.value),className:"h-64 p-3 font-mono","data-testid":"report-editor"}):(0,r.jsx)("div",{className:"prose dark:prose-invert max-w-none text-sm whitespace-pre-wrap","data-testid":"report-preview",children:p.content})]})]})}function E(){let e=(0,n.c)("review"),t=(0,N.SC)(),[a,l]=(0,s.useState)([]),[d,o]=(0,s.useState)(!1),[c,m]=(0,s.useState)(null),[u,p]=(0,s.useState)(""),[x,g]=(0,s.useState)(""),[h,f]=(0,s.useState)(!1),[v,b]=(0,s.useState)(null),[y,j]=(0,s.useState)(""),[w,S]=(0,s.useState)(""),[k,C]=(0,s.useState)(!1),T=(0,s.useCallback)(async()=>{o(!0),m(null);try{let t=await fetch("/api/templates");if(!t.ok){let a=await t.json();m(a.error||e("template.errors.fetch"));return}let a=await t.json();l(a.templates||[])}catch(t){m(e("template.errors.fetch"))}finally{o(!1)}},[e]);(0,s.useEffect)(()=>{T()},[T]);let E=async()=>{if(!u.trim()||!x.trim())return void m(e("template.errors.nameAndContentRequired"));f(!0),m(null);try{let t=await fetch("/api/templates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:u.trim(),content:x.trim()})});if(!t.ok){let a=await t.json();m(a.error||e("template.errors.create"));return}p(""),g(""),await T()}catch(t){m(e("template.errors.create"))}finally{f(!1)}},_=async()=>{if(!v||!y.trim()||!w.trim())return void m(e("template.errors.nameAndContentRequired"));C(!0),m(null);try{let t=await fetch("/api/templates/".concat(v),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:y.trim(),content:w.trim()})});if(!t.ok){let a=await t.json();m(a.error||e("template.errors.update"));return}b(null),await T()}catch(t){m(e("template.errors.update"))}finally{C(!1)}},z=async a=>{if(await t({description:e("template.deleteConfirm"),variant:"danger"})){m(null);try{let t=await fetch("/api/templates/".concat(a),{method:"DELETE"});if(!t.ok){let a=await t.json();m(a.error||e("template.errors.delete"));return}await T()}catch(t){m(e("template.errors.delete"))}}},A=()=>{b(null),j(""),S("")};return(0,r.jsxs)("div",{"data-testid":"template-tab",children:[c&&(0,r.jsx)("div",{className:"mb-4 p-3 bg-danger-subtle text-danger-foreground rounded-lg text-sm","data-testid":"template-error",children:c}),(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-foreground mb-3",children:e("template.heading",{count:a.length,max:5})}),d?(0,r.jsx)("div",{className:"space-y-3","data-testid":"template-loading",role:"status","aria-label":e("template.loading"),children:[0,1].map(e=>(0,r.jsx)(i.Zp,{padding:"md",children:(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(i.EA,{className:"h-4 w-32"}),(0,r.jsx)(i.EA,{className:"h-3 w-full"}),(0,r.jsx)(i.EA,{className:"h-3 w-2/3"})]})},e))}):0===a.length?(0,r.jsx)("div",{className:"text-sm text-muted-foreground","data-testid":"template-empty",children:e("template.empty")}):(0,r.jsx)("div",{className:"space-y-3","data-testid":"template-list",children:a.map(t=>(0,r.jsx)(i.Zp,{padding:"sm","data-testid":"template-item-".concat(t.id),children:v===t.id?(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(i.pd,{type:"text",inputSize:"sm",value:y,onChange:e=>j(e.target.value),maxLength:100,"data-testid":"edit-name-input"}),(0,r.jsx)(i.k_,{value:w,onChange:e=>S(e.target.value),maxLength:1e3,rows:3,className:"resize-y","data-testid":"edit-content-input"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{variant:"primary",size:"sm",onClick:_,disabled:k,"data-testid":"edit-save-button",children:k?e("template.saving"):e("template.save")}),(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:A,"data-testid":"edit-cancel-button",children:e("template.cancel")})]})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,r.jsx)("span",{className:"font-medium text-sm text-foreground","data-testid":"template-name",children:t.name}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{variant:"secondary",size:"sm",onClick:()=>{b(t.id),j(t.name),S(t.content)},"data-testid":"edit-button-".concat(t.id),children:e("template.edit")}),(0,r.jsx)(i.$n,{variant:"danger",size:"sm",onClick:()=>z(t.id),"data-testid":"delete-button-".concat(t.id),children:e("template.delete")})]})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground whitespace-pre-wrap","data-testid":"template-content",children:t.content})]})},t.id))})]}),a.length<5&&(0,r.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg shadow-sm","data-testid":"create-form",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-3",children:e("template.newHeading")}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)(i.pd,{type:"text",value:u,onChange:e=>p(e.target.value),maxLength:100,placeholder:e("template.namePlaceholder"),"data-testid":"new-name-input"}),(0,r.jsx)(i.k_,{value:x,onChange:e=>g(e.target.value),maxLength:1e3,rows:3,placeholder:e("template.contentPlaceholder"),className:"resize-y","data-testid":"new-content-input"}),(0,r.jsx)(i.$n,{variant:"primary",onClick:E,disabled:h||!u.trim()||!x.trim(),"data-testid":"create-button",children:h?e("template.creating"):e("template.create")})]})]})]})}let _=[{value:"review",labelKey:"tabs.review"},{value:"report",labelKey:"tabs.report"},{value:"template",labelKey:"tabs.template"}];function z(){let e=(0,n.c)("review"),[t,a]=(0,s.useState)("review");return(0,r.jsx)(l.GV,{children:(0,r.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:e("page.title")}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:e("page.description")})]}),(0,r.jsxs)(i.tU,{value:t,onValueChange:e=>a(e),children:[(0,r.jsx)(i.j7,{className:"mb-6 w-full justify-start","data-testid":"page-tabs",children:_.map(t=>(0,r.jsx)(i.Xi,{value:t.value,"data-testid":"page-tab-".concat(t.value),children:e(t.labelKey)},t.value))}),(0,r.jsx)(i.av,{value:"review",children:(0,r.jsx)(y,{})}),(0,r.jsx)(i.av,{value:"report",children:(0,r.jsx)(T,{})}),(0,r.jsx)(i.av,{value:"template",children:(0,r.jsx)(E,{})})]})]})})}},80488:(e,t,a)=>{Promise.resolve().then(a.bind(a,60426))}},e=>{e.O(0,[6809,4909,2770,790,4974,6402,744,6488,4560,8441,1255,7358],()=>e(e.s=80488)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8898],{6473:(e,s,t)=>{"use strict";t.d(s,{Lc:()=>a,qz:()=>r});let r="animate-in fade-in-0 slide-in-from-bottom-2 fill-mode-backwards duration-300";function a(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(Number.isFinite(e)&&!(e<=0)&&!(e>=t))return"".concat(e*s,"ms")}},8803:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(71847).A)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},9219:(e,s,t)=>{"use strict";t.d(s,{k:()=>l});var r=t(95155),a=t(12115),n=t(744),i=t(87531);function l(e){let{onRefresh:s,enabled:t=!0,className:l,children:o}=e,{containerRef:c,pullDistance:d,isRefreshing:u,isPulling:m}=function(e){let{onRefresh:s,enabled:t=!0,threshold:r=64,maxPull:n=96,resistance:i=.5}=e,l=(0,a.useRef)(null),[o,c]=(0,a.useState)(0),[d,u]=(0,a.useState)(!1),[m,x]=(0,a.useState)(!1),h=(0,a.useRef)(null),f=(0,a.useRef)(0),g=(0,a.useRef)(!1);g.current=d;let p=(0,a.useCallback)(()=>{h.current=null,f.current=0,c(0),x(!1)},[]),v=(0,a.useCallback)(e=>{if(!t||g.current)return;let s=l.current;s&&!(s.scrollTop>0)&&(h.current=e.touches[0].clientY,f.current=0)},[t]),b=(0,a.useCallback)(e=>{if(null===h.current)return;let s=l.current;if(!s)return;if(s.scrollTop>0)return void p();let t=e.touches[0].clientY-h.current;if(t<=0){0!==f.current&&(f.current=0,c(0),x(!1));return}e.cancelable&&e.preventDefault();let r=Math.min(t*i,n);f.current=r,c(r),x(!0)},[i,n,p]),y=(0,a.useCallback)(async()=>{u(!0),x(!1),c(r);try{await Promise.resolve(s())}finally{u(!1),c(0)}},[s,r]),N=(0,a.useCallback)(()=>{if(null===h.current)return;let e=f.current>=r&&!g.current;h.current=null,f.current=0,e?y():(c(0),x(!1))},[r,y]);return(0,a.useEffect)(()=>{let e=l.current;if(e)return e.addEventListener("touchstart",v,{passive:!0}),e.addEventListener("touchmove",b,{passive:!1}),e.addEventListener("touchend",N,{passive:!0}),e.addEventListener("touchcancel",N,{passive:!0}),()=>{e.removeEventListener("touchstart",v),e.removeEventListener("touchmove",b),e.removeEventListener("touchend",N),e.removeEventListener("touchcancel",N)}},[v,b,N]),{containerRef:l,pullDistance:o,isRefreshing:d,isPulling:m}}({onRefresh:s,enabled:t,threshold:64}),x=u||d>0,h=u?1:Math.min(d/64,1);return(0,r.jsxs)("div",{ref:c,className:(0,i.cn)("relative overflow-auto",l),style:{overscrollBehaviorY:"contain"},"data-testid":"pull-to-refresh",children:[(0,r.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 z-10 flex justify-center",style:{transform:"translateY(".concat(x?Math.max(d-24,8):-32,"px)"),opacity:h,transition:m?"none":"transform 0.2s ease-out, opacity 0.2s ease-out"},"data-testid":"pull-to-refresh-indicator",role:"status","aria-hidden":!u,children:(0,r.jsx)(n.y$,{size:"sm",variant:"accent"})}),(0,r.jsx)("div",{style:{transform:x?"translateY(".concat(d,"px)"):void 0,transition:m?"none":"transform 0.2s ease-out"},children:o})]})}},20562:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(71847).A)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},50857:(e,s,t)=>{"use strict";function r(e){return"running"===e||"generating"===e||"waiting"===e}function a(e){return e.isActive||r(e.status)}function n(e,s){let t=e.map((e,s)=>({it:e,index:s})).filter(e=>{let{it:s}=e;return a(s)}),r=new Set;return s>0&&t.length>0&&[...t].sort((e,s)=>Number(s.it.isActive)-Number(e.it.isActive)||e.index-s.index).slice(0,s).forEach(e=>{let{index:s}=e;return r.add(s)}),e.map((e,s)=>a(e)?{...e,slot:r.has(s)?"pill":"overflow"}:{...e,slot:"dot"})}t.d(s,{Qo:()=>r,Uw:()=>n})},74500:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>L});var r=t(95155),a=t(12115),n=t(52619),i=t.n(n),l=t(18955),o=t(20562),c=t(8803),d=t(4560),u=t(9219),m=t(38218),x=t(66966),h=t(55142),f=t(50857),g=t(54014),p=t(63001),v=t(744),b=t(7636),y=t(83012),N=t(6473);let j=[{key:"repositoryName",labelKey:"sort.repositoryName"},{key:"status",labelKey:"sort.status"},{key:"lastSent",labelKey:"sort.lastSent"}],w={lastSent:"desc",updatedAt:"desc"},k={ready:0,in_progress:1,in_review:2,done:3};function A(e){let{status:s,label:t}=e,a=(0,l.c)("common"),n="".concat(t,": ").concat(a("status.".concat(s)));return(0,r.jsx)(v.md,{status:s,size:"md",label:n})}let C={ready:"worktreeStatus.ready",in_progress:"worktreeStatus.inProgress",in_review:"worktreeStatus.inReview",done:"worktreeStatus.done"},M={done:"bg-success-subtle text-success-foreground",in_review:"bg-info-subtle text-info-foreground",in_progress:"bg-accent-100 dark:bg-accent-900/30 text-accent-700 dark:text-accent-400"};function L(){let e=(0,l.c)("common"),s=(0,l.c)("worktree"),t=(0,m.a)(),{worktrees:n,isLoading:L,error:E,refresh:S}=(0,x.Fn)(),_=n.length>0,[F,D]=(0,a.useState)(""),[U,z]=(0,a.useState)("lastSent"),[P,B]=(0,a.useState)("desc"),R=(0,a.useMemo)(()=>{let e=n;if(F){let s=F.toLowerCase();e=e.filter(e=>{var t,r;return e.name.toLowerCase().includes(s)||e.repositoryName.toLowerCase().includes(s)||null!=(r=null==(t=e.repositoryDisplayName)?void 0:t.toLowerCase().includes(s))&&r})}let s=[...e];return s.sort((e,s)=>{var t,r,a,n,i,l,o,c;let d=0;switch(U){case"lastSent":{let t=(0,b.nO)(e.lastUserMessageAt,s.lastUserMessageAt);if(!e.lastUserMessageAt&&!s.lastUserMessageAt)return 0;if(!e.lastUserMessageAt)return 1;if(!s.lastUserMessageAt)return -1;d=t;break}case"repositoryName":{let a=(null!=(t=e.repositoryDisplayName)?t:e.repositoryName).toLowerCase(),n=(null!=(r=s.repositoryDisplayName)?r:s.repositoryName).toLowerCase();0===(d=a.localeCompare(n))&&(d=e.name.toLowerCase().localeCompare(s.name.toLowerCase()));break}case"status":if(0==(d=(null!=(n=k[null!=(a=e.status)?a:""])?n:4)-(null!=(l=k[null!=(i=s.status)?i:""])?l:4))){let t=(null!=(o=e.repositoryDisplayName)?o:e.repositoryName).toLowerCase(),r=(null!=(c=s.repositoryDisplayName)?c:s.repositoryName).toLowerCase();d=t.localeCompare(r)}break;default:d=0}return("lastSent"===U?"desc"===P:"asc"===P)?d:-d}),s},[n,F,U,P]),T=(0,a.useCallback)(e=>{D(e.target.value)},[]),q=(0,a.useCallback)(e=>{var s;z(e),B(null!=(s=w[e])?s:"asc")},[]),K=(0,a.useCallback)(()=>{B(e=>"asc"===e?"desc":"asc")},[]);return(0,r.jsx)(d.GV,{children:(0,r.jsxs)(u.k,{onRefresh:S,enabled:t,className:"container-custom py-8 h-full",children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:e("sessions.title")}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:e("sessions.description")})]}),(0,r.jsxs)("div",{className:"mb-6 flex items-center gap-3",children:[(0,r.jsx)(v.pd,{type:"text",placeholder:e("sessions.filterPlaceholder"),value:F,onChange:T,className:"max-w-md flex-1","data-testid":"sessions-filter","aria-label":e("sessions.filterAriaLabel"),inputMode:"search",enterKeyHint:"search"}),(0,r.jsxs)(v.l6,{value:U,onValueChange:q,children:[(0,r.jsx)(v.bq,{className:"w-40","data-testid":"sessions-sort-select","aria-label":e("sessions.sortByAriaLabel"),children:(0,r.jsx)(v.yv,{})}),(0,r.jsx)(v.gC,{children:j.map(s=>(0,r.jsx)(v.eb,{value:s.key,children:e(s.labelKey)},s.key))})]}),(0,r.jsx)("button",{type:"button",onClick:K,"data-testid":"sessions-sort-direction","aria-label":"asc"===P?e("sessions.sortAscending"):e("sessions.sortDescending"),className:"rounded-md border border-input bg-surface p-2 text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"asc"===P?(0,r.jsx)(o.A,{size:16,"aria-hidden":"true"}):(0,r.jsx)(c.A,{size:16,"aria-hidden":"true"})})]}),_?(0,r.jsxs)(r.Fragment,{children:[E&&(0,r.jsx)("div",{className:"mb-4 rounded-md border border-danger-border bg-danger-subtle px-3 py-2 text-sm text-danger-foreground",role:"status","data-testid":"sessions-error-banner",children:e("sessions.refreshError",{message:E.message})}),(0,r.jsx)("div",{className:"space-y-2","data-testid":"sessions-list",children:0===R.length?(0,r.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"sessions-empty",children:e("sessions.noMatching")}):R.map((t,a)=>{var n,l,o,c;let d=null!=(n=t.selectedAgents)?n:p.fJ,u=t.lastUserMessage?t.lastUserMessage.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,"").replace(/[\u200B-\u200F\u2028-\u202F\uFEFF\u061C]/g,"").replace(/[\r\n\t]/g," ").replace(/\s+/g," ").trim():null,m=t.lastUserMessageAt?(0,y.Fx)(String(t.lastUserMessageAt)):null,x=d.map(e=>{var s;return{agent:e,status:(0,h.kA)(null==(s=t.sessionStatusByCli)?void 0:s[e])}}),b=x.filter(e=>(0,f.Qo)(e.status)),j=x.length-b.length,w=d.some(e=>{var s;let r=(0,h.kA)(null==(s=t.sessionStatusByCli)?void 0:s[e]);return"running"===r||"generating"===r});return(0,r.jsxs)(i(),{href:"/worktrees/".concat(t.id),style:{animationDelay:(0,N.Lc)(a)},className:"block bg-surface rounded-lg p-4 border transition-colors ".concat(w?"border-accent-500/40 shadow-[0_0_16px_-4px_rgb(var(--accent-500)/0.45)] hover:border-accent-400":"border-border shadow-sm hover:border-accent-300 dark:hover:border-accent-700"," ").concat(N.qz),"data-testid":"session-item-".concat(t.id),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{className:"text-sm font-medium text-foreground truncate",children:null!=(l=t.repositoryDisplayName)?l:t.repositoryName}),(0,r.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:t.name})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 ml-4 flex-shrink-0","data-testid":"session-agents-".concat(t.id),children:[b.map(e=>{let{agent:s,status:t}=e;return(0,r.jsxs)("div",{className:"flex items-center gap-1","data-testid":"session-agent-".concat(s),children:[(0,r.jsx)(A,{status:t,label:(0,g.oo)(s)}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,g.oo)(s)})]},s)}),j>0&&(0,r.jsxs)("div",{className:"flex items-center gap-1","data-testid":"session-idle-cluster-".concat(t.id),"aria-label":e("sessions.idleAgents",{count:j}),children:[(0,r.jsx)(v.md,{status:"idle",size:"sm","aria-hidden":!0,title:void 0}),(0,r.jsxs)("span",{className:"text-xs text-muted-foreground tabular-nums",children:["+",j]})]})]})]}),t.description&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 whitespace-pre-wrap",children:t.description})}),t.status&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("span",{className:"px-2 py-0.5 text-xs font-medium rounded ".concat(null!=(c=M[null!=(o=t.status)?o:""])?c:"bg-muted text-muted-foreground"),children:function(e,s){if(!e)return"";let t=C[e];return t?s(t):e}(t.status,s)})}),u&&(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2","data-testid":"session-message-".concat(t.id),children:[(0,r.jsx)("span",{className:"text-xs text-muted-foreground truncate min-w-0 flex-1","data-testid":"session-message-text-".concat(t.id),title:u,children:u}),m&&(0,r.jsx)("span",{className:"text-xs text-muted-foreground flex-shrink-0 whitespace-nowrap tabular-nums","data-testid":"session-time-".concat(t.id),children:m})]})]},t.id)})})]}):(0,r.jsxs)(r.Fragment,{children:[L&&(0,r.jsx)("div",{className:"space-y-2","data-testid":"sessions-loading",role:"status","aria-label":e("sessions.loadingAriaLabel"),children:[0,1,2].map(e=>(0,r.jsxs)("div",{className:"block bg-surface rounded-lg p-4 border border-border shadow-sm",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,r.jsx)(v.EA,{className:"h-4 w-40 max-w-full"}),(0,r.jsx)(v.EA,{className:"h-3 w-56 max-w-full"})]}),(0,r.jsx)(v.EA,{className:"ml-4 h-3 w-16 flex-shrink-0"})]}),(0,r.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,r.jsx)(v.EA,{className:"h-3 min-w-0 flex-1"}),(0,r.jsx)(v.EA,{className:"h-3 w-10 flex-shrink-0"})]})]},e))}),!L&&E&&(0,r.jsx)("div",{className:"text-danger-foreground","data-testid":"sessions-error",children:e("sessions.loadError",{message:E.message})}),!L&&!E&&(0,r.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"sessions-empty",children:F?e("sessions.noMatching"):e("sessions.empty")})]})]})})}},83012:(e,s,t)=>{"use strict";t.d(s,{Fx:()=>i,bg:()=>l,fw:()=>n});var r=t(53298),a=t(73683);function n(e,s){let t=new Date(e);return isNaN(t.getTime())?"":(0,r.m)(t,{addSuffix:!0,...s?{locale:s}:{}})}function i(e){let s=new Date(e);if(isNaN(s.getTime()))return"";let t=Math.round((Date.now()-s.getTime())/1e3);if(t<45)return"now";let r=Math.round(t/60);if(r<60)return"".concat(r,"m ago");let a=Math.round(r/60);if(a<24)return"".concat(a,"h ago");let n=Math.round(a/24);return n<7?"".concat(n,"d ago"):n<30?"".concat(Math.round(n/7),"w ago"):n<365?"".concat(Math.round(n/30),"mo ago"):"".concat(Math.round(n/365),"y ago")}function l(e,s){return!(e instanceof Date)||isNaN(e.getTime())?"":(0,a.GP)(e,"PPp",s?{locale:s}:void 0)}},87047:(e,s,t)=>{Promise.resolve().then(t.bind(t,74500))}},e=>{e.O(0,[6809,4909,2770,3165,4974,9948,6402,744,6488,4560,8441,1255,7358],()=>e(e.s=87047)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8898],{6473:(e,s,t)=>{"use strict";t.d(s,{Lc:()=>a,qz:()=>r});let r="animate-in fade-in-0 slide-in-from-bottom-2 fill-mode-backwards duration-300";function a(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;if(Number.isFinite(e)&&!(e<=0)&&!(e>=t))return"".concat(e*s,"ms")}},8803:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(71847).A)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},9219:(e,s,t)=>{"use strict";t.d(s,{k:()=>l});var r=t(95155),a=t(12115),n=t(744),i=t(87531);function l(e){let{onRefresh:s,enabled:t=!0,className:l,children:o}=e,{containerRef:c,pullDistance:d,isRefreshing:u,isPulling:m}=function(e){let{onRefresh:s,enabled:t=!0,threshold:r=64,maxPull:n=96,resistance:i=.5}=e,l=(0,a.useRef)(null),[o,c]=(0,a.useState)(0),[d,u]=(0,a.useState)(!1),[m,x]=(0,a.useState)(!1),h=(0,a.useRef)(null),f=(0,a.useRef)(0),g=(0,a.useRef)(!1);g.current=d;let p=(0,a.useCallback)(()=>{h.current=null,f.current=0,c(0),x(!1)},[]),v=(0,a.useCallback)(e=>{if(!t||g.current)return;let s=l.current;s&&!(s.scrollTop>0)&&(h.current=e.touches[0].clientY,f.current=0)},[t]),b=(0,a.useCallback)(e=>{if(null===h.current)return;let s=l.current;if(!s)return;if(s.scrollTop>0)return void p();let t=e.touches[0].clientY-h.current;if(t<=0){0!==f.current&&(f.current=0,c(0),x(!1));return}e.cancelable&&e.preventDefault();let r=Math.min(t*i,n);f.current=r,c(r),x(!0)},[i,n,p]),y=(0,a.useCallback)(async()=>{u(!0),x(!1),c(r);try{await Promise.resolve(s())}finally{u(!1),c(0)}},[s,r]),N=(0,a.useCallback)(()=>{if(null===h.current)return;let e=f.current>=r&&!g.current;h.current=null,f.current=0,e?y():(c(0),x(!1))},[r,y]);return(0,a.useEffect)(()=>{let e=l.current;if(e)return e.addEventListener("touchstart",v,{passive:!0}),e.addEventListener("touchmove",b,{passive:!1}),e.addEventListener("touchend",N,{passive:!0}),e.addEventListener("touchcancel",N,{passive:!0}),()=>{e.removeEventListener("touchstart",v),e.removeEventListener("touchmove",b),e.removeEventListener("touchend",N),e.removeEventListener("touchcancel",N)}},[v,b,N]),{containerRef:l,pullDistance:o,isRefreshing:d,isPulling:m}}({onRefresh:s,enabled:t,threshold:64}),x=u||d>0,h=u?1:Math.min(d/64,1);return(0,r.jsxs)("div",{ref:c,className:(0,i.cn)("relative overflow-auto",l),style:{overscrollBehaviorY:"contain"},"data-testid":"pull-to-refresh",children:[(0,r.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 z-10 flex justify-center",style:{transform:"translateY(".concat(x?Math.max(d-24,8):-32,"px)"),opacity:h,transition:m?"none":"transform 0.2s ease-out, opacity 0.2s ease-out"},"data-testid":"pull-to-refresh-indicator",role:"status","aria-hidden":!u,children:(0,r.jsx)(n.y$,{size:"sm",variant:"accent"})}),(0,r.jsx)("div",{style:{transform:x?"translateY(".concat(d,"px)"):void 0,transition:m?"none":"transform 0.2s ease-out"},children:o})]})}},20562:(e,s,t)=>{"use strict";t.d(s,{A:()=>r});let r=(0,t(71847).A)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},50857:(e,s,t)=>{"use strict";function r(e){return"running"===e||"generating"===e||"waiting"===e}function a(e){return e.isActive||r(e.status)}function n(e,s){let t=e.map((e,s)=>({it:e,index:s})).filter(e=>{let{it:s}=e;return a(s)}),r=new Set;return s>0&&t.length>0&&[...t].sort((e,s)=>Number(s.it.isActive)-Number(e.it.isActive)||e.index-s.index).slice(0,s).forEach(e=>{let{index:s}=e;return r.add(s)}),e.map((e,s)=>a(e)?{...e,slot:r.has(s)?"pill":"overflow"}:{...e,slot:"dot"})}t.d(s,{Qo:()=>r,Uw:()=>n})},74500:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>L});var r=t(95155),a=t(12115),n=t(52619),i=t.n(n),l=t(18955),o=t(20562),c=t(8803),d=t(4560),u=t(9219),m=t(38218),x=t(66966),h=t(55142),f=t(50857),g=t(54014),p=t(63001),v=t(744),b=t(7636),y=t(83012),N=t(6473);let j=[{key:"repositoryName",labelKey:"sort.repositoryName"},{key:"status",labelKey:"sort.status"},{key:"lastSent",labelKey:"sort.lastSent"}],w={lastSent:"desc",updatedAt:"desc"},k={ready:0,in_progress:1,in_review:2,done:3};function A(e){let{status:s,label:t}=e,a=(0,l.c)("common"),n="".concat(t,": ").concat(a("status.".concat(s)));return(0,r.jsx)(v.md,{status:s,size:"md",label:n})}let C={ready:"worktreeStatus.ready",in_progress:"worktreeStatus.inProgress",in_review:"worktreeStatus.inReview",done:"worktreeStatus.done"},M={done:"bg-success-subtle text-success-foreground",in_review:"bg-info-subtle text-info-foreground",in_progress:"bg-accent-100 dark:bg-accent-900/30 text-accent-700 dark:text-accent-400"};function L(){let e=(0,l.c)("common"),s=(0,l.c)("worktree"),t=(0,m.a)(),{worktrees:n,isLoading:L,error:E,refresh:S}=(0,x.Fn)(),_=n.length>0,[F,D]=(0,a.useState)(""),[U,z]=(0,a.useState)("lastSent"),[P,B]=(0,a.useState)("desc"),R=(0,a.useMemo)(()=>{let e=n;if(F){let s=F.toLowerCase();e=e.filter(e=>{var t,r;return e.name.toLowerCase().includes(s)||e.repositoryName.toLowerCase().includes(s)||null!=(r=null==(t=e.repositoryDisplayName)?void 0:t.toLowerCase().includes(s))&&r})}let s=[...e];return s.sort((e,s)=>{var t,r,a,n,i,l,o,c;let d=0;switch(U){case"lastSent":{let t=(0,b.nO)(e.lastUserMessageAt,s.lastUserMessageAt);if(!e.lastUserMessageAt&&!s.lastUserMessageAt)return 0;if(!e.lastUserMessageAt)return 1;if(!s.lastUserMessageAt)return -1;d=t;break}case"repositoryName":{let a=(null!=(t=e.repositoryDisplayName)?t:e.repositoryName).toLowerCase(),n=(null!=(r=s.repositoryDisplayName)?r:s.repositoryName).toLowerCase();0===(d=a.localeCompare(n))&&(d=e.name.toLowerCase().localeCompare(s.name.toLowerCase()));break}case"status":if(0==(d=(null!=(n=k[null!=(a=e.status)?a:""])?n:4)-(null!=(l=k[null!=(i=s.status)?i:""])?l:4))){let t=(null!=(o=e.repositoryDisplayName)?o:e.repositoryName).toLowerCase(),r=(null!=(c=s.repositoryDisplayName)?c:s.repositoryName).toLowerCase();d=t.localeCompare(r)}break;default:d=0}return("lastSent"===U?"desc"===P:"asc"===P)?d:-d}),s},[n,F,U,P]),T=(0,a.useCallback)(e=>{D(e.target.value)},[]),q=(0,a.useCallback)(e=>{var s;z(e),B(null!=(s=w[e])?s:"asc")},[]),K=(0,a.useCallback)(()=>{B(e=>"asc"===e?"desc":"asc")},[]);return(0,r.jsx)(d.GV,{children:(0,r.jsxs)(u.k,{onRefresh:S,enabled:t,className:"container-custom py-8 h-full",children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:e("sessions.title")}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:e("sessions.description")})]}),(0,r.jsxs)("div",{className:"mb-6 flex items-center gap-3",children:[(0,r.jsx)(v.pd,{type:"text",placeholder:e("sessions.filterPlaceholder"),value:F,onChange:T,className:"max-w-md flex-1","data-testid":"sessions-filter","aria-label":e("sessions.filterAriaLabel"),inputMode:"search",enterKeyHint:"search"}),(0,r.jsxs)(v.l6,{value:U,onValueChange:q,children:[(0,r.jsx)(v.bq,{className:"w-40","data-testid":"sessions-sort-select","aria-label":e("sessions.sortByAriaLabel"),children:(0,r.jsx)(v.yv,{})}),(0,r.jsx)(v.gC,{children:j.map(s=>(0,r.jsx)(v.eb,{value:s.key,children:e(s.labelKey)},s.key))})]}),(0,r.jsx)("button",{type:"button",onClick:K,"data-testid":"sessions-sort-direction","aria-label":"asc"===P?e("sessions.sortAscending"):e("sessions.sortDescending"),className:"rounded-md border border-input bg-surface p-2 text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:"asc"===P?(0,r.jsx)(o.A,{size:16,"aria-hidden":"true"}):(0,r.jsx)(c.A,{size:16,"aria-hidden":"true"})})]}),_?(0,r.jsxs)(r.Fragment,{children:[E&&(0,r.jsx)("div",{className:"mb-4 rounded-md border border-danger-border bg-danger-subtle px-3 py-2 text-sm text-danger-foreground",role:"status","data-testid":"sessions-error-banner",children:e("sessions.refreshError",{message:E.message})}),(0,r.jsx)("div",{className:"space-y-2","data-testid":"sessions-list",children:0===R.length?(0,r.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"sessions-empty",children:e("sessions.noMatching")}):R.map((t,a)=>{var n,l,o,c;let d=null!=(n=t.selectedAgents)?n:p.fJ,u=t.lastUserMessage?t.lastUserMessage.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,"").replace(/[\u200B-\u200F\u2028-\u202F\uFEFF\u061C]/g,"").replace(/[\r\n\t]/g," ").replace(/\s+/g," ").trim():null,m=t.lastUserMessageAt?(0,y.Fx)(String(t.lastUserMessageAt)):null,x=d.map(e=>{var s;return{agent:e,status:(0,h.kA)(null==(s=t.sessionStatusByCli)?void 0:s[e])}}),b=x.filter(e=>(0,f.Qo)(e.status)),j=x.length-b.length,w=d.some(e=>{var s;let r=(0,h.kA)(null==(s=t.sessionStatusByCli)?void 0:s[e]);return"running"===r||"generating"===r});return(0,r.jsxs)(i(),{href:"/worktrees/".concat(t.id),style:{animationDelay:(0,N.Lc)(a)},className:"block bg-surface rounded-lg p-4 border transition-colors ".concat(w?"border-accent-500/40 shadow-[0_0_16px_-4px_rgb(var(--accent-500)/0.45)] hover:border-accent-400":"border-border shadow-sm hover:border-accent-300 dark:hover:border-accent-700"," ").concat(N.qz),"data-testid":"session-item-".concat(t.id),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{className:"text-sm font-medium text-foreground truncate",children:null!=(l=t.repositoryDisplayName)?l:t.repositoryName}),(0,r.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:t.name})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 ml-4 flex-shrink-0","data-testid":"session-agents-".concat(t.id),children:[b.map(e=>{let{agent:s,status:t}=e;return(0,r.jsxs)("div",{className:"flex items-center gap-1","data-testid":"session-agent-".concat(s),children:[(0,r.jsx)(A,{status:t,label:(0,g.oo)(s)}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,g.oo)(s)})]},s)}),j>0&&(0,r.jsxs)("div",{className:"flex items-center gap-1","data-testid":"session-idle-cluster-".concat(t.id),"aria-label":e("sessions.idleAgents",{count:j}),children:[(0,r.jsx)(v.md,{status:"idle",size:"sm","aria-hidden":!0,title:void 0}),(0,r.jsxs)("span",{className:"text-xs text-muted-foreground tabular-nums",children:["+",j]})]})]})]}),t.description&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 whitespace-pre-wrap",children:t.description})}),t.status&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)("span",{className:"px-2 py-0.5 text-xs font-medium rounded ".concat(null!=(c=M[null!=(o=t.status)?o:""])?c:"bg-muted text-muted-foreground"),children:function(e,s){if(!e)return"";let t=C[e];return t?s(t):e}(t.status,s)})}),u&&(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2","data-testid":"session-message-".concat(t.id),children:[(0,r.jsx)("span",{className:"text-xs text-muted-foreground truncate min-w-0 flex-1","data-testid":"session-message-text-".concat(t.id),title:u,children:u}),m&&(0,r.jsx)("span",{className:"text-xs text-muted-foreground flex-shrink-0 whitespace-nowrap tabular-nums","data-testid":"session-time-".concat(t.id),children:m})]})]},t.id)})})]}):(0,r.jsxs)(r.Fragment,{children:[L&&(0,r.jsx)("div",{className:"space-y-2","data-testid":"sessions-loading",role:"status","aria-label":e("sessions.loadingAriaLabel"),children:[0,1,2].map(e=>(0,r.jsxs)("div",{className:"block bg-surface rounded-lg p-4 border border-border shadow-sm",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,r.jsx)(v.EA,{className:"h-4 w-40 max-w-full"}),(0,r.jsx)(v.EA,{className:"h-3 w-56 max-w-full"})]}),(0,r.jsx)(v.EA,{className:"ml-4 h-3 w-16 flex-shrink-0"})]}),(0,r.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,r.jsx)(v.EA,{className:"h-3 min-w-0 flex-1"}),(0,r.jsx)(v.EA,{className:"h-3 w-10 flex-shrink-0"})]})]},e))}),!L&&E&&(0,r.jsx)("div",{className:"text-danger-foreground","data-testid":"sessions-error",children:e("sessions.loadError",{message:E.message})}),!L&&!E&&(0,r.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"sessions-empty",children:F?e("sessions.noMatching"):e("sessions.empty")})]})]})})}},83012:(e,s,t)=>{"use strict";t.d(s,{Fx:()=>i,bg:()=>l,fw:()=>n});var r=t(53298),a=t(73683);function n(e,s){let t=new Date(e);return isNaN(t.getTime())?"":(0,r.m)(t,{addSuffix:!0,...s?{locale:s}:{}})}function i(e){let s=new Date(e);if(isNaN(s.getTime()))return"";let t=Math.round((Date.now()-s.getTime())/1e3);if(t<45)return"now";let r=Math.round(t/60);if(r<60)return"".concat(r,"m ago");let a=Math.round(r/60);if(a<24)return"".concat(a,"h ago");let n=Math.round(a/24);return n<7?"".concat(n,"d ago"):n<30?"".concat(Math.round(n/7),"w ago"):n<365?"".concat(Math.round(n/30),"mo ago"):"".concat(Math.round(n/365),"y ago")}function l(e,s){return!(e instanceof Date)||isNaN(e.getTime())?"":(0,a.GP)(e,"PPp",s?{locale:s}:void 0)}},87047:(e,s,t)=>{Promise.resolve().then(t.bind(t,74500))}},e=>{e.O(0,[6809,4909,2770,790,4974,9948,6402,744,6488,4560,8441,1255,7358],()=>e(e.s=87047)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9404],{1150:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let l=s(95155),a=s(12115),r=s(24437);function i(e){return{default:e&&"default"in e?e.default:e}}s(36552);let n={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},d=function(e){let t={...n,...e},s=(0,a.lazy)(()=>t.loader().then(i)),d=t.loading;function o(e){let i=d?(0,l.jsx)(d,{isLoading:!0,pastDelay:!0,error:null}):null,n=!t.ssr||!!t.loading,o=n?a.Suspense:a.Fragment,c=t.ssr?(0,l.jsxs)(l.Fragment,{children:[null,(0,l.jsx)(s,{...e})]}):(0,l.jsx)(r.BailoutToCSR,{reason:"next/dynamic",children:(0,l.jsx)(s,{...e})});return(0,l.jsx)(o,{...n?{fallback:i}:{},children:c})}return o.displayName="LoadableComponent",o}},1226:()=>{},8567:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return l.workAsyncStorageInstance}});let l=s(17828)},17828:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return l}});let l=(0,s(64054).createAsyncLocalStorage)()},24437:(e,t,s)=>{"use strict";function l(e){let{reason:t,children:s}=e;return s}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return l}}),s(24553)},35626:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});let l=(0,s(71847).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},36552:(e,t,s)=>{"use strict";function l(e){let{moduleIds:t}=e;return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return l}}),s(95155),s(47650),s(8567),s(77278)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var s in t)Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}(t,{bindSnapshot:function(){return i},createAsyncLocalStorage:function(){return r},createSnapshot:function(){return n}});let s=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class l{disable(){throw s}getStore(){}run(){throw s}exit(){throw s}enterWith(){throw s}static bind(e){return e}}let a="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;function r(){return a?new a:new l}function i(e){return a?a.bind(e):l.bind(e)}function n(){return a?a.snapshot():function(e,...t){return e(...t)}}},64386:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>A});var l=s(95155),a=s(20063),r=s(4560),i=s(12115),n=s(52619),d=s.n(n),o=s(18955),c=s(35626),u=s(744),m=s(75333),x=s(68331),h=s(24027),g=s(95584);function p(e){let{changelog:t}=e,s=(0,o.c)("skills"),a=(0,g.RG)(t).trim();return 0===a.length?(0,l.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"skill-changelog-empty",children:s("detail.changelogEmpty")}):(0,l.jsxs)("div",{"data-testid":"skill-changelog",children:[(0,l.jsx)("div",{className:"prose prose-sm max-w-none dark:prose-invert break-words",children:(0,l.jsx)(h.G8,{content:a})}),(0,l.jsx)("p",{className:"mt-2 text-xs text-muted-foreground",children:s("detail.mediaStripped")})]})}var f=s(34380),j=s(37381),b=s(80130);let k={status:"loading",catalog:null,skill:null,failure:null};function y(e){let{label:t,children:s,mono:a=!1}=e;return(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("dt",{className:"text-xs font-medium text-muted-foreground",children:t}),(0,l.jsx)("dd",{className:"mt-0.5 text-sm text-foreground ".concat(a?"break-all font-mono text-xs":"break-words"),children:s})]})}function v(e){let{title:t,children:s,testId:a}=e;return(0,l.jsxs)(u.Zp,{"data-testid":a,className:"space-y-3",children:[(0,l.jsx)("h2",{className:"text-base font-semibold text-foreground",children:t}),s]})}function N(e){var t;let{compatibility:s}=e,a=(0,o.c)("skills");return(0,l.jsx)("p",{className:"text-sm text-foreground","data-testid":"skill-compatibility-reason",children:a((0,g.e5)(s.messageKey),{range:s.requiredRange,currentVersion:null!=(t=s.currentVersion)?t:""})})}function w(e){let{version:t}=e,s=(0,o.c)("skills");return(0,l.jsxs)(u.Zp,{"data-testid":"skill-version-".concat(t.version),className:"space-y-3",padding:"sm",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,l.jsx)("span",{className:"font-mono text-sm font-semibold text-foreground",children:t.version}),t.prerelease&&(0,l.jsx)(u.Ex,{variant:"warning",children:s("detail.prerelease")}),(0,l.jsx)(m.Xz,{status:t.compatibility.commandmate.status}),(0,l.jsx)(m.qW,{risk:t.declaredRisk})]}),(0,l.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,l.jsx)(y,{label:s("detail.publishedAt"),children:t.publishedAt}),(0,l.jsx)(y,{label:s("detail.requiredRangeLabel"),children:t.compatibility.commandmate.requiredRange}),(0,l.jsx)(y,{label:s("detail.sourceRepository"),children:t.source.repository}),(0,l.jsx)(y,{label:s("detail.sourceRef"),children:t.source.ref}),(0,l.jsx)(y,{label:s("detail.sourceCommit"),mono:!0,children:t.source.commit}),(0,l.jsx)(y,{label:s("detail.packageAsset"),mono:!0,children:t.artifact.assetName}),(0,l.jsx)(y,{label:s("detail.packageDigest"),mono:!0,children:t.artifact.sha256}),(0,l.jsx)(y,{label:s("detail.packageSize"),children:s("detail.packageBytes",{bytes:t.artifact.size})})]}),(0,l.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.compatibility.agents.length>0?t.compatibility.agents.map(e=>(0,l.jsx)(m.uE,{agent:e},e.agent)):(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:s("compatibility.agentsUnknown")})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"text-xs font-medium text-muted-foreground",children:s("detail.changelogHeading")}),(0,l.jsx)("div",{className:"mt-1",children:(0,l.jsx)(p,{changelog:t.changelog})})]})]})}function _(e){var t,s,a,r,n,h,p,_;let{skillId:A}=e,O=(0,o.c)("skills"),[P,R]=(0,i.useState)(k),[V,E]=(0,i.useState)(0);(0,i.useEffect)(()=>{let e=new AbortController;return R(k),(0,b.Db)(A,e.signal).then(t=>{e.signal.aborted||R(t.ok?{status:"loaded",catalog:t.data.catalog,skill:t.data.skill,failure:null}:{status:"error",catalog:null,skill:null,failure:t.failure})}).catch(()=>{}),()=>e.abort()},[A,V]);let I=(0,i.useCallback)(()=>E(e=>e+1),[]),S=(0,l.jsxs)(d(),{href:"/skills",className:"inline-flex items-center gap-1 text-sm text-accent-600 hover:underline dark:text-accent-400","data-testid":"skill-detail-back",children:[(0,l.jsx)(c.A,{size:14,"aria-hidden":"true"}),O("page.backToCatalog")]});if("loading"===P.status)return(0,l.jsxs)("div",{className:"space-y-4","data-testid":"skill-detail-loading",children:[S,(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:O("state.loading")}),(0,l.jsx)(u.EA,{className:"h-40 w-full rounded-lg"})]});if("error"===P.status||!P.skill){let e=(null==(s=P.failure)?void 0:s.status)===404;return(0,l.jsxs)("div",{className:"space-y-4",children:[S,(0,l.jsxs)(u.Zp,{"data-testid":e?"skill-detail-not-found":"skill-detail-error",className:"space-y-3",children:[(0,l.jsx)("h2",{className:"text-base font-semibold text-foreground",children:e?O("state.notFoundHeading"):O("state.errorHeading")}),(0,l.jsxs)(j.u,{tone:"danger",children:[(0,l.jsx)("p",{children:e?O("state.notFoundNotice"):O("state.errorNotice")}),(0,l.jsx)("p",{className:"mt-1 break-words",children:O("state.errorCode",{code:null!=(r=null==(a=P.failure)?void 0:a.code)?r:""})})]}),!e&&(0,l.jsx)(u.$n,{variant:"secondary",size:"sm",onClick:I,"data-testid":"skill-detail-retry",children:O("state.retry")})]})]})}let C=P.skill,M=C.compatibility,q=null!=(n=C.versions.find(e=>e.version===C.recommendedVersion))?n:null,z=null!=(h=null==(t=null!=q?q:C.versions[0])?void 0:t.declaredRisk)?h:null,L=C.recommendedVersion?M&&"compatible"!==M.status?O("detail.install.blockedIncompatible",{reason:O((0,g.e5)(M.messageKey),{range:M.requiredRange,currentVersion:null!=(p=M.currentVersion)?p:""})}):null:O("detail.install.blockedNoVersion");return(0,l.jsxs)("div",{className:"space-y-4",children:[S,P.catalog&&(0,l.jsx)(x.y,{catalog:P.catalog}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("h1",{className:"text-2xl font-bold text-foreground break-words",children:C.name}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground break-words",children:C.summary}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[M&&(0,l.jsx)(m.Xz,{status:M.status}),z&&(0,l.jsx)(m.qW,{risk:z})]})]}),(0,l.jsx)(v,{title:O("detail.install.action"),testId:"skill-install-section",children:(0,l.jsx)(f.B,{skillId:C.id,version:C.recommendedVersion,blockedReason:L})}),(0,l.jsxs)(v,{title:O("capabilities.heading"),testId:"skill-capabilities-section",children:[(0,l.jsx)("p",{className:"text-sm text-foreground break-words",children:C.summary}),(0,l.jsx)(j.u,{tone:"neutral",children:O("capabilities.unavailable")})]}),(0,l.jsxs)(v,{title:O("detail.overview"),testId:"skill-overview-section",children:[(0,l.jsxs)("dl",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,l.jsx)(y,{label:O("detail.skillId"),mono:!0,children:C.id}),(0,l.jsx)(y,{label:O("detail.provider"),children:C.provider.url?(0,l.jsx)("a",{href:C.provider.url,target:"_blank",rel:"noopener noreferrer",className:"text-accent-600 hover:underline dark:text-accent-400",children:C.provider.name}):C.provider.name}),C.provider.contact&&(0,l.jsx)(y,{label:O("detail.providerContact"),children:C.provider.contact}),(0,l.jsx)(y,{label:O("detail.license"),children:C.license}),C.homepage&&(0,l.jsx)(y,{label:O("detail.homepage"),children:(0,l.jsx)("a",{href:C.homepage,target:"_blank",rel:"noopener noreferrer",className:"break-all text-accent-600 hover:underline dark:text-accent-400",children:C.homepage})}),(0,l.jsx)(y,{label:O("detail.latestVersion"),mono:!0,children:C.latest}),(0,l.jsx)(y,{label:O("detail.recommendedVersion"),mono:!0,children:null!=(_=C.recommendedVersion)?_:O("detail.recommendedVersionNone")})]}),(0,l.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"skill-recommendation-reason",children:O(g.TE[C.recommendedReason])}),C.keywords.length>0&&(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"text-xs font-medium text-muted-foreground",children:O("detail.keywords")}),(0,l.jsx)("div",{className:"mt-1 flex flex-wrap gap-1.5",children:C.keywords.map(e=>(0,l.jsx)(u.Ex,{variant:"gray",children:e},e))})]})]}),(0,l.jsxs)(v,{title:O("compatibility.label"),testId:"skill-compatibility-section",children:[M?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,l.jsx)(m.Xz,{status:M.status}),(0,l.jsx)("span",{className:"text-sm text-muted-foreground",children:O("compatibility.requiredRange",{range:M.requiredRange})})]}),(0,l.jsx)(N,{compatibility:M}),(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:M.currentVersion?O("compatibility.currentVersion",{version:M.currentVersion}):O("compatibility.currentVersionUnknown")}),"unknown"===M.status&&(0,l.jsx)(j.u,{tone:"warning","data-testid":"skill-compatibility-unknown-notice",children:O("compatibility.unverifiedNotice")})]}):(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:O("compatibility.currentVersionUnknown")}),(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsx)("h3",{className:"text-sm font-medium text-foreground",children:O("compatibility.agentsHeading")}),q&&q.compatibility.agents.length>0?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"flex flex-wrap gap-1.5",children:q.compatibility.agents.map(e=>(0,l.jsx)(m.uE,{agent:e},e.agent))}),(0,l.jsx)("ul",{className:"space-y-1",children:q.compatibility.agents.map(e=>(0,l.jsxs)("li",{className:"text-xs text-muted-foreground break-words",children:[O("compatibility.evidence"),": ",e.evidence]},e.agent))})]}):(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:O("compatibility.agentsUnknown")}),(0,l.jsx)(j.u,{tone:"neutral",children:O("compatibility.agentsNotice")})]})]}),(0,l.jsxs)(v,{title:O("risk.declaredHeading"),testId:"skill-risk-section",children:[z?(0,l.jsx)(m.qW,{risk:z}):null,(0,l.jsx)(j.u,{tone:"neutral",children:O("risk.declaredNotice")}),"high"===z&&(0,l.jsx)(j.u,{tone:"danger","data-testid":"skill-high-risk-warning",children:O("risk.highWarning")}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"text-sm font-medium text-foreground",children:O("risk.computedHeading")}),(0,l.jsx)("p",{className:"mt-1 text-sm text-muted-foreground","data-testid":"skill-computed-risk-unavailable",children:O("risk.computedUnavailable")})]})]}),(0,l.jsxs)(v,{title:O("permissions.heading"),testId:"skill-permissions-section",children:[(0,l.jsx)(j.u,{tone:"warning","data-testid":"skill-permission-declaration-notice",children:O((0,g.e5)("skills.permissions.declarationOnlyNotice"))}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:O("permissions.unavailable")})]}),(0,l.jsx)(v,{title:O("requirements.heading"),testId:"skill-requirements-section",children:(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:O("requirements.unavailable")})}),(0,l.jsx)(v,{title:O("contents.heading"),testId:"skill-contents-section",children:(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:O("contents.unavailable")})}),(0,l.jsxs)("section",{className:"space-y-3","data-testid":"skill-versions-section",children:[(0,l.jsx)("h2",{className:"text-base font-semibold text-foreground",children:O("detail.versionsHeading")}),0===C.versions.length?(0,l.jsx)(u.Zp,{children:(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:O("detail.versionsEmpty")})}):C.versions.map(e=>(0,l.jsx)(w,{version:e},e.version))]})]})}function A(){let e=(0,a.useParams)(),t="string"==typeof e.skillId?e.skillId:"";return(0,l.jsx)(r.GV,{children:(0,l.jsx)("div",{className:"container-custom py-8 overflow-auto h-full",children:(0,l.jsx)(_,{skillId:t})})})}},67909:(e,t,s)=>{"use strict";s.d(t,{default:()=>a.a});var l=s(86278),a=s.n(l)},68331:(e,t,s)=>{"use strict";s.d(t,{y:()=>n});var l=s(95155);s(12115);var a=s(18955),r=s(37381),i=s(95584);function n(e){let{catalog:t}=e,s=(0,a.c)("skills");return t.stale||t.offline?(0,l.jsx)(r.u,{tone:"warning","data-testid":"skill-catalog-stale",className:"flex-col sm:flex-row",children:(0,l.jsxs)("div",{className:"space-y-1",children:[(0,l.jsx)("p",{className:"font-medium",children:s("catalog.staleHeading")}),(0,l.jsx)("p",{children:s("catalog.staleNotice")}),t.offline&&(0,l.jsx)("p",{children:s("catalog.offlineNotice")}),(0,l.jsx)("p",{children:s((0,i.pk)(t.staleReason))}),(0,l.jsxs)("p",{className:"break-words",children:[s("catalog.fetchedAt",{timestamp:t.fetchedAt})," \xb7"," ",s("catalog.revalidatedAt",{timestamp:t.revalidatedAt})]}),(0,l.jsx)("p",{className:"break-words",children:s("catalog.sourceLabel",{repository:t.source.repository,ref:t.source.ref})})]})}):(0,l.jsxs)("p",{"data-testid":"skill-catalog-fresh",className:"text-xs text-muted-foreground break-words",children:[s("catalog.freshLabel")," \xb7"," ",s("catalog.revalidatedAt",{timestamp:t.revalidatedAt})," \xb7"," ",s("catalog.sourceLabel",{repository:t.source.repository,ref:t.source.ref})]})}},77801:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});let l=(0,s(71847).A)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]])},86278:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let l=s(28140)._(s(1150));function a(e,t){var s;let a={};"function"==typeof e&&(a.loader=e);let r={...a,...t};return(0,l.default)({...r,modules:null==(s=r.loadableGenerated)?void 0:s.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},99027:(e,t,s)=>{Promise.resolve().then(s.bind(s,64386))}},e=>{e.O(0,[6481,6809,4909,2770,790,4974,8566,2069,934,6007,6402,744,6488,4560,3418,1668,4027,8441,1255,7358],()=>e(e.s=99027)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9501],{16530:(e,s,t)=>{Promise.resolve().then(t.bind(t,99898))},68331:(e,s,t)=>{"use strict";t.d(s,{y:()=>c});var l=t(95155);t(12115);var a=t(18955),r=t(37381),i=t(95584);function c(e){let{catalog:s}=e,t=(0,a.c)("skills");return s.stale||s.offline?(0,l.jsx)(r.u,{tone:"warning","data-testid":"skill-catalog-stale",className:"flex-col sm:flex-row",children:(0,l.jsxs)("div",{className:"space-y-1",children:[(0,l.jsx)("p",{className:"font-medium",children:t("catalog.staleHeading")}),(0,l.jsx)("p",{children:t("catalog.staleNotice")}),s.offline&&(0,l.jsx)("p",{children:t("catalog.offlineNotice")}),(0,l.jsx)("p",{children:t((0,i.pk)(s.staleReason))}),(0,l.jsxs)("p",{className:"break-words",children:[t("catalog.fetchedAt",{timestamp:s.fetchedAt})," \xb7"," ",t("catalog.revalidatedAt",{timestamp:s.revalidatedAt})]}),(0,l.jsx)("p",{className:"break-words",children:t("catalog.sourceLabel",{repository:s.source.repository,ref:s.source.ref})})]})}):(0,l.jsxs)("p",{"data-testid":"skill-catalog-fresh",className:"text-xs text-muted-foreground break-words",children:[t("catalog.freshLabel")," \xb7"," ",t("catalog.revalidatedAt",{timestamp:s.revalidatedAt})," \xb7"," ",t("catalog.sourceLabel",{repository:s.source.repository,ref:s.source.ref})]})}},77801:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});let l=(0,t(71847).A)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]])},99898:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>N});var l=t(95155),a=t(18955),r=t(4560),i=t(12115),c=t(744),n=t(54014),o=t(68331),d=t(52619),u=t.n(d),m=t(75333),x=t(95584);function h(e){var s;let{skill:t}=e,r=(0,a.c)("skills"),i=(0,x.gh)(t),o=(0,x.r0)(t);return(0,l.jsx)(u(),{href:"/skills/".concat(encodeURIComponent(t.id)),className:"block focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-lg","data-testid":"skill-card-".concat(t.id),children:(0,l.jsx)(c.Zp,{variant:"interactive",className:"h-full",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h3",{className:"truncate text-base font-semibold text-foreground",children:t.name}),(0,l.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:r("card.provider",{provider:t.provider.name})})]}),(0,l.jsx)("span",{className:"shrink-0 text-xs font-medium text-muted-foreground",children:null!=(s=t.recommendedVersion)?s:r("card.noRecommendedVersion")})]}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground line-clamp-3",children:t.summary}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[t.compatibility&&(0,l.jsx)(m.Xz,{status:t.compatibility.status}),i&&(0,l.jsx)(m.qW,{risk:i}),o.map(e=>(0,l.jsx)(c.Ex,{variant:"gray",children:(0,n.f_)(e)},e))]})]})})})}var g=t(37381),f=t(80130);let p="w-full rounded-md border border-input bg-surface px-3 py-2 text-sm text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",j=["compatible","incompatible","unknown"],k=["low","moderate","high"],v={status:"loading",catalog:null,skills:[],failure:null};function b(){let e=(0,a.c)("skills"),[s,t]=(0,i.useState)(v),[r,d]=(0,i.useState)(x.IV),[u,m]=(0,i.useState)(0);(0,i.useEffect)(()=>{let e=new AbortController;return t(v),(0,f.s5)(e.signal).then(s=>{e.signal.aborted||t(s.ok?{status:"loaded",catalog:s.data.catalog,skills:s.data.skills,failure:null}:{status:"error",catalog:null,skills:[],failure:s.failure})}).catch(()=>{}),()=>e.abort()},[u]);let b=(0,i.useCallback)(()=>m(e=>e+1),[]),N=(0,i.useCallback)((e,s)=>d(t=>({...t,[e]:s})),[]),y=(0,i.useMemo)(()=>(0,x.AJ)(s.skills),[s.skills]),w=(0,i.useMemo)(()=>(0,x.$d)(s.skills,r),[s.skills,r]);if("loading"===s.status)return(0,l.jsxs)("div",{"data-testid":"skill-catalog-loading",className:"space-y-3",children:[(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:e("state.loading")}),[0,1,2].map(e=>(0,l.jsx)(c.EA,{className:"h-28 w-full rounded-lg"},e))]});if("error"===s.status){var C,A;return(0,l.jsxs)(c.Zp,{"data-testid":"skill-catalog-error",className:"space-y-3",children:[(0,l.jsx)("h2",{className:"text-base font-semibold text-foreground",children:e("state.errorHeading")}),(0,l.jsxs)(g.u,{tone:"danger",children:[(0,l.jsx)("p",{children:e("state.errorNotice")}),(0,l.jsx)("p",{className:"mt-1 break-words",children:e("state.errorCode",{code:null!=(A=null==(C=s.failure)?void 0:C.code)?A:""})})]}),(0,l.jsx)(c.$n,{variant:"secondary",size:"sm",onClick:b,"data-testid":"skill-catalog-retry",children:e("state.retry")})]})}return(0,l.jsxs)("div",{className:"space-y-4",children:[s.catalog&&(0,l.jsx)(o.y,{catalog:s.catalog}),(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsx)(c.pd,{type:"search",value:r.query,onChange:e=>N("query",e.target.value),"aria-label":e("search.label"),placeholder:e("search.placeholder"),"data-testid":"skill-search-input"}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[(0,l.jsxs)("label",{className:"block text-xs font-medium text-muted-foreground",children:[e("filters.compatibility"),(0,l.jsxs)("select",{className:"".concat(p," mt-1"),value:r.compatibility,onChange:e=>N("compatibility",e.target.value),"data-testid":"skill-filter-compatibility",children:[(0,l.jsx)("option",{value:"all",children:e("filters.all")}),j.map(s=>(0,l.jsx)("option",{value:s,children:e(x.OV[s])},s))]})]}),(0,l.jsxs)("label",{className:"block text-xs font-medium text-muted-foreground",children:[e("filters.risk"),(0,l.jsxs)("select",{className:"".concat(p," mt-1"),value:r.risk,onChange:e=>N("risk",e.target.value),"data-testid":"skill-filter-risk",children:[(0,l.jsx)("option",{value:"all",children:e("filters.all")}),k.map(s=>(0,l.jsx)("option",{value:s,children:e(x.pP[s])},s))]})]}),(0,l.jsxs)("label",{className:"block text-xs font-medium text-muted-foreground",children:[e("filters.agent"),(0,l.jsxs)("select",{className:"".concat(p," mt-1"),value:r.agent,onChange:e=>N("agent",e.target.value),"data-testid":"skill-filter-agent",children:[(0,l.jsx)("option",{value:"all",children:e("filters.all")}),y.map(e=>(0,l.jsx)("option",{value:e,children:(0,n.f_)(e)},e))]})]})]}),(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,l.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"skill-result-count",children:e("search.resultCount",{shown:w.length,total:s.skills.length})}),(0,l.jsx)(c.$n,{variant:"ghost",size:"sm",onClick:()=>d(x.IV),"data-testid":"skill-filter-reset",children:e("filters.reset")})]})]}),0===s.skills.length?(0,l.jsx)(c.Zp,{"data-testid":"skill-catalog-empty",children:(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:e("state.empty")})}):0===w.length?(0,l.jsxs)(c.Zp,{"data-testid":"skill-catalog-no-results",children:[(0,l.jsx)("p",{className:"text-sm text-foreground",children:e("state.noResults")}),(0,l.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e("state.noResultsHint")})]}):(0,l.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3",children:w.map(e=>(0,l.jsx)(h,{skill:e},e.id))})]})}function N(){let e=(0,a.c)("skills");return(0,l.jsx)(r.GV,{children:(0,l.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:e("page.title")}),(0,l.jsx)("p",{className:"text-sm text-muted-foreground",children:e("page.description")})]}),(0,l.jsx)(b,{})]})})}}},e=>{e.O(0,[6809,4909,2770,790,4974,6402,744,6488,4560,3418,8441,1255,7358],()=>e(e.s=16530)),_N_E=e.O()}]);