commandmate 0.16.0 → 0.17.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 (616) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +286 -216
  3. package/.next/app-path-routes-manifest.json +37 -27
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +9 -9
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +57 -0
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/app/update-check/route.js +1 -1
  11. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/assistant/conversation/route.js +1 -1
  13. package/.next/server/app/api/assistant/conversation/route.js.nft.json +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.js +1 -1
  16. package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
  17. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  18. package/.next/server/app/api/assistant/messages/route.js +1 -1
  19. package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
  20. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  21. package/.next/server/app/api/assistant/session/route.js +1 -1
  22. package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
  23. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  24. package/.next/server/app/api/assistant/start/route.js +1 -1
  25. package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
  26. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/assistant/terminal/route.js +3 -3
  28. package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
  29. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/assistant/tools/route.js +1 -1
  31. package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
  32. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  34. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/fs/recent-paths/route.js +1 -1
  43. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/hooks/agent-event/route.js +1 -0
  45. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -0
  46. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -0
  47. package/.next/server/app/api/hooks/claude-done/route.js +1 -1
  48. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  49. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  50. package/.next/server/app/api/metrics/vibe/route.js +37 -0
  51. package/.next/server/app/api/metrics/vibe/route.js.nft.json +1 -0
  52. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -0
  53. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  55. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  56. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route.js +1 -1
  59. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  60. package/.next/server/app/api/repositories/[id]/todos/route.js +1 -1
  61. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  63. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  64. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/repositories/clone/route.js +1 -1
  66. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  67. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/restore/route.js +1 -1
  70. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  71. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  72. package/.next/server/app/api/repositories/route.js +1 -1
  73. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  74. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/repositories/scan/route.js +1 -1
  76. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  77. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/repositories/sync/route.js +1 -1
  79. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  80. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  85. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/tasks/[taskId]/cancel/route.js +4 -0
  90. package/.next/server/app/api/tasks/[taskId]/cancel/route.js.nft.json +1 -0
  91. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -0
  92. package/.next/server/app/api/tasks/[taskId]/route.js +4 -0
  93. package/.next/server/app/api/tasks/[taskId]/route.js.nft.json +1 -0
  94. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -0
  95. package/.next/server/app/api/templates/[id]/route.js +1 -1
  96. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/templates/route.js +1 -1
  98. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/todos/route.js +1 -1
  100. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -0
  102. package/.next/server/app/api/verification/runs/[runId]/route.js.nft.json +1 -0
  103. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -0
  104. package/.next/server/app/api/verification/runs/route.js +1 -0
  105. package/.next/server/app/api/verification/runs/route.js.nft.json +1 -0
  106. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -0
  107. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  109. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  112. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  118. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  119. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
  123. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  124. package/.next/server/app/api/worktrees/[id]/files/[...path]/route.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  174. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  177. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/logs/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  189. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  192. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  195. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  198. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
  204. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  209. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  212. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/skills/route.js +2 -2
  218. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  223. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/start-polling/route.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +1 -1
  226. package/.next/server/app/api/worktrees/[id]/start-polling/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/tasks/route.js +6 -0
  228. package/.next/server/app/api/worktrees/[id]/tasks/route.js.nft.json +1 -0
  229. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -0
  230. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  231. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  232. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  234. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  235. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  236. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  237. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  238. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  239. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  240. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  241. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  242. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/tree/route.js +1 -1
  245. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  248. package/.next/server/app/api/worktrees/[id]/verify/route.js +4 -0
  249. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -0
  250. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -0
  251. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -0
  252. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js.nft.json +1 -0
  253. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -0
  254. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -0
  255. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js.nft.json +1 -0
  256. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -0
  257. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  259. package/.next/server/app/api/worktrees/route.js +1 -1
  260. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  261. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  262. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  263. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  264. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  265. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  266. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  267. package/.next/server/app/page_client-reference-manifest.js +1 -1
  268. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  269. package/.next/server/app/repositories/page.js +1 -1
  270. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  271. package/.next/server/app/review/page.js +1 -1
  272. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  273. package/.next/server/app/sessions/page.js +1 -1
  274. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  275. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  276. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  277. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  278. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  279. package/.next/server/app/worktrees/[id]/page.js +2 -2
  280. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  281. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  282. package/.next/server/app-paths-manifest.json +37 -27
  283. package/.next/server/chunks/1068.js +1 -1
  284. package/.next/server/chunks/1117.js +1 -1
  285. package/.next/server/chunks/1503.js +2 -0
  286. package/.next/server/chunks/2366.js +1 -0
  287. package/.next/server/chunks/3042.js +1 -1
  288. package/.next/server/chunks/3736.js +1 -1
  289. package/.next/server/chunks/4444.js +1 -1
  290. package/.next/server/chunks/4689.js +25 -0
  291. package/.next/server/chunks/5381.js +50 -10
  292. package/.next/server/chunks/5959.js +3 -3
  293. package/.next/server/chunks/6130.js +1 -1
  294. package/.next/server/chunks/6274.js +13 -0
  295. package/.next/server/chunks/646.js +1 -1
  296. package/.next/server/chunks/8681.js +1 -1
  297. package/.next/server/chunks/8807.js +192 -51
  298. package/.next/server/chunks/8856.js +4 -0
  299. package/.next/server/chunks/9687.js +2 -2
  300. package/.next/server/middleware-manifest.json +5 -5
  301. package/.next/server/pages/500.html +1 -1
  302. package/.next/server/server-reference-manifest.json +1 -1
  303. package/.next/static/chunks/{4560-8ffb0bb19f2ba998.js → 4560-0917ae2e6a0e5400.js} +1 -1
  304. package/.next/static/chunks/{6488-c2a968ec806975c2.js → 6488-f4e447464c9e0e22.js} +1 -1
  305. package/.next/static/chunks/app/api/app/update/route-8440b6c72bed83a1.js +1 -0
  306. package/.next/static/chunks/app/api/app/update-check/route-8440b6c72bed83a1.js +1 -0
  307. package/.next/static/chunks/app/api/assistant/conversation/route-8440b6c72bed83a1.js +1 -0
  308. package/.next/static/chunks/app/api/assistant/current-output/route-8440b6c72bed83a1.js +1 -0
  309. package/.next/static/chunks/app/api/assistant/messages/route-8440b6c72bed83a1.js +1 -0
  310. package/.next/static/chunks/app/api/assistant/session/route-8440b6c72bed83a1.js +1 -0
  311. package/.next/static/chunks/app/api/assistant/start/route-8440b6c72bed83a1.js +1 -0
  312. package/.next/static/chunks/app/api/assistant/terminal/route-8440b6c72bed83a1.js +1 -0
  313. package/.next/static/chunks/app/api/assistant/tools/route-8440b6c72bed83a1.js +1 -0
  314. package/.next/static/chunks/app/api/auth/login/route-8440b6c72bed83a1.js +1 -0
  315. package/.next/static/chunks/app/api/auth/logout/route-8440b6c72bed83a1.js +1 -0
  316. package/.next/static/chunks/app/api/auth/status/route-8440b6c72bed83a1.js +1 -0
  317. package/.next/static/chunks/app/api/daily-summary/route-8440b6c72bed83a1.js +1 -0
  318. package/.next/static/chunks/app/api/daily-summary/status/route-8440b6c72bed83a1.js +1 -0
  319. package/.next/static/chunks/app/api/external-apps/[id]/health/route-8440b6c72bed83a1.js +1 -0
  320. package/.next/static/chunks/app/api/external-apps/[id]/route-8440b6c72bed83a1.js +1 -0
  321. package/.next/static/chunks/app/api/external-apps/route-8440b6c72bed83a1.js +1 -0
  322. package/.next/static/chunks/app/api/fs/browse/route-8440b6c72bed83a1.js +1 -0
  323. package/.next/static/chunks/app/api/fs/recent-paths/route-8440b6c72bed83a1.js +1 -0
  324. package/.next/static/chunks/app/api/hooks/agent-event/route-8440b6c72bed83a1.js +1 -0
  325. package/.next/static/chunks/app/api/hooks/claude-done/route-8440b6c72bed83a1.js +1 -0
  326. package/.next/static/chunks/app/api/metrics/vibe/route-8440b6c72bed83a1.js +1 -0
  327. package/.next/static/chunks/app/api/ollama/models/route-8440b6c72bed83a1.js +1 -0
  328. package/.next/static/chunks/app/api/push/subscriptions/route-8440b6c72bed83a1.js +1 -0
  329. package/.next/static/chunks/app/api/push/vapid/route-8440b6c72bed83a1.js +1 -0
  330. package/.next/static/chunks/app/api/repositories/[id]/route-8440b6c72bed83a1.js +1 -0
  331. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +1 -0
  332. package/.next/static/chunks/app/api/repositories/[id]/todos/route-8440b6c72bed83a1.js +1 -0
  333. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-8440b6c72bed83a1.js +1 -0
  334. package/.next/static/chunks/app/api/repositories/clone/route-8440b6c72bed83a1.js +1 -0
  335. package/.next/static/chunks/app/api/repositories/excluded/route-8440b6c72bed83a1.js +1 -0
  336. package/.next/static/chunks/app/api/repositories/restore/route-8440b6c72bed83a1.js +1 -0
  337. package/.next/static/chunks/app/api/repositories/route-8440b6c72bed83a1.js +1 -0
  338. package/.next/static/chunks/app/api/repositories/scan/route-8440b6c72bed83a1.js +1 -0
  339. package/.next/static/chunks/app/api/repositories/sync/route-8440b6c72bed83a1.js +1 -0
  340. package/.next/static/chunks/app/api/repositories/validate-path/route-8440b6c72bed83a1.js +1 -0
  341. package/.next/static/chunks/app/api/sidebar/group-order/route-8440b6c72bed83a1.js +1 -0
  342. package/.next/static/chunks/app/api/skills/[id]/route-8440b6c72bed83a1.js +1 -0
  343. package/.next/static/chunks/app/api/skills/installations/route-8440b6c72bed83a1.js +1 -0
  344. package/.next/static/chunks/app/api/skills/operations/route-8440b6c72bed83a1.js +1 -0
  345. package/.next/static/chunks/app/api/skills/reindex/route-8440b6c72bed83a1.js +1 -0
  346. package/.next/static/chunks/app/api/skills/route-8440b6c72bed83a1.js +1 -0
  347. package/.next/static/chunks/app/api/slash-commands/route-8440b6c72bed83a1.js +1 -0
  348. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-8440b6c72bed83a1.js +1 -0
  349. package/.next/static/chunks/app/api/tasks/[taskId]/route-8440b6c72bed83a1.js +1 -0
  350. package/.next/static/chunks/app/api/templates/[id]/route-8440b6c72bed83a1.js +1 -0
  351. package/.next/static/chunks/app/api/templates/route-8440b6c72bed83a1.js +1 -0
  352. package/.next/static/chunks/app/api/todos/route-8440b6c72bed83a1.js +1 -0
  353. package/.next/static/chunks/app/api/verification/runs/[runId]/route-8440b6c72bed83a1.js +1 -0
  354. package/.next/static/chunks/app/api/verification/runs/route-8440b6c72bed83a1.js +1 -0
  355. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-8440b6c72bed83a1.js +1 -0
  356. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-8440b6c72bed83a1.js +1 -0
  357. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-8440b6c72bed83a1.js +1 -0
  358. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-8440b6c72bed83a1.js +1 -0
  359. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-8440b6c72bed83a1.js +1 -0
  360. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-8440b6c72bed83a1.js +1 -0
  361. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-8440b6c72bed83a1.js +1 -0
  362. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-8440b6c72bed83a1.js +1 -0
  363. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-8440b6c72bed83a1.js +1 -0
  364. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-8440b6c72bed83a1.js +1 -0
  365. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-8440b6c72bed83a1.js +1 -0
  366. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-8440b6c72bed83a1.js +1 -0
  367. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-8440b6c72bed83a1.js +1 -0
  368. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-8440b6c72bed83a1.js +1 -0
  369. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-8440b6c72bed83a1.js +1 -0
  370. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-8440b6c72bed83a1.js +1 -0
  371. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-8440b6c72bed83a1.js +1 -0
  372. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-8440b6c72bed83a1.js +1 -0
  373. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-8440b6c72bed83a1.js +1 -0
  374. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-8440b6c72bed83a1.js +1 -0
  375. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-8440b6c72bed83a1.js +1 -0
  376. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-8440b6c72bed83a1.js +1 -0
  377. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-8440b6c72bed83a1.js +1 -0
  378. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-8440b6c72bed83a1.js +1 -0
  379. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-8440b6c72bed83a1.js +1 -0
  380. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-8440b6c72bed83a1.js +1 -0
  381. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-8440b6c72bed83a1.js +1 -0
  382. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-8440b6c72bed83a1.js +1 -0
  383. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-8440b6c72bed83a1.js +1 -0
  384. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-8440b6c72bed83a1.js +1 -0
  385. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-8440b6c72bed83a1.js +1 -0
  386. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-8440b6c72bed83a1.js +1 -0
  387. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-8440b6c72bed83a1.js +1 -0
  388. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-8440b6c72bed83a1.js +1 -0
  389. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-8440b6c72bed83a1.js +1 -0
  390. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-8440b6c72bed83a1.js +1 -0
  391. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-8440b6c72bed83a1.js +1 -0
  392. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-8440b6c72bed83a1.js +1 -0
  393. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-8440b6c72bed83a1.js +1 -0
  394. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-8440b6c72bed83a1.js +1 -0
  395. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-8440b6c72bed83a1.js +1 -0
  396. package/.next/static/chunks/app/api/worktrees/[id]/route-8440b6c72bed83a1.js +1 -0
  397. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-8440b6c72bed83a1.js +1 -0
  398. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-8440b6c72bed83a1.js +1 -0
  399. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-8440b6c72bed83a1.js +1 -0
  400. package/.next/static/chunks/app/api/worktrees/[id]/search/route-8440b6c72bed83a1.js +1 -0
  401. package/.next/static/chunks/app/api/worktrees/[id]/send/route-8440b6c72bed83a1.js +1 -0
  402. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-8440b6c72bed83a1.js +1 -0
  403. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-8440b6c72bed83a1.js +1 -0
  404. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-8440b6c72bed83a1.js +1 -0
  405. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-8440b6c72bed83a1.js +1 -0
  406. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-8440b6c72bed83a1.js +1 -0
  407. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-8440b6c72bed83a1.js +1 -0
  408. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-8440b6c72bed83a1.js +1 -0
  409. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-8440b6c72bed83a1.js +1 -0
  410. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-8440b6c72bed83a1.js +1 -0
  411. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-8440b6c72bed83a1.js +1 -0
  412. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-8440b6c72bed83a1.js +1 -0
  413. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-8440b6c72bed83a1.js +1 -0
  414. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-8440b6c72bed83a1.js +1 -0
  415. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-8440b6c72bed83a1.js +1 -0
  416. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-8440b6c72bed83a1.js +1 -0
  417. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-8440b6c72bed83a1.js +1 -0
  418. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-8440b6c72bed83a1.js +1 -0
  419. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-8440b6c72bed83a1.js +1 -0
  420. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-8440b6c72bed83a1.js +1 -0
  421. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-8440b6c72bed83a1.js +1 -0
  422. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-8440b6c72bed83a1.js +1 -0
  423. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-8440b6c72bed83a1.js +1 -0
  424. package/.next/static/chunks/app/api/worktrees/route-8440b6c72bed83a1.js +1 -0
  425. package/.next/static/chunks/app/manifest.webmanifest/route-8440b6c72bed83a1.js +1 -0
  426. package/.next/static/chunks/app/proxy/[...path]/route-8440b6c72bed83a1.js +1 -0
  427. package/.next/static/chunks/app/repositories/page-1ed1e5a542ecc168.js +1 -0
  428. package/.next/static/chunks/app/review/{page-f431d630097c2e85.js → page-b559bfb11c46931b.js} +1 -1
  429. package/.next/static/chunks/app/sessions/{page-20f07a99db64d2ca.js → page-3fa7e767d0ab3889.js} +1 -1
  430. package/.next/static/chunks/app/worktrees/[id]/page-5ffc84094830babb.js +1 -0
  431. package/.next/static/gR8Sh86RrTynJON8SWkWK/_buildManifest.js +1 -0
  432. package/.next/trace +12 -11
  433. package/.next/types/app/api/hooks/agent-event/route.ts +347 -0
  434. package/.next/types/app/api/metrics/vibe/route.ts +347 -0
  435. package/.next/types/app/api/tasks/[taskId]/cancel/route.ts +347 -0
  436. package/.next/types/app/api/tasks/[taskId]/route.ts +347 -0
  437. package/.next/types/app/api/verification/runs/[runId]/route.ts +347 -0
  438. package/.next/types/app/api/verification/runs/route.ts +347 -0
  439. package/.next/types/app/api/worktrees/[id]/tasks/route.ts +347 -0
  440. package/.next/types/app/api/worktrees/[id]/verify/route.ts +347 -0
  441. package/.next/types/app/api/worktrees/[id]/verify/runs/[runId]/route.ts +347 -0
  442. package/.next/types/app/api/worktrees/[id]/verify/runs/route.ts +347 -0
  443. package/.next/types/routes.d.ts +11 -1
  444. package/.next/types/validator.ts +90 -0
  445. package/dist/cli/commands/report.d.ts +1 -0
  446. package/dist/cli/commands/report.d.ts.map +1 -1
  447. package/dist/cli/commands/report.js +54 -0
  448. package/dist/cli/commands/send.d.ts.map +1 -1
  449. package/dist/cli/commands/send.js +86 -3
  450. package/dist/cli/commands/task.d.ts +11 -0
  451. package/dist/cli/commands/task.d.ts.map +1 -0
  452. package/dist/cli/commands/task.js +126 -0
  453. package/dist/cli/commands/verify.d.ts +19 -0
  454. package/dist/cli/commands/verify.d.ts.map +1 -0
  455. package/dist/cli/commands/verify.js +229 -0
  456. package/dist/cli/commands/wait.d.ts +2 -0
  457. package/dist/cli/commands/wait.d.ts.map +1 -1
  458. package/dist/cli/commands/wait.js +78 -13
  459. package/dist/cli/docs/agent-operations.d.ts +2 -2
  460. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  461. package/dist/cli/docs/agent-operations.js +92 -3
  462. package/dist/cli/program.d.ts.map +1 -1
  463. package/dist/cli/program.js +6 -0
  464. package/dist/cli/types/api-responses.d.ts +170 -0
  465. package/dist/cli/types/api-responses.d.ts.map +1 -1
  466. package/dist/cli/types/index.d.ts +82 -0
  467. package/dist/cli/types/index.d.ts.map +1 -1
  468. package/dist/cli/types/index.js +30 -1
  469. package/dist/cli/utils/api-client.d.ts +8 -0
  470. package/dist/cli/utils/api-client.d.ts.map +1 -1
  471. package/dist/cli/utils/verify-runner.d.ts +57 -0
  472. package/dist/cli/utils/verify-runner.d.ts.map +1 -0
  473. package/dist/cli/utils/verify-runner.js +174 -0
  474. package/dist/server/server.js +15 -0
  475. package/dist/server/src/config/auto-yes-config.js +22 -0
  476. package/dist/server/src/lib/auto-yes-poller.js +34 -2
  477. package/dist/server/src/lib/auto-yes-state.js +6 -19
  478. package/dist/server/src/lib/db/db.js +34 -1
  479. package/dist/server/src/lib/db/migrations/index.js +6 -0
  480. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  481. package/dist/server/src/lib/db/migrations/v49-verification-runs.js +86 -0
  482. package/dist/server/src/lib/db/migrations/v50-tasks.js +68 -0
  483. package/dist/server/src/lib/db/migrations/v51-task-events.js +58 -0
  484. package/dist/server/src/lib/db/task-events-db.js +59 -0
  485. package/dist/server/src/lib/db/tasks-db.js +218 -0
  486. package/dist/server/src/lib/db/verification-db.js +272 -0
  487. package/dist/server/src/lib/polling/auto-yes-policy.js +117 -0
  488. package/dist/server/src/lib/polling/auto-yes-resolver.js +144 -4
  489. package/dist/server/src/lib/polling/response-checker.js +8 -0
  490. package/dist/server/src/lib/session/agent-event-state.js +46 -0
  491. package/dist/server/src/lib/session/current-output-builder.js +4 -0
  492. package/dist/server/src/lib/session/status-mapping.js +146 -0
  493. package/dist/server/src/lib/tasks/contract-parser.js +385 -0
  494. package/dist/server/src/lib/tasks/task-state-machine.js +183 -0
  495. package/dist/server/src/lib/tasks/task-transition-service.js +106 -0
  496. package/dist/server/src/lib/verification/verification-reconciler.js +49 -0
  497. package/dist/server/src/types/sidebar.js +7 -20
  498. package/package.json +5 -2
  499. package/scripts/hooks/cmate-agent-event.sh +175 -0
  500. package/.next/server/chunks/2064.js +0 -2
  501. package/.next/static/AKqbAyuzbFfg05qpbCI_K/_buildManifest.js +0 -1
  502. package/.next/static/chunks/app/api/app/update/route-55e398bd20e2d7a9.js +0 -1
  503. package/.next/static/chunks/app/api/app/update-check/route-55e398bd20e2d7a9.js +0 -1
  504. package/.next/static/chunks/app/api/assistant/conversation/route-55e398bd20e2d7a9.js +0 -1
  505. package/.next/static/chunks/app/api/assistant/current-output/route-55e398bd20e2d7a9.js +0 -1
  506. package/.next/static/chunks/app/api/assistant/messages/route-55e398bd20e2d7a9.js +0 -1
  507. package/.next/static/chunks/app/api/assistant/session/route-55e398bd20e2d7a9.js +0 -1
  508. package/.next/static/chunks/app/api/assistant/start/route-55e398bd20e2d7a9.js +0 -1
  509. package/.next/static/chunks/app/api/assistant/terminal/route-55e398bd20e2d7a9.js +0 -1
  510. package/.next/static/chunks/app/api/assistant/tools/route-55e398bd20e2d7a9.js +0 -1
  511. package/.next/static/chunks/app/api/auth/login/route-55e398bd20e2d7a9.js +0 -1
  512. package/.next/static/chunks/app/api/auth/logout/route-55e398bd20e2d7a9.js +0 -1
  513. package/.next/static/chunks/app/api/auth/status/route-55e398bd20e2d7a9.js +0 -1
  514. package/.next/static/chunks/app/api/daily-summary/route-55e398bd20e2d7a9.js +0 -1
  515. package/.next/static/chunks/app/api/daily-summary/status/route-55e398bd20e2d7a9.js +0 -1
  516. package/.next/static/chunks/app/api/external-apps/[id]/health/route-55e398bd20e2d7a9.js +0 -1
  517. package/.next/static/chunks/app/api/external-apps/[id]/route-55e398bd20e2d7a9.js +0 -1
  518. package/.next/static/chunks/app/api/external-apps/route-55e398bd20e2d7a9.js +0 -1
  519. package/.next/static/chunks/app/api/fs/browse/route-55e398bd20e2d7a9.js +0 -1
  520. package/.next/static/chunks/app/api/fs/recent-paths/route-55e398bd20e2d7a9.js +0 -1
  521. package/.next/static/chunks/app/api/hooks/claude-done/route-55e398bd20e2d7a9.js +0 -1
  522. package/.next/static/chunks/app/api/ollama/models/route-55e398bd20e2d7a9.js +0 -1
  523. package/.next/static/chunks/app/api/push/subscriptions/route-55e398bd20e2d7a9.js +0 -1
  524. package/.next/static/chunks/app/api/push/vapid/route-55e398bd20e2d7a9.js +0 -1
  525. package/.next/static/chunks/app/api/repositories/[id]/route-55e398bd20e2d7a9.js +0 -1
  526. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +0 -1
  527. package/.next/static/chunks/app/api/repositories/[id]/todos/route-55e398bd20e2d7a9.js +0 -1
  528. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-55e398bd20e2d7a9.js +0 -1
  529. package/.next/static/chunks/app/api/repositories/clone/route-55e398bd20e2d7a9.js +0 -1
  530. package/.next/static/chunks/app/api/repositories/excluded/route-55e398bd20e2d7a9.js +0 -1
  531. package/.next/static/chunks/app/api/repositories/restore/route-55e398bd20e2d7a9.js +0 -1
  532. package/.next/static/chunks/app/api/repositories/route-55e398bd20e2d7a9.js +0 -1
  533. package/.next/static/chunks/app/api/repositories/scan/route-55e398bd20e2d7a9.js +0 -1
  534. package/.next/static/chunks/app/api/repositories/sync/route-55e398bd20e2d7a9.js +0 -1
  535. package/.next/static/chunks/app/api/repositories/validate-path/route-55e398bd20e2d7a9.js +0 -1
  536. package/.next/static/chunks/app/api/sidebar/group-order/route-55e398bd20e2d7a9.js +0 -1
  537. package/.next/static/chunks/app/api/skills/[id]/route-55e398bd20e2d7a9.js +0 -1
  538. package/.next/static/chunks/app/api/skills/installations/route-55e398bd20e2d7a9.js +0 -1
  539. package/.next/static/chunks/app/api/skills/operations/route-55e398bd20e2d7a9.js +0 -1
  540. package/.next/static/chunks/app/api/skills/reindex/route-55e398bd20e2d7a9.js +0 -1
  541. package/.next/static/chunks/app/api/skills/route-55e398bd20e2d7a9.js +0 -1
  542. package/.next/static/chunks/app/api/slash-commands/route-55e398bd20e2d7a9.js +0 -1
  543. package/.next/static/chunks/app/api/templates/[id]/route-55e398bd20e2d7a9.js +0 -1
  544. package/.next/static/chunks/app/api/templates/route-55e398bd20e2d7a9.js +0 -1
  545. package/.next/static/chunks/app/api/todos/route-55e398bd20e2d7a9.js +0 -1
  546. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-55e398bd20e2d7a9.js +0 -1
  547. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-55e398bd20e2d7a9.js +0 -1
  548. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-55e398bd20e2d7a9.js +0 -1
  549. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-55e398bd20e2d7a9.js +0 -1
  550. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-55e398bd20e2d7a9.js +0 -1
  551. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-55e398bd20e2d7a9.js +0 -1
  552. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-55e398bd20e2d7a9.js +0 -1
  553. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-55e398bd20e2d7a9.js +0 -1
  554. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-55e398bd20e2d7a9.js +0 -1
  555. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-55e398bd20e2d7a9.js +0 -1
  556. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-55e398bd20e2d7a9.js +0 -1
  557. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-55e398bd20e2d7a9.js +0 -1
  558. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-55e398bd20e2d7a9.js +0 -1
  559. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-55e398bd20e2d7a9.js +0 -1
  560. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-55e398bd20e2d7a9.js +0 -1
  561. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-55e398bd20e2d7a9.js +0 -1
  562. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-55e398bd20e2d7a9.js +0 -1
  563. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-55e398bd20e2d7a9.js +0 -1
  564. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-55e398bd20e2d7a9.js +0 -1
  565. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-55e398bd20e2d7a9.js +0 -1
  566. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-55e398bd20e2d7a9.js +0 -1
  567. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-55e398bd20e2d7a9.js +0 -1
  568. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-55e398bd20e2d7a9.js +0 -1
  569. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-55e398bd20e2d7a9.js +0 -1
  570. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-55e398bd20e2d7a9.js +0 -1
  571. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-55e398bd20e2d7a9.js +0 -1
  572. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-55e398bd20e2d7a9.js +0 -1
  573. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-55e398bd20e2d7a9.js +0 -1
  574. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-55e398bd20e2d7a9.js +0 -1
  575. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-55e398bd20e2d7a9.js +0 -1
  576. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-55e398bd20e2d7a9.js +0 -1
  577. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-55e398bd20e2d7a9.js +0 -1
  578. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-55e398bd20e2d7a9.js +0 -1
  579. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-55e398bd20e2d7a9.js +0 -1
  580. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-55e398bd20e2d7a9.js +0 -1
  581. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-55e398bd20e2d7a9.js +0 -1
  582. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-55e398bd20e2d7a9.js +0 -1
  583. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-55e398bd20e2d7a9.js +0 -1
  584. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-55e398bd20e2d7a9.js +0 -1
  585. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-55e398bd20e2d7a9.js +0 -1
  586. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-55e398bd20e2d7a9.js +0 -1
  587. package/.next/static/chunks/app/api/worktrees/[id]/route-55e398bd20e2d7a9.js +0 -1
  588. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-55e398bd20e2d7a9.js +0 -1
  589. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-55e398bd20e2d7a9.js +0 -1
  590. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-55e398bd20e2d7a9.js +0 -1
  591. package/.next/static/chunks/app/api/worktrees/[id]/search/route-55e398bd20e2d7a9.js +0 -1
  592. package/.next/static/chunks/app/api/worktrees/[id]/send/route-55e398bd20e2d7a9.js +0 -1
  593. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-55e398bd20e2d7a9.js +0 -1
  594. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-55e398bd20e2d7a9.js +0 -1
  595. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-55e398bd20e2d7a9.js +0 -1
  596. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-55e398bd20e2d7a9.js +0 -1
  597. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-55e398bd20e2d7a9.js +0 -1
  598. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-55e398bd20e2d7a9.js +0 -1
  599. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-55e398bd20e2d7a9.js +0 -1
  600. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-55e398bd20e2d7a9.js +0 -1
  601. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-55e398bd20e2d7a9.js +0 -1
  602. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-55e398bd20e2d7a9.js +0 -1
  603. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-55e398bd20e2d7a9.js +0 -1
  604. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-55e398bd20e2d7a9.js +0 -1
  605. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-55e398bd20e2d7a9.js +0 -1
  606. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-55e398bd20e2d7a9.js +0 -1
  607. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-55e398bd20e2d7a9.js +0 -1
  608. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-55e398bd20e2d7a9.js +0 -1
  609. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-55e398bd20e2d7a9.js +0 -1
  610. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-55e398bd20e2d7a9.js +0 -1
  611. package/.next/static/chunks/app/api/worktrees/route-55e398bd20e2d7a9.js +0 -1
  612. package/.next/static/chunks/app/manifest.webmanifest/route-55e398bd20e2d7a9.js +0 -1
  613. package/.next/static/chunks/app/proxy/[...path]/route-55e398bd20e2d7a9.js +0 -1
  614. package/.next/static/chunks/app/repositories/page-3c4fb889da48ce24.js +0 -1
  615. package/.next/static/chunks/app/worktrees/[id]/page-59a63a2c013ec1eb.js +0 -1
  616. /package/.next/static/{AKqbAyuzbFfg05qpbCI_K → gR8Sh86RrTynJON8SWkWK}/_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,790,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(87973),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,790,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(87973),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()}]);