commandmate 0.49.1 → 0.49.3

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 (819) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +246 -243
  3. package/.next/app-path-routes-manifest.json +18 -17
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +12 -12
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +8 -0
  8. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/api/agents/update/route_client-reference-manifest.js +1 -1
  10. package/.next/server/app/api/agents/versions/route_client-reference-manifest.js +1 -1
  11. package/.next/server/app/api/app/release-notes/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/app/update/route_client-reference-manifest.js +1 -1
  13. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  15. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  16. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/capabilities/route.js +1 -1
  18. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  19. package/.next/server/app/api/daily-summary/route.js +1 -1
  20. package/.next/server/app/api/daily-summary/route.js.nft.json +1 -1
  21. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  22. package/.next/server/app/api/daily-summary/status/route.js +1 -1
  23. package/.next/server/app/api/daily-summary/status/route.js.nft.json +1 -1
  24. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  25. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  27. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  28. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  30. package/.next/server/app/api/hooks/agent-event/route.js +2 -2
  31. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  32. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  34. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  35. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  37. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  38. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  41. package/.next/server/app/api/push/escalation/route.js +1 -1
  42. package/.next/server/app/api/push/escalation/route.js.nft.json +1 -1
  43. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/push/subscriptions/route.js +1 -1
  45. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/push/vapid/route.js +1 -1
  47. package/.next/server/app/api/push/vapid/route.js.nft.json +1 -1
  48. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  49. package/.next/server/app/api/relays/[relayId]/cancel/route.js +4 -1
  50. package/.next/server/app/api/relays/[relayId]/cancel/route.js.nft.json +1 -1
  51. package/.next/server/app/api/relays/[relayId]/cancel/route_client-reference-manifest.js +1 -1
  52. package/.next/server/app/api/relays/[relayId]/resolve/route.js +1 -0
  53. package/.next/server/app/api/relays/[relayId]/resolve/route.js.nft.json +1 -0
  54. package/.next/server/app/api/relays/[relayId]/resolve/route_client-reference-manifest.js +1 -0
  55. package/.next/server/app/api/relays/[relayId]/route.js +1 -1
  56. package/.next/server/app/api/relays/[relayId]/route.js.nft.json +1 -1
  57. package/.next/server/app/api/relays/[relayId]/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/relays/route.js +4 -1
  59. package/.next/server/app/api/relays/route.js.nft.json +1 -1
  60. package/.next/server/app/api/relays/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  63. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  64. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  65. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/repositories/clone/route.js +1 -1
  67. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  68. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  70. package/.next/server/app/api/repositories/restore/route.js +1 -1
  71. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  72. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/repositories/route.js +1 -1
  74. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  75. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/repositories/scan/route.js +1 -1
  77. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  78. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/repositories/sync/route.js +1 -1
  80. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  81. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  82. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  83. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  84. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  85. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  86. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  89. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  93. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/tasks/[taskId]/route.js +1 -1
  96. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/verification/runs/[runId]/route.js +1 -1
  100. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/verification/runs/route.js +1 -1
  102. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  104. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  105. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  107. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  108. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  110. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  111. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -1
  113. package/.next/server/app/api/worktrees/[id]/cli-reference/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/cli-tool/route.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  116. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js +2 -2
  117. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route.js.nft.json +1 -1
  118. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  119. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  121. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/direct-input/route.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/direct-input/route.js.nft.json +1 -1
  124. package/.next/server/app/api/worktrees/[id]/direct-input/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/env/route.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js +2 -2
  130. package/.next/server/app/api/worktrees/[id]/execution-logs/route.js.nft.json +1 -1
  131. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/branch/create/route.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/branches/route.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/checkout/route.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/commit/route.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/diff/route.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/fetch/route.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/log/route.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/pull/route.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/push/route.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/git/reset/route.js +1 -1
  154. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/git/revert/route.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  157. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/git/stage/route.js +1 -1
  160. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/git/staged/route.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/git/stash/push/route.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/git/stash/route.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/git/status/route.js +1 -1
  174. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/git/unstage/route.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/git/working-diff/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  179. package/.next/server/app/api/worktrees/[id]/instances/notes/route.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/instances/notes/route_client-reference-manifest.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  182. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  183. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  186. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +2 -1
  188. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  189. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js.nft.json +1 -1
  192. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/logs/route.js +2 -2
  194. package/.next/server/app/api/worktrees/[id]/logs/route.js.nft.json +1 -1
  195. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/marp-render/route.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/memos/route.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/messages/route.js +1 -1
  203. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/opencode/diff/route.js.nft.json +1 -1
  206. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  207. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js.nft.json +1 -1
  209. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
  211. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js.nft.json +1 -1
  212. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  215. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route.js.nft.json +1 -1
  218. package/.next/server/app/api/worktrees/[id]/prompt-response/strict/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  223. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  224. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  225. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  226. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  227. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js +2 -2
  228. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route.js.nft.json +1 -1
  229. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  230. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js +2 -2
  231. package/.next/server/app/api/worktrees/[id]/schedules/active/route.js.nft.json +1 -1
  232. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  233. package/.next/server/app/api/worktrees/[id]/schedules/route.js +2 -2
  234. package/.next/server/app/api/worktrees/[id]/schedules/route.js.nft.json +1 -1
  235. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  236. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  237. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -144
  238. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  239. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  240. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +3 -3
  241. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  242. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  243. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  244. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  245. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  246. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  247. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  248. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  249. package/.next/server/app/api/worktrees/[id]/skills/route.js +1 -1
  250. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  251. package/.next/server/app/api/worktrees/[id]/slash-commands/route.js +1 -1
  252. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  253. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  254. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  255. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  256. package/.next/server/app/api/worktrees/[id]/tasks/route.js +1 -1
  257. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  258. package/.next/server/app/api/worktrees/[id]/terminal/route.js +2 -2
  259. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  260. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  261. package/.next/server/app/api/worktrees/[id]/timers/history/route.js +1 -1
  262. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  263. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  264. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  265. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  266. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js +1 -1
  267. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route.js.nft.json +1 -1
  268. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  269. package/.next/server/app/api/worktrees/[id]/todos/route.js +1 -1
  270. package/.next/server/app/api/worktrees/[id]/todos/route.js.nft.json +1 -1
  271. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  272. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  273. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  274. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  275. package/.next/server/app/api/worktrees/[id]/verify/config/route.js +1 -1
  276. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  277. package/.next/server/app/api/worktrees/[id]/verify/route.js +1 -1
  278. package/.next/server/app/api/worktrees/[id]/verify/route.js.nft.json +1 -1
  279. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  280. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js +1 -1
  281. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route.js.nft.json +1 -1
  282. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  283. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route.js +1 -1
  284. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  285. package/.next/server/app/api/worktrees/[id]/verify/runs/route.js +1 -1
  286. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  287. package/.next/server/app/api/worktrees/[id]/viewed/route.js +1 -1
  288. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  289. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  290. package/.next/server/app/api/worktrees/route.js +1 -1
  291. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  292. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  293. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  294. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  295. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  296. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  297. package/.next/server/app/page_client-reference-manifest.js +1 -1
  298. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  299. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  300. package/.next/server/app/review/page.js +1 -1
  301. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  302. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  303. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  304. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  305. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  306. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  307. package/.next/server/app/worktrees/[id]/page.js +10 -10
  308. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  309. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  310. package/.next/server/app-paths-manifest.json +18 -17
  311. package/.next/server/chunks/1308.js +1 -0
  312. package/.next/server/chunks/1501.js +5 -4
  313. package/.next/server/chunks/1656.js +2 -2
  314. package/.next/server/chunks/1957.js +2 -0
  315. package/.next/server/chunks/2119.js +1 -1
  316. package/.next/server/chunks/2445.js +1 -1
  317. package/.next/server/chunks/2897.js +1 -0
  318. package/.next/server/chunks/3417.js +1 -0
  319. package/.next/server/chunks/3505.js +1 -1
  320. package/.next/server/chunks/3801.js +8 -8
  321. package/.next/server/chunks/4207.js +1 -1
  322. package/.next/server/chunks/4490.js +1 -0
  323. package/.next/server/chunks/4911.js +1 -0
  324. package/.next/server/chunks/4936.js +1 -0
  325. package/.next/server/chunks/5209.js +2 -1
  326. package/.next/server/chunks/5350.js +212 -0
  327. package/.next/server/chunks/5354.js +1 -1
  328. package/.next/server/chunks/6130.js +1 -1
  329. package/.next/server/chunks/6401.js +1 -1
  330. package/.next/server/chunks/7023.js +3 -3
  331. package/.next/server/chunks/7905.js +1 -1
  332. package/.next/server/chunks/7926.js +1 -0
  333. package/.next/server/chunks/8581.js +15 -15
  334. package/.next/server/chunks/8728.js +2 -2
  335. package/.next/server/chunks/8782.js +1 -1
  336. package/.next/server/chunks/8807.js +89 -88
  337. package/.next/server/chunks/8918.js +3 -3
  338. package/.next/server/chunks/9169.js +1 -0
  339. package/.next/server/chunks/9390.js +1 -1
  340. package/.next/server/chunks/9584.js +1 -1
  341. package/.next/server/chunks/9627.js +5 -5
  342. package/.next/server/chunks/9702.js +1 -0
  343. package/.next/server/chunks/9731.js +3 -3
  344. package/.next/server/middleware-manifest.json +5 -5
  345. package/.next/server/pages/500.html +1 -1
  346. package/.next/server/server-reference-manifest.json +1 -1
  347. package/.next/static/chunks/{2407-675ba6b21844dc3b.js → 2407-87ec01332344ec2b.js} +1 -1
  348. package/.next/static/chunks/3931-3ef48b8d97357282.js +1 -0
  349. package/.next/static/chunks/5794-7975b8e51e731b19.js +1 -0
  350. package/.next/static/chunks/6966-d8dc6032410ffaba.js +1 -0
  351. package/.next/static/chunks/7197-ed3b3d99ac3bd450.js +1 -0
  352. package/.next/static/chunks/7636-a48cf0f7110250c5.js +1 -0
  353. package/.next/static/chunks/app/api/agents/update/route-96fc12d400b49b13.js +1 -0
  354. package/.next/static/chunks/app/api/agents/versions/route-96fc12d400b49b13.js +1 -0
  355. package/.next/static/chunks/app/api/app/release-notes/route-96fc12d400b49b13.js +1 -0
  356. package/.next/static/chunks/app/api/app/update/route-96fc12d400b49b13.js +1 -0
  357. package/.next/static/chunks/app/api/app/update-check/route-96fc12d400b49b13.js +1 -0
  358. package/.next/static/chunks/app/api/auth/login/route-96fc12d400b49b13.js +1 -0
  359. package/.next/static/chunks/app/api/auth/logout/route-96fc12d400b49b13.js +1 -0
  360. package/.next/static/chunks/app/api/auth/status/route-96fc12d400b49b13.js +1 -0
  361. package/.next/static/chunks/app/api/capabilities/route-96fc12d400b49b13.js +1 -0
  362. package/.next/static/chunks/app/api/daily-summary/route-96fc12d400b49b13.js +1 -0
  363. package/.next/static/chunks/app/api/daily-summary/status/route-96fc12d400b49b13.js +1 -0
  364. package/.next/static/chunks/app/api/external-apps/[id]/health/route-96fc12d400b49b13.js +1 -0
  365. package/.next/static/chunks/app/api/external-apps/[id]/route-96fc12d400b49b13.js +1 -0
  366. package/.next/static/chunks/app/api/external-apps/route-96fc12d400b49b13.js +1 -0
  367. package/.next/static/chunks/app/api/fs/browse/route-96fc12d400b49b13.js +1 -0
  368. package/.next/static/chunks/app/api/fs/recent-paths/route-96fc12d400b49b13.js +1 -0
  369. package/.next/static/chunks/app/api/hooks/agent-event/route-96fc12d400b49b13.js +1 -0
  370. package/.next/static/chunks/app/api/hooks/claude-done/route-96fc12d400b49b13.js +1 -0
  371. package/.next/static/chunks/app/api/hooks/permission-request/route-96fc12d400b49b13.js +1 -0
  372. package/.next/static/chunks/app/api/metrics/vibe/route-96fc12d400b49b13.js +1 -0
  373. package/.next/static/chunks/app/api/ollama/models/route-96fc12d400b49b13.js +1 -0
  374. package/.next/static/chunks/app/api/push/escalation/route-96fc12d400b49b13.js +1 -0
  375. package/.next/static/chunks/app/api/push/subscriptions/route-96fc12d400b49b13.js +1 -0
  376. package/.next/static/chunks/app/api/push/vapid/route-96fc12d400b49b13.js +1 -0
  377. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-96fc12d400b49b13.js +1 -0
  378. package/.next/static/chunks/app/api/relays/[relayId]/resolve/route-96fc12d400b49b13.js +1 -0
  379. package/.next/static/chunks/app/api/relays/[relayId]/route-96fc12d400b49b13.js +1 -0
  380. package/.next/static/chunks/app/api/relays/route-96fc12d400b49b13.js +1 -0
  381. package/.next/static/chunks/app/api/remote/pair/route-96fc12d400b49b13.js +1 -0
  382. package/.next/static/chunks/app/api/repositories/[id]/route-96fc12d400b49b13.js +1 -0
  383. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-96fc12d400b49b13.js +1 -0
  384. package/.next/static/chunks/app/api/repositories/clone/route-96fc12d400b49b13.js +1 -0
  385. package/.next/static/chunks/app/api/repositories/excluded/route-96fc12d400b49b13.js +1 -0
  386. package/.next/static/chunks/app/api/repositories/restore/route-96fc12d400b49b13.js +1 -0
  387. package/.next/static/chunks/app/api/repositories/route-96fc12d400b49b13.js +1 -0
  388. package/.next/static/chunks/app/api/repositories/scan/route-96fc12d400b49b13.js +1 -0
  389. package/.next/static/chunks/app/api/repositories/sync/route-96fc12d400b49b13.js +1 -0
  390. package/.next/static/chunks/app/api/repositories/validate-path/route-96fc12d400b49b13.js +1 -0
  391. package/.next/static/chunks/app/api/settings/default-agents/route-96fc12d400b49b13.js +1 -0
  392. package/.next/static/chunks/app/api/settings/default-surface-mode/route-96fc12d400b49b13.js +1 -0
  393. package/.next/static/chunks/app/api/sidebar/group-order/route-96fc12d400b49b13.js +1 -0
  394. package/.next/static/chunks/app/api/skills/[id]/route-96fc12d400b49b13.js +1 -0
  395. package/.next/static/chunks/app/api/skills/installations/route-96fc12d400b49b13.js +1 -0
  396. package/.next/static/chunks/app/api/skills/operations/route-96fc12d400b49b13.js +1 -0
  397. package/.next/static/chunks/app/api/skills/reindex/route-96fc12d400b49b13.js +1 -0
  398. package/.next/static/chunks/app/api/skills/route-96fc12d400b49b13.js +1 -0
  399. package/.next/static/chunks/app/api/slash-commands/route-96fc12d400b49b13.js +1 -0
  400. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-96fc12d400b49b13.js +1 -0
  401. package/.next/static/chunks/app/api/tasks/[taskId]/route-96fc12d400b49b13.js +1 -0
  402. package/.next/static/chunks/app/api/templates/[id]/route-96fc12d400b49b13.js +1 -0
  403. package/.next/static/chunks/app/api/templates/route-96fc12d400b49b13.js +1 -0
  404. package/.next/static/chunks/app/api/verification/runs/[runId]/route-96fc12d400b49b13.js +1 -0
  405. package/.next/static/chunks/app/api/verification/runs/route-96fc12d400b49b13.js +1 -0
  406. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-96fc12d400b49b13.js +1 -0
  407. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-96fc12d400b49b13.js +1 -0
  408. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-96fc12d400b49b13.js +1 -0
  409. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-96fc12d400b49b13.js +1 -0
  410. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-96fc12d400b49b13.js +1 -0
  411. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-96fc12d400b49b13.js +1 -0
  412. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-96fc12d400b49b13.js +1 -0
  413. package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-96fc12d400b49b13.js +1 -0
  414. package/.next/static/chunks/app/api/worktrees/[id]/env/route-96fc12d400b49b13.js +1 -0
  415. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-96fc12d400b49b13.js +1 -0
  416. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-96fc12d400b49b13.js +1 -0
  417. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-96fc12d400b49b13.js +1 -0
  418. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-96fc12d400b49b13.js +1 -0
  419. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-96fc12d400b49b13.js +1 -0
  420. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-96fc12d400b49b13.js +1 -0
  421. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-96fc12d400b49b13.js +1 -0
  422. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-96fc12d400b49b13.js +1 -0
  423. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-96fc12d400b49b13.js +1 -0
  424. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-96fc12d400b49b13.js +1 -0
  425. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-96fc12d400b49b13.js +1 -0
  426. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-96fc12d400b49b13.js +1 -0
  427. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-96fc12d400b49b13.js +1 -0
  428. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-96fc12d400b49b13.js +1 -0
  429. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-96fc12d400b49b13.js +1 -0
  430. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-96fc12d400b49b13.js +1 -0
  431. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-96fc12d400b49b13.js +1 -0
  432. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-96fc12d400b49b13.js +1 -0
  433. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-96fc12d400b49b13.js +1 -0
  434. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-96fc12d400b49b13.js +1 -0
  435. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-96fc12d400b49b13.js +1 -0
  436. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-96fc12d400b49b13.js +1 -0
  437. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-96fc12d400b49b13.js +1 -0
  438. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-96fc12d400b49b13.js +1 -0
  439. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-96fc12d400b49b13.js +1 -0
  440. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-96fc12d400b49b13.js +1 -0
  441. package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-96fc12d400b49b13.js +1 -0
  442. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-96fc12d400b49b13.js +1 -0
  443. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-96fc12d400b49b13.js +1 -0
  444. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-96fc12d400b49b13.js +1 -0
  445. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-96fc12d400b49b13.js +1 -0
  446. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-96fc12d400b49b13.js +1 -0
  447. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-96fc12d400b49b13.js +1 -0
  448. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-96fc12d400b49b13.js +1 -0
  449. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-96fc12d400b49b13.js +1 -0
  450. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-96fc12d400b49b13.js +1 -0
  451. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-96fc12d400b49b13.js +1 -0
  452. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-96fc12d400b49b13.js +1 -0
  453. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-96fc12d400b49b13.js +1 -0
  454. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-96fc12d400b49b13.js +1 -0
  455. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-96fc12d400b49b13.js +1 -0
  456. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-96fc12d400b49b13.js +1 -0
  457. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-96fc12d400b49b13.js +1 -0
  458. package/.next/static/chunks/app/api/worktrees/[id]/route-96fc12d400b49b13.js +1 -0
  459. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-96fc12d400b49b13.js +1 -0
  460. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-96fc12d400b49b13.js +1 -0
  461. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-96fc12d400b49b13.js +1 -0
  462. package/.next/static/chunks/app/api/worktrees/[id]/search/route-96fc12d400b49b13.js +1 -0
  463. package/.next/static/chunks/app/api/worktrees/[id]/send/route-96fc12d400b49b13.js +1 -0
  464. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-96fc12d400b49b13.js +1 -0
  465. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-96fc12d400b49b13.js +1 -0
  466. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-96fc12d400b49b13.js +1 -0
  467. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-96fc12d400b49b13.js +1 -0
  468. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-96fc12d400b49b13.js +1 -0
  469. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-96fc12d400b49b13.js +1 -0
  470. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-96fc12d400b49b13.js +1 -0
  471. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-96fc12d400b49b13.js +1 -0
  472. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-96fc12d400b49b13.js +1 -0
  473. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-96fc12d400b49b13.js +1 -0
  474. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-96fc12d400b49b13.js +1 -0
  475. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-96fc12d400b49b13.js +1 -0
  476. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-96fc12d400b49b13.js +1 -0
  477. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-96fc12d400b49b13.js +1 -0
  478. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-96fc12d400b49b13.js +1 -0
  479. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-96fc12d400b49b13.js +1 -0
  480. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-96fc12d400b49b13.js +1 -0
  481. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-96fc12d400b49b13.js +1 -0
  482. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-96fc12d400b49b13.js +1 -0
  483. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-96fc12d400b49b13.js +1 -0
  484. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-96fc12d400b49b13.js +1 -0
  485. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-96fc12d400b49b13.js +1 -0
  486. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-96fc12d400b49b13.js +1 -0
  487. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-96fc12d400b49b13.js +1 -0
  488. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-96fc12d400b49b13.js +1 -0
  489. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-96fc12d400b49b13.js +1 -0
  490. package/.next/static/chunks/app/api/worktrees/route-96fc12d400b49b13.js +1 -0
  491. package/.next/static/chunks/app/layout-b9d8aef70e4f17b2.js +1 -0
  492. package/.next/static/chunks/app/manifest.webmanifest/route-96fc12d400b49b13.js +1 -0
  493. package/.next/static/chunks/app/more/page-ff5af5ca48774c89.js +1 -0
  494. package/.next/static/chunks/app/page-b4863bfe0452e09d.js +1 -0
  495. package/.next/static/chunks/app/proxy/[...path]/route-96fc12d400b49b13.js +1 -0
  496. package/.next/static/chunks/app/review/page-ff3efb96fdf9bb4b.js +1 -0
  497. package/.next/static/chunks/app/sessions/{page-890fd50ec9739973.js → page-c6eb7c02db2f4c80.js} +1 -1
  498. package/.next/static/chunks/app/worktrees/[id]/layout-96fc12d400b49b13.js +1 -0
  499. package/.next/static/chunks/app/worktrees/[id]/page-f6a151304860b549.js +1 -0
  500. package/.next/trace +13 -13
  501. package/.next/types/app/api/relays/[relayId]/resolve/route.ts +347 -0
  502. package/.next/types/routes.d.ts +2 -1
  503. package/.next/types/validator.ts +9 -0
  504. package/dist/cli/commands/ask.d.ts.map +1 -1
  505. package/dist/cli/commands/ask.js +56 -5
  506. package/dist/cli/commands/attach.d.ts +4 -1
  507. package/dist/cli/commands/attach.d.ts.map +1 -1
  508. package/dist/cli/commands/attach.js +19 -7
  509. package/dist/cli/commands/command-target.d.ts +7 -0
  510. package/dist/cli/commands/command-target.d.ts.map +1 -1
  511. package/dist/cli/commands/command-target.js +10 -0
  512. package/dist/cli/commands/instances.d.ts.map +1 -1
  513. package/dist/cli/commands/instances.js +38 -2
  514. package/dist/cli/commands/message-dispatch.d.ts +17 -3
  515. package/dist/cli/commands/message-dispatch.d.ts.map +1 -1
  516. package/dist/cli/commands/message-dispatch.js +14 -8
  517. package/dist/cli/commands/prompt.d.ts.map +1 -1
  518. package/dist/cli/commands/prompt.js +2 -1
  519. package/dist/cli/commands/relays.d.ts +4 -1
  520. package/dist/cli/commands/relays.d.ts.map +1 -1
  521. package/dist/cli/commands/relays.js +146 -8
  522. package/dist/cli/commands/report.d.ts +7 -2
  523. package/dist/cli/commands/report.d.ts.map +1 -1
  524. package/dist/cli/commands/report.js +19 -6
  525. package/dist/cli/commands/respond-strict.d.ts.map +1 -1
  526. package/dist/cli/commands/respond-strict.js +29 -5
  527. package/dist/cli/commands/respond.d.ts +2 -2
  528. package/dist/cli/commands/respond.d.ts.map +1 -1
  529. package/dist/cli/commands/respond.js +40 -37
  530. package/dist/cli/commands/send.d.ts.map +1 -1
  531. package/dist/cli/commands/send.js +8 -4
  532. package/dist/cli/commands/task.d.ts +22 -0
  533. package/dist/cli/commands/task.d.ts.map +1 -1
  534. package/dist/cli/commands/task.js +26 -18
  535. package/dist/cli/commands/wait-instance.d.ts +9 -1
  536. package/dist/cli/commands/wait-instance.d.ts.map +1 -1
  537. package/dist/cli/commands/wait-instance.js +15 -0
  538. package/dist/cli/commands/wait-poll-state.d.ts +18 -0
  539. package/dist/cli/commands/wait-poll-state.d.ts.map +1 -1
  540. package/dist/cli/commands/wait-verify.d.ts +2 -1
  541. package/dist/cli/commands/wait-verify.d.ts.map +1 -1
  542. package/dist/cli/commands/wait-verify.js +5 -1
  543. package/dist/cli/commands/wait.d.ts.map +1 -1
  544. package/dist/cli/commands/wait.js +37 -13
  545. package/dist/cli/commands/whoami.d.ts.map +1 -1
  546. package/dist/cli/commands/whoami.js +3 -1
  547. package/dist/cli/docs/agent-operations.d.ts +1 -1
  548. package/dist/cli/docs/agent-operations.d.ts.map +1 -1
  549. package/dist/cli/docs/agent-operations.js +1 -0
  550. package/dist/cli/types/api-responses.d.ts +55 -1
  551. package/dist/cli/types/api-responses.d.ts.map +1 -1
  552. package/dist/cli/utils/api-client-deadline.d.ts +28 -0
  553. package/dist/cli/utils/api-client-deadline.d.ts.map +1 -0
  554. package/dist/cli/utils/api-client-deadline.js +46 -0
  555. package/dist/cli/utils/api-client-errors.d.ts +118 -0
  556. package/dist/cli/utils/api-client-errors.d.ts.map +1 -0
  557. package/dist/cli/utils/api-client-errors.js +210 -0
  558. package/dist/cli/utils/api-client.d.ts +33 -109
  559. package/dist/cli/utils/api-client.d.ts.map +1 -1
  560. package/dist/cli/utils/api-client.js +202 -227
  561. package/dist/cli/utils/follow-up-command.d.ts +38 -0
  562. package/dist/cli/utils/follow-up-command.d.ts.map +1 -0
  563. package/dist/cli/utils/follow-up-command.js +57 -0
  564. package/dist/cli/utils/reply-ledger.d.ts +1 -1
  565. package/dist/cli/utils/reply-ledger.d.ts.map +1 -1
  566. package/dist/cli/utils/reply-ledger.js +7 -2
  567. package/dist/cli/utils/server-capabilities.d.ts +18 -0
  568. package/dist/cli/utils/server-capabilities.d.ts.map +1 -1
  569. package/dist/cli/utils/server-capabilities.js +36 -3
  570. package/dist/cli/utils/session-target.d.ts +1 -1
  571. package/dist/cli/utils/session-target.d.ts.map +1 -1
  572. package/dist/cli/utils/session-target.js +3 -0
  573. package/dist/cli/utils/verify-runner.d.ts +7 -0
  574. package/dist/cli/utils/verify-runner.d.ts.map +1 -1
  575. package/dist/cli/utils/verify-runner.js +51 -15
  576. package/dist/lib/cli-tools/session-name.d.ts.map +1 -1
  577. package/dist/lib/cli-tools/session-name.js +11 -3
  578. package/dist/lib/cli-tools/types.d.ts +6 -0
  579. package/dist/lib/cli-tools/types.d.ts.map +1 -1
  580. package/dist/lib/session/send-attempt-types.d.ts +25 -0
  581. package/dist/lib/session/send-attempt-types.d.ts.map +1 -1
  582. package/dist/lib/session/send-attempt-types.js +10 -1
  583. package/dist/lib/verification/session-kill-ledger.d.ts +110 -0
  584. package/dist/lib/verification/session-kill-ledger.d.ts.map +1 -0
  585. package/dist/lib/verification/session-kill-ledger.js +174 -0
  586. package/dist/server/locales/en/worktree.json +9 -0
  587. package/dist/server/locales/ja/worktree.json +9 -0
  588. package/dist/server/src/config/cli-tool-timing-config.js +1 -7
  589. package/dist/server/src/lib/auto-yes-poller.js +5 -1
  590. package/dist/server/src/lib/cli-tools/antigravity.js +5 -2
  591. package/dist/server/src/lib/cli-tools/base.js +39 -0
  592. package/dist/server/src/lib/cli-tools/claude.js +8 -2
  593. package/dist/server/src/lib/cli-tools/codex.js +7 -4
  594. package/dist/server/src/lib/cli-tools/command-code.js +14 -18
  595. package/dist/server/src/lib/cli-tools/copilot.js +159 -28
  596. package/dist/server/src/lib/cli-tools/gemini.js +10 -2
  597. package/dist/server/src/lib/cli-tools/launch-keys.js +39 -0
  598. package/dist/server/src/lib/cli-tools/opencode-v2.js +6 -2
  599. package/dist/server/src/lib/cli-tools/opencode.js +162 -8
  600. package/dist/server/src/lib/cli-tools/prompt-wait-dialog.js +115 -0
  601. package/dist/server/src/lib/cli-tools/session-name.js +11 -3
  602. package/dist/server/src/lib/cli-tools/submit-composer-read.js +57 -14
  603. package/dist/server/src/lib/cli-tools/submit-verified-sender-composer.js +78 -0
  604. package/dist/server/src/lib/cli-tools/submit-verified-sender-lock.js +116 -0
  605. package/dist/server/src/lib/cli-tools/submit-verified-sender-report.js +250 -0
  606. package/dist/server/src/lib/cli-tools/submit-verified-sender-shared.js +106 -0
  607. package/dist/server/src/lib/cli-tools/submit-verified-sender.js +143 -187
  608. package/dist/server/src/lib/cli-tools/vibe-local.js +91 -2
  609. package/dist/server/src/lib/db/chat-db.js +14 -1
  610. package/dist/server/src/lib/db/db-instance.js +114 -2
  611. package/dist/server/src/lib/db/db-migration-path.js +63 -2
  612. package/dist/server/src/lib/db/migrations/index.js +2 -0
  613. package/dist/server/src/lib/db/migrations/runner.js +1 -1
  614. package/dist/server/src/lib/db/migrations/v63-session-relays-delivery-attempt.js +61 -0
  615. package/dist/server/src/lib/db/relay-bind-db-base.js +89 -0
  616. package/dist/server/src/lib/db/relay-bind-db-delivery.js +223 -0
  617. package/dist/server/src/lib/db/relay-bind-db-pending.js +183 -0
  618. package/dist/server/src/lib/db/relay-bind-db.js +88 -167
  619. package/dist/server/src/lib/db/relay-db-base.js +20 -0
  620. package/dist/server/src/lib/db/relay-db-count.js +49 -0
  621. package/dist/server/src/lib/db/relay-db-delivery.js +104 -0
  622. package/dist/server/src/lib/db/relay-db-hold.js +250 -0
  623. package/dist/server/src/lib/db/relay-db.js +33 -92
  624. package/dist/server/src/lib/detection/prompt-detect-multiple-choice.js +5 -4
  625. package/dist/server/src/lib/detection/tools/opencode/composer-own-text.js +119 -0
  626. package/dist/server/src/lib/detection/tools/opencode/readiness.js +62 -0
  627. package/dist/server/src/lib/detection/tools/vibe-local/readiness.js +70 -0
  628. package/dist/server/src/lib/hooks/sources/copilot/hook-settings.js +2 -3
  629. package/dist/server/src/lib/prompt-answer-errors.js +76 -2
  630. package/dist/server/src/lib/relay/relay-bound-reply.js +20 -9
  631. package/dist/server/src/lib/relay/relay-delivery.js +359 -79
  632. package/dist/server/src/lib/relay/relay-messages.js +13 -0
  633. package/dist/server/src/lib/relay/relay-system-line.js +28 -15
  634. package/dist/server/src/lib/relay/types.js +14 -2
  635. package/dist/server/src/lib/session/agent-event-state.js +4 -0
  636. package/dist/server/src/lib/session/agent-session-lifecycle.js +6 -1
  637. package/dist/server/src/lib/session/claude-session.js +26 -7
  638. package/dist/server/src/lib/session/current-output-builder.js +7 -3
  639. package/dist/server/src/lib/session/current-output-history-writers.js +1 -1
  640. package/dist/server/src/lib/session/instance-input-lock.js +47 -2
  641. package/dist/server/src/lib/session/prompt-submit-receipt.js +224 -0
  642. package/dist/server/src/lib/session/prompt-waiting-guard.js +16 -3
  643. package/dist/server/src/lib/session/respond-target.js +82 -0
  644. package/dist/server/src/lib/session/send-attempt-state.js +177 -2
  645. package/dist/server/src/lib/session/send-attempt-types.js +10 -1
  646. package/dist/server/src/lib/session/send-user-message.js +80 -8
  647. package/dist/server/src/lib/session/session-launch-flight.js +243 -0
  648. package/dist/server/src/lib/session/session-starting-state.js +40 -4
  649. package/dist/server/src/lib/session/structured-prompt.js +17 -9
  650. package/dist/server/src/lib/session/waiting-episode-binding.js +4 -2
  651. package/dist/server/src/lib/session/worktree-session-reconcile.js +10 -0
  652. package/dist/server/src/lib/session-cleanup.js +32 -0
  653. package/dist/server/src/lib/session-key-sender.js +6 -28
  654. package/dist/server/src/lib/verification/env-clean-gate.js +129 -0
  655. package/dist/server/src/lib/verification/env-snapshot.js +11 -2
  656. package/dist/server/src/lib/verification/session-kill-ledger.js +174 -0
  657. package/package.json +5 -1
  658. package/release-notes/0.49.2.json +49 -0
  659. package/release-notes/0.49.3.json +52 -0
  660. package/.next/server/chunks/2422.js +0 -1
  661. package/.next/server/chunks/3773.js +0 -1
  662. package/.next/server/chunks/5630.js +0 -1
  663. package/.next/server/chunks/5775.js +0 -1
  664. package/.next/server/chunks/6808.js +0 -4
  665. package/.next/server/chunks/7604.js +0 -2
  666. package/.next/server/chunks/9198.js +0 -144
  667. package/.next/static/chunks/3931-1a1abab16248f14d.js +0 -1
  668. package/.next/static/chunks/4768-ad6f82f034f21eae.js +0 -1
  669. package/.next/static/chunks/5794-80ac3f06f098ea29.js +0 -1
  670. package/.next/static/chunks/6654-f3534f35f16644bc.js +0 -1
  671. package/.next/static/chunks/7665-e9ef6e0a85b9fa49.js +0 -1
  672. package/.next/static/chunks/8606-ce17ffa77f39608e.js +0 -1
  673. package/.next/static/chunks/app/api/agents/update/route-a4f129c451de7859.js +0 -1
  674. package/.next/static/chunks/app/api/agents/versions/route-a4f129c451de7859.js +0 -1
  675. package/.next/static/chunks/app/api/app/release-notes/route-a4f129c451de7859.js +0 -1
  676. package/.next/static/chunks/app/api/app/update/route-a4f129c451de7859.js +0 -1
  677. package/.next/static/chunks/app/api/app/update-check/route-a4f129c451de7859.js +0 -1
  678. package/.next/static/chunks/app/api/auth/login/route-a4f129c451de7859.js +0 -1
  679. package/.next/static/chunks/app/api/auth/logout/route-a4f129c451de7859.js +0 -1
  680. package/.next/static/chunks/app/api/auth/status/route-a4f129c451de7859.js +0 -1
  681. package/.next/static/chunks/app/api/capabilities/route-a4f129c451de7859.js +0 -1
  682. package/.next/static/chunks/app/api/daily-summary/route-a4f129c451de7859.js +0 -1
  683. package/.next/static/chunks/app/api/daily-summary/status/route-a4f129c451de7859.js +0 -1
  684. package/.next/static/chunks/app/api/external-apps/[id]/health/route-a4f129c451de7859.js +0 -1
  685. package/.next/static/chunks/app/api/external-apps/[id]/route-a4f129c451de7859.js +0 -1
  686. package/.next/static/chunks/app/api/external-apps/route-a4f129c451de7859.js +0 -1
  687. package/.next/static/chunks/app/api/fs/browse/route-a4f129c451de7859.js +0 -1
  688. package/.next/static/chunks/app/api/fs/recent-paths/route-a4f129c451de7859.js +0 -1
  689. package/.next/static/chunks/app/api/hooks/agent-event/route-a4f129c451de7859.js +0 -1
  690. package/.next/static/chunks/app/api/hooks/claude-done/route-a4f129c451de7859.js +0 -1
  691. package/.next/static/chunks/app/api/hooks/permission-request/route-a4f129c451de7859.js +0 -1
  692. package/.next/static/chunks/app/api/metrics/vibe/route-a4f129c451de7859.js +0 -1
  693. package/.next/static/chunks/app/api/ollama/models/route-a4f129c451de7859.js +0 -1
  694. package/.next/static/chunks/app/api/push/escalation/route-a4f129c451de7859.js +0 -1
  695. package/.next/static/chunks/app/api/push/subscriptions/route-a4f129c451de7859.js +0 -1
  696. package/.next/static/chunks/app/api/push/vapid/route-a4f129c451de7859.js +0 -1
  697. package/.next/static/chunks/app/api/relays/[relayId]/cancel/route-a4f129c451de7859.js +0 -1
  698. package/.next/static/chunks/app/api/relays/[relayId]/route-a4f129c451de7859.js +0 -1
  699. package/.next/static/chunks/app/api/relays/route-a4f129c451de7859.js +0 -1
  700. package/.next/static/chunks/app/api/remote/pair/route-a4f129c451de7859.js +0 -1
  701. package/.next/static/chunks/app/api/repositories/[id]/route-a4f129c451de7859.js +0 -1
  702. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-a4f129c451de7859.js +0 -1
  703. package/.next/static/chunks/app/api/repositories/clone/route-a4f129c451de7859.js +0 -1
  704. package/.next/static/chunks/app/api/repositories/excluded/route-a4f129c451de7859.js +0 -1
  705. package/.next/static/chunks/app/api/repositories/restore/route-a4f129c451de7859.js +0 -1
  706. package/.next/static/chunks/app/api/repositories/route-a4f129c451de7859.js +0 -1
  707. package/.next/static/chunks/app/api/repositories/scan/route-a4f129c451de7859.js +0 -1
  708. package/.next/static/chunks/app/api/repositories/sync/route-a4f129c451de7859.js +0 -1
  709. package/.next/static/chunks/app/api/repositories/validate-path/route-a4f129c451de7859.js +0 -1
  710. package/.next/static/chunks/app/api/settings/default-agents/route-a4f129c451de7859.js +0 -1
  711. package/.next/static/chunks/app/api/settings/default-surface-mode/route-a4f129c451de7859.js +0 -1
  712. package/.next/static/chunks/app/api/sidebar/group-order/route-a4f129c451de7859.js +0 -1
  713. package/.next/static/chunks/app/api/skills/[id]/route-a4f129c451de7859.js +0 -1
  714. package/.next/static/chunks/app/api/skills/installations/route-a4f129c451de7859.js +0 -1
  715. package/.next/static/chunks/app/api/skills/operations/route-a4f129c451de7859.js +0 -1
  716. package/.next/static/chunks/app/api/skills/reindex/route-a4f129c451de7859.js +0 -1
  717. package/.next/static/chunks/app/api/skills/route-a4f129c451de7859.js +0 -1
  718. package/.next/static/chunks/app/api/slash-commands/route-a4f129c451de7859.js +0 -1
  719. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-a4f129c451de7859.js +0 -1
  720. package/.next/static/chunks/app/api/tasks/[taskId]/route-a4f129c451de7859.js +0 -1
  721. package/.next/static/chunks/app/api/templates/[id]/route-a4f129c451de7859.js +0 -1
  722. package/.next/static/chunks/app/api/templates/route-a4f129c451de7859.js +0 -1
  723. package/.next/static/chunks/app/api/verification/runs/[runId]/route-a4f129c451de7859.js +0 -1
  724. package/.next/static/chunks/app/api/verification/runs/route-a4f129c451de7859.js +0 -1
  725. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-a4f129c451de7859.js +0 -1
  726. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-a4f129c451de7859.js +0 -1
  727. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-a4f129c451de7859.js +0 -1
  728. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-a4f129c451de7859.js +0 -1
  729. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-a4f129c451de7859.js +0 -1
  730. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-a4f129c451de7859.js +0 -1
  731. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-a4f129c451de7859.js +0 -1
  732. package/.next/static/chunks/app/api/worktrees/[id]/direct-input/route-a4f129c451de7859.js +0 -1
  733. package/.next/static/chunks/app/api/worktrees/[id]/env/route-a4f129c451de7859.js +0 -1
  734. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-a4f129c451de7859.js +0 -1
  735. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-a4f129c451de7859.js +0 -1
  736. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-a4f129c451de7859.js +0 -1
  737. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-a4f129c451de7859.js +0 -1
  738. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-a4f129c451de7859.js +0 -1
  739. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-a4f129c451de7859.js +0 -1
  740. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-a4f129c451de7859.js +0 -1
  741. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-a4f129c451de7859.js +0 -1
  742. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-a4f129c451de7859.js +0 -1
  743. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-a4f129c451de7859.js +0 -1
  744. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-a4f129c451de7859.js +0 -1
  745. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-a4f129c451de7859.js +0 -1
  746. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-a4f129c451de7859.js +0 -1
  747. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-a4f129c451de7859.js +0 -1
  748. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-a4f129c451de7859.js +0 -1
  749. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-a4f129c451de7859.js +0 -1
  750. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-a4f129c451de7859.js +0 -1
  751. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-a4f129c451de7859.js +0 -1
  752. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-a4f129c451de7859.js +0 -1
  753. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-a4f129c451de7859.js +0 -1
  754. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-a4f129c451de7859.js +0 -1
  755. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-a4f129c451de7859.js +0 -1
  756. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-a4f129c451de7859.js +0 -1
  757. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-a4f129c451de7859.js +0 -1
  758. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-a4f129c451de7859.js +0 -1
  759. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-a4f129c451de7859.js +0 -1
  760. package/.next/static/chunks/app/api/worktrees/[id]/instances/notes/route-a4f129c451de7859.js +0 -1
  761. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-a4f129c451de7859.js +0 -1
  762. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-a4f129c451de7859.js +0 -1
  763. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-a4f129c451de7859.js +0 -1
  764. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-a4f129c451de7859.js +0 -1
  765. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-a4f129c451de7859.js +0 -1
  766. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-a4f129c451de7859.js +0 -1
  767. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-a4f129c451de7859.js +0 -1
  768. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-a4f129c451de7859.js +0 -1
  769. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-a4f129c451de7859.js +0 -1
  770. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-a4f129c451de7859.js +0 -1
  771. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-a4f129c451de7859.js +0 -1
  772. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-a4f129c451de7859.js +0 -1
  773. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-a4f129c451de7859.js +0 -1
  774. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/strict/route-a4f129c451de7859.js +0 -1
  775. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-a4f129c451de7859.js +0 -1
  776. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-a4f129c451de7859.js +0 -1
  777. package/.next/static/chunks/app/api/worktrees/[id]/route-a4f129c451de7859.js +0 -1
  778. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-a4f129c451de7859.js +0 -1
  779. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-a4f129c451de7859.js +0 -1
  780. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-a4f129c451de7859.js +0 -1
  781. package/.next/static/chunks/app/api/worktrees/[id]/search/route-a4f129c451de7859.js +0 -1
  782. package/.next/static/chunks/app/api/worktrees/[id]/send/route-a4f129c451de7859.js +0 -1
  783. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-a4f129c451de7859.js +0 -1
  784. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-a4f129c451de7859.js +0 -1
  785. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-a4f129c451de7859.js +0 -1
  786. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-a4f129c451de7859.js +0 -1
  787. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-a4f129c451de7859.js +0 -1
  788. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-a4f129c451de7859.js +0 -1
  789. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-a4f129c451de7859.js +0 -1
  790. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-a4f129c451de7859.js +0 -1
  791. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-a4f129c451de7859.js +0 -1
  792. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-a4f129c451de7859.js +0 -1
  793. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-a4f129c451de7859.js +0 -1
  794. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-a4f129c451de7859.js +0 -1
  795. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-a4f129c451de7859.js +0 -1
  796. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-a4f129c451de7859.js +0 -1
  797. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-a4f129c451de7859.js +0 -1
  798. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-a4f129c451de7859.js +0 -1
  799. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-a4f129c451de7859.js +0 -1
  800. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-a4f129c451de7859.js +0 -1
  801. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-a4f129c451de7859.js +0 -1
  802. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-a4f129c451de7859.js +0 -1
  803. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-a4f129c451de7859.js +0 -1
  804. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-a4f129c451de7859.js +0 -1
  805. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-a4f129c451de7859.js +0 -1
  806. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-a4f129c451de7859.js +0 -1
  807. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-a4f129c451de7859.js +0 -1
  808. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-a4f129c451de7859.js +0 -1
  809. package/.next/static/chunks/app/api/worktrees/route-a4f129c451de7859.js +0 -1
  810. package/.next/static/chunks/app/layout-8bfac4724277b47f.js +0 -1
  811. package/.next/static/chunks/app/manifest.webmanifest/route-a4f129c451de7859.js +0 -1
  812. package/.next/static/chunks/app/more/page-87c84987b2765213.js +0 -1
  813. package/.next/static/chunks/app/page-1b820c421db48c2c.js +0 -1
  814. package/.next/static/chunks/app/proxy/[...path]/route-a4f129c451de7859.js +0 -1
  815. package/.next/static/chunks/app/review/page-e2fd4a590646a2d8.js +0 -1
  816. package/.next/static/chunks/app/worktrees/[id]/layout-a4f129c451de7859.js +0 -1
  817. package/.next/static/chunks/app/worktrees/[id]/page-f6d3ab8185d93aae.js +0 -1
  818. /package/.next/static/{fqfSDqQMweROeHUzOt_m1 → LNfVZiq6FZwKsV7L9Mi6M}/_buildManifest.js +0 -0
  819. /package/.next/static/{fqfSDqQMweROeHUzOt_m1 → LNfVZiq6FZwKsV7L9Mi6M}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{13673:()=>{},23252:(e,t,n)=>{"use strict";n.d(t,{AppProviders:()=>M});var r=n(95155),s=n(20063);n(95704);let a=["/login","/api/auth/login","/api/auth/logout","/api/auth/status","/api/remote/pair","/manifest.webmanifest","/sw.js","/offline"];var i=n(3809),l=n(5379),o=n(32916),d=n(65380),c=n(22592),u=n(92614),m=n(70628),h=n(66966),x=n(89275),f=n(60199),p=n(36402),b=n(63470),g=n(40823),v=n(58165),w=n(94442),j=n(72604),y=n(95275),k=n(79832),N=n(12115),C=n(18955),S=n(89559),I=n(59854),T=n(77016);function A(){let e=(0,C.c)("pwa"),[t,n]=(0,N.useState)(null),s=(0,N.useRef)(!1),a=(0,T.W)();return((0,N.useEffect)(()=>{if("undefined"==typeof navigator||!("serviceWorker"in navigator))return;let e=!1,t=t=>{e||n(t)};navigator.serviceWorker.register("/sw.js").then(e=>{e.waiting&&navigator.serviceWorker.controller&&t(e.waiting),e.addEventListener("updatefound",()=>{let n=e.installing;n&&n.addEventListener("statechange",()=>{"installed"===n.state&&navigator.serviceWorker.controller&&t(n)})})}).catch(()=>{});let r=()=>{s.current||(s.current=!0,window.location.reload())};return navigator.serviceWorker.addEventListener("controllerchange",r),()=>{e=!0,navigator.serviceWorker.removeEventListener("controllerchange",r)}},[]),!t||a)?null:(0,r.jsx)("div",{"data-testid":"pwa-update-toast",role:"status","aria-live":"polite",className:"pointer-events-none fixed bottom-0 right-0 flex max-w-full justify-end px-4 pb-safe",style:{zIndex:I.M.TOAST},children:(0,r.jsxs)("div",{"data-testid":"pwa-update-toast-card",className:"pointer-events-auto mb-4 flex items-center gap-3 rounded-lg border border-border bg-surface px-4 py-3 shadow-lg",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-foreground",children:e("update.available")}),(0,r.jsxs)("button",{type:"button",onClick:()=>{t.postMessage({type:"SKIP_WAITING"})},className:"inline-flex items-center gap-1.5 rounded-md bg-accent-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-accent-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background dark:bg-accent-500 dark:hover:bg-accent-600",children:[(0,r.jsx)(S.A,{className:"h-4 w-4"}),e("update.reload")]})]})})}function M(e){var t;let{children:n,locale:N,messages:C,timeZone:S,authEnabled:I=!1}=e,T=(t=(0,s.usePathname)(),!I||!a.includes(null!=t?t:""));return(0,r.jsx)(i.default,{locale:N,messages:C,timeZone:S,children:(0,r.jsx)(w.tE,{children:(0,r.jsx)(l.N,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:(0,r.jsx)(d.O,{authEnabled:I,children:(0,r.jsx)(c.W5,{children:(0,r.jsx)(o.GB,{children:(0,r.jsx)(f.tS,{enabled:T,children:(0,r.jsxs)(h.g7,{enabled:T,children:[(0,r.jsx)(j.rM,{}),(0,r.jsx)(k.o,{}),(0,r.jsx)(y.H,{}),(0,r.jsx)(u.E,{children:(0,r.jsx)(m.S,{children:(0,r.jsx)(p.aF,{children:(0,r.jsx)(b.y2,{enabled:T,children:(0,r.jsxs)(g.NS,{children:[(0,r.jsx)(x.Bo,{children:n}),(0,r.jsx)(A,{}),(0,r.jsx)(v.gZ,{})]})})})})})]})})})})})})})})}},28876:(e,t,n)=>{"use strict";n.d(t,{AppShellGate:()=>tG});var r=n(95155),s=n(20063),a=n(12115),i=n(32916),l=n(38218);let o={showSidebar:!0,showGlobalNav:!0,showLocalNav:!1,autoCollapseSidebar:!1},d=[{prefix:"/worktrees/",config:{showGlobalNav:!1,showLocalNav:!0}},{prefix:"/sessions",config:{autoCollapseSidebar:!0}}];var c=n(22592),u=n(52619),m=n.n(u),h=n(89275);let x=(0,a.forwardRef)(function(e,t){let{href:n,onClick:a,target:i,...l}=e,o=(0,s.usePathname)(),d=(0,h.Hq)();return(0,r.jsx)(m(),{ref:t,href:n,target:i,onClick:e=>{var t;null==a||a(e),e.defaultPrevented||0!==(t=e).button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||void 0!==i&&"_self"!==i||/^([a-z][a-z0-9+.-]*:)?\/\//i.test(n)||/^(mailto:|tel:)/i.test(n)||(e.preventDefault(),n!==o&&d.push(n))},...l})});var f=n(18955),p=n(66685),b=n(85710),g=n(61362),v=n(15870),w=n(17787),j=n(49027),y=n(27587),k=n(39649),N=n(69858),C=n(76471),S=n(70532),I=n(44308),T=n(38606);let A=(0,a.memo)(function(e){let{worktrees:t,visibleWorktreeIds:n,selectedWorktreeId:s,onSelect:a,onNavigate:i}=e,l=(0,f.c)("common"),o=t.length;if(0===o)return null;let d=t.slice(0,3),c=o-d.length;return(0,r.jsxs)("section",{"data-testid":"sidebar-needs-attention","aria-label":l("sidebar.needsAttention"),className:"flex-shrink-0 px-2 pt-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-2 pb-1 text-xs text-sidebar-muted",children:[(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate",children:l("sidebar.needsAttention")}),(0,r.jsx)("span",{"data-testid":"sidebar-needs-attention-count","aria-label":l("attention.badgeLabel",{count:o}),className:"flex-shrink-0 rounded-full bg-warning-subtle px-1.5 font-semibold leading-5 tabular-nums text-warning-foreground",children:o>99?"99+":o})]}),(0,r.jsx)("ul",{className:"space-y-0.5",children:d.map(e=>{let t=(0,T.XK)(e),i=!n.has(e.id),o=e.id===s;return(0,r.jsx)("li",{children:(0,r.jsxs)("button",{type:"button","data-testid":"sidebar-attention-item","data-hidden-repository":i?"true":void 0,onClick:()=>a(e.id),"aria-current":o?"true":void 0,title:"".concat(t.name," \xb7 ").concat(t.repositoryName),className:"flex h-[34px] w-full min-w-0 items-center gap-2 rounded-md px-2 text-left transition-colors hover:bg-sidebar-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-ring ".concat(o?"bg-sidebar-hover":""),children:[(0,r.jsx)("span",{className:"flex w-4 flex-shrink-0 items-center justify-center",children:(0,r.jsx)(C.Ej,{status:"waiting",waitingKind:t.waitingKind})}),(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm text-sidebar-foreground",children:t.name}),(0,r.jsx)("span",{className:"min-w-0 max-w-[40%] flex-shrink truncate text-xs text-sidebar-muted",children:t.repositoryName}),i&&(0,r.jsx)(S.A,{"data-testid":"sidebar-attention-hidden-repository",className:"h-3.5 w-3.5 flex-shrink-0 text-sidebar-muted","aria-label":l("sidebar.hiddenRepository"),role:"img"})]})},e.id)})}),(0,r.jsx)(x,{href:I.ks,"data-testid":"sidebar-needs-attention-review-link",onClick:i,className:"mt-0.5 flex min-w-0 items-center rounded-md px-2 py-1 text-xs text-sidebar-muted transition-colors hover:bg-sidebar-hover hover:text-sidebar-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,r.jsx)("span",{className:"min-w-0 truncate",children:c>0?l("sidebar.attentionMoreInReview",{count:c}):l("sidebar.openInReview")})})]})}),M=(0,a.memo)(function(e){let{branches:t,selectedWorktreeId:n,onBranchClick:s,forceExpanded:i}=e,l=(0,f.c)("common"),[o,d]=(0,a.useState)(!1),c=i||o;return(0,r.jsxs)("div",{"data-testid":"branch-group-other",children:[(0,r.jsx)("div",{className:N.R8,children:(0,r.jsxs)("button",{type:"button","data-testid":"branch-group-other-toggle","aria-expanded":c,disabled:i,onClick:()=>d(e=>!e),className:"flex h-[30px] w-full min-w-0 items-center gap-2 rounded-[10px] px-3 text-left text-xs text-sidebar-muted transition-colors hover:bg-sidebar-hover hover:text-sidebar-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring disabled:cursor-default disabled:hover:bg-transparent",children:[(0,r.jsx)("svg",{className:"h-3 w-3 flex-shrink-0 transition-transform ".concat(c?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,"aria-hidden":"true",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})}),(0,r.jsx)("span",{className:"min-w-0 truncate",children:l("sidebar.otherBranches",{count:t.length})})]})}),c&&t.map(e=>(0,r.jsx)(N.yP,{branch:e,isSelected:e.id===n,onClick:()=>s(e.id),showRepositoryName:!1},e.id))]})});var E=n(48407),L=n(73464),R=n(26232),P=n(7636),B=n(87531);let K=[{mode:"grouped",labelKey:"sidebar.viewMode.grouped"},{mode:"flat",labelKey:"sidebar.viewMode.flat"},{mode:"sessions",labelKey:"sidebar.viewMode.sessions"}],O=[{key:"updatedAt",labelKey:"sort.updatedAt"},{key:"repositoryName",labelKey:"sort.repositoryName"},{key:"branchName",labelKey:"sort.branchName"},{key:"status",labelKey:"sort.status"}],D={updatedAt:"desc"},F={updatedAt:{asc:"sort.direction.oldestFirst",desc:"sort.direction.newestFirst"},repositoryName:{asc:"sort.direction.aToZ",desc:"sort.direction.zToA"},branchName:{asc:"sort.direction.aToZ",desc:"sort.direction.zToA"},status:{asc:"sort.direction.attentionFirst",desc:"sort.direction.attentionLast"}},W={asc:"sort.ascending",desc:"sort.descending"};function z(e){var t;return null!=(t=D[e])?t:"asc"}function _(e){e.preventDefault()}let H=(0,a.memo)(function(e){var t,n,s,l;let{viewMode:o,onViewModeChange:d}=e,c=(0,f.c)("common"),{sortKey:u,sortDirection:m,setSortKey:h,setSortDirection:x}=(0,i.VF)(),p=(0,a.useId)(),b=(0,a.useId)(),g=(0,a.useMemo)(()=>{var e;let t=null!=(e=F[u])?e:W;return e=>c(t[e])},[u,c]),v=c(null!=(s=null==(t=K.find(e=>e.mode===o))?void 0:t.labelKey)?s:"sidebar.viewMode.grouped"),w=c(null!=(l=null==(n=O.find(e=>e.key===u))?void 0:n.labelKey)?l:"sort.".concat(u)),j=c("sidebar.listOptionsSummary",{view:v,sort:w,direction:g(m)}),y=o===i.e8&&u===i.P0&&m===i.RA,k=z(u);return(0,r.jsxs)(R.rI,{children:[(0,r.jsx)(R.ty,{asChild:!0,children:(0,r.jsxs)("button",{type:"button","data-testid":"sidebar-list-options","data-view-mode":o,"data-sort-key":u,"data-sort-direction":m,"aria-label":c("sidebar.listOptionsLabel",{summary:j}),title:j,className:"relative flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md text-sidebar-muted transition-colors hover:bg-sidebar-hover hover:text-sidebar-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-sidebar-hover data-[state=open]:text-sidebar-foreground",children:[(0,r.jsx)(L.A,{className:"h-4 w-4","aria-hidden":"true"}),!y&&(0,r.jsx)("span",{"data-testid":"sidebar-list-options-indicator","aria-hidden":"true",className:"absolute right-1 top-1 h-1.5 w-1.5 rounded-full bg-accent-500"})]})}),(0,r.jsxs)(R.SQ,{"data-testid":"sidebar-list-options-menu",align:"end",collisionPadding:8,className:(0,B.cn)("w-52 max-w-[calc(100vw-16px)]","max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto"),children:[(0,r.jsx)(R.lp,{id:p,children:c("sidebar.viewLabel")}),(0,r.jsx)(R.Hr,{"data-testid":"view-mode-options","aria-labelledby":p,value:o,onValueChange:e=>{(0,P.$m)(e)&&e!==o&&d(e)},children:K.map(e=>{let{mode:t,labelKey:n}=e;return(0,r.jsx)(R.Ht,{value:t,onSelect:_,children:c(n)},t)})}),(0,r.jsx)(R.mB,{}),(0,r.jsx)(R.lp,{id:b,children:c("sort.label")}),(0,r.jsx)(R.Hr,{"data-testid":"sort-key-options","aria-labelledby":b,value:u,onValueChange:e=>{let t=O.find(t=>t.key===e);t&&t.key!==u&&(h(t.key),x(z(t.key)))},children:O.map(e=>{let{key:t,labelKey:n}=e;return(0,r.jsx)(R.Ht,{value:t,onSelect:_,children:c(n)},t)})}),(0,r.jsx)(R.mB,{}),(0,r.jsx)(R.Hr,{"data-testid":"sort-direction-options","aria-label":c("sort.directionLabel"),value:m,onValueChange:e=>{("asc"===e||"desc"===e)&&x(e)},children:("asc"===k?["asc","desc"]:["desc","asc"]).map(e=>(0,r.jsx)(R.Ht,{value:e,onSelect:_,children:g(e)},e))})]})]})}),V=(0,a.memo)(function(e){let{searchQuery:t,onSearchChange:n,viewMode:s,onViewModeChange:a}=e,i=(0,f.c)("common");return(0,r.jsxs)("div",{"data-testid":"sidebar-list-toolbar",className:"flex flex-shrink-0 items-center gap-1 px-3 pt-2 pb-1.5",children:[(0,r.jsx)(E.pd,{type:"text",inputSize:"sm",placeholder:i("sidebar.searchBranches"),"aria-label":i("sidebar.searchBranches"),value:t,onChange:e=>n(e.target.value),className:"min-w-0 flex-1 border-sidebar-border bg-background shadow-none"}),(0,r.jsx)(H,{viewMode:s,onViewModeChange:a})]})});var Y=n(41898),U=n(30061),q=n(5379),G=n(65380),X=n(45195),J=n(40823),Z=n(68704),$=n(26020);async function Q(){try{await fetch("/api/auth/logout",{method:"POST"}),window.location.href="/login"}catch(e){window.location.href="/login"}}let ee=R.ty;function et(){let e=(0,f.c)("common"),{size:t,setSize:n}=(0,c.Ps)(),s=(0,i.pT)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(R.mB,{}),(0,r.jsx)(R.lp,{children:e("displaySize.ariaLabel")}),(0,r.jsx)(R.Hr,{value:t,onValueChange:e=>{(0,Z.fM)(e)&&n(e)},children:Z.Uf.map(t=>(0,r.jsx)(R.Ht,{value:t,children:e("displaySize.".concat(t))},t))}),s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(R.lp,{children:e("repoTabBar.settingLabel")}),(0,r.jsx)(R.Hr,{value:s.repoTabBarMode,onValueChange:e=>{(0,P.m3)(e)&&s.setRepoTabBarMode(e)},children:P.EN.map(t=>(0,r.jsx)(R.Ht,{value:t,children:e("repoTabBar.mode.".concat(t))},t))})]})]})}function en(e){let{children:t,testIdPrefix:n,side:s="top",align:i="end",showDisplayPreferences:o=!1,onNavigate:d}=e,c=(0,f.c)("worktree"),u=(0,h.Hq)(),{theme:m,setTheme:x}=(0,q.D)(),{currentLocale:p,switchLocale:b}=(0,X.g)(),g=(0,G.H)(),v=(0,l.a)(),{open:w}=(0,J.V0)(),j=(0,a.useRef)(!1),y=(0,a.useRef)(null),k="0.49.3",N=e=>{null==d||d(),u.push(e)};return(0,r.jsxs)(R.rI,{children:[t,(0,r.jsxs)(R.SQ,{side:s,align:i,collisionPadding:8,className:"w-56 max-w-[calc(100vw-16px)] max-h-[var(--radix-dropdown-menu-content-available-height)] overflow-y-auto",onCloseAutoFocus:()=>{j.current&&(j.current=!1,queueMicrotask(w))},children:[(0,r.jsx)(R.lp,{"data-testid":"".concat(n,"-version"),children:c("activityBar.settingsMenu.version",{version:k?"v".concat(k):"-"})}),(0,r.jsx)(R._2,{asChild:!0,onSelect:()=>{let e=y.current;if(y.current=null,!(e&&(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey))){if(null==e||e.preventDefault(),v)return void N("/more");j.current=!0}},children:(0,r.jsx)("a",{href:"/more","data-testid":"".concat(n,"-settings"),onClick:e=>{y.current=e},children:c("activityBar.settingsMenu.settings")})}),(0,r.jsx)(R._2,{onSelect:()=>N("/skills"),children:c("activityBar.settingsMenu.skills")}),(0,r.jsx)(R.mB,{}),(0,r.jsx)(R.lp,{children:c("activityBar.settingsMenu.theme")}),(0,r.jsxs)(R.Hr,{value:null!=m?m:"system",onValueChange:e=>x(e),children:[(0,r.jsx)(R.Ht,{value:"light",children:c("activityBar.settingsMenu.themeLight")}),(0,r.jsx)(R.Ht,{value:"dark",children:c("activityBar.settingsMenu.themeDark")}),(0,r.jsx)(R.Ht,{value:"system",children:c("activityBar.settingsMenu.themeSystem")})]}),(0,r.jsx)(R.lp,{children:c("activityBar.settingsMenu.language")}),(0,r.jsx)(R.Hr,{value:p,onValueChange:e=>b(e),children:$.dI.map(e=>(0,r.jsx)(R.Ht,{value:e,children:$.vK[e]},e))}),o&&!v&&(0,r.jsx)(et,{}),(0,r.jsx)(R.mB,{}),(0,r.jsx)(R._2,{asChild:!0,children:(0,r.jsx)("a",{href:"https://github.com/kewton/MyCodeBranchDesk",target:"_blank",rel:"noopener noreferrer",children:c("activityBar.settingsMenu.github")})}),g&&(0,r.jsx)(R._2,{onSelect:()=>{Q()},children:c("activityBar.settingsMenu.logout")})]})]})}var er=n(59847),es=n(11010),ea=n(86651),ei=n(79651),el=n(92614),eo=n(51743);let ed=["global","terminal","composer","editor"],ec=[{id:"commandPalette",keys:["MOD","K"],scope:"global"},{id:"toggleSidebar",keys:["MOD","B"],scope:"global"},{id:"keyboardHelp",keys:["?"],scope:"global"},{id:"closeOverlay",keys:["Esc"],scope:"global"},{id:"navigateList",keys:["↑","↓"],scope:"global"},{id:"terminalSearch",keys:["MOD","F"],scope:"terminal"},{id:"toggleSurfaceMode",keys:["MOD","Shift","M"],scope:"terminal"},{id:"sendMessage",keys:["↵"],scope:"composer"},{id:"composerNewline",keys:["Shift","↵"],scope:"composer"},{id:"editorIndent",keys:["Tab"],scope:"editor"},{id:"editorOutdent",keys:["Shift","Tab"],scope:"editor"},{id:"editorTabFocus",keys:["Ctrl","M"],scope:"editor"},{id:"editorSave",keys:["MOD","S"],scope:"editor"},{id:"editorFullscreen",keys:["MOD","Shift","F"],scope:"editor"}];function eu(){if("undefined"==typeof navigator)return!1;let e=navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/.test(e)}function em(e,t){return"MOD"===e?t?"⌘":"Ctrl":e}var eh=n(26550),ex=n(78845),ef=n(65229);let ep="flex items-center justify-center rounded-md text-sidebar-muted transition-colors hover:bg-sidebar-hover hover:text-sidebar-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",eb={width:"".concat(P.KI,"px"),height:"".concat(P.KI,"px")};function eg(e){let{testId:t,onClose:n}=e,s=(0,f.c)("common"),{isOpen:a,toggle:l}=(0,i.VF)(),o=s(a?"sidebar.close":"sidebar.open"),d=a?eh.A:ex.A;return(0,r.jsx)("div",{"data-sidebar-toggle-cell":"",className:"flex flex-shrink-0",style:{padding:"".concat(P.df,"px")},children:n?(0,r.jsx)("button",{type:"button","data-testid":t,onClick:n,"aria-label":s("sidebar.close"),style:eb,className:ep,children:(0,r.jsx)(ef.A,{size:20,"aria-hidden":"true"})}):(0,r.jsx)(Y.m_,{content:o,placement:a?"bottom":"right",children:(0,r.jsx)("button",{type:"button","data-testid":t,onClick:l,"aria-label":o,"aria-expanded":a,style:eb,className:ep,children:(0,r.jsx)(d,{size:20,"aria-hidden":"true"})})})})}let ev="flex w-full min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-sidebar-muted transition-colors hover:bg-sidebar-hover hover:text-sidebar-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring";function ew(e){let{drawer:t=!1}=e,n=(0,f.c)("common"),s=(0,f.c)("commandPalette"),{setOpen:l}=(0,el.C)(),{openNewTask:o}=(0,eo.hX)(),{closeMobileDrawer:d}=(0,i.VF)(),c=function(){let[e,t]=a.useState(null);return a.useEffect(()=>{t(eu()?"⌘":"Ctrl")},[]),e}(),u=t?d:void 0;return(0,r.jsxs)("div",{"data-testid":t?"sidebar-drawer-top-controls":"sidebar-top-controls",className:"flex-shrink-0",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center",children:[t?(0,r.jsx)(eg,{testId:"sidebar-drawer-close",onClose:d}):(0,r.jsx)(eg,{testId:"sidebar-panel-toggle"}),(0,r.jsxs)(x,{href:"/",onClick:u,"data-testid":"sidebar-logo",className:"flex min-w-0 items-center gap-2 rounded-md px-1 py-1 transition-opacity hover:opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,r.jsx)("span",{className:"flex h-6 w-6 flex-shrink-0 items-center justify-center rounded-md bg-accent-600",children:(0,r.jsx)(er.A,{size:14,strokeWidth:2,className:"text-white","aria-hidden":"true"})}),(0,r.jsx)("span",{className:"truncate text-sm font-bold text-sidebar-foreground",children:"CommandMate"})]})]}),(0,r.jsxs)("div",{className:"space-y-0.5 px-2",children:[(0,r.jsxs)("button",{type:"button","data-testid":"sidebar-new-task",onClick:()=>{null==u||u(),o()},"aria-haspopup":"dialog",className:ev,children:[(0,r.jsx)(es.A,{className:"h-4 w-4 flex-shrink-0","aria-hidden":"true"}),(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate",children:n("newTask.title")})]}),(0,r.jsxs)("button",{type:"button","data-testid":"sidebar-search",onClick:()=>{null==u||u(),l(!0)},"aria-label":s("mobileTrigger"),className:ev,children:[(0,r.jsx)(ea.A,{className:"h-4 w-4 flex-shrink-0","aria-hidden":"true"}),(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate",children:s("searchAction")}),!t&&null!==c&&(0,r.jsxs)("span",{className:"flex flex-shrink-0 items-center gap-0.5","aria-hidden":"true",children:[(0,r.jsx)(ei.u,{children:c}),(0,r.jsx)(ei.u,{children:"K"})]})]})]})]})}var ej=n(94442),ey=n(24373),ek=n(80344),eN=n(17653),eC=n(98873);let eS="mcbd-sidebar-group-collapsed",eI="mcbd-sidebar-scroll-top",eT=0,eA=(0,a.memo)(function(){var e,t,n;let o=(0,h.Hq)(),{worktrees:d,repositories:c,selectedWorktreeId:u,selectWorktree:m,refreshWorktrees:x,isLoading:v,error:y}=(0,k.$f)(),{closeMobileDrawer:C,sortKey:S,sortDirection:M,viewMode:L,setViewMode:R,repositoryOrder:B,setRepositoryOrder:K}=(0,i.VF)(),O=(0,f.c)("common"),D=null!=(e=(0,s.usePathname)())?e:"",F=(0,P.jn)(D,u),W=(0,l.a)(),{count:z}=(0,ey.Lv)(),[_,H]=(0,a.useState)(""),Y=(0,a.useRef)(null),[U,q]=(0,a.useState)(()=>{try{let e=localStorage.getItem(eS);return e?function(e){try{let t=JSON.parse(e);if("object"!=typeof t||null===t||Array.isArray(t))return{};let n={},r=0;for(let[e,s]of Object.entries(t))if(!eL.has(e)&&"boolean"==typeof s){if(++r>100)break;n[e]=s}return n}catch(e){return{}}}(e):{}}catch(e){return{}}}),G=(0,a.useRef)(!1);(0,a.useEffect)(()=>{G.current||(G.current=!0,fetch("/api/sidebar/group-order").then(e=>e.json()).then(e=>{e.success&&Array.isArray(e.order)&&K(e.order)}).catch(()=>{}))},[K]);let X=(0,a.useMemo)(()=>(0,P.UZ)(c),[c]),J=(0,a.useMemo)(()=>(0,P.s6)(d,X),[d,X]),Z=(0,a.useMemo)(()=>(0,ey.Rc)(d),[d]),$=(0,a.useMemo)(()=>new Set(J.map(e=>e.id)),[J]),Q=(0,a.useMemo)(()=>J.map(T.XK),[J]),ee=(0,a.useMemo)(()=>new Map(Q.map(e=>[e.id,e])),[Q]),et=(0,a.useDeferredValue)(Q),en=(0,a.useRef)(null),er=(0,a.useRef)(null),es=(0,a.useRef)(null),ea=(0,a.useRef)(new Set),[ei,el]=(0,a.useState)(0);(0,a.useEffect)(()=>()=>{null!==er.current&&clearTimeout(er.current)},[]);let eo=(0,a.useCallback)(()=>{null!==er.current&&(clearTimeout(er.current),er.current=null),en.current=null,es.current=null},[]),ed=(0,a.useMemo)(()=>{let e=en.current;return!e||0===e.items.length||Date.now()>=e.expiresAt?et:e.items},[et,ei]),ec=(0,a.useRef)(ed),eu=es.current,em=new Set(ed.filter(e=>(null==eu?void 0:eu.has(e.id))===!0||(0,P.rL)(e,F,ee)).map(e=>e.id));(0,a.useLayoutEffect)(()=>{if(ec.current=ed,ea.current=em,es.current)for(let e of em)es.current.add(e);let e=en.current;e&&0===e.items.length&&et.length>0&&eo()});let eh=(0,a.useCallback)(()=>{if(0===ec.current.length)return;null!==er.current&&(clearTimeout(er.current),er.current=null);let e=en.current;if(e&&Date.now()<e.expiresAt){en.current={...e,expiresAt:1/0};return}en.current={items:ec.current,expiresAt:1/0},es.current=new Set(ea.current)},[]),ex=(0,a.useCallback)(()=>{en.current&&(en.current={...en.current,expiresAt:Date.now()+1e3},null!==er.current&&clearTimeout(er.current),er.current=setTimeout(()=>{eo(),el(e=>e+1)},1e3))},[eo]),{sortedItems:ef,groupedItems:ep}=(0,eC.D)({items:ed,sortKey:S,sortDirection:M,viewMode:L,filterText:_}),eb=(0,a.useMemo)(()=>"grouped"===L&&ep?_.trim()?ep:(0,P.Ew)(ep,B):null,[L,ep,B,_]),eg="grouped"===L?eb:null,ev=(0,a.useMemo)(()=>"sessions"===L?(0,P.EY)((0,P.UB)(ef),S,M):[],[L,ef,S,M]);(0,a.useEffect)(()=>{try{localStorage.setItem(eS,JSON.stringify(U))}catch(e){}},[U]);let ej=(0,a.useCallback)(e=>{q(t=>({...t,[e]:!t[e]}))},[]),ek=(0,a.useCallback)(()=>{var e,t,n=null!=(t=null==(e=Y.current)?void 0:e.scrollTop)?t:0;let r=Number.isFinite(n)&&n>0?n:0;eT=r;try{localStorage.setItem(eI,String(r))}catch(e){}},[]),eA=ef.length>0||(null!=(t=null==eg?void 0:eg.length)?t:0)>0||ev.length>0;(0,a.useEffect)(()=>{let e=Y.current;if(!e)return;let t=window.requestAnimationFrame(()=>{e.scrollTop=function(){try{let e=localStorage.getItem(eI);if(!e)return eT=0,0;let t=Number(e);Number.isFinite(t)&&t>=0&&(eT=t)}catch(e){}return eT}()});return()=>{window.cancelAnimationFrame(t)}},[eA,L]);let eR=(0,a.useRef)(d);(0,a.useEffect)(()=>{eR.current=d},[d]);let eK=(0,a.useCallback)(e=>{ek(),m(e);let t=eR.current.find(t=>t.id===e);o.push(t?(0,eN.f)(t):"/worktrees/".concat(e)),C()},[ek,m,o,C]),eO=(0,a.useCallback)(e=>{ek(),m(e.worktreeId),o.push((0,P.Ii)(e)),C()},[ek,m,o,C]),eD=(0,w.FR)((0,w.MS)(w.AN,{activationConstraint:{distance:8}})),ez=(0,a.useCallback)(e=>{let{active:t,over:n}=e;if(!n||t.id===n.id||!eg)return;let r=eg.map(e=>e.repositoryName),s=r.indexOf(String(t.id)),a=r.indexOf(String(n.id));if(-1===s||-1===a)return;let i=(0,j.be)(r,s,a);K(i),fetch("/api/sidebar/group-order",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({order:i})}).catch(()=>{K(r)})},[eg,K]),e_="grouped"===L?(null!=(n=null==eg?void 0:eg.length)?n:0)===0:"sessions"===L?0===ev.length:0===ef.length,eH=v&&0===d.length,eV=!eH&&!!y&&0===d.length,eY=(0,a.useCallback)(()=>{x()},[x]),eU={sessions:(0,r.jsx)("li",{className:"flex min-w-0",children:(0,r.jsx)(eP,{href:"/sessions",icon:p.A,label:O("nav.sessions"),testId:"sidebar-nav-sessions",isActive:D.startsWith("/sessions"),onNavigate:C})}),repositories:(0,r.jsxs)("li",{className:"flex min-w-0 items-center gap-1",children:[(0,r.jsx)(eP,{href:"/repositories",icon:b.A,label:O("nav.repositories"),testId:"sidebar-nav-repositories",isActive:D.startsWith("/repositories"),onNavigate:C}),(0,r.jsx)(eF,{refreshWorktrees:x})]}),review:(0,r.jsx)("li",{className:"flex min-w-0",children:(0,r.jsx)(eP,{href:z>0?I.ks:"/review",icon:g.A,label:O("nav.review"),testId:"sidebar-nav-review",isActive:D.startsWith("/review"),onNavigate:C,trailing:z>0?(0,r.jsx)("span",{"data-testid":"sidebar-nav-review-count",role:"status","aria-label":O("attention.badgeLabel",{count:z}),className:"flex-shrink-0 rounded-full bg-warning-subtle px-1.5 text-xs font-semibold leading-5 tabular-nums text-warning-foreground",children:z>99?"99+":z}):null})})};return(0,r.jsx)(N.Fy.Provider,{value:!W,children:(0,r.jsxs)("nav",{"data-testid":"sidebar","aria-label":O("sidebar.branchNavigation"),className:"h-full flex flex-col bg-sidebar text-sidebar-foreground",role:"navigation",children:[(0,r.jsx)(ew,{drawer:W}),(0,r.jsx)("div",{"data-testid":"sidebar-header",className:"flex-shrink-0 space-y-2 border-b border-sidebar-border px-2 py-2",children:(0,r.jsx)("ul",{"data-testid":"sidebar-nav",className:"space-y-0.5",children:P.go.map(e=>(0,r.jsx)(a.Fragment,{children:eU[e]},e))})}),(0,r.jsx)(A,{worktrees:Z,visibleWorktreeIds:$,selectedWorktreeId:F,onSelect:eK,onNavigate:C}),(0,r.jsx)(V,{searchQuery:_,onSearchChange:H,viewMode:L,onViewModeChange:R}),(0,r.jsx)("div",{ref:Y,"data-testid":"branch-list",onScroll:ek,onMouseEnter:eh,onMouseLeave:ex,className:"flex-1 overflow-y-auto overflow-x-hidden",children:eH?(0,r.jsx)(eM,{label:O("sidebar.loadingBranches")}):eV?(0,r.jsxs)("div",{"data-testid":"branch-list-error",role:"alert",className:"px-4 py-8 text-center text-sidebar-muted",children:[(0,r.jsx)("p",{className:"text-sm",children:O("sidebar.branchesLoadFailed")}),(0,r.jsx)(E.$n,{type:"button",variant:"secondary",size:"sm",className:"mt-3","data-testid":"branch-list-retry",onClick:eY,children:O("sidebar.retryLoadBranches")})]}):e_?(0,r.jsx)("div",{className:"px-4 py-8 text-center text-sidebar-muted",children:O(_?"sidebar.noBranchesFound":"sidebar.noBranchesAvailable")}):"sessions"===L?ev.map(e=>(0,r.jsx)(eB,{row:e,isSelected:e.worktreeId===F,onClick:eO},e.key)):"grouped"===L&&eg?(0,r.jsx)(w.Mp,{sensors:eD,collisionDetection:w.fp,onDragEnd:ez,children:(0,r.jsx)(j.gB,{items:eg.map(e=>e.repositoryName),strategy:j._G,children:eg.map(e=>{let t=!U[e.repositoryName]||!!_.trim();return(0,r.jsx)(eE,{group:e,isExpanded:t,selectedWorktreeId:F,onToggle:()=>ej(e.repositoryName),onBranchClick:eK,isDragDisabled:!!_.trim(),isFiltering:!!_.trim(),liveBranchById:ee,stickyShownIds:eu},e.repositoryName)})})}):ef.map(e=>(0,r.jsx)(N.yP,{branch:e,isSelected:e.id===F,onClick:()=>eK(e.id)},e.id))}),(0,r.jsx)("div",{"data-testid":"sidebar-footer",className:"flex-shrink-0 px-4 py-3 border-t border-sidebar-border",children:(0,r.jsx)(eW,{onNavigate:C})})]})})}),eM=(0,a.memo)(function(e){let{label:t}=e;return(0,r.jsxs)("div",{"data-testid":"branch-list-skeleton",role:"status","aria-live":"polite",className:"px-4 py-3 space-y-3",children:[(0,r.jsx)("span",{className:"sr-only",children:t}),[0,1,2,3,4].map(e=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(E.EA,{className:"h-2 w-2 rounded-full"}),(0,r.jsx)(E.EA,{className:"h-3 flex-1"})]},e))]})});function eE(e){let{group:t,isExpanded:n,selectedWorktreeId:s,onToggle:a,onBranchClick:i,isDragDisabled:l,isFiltering:o,liveBranchById:d,stickyShownIds:c}=e,{attributes:u,listeners:m,setNodeRef:h,setActivatorNodeRef:x,transform:f,transition:p,isDragging:b}=(0,j.gl)({id:t.repositoryName,disabled:l}),g={transform:y.Ks.Transform.toString(f),transition:p,opacity:b?.5:1},{shown:v,other:w}=(0,P.FS)(t.branches,s,d,null!=c?c:void 0);return(0,r.jsxs)("div",{ref:h,style:g,className:"w-full min-w-0 pt-2",children:[(0,r.jsx)(eR,{repositoryName:t.repositoryName,branchCount:t.branches.length,isExpanded:n,onClick:a,dragHandleRef:x,dragHandleListeners:l?void 0:m,dragHandleAttributes:l?void 0:u}),n&&v.map(e=>(0,r.jsx)(N.yP,{branch:e,isSelected:e.id===s,onClick:()=>i(e.id),showRepositoryName:!1},e.id)),n&&w.length>0&&(0,r.jsx)(M,{branches:w,selectedWorktreeId:s,onBranchClick:i,forceExpanded:o})]})}let eL=new Set(["__proto__","constructor","prototype"]);function eR(e){let{repositoryName:t,branchCount:n,isExpanded:s,onClick:a,dragHandleRef:i,dragHandleListeners:l,dragHandleAttributes:o}=e,d=(0,f.c)("common");return(0,r.jsxs)("div",{className:"group/header flex items-center w-full",children:[l&&(0,r.jsx)("div",{ref:i,...l,...o,"data-testid":"group-drag-handle","aria-label":d("sidebar.dragToReorderGroup"),className:" flex-shrink-0 flex items-center justify-center w-6 h-full pl-2 cursor-grab active:cursor-grabbing text-sidebar-muted hover:text-sidebar-foreground transition-[color,opacity] opacity-0 group-hover/header:opacity-100 group-focus-within/header:opacity-100 [@media(hover:none)]:opacity-100 rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-ring ",children:(0,r.jsx)(eO,{})}),(0,r.jsxs)("button",{"data-testid":"group-header",type:"button",onClick:a,"aria-expanded":s,className:" flex-1 min-w-0 flex items-center gap-2 px-2 py-1 text-xs font-normal text-sidebar-muted focus:outline-none focus:ring-2 focus:ring-inset focus:ring-ring transition-colors ",children:[(0,r.jsx)(eK,{isExpanded:s}),(0,r.jsx)(E.nF,{color:(0,P.LV)(t)}),(0,r.jsx)(U.nR,{content:t,className:"flex-1 min-w-0 text-left truncate",children:t}),(0,r.jsx)("span",{className:"text-sidebar-muted font-normal tabular-nums pr-2",children:n})]})]})}function eP(e){let{href:t,icon:n,label:s,testId:a,isActive:i,onNavigate:l,trailing:o}=e;return(0,r.jsxs)(x,{href:t,"data-testid":a,"aria-current":i?"page":void 0,onClick:l,className:"flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors hover:bg-sidebar-hover hover:text-sidebar-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring ".concat(i?"bg-sidebar-hover font-medium text-sidebar-foreground":"text-sidebar-muted"),children:[(0,r.jsx)(n,{className:"h-4 w-4 flex-shrink-0","aria-hidden":"true"}),(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate",children:s}),o]})}let eB=(0,a.memo)(function(e){let{row:t,isSelected:n,onClick:s}=e,a=(0,f.c)("common"),i=(0,C.Mq)(t.status,t.unclassified),l=a(i?C.rH:"status.".concat(t.status));return(0,r.jsx)("div",{className:"w-full min-w-0 ".concat(N.R8),children:(0,r.jsxs)("button",{type:"button","data-testid":"session-list-item","data-session-key":t.key,onClick:()=>s(t),"aria-current":n?"true":void 0,className:"w-full min-w-0 min-h-[34px] px-3 py-1.5 flex items-center gap-2 text-left ".concat((0,N.Xd)(n)),children:[(0,r.jsx)(E.md,{status:t.status,size:"sm",label:t.exited?"".concat(l," (").concat(a("branchItem.agentExited"),")"):l,className:i?C.Jd:void 0}),(0,r.jsx)("span",{className:"flex-shrink-0 max-w-[45%] truncate text-sm font-semibold text-sidebar-foreground",children:t.label}),(0,r.jsxs)("span",{className:"min-w-0 flex-1 truncate text-xs text-sidebar-muted",children:[t.branchName," \xb7 ",t.repositoryName]})]})})});function eK(e){let{isExpanded:t}=e;return(0,r.jsx)("svg",{className:"w-3 h-3 flex-shrink-0 transition-transform ".concat(t?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}function eO(){return(0,r.jsxs)("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"9",cy:"5",r:"1.5"}),(0,r.jsx)("circle",{cx:"15",cy:"5",r:"1.5"}),(0,r.jsx)("circle",{cx:"9",cy:"12",r:"1.5"}),(0,r.jsx)("circle",{cx:"15",cy:"12",r:"1.5"}),(0,r.jsx)("circle",{cx:"9",cy:"19",r:"1.5"}),(0,r.jsx)("circle",{cx:"15",cy:"19",r:"1.5"})]})}function eD(e){let{className:t=""}=e;return(0,r.jsx)("svg",{className:"".concat("w-4 h-4"," ").concat(t),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h5M20 20v-5h-5M20.49 9A9 9 0 005.64 5.64L4 4m16 16l-1.64-1.64A9 9 0 014.51 15"})})}let eF=(0,a.memo)(function(e){let{refreshWorktrees:t}=e,[n,s]=(0,a.useState)(!1),i=(0,a.useRef)(!1),{showToast:l}=(0,ej.dj)(),o=(0,f.c)("common"),d=(0,a.useCallback)(async()=>{if(!i.current){i.current=!0,s(!0);try{let e=await ek.Rx.sync();await t(),l(o("syncSuccess",{count:e.worktreeCount}),"success",3e3)}catch(e){e instanceof ek.hD&&401===e.status?l(o("syncAuthError"),"error",5e3):l(o("syncError"),"error",5e3)}finally{i.current=!1,s(!1)}}},[t,l,o]);return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(Y.m_,{content:o("tooltips.sync"),placement:"bottom",children:(0,r.jsx)("button",{type:"button",onClick:d,disabled:n,"aria-label":o("syncButtonLabel"),className:"p-1 rounded-md text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:(0,r.jsx)(eD,{className:n?"animate-spin":""})})})})});function eW(e){let{onNavigate:t}=e,n=(0,f.c)("common")("settings.title");return(0,r.jsx)(en,{testIdPrefix:"sidebar-settings-menu",side:"top",align:"start",showDisplayPreferences:!0,onNavigate:t,children:(0,r.jsx)(ee,{asChild:!0,children:(0,r.jsxs)("button",{type:"button","data-testid":"sidebar-settings-menu",className:"flex w-full items-center gap-2 px-2 py-1.5 rounded-md text-sm text-sidebar-muted hover:text-sidebar-foreground hover:bg-sidebar-hover focus:outline-none focus:ring-2 focus:ring-ring transition-colors",children:[(0,r.jsx)(v.A,{size:20,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"truncate",children:n})]})})})}var ez=n(52407);function e_(){let{shouldSurface:e,isReconnecting:t}=(0,ez.Fx)(),n=(0,f.c)("common");if(!e)return null;let s=n(t?"connection.reconnecting":"connection.offline");return(0,r.jsxs)("span",{"data-testid":"connection-status-indicator","data-connection-state":t?"reconnecting":"offline",role:"status","aria-live":"polite",title:n(t?"connection.reconnectingTooltip":"connection.offlineTooltip"),className:"hidden sm:inline-flex items-center gap-1.5 rounded-full border border-border bg-surface px-2 py-0.5 text-xs text-muted-foreground",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:["w-1.5 h-1.5 rounded-full",t?"bg-warning motion-safe:animate-pulse":"bg-muted-foreground"].join(" ")}),s]})}var eH=n(72137);let eV=[{prefix:"/sessions",labelKey:"nav.sessions"},{prefix:"/repositories",labelKey:"nav.repositories"},{prefix:"/review",labelKey:"nav.review"},{prefix:"/skills",labelKey:"nav.skills"},{prefix:"/more",labelKey:"nav.more"}];function eY(e){var t,n,a,i;let{title:l="CommandMate"}=e,o=null!==(n=null!=(t=(0,s.usePathname)())?t:"",null!=(i=null==(a=eV.find(e=>n.startsWith(e.prefix)))?void 0:a.labelKey)?i:null);return(0,r.jsxs)("header",{"data-testid":"screen-status-row",className:"flex flex-shrink-0 items-center justify-end gap-4 px-4 py-1.5 border-b border-border bg-background supports-[backdrop-filter]:bg-background/80 backdrop-blur-md empty:hidden",children:[!o&&(0,r.jsx)("h1",{"data-testid":"header-screen-title",className:"mr-auto min-w-0 truncate text-lg font-bold text-foreground",children:l}),(0,r.jsx)(e_,{}),(0,r.jsx)(eH.H,{})]})}function eU(e){let{count:t}=e,n=(0,f.c)("common");return 0===t?null:(0,r.jsx)("span",{"data-testid":"attention-badge-bubble",role:"status","aria-label":n("attention.badgeLabel",{count:t}),className:"absolute -top-1.5 -right-2.5 min-w-[1.05rem] rounded-full bg-warning-foreground px-1 text-[0.625rem] font-bold leading-[1.05rem] text-warning-subtle tabular-nums text-center",children:t>99?"99+":t})}let eq="relative flex h-10 w-10 items-center justify-center rounded-md transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",eG="text-sidebar-muted hover:bg-sidebar-hover hover:text-sidebar-foreground";function eX(e){let{href:t,icon:n,label:s,testId:a,isActive:i,badge:l}=e;return(0,r.jsx)(Y.m_,{content:s,placement:"right",children:(0,r.jsx)(x,{href:t,"data-testid":a,"aria-label":s,"aria-current":i?"page":void 0,className:"".concat(eq," ").concat(i?"bg-sidebar-hover text-sidebar-foreground":eG),children:(0,r.jsxs)("span",{className:"relative flex",children:[(0,r.jsx)(n,{size:20,"aria-hidden":"true"}),l]})})})}function eJ(e){let{icon:t,label:n,testId:s,onClick:a,hasPopup:i}=e;return(0,r.jsx)(Y.m_,{content:n,placement:"right",children:(0,r.jsx)("button",{type:"button","data-testid":s,"aria-label":n,"aria-haspopup":i,onClick:a,className:"".concat(eq," ").concat(eG),children:(0,r.jsx)(t,{size:20,"aria-hidden":"true"})})})}function eZ(){var e;let t=(0,f.c)("common"),n=(0,f.c)("commandPalette"),i=null!=(e=(0,s.usePathname)())?e:"",{setOpen:l}=(0,el.C)(),{openNewTask:o}=(0,eo.hX)(),{count:d}=(0,ey.Lv)(),c=t("settings.title"),u={sessions:(0,r.jsx)(eX,{href:"/sessions",icon:p.A,label:t("nav.sessions"),testId:"sidebar-rail-sessions",isActive:i.startsWith("/sessions")}),repositories:(0,r.jsx)(eX,{href:"/repositories",icon:b.A,label:t("nav.repositories"),testId:"sidebar-rail-repositories",isActive:i.startsWith("/repositories")}),review:(0,r.jsx)(eX,{href:d>0?I.ks:"/review",icon:g.A,label:t("nav.review"),testId:"sidebar-rail-review",isActive:i.startsWith("/review"),badge:(0,r.jsx)(eU,{count:d})})};return(0,r.jsxs)("nav",{"data-testid":"sidebar-rail","aria-label":t("sidebar.railLabel"),className:"flex h-full flex-col items-center gap-1 bg-sidebar pb-2 text-sidebar-foreground",style:{width:"".concat(P.BN,"px")},children:[(0,r.jsx)(eg,{testId:"sidebar-rail-toggle"}),(0,r.jsx)(eJ,{icon:es.A,label:t("newTask.title"),testId:"sidebar-rail-new-task",onClick:()=>o(),hasPopup:"dialog"}),(0,r.jsx)(eJ,{icon:ea.A,label:n("mobileTrigger"),testId:"sidebar-rail-search",onClick:()=>l(!0)}),(0,r.jsx)("div",{className:"my-1 w-8 border-b border-sidebar-border","aria-hidden":"true"}),P.go.map(e=>(0,r.jsx)(a.Fragment,{children:u[e]},e)),(0,r.jsx)("div",{className:"mt-auto",children:(0,r.jsx)(en,{testIdPrefix:"sidebar-rail-settings",side:"right",align:"end",showDisplayPreferences:!0,children:(0,r.jsx)(Y.m_,{content:c,placement:"right",children:(0,r.jsx)(ee,{asChild:!0,children:(0,r.jsx)("button",{type:"button","data-testid":"sidebar-rail-settings","aria-label":c,className:"".concat(eq," ").concat(eG),children:(0,r.jsx)(v.A,{size:20,"aria-hidden":"true"})})})})})})]})}var e$=n(46365),eQ=n(12906),e0=n(37772),e1=n(9540),e2=n(55756);let e5=[{labelKey:"nav.sessions",href:"/sessions",isActive:e=>e.startsWith("/sessions"),icon:(0,r.jsx)(p.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.review",href:"/review",isActive:e=>e.startsWith("/review"),icon:(0,r.jsx)(g.A,{size:20,"aria-hidden":"true"}),showsAttentionBadge:!0},{labelKey:"nav.more",href:"/more",isActive:e=>e.startsWith("/more"),icon:(0,r.jsx)(e0.A,{size:20,"aria-hidden":"true"})}];function e4(){let e=(0,s.usePathname)(),{setOpen:t}=(0,el.C)(),n=(0,f.c)("commandPalette"),a=(0,f.c)("common"),{count:l}=(0,ey.Lv)(),o=(0,i.pT)();return(null==o?void 0:o.isMobileDrawerOpen)?null:(0,r.jsx)("nav",{"data-testid":"global-mobile-nav",className:"fixed bottom-0 left-0 right-0 z-50 border-t border-border bg-background supports-[backdrop-filter]:bg-background/80 backdrop-blur-md pb-safe",children:(0,r.jsxs)("div",{className:"flex items-center justify-around h-14",children:[o&&(0,r.jsxs)("button",{type:"button","data-testid":"mobile-nav-open-sidebar",...e2.cv,onClick:o.openMobileDrawer,className:"flex flex-col items-center justify-center flex-1 h-full text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,r.jsx)(e1.A,{size:20,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"mt-1 whitespace-nowrap",children:a("sidebar.branches")})]}),e5.map(t=>{let n=t.isActive(e),s=!0===t.showsAttentionBadge&&l>0;return(0,r.jsxs)(x,{href:s?I.ks:t.href,className:"flex flex-col items-center justify-center flex-1 h-full text-xs transition-colors ".concat(n?"text-accent-600 dark:text-accent-400":"text-muted-foreground hover:text-foreground"),children:[(0,r.jsxs)("span",{className:"relative inline-flex",children:[t.icon,!0===t.showsAttentionBadge&&(0,r.jsx)(eU,{count:l})]}),(0,r.jsx)("span",{className:"mt-1 whitespace-nowrap",children:a(t.labelKey)})]},t.href)}),(0,r.jsxs)("button",{type:"button","data-testid":"mobile-command-palette-trigger",onClick:()=>t(!0),"aria-label":n("mobileTrigger"),className:"flex flex-col items-center justify-center flex-1 h-full text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,r.jsx)(ea.A,{size:20,"aria-hidden":"true"}),(0,r.jsx)("span",{className:"mt-1 whitespace-nowrap",children:n("mobileLabel")})]})]})})}function e3(){let{shouldSurface:e,isReconnecting:t}=(0,ez.Fx)(),n=(0,f.c)("common");if(!e)return null;let s=n(t?"connection.reconnecting":"connection.offline"),a=n(t?"connection.reconnectingTooltip":"connection.offlineTooltip");return(0,r.jsx)("div",{"data-testid":"mobile-connection-banner","data-connection-state":t?"reconnecting":"offline",role:"status","aria-live":"polite",title:a,className:"shrink-0 pt-safe border-b ".concat(t?"bg-warning-subtle border-warning-border text-warning-foreground":"bg-danger-subtle border-danger-border text-danger-foreground"),children:(0,r.jsxs)("div",{className:"flex items-center justify-center gap-1.5 px-3 py-1 text-xs",children:[(0,r.jsx)("span",{"aria-hidden":"true",className:"w-1.5 h-1.5 rounded-full ".concat(t?"bg-warning motion-safe:animate-pulse":"bg-danger")}),s]})})}var e9=n(45573),e6=n(94465),e7=n(70628);function e8(e){return!0===e.isComposing||229===e.keyCode}let te=[...ec,{id:"newTask",keys:["MOD","Shift","O"],scope:"global"},{id:"newTaskSend",keys:["MOD","↵"],scope:"global"}];function tt(){let{open:e,setOpen:t}=(0,e7.K)(),{open:n}=(0,el.C)(),{isOpen:s}=(0,eo.hX)(),i=(0,f.c)("keyboardShortcuts"),[l,o]=(0,a.useState)(!1);(0,a.useEffect)(()=>o(eu()),[]);let d=(0,a.useRef)(e);(0,a.useEffect)(()=>{d.current=e},[e]);let c=(0,a.useRef)(n);(0,a.useEffect)(()=>{c.current=n},[n]);let u=(0,a.useRef)(s);(0,a.useEffect)(()=>{u.current=s},[s]),(0,a.useEffect)(()=>{function e(e){"?"!==e.key||e.isComposing||229===e.keyCode||(0,e9.tJ)(e.target)||c.current||u.current||d.current||(e.preventDefault(),t(!0))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t]);let m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ec;return ed.map(t=>({scope:t,shortcuts:e.filter(e=>e.scope===t)})).filter(e=>e.shortcuts.length>0)}(te);return(0,r.jsx)(e6.a,{isOpen:e,onClose:()=>t(!1),title:i("title"),size:"md",children:(0,r.jsx)("div",{"data-testid":"keyboard-shortcuts-overlay",className:"space-y-6",children:m.map(e=>{let{scope:t,shortcuts:n}=e;return(0,r.jsxs)("section",{"data-testid":"keyboard-shortcuts-scope-".concat(t),children:[(0,r.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:i("scopes.".concat(t))}),(0,r.jsx)("ul",{className:"divide-y divide-border",children:n.map(e=>(0,r.jsxs)("li",{"data-testid":"keyboard-shortcut-".concat(e.id),className:"flex items-center justify-between gap-4 py-2",children:[(0,r.jsx)("span",{className:"text-sm text-foreground",children:i("shortcuts.".concat(e.id))}),(0,r.jsx)("span",{className:"flex flex-shrink-0 items-center gap-1",children:e.keys.map((e,t)=>(0,r.jsx)(ei.u,{children:em(e,l)},t))})]},e.id))})]},t)})})})}var tn=n(77016),tr=n(36809),ts=n(31166);let ta=/^v?\d+\.\d+\.\d+$/;function ti(e){return e.replace(/^v/,"").split(".").map(Number)}let tl="commandmate.lastSeenAppVersion";function to(e){try{window.localStorage.setItem(tl,e)}catch(e){}}let td=[{key:"added",labelKey:"whatsNew.added"},{key:"improved",labelKey:"whatsNew.improved"},{key:"fixed",labelKey:"whatsNew.fixed"}];function tc(){let e=(0,f.c)("common"),t=(0,tr.Ym)(),[n,s]=(0,a.useState)(null),[i,l]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e,t="0.49.3";try{e=window.localStorage.getItem(tl)}catch(e){return}let n=function(e,t){if(!ta.test(t))return{kind:"none"};if(null===e||!ta.test(e))return{kind:"remember"};let n=function(e,t){let n=ti(e),r=ti(t),s=Math.max(n.length,r.length);for(let e=0;e<s;e++){let t=n[e]||0,s=r[e]||0;if(t>s)return 1;if(t<s)return -1}return 0}(t,e);return 0===n?{kind:"none"}:n<0?{kind:"remember"}:{kind:"show",from:e}}(e,t);if("none"===n.kind)return;if("remember"===n.kind)return void to(t);let r=!1;return ek.GQ.getReleaseNotes(n.from,t).then(e=>{r||(s({from:n.from,to:t,notes:e.notes}),l(!0))},()=>{}),()=>{r=!0}},[]);let o=(0,a.useCallback)(()=>{n&&to(n.to),l(!1)},[n]);if(!n)return null;let d="ja"===t?"ja":"en";return(0,r.jsx)(e6.a,{isOpen:i,onClose:o,title:e("whatsNew.title",{from:n.from,to:n.to}),size:"md",children:(0,r.jsxs)("div",{className:"space-y-4","data-testid":"whats-new-dialog",children:[0===n.notes.length?(0,r.jsx)("p",{className:"text-sm text-foreground","data-testid":"whats-new-empty",children:e("whatsNew.empty")}):n.notes.map(t=>(0,r.jsxs)("section",{className:"space-y-3","data-testid":"whats-new-version-".concat(t.version),children:[(0,r.jsxs)("h4",{className:"text-sm font-semibold text-foreground",children:["v",t.version,(0,r.jsx)("span",{className:"ml-2 text-xs font-normal text-muted-foreground",children:t.date})]}),t.highlight&&(0,r.jsxs)("div",{"data-testid":"whats-new-highlight",children:[(0,r.jsx)("h5",{className:"text-xs font-medium text-muted-foreground",children:e("whatsNew.highlight")}),(0,r.jsx)("p",{className:"mt-1 text-sm text-foreground",children:t.highlight[d]})]}),td.map(n=>{let{key:s,labelKey:a}=n;return t[s].length>0?(0,r.jsxs)("div",{"data-testid":"whats-new-".concat(s),children:[(0,r.jsx)("h5",{className:"text-xs font-medium text-muted-foreground",children:e(a)}),(0,r.jsx)("ul",{className:"mt-1 list-disc space-y-1 pl-5 text-sm text-foreground",children:t[s].map((e,t)=>(0,r.jsx)("li",{children:e[d]},t))})]},s):null})]},t.version)),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 border-t border-border pt-3",children:[(0,r.jsx)("a",{href:"".concat("https://github.com/Kewton/CommandMate/releases/tag/v").concat(n.to),target:"_blank",rel:"noopener noreferrer",className:"text-sm text-accent-600 dark:text-accent-400 hover:underline","data-testid":"whats-new-release-link",children:e("whatsNew.releaseLink")}),(0,r.jsx)(ts.$,{type:"button",variant:"primary",size:"sm",onClick:o,"data-testid":"whats-new-close",children:e("whatsNew.close")})]})]})})}var tu=n(34325);let tm="commandmate.newTask.recentTargets";function th(e){if(null===e||"object"!=typeof e)return!1;let{worktreeId:t,instanceId:n}=e;return"string"==typeof t&&""!==t&&"string"==typeof n&&""!==n}function tx(e,t){return e.worktreeId===t.worktreeId&&e.instanceId===t.instanceId}function tf(){try{let e=window.localStorage.getItem(tm);if(!e)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];return t.filter(th).map(e=>{let{worktreeId:t,instanceId:n}=e;return{worktreeId:t,instanceId:n}}).slice(0,3)}catch(e){return[]}}var tp=n(54014);function tb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=new Map;for(let r of e){let e=n.get(r.repositoryPath);if(!e){let s=t.find(e=>e.path===r.repositoryPath);e={path:r.repositoryPath,name:(null==s?void 0:s.displayName)||(null==s?void 0:s.name)||r.repositoryName,worktrees:[]},n.set(r.repositoryPath,e)}e.worktrees.push(r)}let r=Array.from(n.values());for(let e of r)e.worktrees.sort((e,t)=>e.name.localeCompare(t.name));return r.sort((e,t)=>e.name.localeCompare(t.name))}function tg(e){return e.agentInstances&&e.agentInstances.length>0?e.agentInstances.slice().sort((e,t)=>e.order-t.order):e.selectedAgents&&e.selectedAgents.length>0?(0,tp.lu)(e.selectedAgents):e.cliToolId?(0,tp.lu)([e.cliToolId]):[]}function tv(e,t){let n=e.find(e=>e.id===t.worktreeId);if(!n)return null;let r=tg(n).find(e=>e.id===t.instanceId);return r?{worktree:n,instance:r}:null}function tw(e,t){var n,r,s,a;let i=null!=(a=null==(n=e.sessionStatusByInstance)?void 0:n[t.id])?a:t.id===t.cliTool?null==(r=e.sessionStatusByCli)?void 0:r[t.cliTool]:void 0,l=null==i?void 0:i.startingSince,o=null==(s=e.autoYesByInstance)?void 0:s[t.id];return{instance:t,label:(0,tp.sw)(t),running:(null==i?void 0:i.isRunning)===!0,starting:"number"==typeof l,autoYes:(null==o?void 0:o.enabled)&&"number"==typeof o.expiresAt?o:null}}var tj=n(56936),ty=n(14524);let tk={promptWaiting:"PROMPT_WAITING",sessionStarting:"SESSION_STARTING",instanceToolConflict:"instance_tool_conflict"};async function tN(e){try{let t=await e.json(),n=t&&"object"==typeof t?t.expiresAt:null;if("number"==typeof n)return{enabled:!0,expiresAt:n}}catch(e){}return null}async function tC(e){try{let t=await e.json();if(t&&"object"==typeof t){let{error:e,code:n}=t;return{error:"string"==typeof e&&""!==e?e:null,code:"string"==typeof n?n:null}}}catch(e){}return{error:null,code:null}}async function tS(e,t){let{modelRequested:n}=t;if(e.ok&&!e.redirected)return{ok:!0};let{status:r}=e,{error:s,code:a}=await tC(e);return{ok:!1,kind:409===r?a===tk.promptWaiting?"prompt_waiting":"conflict":503===r?a===tk.sessionStarting?"starting":"start_failed":400===r?n&&a!==tk.instanceToolConflict?"model_rejected":"invalid":"failed",status:e.ok?0:r,detail:s}}function tI(e){return{ok:!1,kind:"failed",status:0,detail:e instanceof ek.hD||e instanceof Error?e.message:null}}function tT(e,t){return new Promise((n,r)=>{let s=setTimeout(()=>{r(new ek.hD("Request timed out after ".concat(t,"ms"),0,void 0,"timeout"))},t);e().then(e=>{clearTimeout(s),n(e)},e=>{clearTimeout(s),r(e)})})}async function tA(e){var t;let n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ek.E,{target:s,cliToolId:a}=e,i="/api/worktrees/".concat(encodeURIComponent(s.worktreeId)),l={"Content-Type":"application/json"},o=!1,d=e.autoYesDuration;if(null!==d){let t,c=!1;try{t=await tT(async()=>{var t,u;let m=await r("".concat(i,"/auto-yes"),{method:"POST",headers:l,body:JSON.stringify({enabled:!0,cliToolId:a,instanceId:s.instanceId,duration:d,answerMode:null!=(t=e.autoYesAnswerMode)?t:ty.Rb})});if(!m.ok){let{error:e}=await tC(m);return{ok:!1,kind:"auto_yes_failed",status:m.status,detail:e}}return c=!0,n=null!=(u=await tN(m))?u:void 0,o=void 0===n,null},(0,tj.Z3)("POST"))}catch(e){if(!c){let t=tI(e);return t.ok?t:{...t,kind:"auto_yes_failed"}}return{...tI(e),autoYesStateUnknown:!0}}if(t)return t}let c=e=>n?{...e,armedAutoYes:n}:o?{...e,autoYesStateUnknown:!0}:e,u=(null==(t=e.model)?void 0:t.trim())||void 0,m=(0,tj.SE)();try{return c(await tT(async()=>{let t=await r("".concat(i,"/send"),{method:"POST",headers:l,body:JSON.stringify({content:e.content,cliToolId:a,instanceId:s.instanceId,...u?{model:u}:{}}),timeoutMs:m});return tS(t,{modelRequested:void 0!==u})},m))}catch(e){return c(tI(e))}}var tM=n(86068);let tE="w-full px-3 py-2 border border-input rounded-lg bg-surface text-foreground text-sm focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent disabled:opacity-60",tL="block text-xs font-medium text-muted-foreground mb-1";function tR(e){let{status:t,isEmpty:n,onRetry:s}=e,a=(0,f.c)("common");return(0,r.jsxs)(r.Fragment,{children:["loading"===t&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"new-task-loading",children:a("newTask.loading")}),"error"===t&&(0,r.jsxs)("div",{className:"space-y-2",role:"alert","data-testid":"new-task-load-error",children:[(0,r.jsx)("p",{className:"text-sm text-danger",children:a("newTask.loadError")}),(0,r.jsx)("button",{type:"button",onClick:s,className:"px-3 py-1.5 text-sm font-medium text-foreground bg-muted hover:bg-muted/80 rounded-lg",children:a("retry")})]}),"ready"===t&&n&&(0,r.jsx)("p",{className:"text-sm text-muted-foreground","data-testid":"new-task-empty",children:a("newTask.noTargets")})]})}function tP(e){let{recentOptions:t,targetState:n,worktreeId:s,onSelect:a}=e,i=(0,f.c)("common");return 0===t.length?null:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:tL,children:i("newTask.recentLabel")}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2","data-testid":"new-task-recents",children:t.map(e=>{let{target:t,label:i}=e,l=!!n&&tx(t,{worktreeId:s,instanceId:n.instance.id});return(0,r.jsx)("button",{type:"button","aria-pressed":l,"data-testid":"new-task-recent",onClick:()=>a(t),className:"max-w-full truncate rounded-full border px-3 py-1 text-xs transition-colors ".concat(l?"border-accent-500 bg-accent-500/15 text-foreground":"border-border text-muted-foreground hover:text-foreground"),children:i},"".concat(t.worktreeId,":").concat(t.instanceId))})})]})}function tB(e){var t,n,s;let{repositoryOptions:a,repository:i,worktreeId:l,worktree:o,instances:d,instance:c,onRepositoryChange:u,onBranchChange:m,onAgentChange:h}=e,x=(0,f.c)("common");return(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"new-task-repository",className:tL,children:x("newTask.repositoryLabel")}),(0,r.jsx)("select",{id:"new-task-repository","data-testid":"new-task-repository",value:null!=(t=null==i?void 0:i.path)?t:"",onChange:e=>u(e.target.value),className:tE,children:a.map(e=>(0,r.jsx)("option",{value:e.path,children:e.name},e.path))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"new-task-branch",className:tL,children:x("newTask.branchLabel")}),(0,r.jsx)("select",{id:"new-task-branch","data-testid":"new-task-branch",value:l,onChange:e=>m(e.target.value),className:tE,children:(null!=(n=null==i?void 0:i.worktrees)?n:[]).map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"new-task-agent",className:tL,children:x("newTask.agentLabel")}),(0,r.jsx)("select",{id:"new-task-agent","data-testid":"new-task-agent",value:null!=(s=null==c?void 0:c.id)?s:"",onChange:e=>h(e.target.value),className:tE,disabled:0===d.length,children:d.map(e=>{var t;let n=o?tw(o,e):null,s=(null==n?void 0:n.starting)?"starting":(null==n?void 0:n.running)?"running":"stopped";return(0,r.jsx)("option",{value:e.id,children:"".concat(null!=(t=null==n?void 0:n.label)?t:e.id," — ").concat(x("newTask.agentStatus.".concat(s)))},e.id)})})]})]})}function tK(e){let{statusKey:t,agentLabel:n}=e,s=(0,f.c)("common");return(0,r.jsxs)(r.Fragment,{children:["stopped"===t&&(0,r.jsx)("p",{className:"text-xs text-foreground","data-testid":"new-task-will-start",children:s("newTask.willStart",{agent:n})}),"starting"===t&&(0,r.jsx)("p",{className:"text-xs text-warning-foreground","data-testid":"new-task-starting",children:s("newTask.startingNotice",{agent:n})})]})}function tO(e){let{modelAvailability:t,model:n,cliTool:s,agentLabel:a,onChange:i}=e,l=(0,f.c)("common");return(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"new-task-model",className:tL,children:l("newTask.modelLabel")}),(0,r.jsx)("input",{id:"new-task-model","data-testid":"new-task-model",type:"text",value:(null==t?void 0:t.selectable)?n:"",onChange:e=>i(e.target.value),placeholder:l("newTask.modelPlaceholder"),disabled:!(null==t?void 0:t.selectable),className:tE}),t&&(0,r.jsx)("p",{className:"mt-1 text-xs text-muted-foreground","data-testid":"new-task-model-note",children:t.selectable?l("copilot"===s?"newTask.modelHintSwitch":"newTask.modelHintLaunch"):l("newTask.modelUnavailable.".concat(t.reason),{agent:a})})]})}function tD(e){let{armedAutoYes:t,autoYesChoice:n,autoYesUnknown:s,onChoiceChange:a,answerMode:i,onAnswerModeChange:l}=e,o=(0,f.c)("common"),d=(0,f.c)("autoYes");return(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"new-task-auto-yes",className:tL,children:o("newTask.autoYesLabel")}),t?(0,r.jsx)("p",{className:"text-sm text-foreground","data-testid":"new-task-auto-yes-active",children:o("newTask.autoYesActive",{remaining:(0,tu.$B)(t.expiresAt)})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("select",{id:"new-task-auto-yes","data-testid":"new-task-auto-yes",value:null!=n?n:"",onChange:e=>{let t=Number(e.target.value);a(""!==e.target.value&&(0,tu.dR)(t)?t:null)},className:tE,children:[(0,r.jsx)("option",{value:"",children:o(s?"newTask.autoYesKeepUnknown":"newTask.autoYesKeep")}),tu._q.map(e=>(0,r.jsx)("option",{value:e,children:o("newTask.autoYesEnableFor",{duration:d("durationHours",{hours:(0,tu.nG)(e)})})},e))]}),s&&(0,r.jsx)("p",{className:"mt-1 text-xs text-warning-foreground","data-testid":"new-task-auto-yes-unknown",children:o("newTask.autoYesUnknown")}),(0,r.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:o("newTask.autoYesScope")}),null!==n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(tM.o,{value:i,onChange:l,idPrefix:"new-task-auto-yes-answer-mode",labelClassName:tL})}),(0,r.jsx)("p",{className:"mt-1 text-xs text-warning-foreground","data-testid":"new-task-auto-yes-risk",children:d("riskWarning")})]})]})]})}function tF(e){let{failure:t,agentLabel:n}=e,s=(0,f.c)("common");return t?(0,r.jsxs)("div",{role:"alert","data-testid":"new-task-error","data-kind":t.kind,className:"rounded-lg border border-danger-border bg-danger-subtle px-3 py-2 text-sm text-danger-foreground",children:[(0,r.jsx)("p",{children:s("newTask.errors.".concat(t.kind),{agent:n})}),t.detail&&(0,r.jsx)("p",{className:"mt-1 break-words text-xs text-muted-foreground","data-testid":"new-task-error-detail",children:t.detail})]}):null}function tW(){var e,t,n,i,l,o,d;let{requestedTarget:c,screenTarget:u,closeNewTask:m,setCloseLocked:h}=(0,eo.hX)(),x=(0,s.useRouter)(),{showToast:p}=(0,ej.dj)(),b=(0,f.c)("common"),[g,v]=(0,a.useState)({status:"loading"}),[w,j]=(0,a.useState)(0),[y]=(0,a.useState)(()=>tf()),[k,N]=(0,a.useState)(""),[C,S]=(0,a.useState)(""),[I,T]=(0,a.useState)(""),[A,M]=(0,a.useState)(""),[E,L]=(0,a.useState)(null),[R,B]=(0,a.useState)(ty.Rb),[K,O]=(0,a.useState)(!1),[D,F]=(0,a.useState)(null),[W,z]=(0,a.useState)(!1),_=(0,a.useRef)(null),H=(0,a.useRef)(!0),V=(0,a.useRef)(!1),[Y,U]=(0,a.useState)({}),[q,G]=(0,a.useState)({});(0,a.useEffect)(()=>(H.current=!0,z(eu()),()=>{H.current=!1,h(!1)}),[h]);let X=(0,a.useCallback)(()=>{V.current||m()},[m]),J=(0,a.useRef)([c,u,null!=(e=y[0])?e:null]),Z=(0,a.useRef)(!1);(0,a.useEffect)(()=>{let e=!1;return v({status:"loading"}),ek.y.getAll().then(t=>{var n,r;if(e)return;let s=null!=(n=t.worktrees)?n:[],a=null!=(r=t.repositories)?r:[];if(v({status:"ready",worktrees:s,repositories:a}),Z.current)return;Z.current=!0;let i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];for(let n of t){if(!n)continue;if(tv(e,n))return n;let t=e.find(e=>e.id===n.worktreeId),r=t?tg(t)[0]:void 0;if(t&&r)return{worktreeId:t.id,instanceId:r.id}}for(let t of tb(e,n))for(let e of t.worktrees){let t=tg(e)[0];if(t)return{worktreeId:e.id,instanceId:t.id}}return null}(s,J.current,a);i&&(N(i.worktreeId),S(i.instanceId))}).catch(()=>{e||v({status:"error"})}),()=>{e=!0}},[w]);let $=(0,a.useMemo)(()=>"ready"===g.status?g.worktrees:[],[g]),Q=(0,a.useMemo)(()=>"ready"===g.status?tb(g.worktrees,g.repositories):[],[g]),ee=null!=(t=$.find(e=>e.id===k))?t:null,et=(0,a.useMemo)(()=>ee?tg(ee):[],[ee]),en=null!=(n=et.find(e=>e.id===C))?n:null,er=ee&&en?tw(ee,en):null,es=ee&&null!=(i=Q.find(e=>e.path===ee.repositoryPath))?i:null,ea=er?(d=er.instance.cliTool,"copilot"===d?{selectable:!0}:"claude"===d||"antigravity"===d?er.running||er.starting?{selectable:!1,reason:"running"}:{selectable:!0}:{selectable:!1,reason:"unsupported"}):null,el=er?null!=(l=q["".concat(k,":").concat(er.instance.id)])?l:er.autoYes:null,ed=!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();return!!e&&e.enabled&&"number"==typeof e.expiresAt&&e.expiresAt-t>0}(el)?null:el,ec=!!er&&!0===Y["".concat(k,":").concat(er.instance.id)],[,eh]=(0,a.useState)(0);(0,a.useEffect)(()=>{if(!ed)return;let e=setInterval(()=>eh(Date.now()),tu.$s);return()=>clearInterval(e)},[ed]),(0,a.useEffect)(()=>{var e;"ready"===g.status&&(null==(e=_.current)||e.focus())},[g.status]);let ex=(0,a.useMemo)(()=>y.flatMap(e=>{var t;let n=tv($,e);if(!n)return[];let r=Q.find(e=>e.path===n.worktree.repositoryPath),s=tw(n.worktree,n.instance).label;return[{target:e,label:"".concat(null!=(t=null==r?void 0:r.name)?t:n.worktree.repositoryName," / ").concat(n.worktree.name," / ").concat(s)}]}),[y,$,Q]),ef=(0,a.useCallback)(e=>{N(e.worktreeId),S(e.instanceId),F(null)},[]),ep=(0,a.useCallback)(e=>{var t,n,r;let s=Q.find(t=>t.path===e),a=null!=(n=null==s?void 0:s.worktrees.find(e=>tg(e).length>0))?n:null==s?void 0:s.worktrees[0];a&&ef({worktreeId:a.id,instanceId:null!=(r=null==(t=tg(a)[0])?void 0:t.id)?r:""})},[Q,ef]),eb=(0,a.useCallback)(e=>{var t,n,r;let s=$.find(t=>t.id===e);if(!s)return;let a=tg(s),i=a.find(e=>e.id===C);ef({worktreeId:s.id,instanceId:null!=(r=null!=(n=null==i?void 0:i.id)?n:null==(t=a[0])?void 0:t.id)?r:""})},[$,C,ef]),eg=!!er&&""!==I.trim()&&!K,ev=(0,a.useCallback)(async()=>{if(!eg||!ee||!er)return;let e={worktreeId:ee.id,instanceId:er.instance.id};V.current=!0,h(!0),O(!0),F(null);let t=await tA({target:e,cliToolId:er.instance.cliTool,content:I.trim(),model:(null==ea?void 0:ea.selectable)?A:void 0,autoYesDuration:ed?null:E,autoYesAnswerMode:R});if(V.current=!1,h(!1),!H.current)return;let{armedAutoYes:n}=t,r="".concat(e.worktreeId,":").concat(e.instanceId);if(t.autoYesStateUnknown&&U(e=>({...e,[r]:!0})),n&&(U(e=>{let{[r]:t,...n}=e;return n}),G(e=>({...e,[r]:n})),L(null),B(ty.Rb)),!t.ok){F(t),O(!1);return}var s=e;let a=[{worktreeId:s.worktreeId,instanceId:s.instanceId},...tf().filter(e=>!tx(e,s))].slice(0,3);try{window.localStorage.setItem(tm,JSON.stringify(a))}catch(e){}let i="".concat(window.location.pathname).concat(window.location.search),l="".concat(ee.name," / ").concat(er.label);m(),x.push((0,P.Ii)(e)),p(b("newTask.sentToast",{target:l}),"success",6e3,{onClick:()=>x.push(i)})},[eg,ee,er,I,ea,A,ed,E,R,m,h,x,p,b]),ew=(0,a.useCallback)(e=>{var t;e8(t=e.nativeEvent)||"Enter"!==t.key||t.shiftKey||t.altKey||!t.metaKey&&!t.ctrlKey||(e.preventDefault(),ev())},[ev]),ey=null!=(o=null==er?void 0:er.label)?o:"",eN=er?er.starting?"starting":er.running?"running":"stopped":null;return(0,r.jsx)(e6.a,{isOpen:!0,onClose:X,title:b("newTask.title"),size:"md",disableClose:K,children:(0,r.jsxs)("div",{"data-testid":"new-task-dialog",className:"space-y-4",onKeyDown:ew,children:[(0,r.jsx)(tR,{status:g.status,isEmpty:0===Q.length,onRetry:()=>j(e=>e+1)}),"ready"===g.status&&Q.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(tP,{recentOptions:ex,targetState:er,worktreeId:k,onSelect:ef}),(0,r.jsx)(tB,{repositoryOptions:Q,repository:es,worktreeId:k,worktree:ee,instances:et,instance:en,onRepositoryChange:ep,onBranchChange:eb,onAgentChange:e=>ef({worktreeId:k,instanceId:e})}),(0,r.jsx)(tK,{statusKey:eN,agentLabel:ey}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"new-task-message",className:tL,children:b("newTask.messageLabel")}),(0,r.jsx)("textarea",{ref:_,id:"new-task-message","data-testid":"new-task-message",value:I,onChange:e=>T(e.target.value),placeholder:b("newTask.messagePlaceholder"),rows:5,className:"".concat(tE," resize-y")})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,r.jsx)(tO,{modelAvailability:ea,model:A,cliTool:null==er?void 0:er.instance.cliTool,agentLabel:ey,onChange:M}),(0,r.jsx)(tD,{armedAutoYes:ed,autoYesChoice:E,autoYesUnknown:ec,onChoiceChange:L,answerMode:R,onAnswerModeChange:B})]})]}),(0,r.jsx)(tF,{failure:D,agentLabel:ey}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,r.jsxs)("span",{className:"mr-auto hidden items-center gap-1 text-xs text-muted-foreground sm:flex",children:[(0,r.jsx)(ei.u,{children:em("MOD",W)}),(0,r.jsx)(ei.u,{children:"↵"}),(0,r.jsx)("span",{children:b("newTask.sendHint")})]}),(0,r.jsx)("button",{type:"button","data-testid":"new-task-cancel",onClick:X,disabled:K,className:"px-4 py-2 text-sm font-medium text-foreground bg-muted hover:bg-muted/80 rounded-lg transition-colors disabled:opacity-50",children:b("cancel")}),(0,r.jsx)("button",{type:"button","data-testid":"new-task-send",onClick:()=>void ev(),disabled:!eg,className:"px-4 py-2 text-sm font-medium text-white bg-accent-600 hover:bg-accent-700 disabled:opacity-50 disabled:cursor-not-allowed rounded-lg transition-colors",children:K?b("newTask.sending"):b("newTask.send")})]})]})})}function tz(){let{isOpen:e,openNewTask:t}=(0,eo.hX)(),{open:n}=(0,el.C)(),s=(0,a.useRef)(n);return(0,a.useEffect)(()=>{s.current=n},[n]),(0,a.useEffect)(()=>{function e(e){if(!e.defaultPrevented)!e8(e)&&e.shiftKey&&!e.altKey&&(e.metaKey||e.ctrlKey)&&("o"===e.key.toLowerCase()||"KeyO"===e.code)&&(s.current||(e.preventDefault(),t()))}return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t]),e?(0,r.jsx)(tW,{}):null}var t_=n(59854);let tH="transform transition-transform duration-300 ease-out",tV=(0,a.memo)(function(e){let{children:t}=e,{isOpen:n,isMobileDrawerOpen:u,closeMobileDrawer:m,width:h,setWidth:x,repoTabBarMode:f,toggle:p}=(0,i.VF)(),b=(0,l.a)(),{showSidebar:g,showGlobalNav:v}=function(){var e=(0,s.usePathname)();for(let t of d)if(e.startsWith(t.prefix))return{...o,...t.config};return{...o}}();!function(e,t){let{open:n}=(0,el.C)(),r=(0,a.useRef)(n),s=(0,a.useRef)(t);(0,a.useEffect)(()=>{r.current=n,s.current=t},[n,t]),(0,a.useEffect)(()=>{if(e)return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t);function t(e){!(e.defaultPrevented||!(0,P.zg)(e)||r.current||(0,e$.Sj)())&&((0,P.al)(e.target)||(e.preventDefault(),s.current()))}},[e])}(!b&&g,p);let{factor:w}=(0,c.Ps)(),j=Math.round(160*w),y=Math.round(480*w),k=Math.round(Math.min(y,Math.max(j,h*w))),N=(0,P.fs)(null!=f?f:P.PB,n),C=(0,a.useRef)(null),S=(0,a.useRef)(null),I=(0,a.useRef)(null),T=(0,a.useRef)(u);(0,a.useLayoutEffect)(()=>{var e;let t=T.current;if(T.current=u,!b||!t||u)return;let n=document.activeElement,r=n instanceof HTMLElement&&(null==(e=I.current)?void 0:e.contains(n))===!0;(r||null===n||n===document.body)&&!(0,e2.Bl)()&&r&&n.blur()},[b,u]);let A=(0,a.useCallback)(e=>{x(Math.round(e/w))},[x,w]);return b?(0,r.jsx)(eo.Zg,{children:(0,r.jsxs)("div",{"data-testid":"app-shell",className:"h-screen flex flex-col",children:[(0,r.jsx)(e3,{}),u&&(0,r.jsx)("div",{"data-testid":"drawer-overlay",className:"fixed inset-0 bg-black/50 z-40",onClick:m,"aria-hidden":"true"}),g&&(0,r.jsx)("aside",{ref:I,"data-testid":"sidebar-container",className:"\n fixed left-0 top-0 h-full w-72 max-w-[85vw] z-50 bg-sidebar pt-safe pb-safe\n ".concat(tH,"\n ").concat(u?"translate-x-0":"-translate-x-full","\n "),role:"complementary",children:(0,r.jsx)(eA,{})}),(0,r.jsx)("main",{className:"flex-1 min-h-0 overflow-hidden ".concat(v?"pb-nav-safe":""),role:"main","data-view-transition":"content",children:t}),v&&(0,r.jsx)(e4,{}),(0,r.jsx)(e9.xq,{}),(0,r.jsx)(tt,{}),(0,r.jsx)(tn.n,{}),(0,r.jsx)(tc,{}),(0,r.jsx)(tz,{})]})}):(0,r.jsx)(eo.Zg,{children:(0,r.jsxs)("div",{"data-testid":"app-shell",className:"h-screen flex flex-col",children:[(0,r.jsxs)("div",{className:"flex flex-1 min-h-0",children:[g&&(0,r.jsxs)("aside",{ref:C,"data-testid":"sidebar-container",className:"\n fixed left-0 top-0 h-full\n border-r border-border\n ".concat(tH,"\n ").concat(n?"translate-x-0":"-translate-x-full","\n "),style:{width:"".concat(k,"px"),zIndex:t_.M.SIDEBAR},role:"complementary","aria-hidden":!n,children:[(0,r.jsx)(eA,{}),(0,r.jsx)(tY,{currentWidth:k,minWidth:j,maxWidth:y,sidebarRef:C,mainRef:S,onWidthChange:A})]}),g&&!n&&(0,r.jsx)("aside",{"data-testid":"sidebar-rail-container",className:"\n fixed left-0 top-0 h-full\n border-r border-border\n ",style:{width:"".concat(P.BN,"px"),zIndex:t_.M.SIDEBAR},children:(0,r.jsx)(eZ,{})}),(0,r.jsxs)("main",{ref:S,className:"flex-1 min-w-0 h-full overflow-hidden flex flex-col transition-[padding] duration-300 ease-out",style:{paddingLeft:g?"".concat(n?k:P.BN,"px"):0},role:"main","data-view-transition":"content",children:[N&&(0,r.jsx)(eQ.vP,{}),v&&(0,r.jsx)(eY,{}),(0,r.jsx)("div",{className:"flex-1 min-h-0",children:t})]})]}),(0,r.jsx)(e9.xq,{}),(0,r.jsx)(tt,{}),(0,r.jsx)(tn.n,{}),(0,r.jsx)(tc,{}),(0,r.jsx)(tz,{})]})})});function tY(e){let{currentWidth:t,minWidth:n,maxWidth:s,sidebarRef:a,mainRef:i,onWidthChange:l}=e;return(0,r.jsx)("div",{"data-testid":"sidebar-resize-handle","aria-hidden":"true",onMouseDown:e=>{e.preventDefault();let r=e.clientX,o=t;i.current&&(i.current.style.transition="none");let d=e=>{o=Math.max(n,Math.min(s,t+(e.clientX-r))),a.current&&(a.current.style.width="".concat(o,"px")),i.current&&(i.current.style.paddingLeft="".concat(o,"px"))},c=()=>{document.body.style.cursor="",document.body.style.userSelect="",i.current&&(i.current.style.transition=""),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",c),l(o)};document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",d),document.addEventListener("mouseup",c)},className:"absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-accent-500/40 transition-colors"})}let tU=["/login","/offline","/proxy"],tq=/^\/worktrees\/[^/]+\/(terminal|files)(\/|$)/;function tG(e){var t;let{children:n}=e,a=(0,s.usePathname)();return(t=null!=a?a:"",tU.some(e=>t===e||t.startsWith("".concat(e,"/")))||tq.test(t)||0)?(0,r.jsx)(r.Fragment,{children:n}):(0,r.jsx)(tV,{children:n})}},60322:(e,t,n)=>{"use strict";n.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 n=e.replace(r,"");if(null==(t=navigator.clipboard)?void 0:t.writeText)try{await navigator.clipboard.writeText(n);return}catch(e){}let s=document.createElement("textarea");s.value=n,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)}}},65380:(e,t,n)=>{"use strict";n.d(t,{H:()=>l,O:()=>i});var r=n(95155),s=n(12115);let a=(0,s.createContext)(!1);function i(e){let{children:t,authEnabled:n}=e;return(0,r.jsx)(a.Provider,{value:n,children:t})}function l(){return(0,s.useContext)(a)}},77016:(e,t,n)=>{"use strict";n.d(t,{W:()=>g,n:()=>v});var r=n(95155),s=n(12115),a=n(18955),i=n(52056),l=n(89559),o=n(65229),d=n(59854),c=n(60199),u=n(52703);let m=0,h=new Set;function x(){for(let e of h)e()}function f(e){return h.add(e),()=>{h.delete(e)}}function p(){return m>0}function b(){return!1}function g(){return(0,s.useSyncExternalStore)(f,p,b)}function v(){let e=(0,a.c)("common"),[t,n]=(0,s.useState)(null),[h,f]=(0,s.useState)(null),p=(0,s.useCallback)(e=>{if(e.type!==u.Oo)return;let{serverVersion:t,clientVersion:r}=e;"string"==typeof t&&"string"==typeof r&&t&&r&&t!==h&&n({serverVersion:t,clientVersion:r})},[h]);(0,c.T3)(p);let b=null!==t;(0,s.useEffect)(()=>{if(b)return m+=1,x(),()=>{m-=1,x()}},[b]);let g=(0,s.useCallback)(()=>{window.location.reload()},[]),v=(0,s.useCallback)(()=>{n(e=>(e&&f(e.serverVersion),null))},[]);return t?(0,r.jsxs)("div",{"data-testid":"version-mismatch-banner",role:"alert","aria-live":"assertive",className:"fixed top-3 left-1/2 -translate-x-1/2 flex items-start gap-3 max-w-[92vw] rounded-lg border border-warning-border bg-warning-subtle px-4 py-3 text-warning-foreground shadow-lg",style:{zIndex:d.M.TOAST},children:[(0,r.jsx)(i.A,{className:"h-5 w-5 shrink-0 mt-0.5","aria-hidden":"true"}),(0,r.jsxs)("div",{className:"flex flex-col gap-0.5 text-sm",children:[(0,r.jsx)("span",{className:"font-semibold",children:e("versionMismatch.title")}),(0,r.jsx)("span",{children:e("versionMismatch.description",{serverVersion:t.serverVersion,clientVersion:t.clientVersion})})]}),(0,r.jsxs)("button",{type:"button","data-testid":"version-mismatch-reload",onClick:g,className:"shrink-0 inline-flex items-center gap-1.5 rounded-md border border-warning-border px-3 py-1.5 text-sm font-medium hover:opacity-80 focus:outline-none focus:ring-2 focus:ring-offset-2",children:[(0,r.jsx)(l.A,{className:"h-4 w-4","aria-hidden":"true"}),e("versionMismatch.reload")]}),(0,r.jsx)("button",{type:"button","data-testid":"version-mismatch-dismiss",onClick:v,"aria-label":e("versionMismatch.dismiss"),className:"shrink-0 hover:opacity-70 focus:outline-none focus:ring-2 focus:ring-offset-2",children:(0,r.jsx)(o.A,{className:"h-4 w-4","aria-hidden":"true"})})]}):null}},80903:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,22311,23)),Promise.resolve().then(n.t.bind(n,7183,23)),Promise.resolve().then(n.t.bind(n,13673,23)),Promise.resolve().then(n.bind(n,28876)),Promise.resolve().then(n.bind(n,23252))}},e=>{e.O(0,[5373,2978,6809,4909,2770,2619,6606,7730,5927,8407,2407,344,7636,6966,8165,7197,5794,8441,1255,7358],()=>e(e.s=80903)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,263,341,532,543,640,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1377,1421,1437,1523,1645,1652,1745,1796,1972,2017,2046,2117,2118,2132,2207,2260,2344,2360,2464,2548,2609,2786,2852,2893,3002,3151,3175,3350,3657,3685,3792,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5145,5286,5332,5522,5580,5657,5683,5832,6067,6140,6194,6215,6248,6393,6451,6564,6635,6680,6734,6824,6839,6901,7e3,7115,7238,7473,7509,7560,7670,7758,7760,7895,7921,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9549,9602,9792,9932,9946,9968],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3310],{6191:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},8803:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]])},20063:(e,t,r)=>{"use strict";var a=r(47260);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})},20562:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]])},23327:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])},42529:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},48314:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},52056:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},55449:(e,t,r)=>{"use strict";r.d(t,{IK:()=>u,qD:()=>o,sA:()=>n,zk:()=>s});var a=r(63001);let s="/api/settings/default-agents",l=a.fJ,c=new Set;function n(){return l}function u(e){if(!Array.isArray(e))return!1;let t=(0,a.Lt)(e);if(!t.valid)return!1;let r=t.value;if(r.length===l.length&&r.every((e,t)=>e===l[t]))return!1;for(let e of(l=r,c))e();return!0}let i=null,d=!1;async function o(){return d?l:i||("function"!=typeof fetch?l:i=(async()=>{try{let e=await fetch(s);if(e.ok){let t=await e.json();u(null==t?void 0:t.defaultSelectedAgents),d=!0}}catch(e){}finally{i=null}return l})())}},57101:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c});var a=r(95155),s=r(18955),l=r(58165);function c(){let e=(0,s.c)("common");return(0,a.jsxs)("div",{className:"container-custom py-8 overflow-auto h-full",children:[(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:e("nav.more")}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:e("settings.pageDescription")})]}),(0,a.jsx)(l.O3,{})]})}},63001:(e,t,r)=>{"use strict";r.d(t,{Lt:()=>n,Wj:()=>l,eu:()=>s,fJ:()=>c});var a=r(54014);let s=2,l=6,c=["claude","codex","antigravity"];function n(e){return e.length<s||e.length>l?{valid:!1,error:"Must be ".concat(s,"-").concat(l," elements")}:e.every(e=>"string"==typeof e&&a.XH.includes(e))?new Set(e).size!==e.length?{valid:!1,error:"Duplicate tool IDs not allowed"}:{valid:!0,value:e}:{valid:!1,error:"Invalid CLI tool ID"}}},65229:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},68695:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("circle-arrow-up",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]])},78874:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},80867:(e,t,r)=>{Promise.resolve().then(r.bind(r,57101))},85998:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});let a=(0,r(71847).A)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])}},e=>{e.O(0,[6809,4909,2770,2619,8407,2407,344,6966,8165,8441,1255,7358],()=>e(e.s=80867)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{2317:(e,t,r)=>{"use strict";r.d(t,{V:()=>n});var s=r(12115);function a(){try{let e="__localStorage_test__";return window.localStorage.setItem(e,"test"),window.localStorage.removeItem(e),!0}catch(e){return!1}}function n(e){let{key:t,defaultValue:r,validate:n,serialize:o=JSON.stringify,deserialize:i=JSON.parse}=e,c=(0,s.useRef)(r),l=(0,s.useRef)(n),u=(0,s.useRef)(o),d=(0,s.useRef)(i);c.current=r,l.current=n,u.current=o,d.current=i;let[m,h]=(0,s.useState)(!1),[f,g]=(0,s.useState)(r),x=(0,s.useCallback)(()=>{if(!a())return c.current;try{let e=window.localStorage.getItem(t);if(null===e)return c.current;let r=d.current(e);if(l.current)return l.current(r)?r:c.current;return r}catch(e){return c.current}},[t]),b=(0,s.useCallback)(e=>{if(a())try{let r=u.current(e);window.localStorage.setItem(t,r)}catch(e){}},[t]),p=(0,s.useCallback)(e=>{g(t=>{let r="function"==typeof e?e(t):e;return b(r),r})},[b]),y=(0,s.useCallback)(()=>{if(a())try{window.localStorage.removeItem(t)}catch(e){}g(c.current)},[t]);return(0,s.useEffect)(()=>{h(a()),g(x())},[x]),{value:f,setValue:p,removeValue:y,isAvailable:m}}},20063:(e,t,r)=>{"use strict";var s=r(47260);r.o(s,"useParams")&&r.d(t,{useParams:function(){return s.useParams}}),r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}}),r.o(s,"useSearchParams")&&r.d(t,{useSearchParams:function(){return s.useSearchParams}})},43424:(e,t,r)=>{"use strict";r.d(t,{OO:()=>o,cx:()=>a,hO:()=>n});let s="commandmate.lastOpenedWorktreeId";function a(){try{return window.localStorage.getItem(s)||null}catch(e){return null}}function n(e){if(e)try{window.localStorage.setItem(s,e)}catch(e){}}function o(e){let{lastOpenedId:t,worktreeIds:r}=e;return t&&r.includes(t)?"/worktrees/".concat(encodeURIComponent(t)):"/sessions"}},54799:(e,t,r)=>{Promise.resolve().then(r.bind(r,89957))},61362:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},65229:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});let s=(0,r(71847).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},89957:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>v});var s=r(95155),a=r(12115),n=r(52619),o=r.n(n),i=r(20063),c=r(18955),l=r(66966),u=r(65229),d=r(61362),m=r(99051),h=r(48407),f=r(2317);function g(e){return"boolean"==typeof e}let x=[{key:"registerRepository",href:"/repositories"},{key:"sendFirstMessage",href:"/sessions"}];function b(e){let{worktrees:t,repositories:r,isLoading:n=!1,error:i=null}=e,l=(0,c.c)("home"),{value:b,setValue:p}=(0,f.V)({key:"commandmate:onboarding-dismissed",defaultValue:!1,validate:g}),[y,v]=(0,a.useState)(!1);(0,a.useEffect)(()=>v(!0),[]);let k=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return{hasRepository:(null!=t?t:[]).length>0,hasSentMessage:(null!=e?e:[]).some(e=>!!e.lastUserMessageAt)}}(t,r),j=k.hasRepository&&k.hasSentMessage,w=y&&!n&&null===i;return((0,a.useEffect)(()=>{w&&j&&!b&&p(!0)},[w,j,b,p]),!w||j||b)?null:(0,s.jsx)("div",{className:"mb-8",children:(0,s.jsxs)(h.Zp,{variant:"elevated","data-testid":"onboarding-checklist",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-foreground",children:l("onboarding.title")}),(0,s.jsx)(h.$n,{variant:"ghost",size:"sm","aria-label":l("onboarding.dismiss"),"data-testid":"onboarding-dismiss",onClick:()=>p(!0),children:(0,s.jsx)(u.A,{size:16,"aria-hidden":"true"})})]}),(0,s.jsx)("ol",{className:"mt-3 space-y-3",children:x.map(e=>{let{key:t,href:r}=e,a="registerRepository"===t?k.hasRepository:k.hasSentMessage;return(0,s.jsxs)("li",{className:"flex items-center gap-3","data-testid":"onboarding-step-".concat(t),"data-complete":a,children:[a?(0,s.jsx)(d.A,{size:20,className:"shrink-0 text-success-foreground","aria-hidden":"true"}):(0,s.jsx)(m.A,{size:20,className:"shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,s.jsx)("span",{className:"min-w-0 flex-1 text-sm ".concat(a?"text-muted-foreground line-through":"text-foreground"),children:l("onboarding.steps.".concat(t))}),!a&&(0,s.jsx)(o(),{href:r,"data-testid":"onboarding-action-".concat(t),className:"shrink-0 rounded-md bg-accent-600 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-accent-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:bg-accent-500 dark:hover:bg-accent-600",children:l("onboarding.actions.".concat(t))})]},t)})})]})})}var p=r(7636),y=r(43424);function v(){let e=(0,c.c)("common"),t=(0,i.useRouter)(),{worktrees:r,repositories:n,isLoading:u,error:d,refresh:m}=(0,l.Fn)(),f=u&&0===r.length,g=!f&&null!==d&&0===r.length,x=!f&&!g&&0===r.length,v=!f&&!g&&!x,k=(0,a.useMemo)(()=>(0,p.s6)(r,(0,p.UZ)(n)).map(e=>e.id),[r,n]),j=(0,a.useRef)(!1);return(0,a.useEffect)(()=>{v&&!j.current&&(j.current=!0,t.replace((0,y.OO)({lastOpenedId:(0,y.cx)(),worktreeIds:k})))},[v,k,t]),(0,s.jsx)("div",{className:"container-custom py-8 overflow-auto h-full",children:g?(0,s.jsxs)("div",{"data-testid":"home-load-error",role:"alert",className:"py-16 text-center",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:e("sidebar.branchesLoadFailed")}),(0,s.jsx)(h.$n,{type:"button",variant:"secondary",size:"sm",className:"mt-3","data-testid":"home-load-retry",onClick:()=>{m()},children:e("sidebar.retryLoadBranches")})]}):x?(0,s.jsxs)("div",{"data-testid":"home-empty",children:[(0,s.jsx)(b,{worktrees:r,repositories:n,isLoading:!1,error:null}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:e("sidebar.noBranchesAvailable")}),(0,s.jsx)(o(),{href:"/repositories","data-testid":"home-add-repository",className:"mt-3 inline-block rounded-md bg-accent-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-accent-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:bg-accent-500 dark:hover:bg-accent-600",children:e("repositories.add")})]})]}):(0,s.jsx)("div",{"data-testid":"home-loading",role:"status","aria-label":e("loadingPage"),className:"flex justify-center py-16",children:(0,s.jsx)(h.y$,{size:"lg",variant:"muted"})})})}}},e=>{e.O(0,[6809,4909,2770,2619,8407,2407,344,7636,6966,8441,1255,7358],()=>e(e.s=54799)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,263,341,532,543,640,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1377,1421,1437,1523,1645,1652,1745,1796,1972,2017,2046,2117,2118,2132,2207,2260,2344,2360,2464,2548,2609,2786,2852,2893,3002,3151,3175,3350,3657,3685,3792,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5145,5286,5332,5522,5580,5657,5683,5832,6067,6140,6194,6215,6248,6393,6451,6564,6635,6680,6734,6824,6839,6901,7e3,7115,7238,7473,7509,7560,7670,7758,7760,7895,7921,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9549,9602,9792,9932,9946,9968],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8975],{3199:(e,t,a)=>{"use strict";a.d(t,{Vt:()=>s,aN:()=>l,zK:()=>p,I_:()=>d,JY:()=>c,sd:()=>u,kj:()=>m,z7:()=>o});let r=/^[a-zA-Z0-9][a-zA-Z0-9\-._/:]*$/,n=/^[a-zA-Z0-9][a-zA-Z0-9\-._]*$/,s=new Set(["copilot","opencode","opencode-v2"]),l=new Set(["opencode","opencode-v2"]),i=new Set(["opencode-v2"]);function o(e,t,a){if(i.has(e)&&!(!(null==a?void 0:a.trim())||(null==t?void 0:t.trim())))return"".concat(e,' option "--variant" needs "--model" (sent as -m <provider/model>#<variant>)')}function d(e){let t=e.trim();if(!t)return{cliToolId:"claude",model:void 0};let{tokens:a,error:r}=function(e){let t=[],a="",r=!1,n=null;for(let s of e){if(n){s===n?n=null:a+=s;continue}if('"'===s||"'"===s){n=s,r=!0;continue}if(/\s/.test(s)){r&&(t.push(a),a="",r=!1);continue}a+=s,r=!0}return n?{tokens:[],error:"CLI Tool column has an unterminated quote"}:(r&&t.push(a),{tokens:t})}(t);if(r)return{cliToolId:t.split(/\s+/)[0],error:r};let n=a[0];return 1===a.length?{cliToolId:n,model:void 0}:s.has(n)?l.has(n)?function(e,t){let a={cliToolId:e},r=new Set,n=(e,a)=>{let r=t[a+1];return void 0===r||r.startsWith("-")?null:r};for(let s=0;s<t.length;s++){let l=t[s];if(r.has(l))return{cliToolId:e,error:"".concat(e,' option "').concat(l,'" is repeated')};switch(l){case"--model":case"-m":{let t=n(l,s);if(null===t)return{cliToolId:e,error:"".concat(e,' option "').concat(l,'" needs a value')};r.add("--model"),r.add("-m"),a.model=t,s++;break}case"--agent":{let t=n(l,s);if(null===t)return{cliToolId:e,error:"".concat(e,' option "').concat(l,'" needs a value')};r.add(l),a.agent=t,s++;break}case"--variant":{let t=n(l,s);if(null===t)return{cliToolId:e,error:"".concat(e,' option "').concat(l,'" needs a value')};r.add(l),a.variant=t,s++;break}case"--title":{let t=n(l,s);if(null===t)return{cliToolId:e,error:"".concat(e,' option "').concat(l,'" needs a value')};r.add(l),a.title=t,s++;break}case"--continue":case"-c":r.add("--continue"),r.add("-c"),a.continueSession=!0;break;default:{let t="opencode-v2"===e?"opencode-v2 [--model <provider/model> [--variant <name>]] [--agent <name>] [--continue] [--title <text>]":"opencode [--model <provider/model>] [--agent <name>] [--variant <name>] [--continue] [--title <text>]";return{cliToolId:e,error:"".concat(e," only supports: ").concat(t)}}}}let s=o(e,a.model,a.variant);return s?{cliToolId:e,error:s}:a}(n,a.slice(1)):3===a.length&&"--model"===a[1]?{cliToolId:n,model:a[2]}:{cliToolId:n,error:"".concat(n," only supports: ").concat(n," --model <modelName>")}:{cliToolId:n,error:'CLI Tool "'.concat(n,'" does not support additional options')}}function c(e){return/[\x00-\x1f\x7f]/.test(e)?{valid:!1,reason:"Model name contains control characters"}:""===e.trim()?{valid:!1,reason:"Model name must not be empty"}:r.test(e)?e.length>128?{valid:!1,reason:"Model name exceeds ".concat(128," characters")}:{valid:!0}:{valid:!1,reason:"Model name contains invalid characters"}}function u(e,t){return/[\x00-\x1f\x7f]/.test(e)?{valid:!1,reason:"opencode ".concat(t," contains control characters")}:""===e.trim()?{valid:!1,reason:"opencode ".concat(t," must not be empty")}:n.test(e)?e.length>64?{valid:!1,reason:"opencode ".concat(t," exceeds ").concat(64," characters")}:{valid:!0}:{valid:!1,reason:"opencode ".concat(t," contains invalid characters")}}function m(e){return/[\x00-\x1f\x7f]/.test(e)?{valid:!1,reason:"opencode title contains control characters"}:""===e.trim()?{valid:!1,reason:"opencode title must not be empty"}:e.startsWith("-")?{valid:!1,reason:'opencode title must not start with "-"'}:e.includes("|")?{valid:!1,reason:'opencode title must not contain "|"'}:e.length>200?{valid:!1,reason:"opencode title exceeds ".concat(200," characters")}:{valid:!0}}function p(e){let t=[],a=d(e);if(a.error&&t.push(a.error),a.model){let e=c(a.model);e.valid||t.push(e.reason)}if(a.agent){let e=u(a.agent,"agent");e.valid||t.push(e.reason)}if(a.variant){let e=u(a.variant,"variant");e.valid||t.push(e.reason)}if(a.title){let e=m(a.title);e.valid||t.push(e.reason)}return{result:a,errors:t}}},4138:(e,t,a)=>{"use strict";a.d(t,{q:()=>s});var r=a(12115),n=a(9900);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:n.pX,[t,a]=(0,r.useState)(!1),s=(0,r.useRef)(null);return(0,r.useEffect)(()=>()=>{null!==s.current&&(clearTimeout(s.current),s.current=null)},[]),{copied:t,markCopied:(0,r.useCallback)(()=>{a(!0),null!==s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{s.current=null,a(!1)},e)},[e]),reset:(0,r.useCallback)(()=>{null!==s.current&&(clearTimeout(s.current),s.current=null),a(!1)},[])}}},17442:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>I});var r=a(95155),n=a(12115),s=a(18955),l=a(48407),i=a(52619),o=a.n(i),d=a(20063),c=a(87531),u=a(44308),m=a(55449),p=a(38606),x=a(76471),f=a(54014),v=a(46892),g=a(17653);let h={in_review:"status.inReview",approval:"status.approval",stalled:"status.stalled"},b=u.DR,y={in_review:e=>"in_review"===e.status,approval:e=>!0===e.isWaitingForResponse,stalled:e=>!0===e.isStalled};function j(e){let{status:t,label:a,unclassified:n}=e,l=(0,s.c)("common"),i=v.PL[t],o="w-2.5 h-2.5 rounded-full flex-shrink-0";if((0,x.Mq)(t,n))return(0,r.jsx)("span",{className:"".concat(o," ").concat(x.Jd),title:"".concat(a,": ").concat(l(x.rH)),"data-unclassified":"true"});let d="".concat(a,": ").concat(l(i.labelKey));return"spinner"===i.type?(0,r.jsx)("span",{className:"".concat(o," border-2 border-t-transparent animate-spin ").concat(i.className),title:d}):(0,r.jsx)("span",{className:"".concat(o," ").concat(i.className),title:d})}function w(){var e;let t=(0,s.c)("review"),[a,i]=(0,n.useState)([]),[x,v]=(0,n.useState)(!0),w=(0,d.useSearchParams)(),[N,S]=(0,n.useState)(()=>{var e;return null!=(e=(0,u._d)(null==w?void 0:w.get(u.z7)))?e:u.SD}),k=(0,n.useRef)(null),C=null!=(e=null==w?void 0:w.get(u.z7))?e:null;(0,n.useEffect)(()=>{let e=(0,u._d)(C);e&&S(e)},[C]);let T=(0,n.useCallback)(async()=>{try{let t=await fetch("/api/worktrees?include=review");if(t.ok){var e;let a=await t.json();(0,m.IK)(a.defaultSelectedAgents),i(null!=(e=a.worktrees)?e:[])}}catch(e){}finally{v(!1)}},[]);(0,n.useEffect)(()=>(T(),k.current=setInterval(T,u.Iu),()=>{k.current&&clearInterval(k.current)}),[T]);let z=(0,n.useMemo)(()=>a.filter(y[N]),[a,N]),_=(0,n.useMemo)(()=>({in_review:a.filter(y.in_review).length,approval:a.filter(y.approval).length,stalled:a.filter(y.stalled).length}),[a]),A=(0,n.useMemo)(()=>{switch(N){case"in_review":return t("empty.inReview");case"approval":return t("empty.approval");case"stalled":return t("empty.stalled")}},[N,t]);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":t("filters.ariaLabel"),"data-testid":"review-filters",children:b.map(e=>{let a=N===e;return(0,r.jsxs)("button",{type:"button","aria-pressed":a,onClick:()=>S(e),"data-testid":"review-filter-".concat(e),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:[t(h[e]),(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:_[e]})]},e)})}),x&&(0,r.jsx)("div",{className:"space-y-2","data-testid":"review-loading",role:"status","aria-label":t("filters.loading"),children:[0,1,2].map(e=>(0,r.jsx)(l.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)(l.EA,{className:"h-4 w-40 max-w-full"}),(0,r.jsx)(l.EA,{className:"h-3 w-24 max-w-full"})]}),(0,r.jsx)(l.EA,{className:"ml-4 h-5 w-16 flex-shrink-0"})]})},e))}),!x&&(0,r.jsx)("div",{className:"space-y-2","data-testid":"review-list",children:0===z.length?(0,r.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"review-empty",children:A}):z.map(e=>{var a;let n=null!=(a=e.selectedAgents)?a:(0,m.sA)();return(0,r.jsx)(o(),{href:(0,g.f)(e),className:"block","data-testid":"review-item-".concat(e.id),children:(0,r.jsxs)(l.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"}}(N)),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:e.name}),(0,r.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:e.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"}}(N)),children:t(h[N])}),n.map(t=>{var a;let n=null==(a=e.sessionStatusByCli)?void 0:a[t],s=(0,p.kA)(n);return(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(j,{status:s,label:(0,f.oo)(t),unclassified:(0,p.px)(n)}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,f.oo)(t)})]},t)})]})]}),e.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:e.description})})]})},e.id)})})]})}function N(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 S(e){let{value:t,onChange:a}=e,n=(0,s.c)("review"),i=N(new Date),o=t===i;return(0,r.jsxs)("div",{className:"flex items-center gap-2","data-testid":"report-date-picker",children:[(0,r.jsx)(l.$n,{variant:"secondary",size:"sm",onClick:()=>{let e=new Date(t+"T00:00:00");e.setDate(e.getDate()-1),a(N(e))},"data-testid":"date-prev","aria-label":n("datePicker.previousDay"),children:"<"}),(0,r.jsx)(l.pd,{type:"date",inputSize:"sm",value:t,max:i,onChange:e=>a(e.target.value),className:"w-auto","data-testid":"date-input"}),(0,r.jsx)(l.$n,{variant:"secondary",size:"sm",onClick:()=>{if(o)return;let e=new Date(t+"T00:00:00");e.setDate(e.getDate()+1);let r=N(e);r>i||a(r)},disabled:o,"data-testid":"date-next","aria-label":n("datePicker.nextDay"),children:">"})]})}var k=a(36402),C=a(3199),T=a(4138),z=a(60322);let _=[{value:"none",labelKey:"report.modes.none"},{value:"template",labelKey:"report.modes.template"},{value:"custom",labelKey:"report.modes.custom"}];function A(){let e=(0,s.c)("review"),t=(0,k.SC)(),[a,i]=(0,n.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)}()),[o,d]=(0,n.useState)("claude"),[c,m]=(0,n.useState)(""),[p,x]=(0,n.useState)(null),[f,v]=(0,n.useState)(0),[g,h]=(0,n.useState)(""),[b,y]=(0,n.useState)(!1),[j,w]=(0,n.useState)(!1),[N,A]=(0,n.useState)(!1),[P,E]=(0,n.useState)(!1),{copied:I,markCopied:D}=(0,T.q)(),[K,R]=(0,n.useState)(null),$=C.Vt.has(o),{mode:M,setMode:L,userInstruction:O,setUserInstruction:Z,isUserInstructionReadOnly:q,templates:F,selectedTemplateId:J,selectTemplate:H,isLoadingTemplates:V}=function(){let[e,t]=(0,n.useState)("none"),[a,r]=(0,n.useState)(""),[s,l]=(0,n.useState)([]),[i,o]=(0,n.useState)(null),[d,c]=(0,n.useState)(!1),u=(0,n.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,n.useEffect)(()=>{u()},[u]);let m=(0,n.useCallback)(e=>{t(e),r(""),o(null)},[]),p=(0,n.useCallback)(t=>{"custom"===e&&r(t)},[e]),x=(0,n.useCallback)(t=>{let a=s.find(e=>e.id===t);a&&"template"===e&&(o(t),r(a.content))},[s,e]);return{mode:e,setMode:m,userInstruction:a,setUserInstruction:p,isUserInstructionReadOnly:"template"===e,templates:s,selectedTemplateId:i,selectTemplate:x,isLoadingTemplates:d,refreshTemplates:u}}(),U=function(e){let[t,a]=(0,n.useState)({generating:!1}),r=(0,n.useRef)(null),s=(0,n.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,n.useEffect)(()=>e?(s(),r.current=setInterval(s,5e3),()=>{r.current&&(clearInterval(r.current),r.current=null)}):void a({generating:!1}),[e,s]),t}(!N),W=U.generating&&!N,B=(0,n.useCallback)(async t=>{w(!0),R(null);try{let a=await fetch("/api/daily-summary?date=".concat(t));if(!a.ok){let t=await a.json();R(t.error||e("report.errors.fetch"));return}let r=await a.json();x(r.report),v(r.messageCount),r.report?h(r.report.content):h(""),y(!1)}catch(t){R(e("report.errors.fetch"))}finally{w(!1)}},[e]);(0,n.useEffect)(()=>{B(a)},[a,B]);let[X,Y]=(0,n.useState)(!1);(0,n.useEffect)(()=>{U.generating?Y(!0):X&&(Y(!1),B(a))},[U.generating,X,B,a]);let G=async()=>{if(!p||await t({description:e("report.regenerateConfirm")})){A(!0),R(null);try{let t={date:a,tool:o};$&&c.trim()&&(t.model=c.trim()),"none"!==M&&O.trim()&&(t.userInstruction=O.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 R(e("report.errors.rateLimited"));if(!r.ok){let t=await r.json();R(t.error||e("report.errors.generate"));return}let n=await r.json();x(n.report),h(n.report.content),y(!1)}catch(t){R(e("report.errors.generate"))}finally{A(!1)}}},Q=async()=>{if(!g.trim())return void R(e("report.errors.emptyContent"));E(!0),R(null);try{let t=await fetch("/api/daily-summary",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({date:a,content:g})});if(!t.ok){let a=await t.json();R(a.error||e("report.errors.save"));return}let r=await t.json();x(r.report),y(!1)}catch(t){R(e("report.errors.save"))}finally{E(!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)(S,{value:a,onChange:e=>{i(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:o,onChange:e=>d(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:u.IH.map(e=>(0,r.jsx)("option",{value:e,children:e},e))}),$&&(0,r.jsx)(l.pd,{type:"text",inputSize:"sm",placeholder:"opencode"===o?e("report.modelPlaceholderOpencode"):e("report.modelPlaceholder"),value:c,onChange:e=>m(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)(l.z6,{value:M,onValueChange:e=>L(e),name:"generation-mode",className:"flex flex-row gap-4",children:_.map(t=>(0,r.jsxs)("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[(0,r.jsx)(l.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"===M&&(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")}),V?(0,r.jsx)(l.EA,{className:"h-9 w-full","data-testid":"report-template-loading",role:"status","aria-label":e("report.loadingTemplates"),"aria-hidden":void 0}):0===F.length?(0,r.jsx)("div",{className:"text-sm text-muted-foreground",children:e("report.noTemplates")}):(0,r.jsxs)("select",{value:J||"",onChange:e=>H(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")}),F.map(e=>(0,r.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),"none"!==M&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(l.k_,{value:O,onChange:e=>Z(e.target.value),rows:3,maxLength:u.t7,readOnly:q,placeholder:"template"===M?e("report.instructionPlaceholderTemplate"):e("report.instructionPlaceholderCustom"),className:"resize-y ".concat(q?"bg-muted cursor-not-allowed":""),"data-testid":"user-instruction-input"})}),(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(l.$n,{variant:"primary",onClick:G,disabled:N||W||0===f,"data-testid":"generate-button",children:N||W?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)(l.EA,{className:"h-4 w-48"}):0===f?e("report.noMessages"):e("report.messagesFound",{count:f})}),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}),(N||W)&&(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)(l.y$,{size:"sm",variant:"muted"}),W&&U.tool?U.startedAt?e("report.generatingRemoteWithTime",{tool:U.tool,seconds:Math.round((Date.now()-new Date(U.startedAt).getTime())/1e3)}):e("report.generatingRemote",{tool:U.tool}):e("report.generatingSummary")]}),!j&&p&&(0,r.jsxs)(l.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)(l.$n,{variant:"secondary",size:"sm",onClick:async()=>{await (0,z.l)(p.content),D()},"data-testid":"copy-report-button",children:I?e("report.copied"):e("report.copy")}),(0,r.jsx)(l.$n,{variant:"secondary",size:"sm",onClick:()=>{b?Q():y(!0)},disabled:P,"data-testid":"edit-save-button",children:P?e("report.saving"):b?e("report.save"):e("report.edit")})]})]}),b?(0,r.jsx)(l.k_,{value:g,onChange:e=>h(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 P(){let e=(0,s.c)("review"),t=(0,k.SC)(),[a,i]=(0,n.useState)([]),[o,d]=(0,n.useState)(!1),[c,m]=(0,n.useState)(null),[p,x]=(0,n.useState)(""),[f,v]=(0,n.useState)(""),[g,h]=(0,n.useState)(!1),[b,y]=(0,n.useState)(null),[j,w]=(0,n.useState)(""),[N,S]=(0,n.useState)(""),[C,T]=(0,n.useState)(!1),z=(0,n.useCallback)(async()=>{d(!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();i(a.templates||[])}catch(t){m(e("template.errors.fetch"))}finally{d(!1)}},[e]);(0,n.useEffect)(()=>{z()},[z]);let _=async()=>{if(!p.trim()||!f.trim())return void m(e("template.errors.nameAndContentRequired"));h(!0),m(null);try{let t=await fetch("/api/templates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:p.trim(),content:f.trim()})});if(!t.ok){let a=await t.json();m(a.error||e("template.errors.create"));return}x(""),v(""),await z()}catch(t){m(e("template.errors.create"))}finally{h(!1)}},A=async()=>{if(!b||!j.trim()||!N.trim())return void m(e("template.errors.nameAndContentRequired"));T(!0),m(null);try{let t=await fetch("/api/templates/".concat(b),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:j.trim(),content:N.trim()})});if(!t.ok){let a=await t.json();m(a.error||e("template.errors.update"));return}y(null),await z()}catch(t){m(e("template.errors.update"))}finally{T(!1)}},P=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 z()}catch(t){m(e("template.errors.delete"))}}},E=()=>{y(null),w(""),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:u.$h})}),o?(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)(l.Zp,{padding:"md",children:(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.EA,{className:"h-4 w-32"}),(0,r.jsx)(l.EA,{className:"h-3 w-full"}),(0,r.jsx)(l.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)(l.Zp,{padding:"sm","data-testid":"template-item-".concat(t.id),children:b===t.id?(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(l.pd,{type:"text",inputSize:"sm",value:j,onChange:e=>w(e.target.value),maxLength:u.Nb,"data-testid":"edit-name-input"}),(0,r.jsx)(l.k_,{value:N,onChange:e=>S(e.target.value),maxLength:u.bm,rows:3,className:"resize-y","data-testid":"edit-content-input"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.$n,{variant:"primary",size:"sm",onClick:A,disabled:C,"data-testid":"edit-save-button",children:C?e("template.saving"):e("template.save")}),(0,r.jsx)(l.$n,{variant:"secondary",size:"sm",onClick:E,"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)(l.$n,{variant:"secondary",size:"sm",onClick:()=>{y(t.id),w(t.name),S(t.content)},"data-testid":"edit-button-".concat(t.id),children:e("template.edit")}),(0,r.jsx)(l.$n,{variant:"danger",size:"sm",onClick:()=>P(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<u.$h&&(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)(l.pd,{type:"text",value:p,onChange:e=>x(e.target.value),maxLength:u.Nb,placeholder:e("template.namePlaceholder"),"data-testid":"new-name-input"}),(0,r.jsx)(l.k_,{value:f,onChange:e=>v(e.target.value),maxLength:u.bm,rows:3,placeholder:e("template.contentPlaceholder"),className:"resize-y","data-testid":"new-content-input"}),(0,r.jsx)(l.$n,{variant:"primary",onClick:_,disabled:g||!p.trim()||!f.trim(),"data-testid":"create-button",children:g?e("template.creating"):e("template.create")})]})]})]})}let E=[{value:"review",labelKey:"tabs.review"},{value:"report",labelKey:"tabs.report"},{value:"template",labelKey:"tabs.template"}];function I(){let e=(0,s.c)("review"),[t,a]=(0,n.useState)("review");return(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)(l.tU,{value:t,onValueChange:e=>a(e),children:[(0,r.jsx)(l.j7,{className:"mb-6 w-full justify-start","data-testid":"page-tabs",children:E.map(t=>(0,r.jsx)(l.Xi,{value:t.value,"data-testid":"page-tab-".concat(t.value),children:e(t.labelKey)},t.value))}),(0,r.jsx)(l.av,{value:"review",children:(0,r.jsx)(n.Suspense,{fallback:null,children:(0,r.jsx)(w,{})})}),(0,r.jsx)(l.av,{value:"report",children:(0,r.jsx)(A,{})}),(0,r.jsx)(l.av,{value:"template",children:(0,r.jsx)(P,{})})]})]})}},17653:(e,t,a)=>{"use strict";a.d(t,{f:()=>i});var r=a(54014),n=a(55449),s=a(38606),l=a(7636);function i(e){let t=function(e){var t;let a=e.sessionStatusByInstance;if(!a)return null;let l=(e.agentInstances&&e.agentInstances.length>0?e.agentInstances:(0,r.lu)(null!=(t=e.selectedAgents)?t:(0,n.sA)())).map((e,t)=>({instance:e,index:t})).sort((e,t)=>{var a,r;return(null!=(a=e.instance.order)?a:0)-(null!=(r=t.instance.order)?r:0)||e.index-t.index}).map(e=>{let{instance:t}=e;return t}).flatMap((e,t)=>{let r=a[e.id];return(null==r?void 0:r.isWaitingForResponse)?[{id:e.id,index:t,entry:r}]:[]});if(0===l.length)return null;let{waitingKind:i}=(0,s.f_)(e),o=i?l.filter(e=>e.entry.waitingKind===i):[],d=(o.length>0?o:l).flatMap(e=>{let t=e.entry.waitingSince;return"number"==typeof t&&Number.isFinite(t)?[{...e,since:t}]:[]});return 0===d.length?null:(d.sort((e,t)=>e.since-t.since||e.index-t.index),d[0].id)}(e);return null===t?"/worktrees/".concat(e.id):(0,l.Ii)({worktreeId:e.id,instanceId:t})}},20063:(e,t,a)=>{"use strict";var r=a(47260);a.o(r,"useParams")&&a.d(t,{useParams:function(){return r.useParams}}),a.o(r,"usePathname")&&a.d(t,{usePathname:function(){return r.usePathname}}),a.o(r,"useRouter")&&a.d(t,{useRouter:function(){return r.useRouter}}),a.o(r,"useSearchParams")&&a.d(t,{useSearchParams:function(){return r.useSearchParams}})},44308:(e,t,a)=>{"use strict";a.d(t,{$h:()=>u,DR:()=>n,IH:()=>d,Iu:()=>r,Nb:()=>m,SD:()=>s,_d:()=>o,bm:()=>p,ks:()=>i,t7:()=>c,z7:()=>l});let r=7e3,n=["in_review","approval","stalled"],s="in_review",l="filter",i="/review?".concat(l,"=approval");function o(e){return e&&n.includes(e)?e:null}let d=["claude","codex","copilot","antigravity","opencode"],c=1e3,u=5,m=100,p=1e3},46892:(e,t,a)=>{"use strict";a.d(t,{PL:()=>n,sb:()=>s});let r={idle:"bg-muted-foreground",ready:"bg-success",spinner:"border-info",waiting:"bg-warning"},n={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"}},s={idle:"detailStatus.idle",ready:"detailStatus.ready",running:"detailStatus.running",waiting:"detailStatus.waiting"}},54014:(e,t,a)=>{"use strict";a.d(t,{Ab:()=>n,NL:()=>v,O6:()=>p,XH:()=>r,f_:()=>u,hR:()=>d,lu:()=>x,n6:()=>i,oo:()=>c,pQ:()=>s,sw:()=>m,vz:()=>f});let r=["claude","codex","gemini","vibe-local","opencode","copilot","antigravity","command-code","opencode-v2"],n=10,s=50,l=/^[a-zA-Z0-9_-]+$/;function i(e){return"string"==typeof e&&e.length>0&&e.length<=64&&l.test(e)}let o={claude:"Claude",codex:"Codex",gemini:"Gemini","vibe-local":"Vibe Local",opencode:"OpenCode",copilot:"Copilot",antigravity:"Antigravity","command-code":"Command Code","opencode-v2":"OpenCode V2"};function d(e){return r.includes(e)}function c(e){var t;return null!=(t=o[e])?t:e}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Assistant";return e&&d(e)?c(e):t}function m(e){let t=e.alias;return"string"==typeof t&&t.trim().length>0?t:c(e.cliTool)}function p(e,t,a){let r=e.find(e=>e.id===t);return r?m(r):c(a)}function x(e){return e.map((e,t)=>({id:e,cliTool:e,alias:c(e),order:t}))}let f=128,v=2097152},60322:(e,t,a)=>{"use strict";a.d(t,{l:()=>n});let r=/\x1b\[[0-9;]*[a-zA-Z]|\x1b\][^\x07]*\x07|\[[0-9;]*m/g;async function n(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 n=document.createElement("textarea");n.value=a,n.style.position="fixed",n.style.left="-9999px",n.style.top="-9999px",n.style.opacity="0",document.body.appendChild(n),n.focus(),n.select();try{document.execCommand("copy")}finally{document.body.removeChild(n)}}},76471:(e,t,a)=>{"use strict";a.d(t,{Ej:()=>c,Jd:()=>i,Mq:()=>d,rH:()=>o});var r=a(95155),n=a(12115),s=a(18955),l=a(48481);let i="bg-transparent border-2 border-muted-foreground",o="status.unknown";function d(e,t){return!0===t&&"ready"===e}let c=(0,n.memo)(function(e){let{status:t,label:a,waitingKind:n,unclassified:c}=e,u=(0,s.c)("common"),m=d(t,c);return(0,r.jsx)(l.m,{"data-testid":"status-indicator",status:t,label:m?null!=a?a:u(o):a,waitingKind:n,size:"sm",className:m?i:void 0,"data-unclassified":m?"true":void 0})})},80488:(e,t,a)=>{Promise.resolve().then(a.bind(a,17442))}},e=>{e.O(0,[6809,4909,2770,2619,8407,7636,8441,1255,7358],()=>e(e.s=80488)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8898],{9219:(e,s,t)=>{"use strict";t.d(s,{k:()=>l});var n=t(95155),a=t(12115),i=t(48407),r=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:n=64,maxPull:i=96,resistance:r=.5}=e,l=(0,a.useRef)(null),[o,c]=(0,a.useState)(0),[d,u]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!1),x=(0,a.useRef)(null),f=(0,a.useRef)(0),g=(0,a.useRef)(!1);g.current=d;let p=(0,a.useCallback)(()=>{x.current=null,f.current=0,c(0),h(!1)},[]),v=(0,a.useCallback)(e=>{if(!t||g.current)return;let s=l.current;s&&!(s.scrollTop>0)&&(x.current=e.touches[0].clientY,f.current=0)},[t]),b=(0,a.useCallback)(e=>{if(null===x.current)return;let s=l.current;if(!s)return;if(s.scrollTop>0)return void p();let t=e.touches[0].clientY-x.current;if(t<=0){0!==f.current&&(f.current=0,c(0),h(!1));return}e.cancelable&&e.preventDefault();let n=Math.min(t*r,i);f.current=n,c(n),h(!0)},[r,i,p]),y=(0,a.useCallback)(async()=>{u(!0),h(!1),c(n);try{await Promise.resolve(s())}finally{u(!1),c(0)}},[s,n]),w=(0,a.useCallback)(()=>{if(null===x.current)return;let e=f.current>=n&&!g.current;x.current=null,f.current=0,e?y():(c(0),h(!1))},[n,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",w,{passive:!0}),e.addEventListener("touchcancel",w,{passive:!0}),()=>{e.removeEventListener("touchstart",v),e.removeEventListener("touchmove",b),e.removeEventListener("touchend",w),e.removeEventListener("touchcancel",w)}},[v,b,w]),{containerRef:l,pullDistance:o,isRefreshing:d,isPulling:m}}({onRefresh:s,enabled:t,threshold:64}),h=u||d>0,x=u?1:Math.min(d/64,1);return(0,n.jsxs)("div",{ref:c,className:(0,r.cn)("relative overflow-auto",l),style:{overscrollBehaviorY:"contain"},"data-testid":"pull-to-refresh",children:[(0,n.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 z-10 flex justify-center",style:{transform:"translateY(".concat(h?Math.max(d-24,8):-32,"px)"),opacity:x,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,n.jsx)(i.y$,{size:"sm",variant:"accent"})}),(0,n.jsx)("div",{style:{transform:h?"translateY(".concat(d,"px)"):void 0,transition:m?"none":"transform 0.2s ease-out"},children:o})]})}},46617:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>eg});var n=t(95155),a=t(12115),i=t(52619),r=t.n(i),l=t(18955),o=t(20562),c=t(8803),d=t(9219),u=t(37586),m=t(22479),h=t(54485),x=t(58597),f=t(83051),g=t(14006),p=t(88155),v=t(92509),b=t(93493),y=t(639),w=t(2954),j=t(48407),k=t(76279),N=t(89599),A=t(308),M=t(80635),S=t(52407);function C(){let{signals:e}=(0,S.Fx)();return(0,a.useMemo)(()=>({offline:(0,S.sV)(e),reachable:(0,S._X)(e)}),[e])}var I=t(66966),L=t(34325),P=t(14524);let R=Object.freeze({enabled:!1,expiresAt:null}),T=Object.freeze({enabled:!1,expiresAt:null,stopReason:"server-restart"});function E(e){var s;return null!=(s=e.autoYesByInstance)?s:e}var _=t(81507),z=t(2317),D=t(75676),F=t(63881),B=t(8355),K=t(80344),U=t(38606),O=t(76471),Y=t(54014),H=t(55449),V=t(67149),q=t(68394);let W=[{mode:"chat",labelKey:"surfaceMode.showChat",icon:u.A},{mode:"terminal",labelKey:"surfaceMode.showTerminal",icon:m.A}];function J(e){return"flex h-7 w-7 shrink-0 items-center justify-center rounded transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring ".concat(e?"bg-accent-500/15 text-accent-600 dark:text-accent-400":"text-muted-foreground hover:bg-muted hover:text-foreground")}let Q=()=>{},G=(0,a.memo)(function(e){return e.connectivity?(0,n.jsx)(Z,{...e,connectivity:e.connectivity}):(0,n.jsx)(X,{...e})});function X(e){let s=C();return(0,n.jsx)(Z,{...e,connectivity:s})}function Z(e){var s,t,i,o,c,d,u;let{worktree:m,enabled:S,connectivity:C,className:G=""}=e,X=(0,l.c)("common"),Z=(0,l.c)("worktree"),$=(0,a.useMemo)(()=>{var e;return m.agentInstances&&m.agentInstances.length>0?m.agentInstances:(0,Y.lu)(null!=(e=m.selectedAgents)?e:(0,H.sA)())},[m]),[ee,es]=(0,a.useState)(null),et=null!=(t=$.find(e=>e.id===ee))?t:$[0],en=null==et?void 0:et.id,ea=null!=(i=null==et?void 0:et.cliTool)?i:"claude",ei=null!=en?en:ea,{surfaceMode:er,setSurfaceMode:el}=function(e){let{value:s,setValue:t}=(0,z.V)({key:"".concat("commandmate.sessions.tileSurfaceMode-").concat(e),defaultValue:"chat",validate:D.jg,serialize:e=>e,deserialize:e=>e});return{surfaceMode:s,setSurfaceMode:(0,a.useCallback)(e=>t(e),[t])}}(m.id),{visible:eo,toggle:ec}=(0,_.TG)(_.jt),ed="terminal"===er,eu=ed&&eo,[em,eh]=(0,a.useState)(null),[ex,ef]=(0,a.useState)(null),{terminal:eg,prompt:ep,refresh:ev,setAutoScroll:eb}=(0,k.NK)({worktreeId:m.id,cliToolId:ea,instanceId:en,enabled:S,cadence:V.sD}),{messages:ey,isLoading:ew,refresh:ej}=(0,A.Md)({worktreeId:m.id,cliToolId:ea,instanceId:en,enabled:S&&(!ed||eo),cadence:V.WT}),ek=(0,a.useCallback)((e,s)=>K.y.sendMessage(m.id,e,s),[m.id]),{messages:eN,sendOptimistic:eA,retry:eM,discard:eS}=(0,M.v4)({worktreeId:m.id,serverMessages:ey,sendFn:ek,onSent:ej,connectivity:C}),eC=(0,a.useMemo)(()=>(function(e,s){let t=e=>{var t;return void 0!==e.optimisticState&&(null!=(t=e.instanceId)?t:e.cliToolId)!==s};return e.some(t)?e.filter(e=>!t(e)):e})(eN,ei),[eN,ei]),[eI,eL]=(0,a.useState)(null),eP=(0,a.useCallback)(()=>eL(null),[]),eR=(0,a.useCallback)(e=>{let s=eS(e);s&&eL(s)},[eS]),eT=(0,a.useCallback)(()=>{ev()},[ev]),eE=function(e){var s;let{worktree:t,cliToolId:n,instanceId:i}=e,r=null==(s=(0,I.rC)())?void 0:s.refresh,l=t.id,o=(0,a.useMemo)(()=>(function(e,s){var t,n,a;let i=null==(t=e.autoYesByInstance)?void 0:t[s];if(!i||!0!==i.enabled)return(null==(a=e.autoYesStopReasonByInstance)?void 0:a[s])==="server-restart"?T:R;let r=null==(n=e.autoYesAnswerModeByInstance)?void 0:n[s];return{enabled:!0,expiresAt:"number"==typeof i.expiresAt?i.expiresAt:null,...(0,P.wn)(r)?{answerMode:r}:{}}})(t,i),[t,i]),[c,d]=(0,a.useState)(null),u=(0,a.useRef)(t);u.current=t;let m=null===c||c.instanceId!==i||function(e,s,t){let n=s.enabled===e.value.enabled&&(!s.enabled||s.expiresAt===e.value.expiresAt&&(void 0===e.value.answerMode||s.answerMode===e.value.answerMode)),a=null!==e.settledRow&&E(t)!==E(e.settledRow);return n||a}(c,o,t)?null:c;(0,a.useEffect)(()=>{null!==c&&null===m&&d(null)},[c,m]);let h=(0,a.useCallback)(async e=>{let s;try{var t;let a=await fetch("/api/worktrees/".concat(encodeURIComponent(l),"/auto-yes"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e.enabled,cliToolId:n,instanceId:i,duration:e.duration,stopPattern:e.stopPattern,...e.enabled?{answerMode:null!=(t=e.answerMode)?t:P.Rb}:{}})});if(!a.ok)return;let r=await a.json(),o=!0===r.enabled;s={enabled:o,expiresAt:o&&"number"==typeof r.expiresAt?r.expiresAt:null,...o&&(0,P.wn)(r.answerMode)?{answerMode:r.answerMode}:{}}}catch(e){return}let a={instanceId:i,value:s,settledRow:null};d(a);try{await (null==r?void 0:r())}catch(e){}d(e=>e===a?{...a,settledRow:u.current}:e)},[l,n,i,r]),x=m?m.value:o;return{enabled:x.enabled,expiresAt:x.expiresAt,releasedByRestart:(0,L.S9)(x),...x.enabled&&x.answerMode?{answerMode:x.answerMode}:{},toggle:h}}({worktree:m,cliToolId:ea,instanceId:ei}),e_=(0,a.useMemo)(()=>({isRunning:eg.isRunning,attaching:eg.attaching,sessionStatus:eg.sessionStatus,isThinking:eg.isThinking,isPromptWaiting:ep.visible,promptData:ep.data,isSelectionListActive:eg.isSelectionListActive,isPagerActive:eg.isPagerActive,isDismissablePanelActive:eg.isDismissablePanelActive,isUnclassifiedActive:eg.isUnclassifiedActive,startingSince:eg.startingSince}),[eg.isRunning,eg.attaching,eg.sessionStatus,eg.isThinking,eg.isSelectionListActive,eg.isPagerActive,eg.isDismissablePanelActive,eg.isUnclassifiedActive,eg.startingSince,ep.visible,ep.data]),ez=(0,N.Bj)((0,N.qi)(m.id,ei),eg.startingSince),eD=S&&ed&&eg.isSelectionListActive&&!ez.starting,eF=eD?{className:"min-h-[18rem]",px:288}:{className:"min-h-[15rem]",px:240},eB=(0,a.useMemo)(()=>S&&!ez.starting&&(0,b.ro)({isSelectionListActive:eg.isSelectionListActive,isPagerActive:eg.isPagerActive,reading:(0,b.gO)(eg.isSelectionListActive?eg.output:null),cliToolId:ea}),[S,ez.starting,eg.isSelectionListActive,eg.isPagerActive,eg.output,ea]),eK=eD&&eB,eU=(0,F.b4)(em,ex,eF.px),eO=(0,a.useCallback)(e=>el(e),[el]),eY=(0,a.useMemo)(()=>({isLoading:ew,onRetryPending:eM,onDiscardPending:eR,onInsertToMessage:eL}),[ew,eM,eR]),{compactTuiLayoutPadding:eH,preservePaintedPanelRows:eV}=(0,a.useMemo)(()=>(0,q.EK)(ea),[ea]),eq="opencode"===ea||"copilot"===ea,eW=(u=m.id,"session-tile-history-".concat(u)),eJ=(0,a.useCallback)(e=>{es(e.target.value)},[]),eQ=null!=(o=m.branch)?o:m.name,eG=null!=(c=m.repositoryDisplayName)?c:m.repositoryName,eX=en?null==(s=m.sessionStatusByInstance)?void 0:s[en]:void 0,eZ=(0,U.kA)(eX),e$=(0,O.Mq)(eZ,(0,U.px)(eX));return(0,n.jsxs)("section",{className:"flex h-full min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-sm ".concat(G),"data-testid":"session-tile-".concat(m.id),"data-enabled":S?"true":"false","aria-label":X("sessions.tileAriaLabel",{branch:eQ}),children:[(0,n.jsxs)("header",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-2",children:[(0,n.jsx)(j.md,{status:eZ,size:"sm",label:X(e$?O.rH:"status.".concat(eZ)),className:e$?O.Jd:void 0,"data-unclassified":e$?"true":void 0}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"truncate text-xs text-muted-foreground",children:eG}),(0,n.jsx)(r(),{href:"/worktrees/".concat(m.id),className:"block truncate text-sm font-medium text-foreground underline-offset-2 hover:text-accent-600 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:hover:text-accent-400","data-testid":"session-tile-branch-".concat(m.id),title:eQ,children:eQ})]}),$.length>1&&(0,n.jsx)("select",{value:null!=(d=null==et?void 0:et.id)?d:"",onChange:eJ,className:"max-w-[9rem] shrink-0 rounded-md border border-border bg-surface px-2 py-1 text-xs text-muted-foreground transition-colors hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"session-tile-instance-".concat(m.id),"aria-label":X("sessions.tileInstanceAriaLabel"),children:$.map(e=>(0,n.jsx)("option",{value:e.id,children:(0,Y.sw)(e)},e.id))}),ed&&(0,n.jsx)("button",{type:"button",onClick:ec,"aria-pressed":eo,"aria-expanded":eo,"aria-controls":eW,"aria-label":eo?Z("terminal.hideHistory"):Z("terminal.showHistory"),title:eo?Z("terminal.hideHistory"):Z("terminal.showHistory"),className:J(eo),"data-testid":"session-tile-history-toggle-".concat(m.id),children:(0,n.jsx)(h.A,{size:14,"aria-hidden":"true"})}),(0,n.jsx)("div",{role:"group","aria-label":Z("surfaceMode.groupLabelMobile"),className:"flex shrink-0 items-center gap-0.5 rounded-md border border-border p-0.5","data-testid":"session-tile-surface-mode-".concat(m.id),children:W.map(e=>{let{mode:s,labelKey:t,icon:a}=e,i=er===s,r=Z(t);return(0,n.jsx)("button",{type:"button",onClick:()=>el(s),"aria-pressed":i,"aria-label":r,title:r,className:J(i),"data-testid":"session-tile-surface-".concat(s,"-").concat(m.id),children:(0,n.jsx)(a,{size:14,"aria-hidden":"true"})},s)})})]}),(0,n.jsx)("div",{ref:eh,className:"min-w-0 flex-1 overflow-hidden ".concat(eF.className),"data-testid":"session-tile-body-".concat(m.id),children:S&&ed?(0,n.jsxs)("div",{className:"flex h-full min-h-0 min-w-0 flex-col","data-testid":"session-tile-terminal-stack-".concat(m.id),children:[(0,n.jsx)("div",{className:"relative min-w-0 overflow-hidden ".concat(eu?eK?"flex-[3_3_0%] min-h-0":"flex-[3_3_0%] min-h-[8.5rem]":"min-h-0 flex-1"),"data-testid":"session-tile-terminal-".concat(m.id),children:ez.noticeVisible&&null!==ez.startingSince?(0,n.jsx)(p.TE,{cliToolId:ea,startingSince:ez.startingSince,onShowTerminal:ez.revealTerminal}):(0,n.jsx)(g.D,{output:eg.output,isActive:eg.isRunning,attaching:eg.attaching,isThinking:eg.isThinking,autoScroll:eg.autoScroll,onScrollChange:eb,disableAutoFollow:eq,compactTuiLayoutPadding:eH,preservePaintedPanelRows:eV,wrapMode:q.Wq.wrapMode,density:q.Wq.density})}),eD?(0,n.jsx)("div",{className:"min-w-0 border-t border-border p-2 ".concat(eK?"flex min-h-0 flex-col overflow-y-auto":"shrink overflow-y-auto ".concat("min-h-[3rem] max-h-[8rem]")),"data-testid":"session-tile-selection-keys-".concat(m.id),children:(0,n.jsx)(v.Z,{worktreeId:m.id,cliToolId:ea,instanceId:ei,onKeysSent:ev,frame:eg.output,surface:"terminal",showPagerKeys:eg.isPagerActive,compact:!0})}):null,eu&&(0,n.jsx)("div",{id:eW,className:"min-w-0 overflow-hidden border-t border-border ".concat(eK?"flex-[2_2_0%] min-h-0":"flex-[2_2_0%] min-h-[6.5rem]"),"data-testid":"session-tile-history-".concat(m.id),children:(0,n.jsx)(f.bl,{messages:eC,worktreeId:m.id,worktreePath:m.path,cliToolId:ea,isLoading:ew,onFilePathClick:Q,onInsertToMessage:eL,onRetryPending:eM,onDiscardPending:eR,className:"h-full"})})]}):S?(0,n.jsx)(x.wY,{messages:eC,worktreeId:m.id,worktreePath:m.path,cliToolId:ea,instanceId:en,live:e_,frame:eg.output,onKeysSent:ev,onSurfaceModeChange:eO,compact:!0,history:eY}):(0,n.jsx)("div",{className:"h-full","data-testid":"session-tile-placeholder-".concat(m.id),"aria-hidden":"true"})}),S&&(0,n.jsx)("div",{ref:ef,className:"shrink-0 border-t border-border p-2","data-testid":"session-tile-composer-".concat(m.id),children:(0,n.jsx)(y.E,{worktreeId:m.id,cliToolId:ea,instanceId:ei,isSessionRunning:eg.isRunning,isSessionStarting:ez.starting,onOptimisticSend:eA,onMessageSent:eT,pendingInsertText:eI,onInsertConsumed:eP,heightScope:B.CM,maxHeight:eU,planReviewActive:eB,autoYesSlot:(0,n.jsx)(w.T,{enabled:eE.enabled,expiresAt:eE.expiresAt,onToggle:eE.toggle,releasedByRestart:eE.releasedByRestart,answerMode:eE.answerMode,lastAutoResponse:null,cliToolName:ea,inline:!0})})})]})}let $=(0,a.memo)(function(e){let{worktree:s,connectivity:t}=e,{ref:i,inViewport:r}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{rootMargin:s,threshold:t}=e,[n,i]=(0,a.useState)(!1),[r,l]=(0,a.useState)(null),o=(0,a.useCallback)(e=>{l(e)},[]);return(0,a.useEffect)(()=>{if("undefined"==typeof IntersectionObserver)return void i(!0);if(!r)return;let e=new IntersectionObserver(e=>{let s=e[e.length-1];s&&i(s.isIntersecting)},{rootMargin:s,threshold:t});return e.observe(r),()=>e.disconnect()},[r,s,t]),{ref:o,inViewport:n}}({rootMargin:"560px"});return(0,n.jsx)("div",{ref:i,className:"min-w-0 ".concat("h-[35rem]"),children:(0,n.jsx)(G,{worktree:s,enabled:r,connectivity:t})})}),ee=(0,a.memo)(function(e){let{worktrees:s}=e,t=C();return(0,n.jsx)("div",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2","data-testid":"sessions-tile-grid",children:s.map(e=>(0,n.jsx)($,{worktree:e,connectivity:t},e.id))})});var es=t(80003),et=t(91456);let en=["list","tile"];function ea(e){return"string"==typeof e&&en.includes(e)}let ei=[{mode:"list",labelKey:"sessions.viewMode.list",icon:es.A},{mode:"tile",labelKey:"sessions.viewMode.tile",icon:et.A}],er=(0,a.memo)(function(e){let{value:s,onChange:t}=e,a=(0,l.c)("common");return(0,n.jsx)("div",{className:"flex shrink-0 items-center gap-1 rounded-md border border-input bg-surface p-0.5",role:"group","aria-label":a("sessions.viewMode.groupAriaLabel"),"data-testid":"sessions-view-mode",children:ei.map(e=>{let{mode:i,labelKey:r,icon:l}=e,o=s===i;return(0,n.jsx)("button",{type:"button",onClick:()=>t(i),"aria-pressed":o,"aria-label":a(r),title:a(r),"data-testid":"sessions-view-mode-".concat(i),className:"rounded p-1.5 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ".concat(o?"bg-accent-100 text-accent-700 dark:bg-accent-900/30 dark:text-accent-400":"text-muted-foreground hover:text-foreground"),children:(0,n.jsx)(l,{size:16,"aria-hidden":"true"})},i)})})});var el=t(38218),eo=t(50857),ec=t(7636),ed=t(83012),eu=t(39970);let em=[{key:"repositoryName",labelKey:"sort.repositoryName"},{key:"status",labelKey:"sort.status"},{key:"lastSent",labelKey:"sort.lastSent"}],eh={lastSent:"desc",updatedAt:"desc"},ex={ready:0,in_progress:1,in_review:2,done:3};function ef(e){let{status:s,label:t,unclassified:a}=e,i=(0,l.c)("common"),r=(0,O.Mq)(s,a),o="".concat(t,": ").concat(i(r?O.rH:"status.".concat(s)));return(0,n.jsx)(j.md,{status:s,size:"md",label:o,className:r?O.Jd:void 0,"data-unclassified":r?"true":void 0})}function eg(){let e=(0,l.c)("common"),s=(0,l.c)("worktree"),t=(0,el.a)(),{worktrees:i,isLoading:u,error:m,refresh:h}=(0,I.Fn)(),x=i.length>0,[f,g]=(0,a.useState)(""),[p,v]=(0,a.useState)("lastSent"),[b,y]=(0,a.useState)("desc"),{viewMode:w,setViewMode:k}=function(){let{value:e,setValue:s}=(0,z.V)({key:"mcbd-sessions-view-mode",defaultValue:"list",validate:ea,serialize:e=>e,deserialize:e=>e});return{viewMode:e,setViewMode:(0,a.useCallback)(e=>s(e),[s])}}(),N="tile"===w;(0,a.useEffect)(()=>{(0,H.qD)()},[]);let A=(0,a.useMemo)(()=>{let e=i;if(f){let s=f.toLowerCase();e=e.filter(e=>{var t,n;return e.name.toLowerCase().includes(s)||e.repositoryName.toLowerCase().includes(s)||null!=(n=null==(t=e.repositoryDisplayName)?void 0:t.toLowerCase().includes(s))&&n})}let s=[...e];return s.sort((e,s)=>{var t,n,a,i,r,l,o,c;let d=0;switch(p){case"lastSent":{let t=(0,ec.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(),i=(null!=(n=s.repositoryDisplayName)?n:s.repositoryName).toLowerCase();0===(d=a.localeCompare(i))&&(d=e.name.toLowerCase().localeCompare(s.name.toLowerCase()));break}case"status":if(0==(d=(null!=(i=ex[null!=(a=e.status)?a:""])?i:4)-(null!=(l=ex[null!=(r=s.status)?r:""])?l:4))){let t=(null!=(o=e.repositoryDisplayName)?o:e.repositoryName).toLowerCase(),n=(null!=(c=s.repositoryDisplayName)?c:s.repositoryName).toLowerCase();d=t.localeCompare(n)}break;default:d=0}return("lastSent"===p?"desc"===b:"asc"===b)?d:-d}),s},[i,f,p,b]),M=(0,a.useCallback)(e=>{g(e.target.value)},[]),S=(0,a.useCallback)(e=>{var s;v(e),y(null!=(s=eh[e])?s:"asc")},[]),C=(0,a.useCallback)(()=>{y(e=>"asc"===e?"desc":"asc")},[]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(d.k,{onRefresh:h,enabled:t,className:"".concat(N?"w-full px-4 sm:px-6 lg:px-8":"container-custom"," py-8 h-full"),children:[(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:e("sessions.title")}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:e("sessions.description")})]}),(0,n.jsxs)("div",{className:"mb-6 flex items-center gap-3",children:[(0,n.jsx)(j.pd,{type:"text",placeholder:e("sessions.filterPlaceholder"),value:f,onChange:M,className:"max-w-md flex-1","data-testid":"sessions-filter","aria-label":e("sessions.filterAriaLabel"),inputMode:"search",enterKeyHint:"search"}),(0,n.jsxs)(j.l6,{value:p,onValueChange:S,children:[(0,n.jsx)(j.bq,{className:"w-40","data-testid":"sessions-sort-select","aria-label":e("sessions.sortByAriaLabel"),children:(0,n.jsx)(j.yv,{})}),(0,n.jsx)(j.gC,{children:em.map(s=>(0,n.jsx)(j.eb,{value:s.key,children:e(s.labelKey)},s.key))})]}),(0,n.jsx)("button",{type:"button",onClick:C,"data-testid":"sessions-sort-direction","aria-label":"asc"===b?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"===b?(0,n.jsx)(o.A,{size:16,"aria-hidden":"true"}):(0,n.jsx)(c.A,{size:16,"aria-hidden":"true"})}),(0,n.jsx)(er,{value:w,onChange:k})]}),x?(0,n.jsxs)(n.Fragment,{children:[m&&(0,n.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:m.message})}),N?0===A.length?(0,n.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"sessions-empty",children:e("sessions.noMatching")}):(0,n.jsx)(ee,{worktrees:A}):(0,n.jsx)("div",{className:"space-y-2","data-testid":"sessions-list",children:0===A.length?(0,n.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"sessions-empty",children:e("sessions.noMatching")}):A.map((t,a)=>{var i,l,o,c;let d=null!=(i=t.selectedAgents)?i:(0,H.sA)(),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,ed.Fx)(String(t.lastUserMessageAt)):null,h=d.map(e=>{var s;let n=null==(s=t.sessionStatusByCli)?void 0:s[e];return{agent:e,status:(0,U.kA)(n),unclassified:(0,U.px)(n)}}),x=h.filter(e=>(0,eo.Qo)(e.status)||e.unclassified),f=h.length-x.length,g=d.some(e=>{var s;let n=(0,U.kA)(null==(s=t.sessionStatusByCli)?void 0:s[e]);return"running"===n||"generating"===n});return(0,n.jsxs)(r(),{href:"/worktrees/".concat(t.id),style:{animationDelay:function(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")}(a)},className:"block bg-surface rounded-lg p-4 border transition-colors ".concat(g?"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("animate-in fade-in-0 slide-in-from-bottom-2 fill-mode-backwards duration-300"),"data-testid":"session-item-".concat(t.id),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"text-sm font-medium text-foreground truncate",children:null!=(l=t.repositoryDisplayName)?l:t.repositoryName}),(0,n.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:t.name})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 ml-4 flex-shrink-0","data-testid":"session-agents-".concat(t.id),children:[x.map(e=>{let{agent:s,status:t,unclassified:a}=e;return(0,n.jsxs)("div",{className:"flex items-center gap-1","data-testid":"session-agent-".concat(s),children:[(0,n.jsx)(ef,{status:t,label:(0,Y.oo)(s),unclassified:a}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,Y.oo)(s)})]},s)}),f>0&&(0,n.jsxs)("div",{className:"flex items-center gap-1","data-testid":"session-idle-cluster-".concat(t.id),"aria-label":e("sessions.idleAgents",{count:f}),children:[(0,n.jsx)(j.md,{status:"idle",size:"sm","aria-hidden":!0,title:void 0}),(0,n.jsxs)("span",{className:"text-xs text-muted-foreground tabular-nums",children:["+",f]})]})]})]}),t.description&&(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 whitespace-pre-wrap",children:t.description})}),t.status&&(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)("span",{className:"px-2 py-0.5 text-xs font-medium rounded ".concat(null!=(c=eu.SE[null!=(o=t.status)?o:""])?c:"bg-muted text-muted-foreground"),children:function(e,s){if(!e)return"";let t=eu.m9.find(s=>s.value===e);return t?s(t.labelKey):e}(t.status,s)})}),u&&(0,n.jsxs)("div",{className:"mt-2 flex items-center gap-2","data-testid":"session-message-".concat(t.id),children:[(0,n.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,n.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,n.jsxs)(n.Fragment,{children:[u&&(0,n.jsx)("div",{className:"space-y-2","data-testid":"sessions-loading",role:"status","aria-label":e("sessions.loadingAriaLabel"),children:[0,1,2].map(e=>(0,n.jsxs)("div",{className:"block bg-surface rounded-lg p-4 border border-border shadow-sm",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,n.jsx)(j.EA,{className:"h-4 w-40 max-w-full"}),(0,n.jsx)(j.EA,{className:"h-3 w-56 max-w-full"})]}),(0,n.jsx)(j.EA,{className:"ml-4 h-3 w-16 flex-shrink-0"})]}),(0,n.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,n.jsx)(j.EA,{className:"h-3 min-w-0 flex-1"}),(0,n.jsx)(j.EA,{className:"h-3 w-10 flex-shrink-0"})]})]},e))}),!u&&m&&(0,n.jsx)("div",{className:"text-danger-foreground","data-testid":"sessions-error",children:e("sessions.loadError",{message:m.message})}),!u&&!m&&(0,n.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"sessions-empty",children:f?e("sessions.noMatching"):e("sessions.empty")})]})]})})}},75676:(e,s,t)=>{"use strict";t.d(s,{jg:()=>i,kQ:()=>r,mR:()=>c,mS:()=>o,wf:()=>n});let n="terminal",a=new Set(["terminal","chat"]);function i(e){return"string"==typeof e&&a.has(e)}let r={data:null,messageId:null,visible:!1,answering:!1},l={mode:"split",mobileActivePane:"terminal",leftPaneTab:"history",splitRatio:.5,leftPaneCollapsed:!1,activityBar:{active:"files"},historyPane:{visible:!0,width:25,collapsed:!1}},o={type:null,message:null,retryable:!1,retryCount:0};function c(){return{phase:"idle",prompt:{...r},layout:{...l},error:{...o},messages:[],wsConnected:!1}}},80003:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});let n=(0,t(71847).A)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]])},87047:(e,s,t)=>{Promise.resolve().then(t.bind(t,46617))}},e=>{e.O(0,[6809,4909,2770,2619,3662,6606,934,9465,8407,2407,344,6654,8606,1128,4768,7665,3931,8441,1255,7358],()=>e(e.s=87047)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8898],{9219:(e,s,t)=>{"use strict";t.d(s,{k:()=>l});var n=t(95155),a=t(12115),i=t(48407),r=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:n=64,maxPull:i=96,resistance:r=.5}=e,l=(0,a.useRef)(null),[o,c]=(0,a.useState)(0),[d,u]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!1),x=(0,a.useRef)(null),f=(0,a.useRef)(0),g=(0,a.useRef)(!1);g.current=d;let p=(0,a.useCallback)(()=>{x.current=null,f.current=0,c(0),h(!1)},[]),v=(0,a.useCallback)(e=>{if(!t||g.current)return;let s=l.current;s&&!(s.scrollTop>0)&&(x.current=e.touches[0].clientY,f.current=0)},[t]),b=(0,a.useCallback)(e=>{if(null===x.current)return;let s=l.current;if(!s)return;if(s.scrollTop>0)return void p();let t=e.touches[0].clientY-x.current;if(t<=0){0!==f.current&&(f.current=0,c(0),h(!1));return}e.cancelable&&e.preventDefault();let n=Math.min(t*r,i);f.current=n,c(n),h(!0)},[r,i,p]),y=(0,a.useCallback)(async()=>{u(!0),h(!1),c(n);try{await Promise.resolve(s())}finally{u(!1),c(0)}},[s,n]),w=(0,a.useCallback)(()=>{if(null===x.current)return;let e=f.current>=n&&!g.current;x.current=null,f.current=0,e?y():(c(0),h(!1))},[n,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",w,{passive:!0}),e.addEventListener("touchcancel",w,{passive:!0}),()=>{e.removeEventListener("touchstart",v),e.removeEventListener("touchmove",b),e.removeEventListener("touchend",w),e.removeEventListener("touchcancel",w)}},[v,b,w]),{containerRef:l,pullDistance:o,isRefreshing:d,isPulling:m}}({onRefresh:s,enabled:t,threshold:64}),h=u||d>0,x=u?1:Math.min(d/64,1);return(0,n.jsxs)("div",{ref:c,className:(0,r.cn)("relative overflow-auto",l),style:{overscrollBehaviorY:"contain"},"data-testid":"pull-to-refresh",children:[(0,n.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 z-10 flex justify-center",style:{transform:"translateY(".concat(h?Math.max(d-24,8):-32,"px)"),opacity:x,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,n.jsx)(i.y$,{size:"sm",variant:"accent"})}),(0,n.jsx)("div",{style:{transform:h?"translateY(".concat(d,"px)"):void 0,transition:m?"none":"transform 0.2s ease-out"},children:o})]})}},46617:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>eg});var n=t(95155),a=t(12115),i=t(52619),r=t.n(i),l=t(18955),o=t(20562),c=t(8803),d=t(9219),u=t(37586),m=t(22479),h=t(54485),x=t(58597),f=t(83051),g=t(14006),p=t(88155),v=t(92509),b=t(93493),y=t(639),w=t(2954),j=t(48407),k=t(76279),N=t(89599),A=t(308),M=t(80635),S=t(52407);function C(){let{signals:e}=(0,S.Fx)();return(0,a.useMemo)(()=>({offline:(0,S.sV)(e),reachable:(0,S._X)(e)}),[e])}var I=t(66966),L=t(34325),P=t(14524);let R=Object.freeze({enabled:!1,expiresAt:null}),T=Object.freeze({enabled:!1,expiresAt:null,stopReason:"server-restart"});function E(e){var s;return null!=(s=e.autoYesByInstance)?s:e}var _=t(81507),z=t(2317),D=t(75676),F=t(63881),B=t(8355),K=t(80344),U=t(38606),O=t(76471),Y=t(54014),H=t(55449),V=t(67149),q=t(68394);let W=[{mode:"chat",labelKey:"surfaceMode.showChat",icon:u.A},{mode:"terminal",labelKey:"surfaceMode.showTerminal",icon:m.A}];function J(e){return"flex h-7 w-7 shrink-0 items-center justify-center rounded transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring ".concat(e?"bg-accent-500/15 text-accent-600 dark:text-accent-400":"text-muted-foreground hover:bg-muted hover:text-foreground")}let Q=()=>{},G=(0,a.memo)(function(e){return e.connectivity?(0,n.jsx)(Z,{...e,connectivity:e.connectivity}):(0,n.jsx)(X,{...e})});function X(e){let s=C();return(0,n.jsx)(Z,{...e,connectivity:s})}function Z(e){var s,t,i,o,c,d,u;let{worktree:m,enabled:S,connectivity:C,className:G=""}=e,X=(0,l.c)("common"),Z=(0,l.c)("worktree"),$=(0,a.useMemo)(()=>{var e;return m.agentInstances&&m.agentInstances.length>0?m.agentInstances:(0,Y.lu)(null!=(e=m.selectedAgents)?e:(0,H.sA)())},[m]),[ee,es]=(0,a.useState)(null),et=null!=(t=$.find(e=>e.id===ee))?t:$[0],en=null==et?void 0:et.id,ea=null!=(i=null==et?void 0:et.cliTool)?i:"claude",ei=null!=en?en:ea,{surfaceMode:er,setSurfaceMode:el}=function(e){let{value:s,setValue:t}=(0,z.V)({key:"".concat("commandmate.sessions.tileSurfaceMode-").concat(e),defaultValue:"chat",validate:D.jg,serialize:e=>e,deserialize:e=>e});return{surfaceMode:s,setSurfaceMode:(0,a.useCallback)(e=>t(e),[t])}}(m.id),{visible:eo,toggle:ec}=(0,_.TG)(_.jt),ed="terminal"===er,eu=ed&&eo,[em,eh]=(0,a.useState)(null),[ex,ef]=(0,a.useState)(null),{terminal:eg,prompt:ep,refresh:ev,setAutoScroll:eb}=(0,k.NK)({worktreeId:m.id,cliToolId:ea,instanceId:en,enabled:S,cadence:V.sD}),{messages:ey,isLoading:ew,refresh:ej}=(0,A.Md)({worktreeId:m.id,cliToolId:ea,instanceId:en,enabled:S&&(!ed||eo),cadence:V.WT}),ek=(0,a.useCallback)((e,s)=>K.y.sendMessage(m.id,e,s),[m.id]),{messages:eN,sendOptimistic:eA,retry:eM,discard:eS}=(0,M.v4)({worktreeId:m.id,serverMessages:ey,sendFn:ek,onSent:ej,connectivity:C}),eC=(0,a.useMemo)(()=>(function(e,s){let t=e=>{var t;return void 0!==e.optimisticState&&(null!=(t=e.instanceId)?t:e.cliToolId)!==s};return e.some(t)?e.filter(e=>!t(e)):e})(eN,ei),[eN,ei]),[eI,eL]=(0,a.useState)(null),eP=(0,a.useCallback)(()=>eL(null),[]),eR=(0,a.useCallback)(e=>{let s=eS(e);s&&eL(s)},[eS]),eT=(0,a.useCallback)(()=>{ev()},[ev]),eE=function(e){var s;let{worktree:t,cliToolId:n,instanceId:i}=e,r=null==(s=(0,I.rC)())?void 0:s.refresh,l=t.id,o=(0,a.useMemo)(()=>(function(e,s){var t,n,a;let i=null==(t=e.autoYesByInstance)?void 0:t[s];if(!i||!0!==i.enabled)return(null==(a=e.autoYesStopReasonByInstance)?void 0:a[s])==="server-restart"?T:R;let r=null==(n=e.autoYesAnswerModeByInstance)?void 0:n[s];return{enabled:!0,expiresAt:"number"==typeof i.expiresAt?i.expiresAt:null,...(0,P.wn)(r)?{answerMode:r}:{}}})(t,i),[t,i]),[c,d]=(0,a.useState)(null),u=(0,a.useRef)(t);u.current=t;let m=null===c||c.instanceId!==i||function(e,s,t){let n=s.enabled===e.value.enabled&&(!s.enabled||s.expiresAt===e.value.expiresAt&&(void 0===e.value.answerMode||s.answerMode===e.value.answerMode)),a=null!==e.settledRow&&E(t)!==E(e.settledRow);return n||a}(c,o,t)?null:c;(0,a.useEffect)(()=>{null!==c&&null===m&&d(null)},[c,m]);let h=(0,a.useCallback)(async e=>{let s;try{var t;let a=await fetch("/api/worktrees/".concat(encodeURIComponent(l),"/auto-yes"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e.enabled,cliToolId:n,instanceId:i,duration:e.duration,stopPattern:e.stopPattern,...e.enabled?{answerMode:null!=(t=e.answerMode)?t:P.Rb}:{}})});if(!a.ok)return;let r=await a.json(),o=!0===r.enabled;s={enabled:o,expiresAt:o&&"number"==typeof r.expiresAt?r.expiresAt:null,...o&&(0,P.wn)(r.answerMode)?{answerMode:r.answerMode}:{}}}catch(e){return}let a={instanceId:i,value:s,settledRow:null};d(a);try{await (null==r?void 0:r())}catch(e){}d(e=>e===a?{...a,settledRow:u.current}:e)},[l,n,i,r]),x=m?m.value:o;return{enabled:x.enabled,expiresAt:x.expiresAt,releasedByRestart:(0,L.S9)(x),...x.enabled&&x.answerMode?{answerMode:x.answerMode}:{},toggle:h}}({worktree:m,cliToolId:ea,instanceId:ei}),e_=(0,a.useMemo)(()=>({isRunning:eg.isRunning,attaching:eg.attaching,sessionStatus:eg.sessionStatus,isThinking:eg.isThinking,isPromptWaiting:ep.visible,promptData:ep.data,isSelectionListActive:eg.isSelectionListActive,isPagerActive:eg.isPagerActive,isDismissablePanelActive:eg.isDismissablePanelActive,isUnclassifiedActive:eg.isUnclassifiedActive,startingSince:eg.startingSince}),[eg.isRunning,eg.attaching,eg.sessionStatus,eg.isThinking,eg.isSelectionListActive,eg.isPagerActive,eg.isDismissablePanelActive,eg.isUnclassifiedActive,eg.startingSince,ep.visible,ep.data]),ez=(0,N.Bj)((0,N.qi)(m.id,ei),eg.startingSince),eD=S&&ed&&eg.isSelectionListActive&&!ez.starting,eF=eD?{className:"min-h-[18rem]",px:288}:{className:"min-h-[15rem]",px:240},eB=(0,a.useMemo)(()=>S&&!ez.starting&&(0,b.ro)({isSelectionListActive:eg.isSelectionListActive,isPagerActive:eg.isPagerActive,reading:(0,b.gO)(eg.isSelectionListActive?eg.output:null),cliToolId:ea}),[S,ez.starting,eg.isSelectionListActive,eg.isPagerActive,eg.output,ea]),eK=eD&&eB,eU=(0,F.b4)(em,ex,eF.px),eO=(0,a.useCallback)(e=>el(e),[el]),eY=(0,a.useMemo)(()=>({isLoading:ew,onRetryPending:eM,onDiscardPending:eR,onInsertToMessage:eL}),[ew,eM,eR]),{compactTuiLayoutPadding:eH,preservePaintedPanelRows:eV}=(0,a.useMemo)(()=>(0,q.EK)(ea),[ea]),eq="opencode"===ea||"copilot"===ea,eW=(u=m.id,"session-tile-history-".concat(u)),eJ=(0,a.useCallback)(e=>{es(e.target.value)},[]),eQ=null!=(o=m.branch)?o:m.name,eG=null!=(c=m.repositoryDisplayName)?c:m.repositoryName,eX=en?null==(s=m.sessionStatusByInstance)?void 0:s[en]:void 0,eZ=(0,U.kA)(eX),e$=(0,O.Mq)(eZ,(0,U.px)(eX));return(0,n.jsxs)("section",{className:"flex h-full min-w-0 flex-col overflow-hidden rounded-lg border border-border bg-surface shadow-sm ".concat(G),"data-testid":"session-tile-".concat(m.id),"data-enabled":S?"true":"false","aria-label":X("sessions.tileAriaLabel",{branch:eQ}),children:[(0,n.jsxs)("header",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-2",children:[(0,n.jsx)(j.md,{status:eZ,size:"sm",label:X(e$?O.rH:"status.".concat(eZ)),className:e$?O.Jd:void 0,"data-unclassified":e$?"true":void 0}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"truncate text-xs text-muted-foreground",children:eG}),(0,n.jsx)(r(),{href:"/worktrees/".concat(m.id),className:"block truncate text-sm font-medium text-foreground underline-offset-2 hover:text-accent-600 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring dark:hover:text-accent-400","data-testid":"session-tile-branch-".concat(m.id),title:eQ,children:eQ})]}),$.length>1&&(0,n.jsx)("select",{value:null!=(d=null==et?void 0:et.id)?d:"",onChange:eJ,className:"max-w-[9rem] shrink-0 rounded-md border border-border bg-surface px-2 py-1 text-xs text-muted-foreground transition-colors hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring","data-testid":"session-tile-instance-".concat(m.id),"aria-label":X("sessions.tileInstanceAriaLabel"),children:$.map(e=>(0,n.jsx)("option",{value:e.id,children:(0,Y.sw)(e)},e.id))}),ed&&(0,n.jsx)("button",{type:"button",onClick:ec,"aria-pressed":eo,"aria-expanded":eo,"aria-controls":eW,"aria-label":eo?Z("terminal.hideHistory"):Z("terminal.showHistory"),title:eo?Z("terminal.hideHistory"):Z("terminal.showHistory"),className:J(eo),"data-testid":"session-tile-history-toggle-".concat(m.id),children:(0,n.jsx)(h.A,{size:14,"aria-hidden":"true"})}),(0,n.jsx)("div",{role:"group","aria-label":Z("surfaceMode.groupLabelMobile"),className:"flex shrink-0 items-center gap-0.5 rounded-md border border-border p-0.5","data-testid":"session-tile-surface-mode-".concat(m.id),children:W.map(e=>{let{mode:s,labelKey:t,icon:a}=e,i=er===s,r=Z(t);return(0,n.jsx)("button",{type:"button",onClick:()=>el(s),"aria-pressed":i,"aria-label":r,title:r,className:J(i),"data-testid":"session-tile-surface-".concat(s,"-").concat(m.id),children:(0,n.jsx)(a,{size:14,"aria-hidden":"true"})},s)})})]}),(0,n.jsx)("div",{ref:eh,className:"min-w-0 flex-1 overflow-hidden ".concat(eF.className),"data-testid":"session-tile-body-".concat(m.id),children:S&&ed?(0,n.jsxs)("div",{className:"flex h-full min-h-0 min-w-0 flex-col","data-testid":"session-tile-terminal-stack-".concat(m.id),children:[(0,n.jsx)("div",{className:"relative min-w-0 overflow-hidden ".concat(eu?eK?"flex-[3_3_0%] min-h-0":"flex-[3_3_0%] min-h-[8.5rem]":"min-h-0 flex-1"),"data-testid":"session-tile-terminal-".concat(m.id),children:ez.noticeVisible&&null!==ez.startingSince?(0,n.jsx)(p.TE,{cliToolId:ea,startingSince:ez.startingSince,onShowTerminal:ez.revealTerminal}):(0,n.jsx)(g.D,{output:eg.output,isActive:eg.isRunning,attaching:eg.attaching,isThinking:eg.isThinking,autoScroll:eg.autoScroll,onScrollChange:eb,disableAutoFollow:eq,compactTuiLayoutPadding:eH,preservePaintedPanelRows:eV,wrapMode:q.Wq.wrapMode,density:q.Wq.density})}),eD?(0,n.jsx)("div",{className:"min-w-0 border-t border-border p-2 ".concat(eK?"flex min-h-0 flex-col overflow-y-auto":"shrink overflow-y-auto ".concat("min-h-[3rem] max-h-[8rem]")),"data-testid":"session-tile-selection-keys-".concat(m.id),children:(0,n.jsx)(v.Z,{worktreeId:m.id,cliToolId:ea,instanceId:ei,onKeysSent:ev,frame:eg.output,surface:"terminal",showPagerKeys:eg.isPagerActive,compact:!0})}):null,eu&&(0,n.jsx)("div",{id:eW,className:"min-w-0 overflow-hidden border-t border-border ".concat(eK?"flex-[2_2_0%] min-h-0":"flex-[2_2_0%] min-h-[6.5rem]"),"data-testid":"session-tile-history-".concat(m.id),children:(0,n.jsx)(f.bl,{messages:eC,worktreeId:m.id,worktreePath:m.path,cliToolId:ea,isLoading:ew,onFilePathClick:Q,onInsertToMessage:eL,onRetryPending:eM,onDiscardPending:eR,className:"h-full"})})]}):S?(0,n.jsx)(x.wY,{messages:eC,worktreeId:m.id,worktreePath:m.path,cliToolId:ea,instanceId:en,live:e_,frame:eg.output,onKeysSent:ev,onSurfaceModeChange:eO,compact:!0,history:eY}):(0,n.jsx)("div",{className:"h-full","data-testid":"session-tile-placeholder-".concat(m.id),"aria-hidden":"true"})}),S&&(0,n.jsx)("div",{ref:ef,className:"shrink-0 border-t border-border p-2","data-testid":"session-tile-composer-".concat(m.id),children:(0,n.jsx)(y.E,{worktreeId:m.id,cliToolId:ea,instanceId:ei,isSessionRunning:eg.isRunning,isSessionStarting:ez.starting,onOptimisticSend:eA,onMessageSent:eT,pendingInsertText:eI,onInsertConsumed:eP,heightScope:B.CM,maxHeight:eU,planReviewActive:eB,autoYesSlot:(0,n.jsx)(w.T,{enabled:eE.enabled,expiresAt:eE.expiresAt,onToggle:eE.toggle,releasedByRestart:eE.releasedByRestart,answerMode:eE.answerMode,lastAutoResponse:null,cliToolName:ea,inline:!0})})})]})}let $=(0,a.memo)(function(e){let{worktree:s,connectivity:t}=e,{ref:i,inViewport:r}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{rootMargin:s,threshold:t}=e,[n,i]=(0,a.useState)(!1),[r,l]=(0,a.useState)(null),o=(0,a.useCallback)(e=>{l(e)},[]);return(0,a.useEffect)(()=>{if("undefined"==typeof IntersectionObserver)return void i(!0);if(!r)return;let e=new IntersectionObserver(e=>{let s=e[e.length-1];s&&i(s.isIntersecting)},{rootMargin:s,threshold:t});return e.observe(r),()=>e.disconnect()},[r,s,t]),{ref:o,inViewport:n}}({rootMargin:"560px"});return(0,n.jsx)("div",{ref:i,className:"min-w-0 ".concat("h-[35rem]"),children:(0,n.jsx)(G,{worktree:s,enabled:r,connectivity:t})})}),ee=(0,a.memo)(function(e){let{worktrees:s}=e,t=C();return(0,n.jsx)("div",{className:"grid grid-cols-1 gap-4 xl:grid-cols-2","data-testid":"sessions-tile-grid",children:s.map(e=>(0,n.jsx)($,{worktree:e,connectivity:t},e.id))})});var es=t(80003),et=t(91456);let en=["list","tile"];function ea(e){return"string"==typeof e&&en.includes(e)}let ei=[{mode:"list",labelKey:"sessions.viewMode.list",icon:es.A},{mode:"tile",labelKey:"sessions.viewMode.tile",icon:et.A}],er=(0,a.memo)(function(e){let{value:s,onChange:t}=e,a=(0,l.c)("common");return(0,n.jsx)("div",{className:"flex shrink-0 items-center gap-1 rounded-md border border-input bg-surface p-0.5",role:"group","aria-label":a("sessions.viewMode.groupAriaLabel"),"data-testid":"sessions-view-mode",children:ei.map(e=>{let{mode:i,labelKey:r,icon:l}=e,o=s===i;return(0,n.jsx)("button",{type:"button",onClick:()=>t(i),"aria-pressed":o,"aria-label":a(r),title:a(r),"data-testid":"sessions-view-mode-".concat(i),className:"rounded p-1.5 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ".concat(o?"bg-accent-100 text-accent-700 dark:bg-accent-900/30 dark:text-accent-400":"text-muted-foreground hover:text-foreground"),children:(0,n.jsx)(l,{size:16,"aria-hidden":"true"})},i)})})});var el=t(38218),eo=t(50857),ec=t(7636),ed=t(83012),eu=t(39970);let em=[{key:"repositoryName",labelKey:"sort.repositoryName"},{key:"status",labelKey:"sort.status"},{key:"lastSent",labelKey:"sort.lastSent"}],eh={lastSent:"desc",updatedAt:"desc"},ex={ready:0,in_progress:1,in_review:2,done:3};function ef(e){let{status:s,label:t,unclassified:a}=e,i=(0,l.c)("common"),r=(0,O.Mq)(s,a),o="".concat(t,": ").concat(i(r?O.rH:"status.".concat(s)));return(0,n.jsx)(j.md,{status:s,size:"md",label:o,className:r?O.Jd:void 0,"data-unclassified":r?"true":void 0})}function eg(){let e=(0,l.c)("common"),s=(0,l.c)("worktree"),t=(0,el.a)(),{worktrees:i,isLoading:u,error:m,refresh:h}=(0,I.Fn)(),x=i.length>0,[f,g]=(0,a.useState)(""),[p,v]=(0,a.useState)("lastSent"),[b,y]=(0,a.useState)("desc"),{viewMode:w,setViewMode:k}=function(){let{value:e,setValue:s}=(0,z.V)({key:"mcbd-sessions-view-mode",defaultValue:"list",validate:ea,serialize:e=>e,deserialize:e=>e});return{viewMode:e,setViewMode:(0,a.useCallback)(e=>s(e),[s])}}(),N="tile"===w;(0,a.useEffect)(()=>{(0,H.qD)()},[]);let A=(0,a.useMemo)(()=>{let e=i;if(f){let s=f.toLowerCase();e=e.filter(e=>{var t,n;return e.name.toLowerCase().includes(s)||e.repositoryName.toLowerCase().includes(s)||null!=(n=null==(t=e.repositoryDisplayName)?void 0:t.toLowerCase().includes(s))&&n})}let s=[...e];return s.sort((e,s)=>{var t,n,a,i,r,l,o,c;let d=0;switch(p){case"lastSent":{let t=(0,ec.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(),i=(null!=(n=s.repositoryDisplayName)?n:s.repositoryName).toLowerCase();0===(d=a.localeCompare(i))&&(d=e.name.toLowerCase().localeCompare(s.name.toLowerCase()));break}case"status":if(0==(d=(null!=(i=ex[null!=(a=e.status)?a:""])?i:4)-(null!=(l=ex[null!=(r=s.status)?r:""])?l:4))){let t=(null!=(o=e.repositoryDisplayName)?o:e.repositoryName).toLowerCase(),n=(null!=(c=s.repositoryDisplayName)?c:s.repositoryName).toLowerCase();d=t.localeCompare(n)}break;default:d=0}return("lastSent"===p?"desc"===b:"asc"===b)?d:-d}),s},[i,f,p,b]),M=(0,a.useCallback)(e=>{g(e.target.value)},[]),S=(0,a.useCallback)(e=>{var s;v(e),y(null!=(s=eh[e])?s:"asc")},[]),C=(0,a.useCallback)(()=>{y(e=>"asc"===e?"desc":"asc")},[]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(d.k,{onRefresh:h,enabled:t,className:"".concat(N?"w-full px-4 sm:px-6 lg:px-8":"container-custom"," py-8 h-full"),children:[(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2",children:e("sessions.title")}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:e("sessions.description")})]}),(0,n.jsxs)("div",{className:"mb-6 flex items-center gap-3",children:[(0,n.jsx)(j.pd,{type:"text",placeholder:e("sessions.filterPlaceholder"),value:f,onChange:M,className:"max-w-md flex-1","data-testid":"sessions-filter","aria-label":e("sessions.filterAriaLabel"),inputMode:"search",enterKeyHint:"search"}),(0,n.jsxs)(j.l6,{value:p,onValueChange:S,children:[(0,n.jsx)(j.bq,{className:"w-40","data-testid":"sessions-sort-select","aria-label":e("sessions.sortByAriaLabel"),children:(0,n.jsx)(j.yv,{})}),(0,n.jsx)(j.gC,{children:em.map(s=>(0,n.jsx)(j.eb,{value:s.key,children:e(s.labelKey)},s.key))})]}),(0,n.jsx)("button",{type:"button",onClick:C,"data-testid":"sessions-sort-direction","aria-label":"asc"===b?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"===b?(0,n.jsx)(o.A,{size:16,"aria-hidden":"true"}):(0,n.jsx)(c.A,{size:16,"aria-hidden":"true"})}),(0,n.jsx)(er,{value:w,onChange:k})]}),x?(0,n.jsxs)(n.Fragment,{children:[m&&(0,n.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:m.message})}),N?0===A.length?(0,n.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"sessions-empty",children:e("sessions.noMatching")}):(0,n.jsx)(ee,{worktrees:A}):(0,n.jsx)("div",{className:"space-y-2","data-testid":"sessions-list",children:0===A.length?(0,n.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"sessions-empty",children:e("sessions.noMatching")}):A.map((t,a)=>{var i,l,o,c;let d=null!=(i=t.selectedAgents)?i:(0,H.sA)(),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,ed.Fx)(String(t.lastUserMessageAt)):null,h=d.map(e=>{var s;let n=null==(s=t.sessionStatusByCli)?void 0:s[e];return{agent:e,status:(0,U.kA)(n),unclassified:(0,U.px)(n)}}),x=h.filter(e=>(0,eo.Qo)(e.status)||e.unclassified),f=h.length-x.length,g=d.some(e=>{var s;let n=(0,U.kA)(null==(s=t.sessionStatusByCli)?void 0:s[e]);return"running"===n||"generating"===n});return(0,n.jsxs)(r(),{href:"/worktrees/".concat(t.id),style:{animationDelay:function(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")}(a)},className:"block bg-surface rounded-lg p-4 border transition-colors ".concat(g?"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("animate-in fade-in-0 slide-in-from-bottom-2 fill-mode-backwards duration-300"),"data-testid":"session-item-".concat(t.id),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"text-sm font-medium text-foreground truncate",children:null!=(l=t.repositoryDisplayName)?l:t.repositoryName}),(0,n.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:t.name})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 ml-4 flex-shrink-0","data-testid":"session-agents-".concat(t.id),children:[x.map(e=>{let{agent:s,status:t,unclassified:a}=e;return(0,n.jsxs)("div",{className:"flex items-center gap-1","data-testid":"session-agent-".concat(s),children:[(0,n.jsx)(ef,{status:t,label:(0,Y.oo)(s),unclassified:a}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,Y.oo)(s)})]},s)}),f>0&&(0,n.jsxs)("div",{className:"flex items-center gap-1","data-testid":"session-idle-cluster-".concat(t.id),"aria-label":e("sessions.idleAgents",{count:f}),children:[(0,n.jsx)(j.md,{status:"idle",size:"sm","aria-hidden":!0,title:void 0}),(0,n.jsxs)("span",{className:"text-xs text-muted-foreground tabular-nums",children:["+",f]})]})]})]}),t.description&&(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 whitespace-pre-wrap",children:t.description})}),t.status&&(0,n.jsx)("div",{className:"mt-2",children:(0,n.jsx)("span",{className:"px-2 py-0.5 text-xs font-medium rounded ".concat(null!=(c=eu.SE[null!=(o=t.status)?o:""])?c:"bg-muted text-muted-foreground"),children:function(e,s){if(!e)return"";let t=eu.m9.find(s=>s.value===e);return t?s(t.labelKey):e}(t.status,s)})}),u&&(0,n.jsxs)("div",{className:"mt-2 flex items-center gap-2","data-testid":"session-message-".concat(t.id),children:[(0,n.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,n.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,n.jsxs)(n.Fragment,{children:[u&&(0,n.jsx)("div",{className:"space-y-2","data-testid":"sessions-loading",role:"status","aria-label":e("sessions.loadingAriaLabel"),children:[0,1,2].map(e=>(0,n.jsxs)("div",{className:"block bg-surface rounded-lg p-4 border border-border shadow-sm",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,n.jsx)(j.EA,{className:"h-4 w-40 max-w-full"}),(0,n.jsx)(j.EA,{className:"h-3 w-56 max-w-full"})]}),(0,n.jsx)(j.EA,{className:"ml-4 h-3 w-16 flex-shrink-0"})]}),(0,n.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,n.jsx)(j.EA,{className:"h-3 min-w-0 flex-1"}),(0,n.jsx)(j.EA,{className:"h-3 w-10 flex-shrink-0"})]})]},e))}),!u&&m&&(0,n.jsx)("div",{className:"text-danger-foreground","data-testid":"sessions-error",children:e("sessions.loadError",{message:m.message})}),!u&&!m&&(0,n.jsx)("div",{className:"text-muted-foreground py-8 text-center","data-testid":"sessions-empty",children:f?e("sessions.noMatching"):e("sessions.empty")})]})]})})}},75676:(e,s,t)=>{"use strict";t.d(s,{jg:()=>i,kQ:()=>r,mR:()=>c,mS:()=>o,wf:()=>n});let n="terminal",a=new Set(["terminal","chat"]);function i(e){return"string"==typeof e&&a.has(e)}let r={data:null,messageId:null,visible:!1,answering:!1},l={mode:"split",mobileActivePane:"terminal",leftPaneTab:"history",splitRatio:.5,leftPaneCollapsed:!1,activityBar:{active:"files"},historyPane:{visible:!0,width:25,collapsed:!1}},o={type:null,message:null,retryable:!1,retryCount:0};function c(){return{phase:"idle",prompt:{...r},layout:{...l},error:{...o},messages:[],wsConnected:!1}}},80003:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});let n=(0,t(71847).A)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]])},87047:(e,s,t)=>{Promise.resolve().then(t.bind(t,46617))}},e=>{e.O(0,[6809,4909,2770,2619,3662,6606,934,9465,8407,2407,344,7636,6966,1128,7197,3931,8441,1255,7358],()=>e(e.s=87047)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11,66,74,263,341,532,543,640,836,865,890,960,1099,1123,1158,1164,1274,1295,1310,1317,1327,1337,1360,1363,1377,1421,1437,1523,1645,1652,1745,1796,1972,2017,2046,2117,2118,2132,2207,2260,2344,2360,2464,2548,2609,2786,2852,2893,3002,3151,3175,3350,3657,3685,3792,3797,3845,3965,3969,3990,4016,4035,4042,4199,4225,4240,4275,4468,4476,4594,4614,4748,4767,4779,4907,4961,4985,5004,5145,5286,5332,5522,5580,5657,5683,5832,6067,6140,6194,6215,6248,6393,6451,6564,6635,6680,6734,6824,6839,6901,7e3,7115,7238,7473,7509,7560,7670,7758,7760,7895,7921,7939,8043,8238,8418,8457,8460,8464,8472,8489,8509,8544,8658,8710,8914,8979,9015,9059,9114,9162,9245,9281,9282,9325,9416,9549,9602,9792,9932,9946,9968],{84441:()=>{}},_=>{_.O(0,[8441,1255,7358],()=>_(_.s=84441)),_N_E=_.O()}]);