commandmate 0.29.2 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (647) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +278 -271
  3. package/.next/app-path-routes-manifest.json +35 -34
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +8 -8
  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/update/route_client-reference-manifest.js +1 -1
  12. package/.next/server/app/api/app/update-check/route.js +1 -1
  13. package/.next/server/app/api/app/update-check/route_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/assistant/conversation/route.js +1 -1
  15. package/.next/server/app/api/assistant/conversation/route.js.nft.json +1 -1
  16. package/.next/server/app/api/assistant/conversation/route_client-reference-manifest.js +1 -1
  17. package/.next/server/app/api/assistant/current-output/route.js +1 -1
  18. package/.next/server/app/api/assistant/current-output/route.js.nft.json +1 -1
  19. package/.next/server/app/api/assistant/current-output/route_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/assistant/messages/route.js +1 -1
  21. package/.next/server/app/api/assistant/messages/route.js.nft.json +1 -1
  22. package/.next/server/app/api/assistant/messages/route_client-reference-manifest.js +1 -1
  23. package/.next/server/app/api/assistant/session/route.js +1 -1
  24. package/.next/server/app/api/assistant/session/route.js.nft.json +1 -1
  25. package/.next/server/app/api/assistant/session/route_client-reference-manifest.js +1 -1
  26. package/.next/server/app/api/assistant/start/route.js +18 -18
  27. package/.next/server/app/api/assistant/start/route.js.nft.json +1 -1
  28. package/.next/server/app/api/assistant/start/route_client-reference-manifest.js +1 -1
  29. package/.next/server/app/api/assistant/terminal/route.js +19 -19
  30. package/.next/server/app/api/assistant/terminal/route.js.nft.json +1 -1
  31. package/.next/server/app/api/assistant/terminal/route_client-reference-manifest.js +1 -1
  32. package/.next/server/app/api/assistant/tools/route.js +1 -1
  33. package/.next/server/app/api/assistant/tools/route.js.nft.json +1 -1
  34. package/.next/server/app/api/assistant/tools/route_client-reference-manifest.js +1 -1
  35. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  37. package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  38. package/.next/server/app/api/capabilities/route.js +1 -1
  39. package/.next/server/app/api/capabilities/route_client-reference-manifest.js +1 -1
  40. package/.next/server/app/api/daily-summary/route.js +1 -1
  41. package/.next/server/app/api/daily-summary/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/daily-summary/status/route_client-reference-manifest.js +1 -1
  43. package/.next/server/app/api/external-apps/[id]/health/route_client-reference-manifest.js +1 -1
  44. package/.next/server/app/api/external-apps/[id]/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/external-apps/route_client-reference-manifest.js +1 -1
  46. package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
  47. package/.next/server/app/api/fs/recent-paths/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/hooks/agent-event/route.js +1 -1
  49. package/.next/server/app/api/hooks/agent-event/route.js.nft.json +1 -1
  50. package/.next/server/app/api/hooks/agent-event/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/hooks/claude-done/route.js +2 -2
  52. package/.next/server/app/api/hooks/claude-done/route.js.nft.json +1 -1
  53. package/.next/server/app/api/hooks/claude-done/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/hooks/permission-request/route.js +1 -1
  55. package/.next/server/app/api/hooks/permission-request/route.js.nft.json +1 -1
  56. package/.next/server/app/api/hooks/permission-request/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/metrics/vibe/route_client-reference-manifest.js +1 -1
  58. package/.next/server/app/api/ollama/models/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/push/escalation/route.js +1 -1
  60. package/.next/server/app/api/push/escalation/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/push/subscriptions/route_client-reference-manifest.js +1 -1
  62. package/.next/server/app/api/push/vapid/route.js +1 -1
  63. package/.next/server/app/api/push/vapid/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  65. package/.next/server/app/api/repositories/[id]/route_client-reference-manifest.js +1 -1
  66. package/.next/server/app/api/repositories/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/repositories/[id]/todos/route_client-reference-manifest.js +1 -1
  68. package/.next/server/app/api/repositories/clone/[jobId]/route.js +1 -1
  69. package/.next/server/app/api/repositories/clone/[jobId]/route.js.nft.json +1 -1
  70. package/.next/server/app/api/repositories/clone/[jobId]/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/repositories/clone/route.js +1 -1
  72. package/.next/server/app/api/repositories/clone/route.js.nft.json +1 -1
  73. package/.next/server/app/api/repositories/clone/route_client-reference-manifest.js +1 -1
  74. package/.next/server/app/api/repositories/excluded/route_client-reference-manifest.js +1 -1
  75. package/.next/server/app/api/repositories/restore/route.js +1 -1
  76. package/.next/server/app/api/repositories/restore/route.js.nft.json +1 -1
  77. package/.next/server/app/api/repositories/restore/route_client-reference-manifest.js +1 -1
  78. package/.next/server/app/api/repositories/route.js +1 -1
  79. package/.next/server/app/api/repositories/route.js.nft.json +1 -1
  80. package/.next/server/app/api/repositories/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/repositories/scan/route.js +1 -1
  82. package/.next/server/app/api/repositories/scan/route.js.nft.json +1 -1
  83. package/.next/server/app/api/repositories/scan/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/repositories/sync/route.js +1 -1
  85. package/.next/server/app/api/repositories/sync/route.js.nft.json +1 -1
  86. package/.next/server/app/api/repositories/sync/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/repositories/validate-path/route_client-reference-manifest.js +1 -1
  88. package/.next/server/app/api/settings/default-agents/route.js +1 -1
  89. package/.next/server/app/api/settings/default-agents/route.js.nft.json +1 -1
  90. package/.next/server/app/api/settings/default-agents/route_client-reference-manifest.js +1 -1
  91. package/.next/server/app/api/settings/default-surface-mode/route.js +1 -0
  92. package/.next/server/app/api/settings/default-surface-mode/route.js.nft.json +1 -0
  93. package/.next/server/app/api/settings/default-surface-mode/route_client-reference-manifest.js +1 -0
  94. package/.next/server/app/api/sidebar/group-order/route_client-reference-manifest.js +1 -1
  95. package/.next/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  96. package/.next/server/app/api/skills/installations/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/skills/operations/route_client-reference-manifest.js +1 -1
  98. package/.next/server/app/api/skills/reindex/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  100. package/.next/server/app/api/slash-commands/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/tasks/[taskId]/cancel/route_client-reference-manifest.js +1 -1
  102. package/.next/server/app/api/tasks/[taskId]/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/templates/[id]/route_client-reference-manifest.js +1 -1
  104. package/.next/server/app/api/templates/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/todos/route_client-reference-manifest.js +1 -1
  106. package/.next/server/app/api/verification/runs/[runId]/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/verification/runs/route_client-reference-manifest.js +1 -1
  108. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js +1 -1
  109. package/.next/server/app/api/worktrees/[id]/auto-yes/route.js.nft.json +1 -1
  110. package/.next/server/app/api/worktrees/[id]/auto-yes/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/worktrees/[id]/capture/route.js +1 -1
  112. package/.next/server/app/api/worktrees/[id]/capture/route.js.nft.json +1 -1
  113. package/.next/server/app/api/worktrees/[id]/capture/route_client-reference-manifest.js +1 -1
  114. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js +1 -1
  115. package/.next/server/app/api/worktrees/[id]/clear-composer/route.js.nft.json +1 -1
  116. package/.next/server/app/api/worktrees/[id]/clear-composer/route_client-reference-manifest.js +1 -1
  117. package/.next/server/app/api/worktrees/[id]/cli-reference/route.js +1 -0
  118. package/.next/server/app/api/worktrees/[id]/cli-reference/route.js.nft.json +1 -0
  119. package/.next/server/app/api/worktrees/[id]/{start-polling → cli-reference}/route_client-reference-manifest.js +1 -1
  120. package/.next/server/app/api/worktrees/[id]/cli-tool/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/worktrees/[id]/cmate/schedules/route_client-reference-manifest.js +1 -1
  122. package/.next/server/app/api/worktrees/[id]/current-output/route.js +1 -1
  123. package/.next/server/app/api/worktrees/[id]/current-output/route.js.nft.json +1 -1
  124. package/.next/server/app/api/worktrees/[id]/current-output/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/worktrees/[id]/env/route_client-reference-manifest.js +1 -1
  126. package/.next/server/app/api/worktrees/[id]/execution-logs/[logId]/route_client-reference-manifest.js +1 -1
  127. package/.next/server/app/api/worktrees/[id]/execution-logs/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/worktrees/[id]/files/[...path]/route_client-reference-manifest.js +1 -1
  129. package/.next/server/app/api/worktrees/[id]/git/branch/create/route_client-reference-manifest.js +1 -1
  130. package/.next/server/app/api/worktrees/[id]/git/branch/delete/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/worktrees/[id]/git/branches/route_client-reference-manifest.js +1 -1
  132. package/.next/server/app/api/worktrees/[id]/git/checkout/route_client-reference-manifest.js +1 -1
  133. package/.next/server/app/api/worktrees/[id]/git/commit/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/worktrees/[id]/git/diff/route_client-reference-manifest.js +1 -1
  135. package/.next/server/app/api/worktrees/[id]/git/fetch/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/worktrees/[id]/git/log/route_client-reference-manifest.js +1 -1
  137. package/.next/server/app/api/worktrees/[id]/git/pull/route_client-reference-manifest.js +1 -1
  138. package/.next/server/app/api/worktrees/[id]/git/push/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/worktrees/[id]/git/reset/route_client-reference-manifest.js +1 -1
  140. package/.next/server/app/api/worktrees/[id]/git/revert/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/worktrees/[id]/git/show/[commitHash]/route_client-reference-manifest.js +1 -1
  142. package/.next/server/app/api/worktrees/[id]/git/stage/route_client-reference-manifest.js +1 -1
  143. package/.next/server/app/api/worktrees/[id]/git/staged/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/worktrees/[id]/git/stash/[index]/route_client-reference-manifest.js +1 -1
  145. package/.next/server/app/api/worktrees/[id]/git/stash/apply/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/worktrees/[id]/git/stash/pop/route_client-reference-manifest.js +1 -1
  147. package/.next/server/app/api/worktrees/[id]/git/stash/push/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/worktrees/[id]/git/stash/route_client-reference-manifest.js +1 -1
  149. package/.next/server/app/api/worktrees/[id]/git/status/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/api/worktrees/[id]/git/unstage/route_client-reference-manifest.js +1 -1
  151. package/.next/server/app/api/worktrees/[id]/git/working-diff/route_client-reference-manifest.js +1 -1
  152. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js +1 -1
  153. package/.next/server/app/api/worktrees/[id]/instances/opencode/route.js.nft.json +1 -1
  154. package/.next/server/app/api/worktrees/[id]/instances/opencode/route_client-reference-manifest.js +1 -1
  155. package/.next/server/app/api/worktrees/[id]/interrupt/route.js +1 -1
  156. package/.next/server/app/api/worktrees/[id]/interrupt/route.js.nft.json +1 -1
  157. package/.next/server/app/api/worktrees/[id]/interrupt/route_client-reference-manifest.js +1 -1
  158. package/.next/server/app/api/worktrees/[id]/kill-session/route.js +1 -1
  159. package/.next/server/app/api/worktrees/[id]/kill-session/route.js.nft.json +1 -1
  160. package/.next/server/app/api/worktrees/[id]/kill-session/route_client-reference-manifest.js +1 -1
  161. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route_client-reference-manifest.js +1 -1
  162. package/.next/server/app/api/worktrees/[id]/logs/route_client-reference-manifest.js +1 -1
  163. package/.next/server/app/api/worktrees/[id]/marp-render/route_client-reference-manifest.js +1 -1
  164. package/.next/server/app/api/worktrees/[id]/memos/[memoId]/route_client-reference-manifest.js +1 -1
  165. package/.next/server/app/api/worktrees/[id]/memos/route_client-reference-manifest.js +1 -1
  166. package/.next/server/app/api/worktrees/[id]/messages/route_client-reference-manifest.js +1 -1
  167. package/.next/server/app/api/worktrees/[id]/opencode/diff/route_client-reference-manifest.js +1 -1
  168. package/.next/server/app/api/worktrees/[id]/opencode/session/route.js +1 -1
  169. package/.next/server/app/api/worktrees/[id]/opencode/session/route_client-reference-manifest.js +1 -1
  170. package/.next/server/app/api/worktrees/[id]/opencode/share/route.js +1 -1
  171. package/.next/server/app/api/worktrees/[id]/opencode/share/route_client-reference-manifest.js +1 -1
  172. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js +1 -1
  173. package/.next/server/app/api/worktrees/[id]/prompt-response/route.js.nft.json +1 -1
  174. package/.next/server/app/api/worktrees/[id]/prompt-response/route_client-reference-manifest.js +1 -1
  175. package/.next/server/app/api/worktrees/[id]/resolve-target/route.js +1 -1
  176. package/.next/server/app/api/worktrees/[id]/resolve-target/route_client-reference-manifest.js +1 -1
  177. package/.next/server/app/api/worktrees/[id]/respond/route.js +1 -1
  178. package/.next/server/app/api/worktrees/[id]/respond/route.js.nft.json +1 -1
  179. package/.next/server/app/api/worktrees/[id]/respond/route_client-reference-manifest.js +1 -1
  180. package/.next/server/app/api/worktrees/[id]/route.js +1 -1
  181. package/.next/server/app/api/worktrees/[id]/route.js.nft.json +1 -1
  182. package/.next/server/app/api/worktrees/[id]/route_client-reference-manifest.js +1 -1
  183. package/.next/server/app/api/worktrees/[id]/schedules/[scheduleId]/route_client-reference-manifest.js +1 -1
  184. package/.next/server/app/api/worktrees/[id]/schedules/active/route_client-reference-manifest.js +1 -1
  185. package/.next/server/app/api/worktrees/[id]/schedules/route_client-reference-manifest.js +1 -1
  186. package/.next/server/app/api/worktrees/[id]/search/route_client-reference-manifest.js +1 -1
  187. package/.next/server/app/api/worktrees/[id]/send/route.js +1 -1
  188. package/.next/server/app/api/worktrees/[id]/send/route.js.nft.json +1 -1
  189. package/.next/server/app/api/worktrees/[id]/send/route_client-reference-manifest.js +1 -1
  190. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js +1 -1
  191. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route.js.nft.json +1 -1
  192. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route_client-reference-manifest.js +1 -1
  193. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/install/route_client-reference-manifest.js +1 -1
  194. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/plan/route_client-reference-manifest.js +1 -1
  195. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall/route_client-reference-manifest.js +1 -1
  196. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route_client-reference-manifest.js +1 -1
  197. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update/route_client-reference-manifest.js +1 -1
  198. package/.next/server/app/api/worktrees/[id]/skills/[skillId]/update-plan/route_client-reference-manifest.js +1 -1
  199. package/.next/server/app/api/worktrees/[id]/skills/route_client-reference-manifest.js +1 -1
  200. package/.next/server/app/api/worktrees/[id]/slash-commands/route_client-reference-manifest.js +1 -1
  201. package/.next/server/app/api/worktrees/[id]/special-keys/route.js +1 -1
  202. package/.next/server/app/api/worktrees/[id]/special-keys/route.js.nft.json +1 -1
  203. package/.next/server/app/api/worktrees/[id]/special-keys/route_client-reference-manifest.js +1 -1
  204. package/.next/server/app/api/worktrees/[id]/tasks/route_client-reference-manifest.js +1 -1
  205. package/.next/server/app/api/worktrees/[id]/terminal/route.js +1 -1
  206. package/.next/server/app/api/worktrees/[id]/terminal/route.js.nft.json +1 -1
  207. package/.next/server/app/api/worktrees/[id]/terminal/route_client-reference-manifest.js +1 -1
  208. package/.next/server/app/api/worktrees/[id]/timers/history/route_client-reference-manifest.js +1 -1
  209. package/.next/server/app/api/worktrees/[id]/timers/route.js +1 -1
  210. package/.next/server/app/api/worktrees/[id]/timers/route.js.nft.json +1 -1
  211. package/.next/server/app/api/worktrees/[id]/timers/route_client-reference-manifest.js +1 -1
  212. package/.next/server/app/api/worktrees/[id]/todos/[todoId]/route_client-reference-manifest.js +1 -1
  213. package/.next/server/app/api/worktrees/[id]/todos/route_client-reference-manifest.js +1 -1
  214. package/.next/server/app/api/worktrees/[id]/tree/[...path]/route_client-reference-manifest.js +1 -1
  215. package/.next/server/app/api/worktrees/[id]/tree/route_client-reference-manifest.js +1 -1
  216. package/.next/server/app/api/worktrees/[id]/upload/[...path]/route_client-reference-manifest.js +1 -1
  217. package/.next/server/app/api/worktrees/[id]/verify/config/route_client-reference-manifest.js +1 -1
  218. package/.next/server/app/api/worktrees/[id]/verify/route_client-reference-manifest.js +1 -1
  219. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route_client-reference-manifest.js +1 -1
  220. package/.next/server/app/api/worktrees/[id]/verify/runs/[runId]/route_client-reference-manifest.js +1 -1
  221. package/.next/server/app/api/worktrees/[id]/verify/runs/route_client-reference-manifest.js +1 -1
  222. package/.next/server/app/api/worktrees/[id]/viewed/route_client-reference-manifest.js +1 -1
  223. package/.next/server/app/api/worktrees/apply-default-agents/route.js +1 -1
  224. package/.next/server/app/api/worktrees/apply-default-agents/route_client-reference-manifest.js +1 -1
  225. package/.next/server/app/api/worktrees/route.js +1 -1
  226. package/.next/server/app/api/worktrees/route.js.nft.json +1 -1
  227. package/.next/server/app/api/worktrees/route_client-reference-manifest.js +1 -1
  228. package/.next/server/app/chat/page_client-reference-manifest.js +1 -1
  229. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  230. package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  231. package/.next/server/app/more/page.js +2 -2
  232. package/.next/server/app/more/page.js.nft.json +1 -1
  233. package/.next/server/app/more/page_client-reference-manifest.js +1 -1
  234. package/.next/server/app/offline/page_client-reference-manifest.js +1 -1
  235. package/.next/server/app/page_client-reference-manifest.js +1 -1
  236. package/.next/server/app/proxy/[...path]/route_client-reference-manifest.js +1 -1
  237. package/.next/server/app/repositories/page_client-reference-manifest.js +1 -1
  238. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  239. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -1
  240. package/.next/server/app/skills/[skillId]/page_client-reference-manifest.js +1 -1
  241. package/.next/server/app/skills/installed/page_client-reference-manifest.js +1 -1
  242. package/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  243. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  244. package/.next/server/app/worktrees/[id]/page.js +12 -12
  245. package/.next/server/app/worktrees/[id]/page.js.nft.json +1 -1
  246. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  247. package/.next/server/app/worktrees/[id]/terminal/page.js +3 -3
  248. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  249. package/.next/server/app-paths-manifest.json +35 -34
  250. package/.next/server/chunks/1058.js +1 -1
  251. package/.next/server/chunks/1068.js +1 -1
  252. package/.next/server/chunks/1191.js +1 -1
  253. package/.next/server/chunks/1341.js +1 -1
  254. package/.next/server/chunks/1886.js +3 -3
  255. package/.next/server/chunks/2119.js +1 -1
  256. package/.next/server/chunks/2445.js +1 -1
  257. package/.next/server/chunks/261.js +1 -0
  258. package/.next/server/chunks/2739.js +1 -0
  259. package/.next/server/chunks/2816.js +1 -1
  260. package/.next/server/chunks/2827.js +29 -0
  261. package/.next/server/chunks/3123.js +1 -0
  262. package/.next/server/chunks/3241.js +1 -1
  263. package/.next/server/chunks/3543.js +1 -1
  264. package/.next/server/chunks/3945.js +1 -1
  265. package/.next/server/chunks/4325.js +1 -0
  266. package/.next/server/chunks/4390.js +1 -1
  267. package/.next/server/chunks/4393.js +1 -1
  268. package/.next/server/chunks/4443.js +6 -0
  269. package/.next/server/chunks/5017.js +1 -1
  270. package/.next/server/chunks/5120.js +1 -0
  271. package/.next/server/chunks/6130.js +1 -1
  272. package/.next/server/chunks/6337.js +1 -1
  273. package/.next/server/chunks/663.js +1 -1
  274. package/.next/server/chunks/6894.js +8 -0
  275. package/.next/server/chunks/7685.js +1 -1
  276. package/.next/server/chunks/7836.js +1 -0
  277. package/.next/server/chunks/8356.js +1 -1
  278. package/.next/server/chunks/880.js +1 -1
  279. package/.next/server/chunks/8807.js +1 -1
  280. package/.next/server/chunks/9123.js +2 -2
  281. package/.next/server/chunks/9130.js +3 -3
  282. package/.next/server/chunks/9627.js +48 -26
  283. package/.next/server/chunks/9696.js +3 -0
  284. package/.next/server/chunks/9798.js +1 -1
  285. package/.next/server/middleware-manifest.json +5 -5
  286. package/.next/server/pages/500.html +1 -1
  287. package/.next/server/server-reference-manifest.json +1 -1
  288. package/.next/server/src/middleware.js +1 -1
  289. package/.next/server/src/middleware.js.map +1 -1
  290. package/.next/static/7K0XXFu_ty4wRSkl4X21E/_buildManifest.js +1 -0
  291. package/.next/static/chunks/{4882-388e94fe0a03c2ba.js → 3916-0e929d089282dc5d.js} +1 -1
  292. package/.next/static/chunks/{5229-b2a81bb8fb5c19e9.js → 5229-6c89475b61bd2c8b.js} +1 -1
  293. package/.next/static/chunks/6022-7a7d1760fc9814c7.js +1 -0
  294. package/.next/static/chunks/6381-28d0e95620aa018e.js +1 -0
  295. package/.next/static/chunks/app/api/agents/update/route-ee11f7b8a34cba8c.js +1 -0
  296. package/.next/static/chunks/app/api/agents/versions/route-ee11f7b8a34cba8c.js +1 -0
  297. package/.next/static/chunks/app/api/app/update/route-ee11f7b8a34cba8c.js +1 -0
  298. package/.next/static/chunks/app/api/app/update-check/route-ee11f7b8a34cba8c.js +1 -0
  299. package/.next/static/chunks/app/api/assistant/conversation/route-ee11f7b8a34cba8c.js +1 -0
  300. package/.next/static/chunks/app/api/assistant/current-output/route-ee11f7b8a34cba8c.js +1 -0
  301. package/.next/static/chunks/app/api/assistant/messages/route-ee11f7b8a34cba8c.js +1 -0
  302. package/.next/static/chunks/app/api/assistant/session/route-ee11f7b8a34cba8c.js +1 -0
  303. package/.next/static/chunks/app/api/assistant/start/route-ee11f7b8a34cba8c.js +1 -0
  304. package/.next/static/chunks/app/api/assistant/terminal/route-ee11f7b8a34cba8c.js +1 -0
  305. package/.next/static/chunks/app/api/assistant/tools/route-ee11f7b8a34cba8c.js +1 -0
  306. package/.next/static/chunks/app/api/auth/login/route-ee11f7b8a34cba8c.js +1 -0
  307. package/.next/static/chunks/app/api/auth/logout/route-ee11f7b8a34cba8c.js +1 -0
  308. package/.next/static/chunks/app/api/auth/status/route-ee11f7b8a34cba8c.js +1 -0
  309. package/.next/static/chunks/app/api/capabilities/route-ee11f7b8a34cba8c.js +1 -0
  310. package/.next/static/chunks/app/api/daily-summary/route-ee11f7b8a34cba8c.js +1 -0
  311. package/.next/static/chunks/app/api/daily-summary/status/route-ee11f7b8a34cba8c.js +1 -0
  312. package/.next/static/chunks/app/api/external-apps/[id]/health/route-ee11f7b8a34cba8c.js +1 -0
  313. package/.next/static/chunks/app/api/external-apps/[id]/route-ee11f7b8a34cba8c.js +1 -0
  314. package/.next/static/chunks/app/api/external-apps/route-ee11f7b8a34cba8c.js +1 -0
  315. package/.next/static/chunks/app/api/fs/browse/route-ee11f7b8a34cba8c.js +1 -0
  316. package/.next/static/chunks/app/api/fs/recent-paths/route-ee11f7b8a34cba8c.js +1 -0
  317. package/.next/static/chunks/app/api/hooks/agent-event/route-ee11f7b8a34cba8c.js +1 -0
  318. package/.next/static/chunks/app/api/hooks/claude-done/route-ee11f7b8a34cba8c.js +1 -0
  319. package/.next/static/chunks/app/api/hooks/permission-request/route-ee11f7b8a34cba8c.js +1 -0
  320. package/.next/static/chunks/app/api/metrics/vibe/route-ee11f7b8a34cba8c.js +1 -0
  321. package/.next/static/chunks/app/api/ollama/models/route-ee11f7b8a34cba8c.js +1 -0
  322. package/.next/static/chunks/app/api/push/escalation/route-ee11f7b8a34cba8c.js +1 -0
  323. package/.next/static/chunks/app/api/push/subscriptions/route-ee11f7b8a34cba8c.js +1 -0
  324. package/.next/static/chunks/app/api/push/vapid/route-ee11f7b8a34cba8c.js +1 -0
  325. package/.next/static/chunks/app/api/remote/pair/route-ee11f7b8a34cba8c.js +1 -0
  326. package/.next/static/chunks/app/api/repositories/[id]/route-ee11f7b8a34cba8c.js +1 -0
  327. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-ee11f7b8a34cba8c.js +1 -0
  328. package/.next/static/chunks/app/api/repositories/[id]/todos/route-ee11f7b8a34cba8c.js +1 -0
  329. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-ee11f7b8a34cba8c.js +1 -0
  330. package/.next/static/chunks/app/api/repositories/clone/route-ee11f7b8a34cba8c.js +1 -0
  331. package/.next/static/chunks/app/api/repositories/excluded/route-ee11f7b8a34cba8c.js +1 -0
  332. package/.next/static/chunks/app/api/repositories/restore/route-ee11f7b8a34cba8c.js +1 -0
  333. package/.next/static/chunks/app/api/repositories/route-ee11f7b8a34cba8c.js +1 -0
  334. package/.next/static/chunks/app/api/repositories/scan/route-ee11f7b8a34cba8c.js +1 -0
  335. package/.next/static/chunks/app/api/repositories/sync/route-ee11f7b8a34cba8c.js +1 -0
  336. package/.next/static/chunks/app/api/repositories/validate-path/route-ee11f7b8a34cba8c.js +1 -0
  337. package/.next/static/chunks/app/api/settings/default-agents/route-ee11f7b8a34cba8c.js +1 -0
  338. package/.next/static/chunks/app/api/settings/default-surface-mode/route-ee11f7b8a34cba8c.js +1 -0
  339. package/.next/static/chunks/app/api/sidebar/group-order/route-ee11f7b8a34cba8c.js +1 -0
  340. package/.next/static/chunks/app/api/skills/[id]/route-ee11f7b8a34cba8c.js +1 -0
  341. package/.next/static/chunks/app/api/skills/installations/route-ee11f7b8a34cba8c.js +1 -0
  342. package/.next/static/chunks/app/api/skills/operations/route-ee11f7b8a34cba8c.js +1 -0
  343. package/.next/static/chunks/app/api/skills/reindex/route-ee11f7b8a34cba8c.js +1 -0
  344. package/.next/static/chunks/app/api/skills/route-ee11f7b8a34cba8c.js +1 -0
  345. package/.next/static/chunks/app/api/slash-commands/route-ee11f7b8a34cba8c.js +1 -0
  346. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-ee11f7b8a34cba8c.js +1 -0
  347. package/.next/static/chunks/app/api/tasks/[taskId]/route-ee11f7b8a34cba8c.js +1 -0
  348. package/.next/static/chunks/app/api/templates/[id]/route-ee11f7b8a34cba8c.js +1 -0
  349. package/.next/static/chunks/app/api/templates/route-ee11f7b8a34cba8c.js +1 -0
  350. package/.next/static/chunks/app/api/todos/route-ee11f7b8a34cba8c.js +1 -0
  351. package/.next/static/chunks/app/api/verification/runs/[runId]/route-ee11f7b8a34cba8c.js +1 -0
  352. package/.next/static/chunks/app/api/verification/runs/route-ee11f7b8a34cba8c.js +1 -0
  353. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-ee11f7b8a34cba8c.js +1 -0
  354. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-ee11f7b8a34cba8c.js +1 -0
  355. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-ee11f7b8a34cba8c.js +1 -0
  356. package/.next/static/chunks/app/api/worktrees/[id]/cli-reference/route-ee11f7b8a34cba8c.js +1 -0
  357. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-ee11f7b8a34cba8c.js +1 -0
  358. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-ee11f7b8a34cba8c.js +1 -0
  359. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-ee11f7b8a34cba8c.js +1 -0
  360. package/.next/static/chunks/app/api/worktrees/[id]/env/route-ee11f7b8a34cba8c.js +1 -0
  361. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-ee11f7b8a34cba8c.js +1 -0
  362. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-ee11f7b8a34cba8c.js +1 -0
  363. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-ee11f7b8a34cba8c.js +1 -0
  364. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-ee11f7b8a34cba8c.js +1 -0
  365. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-ee11f7b8a34cba8c.js +1 -0
  366. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-ee11f7b8a34cba8c.js +1 -0
  367. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-ee11f7b8a34cba8c.js +1 -0
  368. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-ee11f7b8a34cba8c.js +1 -0
  369. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-ee11f7b8a34cba8c.js +1 -0
  370. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-ee11f7b8a34cba8c.js +1 -0
  371. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-ee11f7b8a34cba8c.js +1 -0
  372. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-ee11f7b8a34cba8c.js +1 -0
  373. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-ee11f7b8a34cba8c.js +1 -0
  374. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-ee11f7b8a34cba8c.js +1 -0
  375. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-ee11f7b8a34cba8c.js +1 -0
  376. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-ee11f7b8a34cba8c.js +1 -0
  377. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-ee11f7b8a34cba8c.js +1 -0
  378. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-ee11f7b8a34cba8c.js +1 -0
  379. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-ee11f7b8a34cba8c.js +1 -0
  380. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-ee11f7b8a34cba8c.js +1 -0
  381. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-ee11f7b8a34cba8c.js +1 -0
  382. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-ee11f7b8a34cba8c.js +1 -0
  383. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-ee11f7b8a34cba8c.js +1 -0
  384. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-ee11f7b8a34cba8c.js +1 -0
  385. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-ee11f7b8a34cba8c.js +1 -0
  386. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-ee11f7b8a34cba8c.js +1 -0
  387. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-ee11f7b8a34cba8c.js +1 -0
  388. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-ee11f7b8a34cba8c.js +1 -0
  389. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-ee11f7b8a34cba8c.js +1 -0
  390. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-ee11f7b8a34cba8c.js +1 -0
  391. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-ee11f7b8a34cba8c.js +1 -0
  392. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-ee11f7b8a34cba8c.js +1 -0
  393. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-ee11f7b8a34cba8c.js +1 -0
  394. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-ee11f7b8a34cba8c.js +1 -0
  395. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-ee11f7b8a34cba8c.js +1 -0
  396. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-ee11f7b8a34cba8c.js +1 -0
  397. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-ee11f7b8a34cba8c.js +1 -0
  398. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-ee11f7b8a34cba8c.js +1 -0
  399. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-ee11f7b8a34cba8c.js +1 -0
  400. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-ee11f7b8a34cba8c.js +1 -0
  401. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-ee11f7b8a34cba8c.js +1 -0
  402. package/.next/static/chunks/app/api/worktrees/[id]/route-ee11f7b8a34cba8c.js +1 -0
  403. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-ee11f7b8a34cba8c.js +1 -0
  404. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-ee11f7b8a34cba8c.js +1 -0
  405. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-ee11f7b8a34cba8c.js +1 -0
  406. package/.next/static/chunks/app/api/worktrees/[id]/search/route-ee11f7b8a34cba8c.js +1 -0
  407. package/.next/static/chunks/app/api/worktrees/[id]/send/route-ee11f7b8a34cba8c.js +1 -0
  408. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-ee11f7b8a34cba8c.js +1 -0
  409. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-ee11f7b8a34cba8c.js +1 -0
  410. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-ee11f7b8a34cba8c.js +1 -0
  411. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-ee11f7b8a34cba8c.js +1 -0
  412. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-ee11f7b8a34cba8c.js +1 -0
  413. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-ee11f7b8a34cba8c.js +1 -0
  414. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-ee11f7b8a34cba8c.js +1 -0
  415. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-ee11f7b8a34cba8c.js +1 -0
  416. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-ee11f7b8a34cba8c.js +1 -0
  417. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-ee11f7b8a34cba8c.js +1 -0
  418. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-ee11f7b8a34cba8c.js +1 -0
  419. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-ee11f7b8a34cba8c.js +1 -0
  420. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-ee11f7b8a34cba8c.js +1 -0
  421. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-ee11f7b8a34cba8c.js +1 -0
  422. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-ee11f7b8a34cba8c.js +1 -0
  423. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-ee11f7b8a34cba8c.js +1 -0
  424. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-ee11f7b8a34cba8c.js +1 -0
  425. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-ee11f7b8a34cba8c.js +1 -0
  426. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-ee11f7b8a34cba8c.js +1 -0
  427. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-ee11f7b8a34cba8c.js +1 -0
  428. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-ee11f7b8a34cba8c.js +1 -0
  429. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-ee11f7b8a34cba8c.js +1 -0
  430. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-ee11f7b8a34cba8c.js +1 -0
  431. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-ee11f7b8a34cba8c.js +1 -0
  432. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-ee11f7b8a34cba8c.js +1 -0
  433. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-ee11f7b8a34cba8c.js +1 -0
  434. package/.next/static/chunks/app/api/worktrees/route-ee11f7b8a34cba8c.js +1 -0
  435. package/.next/static/chunks/app/manifest.webmanifest/route-ee11f7b8a34cba8c.js +1 -0
  436. package/.next/static/chunks/app/more/{page-75d3783da0d49a25.js → page-333bba1c8bbc9c11.js} +1 -1
  437. package/.next/static/chunks/app/proxy/[...path]/route-ee11f7b8a34cba8c.js +1 -0
  438. package/.next/static/chunks/app/worktrees/[id]/layout-ee11f7b8a34cba8c.js +1 -0
  439. package/.next/static/chunks/app/worktrees/[id]/page-d48b95ed554bcd13.js +1 -0
  440. package/.next/static/chunks/app/worktrees/[id]/terminal/page-2631bc5c4b0a9fb8.js +1 -0
  441. package/.next/static/css/61e10d4b1b11b193.css +1 -0
  442. package/.next/trace +13 -13
  443. package/.next/types/app/api/settings/default-surface-mode/route.ts +347 -0
  444. package/.next/types/app/api/worktrees/[id]/{start-polling → cli-reference}/route.ts +3 -3
  445. package/.next/types/routes.d.ts +3 -2
  446. package/.next/types/validator.ts +18 -9
  447. package/dist/server/server.js +58 -0
  448. package/dist/server/src/lib/claude-output.js +1 -0
  449. package/dist/server/src/lib/db/app-settings-db.js +60 -0
  450. package/dist/server/src/lib/db/chat-db.js +120 -7
  451. package/dist/server/src/lib/detection/status-detector.js +3 -2
  452. package/dist/server/src/lib/env.js +122 -0
  453. package/dist/server/src/lib/git/worktrees.js +154 -0
  454. package/dist/server/src/lib/history/transcript-tail.js +80 -0
  455. package/dist/server/src/lib/history/user-turn-recorder.js +247 -0
  456. package/dist/server/src/lib/hooks/permission-decision-service.js +85 -1
  457. package/dist/server/src/lib/hooks/sources/antigravity/history.js +519 -0
  458. package/dist/server/src/lib/hooks/sources/antigravity/source.js +7 -0
  459. package/dist/server/src/lib/hooks/sources/antigravity/transcript.js +407 -0
  460. package/dist/server/src/lib/hooks/sources/claude/history.js +654 -0
  461. package/dist/server/src/lib/hooks/sources/claude/source.js +4 -0
  462. package/dist/server/src/lib/hooks/sources/claude/transcript.js +518 -0
  463. package/dist/server/src/lib/hooks/sources/codex/history.js +576 -0
  464. package/dist/server/src/lib/hooks/sources/codex/source.js +4 -0
  465. package/dist/server/src/lib/hooks/sources/codex/transcript.js +448 -0
  466. package/dist/server/src/lib/hooks/sources/copilot/source.js +2 -0
  467. package/dist/server/src/lib/hooks/sources/gemini/source.js +2 -0
  468. package/dist/server/src/lib/hooks/sources/legacy-relay.js +3 -0
  469. package/dist/server/src/lib/hooks/sources/opencode/history.js +57 -0
  470. package/dist/server/src/lib/hooks/sources/opencode/source.js +4 -0
  471. package/dist/server/src/lib/hooks/sources/opencode/transcript.js +10 -28
  472. package/dist/server/src/lib/hooks/sources/turn-body.js +118 -0
  473. package/dist/server/src/lib/polling/prompt-dedup.js +2 -4
  474. package/dist/server/src/lib/polling/response-checker.js +44 -3
  475. package/dist/server/src/lib/polling/response-dedup.js +2 -4
  476. package/dist/server/src/lib/polling/response-poller-core.js +191 -29
  477. package/dist/server/src/lib/polling/structured-history-gate.js +147 -16
  478. package/dist/server/src/lib/push/push-sender.js +21 -1
  479. package/dist/server/src/lib/push/waiting-push-notifier.js +126 -8
  480. package/dist/server/src/lib/realtime/publisher-registry.js +171 -0
  481. package/dist/server/src/lib/realtime/terminal-broadcast.js +14 -1
  482. package/dist/server/src/lib/realtime/types.js +96 -1
  483. package/dist/server/src/lib/session/current-output-builder.js +263 -4
  484. package/dist/server/src/lib/session/send-user-message.js +90 -2
  485. package/dist/server/src/lib/tui-accumulator.js +2 -8
  486. package/dist/server/src/lib/ws-server.js +143 -6
  487. package/dist/server/src/types/agent-transcript.js +241 -5
  488. package/dist/server/src/types/ui-state.js +24 -1
  489. package/package.json +1 -1
  490. package/public/sw.js +15 -1
  491. package/.next/server/app/api/worktrees/[id]/start-polling/route.js +0 -1
  492. package/.next/server/app/api/worktrees/[id]/start-polling/route.js.nft.json +0 -1
  493. package/.next/server/chunks/1714.js +0 -7
  494. package/.next/server/chunks/2198.js +0 -1
  495. package/.next/server/chunks/221.js +0 -25
  496. package/.next/server/chunks/2759.js +0 -8
  497. package/.next/server/chunks/3558.js +0 -1
  498. package/.next/server/chunks/9508.js +0 -1
  499. package/.next/static/0YoRrahue4Vchxg1z83IQ/_buildManifest.js +0 -1
  500. package/.next/static/chunks/1379-af7af9e08f47c979.js +0 -1
  501. package/.next/static/chunks/6381-9ba5198c0a6ff197.js +0 -1
  502. package/.next/static/chunks/app/api/agents/update/route-1c30fb8d4d6fa6ef.js +0 -1
  503. package/.next/static/chunks/app/api/agents/versions/route-1c30fb8d4d6fa6ef.js +0 -1
  504. package/.next/static/chunks/app/api/app/update/route-1c30fb8d4d6fa6ef.js +0 -1
  505. package/.next/static/chunks/app/api/app/update-check/route-1c30fb8d4d6fa6ef.js +0 -1
  506. package/.next/static/chunks/app/api/assistant/conversation/route-1c30fb8d4d6fa6ef.js +0 -1
  507. package/.next/static/chunks/app/api/assistant/current-output/route-1c30fb8d4d6fa6ef.js +0 -1
  508. package/.next/static/chunks/app/api/assistant/messages/route-1c30fb8d4d6fa6ef.js +0 -1
  509. package/.next/static/chunks/app/api/assistant/session/route-1c30fb8d4d6fa6ef.js +0 -1
  510. package/.next/static/chunks/app/api/assistant/start/route-1c30fb8d4d6fa6ef.js +0 -1
  511. package/.next/static/chunks/app/api/assistant/terminal/route-1c30fb8d4d6fa6ef.js +0 -1
  512. package/.next/static/chunks/app/api/assistant/tools/route-1c30fb8d4d6fa6ef.js +0 -1
  513. package/.next/static/chunks/app/api/auth/login/route-1c30fb8d4d6fa6ef.js +0 -1
  514. package/.next/static/chunks/app/api/auth/logout/route-1c30fb8d4d6fa6ef.js +0 -1
  515. package/.next/static/chunks/app/api/auth/status/route-1c30fb8d4d6fa6ef.js +0 -1
  516. package/.next/static/chunks/app/api/capabilities/route-1c30fb8d4d6fa6ef.js +0 -1
  517. package/.next/static/chunks/app/api/daily-summary/route-1c30fb8d4d6fa6ef.js +0 -1
  518. package/.next/static/chunks/app/api/daily-summary/status/route-1c30fb8d4d6fa6ef.js +0 -1
  519. package/.next/static/chunks/app/api/external-apps/[id]/health/route-1c30fb8d4d6fa6ef.js +0 -1
  520. package/.next/static/chunks/app/api/external-apps/[id]/route-1c30fb8d4d6fa6ef.js +0 -1
  521. package/.next/static/chunks/app/api/external-apps/route-1c30fb8d4d6fa6ef.js +0 -1
  522. package/.next/static/chunks/app/api/fs/browse/route-1c30fb8d4d6fa6ef.js +0 -1
  523. package/.next/static/chunks/app/api/fs/recent-paths/route-1c30fb8d4d6fa6ef.js +0 -1
  524. package/.next/static/chunks/app/api/hooks/agent-event/route-1c30fb8d4d6fa6ef.js +0 -1
  525. package/.next/static/chunks/app/api/hooks/claude-done/route-1c30fb8d4d6fa6ef.js +0 -1
  526. package/.next/static/chunks/app/api/hooks/permission-request/route-1c30fb8d4d6fa6ef.js +0 -1
  527. package/.next/static/chunks/app/api/metrics/vibe/route-1c30fb8d4d6fa6ef.js +0 -1
  528. package/.next/static/chunks/app/api/ollama/models/route-1c30fb8d4d6fa6ef.js +0 -1
  529. package/.next/static/chunks/app/api/push/escalation/route-1c30fb8d4d6fa6ef.js +0 -1
  530. package/.next/static/chunks/app/api/push/subscriptions/route-1c30fb8d4d6fa6ef.js +0 -1
  531. package/.next/static/chunks/app/api/push/vapid/route-1c30fb8d4d6fa6ef.js +0 -1
  532. package/.next/static/chunks/app/api/remote/pair/route-1c30fb8d4d6fa6ef.js +0 -1
  533. package/.next/static/chunks/app/api/repositories/[id]/route-1c30fb8d4d6fa6ef.js +0 -1
  534. package/.next/static/chunks/app/api/repositories/[id]/todos/[todoId]/route-1c30fb8d4d6fa6ef.js +0 -1
  535. package/.next/static/chunks/app/api/repositories/[id]/todos/route-1c30fb8d4d6fa6ef.js +0 -1
  536. package/.next/static/chunks/app/api/repositories/clone/[jobId]/route-1c30fb8d4d6fa6ef.js +0 -1
  537. package/.next/static/chunks/app/api/repositories/clone/route-1c30fb8d4d6fa6ef.js +0 -1
  538. package/.next/static/chunks/app/api/repositories/excluded/route-1c30fb8d4d6fa6ef.js +0 -1
  539. package/.next/static/chunks/app/api/repositories/restore/route-1c30fb8d4d6fa6ef.js +0 -1
  540. package/.next/static/chunks/app/api/repositories/route-1c30fb8d4d6fa6ef.js +0 -1
  541. package/.next/static/chunks/app/api/repositories/scan/route-1c30fb8d4d6fa6ef.js +0 -1
  542. package/.next/static/chunks/app/api/repositories/sync/route-1c30fb8d4d6fa6ef.js +0 -1
  543. package/.next/static/chunks/app/api/repositories/validate-path/route-1c30fb8d4d6fa6ef.js +0 -1
  544. package/.next/static/chunks/app/api/settings/default-agents/route-1c30fb8d4d6fa6ef.js +0 -1
  545. package/.next/static/chunks/app/api/sidebar/group-order/route-1c30fb8d4d6fa6ef.js +0 -1
  546. package/.next/static/chunks/app/api/skills/[id]/route-1c30fb8d4d6fa6ef.js +0 -1
  547. package/.next/static/chunks/app/api/skills/installations/route-1c30fb8d4d6fa6ef.js +0 -1
  548. package/.next/static/chunks/app/api/skills/operations/route-1c30fb8d4d6fa6ef.js +0 -1
  549. package/.next/static/chunks/app/api/skills/reindex/route-1c30fb8d4d6fa6ef.js +0 -1
  550. package/.next/static/chunks/app/api/skills/route-1c30fb8d4d6fa6ef.js +0 -1
  551. package/.next/static/chunks/app/api/slash-commands/route-1c30fb8d4d6fa6ef.js +0 -1
  552. package/.next/static/chunks/app/api/tasks/[taskId]/cancel/route-1c30fb8d4d6fa6ef.js +0 -1
  553. package/.next/static/chunks/app/api/tasks/[taskId]/route-1c30fb8d4d6fa6ef.js +0 -1
  554. package/.next/static/chunks/app/api/templates/[id]/route-1c30fb8d4d6fa6ef.js +0 -1
  555. package/.next/static/chunks/app/api/templates/route-1c30fb8d4d6fa6ef.js +0 -1
  556. package/.next/static/chunks/app/api/todos/route-1c30fb8d4d6fa6ef.js +0 -1
  557. package/.next/static/chunks/app/api/verification/runs/[runId]/route-1c30fb8d4d6fa6ef.js +0 -1
  558. package/.next/static/chunks/app/api/verification/runs/route-1c30fb8d4d6fa6ef.js +0 -1
  559. package/.next/static/chunks/app/api/worktrees/[id]/auto-yes/route-1c30fb8d4d6fa6ef.js +0 -1
  560. package/.next/static/chunks/app/api/worktrees/[id]/capture/route-1c30fb8d4d6fa6ef.js +0 -1
  561. package/.next/static/chunks/app/api/worktrees/[id]/clear-composer/route-1c30fb8d4d6fa6ef.js +0 -1
  562. package/.next/static/chunks/app/api/worktrees/[id]/cli-tool/route-1c30fb8d4d6fa6ef.js +0 -1
  563. package/.next/static/chunks/app/api/worktrees/[id]/cmate/schedules/route-1c30fb8d4d6fa6ef.js +0 -1
  564. package/.next/static/chunks/app/api/worktrees/[id]/current-output/route-1c30fb8d4d6fa6ef.js +0 -1
  565. package/.next/static/chunks/app/api/worktrees/[id]/env/route-1c30fb8d4d6fa6ef.js +0 -1
  566. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/[logId]/route-1c30fb8d4d6fa6ef.js +0 -1
  567. package/.next/static/chunks/app/api/worktrees/[id]/execution-logs/route-1c30fb8d4d6fa6ef.js +0 -1
  568. package/.next/static/chunks/app/api/worktrees/[id]/files/[...path]/route-1c30fb8d4d6fa6ef.js +0 -1
  569. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/create/route-1c30fb8d4d6fa6ef.js +0 -1
  570. package/.next/static/chunks/app/api/worktrees/[id]/git/branch/delete/route-1c30fb8d4d6fa6ef.js +0 -1
  571. package/.next/static/chunks/app/api/worktrees/[id]/git/branches/route-1c30fb8d4d6fa6ef.js +0 -1
  572. package/.next/static/chunks/app/api/worktrees/[id]/git/checkout/route-1c30fb8d4d6fa6ef.js +0 -1
  573. package/.next/static/chunks/app/api/worktrees/[id]/git/commit/route-1c30fb8d4d6fa6ef.js +0 -1
  574. package/.next/static/chunks/app/api/worktrees/[id]/git/diff/route-1c30fb8d4d6fa6ef.js +0 -1
  575. package/.next/static/chunks/app/api/worktrees/[id]/git/fetch/route-1c30fb8d4d6fa6ef.js +0 -1
  576. package/.next/static/chunks/app/api/worktrees/[id]/git/log/route-1c30fb8d4d6fa6ef.js +0 -1
  577. package/.next/static/chunks/app/api/worktrees/[id]/git/pull/route-1c30fb8d4d6fa6ef.js +0 -1
  578. package/.next/static/chunks/app/api/worktrees/[id]/git/push/route-1c30fb8d4d6fa6ef.js +0 -1
  579. package/.next/static/chunks/app/api/worktrees/[id]/git/reset/route-1c30fb8d4d6fa6ef.js +0 -1
  580. package/.next/static/chunks/app/api/worktrees/[id]/git/revert/route-1c30fb8d4d6fa6ef.js +0 -1
  581. package/.next/static/chunks/app/api/worktrees/[id]/git/show/[commitHash]/route-1c30fb8d4d6fa6ef.js +0 -1
  582. package/.next/static/chunks/app/api/worktrees/[id]/git/stage/route-1c30fb8d4d6fa6ef.js +0 -1
  583. package/.next/static/chunks/app/api/worktrees/[id]/git/staged/route-1c30fb8d4d6fa6ef.js +0 -1
  584. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/[index]/route-1c30fb8d4d6fa6ef.js +0 -1
  585. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/apply/route-1c30fb8d4d6fa6ef.js +0 -1
  586. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/pop/route-1c30fb8d4d6fa6ef.js +0 -1
  587. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/push/route-1c30fb8d4d6fa6ef.js +0 -1
  588. package/.next/static/chunks/app/api/worktrees/[id]/git/stash/route-1c30fb8d4d6fa6ef.js +0 -1
  589. package/.next/static/chunks/app/api/worktrees/[id]/git/status/route-1c30fb8d4d6fa6ef.js +0 -1
  590. package/.next/static/chunks/app/api/worktrees/[id]/git/unstage/route-1c30fb8d4d6fa6ef.js +0 -1
  591. package/.next/static/chunks/app/api/worktrees/[id]/git/working-diff/route-1c30fb8d4d6fa6ef.js +0 -1
  592. package/.next/static/chunks/app/api/worktrees/[id]/instances/opencode/route-1c30fb8d4d6fa6ef.js +0 -1
  593. package/.next/static/chunks/app/api/worktrees/[id]/interrupt/route-1c30fb8d4d6fa6ef.js +0 -1
  594. package/.next/static/chunks/app/api/worktrees/[id]/kill-session/route-1c30fb8d4d6fa6ef.js +0 -1
  595. package/.next/static/chunks/app/api/worktrees/[id]/logs/[filename]/route-1c30fb8d4d6fa6ef.js +0 -1
  596. package/.next/static/chunks/app/api/worktrees/[id]/logs/route-1c30fb8d4d6fa6ef.js +0 -1
  597. package/.next/static/chunks/app/api/worktrees/[id]/marp-render/route-1c30fb8d4d6fa6ef.js +0 -1
  598. package/.next/static/chunks/app/api/worktrees/[id]/memos/[memoId]/route-1c30fb8d4d6fa6ef.js +0 -1
  599. package/.next/static/chunks/app/api/worktrees/[id]/memos/route-1c30fb8d4d6fa6ef.js +0 -1
  600. package/.next/static/chunks/app/api/worktrees/[id]/messages/route-1c30fb8d4d6fa6ef.js +0 -1
  601. package/.next/static/chunks/app/api/worktrees/[id]/opencode/diff/route-1c30fb8d4d6fa6ef.js +0 -1
  602. package/.next/static/chunks/app/api/worktrees/[id]/opencode/session/route-1c30fb8d4d6fa6ef.js +0 -1
  603. package/.next/static/chunks/app/api/worktrees/[id]/opencode/share/route-1c30fb8d4d6fa6ef.js +0 -1
  604. package/.next/static/chunks/app/api/worktrees/[id]/prompt-response/route-1c30fb8d4d6fa6ef.js +0 -1
  605. package/.next/static/chunks/app/api/worktrees/[id]/resolve-target/route-1c30fb8d4d6fa6ef.js +0 -1
  606. package/.next/static/chunks/app/api/worktrees/[id]/respond/route-1c30fb8d4d6fa6ef.js +0 -1
  607. package/.next/static/chunks/app/api/worktrees/[id]/route-1c30fb8d4d6fa6ef.js +0 -1
  608. package/.next/static/chunks/app/api/worktrees/[id]/schedules/[scheduleId]/route-1c30fb8d4d6fa6ef.js +0 -1
  609. package/.next/static/chunks/app/api/worktrees/[id]/schedules/active/route-1c30fb8d4d6fa6ef.js +0 -1
  610. package/.next/static/chunks/app/api/worktrees/[id]/schedules/route-1c30fb8d4d6fa6ef.js +0 -1
  611. package/.next/static/chunks/app/api/worktrees/[id]/search/route-1c30fb8d4d6fa6ef.js +0 -1
  612. package/.next/static/chunks/app/api/worktrees/[id]/send/route-1c30fb8d4d6fa6ef.js +0 -1
  613. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/git-workflow/route-1c30fb8d4d6fa6ef.js +0 -1
  614. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/install/route-1c30fb8d4d6fa6ef.js +0 -1
  615. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/plan/route-1c30fb8d4d6fa6ef.js +0 -1
  616. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall/route-1c30fb8d4d6fa6ef.js +0 -1
  617. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/uninstall-plan/route-1c30fb8d4d6fa6ef.js +0 -1
  618. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update/route-1c30fb8d4d6fa6ef.js +0 -1
  619. package/.next/static/chunks/app/api/worktrees/[id]/skills/[skillId]/update-plan/route-1c30fb8d4d6fa6ef.js +0 -1
  620. package/.next/static/chunks/app/api/worktrees/[id]/skills/route-1c30fb8d4d6fa6ef.js +0 -1
  621. package/.next/static/chunks/app/api/worktrees/[id]/slash-commands/route-1c30fb8d4d6fa6ef.js +0 -1
  622. package/.next/static/chunks/app/api/worktrees/[id]/special-keys/route-1c30fb8d4d6fa6ef.js +0 -1
  623. package/.next/static/chunks/app/api/worktrees/[id]/start-polling/route-1c30fb8d4d6fa6ef.js +0 -1
  624. package/.next/static/chunks/app/api/worktrees/[id]/tasks/route-1c30fb8d4d6fa6ef.js +0 -1
  625. package/.next/static/chunks/app/api/worktrees/[id]/terminal/route-1c30fb8d4d6fa6ef.js +0 -1
  626. package/.next/static/chunks/app/api/worktrees/[id]/timers/history/route-1c30fb8d4d6fa6ef.js +0 -1
  627. package/.next/static/chunks/app/api/worktrees/[id]/timers/route-1c30fb8d4d6fa6ef.js +0 -1
  628. package/.next/static/chunks/app/api/worktrees/[id]/todos/[todoId]/route-1c30fb8d4d6fa6ef.js +0 -1
  629. package/.next/static/chunks/app/api/worktrees/[id]/todos/route-1c30fb8d4d6fa6ef.js +0 -1
  630. package/.next/static/chunks/app/api/worktrees/[id]/tree/[...path]/route-1c30fb8d4d6fa6ef.js +0 -1
  631. package/.next/static/chunks/app/api/worktrees/[id]/tree/route-1c30fb8d4d6fa6ef.js +0 -1
  632. package/.next/static/chunks/app/api/worktrees/[id]/upload/[...path]/route-1c30fb8d4d6fa6ef.js +0 -1
  633. package/.next/static/chunks/app/api/worktrees/[id]/verify/config/route-1c30fb8d4d6fa6ef.js +0 -1
  634. package/.next/static/chunks/app/api/worktrees/[id]/verify/route-1c30fb8d4d6fa6ef.js +0 -1
  635. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/cancel/route-1c30fb8d4d6fa6ef.js +0 -1
  636. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/[runId]/route-1c30fb8d4d6fa6ef.js +0 -1
  637. package/.next/static/chunks/app/api/worktrees/[id]/verify/runs/route-1c30fb8d4d6fa6ef.js +0 -1
  638. package/.next/static/chunks/app/api/worktrees/[id]/viewed/route-1c30fb8d4d6fa6ef.js +0 -1
  639. package/.next/static/chunks/app/api/worktrees/apply-default-agents/route-1c30fb8d4d6fa6ef.js +0 -1
  640. package/.next/static/chunks/app/api/worktrees/route-1c30fb8d4d6fa6ef.js +0 -1
  641. package/.next/static/chunks/app/manifest.webmanifest/route-1c30fb8d4d6fa6ef.js +0 -1
  642. package/.next/static/chunks/app/proxy/[...path]/route-1c30fb8d4d6fa6ef.js +0 -1
  643. package/.next/static/chunks/app/worktrees/[id]/layout-1c30fb8d4d6fa6ef.js +0 -1
  644. package/.next/static/chunks/app/worktrees/[id]/page-ce6279d581d1df95.js +0 -1
  645. package/.next/static/chunks/app/worktrees/[id]/terminal/page-00ad5d9a62a71cab.js +0 -1
  646. package/.next/static/css/b326c8a734e1928e.css +0 -1
  647. /package/.next/static/{0YoRrahue4Vchxg1z83IQ → 7K0XXFu_ty4wRSkl4X21E}/_ssgManifest.js +0 -0
@@ -0,0 +1,8 @@
1
+ exports.id=6894,exports.ids=[6894],exports.modules={3453:(a,b,c)=>{"use strict";c.d(b,{Rh:()=>r,T1:()=>o,Z2:()=>m,c$:()=>n,nu:()=>q});var d=c(72626),e=c(80438);let f=(0,d.h)("ip-restriction"),g="::ffff:",h=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,i=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\/(\d{1,2})$/,j=process.env.CM_ALLOWED_IPS?.trim()||"",k=process.env.CM_TRUST_PROXY?.trim()||"";""!==k&&"true"!==k&&"false"!==k&&(0,e.h)(f,"trust-proxy-unexpected",{value:k});let l="true"===k;function m(a){return a?a.toLowerCase().startsWith(g)?a.substring(g.length):a:""}function n(a,b){if(0===b.length)return!1;let c=function(a){let b=a.match(h);if(!b)return null;let c=[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),parseInt(b[4],10)];for(let a of c)if(a<0||a>255)return null;return(c[0]<<24|c[1]<<16|c[2]<<8|c[3])>>>0}(m(a));if(null===c)return!1;for(let a of b)if((c&a.mask)>>>0===a.network)return!0;return!1}function o(a){if(l){let b=a.get("x-forwarded-for");if(b){let a=b.split(",")[0].trim();if(a)return a}}return a.get("x-real-ip")||null}let p=j.length>0?function(a){let b=a.trim();if(0===b.length)return[];let c=b.split(",").map(a=>a.trim()).filter(a=>a.length>0);if(c.length>256)throw Error(`CM_ALLOWED_IPS: too many entries (${c.length}). Maximum is 256.`);let d=[];for(let a of c){if(a.length>18)throw Error(`CM_ALLOWED_IPS: entry "${a}" exceeds maximum length of 18 characters.`);let b=a.match(i);if(b){let c=[parseInt(b[1],10),parseInt(b[2],10),parseInt(b[3],10),parseInt(b[4],10)],e=parseInt(b[5],10);for(let b of c)if(b<0||b>255)throw Error(`CM_ALLOWED_IPS: invalid octet in "${a}". Octets must be 0-255.`);if(e<0||e>32)throw Error(`CM_ALLOWED_IPS: invalid prefix length in "${a}". Must be 0-32.`);let f=(c[0]<<24|c[1]<<16|c[2]<<8|c[3])>>>0,g=0===e?0:0xffffffff<<32-e>>>0;d.push({network:(f&g)>>>0,mask:g});continue}let c=a.match(h);if(c){let b=[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],10),parseInt(c[4],10)];for(let c of b)if(c<0||c>255)throw Error(`CM_ALLOWED_IPS: invalid octet in "${a}". Octets must be 0-255.`);let e=(b[0]<<24|b[1]<<16|b[2]<<8|b[3])>>>0;d.push({network:e,mask:0xffffffff});continue}throw Error(`CM_ALLOWED_IPS: invalid entry "${a}". Expected IPv4 address or CIDR notation.`)}return d}(j):[];function q(){return p}function r(){return j.length>0}},7015:(a,b,c)=>{"use strict";c.d(b,{Ds:()=>g});var d=c(81719);class e{constructor(a,b=3e4){this.cache=new Map,this.allAppsCache=null,this.lastRefresh=0,this.db=a,this.ttl=b}getTTL(){return this.ttl}isStale(){return Date.now()-this.lastRefresh>this.ttl}async refresh(){let a=(0,d.$i)(this.db);for(let b of(this.cache.clear(),a))this.cache.set(b.pathPrefix,b);this.allAppsCache=a,this.lastRefresh=Date.now()}async getByPathPrefix(a){return this.isStale()&&await this.refresh(),this.cache.get(a)??null}async getAll(){return this.isStale()&&await this.refresh(),this.allAppsCache??[]}invalidate(){this.cache.clear(),this.allAppsCache=null,this.lastRefresh=0}invalidateByIssueNo(a){this.invalidate()}}let f=null;function g(a){if(!f){if(!a)throw Error("Database instance required to initialize cache");f=new e(a)}return f}},26838:(a,b,c)=>{"use strict";c.d(b,{Mj:()=>k,Sw:()=>j,lX:()=>l});var d=c(29021),e=c(33873),f=c(90164);let g=/^v?\d+\.\d+\.\d+$/,h=/^[a-zA-Z0-9.\-\s_v]+$/,i=globalThis.__versionCheckCache??(globalThis.__versionCheckCache={result:null,fetchedAt:0,rateLimitResetAt:null});function j(){return function(){try{let a=(0,d.readFileSync)((0,e.join)(process.cwd(),"package.json"),"utf-8"),b=JSON.parse(a);if("commandmate"===b.name&&"string"==typeof b.version&&b.version.length>0)return b.version;return null}catch{return null}}()??"0.30.0"}function k(){return j()}async function l(){try{var a,b,c;if(null!==i.result&&Date.now()-i.fetchedAt<36e5||i.rateLimitResetAt&&(!(Date.now()>=i.rateLimitResetAt)||(i.rateLimitResetAt=null,0)))return i.result;let d=await fetch("https://api.github.com/repos/Kewton/CommandMate/releases/latest",{headers:{Accept:"application/vnd.github+json","User-Agent":`CommandMate/${k()}`},cache:"no-store",signal:AbortSignal.timeout(5e3)});if(403===d.status)return function(a){let b=a.headers.get("X-RateLimit-Reset");b?i.rateLimitResetAt=1e3*parseInt(b,10):i.rateLimitResetAt=Date.now()+36e5}(d),i.result;if(!d.ok)return i.result;let e=await d.json(),j=k(),l=e.tag_name.replace(/^v/,""),m={hasUpdate:function(a,b){if(!g.test(a)||!g.test(b))return!1;let c=a=>a.replace(/^v/,"").split(".").map(Number),[d,e,f]=c(a),[h,i,j]=c(b);return h!==d?h>d:i!==e?i>e:j>f}(j,e.tag_name),currentVersion:j,latestVersion:l,releaseUrl:(a=e.html_url).startsWith(f.Dk)?a:null,releaseName:(b=e.name,c=e.tag_name,h.test(b)&&b.length<=128?b:c),publishedAt:e.published_at};return i.result=m,i.fetchedAt=Date.now(),m}catch{return i.result}}},39727:()=>{},47990:()=>{},54036:(a,b,c)=>{"use strict";c.d(b,{aq:()=>d,gu:()=>f,kr:()=>h});let d="cm_auth_token",e=/^[0-9a-f]{64}$/;function f(a){return!!a&&e.test(a)}let g=2592e6;function h(){let a=process.env.CM_AUTH_EXPIRE,b=Date.now();if(a)try{return b+function(a){let b=a.match(/^(\d+)([hdm])$/);if(!b)throw Error(`Invalid duration format: "${a}". Use Nh, Nd, or Nm (e.g., "24h", "7d", "90m")`);let c=parseInt(b[1],10),d=b[2],e={h:36e5,d:864e5,m:6e4}[d];if(void 0===e)throw Error(`Invalid duration unit: "${d}"`);let f=c*e;if(f<36e5)throw Error(`Duration too short: minimum is 1h (60m). Got: "${a}"`);if(f>g)throw Error(`Duration too long: maximum is 30d (720h). Got: "${a}"`);return f}(a)}catch{return b+864e5}return process.env.CM_AUTH_TOKEN_HASH?b+864e5:null}},79129:(a,b,c)=>{"use strict";c.r(b),c.d(b,{WORKTREE_RENAMED_EVENT_TYPE:()=>ad,__internal:()=>aj,broadcast:()=>aa,broadcastMessage:()=>ac,cleanupRooms:()=>ag,closeWebSocket:()=>ai,handleProxyUpgrade:()=>N,hasRoomSubscribers:()=>ab,migrateWorktreeRooms:()=>ae,setupWebSocket:()=>O});var d=c(81503),e=c(91645),f=c(88081),g=c(3453),h=c(15194),i=c(40964),j=c(88807),k=c(56791);let l={capturePaneCalls:0,activeControlSessions:0,subscriberCount:0,cleanupCount:0,firstOutputLatencyCount:0,firstOutputLatencyTotalMs:0,firstOutputLatencyLastMs:null,firstOutputLatencyMinMs:null,firstOutputLatencyMaxMs:null};var m=c(79892),n=c(72626),o=c(79646);class p{push(a){if(0===a.length)return[];let b=(this.remainder+a).split("\n");this.remainder=b.pop()??"";let c=[];for(let a of b){let b=a.endsWith("\r")?a.slice(0,-1):a,d=this.parseLine(b);d&&c.push(d)}return c}flush(){if(0===this.remainder.length)return[];let a=this.parseLine(this.remainder);return this.remainder="",a?[a]:[]}parseLine(a){return 0===a.length?{type:"output",data:"\n"}:a.startsWith("%output ")?{type:"output",data:`${a.slice(8)}
2
+ `}:"%exit"===a||a.startsWith("%exit ")?{type:"exit",exitCode:null}:a.startsWith("%error ")?{type:"error",error:Error(a.slice(7))}:a.startsWith("%")?null:{type:"output",data:`${a}
3
+ `}}constructor(){this.remainder=""}}let q=(0,n.h)("tmux-control-client");class r{constructor(a={}){this.parser=new p,this.handlers=new Set,this.child=null,this.sessionName=null,this.idleTimer=null,this.started=!1,this.spawnProcess=a.spawnProcess??((a,b,c)=>(0,o.spawn)(a,b,c)),this.tmuxBinary=a.tmuxBinary??"tmux",this.idleTimeoutMs=a.idleTimeoutMs??3e4}start(a){this.started||(this.sessionName=a,this.child=this.spawnProcess(this.tmuxBinary,["-C","attach-session","-t",(0,m.lA)(a)],{stdio:"pipe"}),this.started=!0,this.child.stdout.setEncoding("utf8"),this.child.stdout.on("data",a=>{this.touch();let b="string"==typeof a?a:a.toString("utf8");for(let a of this.parser.push(b))this.emit(a)}),this.child.stderr.setEncoding("utf8"),this.child.stderr.on("data",a=>{let b="string"==typeof a?a:a.toString("utf8");this.emit({type:"error",error:Error(b.trim()||"tmux control stderr")})}),this.child.on("close",a=>{for(let a of this.parser.flush())this.emit(a);this.emit({type:"exit",exitCode:a}),this.stop()}),this.child.on("error",a=>{this.emit({type:"error",error:a}),this.stop()}),this.resetIdleTimer(),q.debug("start",{sessionName:a}))}onEvent(a){return this.handlers.add(a),()=>{this.handlers.delete(a)}}sendInput(a){if(!this.child?.stdin.writable)throw Error("Tmux control client is not writable");this.touch(),this.child.stdin.write(a)}resize(a,b){if(!this.child?.stdin.writable)throw Error("Tmux control client is not writable");this.touch(),this.child.stdin.write(`refresh-client -C ${a}x${b}
4
+ `)}stop(){this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null),this.child&&(this.child.removeAllListeners(),this.child.stdout.removeAllListeners(),this.child.stderr.removeAllListeners(),this.child.kill(),this.child=null),this.started=!1}isStarted(){return this.started}setSessionName(a){this.sessionName=a}emit(a){for(let b of this.handlers)b(a)}touch(){this.resetIdleTimer()}resetIdleTimer(){this.idleTimeoutMs<=0||(this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=setTimeout(()=>{q.debug("idle-timeout",{sessionName:this.sessionName}),this.stop()},this.idleTimeoutMs))}}let s=(0,n.h)("tmux-control-registry");class t{constructor(a={}){this.entries=new Map,this.handlers=new Map,this.idleTimeoutMs=a.idleTimeoutMs??15e3,this.createClient=a.createClient??(()=>new r(a))}subscribe(a,b,c){let d=this.ensureEntry(a);d.subscribers.add(b),this.cancelIdleCleanup(d),this.updateMetrics();let e=this.handlers.get(a);return e||(e=new Set,this.handlers.set(a,e)),e.add(c),()=>{e?.delete(c),this.unsubscribe(a,b)}}sendInput(a,b){let c=this.entries.get(a);if(!c)throw Error(`No control client registered for ${a}`);c.client.sendInput(b)}resize(a,b,c){let d=this.entries.get(a);if(!d)throw Error(`No control client registered for ${a}`);d.client.resize(b,c)}hasSession(a){return this.entries.has(a)}getSubscriberCount(a){return this.entries.get(a)?.subscribers.size??0}getTotalSubscriberCount(){let a=0;for(let b of this.entries.values())a+=b.subscribers.size;return a}getSessionCount(){return this.entries.size}shutdown(){for(let[a,b]of this.entries)this.teardownEntry(a,b);this.entries.clear(),this.handlers.clear(),this.updateMetrics()}renameSession(a,b){if(a===b)return!1;let c=this.entries.get(a);if(!c)return!1;if(this.entries.has(b))return s.warn("rename:destination-occupied",{oldName:a,newName:b}),!1;this.entries.delete(a),c.sessionName=b,this.entries.set(b,c),c.client.setSessionName(b);let d=this.handlers.get(a);return d&&(this.handlers.delete(a),this.handlers.set(b,d)),s.debug("rename",{oldName:a,newName:b}),!0}ensureEntry(a){let b=this.entries.get(a);if(b)return b;let c=this.createClient(a);c.start(a);let d={client:c,subscribers:new Set,unsubscribeClientEvent:()=>{},idleTimer:null,sessionName:a};return d.unsubscribeClientEvent=c.onEvent(a=>{let b=this.handlers.get(d.sessionName);if(b)for(let c of b)c(a);("exit"===a.type||"error"===a.type)&&this.deleteEntry(d.sessionName)}),this.entries.set(a,d),this.updateMetrics(),d}unsubscribe(a,b){let c=this.entries.get(a);c&&(c.subscribers.delete(b),this.updateMetrics(),0===c.subscribers.size&&this.scheduleIdleCleanup(a,c))}scheduleIdleCleanup(a,b){if(this.idleTimeoutMs<=0)return void this.deleteEntry(a);this.cancelIdleCleanup(b),b.idleTimer=setTimeout(()=>{s.debug("idle-cleanup",{sessionName:b.sessionName}),this.deleteEntry(b.sessionName)},this.idleTimeoutMs)}cancelIdleCleanup(a){a.idleTimer&&(clearTimeout(a.idleTimer),a.idleTimer=null)}deleteEntry(a){let b=this.entries.get(a);b&&(this.teardownEntry(a,b),this.entries.delete(a),this.handlers.delete(a),this.updateMetrics())}teardownEntry(a,b){this.cancelIdleCleanup(b),b.unsubscribeClientEvent(),b.client.stop(),l.cleanupCount+=1}updateMetrics(){l.activeControlSessions=Math.max(0,this.getSessionCount()),l.subscriberCount=Math.max(0,this.getTotalSubscriberCount())}}let u=null,v={streamingOutput:!0,explicitResize:!0,snapshotFallback:!0};class w{constructor(a={}){this.registry=a.registry??(u||(u=new t),u)}async ensureSession(a,b){await (0,m.N)(a)||await (0,m.jw)(a,b)}async sessionExists(a){return(0,m.N)(a)}async sendInput(a,b){if(this.registry.hasSession(a))return void this.registry.sendInput(a,b);await (0,m.V1)(a,b)}async sendSpecialKey(a,b){if("Escape"!==b&&"C-c"!==b&&"C-d"!==b&&"C-m"!==b&&"Enter"!==b)throw Error(`Unsupported special key for ControlModeTmuxTransport: ${b}`);await (0,m.ds)(a,b)}async resize(a,b,c){this.registry.resize(a,b,c)}async captureSnapshot(a,b){return l.capturePaneCalls+=1,(0,m.Xg)(a,b)}async subscribe(a,b){let c=`sub-${Date.now()}-${Math.random().toString(36).slice(2,10)}`,d=this.registry.subscribe(a,c,a=>{"output"===a.type?b.onOutput(a.data):"exit"===a.type?b.onExit?.({exitCode:a.exitCode}):b.onError(a.error)});return{async unsubscribe(){d()}}}getCapabilities(){return v}getSubscriberCount(a){return this.registry.getSubscriberCount(a)}renameSession(a,b){return this.registry.renameSession(a,b)}async killSession(a){return(0,m.fY)(a)}}let x=null;function y(){return x||(x=new w),x}var z=c(7015),A=c(26838),B=c(54325),C=c(57836);function D(){let a=globalThis.__waitingStatusBroadcastUnsubscribe;a&&(a(),globalThis.__waitingStatusBroadcastUnsubscribe=void 0)}let E=(0,n.h)("publisher-registry");function F(){return globalThis.__realtimeRoomPublisher?.publisher??null}let G=(0,n.h)("ws-server"),H=null,I=new Map,J=new Map,K=null,L=new Set(["localhost","127.0.0.1"]);function M(a,b){try{a.write(`HTTP/1.1 ${b}\r
5
+ Content-Length: 0\r
6
+ Connection: close\r
7
+ \r
8
+ `)}catch{}a.destroy()}async function N(a,b,c,d){let e,f=(a.url||"/").split("?")[0].split("/")[2]||"";if(!f)return void M(b,"400 Bad Request");try{let a=d.getDb(),b=d.getCache(a);e=await b.getByPathPrefix(f)}catch(a){G.error("ws-proxy:cache-error",{pathPrefix:f,error:a instanceof Error?a.message:String(a)}),!b.destroyed&&b.writable&&M(b,"502 Bad Gateway");return}if(b.destroyed||!b.writable)return;if(!e)return void M(b,"404 Not Found");if(!e.enabled)return void M(b,"503 Service Unavailable");if(!e.websocketEnabled)return void M(b,"403 Forbidden");if(!L.has(e.targetHost)){G.warn("ws-proxy:ssrf-blocked",{pathPrefix:f}),M(b,"403 Forbidden");return}let g=d.netConnect({host:e.targetHost,port:e.targetPort}),h=!1,i=!1,j=()=>{if(!i){i=!0;try{g.destroy()}catch{}try{b.destroy()}catch{}}};g.on("connect",()=>{h=!0;try{let b=function(a){let b=a.method||"GET",c=a.url||"/",d=a.httpVersion||"1.1",e=[`${b} ${c} HTTP/${d}`];for(let[b,c]of Object.entries(a.headers))if(void 0!==c)if(Array.isArray(c))for(let a of c)e.push(`${b}: ${a}`);else e.push(`${b}: ${c}`);return e.join("\r\n")+"\r\n\r\n"}(a);g.write(b)}catch(a){G.error("ws-proxy:upstream-write-error",{pathPrefix:f,error:a instanceof Error?a.message:String(a)}),j();return}b.pipe(g),g.pipe(b)}),g.on("error",a=>{G.error("ws-proxy:upstream-error",{pathPrefix:f,error:a.message}),h||b.destroyed||!b.writable?j():M(b,"502 Bad Gateway")}),g.on("close",()=>{j()}),b.on("error",a=>{G.error("ws-proxy:client-error",{pathPrefix:f,error:a.message}),j()}),b.on("close",()=>{j()})}function O(a){H=new d.zu({noServer:!0}),K=function(a){let b=(globalThis.__realtimeRoomPublisherGeneration??0)+1;return globalThis.__realtimeRoomPublisherGeneration=b,globalThis.__realtimeRoomPublisher={generation:b,publisher:a},globalThis.__realtimeUnroutedPublish=void 0,{token:b,unregister:()=>(function(a){let b=globalThis.__realtimeRoomPublisher;return!!b&&b.generation===a&&(globalThis.__realtimeRoomPublisher=void 0,!0)})(b)}}(Z),function(a){D();let b=(0,C.wN)(b=>{a(b.worktreeId,{type:"session_status_changed",worktreeId:b.worktreeId,cliTool:b.cliToolId,instance:b.instanceId??b.cliToolId,isWaitingForResponse:b.waiting,waitingKind:b.kind??null,waitingSince:b.since})});globalThis.__waitingStatusBroadcastUnsubscribe=b}(R),a.on("upgrade",(a,b,c)=>{let d=a.url||"/";if(d.startsWith("/_next/")){b.write("HTTP/1.1 426 Upgrade Required\r\nContent-Length: 0\r\nConnection: close\r\n\r\n"),b.destroy();return}if((0,g.Rh)()){let c=(0,g.Z2)(a.socket.remoteAddress||"");if(!(0,g.c$)(c,(0,g.nu)())){let a=c.substring(0,45);G.warn("websocket:denied",{ip:a}),b.write("HTTP/1.1 403 Forbidden\r\n\r\n"),b.destroy();return}}if((0,f.y2)()){let c=a.headers.cookie||"",d=(0,f.JT)(c)[f.aq];if(!d||!(0,f.nr)(d)){b.write("HTTP/1.1 401 Unauthorized\r\nContent-Length: 0\r\nConnection: close\r\n\r\n"),b.destroy();return}}if(d.startsWith("/proxy/"))return void(async()=>{try{await N(a,b,c,{getDb:()=>(0,j.getDbInstance)(),getCache:a=>(0,z.Ds)(a),netConnect:a=>(0,e.connect)(a)})}catch(a){if(G.error("ws-proxy:unhandled-error",{error:a instanceof Error?a.message:String(a)}),!b.destroyed&&b.writable){try{b.write("HTTP/1.1 500 Internal Server Error\r\nContent-Length: 0\r\nConnection: close\r\n\r\n")}catch{}b.destroy()}}})();H.handleUpgrade(a,b,c,b=>{H.emit("connection",b,a)})}),H.on("error",a=>{G.error("server:error",{error:a.message})}),H.on("connection",a=>{let b={ws:a,worktreeIds:new Set,terminalSubscription:null};I.set(a,b),a.on("message",b=>{try{let c=JSON.parse(b.toString());P(a,c)}catch(a){G.error("message:parse-failed",{error:a instanceof Error?a.message:String(a)})}}),a.on("close",()=>{S(a)}),a.on("error",b=>{"WS_ERR_INVALID_CLOSE_CODE"===b.code||b.message?.includes("Invalid WebSocket frame")||b.message?.includes("write after end")||b.message?.includes("ECONNRESET")||b.message?.includes("EPIPE")||G.error("websocket:error",{error:b.message});try{a.terminate()}catch{}S(a)})})}function P(a,b){switch(b.type){case"subscribe":if(!b.worktreeId)return;var c=a,d=b.worktreeId;let e=I.get(c);e&&(e.worktreeIds.add(d),J.has(d)||J.set(d,new Set),J.get(d).add(c));break;case"unsubscribe":if(!b.worktreeId)return;!function(a,b){let c=I.get(a);if(!c)return;c.worktreeIds.delete(b);let d=J.get(b);d&&(d.delete(a),0===d.size&&J.delete(b))}(a,b.worktreeId);break;case"broadcast":if(!b.worktreeId)return;R(b.worktreeId,b.data);break;case B.ST:Q(a,b);break;case"terminal_subscribe":U(a,b);break;case"terminal_input":V(a,b);break;case"terminal_resize":W(a,b);break;case"terminal_unsubscribe":X(a);break;default:G.warn("message:unknown-type")}}function Q(a,b){let c="string"==typeof b.version?b.version:"";if(!c)return;let e=(0,A.Sw)();if((0,B.LE)(e,c)&&a.readyState===d.kb.OPEN)try{a.send(JSON.stringify({type:B.Oo,serverVersion:e,clientVersion:c}))}catch(a){G.error("version:notify-failed",{error:a instanceof Error?a.message:String(a)})}}function R(a,b){let c=J.get(a);if(c&&0!==c.size)try{let e=JSON.stringify({type:"broadcast",worktreeId:a,data:b});c.forEach(a=>{if(a.readyState===d.kb.OPEN)try{a.send(e)}catch(a){G.error("broadcast:send-failed",{error:a instanceof Error?a.message:String(a)})}})}catch(b){G.error("broadcast:failed",{worktreeId:a,error:b instanceof Error?b.message:String(b)});try{let b=JSON.stringify({type:"broadcast",worktreeId:a,data:{error:"Message encoding error"}});c.forEach(a=>{if(a.readyState===d.kb.OPEN)try{a.send(b)}catch{}})}catch(a){G.error("fallback:send-failed",{error:a instanceof Error?a.message:String(a)})}}}function S(a){let b=I.get(a);b&&(b.worktreeIds.forEach(b=>{let c=J.get(b);c&&(c.delete(a),0===c.size&&J.delete(b))}),b.terminalSubscription&&(b.terminalSubscription.unsubscribe(),b.terminalSubscription=null),I.delete(a))}function T(a,b){a.readyState===d.kb.OPEN&&a.send(JSON.stringify(b))}async function U(a,b){let c=I.get(a);if(!c)return void T(a,{type:"terminal_error",error:"Unauthorized WebSocket client"});if("true"!==process.env.TMUX_CONTROL_MODE_ENABLED)return void T(a,{type:"terminal_error",error:"Tmux control mode is disabled"});let{worktreeId:d,cliToolId:e}=b;if(!d||!e||!(0,h.hR)(e))return void T(a,{type:"terminal_error",error:"Invalid terminal subscription parameters"});let f=(0,j.getDbInstance)();if(!(0,k.getWorktreeById)(f,d))return void T(a,{type:"terminal_error",error:"Worktree not found"});c.terminalSubscription&&(await c.terminalSubscription.unsubscribe(),c.terminalSubscription=null);let g=(0,i.m)(e,d),m=y();if(m.getSubscriberCount(g)>=4)return void T(a,{type:"terminal_error",error:"Terminal subscriber limit reached"});let n=!1,o=Date.now(),p=await m.subscribe(g,{onOutput:b=>{if(!n){n=!0;let a=Math.max(0,Math.round(Date.now()-o));l.firstOutputLatencyCount+=1,l.firstOutputLatencyTotalMs+=a,l.firstOutputLatencyLastMs=a,l.firstOutputLatencyMinMs=null===l.firstOutputLatencyMinMs?a:Math.min(l.firstOutputLatencyMinMs,a),l.firstOutputLatencyMaxMs=null===l.firstOutputLatencyMaxMs?a:Math.max(l.firstOutputLatencyMaxMs,a)}T(a,{type:"terminal_output",data:b})},onExit:({exitCode:b})=>{T(a,{type:"terminal_exit",exitCode:b})},onError:b=>{(async()=>{try{let b=await m.captureSnapshot(g,{startLine:-200});b.length>0&&T(a,{type:"terminal_output",data:b,fallback:!0})}catch{}T(a,{type:"terminal_error",error:b.message,fallback:!0})})()}});c.terminalSubscription={worktreeId:d,cliToolId:e,sessionName:g,startedAt:o,unsubscribe:p.unsubscribe},T(a,{type:"terminal_status",connected:!0,worktreeId:d,cliToolId:e})}async function V(a,b){let c=I.get(a),d=c?.terminalSubscription;if(!d)return void T(a,{type:"terminal_error",error:"No active terminal subscription"});let e="string"==typeof b.data?b.data:"";if(0===e.length||e.length>4096)return void T(a,{type:"terminal_error",error:"Invalid terminal input"});try{await y().sendInput(d.sessionName,e)}catch(b){T(a,{type:"terminal_error",error:b instanceof Error?b.message:"Failed to send terminal input"})}}async function W(a,b){let c=I.get(a),d=c?.terminalSubscription;if(d){if("number"!=typeof b.cols||!Number.isInteger(b.cols)||b.cols<20||b.cols>500||"number"!=typeof b.rows||!Number.isInteger(b.rows)||b.rows<5||b.rows>200)return void T(a,{type:"terminal_error",error:"Invalid terminal resize payload"});try{await y().resize(d.sessionName,b.cols,b.rows)}catch(b){T(a,{type:"terminal_error",error:b instanceof Error?b.message:"Failed to resize terminal"})}}}async function X(a){let b=I.get(a);if(b?.terminalSubscription){try{await b.terminalSubscription.unsubscribe()}catch{}b.terminalSubscription=null,T(a,{type:"terminal_status",connected:!1})}}function Y(a){let b=J.get(a);return!!b&&b.size>0}let Z={publish:R,hasSubscribers:Y,cleanupRooms:ah,migrateRooms:af};function $(){let a=F();return a&&a!==Z?a:null}function _(a,b){null===F()&&0===J.size&&function(a,b,c=Date.now()){let d=globalThis.__realtimeUnroutedPublish??={total:0,suppressed:0,lastWarnedAt:null,operations:{}};if(d.total+=1,d.operations[a]=(d.operations[a]??0)+1,null!==d.lastWarnedAt&&c-d.lastWarnedAt<6e4){d.suppressed+=1;return}let e=d.suppressed;d.suppressed=0,d.lastWarnedAt=c,E.warn("realtime:no-room-publisher",{operation:a,worktreeId:b,total:d.total,suppressedSinceLastWarning:e,operations:{...d.operations}})}(a,b)}function aa(a,b){let c=$();if(c)return void c.publish(a,b);_("broadcast",a),R(a,b)}function ab(a){let b=$();return b?b.hasSubscribers(a):(_("hasRoomSubscribers",a),Y(a))}function ac(a,b){b.worktreeId?aa(b.worktreeId,{type:a,...b}):G.warn("broadcast:missing-worktree-id")}let ad="worktree_renamed";function ae(a){let b=$();return b?b.migrateRooms(a):af(a)}function af(a){let b=new Map;for(let{oldId:c,newId:d}of a)c&&d&&c!==d&&b.set(c,d);if(0===b.size)return[];let c=[];for(let[a,d]of b){let b=J.get(a);b&&0!==b.size&&(J.delete(a),c.push({oldId:a,newId:d,sockets:b}))}let d=[];for(let{oldId:a,newId:b,sockets:e}of c){let c=J.get(b)??new Set;for(let d of e){c.add(d);let e=I.get(d);e&&(e.worktreeIds.delete(a),e.worktreeIds.add(b)),T(d,{type:ad,worktreeId:b,previousWorktreeId:a})}J.set(b,c),d.push({oldId:a,newId:b,subscribers:e.size})}for(let a of I.values()){let c=a.terminalSubscription;if(!c)continue;let d=b.get(c.worktreeId);if(d)try{if(!(0,h.hR)(c.cliToolId))continue;c.sessionName=(0,i.m)(c.cliToolId,d),c.worktreeId=d}catch(a){G.warn("terminal:rename-failed",{worktreeId:c.worktreeId,newId:d,error:a instanceof Error?a.message:String(a)})}}return d.length>0&&G.info("rooms:migrated",{count:d.length}),d}function ag(a){let b=$();if(b)return void b.cleanupRooms(a);ah(a)}function ah(a){for(let b of a){let a=J.get(b);a&&(a.forEach(a=>{let c=I.get(a);c&&c.worktreeIds.delete(b)}),J.delete(b))}}function ai(){let a=null!==K&&K.unregister();K=null,(a||null===F())&&D(),H&&(I.forEach(a=>{a.ws.close()}),I.clear(),J.clear(),H.close(),H=null)}let aj={handleMessage:P,handleClientVersion:Q,handleProxyUpgrade:N,handleTerminalSubscribe:U,handleTerminalInput:V,handleTerminalResize:W,handleTerminalUnsubscribe:X,handleDisconnect:S,registerClientForTest(a){I.set(a,{ws:a,worktreeIds:new Set,terminalSubscription:null})},getClientInfoForTest:a=>I.get(a),resetStateForTest(){I.clear(),J.clear()}}},88081:(a,b,c)=>{"use strict";c.d(b,{JT:()=>m,QK:()=>k,aq:()=>f.aq,nr:()=>l,r0:()=>p,sO:()=>h,x:()=>q,y2:()=>n,zr:()=>o});var d=c(55511),e=c.n(d),f=c(54036);let g={maxAttempts:5,lockoutDuration:9e5,cleanupInterval:36e5},h=86400,i=(()=>{let a=process.env.CM_AUTH_TOKEN_HASH||void 0;return a?(0,f.gu)(a)?a:void console.error("[auth] CM_AUTH_TOKEN_HASH is not a valid SHA-256 hash"):void 0})(),j=(0,f.kr)();function k(a){return e().createHash("sha256").update(a).digest("hex")}function l(a){if(!i||!a||"string"!=typeof a||null!==j&&Date.now()>j)return!1;let b=k(a),c=Buffer.from(b,"hex"),d=Buffer.from(i,"hex");return c.length===d.length&&e().timingSafeEqual(c,d)}function m(a){let b={};if(!a)return b;for(let c of a.split(";")){let a=c.indexOf("=");if(-1===a)continue;let d=c.substring(0,a).trim(),e=c.substring(a+1).trim();d&&(b[d]=e)}return b}function n(){return!!i}function o(){if(null===j)return 0;let a=j-Date.now();return a<=0?0:Math.floor(a/1e3)}function p(a){return{httpOnly:!0,sameSite:"strict",secure:!!process.env.CM_HTTPS_CERT,maxAge:a,path:"/"}}function q(){let a=new Map,b=setInterval(()=>{let b=Date.now();for(let[c,d]of a){let e=null===d.lockedUntil||b>d.lockedUntil,f=b-d.lastAttempt>g.lockoutDuration;e&&f&&a.delete(c)}},g.cleanupInterval);return b.unref&&b.unref(),{checkLimit(b){let c=a.get(b);if(!c)return{allowed:!0};if(null!==c.lockedUntil){let a=Date.now();if(a<c.lockedUntil)return{allowed:!1,retryAfter:Math.ceil((c.lockedUntil-a)/1e3)};c.attempts=0,c.lockedUntil=null}return{allowed:!0}},recordFailure(b){let c=Date.now(),d=a.get(b)||{attempts:0,lockedUntil:null,lastAttempt:c};d.attempts++,d.lastAttempt=c,d.attempts>=g.maxAttempts&&(d.lockedUntil=c+g.lockoutDuration),a.set(b,d)},recordSuccess(b){a.delete(b)},destroy(){clearInterval(b),a.clear()}}}},90164:(a,b,c)=>{"use strict";c.d(b,{Dk:()=>e,kD:()=>f});let d="https://github.com/Kewton/CommandMate",e=`${d}/releases/`,f=`${d}/blob/main/docs/security-guide.md`}};
@@ -1 +1 @@
1
- "use strict";exports.id=7685,exports.ids=[7685],exports.modules={80066:a=>{a.exports=JSON.parse('{"confirmationFromClaude":"Claudeからの確認","confirmationFrom":"{toolName}からの確認","sending":"送信中...","failedToRespond":"応答の送信に失敗しました。もう一度お試しください。","default":"デフォルト","answered":"回答済み","awaitingSelection":"選択待ち","yes":"はい / Yes","no":"いいえ / No","enterCustomMessage":"カスタムメッセージを入力してください","enterMessageHere":"ここにメッセージを入力...","enterValuePlaceholder":"値を入力してください...","submit":"送信","yesNoGroupLabel":"はい / いいえ の選択肢","selectAnOption":"選択肢を選んでください","customValueInput":"カスタム値の入力","unclassifiedTitle":"ダイアログが開いていますが、選択肢を読み取れませんでした。","unclassifiedInstruction":"ターミナルで応答するか、{command} で選択肢の「番号」を送ってください。番号つきダイアログでは「yes」「no」といった語は解決されません。","unclassifiedRespondCommand":"commandmate respond [worktree-id] [番号]","askUserQuestionProgress":"エージェントからの質問 {index}/{total}","askUserQuestionSource":"選択肢はエージェントから取得しました"}')}};
1
+ "use strict";exports.id=7685,exports.ids=[7685],exports.modules={80066:a=>{a.exports=JSON.parse('{"confirmationFromClaude":"Claudeからの確認","confirmationFrom":"{toolName}からの確認","sending":"送信中...","default":"デフォルト","yes":"はい / Yes","no":"いいえ / No","enterValuePlaceholder":"値を入力してください...","submit":"送信","yesNoGroupLabel":"はい / いいえ の選択肢","selectAnOption":"選択肢を選んでください","customValueInput":"カスタム値の入力","unclassifiedTitle":"ダイアログが開いていますが、選択肢を読み取れませんでした。","unclassifiedInstruction":"ターミナルで応答するか、{command} で選択肢の「番号」を送ってください。番号つきダイアログでは「yes」「no」といった語は解決されません。","unclassifiedRespondCommand":"commandmate respond [worktree-id] [番号]","askUserQuestionProgress":"エージェントからの質問 {index}/{total}","askUserQuestionSource":"選択肢はエージェントから取得しました"}')}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=7836,exports.ids=[7836],exports.modules={57836:(a,b,c)=>{c.d(b,{Jp:()=>k,Te:()=>l,hd:()=>j,wN:()=>h});var d=c(24455);let e=(0,c(72626).h)("waiting-episode-state"),f=globalThis.__sessionWaitingEpisodes??(globalThis.__sessionWaitingEpisodes=new Map),g=globalThis.__sessionWaitingTransitionListeners??(globalThis.__sessionWaitingTransitionListeners=new Set);function h(a){return g.add(a),()=>{g.delete(a)}}function i(a){for(let b of g)try{b(a)}catch(b){e.error("waiting-transition-listener-failed",{worktreeId:a.worktreeId,cliToolId:a.cliToolId,instanceId:a.instanceId??a.cliToolId,waiting:a.waiting,error:b instanceof Error?b.message:String(b)})}}function j({worktreeId:a,cliToolId:b,instanceId:c,waiting:e,kind:g=null,structuredSince:h=null,now:j=Date.now()}){let k=(0,d.v7)(a,b,c),l=f.get(k);if(!e)return void 0===l||(f.delete(k),i({worktreeId:a,cliToolId:b,instanceId:c,waiting:!1,since:null,kind:null,at:j})),null;if(void 0!==l)return l.kind=g,l.since;let m=h??j;return f.set(k,{since:m,kind:g}),i({worktreeId:a,cliToolId:b,instanceId:c,waiting:!0,since:m,kind:g,at:j}),m}function k(a,b,c){return f.get((0,d.v7)(a,b,c))??null}function l(a){let b=`${a}${d.CS}`;for(let a of f.keys())if(a.startsWith(b))return!0;return!1}}};
@@ -1 +1 @@
1
- "use strict";exports.id=8356,exports.ids=[8356],exports.modules={88356:a=>{a.exports=JSON.parse('{"title":"キーボードショートカット","scopes":{"global":"グローバル","terminal":"ターミナル","composer":"入力欄","editor":"ファイルエディタ"},"shortcuts":{"commandPalette":"コマンドパレットを開く","keyboardHelp":"キーボードショートカットを表示","closeOverlay":"オーバーレイ・ダイアログを閉じる","navigateList":"選択を上下に移動","terminalSearch":"ターミナル出力を検索","sendMessage":"メッセージを送信","composerNewline":"改行を挿入","editorIndent":"行・選択範囲をインデント","editorOutdent":"行・選択範囲をアウトデント","editorTabFocus":"Tab キーのフォーカス移動を切り替え","editorSave":"ファイルを保存","editorFullscreen":"全画面エディタを切り替え"}}')}};
1
+ "use strict";exports.id=8356,exports.ids=[8356],exports.modules={88356:a=>{a.exports=JSON.parse('{"title":"キーボードショートカット","scopes":{"global":"グローバル","terminal":"ターミナル","composer":"入力欄","editor":"ファイルエディタ"},"shortcuts":{"commandPalette":"コマンドパレットを開く","keyboardHelp":"キーボードショートカットを表示","closeOverlay":"オーバーレイ・ダイアログを閉じる","navigateList":"選択を上下に移動","terminalSearch":"ターミナル出力を検索","toggleSurfaceMode":"出力面をターミナル / チャットで切り替え","sendMessage":"メッセージを送信","composerNewline":"改行を挿入","editorIndent":"行・選択範囲をインデント","editorOutdent":"行・選択範囲をアウトデント","editorTabFocus":"Tab キーのフォーカス移動を切り替え","editorSave":"ファイルを保存","editorFullscreen":"全画面エディタを切り替え"}}')}};
@@ -8,7 +8,7 @@
8
8
  flex items-center justify-between
9
9
  hover:bg-sidebar-hover transition-colors
10
10
  ${a===c.key?"text-accent-700 dark:text-accent-400":"text-sidebar-muted"}
11
- `,children:[(0,d.jsx)("span",{children:c.label}),a===c.key&&(0,d.jsx)("span",{className:"text-xs",children:"asc"===b?"ASC":"DESC"})]},c.key))})]})});function V({className:a}){return(0,d.jsx)("svg",{className:a,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12"})})}function W({className:a}){return(0,d.jsx)("svg",{className:a,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})})}function X({className:a}){return(0,d.jsx)("svg",{className:a,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}let Y=[{key:"updatedAt",labelKey:"sort.updatedAt"},{key:"repositoryName",labelKey:"sort.repositoryName"},{key:"branchName",labelKey:"sort.branchName"},{key:"status",labelKey:"sort.status"}],Z={updatedAt:"desc"},$=(0,e.memo)(function(){let{sortKey:a,sortDirection:b,setSortKey:c,setSortDirection:f}=(0,A.VF)(),g=(0,l.c)("common"),h=(0,e.useMemo)(()=>Y.map(({key:a,labelKey:b})=>({key:a,label:g(b)})),[g]);return(0,d.jsx)(U,{sortKey:a,sortDirection:b,onSortKeyChange:c,onSortDirectionChange:f,options:h,defaultDirections:Z,compact:!0,tooltip:g("tooltips.sort"),iconClassName:"w-4 h-4"})});var _=c(15737),aa=c(81497),ab=c(55992);let ac=["en","ja"],ad={en:"English",ja:"日本語"};function ae(){return{currentLocale:(0,ab.Ym)(),switchLocale:a=>{if(ac.includes(a)){let b="https:"===window.location.protocol;document.cookie=`locale=${a};path=/;max-age=31536000;SameSite=Lax${b?";Secure":""}`,localStorage.setItem("locale",a),window.location.reload()}}}}function af(){let{currentLocale:a,switchLocale:b}=ae(),c=(0,l.c)("common");return(0,d.jsx)("select",{value:a,onChange:a=>b(a.target.value),"data-testid":"locale-switcher","aria-label":c("language"),className:" w-full px-3 py-2 rounded-md bg-sidebar text-sidebar-foreground border border-sidebar-border focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent text-sm ",children:ac.map(a=>(0,d.jsx)("option",{value:a,children:ad[a]},a))})}var ag=c(84342);function ah(){let a=(0,l.c)("auth"),b=(0,ag.H)(),[c,f]=(0,e.useState)(!1);if(!b)return null;async function g(){f(!0);try{await fetch("/api/auth/logout",{method:"POST"}),window.location.href="/login"}catch{window.location.href="/login"}}return(0,d.jsx)("button",{type:"button",onClick:g,disabled:c,"data-testid":"logout-button",className:" w-full px-3 py-2 text-sm text-left rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 transition-colors ",children:c?"...":a("logout.button")})}var ai=c(63474),aj=c(77560),ak=c(19463);function al(){let a=(0,l.c)("common"),{count:b}=(0,ak.Lv)();return 0===b?null:(0,d.jsxs)(i(),{href:aj.ks,"data-testid":"attention-badge","aria-label":a("attention.badgeLabel",{count:b}),className:"mt-2 inline-flex w-full items-center justify-between gap-2 rounded-md border border-warning-border bg-warning-subtle px-2 py-1 text-xs font-medium text-warning-foreground transition-colors hover:brightness-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,d.jsx)("span",{className:"min-w-0 truncate",children:a("attention.label")}),(0,d.jsx)("span",{"data-testid":"attention-badge-count",className:"tabular-nums font-semibold",children:b})]})}function am({count:a}){let b=(0,l.c)("common");return 0===a?null:(0,d.jsx)("span",{"data-testid":"attention-badge-bubble",role:"status","aria-label":b("attention.badgeLabel",{count:a}),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:a>99?"99+":a})}var an=c(78352),ao=c(32482);let ap="w-4 h-4",aq=0,ar=null;function as(){return ar??[]}let at=(0,e.memo)(function(){let a=(0,j.Hq)(),{worktrees:b,repositories:c,selectedWorktreeId:f,selectWorktree:g,refreshWorktrees:h,isLoading:k,error:m}=(0,J.$f)(),{closeMobileDrawer:n,sortKey:o,sortDirection:p,viewMode:q,setViewMode:r}=(0,A.VF)(),s=(0,l.c)("common"),[u,v]=(0,e.useState)(""),w=(0,e.useRef)(null),[x,y]=(0,e.useState)(()=>({})),[z,B]=(0,e.useState)(as),C=(0,e.useRef)(!1);(0,e.useEffect)(()=>{C.current||(C.current=!0,fetch("/api/sidebar/group-order").then(a=>a.json()).then(a=>{a.success&&Array.isArray(a.order)&&(B(a.order),ar=a.order)}).catch(()=>{}))},[]);let D=(0,e.useMemo)(()=>(0,ao.UZ)(c),[c]),E=(0,e.useMemo)(()=>(0,ao.s6)(b,D),[b,D]),I=(0,e.useMemo)(()=>E.map(M.XK),[E]),K=(0,e.useDeferredValue)(I),L=(0,e.useRef)(null),N=(0,e.useRef)(null),[O,P]=(0,e.useState)(0);(0,e.useEffect)(()=>()=>{null!==N.current&&clearTimeout(N.current)},[]);let Q=(0,e.useCallback)(()=>{null!==N.current&&(clearTimeout(N.current),N.current=null),L.current=null},[]),T=(0,e.useMemo)(()=>{let a=L.current;return!a||0===a.items.length||Date.now()>=a.expiresAt?K:a.items},[K,O]),U=(0,e.useRef)(T);(0,e.useLayoutEffect)(()=>{U.current=T;let a=L.current;a&&0===a.items.length&&K.length>0&&Q()});let V=(0,e.useCallback)(()=>{if(0===U.current.length)return;null!==N.current&&(clearTimeout(N.current),N.current=null);let a=L.current;if(a&&Date.now()<a.expiresAt){L.current={...a,expiresAt:1/0};return}L.current={items:U.current,expiresAt:1/0}},[]),W=(0,e.useCallback)(()=>{L.current&&(L.current={...L.current,expiresAt:Date.now()+1e3},null!==N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{Q(),P(a=>a+1)},1e3))},[Q]),{sortedItems:X,groupedItems:Y}=function(a){let{items:b,sortKey:c,sortDirection:d,viewMode:f,filterText:g}=a,h=(0,e.useMemo)(()=>{if(!g)return b;let a=g.toLowerCase();return b.filter(b=>b.name.toLowerCase().includes(a)||b.repositoryName.toLowerCase().includes(a))},[b,g]);return{sortedItems:(0,e.useMemo)(()=>(0,ao.Xn)(h,c,d),[h,c,d]),groupedItems:(0,e.useMemo)(()=>"grouped"===f?(0,ao._s)(h,c,d):[],[h,c,d,f])}}({items:T,sortKey:o,sortDirection:p,viewMode:q,filterText:u}),Z=(0,e.useMemo)(()=>{if("grouped"!==q||!Y)return null;if(u.trim()||0===z.length)return Y;let a=new Map(z.map((a,b)=>[a,b]));return[...Y].sort((b,c)=>{let d=a.has(b.repositoryName)?a.get(b.repositoryName):1/0,e=a.has(c.repositoryName)?a.get(c.repositoryName):1/0;return d===e?b.repositoryName.localeCompare(c.repositoryName):d-e})},[q,Y,z,u]),aa="grouped"===q?Z:null;(0,e.useEffect)(()=>{},[x]);let ab=(0,e.useCallback)(a=>{y(b=>({...b,[a]:!b[a]}))},[]),ac=(0,e.useCallback)(()=>{var a;aq=Number.isFinite(a=w.current?.scrollTop??0)&&a>0?a:0},[]),ad=X.length>0||(aa?.length??0)>0;(0,e.useEffect)(()=>{let a=w.current;if(!a)return;let b=window.requestAnimationFrame(()=>{a.scrollTop=aq});return()=>{window.cancelAnimationFrame(b)}},[ad,q]);let ae=(0,e.useCallback)(b=>{ac(),g(b),a.push(`/worktrees/${b}`),n()},[ac,g,a,n]),ag=(0,G.FR)((0,G.MS)(G.AN,{activationConstraint:{distance:8}})),ai=(0,e.useCallback)(a=>{let{active:b,over:c}=a;if(!c||b.id===c.id||!aa)return;let d=aa.map(a=>a.repositoryName),e=d.indexOf(String(b.id)),f=d.indexOf(String(c.id));if(-1===e||-1===f)return;let g=(0,H.be)(d,e,f);B(g),ar=g,fetch("/api/sidebar/group-order",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({order:g})}).catch(()=>{B(d),ar=d})},[aa]),aj="flat"===q?0===X.length:(aa?.length??0)===0,ak=k&&0===b.length,am=!ak&&!!m&&0===b.length,an=(0,e.useCallback)(()=>{h()},[h]);return(0,d.jsxs)("nav",{"data-testid":"sidebar","aria-label":s("sidebar.branchNavigation"),className:"h-full flex flex-col bg-sidebar text-sidebar-foreground",role:"navigation",children:[(0,d.jsxs)("div",{"data-testid":"sidebar-header",className:"flex-shrink-0 px-4 py-4 border-b border-sidebar-border",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-y-2",children:[(0,d.jsx)("h2",{className:"min-w-0 truncate text-lg font-semibold text-sidebar-foreground",children:s("sidebar.branches")}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,d.jsx)(ax,{viewMode:q,onToggle:r}),(0,d.jsx)($,{}),(0,d.jsx)(aD,{refreshWorktrees:h}),(0,d.jsx)(S.m_,{content:s("tooltips.repositories"),placement:"bottom",children:(0,d.jsx)(i(),{href:"/repositories","aria-label":s("nav.repositories"),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 transition-colors inline-flex items-center",children:(0,d.jsx)(F.A,{className:ap,"aria-hidden":"true"})})})]})]}),(0,d.jsx)(al,{})]}),(0,d.jsx)("div",{className:"flex-shrink-0 px-4 py-3 border-b border-sidebar-border",children:(0,d.jsx)(_.pd,{type:"text",placeholder:s("sidebar.searchBranches"),value:u,onChange:a=>v(a.target.value),className:"bg-background shadow-none"})}),(0,d.jsx)("div",{ref:w,"data-testid":"branch-list",onScroll:ac,onMouseEnter:V,onMouseLeave:W,className:"flex-1 overflow-y-auto overflow-x-hidden",children:ak?(0,d.jsx)(au,{label:s("sidebar.loadingBranches")}):am?(0,d.jsxs)("div",{"data-testid":"branch-list-error",role:"alert",className:"px-4 py-8 text-center text-sidebar-muted",children:[(0,d.jsx)("p",{className:"text-sm",children:s("sidebar.branchesLoadFailed")}),(0,d.jsx)(_.$n,{type:"button",variant:"secondary",size:"sm",className:"mt-3","data-testid":"branch-list-retry",onClick:an,children:s("sidebar.retryLoadBranches")})]}):aj?(0,d.jsx)("div",{className:"px-4 py-8 text-center text-sidebar-muted",children:s(u?"sidebar.noBranchesFound":"sidebar.noBranchesAvailable")}):"grouped"===q&&aa?(0,d.jsx)(G.Mp,{sensors:ag,collisionDetection:G.fp,onDragEnd:ai,children:(0,d.jsx)(H.gB,{items:aa.map(a=>a.repositoryName),strategy:H._G,children:aa.map(a=>{let b=!x[a.repositoryName]||!!u.trim();return(0,d.jsx)(av,{group:a,isExpanded:b,selectedWorktreeId:f,onToggle:()=>ab(a.repositoryName),onBranchClick:ae,isDragDisabled:!!u.trim()},a.repositoryName)})})}):X.map(a=>(0,d.jsx)(R,{branch:a,isSelected:a.id===f,onClick:()=>ae(a.id)},a.id))}),(0,d.jsxs)("div",{className:"flex-shrink-0 px-4 py-3 border-t border-sidebar-border space-y-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("div",{className:"flex-1",children:(0,d.jsx)(af,{})}),(0,d.jsx)(t,{})]}),(0,d.jsx)(ah,{})]})]})}),au=(0,e.memo)(function({label:a}){return(0,d.jsxs)("div",{"data-testid":"branch-list-skeleton",role:"status","aria-live":"polite",className:"px-4 py-3 space-y-3",children:[(0,d.jsx)("span",{className:"sr-only",children:a}),[0,1,2,3,4].map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(_.EA,{className:"h-2 w-2 rounded-full"}),(0,d.jsx)(_.EA,{className:"h-3 flex-1"})]},a))]})});function av({group:a,isExpanded:b,selectedWorktreeId:c,onToggle:e,onBranchClick:f,isDragDisabled:g}){let{attributes:h,listeners:i,setNodeRef:j,setActivatorNodeRef:k,transform:l,transition:m,isDragging:n}=(0,H.gl)({id:a.repositoryName,disabled:g}),o={transform:I.Ks.Transform.toString(l),transition:m,opacity:n?.5:1};return(0,d.jsxs)("div",{ref:j,style:o,className:"w-full min-w-0",children:[(0,d.jsx)(aw,{repositoryName:a.repositoryName,branchCount:a.branches.length,isExpanded:b,onClick:e,dragHandleRef:k,dragHandleListeners:g?void 0:i,dragHandleAttributes:g?void 0:h}),b&&a.branches.map(a=>(0,d.jsx)(R,{branch:a,isSelected:a.id===c,onClick:()=>f(a.id),showRepositoryName:!1},a.id))]})}function aw({repositoryName:a,branchCount:b,isExpanded:c,onClick:e,dragHandleRef:f,dragHandleListeners:g,dragHandleAttributes:h}){let i=(0,l.c)("common");return(0,d.jsxs)("div",{className:"flex items-center w-full",children:[g&&(0,d.jsx)("div",{ref:f,...g,...h,"aria-label":i("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-colors ",children:(0,d.jsx)(aB,{})}),(0,d.jsxs)("button",{"data-testid":"group-header",type:"button",onClick:e,"aria-expanded":c,className:" flex-1 min-w-0 flex items-center gap-2 px-2 py-2 text-xs font-semibold text-sidebar-muted uppercase tracking-wider focus:outline-none focus:ring-2 focus:ring-inset focus:ring-ring transition-colors ",children:[(0,d.jsx)(ay,{isExpanded:c}),(0,d.jsx)(az,{color:(0,ao.LV)(a)}),(0,d.jsx)(aa.nR,{content:a,className:"flex-1 min-w-0 text-left truncate",children:a}),(0,d.jsx)("span",{className:"text-sidebar-muted font-normal tabular-nums pr-2",children:b})]})]})}function ax({viewMode:a,onToggle:b}){let c=(0,l.c)("common");return(0,d.jsx)(S.m_,{content:c("tooltips.viewMode"),placement:"bottom",children:(0,d.jsx)("button",{"data-testid":"view-mode-toggle",type:"button",onClick:()=>{b("grouped"===a?"flat":"grouped")},"aria-label":c("grouped"===a?"sidebar.switchToFlatView":"sidebar.switchToGroupedView"),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 transition-colors ",children:"grouped"===a?(0,d.jsx)(aA,{className:ap}):(0,d.jsx)(az,{className:ap})})})}function ay({isExpanded:a}){return(0,d.jsx)("svg",{className:`w-3 h-3 flex-shrink-0 transition-transform ${a?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}function az({className:a="w-3.5 h-3.5",color:b}){return(0,d.jsx)("svg",{className:`${a} flex-shrink-0`,viewBox:"0 0 24 24",fill:b??"none",stroke:b?"none":"currentColor",strokeWidth:2*!b,"aria-hidden":"true",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})})}function aA({className:a="w-3 h-3"}){return(0,d.jsx)("svg",{className:a,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}function aB(){return(0,d.jsxs)("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"9",cy:"5",r:"1.5"}),(0,d.jsx)("circle",{cx:"15",cy:"5",r:"1.5"}),(0,d.jsx)("circle",{cx:"9",cy:"12",r:"1.5"}),(0,d.jsx)("circle",{cx:"15",cy:"12",r:"1.5"}),(0,d.jsx)("circle",{cx:"9",cy:"19",r:"1.5"}),(0,d.jsx)("circle",{cx:"15",cy:"19",r:"1.5"})]})}function aC({className:a=""}){return(0,d.jsx)("svg",{className:`${ap} ${a}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.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 aD=(0,e.memo)(function({refreshWorktrees:a}){let[b,c]=(0,e.useState)(!1),f=(0,e.useRef)(!1),{showToast:g}=(0,ai.dj)(),h=(0,l.c)("common"),i=(0,e.useCallback)(async()=>{if(!f.current){f.current=!0,c(!0);try{let b=await an.Rx.sync();await a(),g(h("syncSuccess",{count:b.worktreeCount}),"success",3e3)}catch(a){a instanceof an.hD&&401===a.status?g(h("syncAuthError"),"error",5e3):g(h("syncError"),"error",5e3)}finally{f.current=!1,c(!1)}}},[a,g,h]);return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(S.m_,{content:h("tooltips.sync"),placement:"bottom",children:(0,d.jsx)("button",{type:"button",onClick:i,disabled:b,"aria-label":h("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,d.jsx)(aC,{className:b?"animate-spin":""})})})})});var aE=c(78733),aF=c(44688),aG=c(75903),aH=c(59268),aI=c(38882);let aJ=[{labelKey:"nav.home",href:"/",isActive:a=>"/"===a,icon:(0,d.jsx)(aE.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.chat",href:"/chat",isActive:a=>a.startsWith("/chat"),icon:(0,d.jsx)(aF.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.sessions",href:"/sessions",isActive:a=>a.startsWith("/sessions"),icon:(0,d.jsx)(aG.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.review",href:"/review",isActive:a=>a.startsWith("/review"),icon:(0,d.jsx)(aH.A,{size:20,"aria-hidden":"true"}),showsAttentionBadge:!0},{labelKey:"nav.more",href:"/more",isActive:a=>a.startsWith("/more"),icon:(0,d.jsx)(aI.A,{size:20,"aria-hidden":"true"})}];function aK(){let a=(0,g.usePathname)(),{setOpen:b}=(0,x.C)(),c=(0,l.c)("commandPalette"),e=(0,l.c)("common"),{count:f}=(0,ak.Lv)();return(0,d.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,d.jsxs)("div",{className:"flex items-center justify-around h-14",children:[aJ.map(b=>{let c=b.isActive(a),g=!0===b.showsAttentionBadge&&f>0;return(0,d.jsxs)(k,{href:g?aj.ks:b.href,className:`flex flex-col items-center justify-center flex-1 h-full text-xs transition-colors ${c?"text-accent-600 dark:text-accent-400":"text-muted-foreground hover:text-foreground"}`,children:[(0,d.jsxs)("span",{className:"relative inline-flex",children:[b.icon,!0===b.showsAttentionBadge&&(0,d.jsx)(am,{count:f})]}),(0,d.jsx)("span",{className:"mt-1 whitespace-nowrap",children:e(b.labelKey)})]},b.href)}),(0,d.jsxs)("button",{type:"button","data-testid":"mobile-command-palette-trigger",onClick:()=>b(!0),"aria-label":c("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,d.jsx)(n.A,{size:20,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"mt-1 whitespace-nowrap",children:c("mobileLabel")})]})]})})}var aL=c(67565),aM=c(50987),aN=c(75234),aO=c(34487),aP=c(25345),aQ=c(96558),aR=c(75692),aS=c(57898),aT=c(35595),aU=c(11010),aV=c(89184),aW=c(63157),aX=c(12480);let aY=[{key:"home",href:"/"},{key:"chat",href:"/chat"},{key:"sessions",href:"/sessions"},{key:"repositories",href:"/repositories"},{key:"review",href:"/review"},{key:"skills",href:"/skills"},{key:"more",href:"/more"}],aZ={home:aE.A,chat:aF.A,sessions:aG.A,repositories:aM.A,review:aH.A,skills:aN.A,more:aI.A};function a$(a){return a.isWaitingForResponse?"waiting":a.isProcessing?"running":a.isSessionRunning?"ready":"idle"}let a_=(0,aT.cn)("flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm","text-foreground","data-[selected=true]:bg-accent-500/15 data-[selected=true]:text-accent-700","dark:data-[selected=true]:text-accent-300"),a0="shrink-0 text-muted-foreground";function a1(){let{open:a,setOpen:b}=(0,x.C)(),{setOpen:c}=(0,aV.K)(),f=(0,g.useRouter)(),h=(0,l.c)("commandPalette"),i=(0,l.c)("common"),{theme:j,setTheme:k}=(0,q.D)(),{setSize:m,isMobile:p}=(0,E.Ps)(),{currentLocale:t,switchLocale:u}=ae(),v=(0,aW.rC)(),{showToast:y}=(0,ai.dj)(),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(""),[D,F]=(0,e.useState)([]),G=(0,e.useRef)(null);(0,e.useRef)(null),(0,e.useRef)(a);let H=(0,e.useCallback)((a,c)=>{c&&F(a=>(function(a,b){let c=a.filter(a=>a.kind!==b.kind||a.id!==b.id),d=[b,...c].slice(0,8);try{localStorage.setItem("cm.palette.recents",JSON.stringify(d))}catch{}return d})(a,c)),b(!1),a()},[b]),I=(0,e.useCallback)(async()=>{try{await an.Rx.sync(),await v?.refresh?.(),y(h("actions.syncSuccess"),"success")}catch{y(h("actions.syncError"),"error")}},[v,y,h]),J="dark"===j,L=""===B.trim(),M=v?.error??null,O=v?.isLoading??!1,P=M?[]:v?.worktrees??[],Q=P.length>0,R=!M&&O&&0===P.length,S=[...P].sort((a,b)=>{let c=+!!a.isSessionRunning,d=+!!b.isSessionRunning;if(c!==d)return d-c;let e=a.updatedAt?new Date(a.updatedAt).getTime():0;return(b.updatedAt?new Date(b.updatedAt).getTime():0)-e}),T=L?S.slice(0,8):S,U=[{id:"theme",label:J?h("actions.toLight"):h("actions.toDark"),icon:J?r.A:s.A,run:()=>k(J?"light":"dark")},...p?[]:aX.Uf.map(a=>({id:`displaysize:${a}`,label:`${h("actions.displaySizePrefix")}: ${i(`displaySize.${a}`)}`,icon:aO.A,run:()=>m(a)})),{id:"sync",label:h("actions.syncRepositories"),icon:aP.A,run:()=>{I()}},{id:"locale",label:h("actions.switchLanguage"),icon:aQ.A,run:()=>u("ja"===t?"en":"ja")},{id:"github",label:h("actions.openGitHub"),icon:o.A,run:()=>window.open("https://github.com/kewton/MyCodeBranchDesk","_blank","noopener,noreferrer")},{id:"keyboardShortcuts",label:h("actions.keyboardShortcuts"),icon:aR.A,run:()=>c(!0)}],V=L?D.map(a=>{if("nav"===a.kind){let b=aY.find(b=>b.key===a.id);if(!b)return null;let c=aZ[b.key],e=i(`nav.${b.key}`);return{id:`nav-${b.key}`,value:`recent nav ${b.key}`,node:(0,d.jsxs)(d.Fragment,{children:[c&&(0,d.jsx)(c,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:e})]}),onSelect:()=>H(()=>f.push(b.href),{kind:"nav",id:b.key})}}if("worktree"===a.kind){let b=P.find(b=>b.id===a.id);if(!b)return null;let c=b.repositoryDisplayName||b.repositoryName||"",e=b.branch||b.name;return{id:`worktree-${b.id}`,value:`recent worktree ${b.id}`,node:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(aS.A,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:e}),c&&(0,d.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:c}),(0,d.jsx)(N.m,{status:a$(b),size:"sm",className:c?"ml-2":"ml-auto"})]}),onSelect:()=>H(()=>f.push(`/worktrees/${b.id}`),{kind:"worktree",id:b.id})}}let b=U.find(b=>b.id===a.id);if(!b)return null;let c=b.icon;return{id:`action-${b.id}`,value:`recent action ${b.id}`,node:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:b.label})]}),onSelect:()=>H(b.run,{kind:"action",id:b.id})}}).filter(a=>null!==a):[];return z?(0,K.createPortal)((0,d.jsx)(d.Fragment,{children:a&&(0,d.jsxs)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:aU.M.MODAL},"data-testid":"command-palette",children:[(0,d.jsx)("div",{"data-state":"open","aria-hidden":"true",className:"fixed inset-0 bg-black/40 backdrop-blur-sm transition-opacity data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-200",onClick:()=>b(!1)}),(0,d.jsx)("div",{className:"relative flex min-h-full items-start justify-center p-4 pt-[15vh]",children:(0,d.jsx)("div",{"data-state":"open","data-testid":"command-palette-panel",className:(0,aT.cn)("relative w-full max-w-lg overflow-hidden rounded-xl bg-surface/95 shadow-2xl ring-1 ring-border backdrop-blur-xl","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:duration-200"),children:(0,d.jsxs)(aL.uB,{label:h("title"),className:(0,aT.cn)("flex flex-col","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1 [&_[cmdk-group-heading]]:pt-2","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground"),children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[(0,d.jsx)(n.A,{size:16,strokeWidth:2,"aria-hidden":"true",className:"shrink-0 text-muted-foreground"}),(0,d.jsx)(aL.uB.Input,{ref:G,value:B,onValueChange:C,placeholder:h("placeholder"),"data-testid":"command-palette-input",className:"flex-1 bg-transparent py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground"})]}),(0,d.jsxs)(aL.uB.List,{className:"max-h-[min(60vh,360px)] overflow-y-auto p-2",children:[(0,d.jsx)(aL.uB.Empty,{"data-testid":"command-palette-empty",className:"py-6 text-center text-sm text-muted-foreground",children:h("empty")}),R&&(0,d.jsx)(aL.uB.Loading,{"data-testid":"command-palette-loading",className:"py-6 text-center text-sm text-muted-foreground",children:h("loading")}),V.length>0&&(0,d.jsx)(aL.uB.Group,{heading:h("groups.recent"),children:V.map(a=>(0,d.jsx)(aL.uB.Item,{value:a.value,onSelect:a.onSelect,className:a_,children:a.node},a.id))}),(0,d.jsx)(aL.uB.Group,{heading:h("groups.navigation"),children:aY.map(a=>{let b=i(`nav.${a.key}`),c=aZ[a.key];return(0,d.jsxs)(aL.uB.Item,{value:`nav ${b} ${a.href}`,onSelect:()=>H(()=>f.push(a.href),{kind:"nav",id:a.key}),className:a_,children:[c&&(0,d.jsx)(c,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:b})]},a.key)})}),Q&&(0,d.jsx)(aL.uB.Group,{heading:h("groups.worktrees"),children:T.map(a=>{let b=a.repositoryDisplayName||a.repositoryName||"",c=a.branch||a.name;return(0,d.jsxs)(aL.uB.Item,{value:`worktree ${b} ${c} ${a.name} ${a.id}`,onSelect:()=>H(()=>f.push(`/worktrees/${a.id}`),{kind:"worktree",id:a.id}),className:a_,children:[(0,d.jsx)(aS.A,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:c}),b&&(0,d.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:b}),(0,d.jsx)(N.m,{status:a$(a),size:"sm",className:b?"ml-2":"ml-auto"})]},a.id)})}),(0,d.jsx)(aL.uB.Group,{heading:h("groups.actions"),children:U.map(a=>{let b=a.icon;return(0,d.jsxs)(aL.uB.Item,{value:`action ${a.id} ${a.label}`,onSelect:()=>H(a.run,{kind:"action",id:a.id}),className:a_,children:[(0,d.jsx)(b,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:a.label})]},a.id)})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-3 border-t border-border bg-surface-2 px-3 py-2 text-[11px] text-muted-foreground",children:[(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)(w.u,{children:"↑"}),(0,d.jsx)(w.u,{children:"↓"}),h("footer.navigate")]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)(w.u,{children:"↵"}),h("footer.select")]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)(w.u,{children:"esc"}),h("footer.close")]})]})]})})})]})}),document.body):null}var a2=c(98033);let a3=["global","terminal","composer","editor"],a4=[{id:"commandPalette",keys:["MOD","K"],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:"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 a5(){let{open:a,setOpen:b}=(0,aV.K)(),{open:c}=(0,x.C)(),f=(0,l.c)("keyboardShortcuts"),[g,h]=(0,e.useState)(!1);(0,e.useRef)(a),(0,e.useRef)(c);let i=function(a=a4){return a3.map(b=>({scope:b,shortcuts:a.filter(a=>a.scope===b)})).filter(a=>a.shortcuts.length>0)}();return(0,d.jsx)(a2.a,{isOpen:a,onClose:()=>b(!1),title:f("title"),size:"md",children:(0,d.jsx)("div",{"data-testid":"keyboard-shortcuts-overlay",className:"space-y-6",children:i.map(({scope:a,shortcuts:b})=>(0,d.jsxs)("section",{"data-testid":`keyboard-shortcuts-scope-${a}`,children:[(0,d.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:f(`scopes.${a}`)}),(0,d.jsx)("ul",{className:"divide-y divide-border",children:b.map(a=>(0,d.jsxs)("li",{"data-testid":`keyboard-shortcut-${a.id}`,className:"flex items-center justify-between gap-4 py-2",children:[(0,d.jsx)("span",{className:"text-sm text-foreground",children:f(`shortcuts.${a.id}`)}),(0,d.jsx)("span",{className:"flex flex-shrink-0 items-center gap-1",children:a.keys.map((a,b)=>(0,d.jsx)(w.u,{children:"MOD"===a?g?"⌘":"Ctrl":a},b))})]},a.id))})]},a))})})}var a6=c(16945),a7=c(47089),a8=c(12055);function a9(){let a=(0,l.c)("common"),[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(null),h=(0,e.useCallback)(a=>{if(a.type!==a8.Oo)return;let{serverVersion:b,clientVersion:d}=a;"string"==typeof b&&"string"==typeof d&&b&&d&&b!==f&&c({serverVersion:b,clientVersion:d})},[f]);(0,u.T3)(h);let i=(0,e.useCallback)(()=>{window.location.reload()},[]),j=(0,e.useCallback)(()=>{c(a=>(a&&g(a.serverVersion),null))},[]);return b?(0,d.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:aU.M.TOAST},children:[(0,d.jsx)(a6.A,{className:"h-5 w-5 shrink-0 mt-0.5","aria-hidden":"true"}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-sm",children:[(0,d.jsx)("span",{className:"font-semibold",children:a("versionMismatch.title")}),(0,d.jsx)("span",{children:a("versionMismatch.description",{serverVersion:b.serverVersion,clientVersion:b.clientVersion})})]}),(0,d.jsxs)("button",{type:"button","data-testid":"version-mismatch-reload",onClick:i,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,d.jsx)(aP.A,{className:"h-4 w-4","aria-hidden":"true"}),a("versionMismatch.reload")]}),(0,d.jsx)("button",{type:"button","data-testid":"version-mismatch-dismiss",onClick:j,"aria-label":a("versionMismatch.dismiss"),className:"shrink-0 hover:opacity-70 focus:outline-none focus:ring-2 focus:ring-offset-2",children:(0,d.jsx)(a7.A,{className:"h-4 w-4","aria-hidden":"true"})})]}):null}let ba="transform transition-transform duration-300 ease-out",bb=(0,e.memo)(function({children:a}){let{isOpen:b,isMobileDrawerOpen:c,closeMobileDrawer:f,width:h,setWidth:i}=(0,A.VF)(),j=(0,B.a)(),{showSidebar:k,showGlobalNav:l}=function(){var a=(0,g.usePathname)();for(let b of D)if(a.startsWith(b.prefix))return{...C,...b.config};return{...C}}(),{factor:m}=(0,E.Ps)(),n=Math.round(160*m),o=Math.round(480*m),p=Math.round(Math.min(o,Math.max(n,h*m))),q=(0,e.useRef)(null),r=(0,e.useRef)(null),s=(0,e.useCallback)(a=>{i(Math.round(a/m))},[i,m]);return j?(0,d.jsxs)("div",{"data-testid":"app-shell",className:"h-screen flex flex-col",children:[c&&(0,d.jsx)("div",{"data-testid":"drawer-overlay",className:"fixed inset-0 bg-black/50 z-40",onClick:f,"aria-hidden":"true"}),k&&(0,d.jsx)("aside",{"data-testid":"sidebar-container",className:`
11
+ `,children:[(0,d.jsx)("span",{children:c.label}),a===c.key&&(0,d.jsx)("span",{className:"text-xs",children:"asc"===b?"ASC":"DESC"})]},c.key))})]})});function V({className:a}){return(0,d.jsx)("svg",{className:a,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12"})})}function W({className:a}){return(0,d.jsx)("svg",{className:a,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"})})}function X({className:a}){return(0,d.jsx)("svg",{className:a,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}let Y=[{key:"updatedAt",labelKey:"sort.updatedAt"},{key:"repositoryName",labelKey:"sort.repositoryName"},{key:"branchName",labelKey:"sort.branchName"},{key:"status",labelKey:"sort.status"}],Z={updatedAt:"desc"},$=(0,e.memo)(function(){let{sortKey:a,sortDirection:b,setSortKey:c,setSortDirection:f}=(0,A.VF)(),g=(0,l.c)("common"),h=(0,e.useMemo)(()=>Y.map(({key:a,labelKey:b})=>({key:a,label:g(b)})),[g]);return(0,d.jsx)(U,{sortKey:a,sortDirection:b,onSortKeyChange:c,onSortDirectionChange:f,options:h,defaultDirections:Z,compact:!0,tooltip:g("tooltips.sort"),iconClassName:"w-4 h-4"})});var _=c(15737),aa=c(81497),ab=c(55992);let ac=["en","ja"],ad={en:"English",ja:"日本語"};function ae(){return{currentLocale:(0,ab.Ym)(),switchLocale:a=>{if(ac.includes(a)){let b="https:"===window.location.protocol;document.cookie=`locale=${a};path=/;max-age=31536000;SameSite=Lax${b?";Secure":""}`,localStorage.setItem("locale",a),window.location.reload()}}}}function af(){let{currentLocale:a,switchLocale:b}=ae(),c=(0,l.c)("common");return(0,d.jsx)("select",{value:a,onChange:a=>b(a.target.value),"data-testid":"locale-switcher","aria-label":c("language"),className:" w-full px-3 py-2 rounded-md bg-sidebar text-sidebar-foreground border border-sidebar-border focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent text-sm ",children:ac.map(a=>(0,d.jsx)("option",{value:a,children:ad[a]},a))})}var ag=c(84342);function ah(){let a=(0,l.c)("auth"),b=(0,ag.H)(),[c,f]=(0,e.useState)(!1);if(!b)return null;async function g(){f(!0);try{await fetch("/api/auth/logout",{method:"POST"}),window.location.href="/login"}catch{window.location.href="/login"}}return(0,d.jsx)("button",{type:"button",onClick:g,disabled:c,"data-testid":"logout-button",className:" w-full px-3 py-2 text-sm text-left rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring disabled:opacity-50 transition-colors ",children:c?"...":a("logout.button")})}var ai=c(63474),aj=c(77560),ak=c(19463);function al(){let a=(0,l.c)("common"),{count:b}=(0,ak.Lv)();return 0===b?null:(0,d.jsxs)(i(),{href:aj.ks,"data-testid":"attention-badge","aria-label":a("attention.badgeLabel",{count:b}),className:"mt-2 inline-flex w-full items-center justify-between gap-2 rounded-md border border-warning-border bg-warning-subtle px-2 py-1 text-xs font-medium text-warning-foreground transition-colors hover:brightness-105 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,d.jsx)("span",{className:"min-w-0 truncate",children:a("attention.label")}),(0,d.jsx)("span",{"data-testid":"attention-badge-count",className:"tabular-nums font-semibold",children:b})]})}function am({count:a}){let b=(0,l.c)("common");return 0===a?null:(0,d.jsx)("span",{"data-testid":"attention-badge-bubble",role:"status","aria-label":b("attention.badgeLabel",{count:a}),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:a>99?"99+":a})}var an=c(78352),ao=c(32482);let ap="w-4 h-4",aq=0,ar=null;function as(){return ar??[]}let at=(0,e.memo)(function(){let a=(0,j.Hq)(),{worktrees:b,repositories:c,selectedWorktreeId:f,selectWorktree:g,refreshWorktrees:h,isLoading:k,error:m}=(0,J.$f)(),{closeMobileDrawer:n,sortKey:o,sortDirection:p,viewMode:q,setViewMode:r}=(0,A.VF)(),s=(0,l.c)("common"),[u,v]=(0,e.useState)(""),w=(0,e.useRef)(null),[x,y]=(0,e.useState)(()=>({})),[z,B]=(0,e.useState)(as),C=(0,e.useRef)(!1);(0,e.useEffect)(()=>{C.current||(C.current=!0,fetch("/api/sidebar/group-order").then(a=>a.json()).then(a=>{a.success&&Array.isArray(a.order)&&(B(a.order),ar=a.order)}).catch(()=>{}))},[]);let D=(0,e.useMemo)(()=>(0,ao.UZ)(c),[c]),E=(0,e.useMemo)(()=>(0,ao.s6)(b,D),[b,D]),I=(0,e.useMemo)(()=>E.map(M.XK),[E]),K=(0,e.useDeferredValue)(I),L=(0,e.useRef)(null),N=(0,e.useRef)(null),[O,P]=(0,e.useState)(0);(0,e.useEffect)(()=>()=>{null!==N.current&&clearTimeout(N.current)},[]);let Q=(0,e.useCallback)(()=>{null!==N.current&&(clearTimeout(N.current),N.current=null),L.current=null},[]),T=(0,e.useMemo)(()=>{let a=L.current;return!a||0===a.items.length||Date.now()>=a.expiresAt?K:a.items},[K,O]),U=(0,e.useRef)(T);(0,e.useLayoutEffect)(()=>{U.current=T;let a=L.current;a&&0===a.items.length&&K.length>0&&Q()});let V=(0,e.useCallback)(()=>{if(0===U.current.length)return;null!==N.current&&(clearTimeout(N.current),N.current=null);let a=L.current;if(a&&Date.now()<a.expiresAt){L.current={...a,expiresAt:1/0};return}L.current={items:U.current,expiresAt:1/0}},[]),W=(0,e.useCallback)(()=>{L.current&&(L.current={...L.current,expiresAt:Date.now()+1e3},null!==N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{Q(),P(a=>a+1)},1e3))},[Q]),{sortedItems:X,groupedItems:Y}=function(a){let{items:b,sortKey:c,sortDirection:d,viewMode:f,filterText:g}=a,h=(0,e.useMemo)(()=>{if(!g)return b;let a=g.toLowerCase();return b.filter(b=>b.name.toLowerCase().includes(a)||b.repositoryName.toLowerCase().includes(a))},[b,g]);return{sortedItems:(0,e.useMemo)(()=>(0,ao.Xn)(h,c,d),[h,c,d]),groupedItems:(0,e.useMemo)(()=>"grouped"===f?(0,ao._s)(h,c,d):[],[h,c,d,f])}}({items:T,sortKey:o,sortDirection:p,viewMode:q,filterText:u}),Z=(0,e.useMemo)(()=>{if("grouped"!==q||!Y)return null;if(u.trim()||0===z.length)return Y;let a=new Map(z.map((a,b)=>[a,b]));return[...Y].sort((b,c)=>{let d=a.has(b.repositoryName)?a.get(b.repositoryName):1/0,e=a.has(c.repositoryName)?a.get(c.repositoryName):1/0;return d===e?b.repositoryName.localeCompare(c.repositoryName):d-e})},[q,Y,z,u]),aa="grouped"===q?Z:null;(0,e.useEffect)(()=>{},[x]);let ab=(0,e.useCallback)(a=>{y(b=>({...b,[a]:!b[a]}))},[]),ac=(0,e.useCallback)(()=>{var a;aq=Number.isFinite(a=w.current?.scrollTop??0)&&a>0?a:0},[]),ad=X.length>0||(aa?.length??0)>0;(0,e.useEffect)(()=>{let a=w.current;if(!a)return;let b=window.requestAnimationFrame(()=>{a.scrollTop=aq});return()=>{window.cancelAnimationFrame(b)}},[ad,q]);let ae=(0,e.useCallback)(b=>{ac(),g(b),a.push(`/worktrees/${b}`),n()},[ac,g,a,n]),ag=(0,G.FR)((0,G.MS)(G.AN,{activationConstraint:{distance:8}})),ai=(0,e.useCallback)(a=>{let{active:b,over:c}=a;if(!c||b.id===c.id||!aa)return;let d=aa.map(a=>a.repositoryName),e=d.indexOf(String(b.id)),f=d.indexOf(String(c.id));if(-1===e||-1===f)return;let g=(0,H.be)(d,e,f);B(g),ar=g,fetch("/api/sidebar/group-order",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({order:g})}).catch(()=>{B(d),ar=d})},[aa]),aj="flat"===q?0===X.length:(aa?.length??0)===0,ak=k&&0===b.length,am=!ak&&!!m&&0===b.length,an=(0,e.useCallback)(()=>{h()},[h]);return(0,d.jsxs)("nav",{"data-testid":"sidebar","aria-label":s("sidebar.branchNavigation"),className:"h-full flex flex-col bg-sidebar text-sidebar-foreground",role:"navigation",children:[(0,d.jsxs)("div",{"data-testid":"sidebar-header",className:"flex-shrink-0 px-4 py-4 border-b border-sidebar-border",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-y-2",children:[(0,d.jsx)("h2",{className:"min-w-0 truncate text-lg font-semibold text-sidebar-foreground",children:s("sidebar.branches")}),(0,d.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,d.jsx)(ax,{viewMode:q,onToggle:r}),(0,d.jsx)($,{}),(0,d.jsx)(aD,{refreshWorktrees:h}),(0,d.jsx)(S.m_,{content:s("tooltips.repositories"),placement:"bottom",children:(0,d.jsx)(i(),{href:"/repositories","aria-label":s("nav.repositories"),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 transition-colors inline-flex items-center",children:(0,d.jsx)(F.A,{className:ap,"aria-hidden":"true"})})})]})]}),(0,d.jsx)(al,{})]}),(0,d.jsx)("div",{className:"flex-shrink-0 px-4 py-3 border-b border-sidebar-border",children:(0,d.jsx)(_.pd,{type:"text",placeholder:s("sidebar.searchBranches"),value:u,onChange:a=>v(a.target.value),className:"bg-background shadow-none"})}),(0,d.jsx)("div",{ref:w,"data-testid":"branch-list",onScroll:ac,onMouseEnter:V,onMouseLeave:W,className:"flex-1 overflow-y-auto overflow-x-hidden",children:ak?(0,d.jsx)(au,{label:s("sidebar.loadingBranches")}):am?(0,d.jsxs)("div",{"data-testid":"branch-list-error",role:"alert",className:"px-4 py-8 text-center text-sidebar-muted",children:[(0,d.jsx)("p",{className:"text-sm",children:s("sidebar.branchesLoadFailed")}),(0,d.jsx)(_.$n,{type:"button",variant:"secondary",size:"sm",className:"mt-3","data-testid":"branch-list-retry",onClick:an,children:s("sidebar.retryLoadBranches")})]}):aj?(0,d.jsx)("div",{className:"px-4 py-8 text-center text-sidebar-muted",children:s(u?"sidebar.noBranchesFound":"sidebar.noBranchesAvailable")}):"grouped"===q&&aa?(0,d.jsx)(G.Mp,{sensors:ag,collisionDetection:G.fp,onDragEnd:ai,children:(0,d.jsx)(H.gB,{items:aa.map(a=>a.repositoryName),strategy:H._G,children:aa.map(a=>{let b=!x[a.repositoryName]||!!u.trim();return(0,d.jsx)(av,{group:a,isExpanded:b,selectedWorktreeId:f,onToggle:()=>ab(a.repositoryName),onBranchClick:ae,isDragDisabled:!!u.trim()},a.repositoryName)})})}):X.map(a=>(0,d.jsx)(R,{branch:a,isSelected:a.id===f,onClick:()=>ae(a.id)},a.id))}),(0,d.jsxs)("div",{className:"flex-shrink-0 px-4 py-3 border-t border-sidebar-border space-y-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("div",{className:"flex-1",children:(0,d.jsx)(af,{})}),(0,d.jsx)(t,{})]}),(0,d.jsx)(ah,{})]})]})}),au=(0,e.memo)(function({label:a}){return(0,d.jsxs)("div",{"data-testid":"branch-list-skeleton",role:"status","aria-live":"polite",className:"px-4 py-3 space-y-3",children:[(0,d.jsx)("span",{className:"sr-only",children:a}),[0,1,2,3,4].map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)(_.EA,{className:"h-2 w-2 rounded-full"}),(0,d.jsx)(_.EA,{className:"h-3 flex-1"})]},a))]})});function av({group:a,isExpanded:b,selectedWorktreeId:c,onToggle:e,onBranchClick:f,isDragDisabled:g}){let{attributes:h,listeners:i,setNodeRef:j,setActivatorNodeRef:k,transform:l,transition:m,isDragging:n}=(0,H.gl)({id:a.repositoryName,disabled:g}),o={transform:I.Ks.Transform.toString(l),transition:m,opacity:n?.5:1};return(0,d.jsxs)("div",{ref:j,style:o,className:"w-full min-w-0",children:[(0,d.jsx)(aw,{repositoryName:a.repositoryName,branchCount:a.branches.length,isExpanded:b,onClick:e,dragHandleRef:k,dragHandleListeners:g?void 0:i,dragHandleAttributes:g?void 0:h}),b&&a.branches.map(a=>(0,d.jsx)(R,{branch:a,isSelected:a.id===c,onClick:()=>f(a.id),showRepositoryName:!1},a.id))]})}function aw({repositoryName:a,branchCount:b,isExpanded:c,onClick:e,dragHandleRef:f,dragHandleListeners:g,dragHandleAttributes:h}){let i=(0,l.c)("common");return(0,d.jsxs)("div",{className:"flex items-center w-full",children:[g&&(0,d.jsx)("div",{ref:f,...g,...h,"aria-label":i("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-colors ",children:(0,d.jsx)(aB,{})}),(0,d.jsxs)("button",{"data-testid":"group-header",type:"button",onClick:e,"aria-expanded":c,className:" flex-1 min-w-0 flex items-center gap-2 px-2 py-2 text-xs font-semibold text-sidebar-muted uppercase tracking-wider focus:outline-none focus:ring-2 focus:ring-inset focus:ring-ring transition-colors ",children:[(0,d.jsx)(ay,{isExpanded:c}),(0,d.jsx)(az,{color:(0,ao.LV)(a)}),(0,d.jsx)(aa.nR,{content:a,className:"flex-1 min-w-0 text-left truncate",children:a}),(0,d.jsx)("span",{className:"text-sidebar-muted font-normal tabular-nums pr-2",children:b})]})]})}function ax({viewMode:a,onToggle:b}){let c=(0,l.c)("common");return(0,d.jsx)(S.m_,{content:c("tooltips.viewMode"),placement:"bottom",children:(0,d.jsx)("button",{"data-testid":"view-mode-toggle",type:"button",onClick:()=>{b("grouped"===a?"flat":"grouped")},"aria-label":c("grouped"===a?"sidebar.switchToFlatView":"sidebar.switchToGroupedView"),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 transition-colors ",children:"grouped"===a?(0,d.jsx)(aA,{className:ap}):(0,d.jsx)(az,{className:ap})})})}function ay({isExpanded:a}){return(0,d.jsx)("svg",{className:`w-3 h-3 flex-shrink-0 transition-transform ${a?"rotate-90":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}function az({className:a="w-3.5 h-3.5",color:b}){return(0,d.jsx)("svg",{className:`${a} flex-shrink-0`,viewBox:"0 0 24 24",fill:b??"none",stroke:b?"none":"currentColor",strokeWidth:2*!b,"aria-hidden":"true",children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})})}function aA({className:a="w-3 h-3"}){return(0,d.jsx)("svg",{className:a,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}function aB(){return(0,d.jsxs)("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:[(0,d.jsx)("circle",{cx:"9",cy:"5",r:"1.5"}),(0,d.jsx)("circle",{cx:"15",cy:"5",r:"1.5"}),(0,d.jsx)("circle",{cx:"9",cy:"12",r:"1.5"}),(0,d.jsx)("circle",{cx:"15",cy:"12",r:"1.5"}),(0,d.jsx)("circle",{cx:"9",cy:"19",r:"1.5"}),(0,d.jsx)("circle",{cx:"15",cy:"19",r:"1.5"})]})}function aC({className:a=""}){return(0,d.jsx)("svg",{className:`${ap} ${a}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,d.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 aD=(0,e.memo)(function({refreshWorktrees:a}){let[b,c]=(0,e.useState)(!1),f=(0,e.useRef)(!1),{showToast:g}=(0,ai.dj)(),h=(0,l.c)("common"),i=(0,e.useCallback)(async()=>{if(!f.current){f.current=!0,c(!0);try{let b=await an.Rx.sync();await a(),g(h("syncSuccess",{count:b.worktreeCount}),"success",3e3)}catch(a){a instanceof an.hD&&401===a.status?g(h("syncAuthError"),"error",5e3):g(h("syncError"),"error",5e3)}finally{f.current=!1,c(!1)}}},[a,g,h]);return(0,d.jsx)(d.Fragment,{children:(0,d.jsx)(S.m_,{content:h("tooltips.sync"),placement:"bottom",children:(0,d.jsx)("button",{type:"button",onClick:i,disabled:b,"aria-label":h("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,d.jsx)(aC,{className:b?"animate-spin":""})})})})});var aE=c(78733),aF=c(44688),aG=c(75903),aH=c(59268),aI=c(38882);let aJ=[{labelKey:"nav.home",href:"/",isActive:a=>"/"===a,icon:(0,d.jsx)(aE.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.chat",href:"/chat",isActive:a=>a.startsWith("/chat"),icon:(0,d.jsx)(aF.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.sessions",href:"/sessions",isActive:a=>a.startsWith("/sessions"),icon:(0,d.jsx)(aG.A,{size:20,"aria-hidden":"true"})},{labelKey:"nav.review",href:"/review",isActive:a=>a.startsWith("/review"),icon:(0,d.jsx)(aH.A,{size:20,"aria-hidden":"true"}),showsAttentionBadge:!0},{labelKey:"nav.more",href:"/more",isActive:a=>a.startsWith("/more"),icon:(0,d.jsx)(aI.A,{size:20,"aria-hidden":"true"})}];function aK(){let a=(0,g.usePathname)(),{setOpen:b}=(0,x.C)(),c=(0,l.c)("commandPalette"),e=(0,l.c)("common"),{count:f}=(0,ak.Lv)();return(0,d.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,d.jsxs)("div",{className:"flex items-center justify-around h-14",children:[aJ.map(b=>{let c=b.isActive(a),g=!0===b.showsAttentionBadge&&f>0;return(0,d.jsxs)(k,{href:g?aj.ks:b.href,className:`flex flex-col items-center justify-center flex-1 h-full text-xs transition-colors ${c?"text-accent-600 dark:text-accent-400":"text-muted-foreground hover:text-foreground"}`,children:[(0,d.jsxs)("span",{className:"relative inline-flex",children:[b.icon,!0===b.showsAttentionBadge&&(0,d.jsx)(am,{count:f})]}),(0,d.jsx)("span",{className:"mt-1 whitespace-nowrap",children:e(b.labelKey)})]},b.href)}),(0,d.jsxs)("button",{type:"button","data-testid":"mobile-command-palette-trigger",onClick:()=>b(!0),"aria-label":c("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,d.jsx)(n.A,{size:20,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"mt-1 whitespace-nowrap",children:c("mobileLabel")})]})]})})}var aL=c(67565),aM=c(50987),aN=c(75234),aO=c(34487),aP=c(25345),aQ=c(96558),aR=c(75692),aS=c(57898),aT=c(35595),aU=c(11010),aV=c(89184),aW=c(63157),aX=c(12480);let aY=[{key:"home",href:"/"},{key:"chat",href:"/chat"},{key:"sessions",href:"/sessions"},{key:"repositories",href:"/repositories"},{key:"review",href:"/review"},{key:"skills",href:"/skills"},{key:"more",href:"/more"}],aZ={home:aE.A,chat:aF.A,sessions:aG.A,repositories:aM.A,review:aH.A,skills:aN.A,more:aI.A};function a$(a){return a.isWaitingForResponse?"waiting":a.isProcessing?"running":a.isSessionRunning?"ready":"idle"}let a_=(0,aT.cn)("flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm","text-foreground","data-[selected=true]:bg-accent-500/15 data-[selected=true]:text-accent-700","dark:data-[selected=true]:text-accent-300"),a0="shrink-0 text-muted-foreground";function a1(){let{open:a,setOpen:b}=(0,x.C)(),{setOpen:c}=(0,aV.K)(),f=(0,g.useRouter)(),h=(0,l.c)("commandPalette"),i=(0,l.c)("common"),{theme:j,setTheme:k}=(0,q.D)(),{setSize:m,isMobile:p}=(0,E.Ps)(),{currentLocale:t,switchLocale:u}=ae(),v=(0,aW.rC)(),{showToast:y}=(0,ai.dj)(),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(""),[D,F]=(0,e.useState)([]),G=(0,e.useRef)(null);(0,e.useRef)(null),(0,e.useRef)(a);let H=(0,e.useCallback)((a,c)=>{c&&F(a=>(function(a,b){let c=a.filter(a=>a.kind!==b.kind||a.id!==b.id),d=[b,...c].slice(0,8);try{localStorage.setItem("cm.palette.recents",JSON.stringify(d))}catch{}return d})(a,c)),b(!1),a()},[b]),I=(0,e.useCallback)(async()=>{try{await an.Rx.sync(),await v?.refresh?.(),y(h("actions.syncSuccess"),"success")}catch{y(h("actions.syncError"),"error")}},[v,y,h]),J="dark"===j,L=""===B.trim(),M=v?.error??null,O=v?.isLoading??!1,P=M?[]:v?.worktrees??[],Q=P.length>0,R=!M&&O&&0===P.length,S=[...P].sort((a,b)=>{let c=+!!a.isSessionRunning,d=+!!b.isSessionRunning;if(c!==d)return d-c;let e=a.updatedAt?new Date(a.updatedAt).getTime():0;return(b.updatedAt?new Date(b.updatedAt).getTime():0)-e}),T=L?S.slice(0,8):S,U=[{id:"theme",label:J?h("actions.toLight"):h("actions.toDark"),icon:J?r.A:s.A,run:()=>k(J?"light":"dark")},...p?[]:aX.Uf.map(a=>({id:`displaysize:${a}`,label:`${h("actions.displaySizePrefix")}: ${i(`displaySize.${a}`)}`,icon:aO.A,run:()=>m(a)})),{id:"sync",label:h("actions.syncRepositories"),icon:aP.A,run:()=>{I()}},{id:"locale",label:h("actions.switchLanguage"),icon:aQ.A,run:()=>u("ja"===t?"en":"ja")},{id:"github",label:h("actions.openGitHub"),icon:o.A,run:()=>window.open("https://github.com/kewton/MyCodeBranchDesk","_blank","noopener,noreferrer")},{id:"keyboardShortcuts",label:h("actions.keyboardShortcuts"),icon:aR.A,run:()=>c(!0)}],V=L?D.map(a=>{if("nav"===a.kind){let b=aY.find(b=>b.key===a.id);if(!b)return null;let c=aZ[b.key],e=i(`nav.${b.key}`);return{id:`nav-${b.key}`,value:`recent nav ${b.key}`,node:(0,d.jsxs)(d.Fragment,{children:[c&&(0,d.jsx)(c,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:e})]}),onSelect:()=>H(()=>f.push(b.href),{kind:"nav",id:b.key})}}if("worktree"===a.kind){let b=P.find(b=>b.id===a.id);if(!b)return null;let c=b.repositoryDisplayName||b.repositoryName||"",e=b.branch||b.name;return{id:`worktree-${b.id}`,value:`recent worktree ${b.id}`,node:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(aS.A,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:e}),c&&(0,d.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:c}),(0,d.jsx)(N.m,{status:a$(b),size:"sm",className:c?"ml-2":"ml-auto"})]}),onSelect:()=>H(()=>f.push(`/worktrees/${b.id}`),{kind:"worktree",id:b.id})}}let b=U.find(b=>b.id===a.id);if(!b)return null;let c=b.icon;return{id:`action-${b.id}`,value:`recent action ${b.id}`,node:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(c,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:b.label})]}),onSelect:()=>H(b.run,{kind:"action",id:b.id})}}).filter(a=>null!==a):[];return z?(0,K.createPortal)((0,d.jsx)(d.Fragment,{children:a&&(0,d.jsxs)("div",{className:"fixed inset-0 overflow-y-auto",style:{zIndex:aU.M.MODAL},"data-testid":"command-palette",children:[(0,d.jsx)("div",{"data-state":"open","aria-hidden":"true",className:"fixed inset-0 bg-black/40 backdrop-blur-sm transition-opacity data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:duration-200",onClick:()=>b(!1)}),(0,d.jsx)("div",{className:"relative flex min-h-full items-start justify-center p-4 pt-[15vh]",children:(0,d.jsx)("div",{"data-state":"open","data-testid":"command-palette-panel",className:(0,aT.cn)("relative w-full max-w-lg overflow-hidden rounded-xl bg-surface/95 shadow-2xl ring-1 ring-border backdrop-blur-xl","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:duration-200"),children:(0,d.jsxs)(aL.uB,{label:h("title"),className:(0,aT.cn)("flex flex-col","[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1 [&_[cmdk-group-heading]]:pt-2","[&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground"),children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[(0,d.jsx)(n.A,{size:16,strokeWidth:2,"aria-hidden":"true",className:"shrink-0 text-muted-foreground"}),(0,d.jsx)(aL.uB.Input,{ref:G,value:B,onValueChange:C,placeholder:h("placeholder"),"data-testid":"command-palette-input",className:"flex-1 bg-transparent py-3 text-sm text-foreground outline-none placeholder:text-muted-foreground"})]}),(0,d.jsxs)(aL.uB.List,{className:"max-h-[min(60vh,360px)] overflow-y-auto p-2",children:[(0,d.jsx)(aL.uB.Empty,{"data-testid":"command-palette-empty",className:"py-6 text-center text-sm text-muted-foreground",children:h("empty")}),R&&(0,d.jsx)(aL.uB.Loading,{"data-testid":"command-palette-loading",className:"py-6 text-center text-sm text-muted-foreground",children:h("loading")}),V.length>0&&(0,d.jsx)(aL.uB.Group,{heading:h("groups.recent"),children:V.map(a=>(0,d.jsx)(aL.uB.Item,{value:a.value,onSelect:a.onSelect,className:a_,children:a.node},a.id))}),(0,d.jsx)(aL.uB.Group,{heading:h("groups.navigation"),children:aY.map(a=>{let b=i(`nav.${a.key}`),c=aZ[a.key];return(0,d.jsxs)(aL.uB.Item,{value:`nav ${b} ${a.href}`,onSelect:()=>H(()=>f.push(a.href),{kind:"nav",id:a.key}),className:a_,children:[c&&(0,d.jsx)(c,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:b})]},a.key)})}),Q&&(0,d.jsx)(aL.uB.Group,{heading:h("groups.worktrees"),children:T.map(a=>{let b=a.repositoryDisplayName||a.repositoryName||"",c=a.branch||a.name;return(0,d.jsxs)(aL.uB.Item,{value:`worktree ${b} ${c} ${a.name} ${a.id}`,onSelect:()=>H(()=>f.push(`/worktrees/${a.id}`),{kind:"worktree",id:a.id}),className:a_,children:[(0,d.jsx)(aS.A,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:c}),b&&(0,d.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:b}),(0,d.jsx)(N.m,{status:a$(a),size:"sm",className:b?"ml-2":"ml-auto"})]},a.id)})}),(0,d.jsx)(aL.uB.Group,{heading:h("groups.actions"),children:U.map(a=>{let b=a.icon;return(0,d.jsxs)(aL.uB.Item,{value:`action ${a.id} ${a.label}`,onSelect:()=>H(a.run,{kind:"action",id:a.id}),className:a_,children:[(0,d.jsx)(b,{size:16,className:a0,"aria-hidden":"true"}),(0,d.jsx)("span",{className:"truncate",children:a.label})]},a.id)})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-3 border-t border-border bg-surface-2 px-3 py-2 text-[11px] text-muted-foreground",children:[(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)(w.u,{children:"↑"}),(0,d.jsx)(w.u,{children:"↓"}),h("footer.navigate")]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)(w.u,{children:"↵"}),h("footer.select")]}),(0,d.jsxs)("span",{className:"flex items-center gap-1",children:[(0,d.jsx)(w.u,{children:"esc"}),h("footer.close")]})]})]})})})]})}),document.body):null}var a2=c(98033);let a3=["global","terminal","composer","editor"],a4=[{id:"commandPalette",keys:["MOD","K"],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 a5(){let{open:a,setOpen:b}=(0,aV.K)(),{open:c}=(0,x.C)(),f=(0,l.c)("keyboardShortcuts"),[g,h]=(0,e.useState)(!1);(0,e.useRef)(a),(0,e.useRef)(c);let i=function(a=a4){return a3.map(b=>({scope:b,shortcuts:a.filter(a=>a.scope===b)})).filter(a=>a.shortcuts.length>0)}();return(0,d.jsx)(a2.a,{isOpen:a,onClose:()=>b(!1),title:f("title"),size:"md",children:(0,d.jsx)("div",{"data-testid":"keyboard-shortcuts-overlay",className:"space-y-6",children:i.map(({scope:a,shortcuts:b})=>(0,d.jsxs)("section",{"data-testid":`keyboard-shortcuts-scope-${a}`,children:[(0,d.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:f(`scopes.${a}`)}),(0,d.jsx)("ul",{className:"divide-y divide-border",children:b.map(a=>(0,d.jsxs)("li",{"data-testid":`keyboard-shortcut-${a.id}`,className:"flex items-center justify-between gap-4 py-2",children:[(0,d.jsx)("span",{className:"text-sm text-foreground",children:f(`shortcuts.${a.id}`)}),(0,d.jsx)("span",{className:"flex flex-shrink-0 items-center gap-1",children:a.keys.map((a,b)=>(0,d.jsx)(w.u,{children:"MOD"===a?g?"⌘":"Ctrl":a},b))})]},a.id))})]},a))})})}var a6=c(16945),a7=c(47089),a8=c(12055);function a9(){let a=(0,l.c)("common"),[b,c]=(0,e.useState)(null),[f,g]=(0,e.useState)(null),h=(0,e.useCallback)(a=>{if(a.type!==a8.Oo)return;let{serverVersion:b,clientVersion:d}=a;"string"==typeof b&&"string"==typeof d&&b&&d&&b!==f&&c({serverVersion:b,clientVersion:d})},[f]);(0,u.T3)(h);let i=(0,e.useCallback)(()=>{window.location.reload()},[]),j=(0,e.useCallback)(()=>{c(a=>(a&&g(a.serverVersion),null))},[]);return b?(0,d.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:aU.M.TOAST},children:[(0,d.jsx)(a6.A,{className:"h-5 w-5 shrink-0 mt-0.5","aria-hidden":"true"}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-sm",children:[(0,d.jsx)("span",{className:"font-semibold",children:a("versionMismatch.title")}),(0,d.jsx)("span",{children:a("versionMismatch.description",{serverVersion:b.serverVersion,clientVersion:b.clientVersion})})]}),(0,d.jsxs)("button",{type:"button","data-testid":"version-mismatch-reload",onClick:i,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,d.jsx)(aP.A,{className:"h-4 w-4","aria-hidden":"true"}),a("versionMismatch.reload")]}),(0,d.jsx)("button",{type:"button","data-testid":"version-mismatch-dismiss",onClick:j,"aria-label":a("versionMismatch.dismiss"),className:"shrink-0 hover:opacity-70 focus:outline-none focus:ring-2 focus:ring-offset-2",children:(0,d.jsx)(a7.A,{className:"h-4 w-4","aria-hidden":"true"})})]}):null}let ba="transform transition-transform duration-300 ease-out",bb=(0,e.memo)(function({children:a}){let{isOpen:b,isMobileDrawerOpen:c,closeMobileDrawer:f,width:h,setWidth:i}=(0,A.VF)(),j=(0,B.a)(),{showSidebar:k,showGlobalNav:l}=function(){var a=(0,g.usePathname)();for(let b of D)if(a.startsWith(b.prefix))return{...C,...b.config};return{...C}}(),{factor:m}=(0,E.Ps)(),n=Math.round(160*m),o=Math.round(480*m),p=Math.round(Math.min(o,Math.max(n,h*m))),q=(0,e.useRef)(null),r=(0,e.useRef)(null),s=(0,e.useCallback)(a=>{i(Math.round(a/m))},[i,m]);return j?(0,d.jsxs)("div",{"data-testid":"app-shell",className:"h-screen flex flex-col",children:[c&&(0,d.jsx)("div",{"data-testid":"drawer-overlay",className:"fixed inset-0 bg-black/50 z-40",onClick:f,"aria-hidden":"true"}),k&&(0,d.jsx)("aside",{"data-testid":"sidebar-container",className:`
12
12
  fixed left-0 top-0 h-full w-72 z-50
13
13
  ${ba}
14
14
  ${c?"translate-x-0":"-translate-x-full"}
@@ -1286,7 +1286,7 @@
1286
1286
  PRIMARY KEY (worktree_id, cli_tool_id),
1287
1287
  FOREIGN KEY (worktree_id) REFERENCES worktrees(id) ON DELETE CASCADE
1288
1288
  );
1289
- `)}c.d(b,{ks:()=>g.ks,EL:()=>aF.EL,AC:()=>m.AC,Tu:()=>aA,ug:()=>m.ug,eP:()=>aC,mg:()=>aB,lm:()=>o,s6:()=>al.s6,VP:()=>al.VP,Hi:()=>aF.Hi,sA:()=>aF.sA,Dx:()=>an,af:()=>am,KG:()=>E,Uq:()=>m.Uq,cD:()=>_,Jj:()=>aa,Ud:()=>N.Ud,$$:()=>N.$$,ul:()=>N.ul,YX:()=>k,cf:()=>g.cf,jf:()=>N.jf,fs:()=>m.fs,rC:()=>al.rC,G4:()=>W,hL:()=>ac,qp:()=>Y,hl:()=>au,To:()=>s,oH:()=>g.oH,UT:()=>aF.UT,CR:()=>N.CR,py:()=>B,rY:()=>as,yy:()=>J,pE:()=>g.pE,z2:()=>ak,cP:()=>u,DF:()=>g.DF,lA:()=>g.lA,Qp:()=>g.Qp,th:()=>al.th,oZ:()=>e.oZ,ZP:()=>l,Ys:()=>D,vg:()=>L,Rm:()=>e.Rm,Ow:()=>g.Ow,C8:()=>av,u$:()=>at,__:()=>aF.__,MH:()=>aF.MH,BN:()=>m.BN,m0:()=>m.m0,r3:()=>f.r3,Se:()=>al.Se,Tk:()=>z,fX:()=>f.fX,nO:()=>e.nO,Sj:()=>e.Sj,iT:()=>U,gp:()=>V,$r:()=>ae,yE:()=>ab,BE:()=>$,qK:()=>ai,ap:()=>O.ap,p4:()=>e.p4,nP:()=>g.nP,sy:()=>g.sy,r8:()=>g.r8,of:()=>af,DN:()=>r,pZ:()=>q,kA:()=>g.kA,VL:()=>g.VL,lr:()=>g.lr,GF:()=>N.GF,_O:()=>N._O,CF:()=>al.CF,gn:()=>al.gn,NV:()=>e.NV,ce:()=>ag,WZ:()=>ax,y1:()=>h,gg:()=>aF.gg,kx:()=>N.kx,DP:()=>N.DP,Nr:()=>A,ob:()=>y,fr:()=>H,J6:()=>aw,Q2:()=>f.Q2,Ui:()=>e.Ui,P9:()=>e.P9,eN:()=>I,vi:()=>e.vi,uJ:()=>e.uJ,s4:()=>d,uB:()=>aF.uB,yT:()=>F,b2:()=>ah,Fi:()=>ay,HB:()=>aG.H,Vk:()=>aF.Vk,Mt:()=>az,UE:()=>aE,PL:()=>g.PL,_h:()=>e._h,Zj:()=>al.Zj,jp:()=>g.jp,pG:()=>g.pG,xJ:()=>f.xJ,Xm:()=>N.Xm,NU:()=>m.NU,nQ:()=>v,yb:()=>M,l0:()=>f.l0,tt:()=>O.tt,GA:()=>e.GA,Cs:()=>m.Cs,OF:()=>j,xR:()=>X,az:()=>ad,nZ:()=>Z,PP:()=>aj,WU:()=>e.Dx,IF:()=>O.IF,O:()=>e.O,EU:()=>g.EU,HZ:()=>e.HZ,UY:()=>t,e8:()=>g.e8,cw:()=>g.cw,jJ:()=>al.jJ,DC:()=>e.DC,gb:()=>i,yB:()=>e.yB,j2:()=>N.j2,uy:()=>C,s:()=>e.s,iu:()=>e.iu,hq:()=>e.hq,z1:()=>e.z1,bl:()=>K,jA:()=>al.jA,ZL:()=>e.ZL});var e=c(73753),f=c(95506),g=c(52660);function h(a,b,c="claude"){let d=a.prepare(`
1289
+ `)}c.d(b,{ks:()=>g.ACTIVE_FILTER,EL:()=>aF.EL,AC:()=>m.AC,Tu:()=>aA,ug:()=>m.ug,eP:()=>aC,mg:()=>aB,lm:()=>o,s6:()=>al.s6,VP:()=>al.VP,Hi:()=>aF.Hi,sA:()=>aF.sA,Dx:()=>an,af:()=>am,KG:()=>E,Uq:()=>m.Uq,cD:()=>_,Jj:()=>aa,Ud:()=>N.Ud,$$:()=>N.$$,ul:()=>N.ul,YX:()=>k,cf:()=>g.clearLastUserMessage,jf:()=>N.jf,fs:()=>m.fs,rC:()=>al.rC,G4:()=>W,hL:()=>ac,qp:()=>Y,hl:()=>au,To:()=>s,oH:()=>g.createMessage,UT:()=>aF.UT,CR:()=>N.CR,py:()=>B,rY:()=>as,yy:()=>J,pE:()=>g.deleteAllMessages,z2:()=>ak,cP:()=>u,DF:()=>g.deleteMessageById,lA:()=>g.deleteMessagesByCliTool,Qp:()=>g.deleteMessagesByInstance,th:()=>al.th,oZ:()=>e.oZ,ZP:()=>l,Ys:()=>D,vg:()=>L,Rm:()=>e.Rm,Ow:()=>g.findMessageByRequestId,C8:()=>av,u$:()=>at,__:()=>aF.__,MH:()=>aF.MH,BN:()=>m.BN,m0:()=>m.m0,r3:()=>f.r3,Se:()=>al.Se,Tk:()=>z,fX:()=>f.fX,nO:()=>e.nO,Sj:()=>e.Sj,iT:()=>U,gp:()=>V,$r:()=>ae,yE:()=>ab,BE:()=>$,qK:()=>ai,ap:()=>O.ap,p4:()=>e.p4,nP:()=>g.getLastAssistantMessageAt,sy:()=>g.getLastMessage,r8:()=>g.getLastUserMessage,of:()=>af,DN:()=>r,pZ:()=>q,kA:()=>g.getMessageById,VL:()=>g.getMessages,lr:()=>g.getMessagesByDateRange,GF:()=>N.GF,_O:()=>N._O,CF:()=>al.CF,gn:()=>al.gn,NV:()=>e.NV,ce:()=>ag,WZ:()=>ax,y1:()=>h,gg:()=>aF.gg,kx:()=>N.kx,DP:()=>N.DP,Nr:()=>A,ob:()=>y,fr:()=>H,J6:()=>aw,Q2:()=>f.Q2,Ui:()=>e.getWorktreeById,P9:()=>e.P9,eN:()=>I,vi:()=>e.vi,uJ:()=>e.uJ,s4:()=>d,uB:()=>aF.uB,yT:()=>F,b2:()=>ah,Fi:()=>ay,HB:()=>aG.H,Vk:()=>aF.Vk,Mt:()=>az,UE:()=>aE,PL:()=>g.markPendingPromptsAsAnswered,_h:()=>e._h,Zj:()=>al.Zj,jp:()=>g.recomputeLastUserMessage,pG:()=>g.recordAnsweredPrompt,xJ:()=>f.xJ,Xm:()=>N.Xm,NU:()=>m.NU,nQ:()=>v,yb:()=>M,l0:()=>f.l0,tt:()=>O.tt,GA:()=>e.GA,Cs:()=>m.Cs,OF:()=>j,xR:()=>X,az:()=>ad,nZ:()=>Z,PP:()=>aj,WU:()=>e.Dx,IF:()=>O.IF,O:()=>e.O,EU:()=>g.updateLastUserMessage,HZ:()=>e.HZ,UY:()=>t,e8:()=>g.updateMessageContent,cw:()=>g.updatePromptData,jJ:()=>al.jJ,DC:()=>e.DC,gb:()=>i,yB:()=>e.yB,j2:()=>N.j2,uy:()=>C,s:()=>e.s,iu:()=>e.iu,hq:()=>e.hq,z1:()=>e.z1,bl:()=>K,jA:()=>al.jA,ZL:()=>e.ZL});var e=c(73753),f=c(95506),g=c(52660);function h(a,b,c="claude"){let d=a.prepare(`
1290
1290
  SELECT worktree_id, cli_tool_id, instance_id, last_captured_line, in_progress_message_id
1291
1291
  FROM session_states
1292
1292
  WHERE worktree_id = ? AND instance_id = ?