tower-studio 0.2.5 → 0.2.6

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 (260) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -1
  12. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +39 -39
  13. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  16. package/.next/standalone/.next/server/app/_not-found.rsc +14 -14
  17. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
  18. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  19. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +9 -9
  20. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  21. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  22. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  23. package/.next/standalone/.next/server/app/api/adapters/test/route.js +1 -1
  24. package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
  25. package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  27. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  29. package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
  31. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +1 -1
  32. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/api/internal/assistant/route.js +1 -1
  34. package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +1 -1
  36. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js +1 -1
  40. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
  45. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +1 -1
  46. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  49. package/.next/standalone/.next/server/app/index.html +1 -1
  50. package/.next/standalone/.next/server/app/index.rsc +14 -14
  51. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  52. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +14 -14
  53. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
  54. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +9 -9
  55. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  56. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +1 -1
  57. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +69 -69
  58. package/.next/standalone/.next/server/app/missions/page.js +1 -1
  59. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  61. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +1 -1
  62. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +39 -39
  63. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  65. package/.next/standalone/.next/server/app/onboarding.html +1 -1
  66. package/.next/standalone/.next/server/app/onboarding.rsc +16 -16
  67. package/.next/standalone/.next/server/app/onboarding.segments/_full.segment.rsc +16 -16
  68. package/.next/standalone/.next/server/app/onboarding.segments/_head.segment.rsc +4 -4
  69. package/.next/standalone/.next/server/app/onboarding.segments/_index.segment.rsc +9 -9
  70. package/.next/standalone/.next/server/app/onboarding.segments/_tree.segment.rsc +1 -1
  71. package/.next/standalone/.next/server/app/onboarding.segments/onboarding/__PAGE__.segment.rsc +4 -4
  72. package/.next/standalone/.next/server/app/onboarding.segments/onboarding.segment.rsc +3 -3
  73. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +1 -1
  74. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +39 -39
  75. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  76. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  77. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +1 -1
  78. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +52 -52
  79. package/.next/standalone/.next/server/app/settings/page.js +1 -1
  80. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  81. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/settings.html +1 -1
  83. package/.next/standalone/.next/server/app/settings.rsc +16 -16
  84. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +16 -16
  85. package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +4 -4
  86. package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +9 -9
  87. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  88. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +4 -4
  89. package/.next/standalone/.next/server/app/settings.segments/settings.segment.rsc +3 -3
  90. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +1 -1
  91. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +98 -98
  92. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  93. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  94. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +1 -1
  95. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +82 -82
  96. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  97. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  98. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +1 -1
  99. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +73 -73
  100. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  101. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  102. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +1 -1
  103. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +68 -68
  104. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +1 -1
  105. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  106. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  107. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +1 -1
  108. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +39 -39
  109. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  110. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  111. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +1 -1
  112. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +74 -74
  113. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  114. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  115. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +2 -2
  116. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +78 -78
  117. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +1 -1
  118. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  119. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +1 -1
  121. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +59 -59
  122. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  123. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  124. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +1 -1
  125. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.9mj3v._.js +2 -2
  126. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05353yb._.js +1 -1
  127. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05eviiz._.js +2 -2
  128. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__07h7qz8._.js → [root-of-the-server]__09h3i6m._.js} +2 -2
  129. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_a8-jq._.js +1 -1
  130. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0dsv3wl._.js +4 -0
  131. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0c1g5im._.js → [root-of-the-server]__0j~qauc._.js} +2 -2
  132. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0p_ii~p._.js +3 -0
  133. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0puw1af._.js +2 -2
  134. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ntb7n~._.js → [root-of-the-server]__0qie1gs._.js} +3 -3
  135. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0w2w3x.._.js +20 -0
  136. package/.next/standalone/.next/server/chunks/{_0u-~jqd._.js → _0trog_r._.js} +1 -1
  137. package/.next/standalone/.next/server/chunks/{src_0o_27yu._.js → src_01ztl3b._.js} +2 -2
  138. package/.next/standalone/.next/server/chunks/src_lib_0ba0ntr._.js +1 -1
  139. package/.next/standalone/.next/server/chunks/src_lib_ai_0q-~me1._.js +1 -1
  140. package/.next/standalone/.next/server/chunks/src_lib_ai_0xx6y51._.js +1 -1
  141. package/.next/standalone/.next/server/chunks/src_lib_ai_providers_index_ts_0.y.3vp._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  143. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0zjarb3._.js → [root-of-the-server]__0-yld.d._.js} +2 -2
  144. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.5rcav._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__006_qh0._.js +1 -1
  146. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02px.0y._.js +1 -1
  147. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__03ebsif._.js +3 -3
  148. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05kq890._.js +1 -1
  149. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0-xoiaj._.js → [root-of-the-server]__079.nog._.js} +2 -2
  150. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0ilem~v._.js → [root-of-the-server]__0c4.z1s._.js} +2 -2
  151. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gaa~xc._.js +1 -1
  152. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gcf4k3._.js +1 -1
  153. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ghfuuv._.js +1 -1
  154. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0n8jy_r._.js → [root-of-the-server]__0k3isnk._.js} +2 -2
  155. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0l43.5g._.js +1 -1
  156. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0nwue~m._.js +3 -0
  157. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ps55l6._.js +1 -1
  158. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0q7ho54._.js +1 -1
  159. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qe~p-n._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ribsk4._.js +1 -1
  161. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tf4zp_._.js +1 -1
  162. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00wymqa._.js → [root-of-the-server]__0vh-egg._.js} +2 -2
  163. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wjg_.n._.js +1 -1
  164. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0wvyks.._.js +1 -1
  165. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0y.nw7l._.js +1 -1
  166. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zbmoit._.js +1 -1
  167. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11bequ2._.js +1 -1
  168. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11ko84j._.js +1 -1
  169. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12pnl8n._.js +1 -1
  170. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0cdz55-._.js → [root-of-the-server]__13k4vkg._.js} +2 -2
  171. package/.next/standalone/.next/server/chunks/ssr/{_0j_v~sp._.js → _0-pqb_c._.js} +3 -3
  172. package/.next/standalone/.next/server/chunks/ssr/{_0ybhyal._.js → _00d1y-k._.js} +2 -2
  173. package/.next/standalone/.next/server/chunks/ssr/{_13fpu~5._.js → _03xwww2._.js} +2 -2
  174. package/.next/standalone/.next/server/chunks/ssr/{_0qu2yg4._.js → _049.box._.js} +1 -1
  175. package/.next/standalone/.next/server/chunks/ssr/_04b71ua._.js +1 -1
  176. package/.next/standalone/.next/server/chunks/ssr/{_0xh9m4.._.js → _05-r00y._.js} +3 -3
  177. package/.next/standalone/.next/server/chunks/ssr/{_0_co86q._.js → _054w82_._.js} +2 -2
  178. package/.next/standalone/.next/server/chunks/ssr/_05h.8a~._.js +1 -1
  179. package/.next/standalone/.next/server/chunks/ssr/{_07scffz._.js → _086yn8o._.js} +1 -1
  180. package/.next/standalone/.next/server/chunks/ssr/{_0wxd6t.._.js → _08t2xag._.js} +2 -2
  181. package/.next/standalone/.next/server/chunks/ssr/{_0cie3rm._.js → _0_gqtgq._.js} +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/_0_l8.dg._.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/{_0l6vadw._.js → _0_~ftjv._.js} +2 -2
  184. package/.next/standalone/.next/server/chunks/ssr/{_0a-rizg._.js → _0ah80pn._.js} +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
  186. package/.next/standalone/.next/server/chunks/ssr/_0ds6nk2._.js +1 -1
  187. package/.next/standalone/.next/server/chunks/ssr/{_079ks~i._.js → _0ep3sg_._.js} +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/{_108e4..._.js → _0f8jvpw._.js} +1 -1
  189. package/.next/standalone/.next/server/chunks/ssr/{_0-t_os6._.js → _0fri5n~._.js} +2 -2
  190. package/.next/standalone/.next/server/chunks/ssr/_0h_~oum._.js +7 -0
  191. package/.next/standalone/.next/server/chunks/ssr/{_13l5s-p._.js → _0i2usny._.js} +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/_0i4__mf._.js +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/_0ihq._v._.js +1 -1
  194. package/.next/standalone/.next/server/chunks/ssr/_0r9w-k8._.js +1 -1
  195. package/.next/standalone/.next/server/chunks/ssr/_0rbctq7._.js +1 -1
  196. package/.next/standalone/.next/server/chunks/ssr/{_00pxhu2._.js → _0rfo51k._.js} +2 -2
  197. package/.next/standalone/.next/server/chunks/ssr/_0rt8hus._.js +1 -1
  198. package/.next/standalone/.next/server/chunks/ssr/{_0lcigjh._.js → _0vqyzrr._.js} +2 -2
  199. package/.next/standalone/.next/server/chunks/ssr/_0~80adm._.js +3 -3
  200. package/.next/standalone/.next/server/chunks/ssr/src_095o8x6._.js +1 -1
  201. package/.next/standalone/.next/server/chunks/ssr/src_13jha60._.js +1 -1
  202. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  203. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  204. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  205. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  206. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  207. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  208. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  209. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  210. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0h36tj.._.js → src_lib_08n755q._.js} +1 -1
  211. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0h3ouzu._.js → src_lib_0tb2yya._.js} +1 -1
  212. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0~jyveg._.js → src_lib_123jf_a._.js} +1 -1
  213. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0~rxy~0._.js → src_lib_12ulcxj._.js} +1 -1
  214. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  215. package/.next/standalone/.next/server/pages/404.html +1 -1
  216. package/.next/standalone/.next/server/pages/500.html +1 -1
  217. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  218. package/.next/standalone/.next/server/server-reference-manifest.json +274 -274
  219. package/.next/standalone/.next/static/chunks/0.zipr1bga3lu.js +1 -0
  220. package/.next/standalone/.next/static/chunks/{0jk6ji4j.3jod.js → 037-verumdykv.js} +2 -2
  221. package/.next/standalone/.next/static/chunks/04-7c5m91nvj1.js +1 -0
  222. package/.next/standalone/.next/static/chunks/{0~p32xa2eu79e.js → 06shpikm5rcmu.js} +1 -1
  223. package/.next/standalone/.next/static/chunks/{00grznzz_zqq~.js → 07i~~ygu~oi26.js} +1 -1
  224. package/.next/standalone/.next/static/chunks/{00jlfmav1nk82.js → 082cedbq4pp.-.js} +1 -1
  225. package/.next/standalone/.next/static/chunks/089ktlh~nim1x.js +1 -0
  226. package/.next/standalone/.next/static/chunks/{0mijmksouoprl.js → 0ee.~~ae-vl_q.js} +1 -1
  227. package/.next/standalone/.next/static/chunks/{0.p7x9h8h-..l.js → 0fovq74l0wh7c.js} +1 -1
  228. package/.next/standalone/.next/static/chunks/{14se8w2gb9pe0.js → 0hxgzql5.szyz.js} +1 -1
  229. package/.next/standalone/.next/static/chunks/{018vr5fdl426p.js → 0jscst0zjd2az.js} +1 -1
  230. package/.next/standalone/.next/static/chunks/{0z0a_hlsye7mo.js → 0m2lubto0vt0x.js} +1 -1
  231. package/.next/standalone/.next/static/chunks/0mfgulw-d49o9.js +1 -0
  232. package/.next/standalone/.next/static/chunks/{0~2v6ague-7-t.js → 0m~ltp.wfnbf7.js} +2 -2
  233. package/.next/standalone/.next/static/chunks/{15qi~69blu~3u.js → 0nrbltth-7m~e.js} +1 -1
  234. package/.next/standalone/.next/static/chunks/{0a5u1~0._dmx8.js → 0r7jm27~cp-vs.js} +1 -1
  235. package/.next/standalone/.next/static/chunks/0tk-ju9xhoh68.js +5 -0
  236. package/.next/standalone/.next/static/chunks/0v9ahxdsn0mse.js +1 -0
  237. package/.next/standalone/.next/static/chunks/0w9x-ap4dcwy..js +1 -0
  238. package/.next/standalone/.next/static/chunks/17cayeebhpt~w.js +2 -0
  239. package/.next/standalone/.next/static/chunks/{0-wn9b_4jrs.9.js → 186ahmq856rfj.js} +1 -1
  240. package/.next/standalone/package.json +2 -1
  241. package/bin/tower.mjs +3 -0
  242. package/dist/mcp-server.cjs +12 -1
  243. package/package.json +2 -1
  244. package/skills/tower/SKILL.md +381 -0
  245. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0-eibah._.js +0 -4
  246. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_q8qjf._.js +0 -20
  247. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0vasg9u._.js +0 -3
  248. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__102siqc._.js +0 -3
  249. package/.next/standalone/.next/server/chunks/ssr/_0h0r8fk._.js +0 -7
  250. package/.next/standalone/.next/static/chunks/094hp8ak7su7z.js +0 -2
  251. package/.next/standalone/.next/static/chunks/0fe_jnfm0lqm..js +0 -5
  252. package/.next/standalone/.next/static/chunks/0lq1_ynox5frw.js +0 -1
  253. package/.next/standalone/.next/static/chunks/0qy~pj-p.oh92.js +0 -1
  254. package/.next/standalone/.next/static/chunks/0y_vg.f~zs~zl.js +0 -1
  255. package/.next/standalone/.next/static/chunks/10ih_a9~empst.js +0 -1
  256. package/.next/standalone/.next/static/chunks/16.w_z6.3sf2v.js +0 -1
  257. package/.next/standalone/.next/static/chunks/17wptayhzwy6g.js +0 -1
  258. /package/.next/standalone/.next/static/{eRr9P5hixKpzabeXJ-AvA → VGoiH5uRfCRm6SKXNPZoz}/_buildManifest.js +0 -0
  259. /package/.next/standalone/.next/static/{eRr9P5hixKpzabeXJ-AvA → VGoiH5uRfCRm6SKXNPZoz}/_clientMiddlewareManifest.js +0 -0
  260. /package/.next/standalone/.next/static/{eRr9P5hixKpzabeXJ-AvA → VGoiH5uRfCRm6SKXNPZoz}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[913284,468862,a=>{"use strict";var b=a.i(884664);a.s(["CheckCircle2",()=>b.default],913284);let c=(0,a.i(711796).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);a.s(["XCircle",0,c],468862)},865011,a=>{"use strict";var b=a.i(728778),c=a.i(634910),d=a.i(553798),e=a.i(269280),f=a.i(350739),g=a.i(347165),h=a.i(607219),i=a.i(951192);let j=[{key:"notes",icon:f.FileText},{key:"assets",icon:g.FolderOpen},{key:"archive",icon:h.Archive}];a.s(["SubPageNav",0,function({workspaceId:a}){let{t:f}=(0,i.useI18n)(),g=(0,d.usePathname)(),h=j.find(a=>g.includes(`/${a.key}`))?.key;return(0,b.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,b.jsxs)(c.default,{href:`/workspaces/${a}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f("archive.backToBoard")})]}),(0,b.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),j.map(d=>{let e=d.icon,g=h===d.key;return(0,b.jsxs)(c.default,{href:`/workspaces/${a}/${d.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${g?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,b.jsx)(e,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f(`sidebar.${d.key}`)})]},d.key)})]})}])},264589,a=>{"use strict";let b=(0,a.i(711796).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);a.s(["Package",0,b],264589)},786304,a=>{"use strict";var b=a.i(475295),c=a.i(213200),d=a.i(142261),e=a.i(368114);let f=(0,d.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],786304)},412783,a=>{"use strict";var b=a.i(728778),c=a.i(368114);a.s(["Label",0,function({className:a,...d}){return(0,b.jsx)("label",{"data-slot":"label",className:(0,c.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a),...d})}])},521007,a=>{"use strict";a.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},269280,a=>{"use strict";let b=(0,a.i(711796).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],269280)},165614,a=>{"use strict";let b=(0,a.i(711796).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["PlayCircle",0,b],165614)},757061,99665,a=>{"use strict";var b=a.i(728778),c=a.i(432949),d=a.i(368114),e=a.i(699570),f=a.i(14906);function g({...a}){return(0,b.jsx)(c.Dialog.Portal,{"data-slot":"sheet-portal",...a})}function h({className:a,...e}){return(0,b.jsx)(c.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,d.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",a),...e})}a.s(["Sheet",0,function({...a}){return(0,b.jsx)(c.Dialog.Root,{"data-slot":"sheet",...a})},"SheetContent",0,function({className:a,children:i,side:j="right",showCloseButton:k=!0,...l}){return(0,b.jsxs)(g,{children:[(0,b.jsx)(h,{}),(0,b.jsxs)(c.Dialog.Popup,{"data-slot":"sheet-content","data-side":j,className:(0,d.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",a),...l,children:[i,k&&(0,b.jsxs)(c.Dialog.Close,{"data-slot":"sheet-close",render:(0,b.jsx)(e.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,b.jsx)(f.XIcon,{}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:a,...e}){return(0,b.jsx)(c.Dialog.Description,{"data-slot":"sheet-description",className:(0,d.cn)("text-sm text-muted-foreground",a),...e})},"SheetHeader",0,function({className:a,...c}){return(0,b.jsx)("div",{"data-slot":"sheet-header",className:(0,d.cn)("flex flex-col gap-0.5 p-4",a),...c})},"SheetTitle",0,function({className:a,...e}){return(0,b.jsx)(c.Dialog.Title,{"data-slot":"sheet-title",className:(0,d.cn)("font-heading text-base font-medium text-foreground",a),...e})}],757061);var i=a.i(780410);let j=(0,i.createServerReference)("40c0f1f3358e69ad57657d2555cfee73e994dad43f",i.callServer,void 0,i.findSourceMapURL,"getTaskOverview");a.s(["getTaskOverview",0,j],99665)},157551,a=>{"use strict";let b=(0,a.i(711796).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["Calendar",0,b],157551)},972420,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(757061),e=a.i(269876),f=a.i(786304),g=a.i(699570),h=a.i(951192),i=a.i(76688),j=a.i(99665),k=a.i(120999),l=a.i(445798),m=a.i(521007),n=a.i(157551),o=a.i(22761),p=a.i(264589),q=a.i(165614);function r({added:a,removed:c}){let{t:d}=(0,h.useI18n)();return(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,b.jsx)("span",{children:d("diff.filesChanged",{count:String(a+c)})}),a>0&&(0,b.jsxs)("span",{className:"text-green-500",children:["+",a]}),c>0&&(0,b.jsxs)("span",{className:"text-red-500",children:["-",c]})]})}var s=a.i(952313);a.s(["TaskOverviewDrawer",0,function({open:a,onOpenChange:t,taskId:u}){let{t:v}=(0,h.useI18n)(),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useTransition)(),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)([]);(0,c.useEffect)(()=>{u&&a?z(async()=>{let a=await (0,j.getTaskOverview)(u);a&&(x(a),a.project?.workspaceId&&(0,k.getLabelsForWorkspace)(a.project.workspaceId).then(a=>{D(a.map(a=>({id:a.id,name:a.name,color:a.color,isBuiltin:a.isBuiltin})))}).catch(()=>D([])))}):x(null)},[u,a]);let E=w?m.BOARD_COLUMNS.find(a=>a.id===w.status):null,F=w?m.PRIORITY_CONFIG[w.priority]:null,G=w?.executions?.[0]??null,H=(()=>{let a=G?.gitStats;if(!a)return null;try{let b=JSON.parse(a);return{added:b.insertions??0,removed:b.deletions??0}}catch{return null}})(),I=async a=>{if(w?.project)try{await (0,i.createTask)({...a,projectId:w.project.id}),s.toast.success(v("taskDrawer.duplicateSuccess")),B(!1),t(!1)}catch{s.toast.error(v("taskDrawer.duplicateFailed"))}};return(0,b.jsxs)(d.Sheet,{open:a,onOpenChange:t,children:[(0,b.jsxs)(d.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,b.jsxs)(d.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,b.jsx)(d.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:w?.title??""}),(0,b.jsx)(d.SheetDescription,{className:"sr-only",children:v("taskDrawer.title")}),w&&(0,b.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[E&&(0,b.jsxs)(f.Badge,{variant:"secondary",className:"text-xs",children:[(0,b.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${E.color}`}),E.label]}),F&&(0,b.jsx)(f.Badge,{variant:"secondary",className:`text-xs ${F.color}`,children:F.label})]})]}),(0,b.jsx)(e.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:y&&!w?(0,b.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:v("assets.loading")}):w?(0,b.jsxs)("div",{className:"p-4 space-y-4",children:[(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:v("taskDrawer.description")}),(0,b.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:w.description||v("taskDrawer.noDescription")})]}),w.labels.length>0&&(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:v("taskDrawer.labels")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:w.labels.map(a=>(0,b.jsx)(f.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${a.label.color}20`,color:a.label.color,borderColor:`${a.label.color}40`},children:a.label.name},a.label.id))})]}),(0,b.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(n.Calendar,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:v("taskDrawer.createdAt")}),(0,b.jsx)("span",{className:"text-foreground",children:new Date(w.createdAt).toLocaleDateString()})]}),(0,b.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(p.Package,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:v("taskDrawer.resources")}),(0,b.jsx)("span",{className:"text-foreground",children:w._count.assets})]}),(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:v("taskDrawer.fileChanges")}),H?(0,b.jsx)(r,{added:H.added,removed:H.removed}):(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:v("taskDrawer.noFileChanges")})]}),(0,b.jsxs)("section",{children:[(0,b.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,b.jsx)(q.PlayCircle,{className:"h-3.5 w-3.5"}),v("taskDrawer.lastExecution")]}),G?(0,b.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,b.jsx)(f.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:G.status}),G.summary&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:G.summary.slice(0,200)})]}):(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:v("taskDrawer.noExecution")})]}),(0,b.jsx)("section",{children:(0,b.jsxs)(g.Button,{variant:"default",className:"w-full",onClick:()=>{w&&B(!0)},disabled:!w,children:[(0,b.jsx)(o.Copy,{className:"h-4 w-4"}),v("taskDrawer.duplicate")]})})]}):null})]}),w?.project&&(0,b.jsx)(l.CreateTaskDialog,{open:A,onOpenChange:B,onSubmit:I,labels:C,projectType:w.project.type,projectLocalPath:w.project.localPath,prefillFromTask:{title:w.title,description:w.description,priority:w.priority,subPath:w.subPath,labelIds:w.labels.map(a=>a.label.id),baseBranch:w.baseBranch}})]})}],972420)},149234,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(607219),e=a.i(913284),f=a.i(468862),g=a.i(704494),h=a.i(580701),i=a.i(951192),j=a.i(865011),k=a.i(780410);let l=(0,k.createServerReference)("40700f84e4642d610352abc0eafd04e55c59c21fb8",k.callServer,void 0,k.findSourceMapURL,"getArchivedTasks");var m=a.i(972420);function n(a){return new Date(a).toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function o({priority:a}){return(0,b.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${{LOW:"bg-slate-400",MEDIUM:"bg-amber-400",HIGH:"bg-orange-500",CRITICAL:"bg-rose-500"}[a]??"bg-slate-400"}`})}a.s(["ArchivePageClient",0,function({allWorkspaces:a,initialWorkspaceId:k,initialProjectId:p,initialTasks:q}){let r,{t:s}=(0,i.useI18n)(),[t,u]=(0,c.useTransition)(),[v,w]=(0,c.useState)(k),[x,y]=(0,c.useState)(p),[z,A]=(0,c.useState)(q),[B,C]=(0,c.useState)(null),D=a.find(a=>a.id===v),E=D?.projects??[],F=(0,c.useCallback)(a=>{a?u(async()=>{A(await l(a))}):A([])},[u]);return(0,b.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,b.jsx)(j.SubPageNav,{workspaceId:v}),(0,b.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,b.jsxs)(h.Select,{value:v,onValueChange:b=>b&&(b=>{if(b===v)return;w(b);let c=a.find(a=>a.id===b),d=c?.projects[0]??null;y(d?.id??null),F(d?.id??null)})(b),children:[(0,b.jsx)(h.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,b.jsx)("span",{className:"truncate",children:D?.name??v})}),(0,b.jsx)(h.SelectContent,{children:a.map(a=>(0,b.jsx)(h.SelectItem,{value:a.id,children:a.name},a.id))})]}),E.length>0&&(0,b.jsxs)(h.Select,{value:x??"",onValueChange:a=>a&&void(a!==x&&(y(a),F(a))),children:[(0,b.jsx)(h.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,b.jsx)("span",{className:"truncate",children:(r=E.find(a=>a.id===x))?r.alias?`${r.name} (${r.alias})`:r.name:""})}),(0,b.jsx)(h.SelectContent,{children:E.map(a=>(0,b.jsxs)(h.SelectItem,{value:a.id,children:[a.name,a.alias?` (${a.alias})`:""]},a.id))})]}),(0,b.jsxs)("span",{className:"ml-auto rounded-full bg-muted px-2.5 py-0.5 text-[11px] text-muted-foreground",children:[z.length," ",s("archive.tasksCount")]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,b.jsxs)("div",{className:`relative ${t?"opacity-40 pointer-events-none":""} transition-opacity`,children:[t&&(0,b.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,b.jsx)(g.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===z.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,b.jsx)(d.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:s("archive.noTasks")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:s("archive.noTasksDesc")})]}):(0,b.jsx)("div",{className:"space-y-2",children:z.map(a=>{let c="DONE"===a.status,d=a.executions[0];return(0,b.jsx)("div",{role:"button",tabIndex:0,onClick:()=>C(a.id),onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),C(a.id))},className:"group cursor-pointer rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:border-border/80 hover:bg-accent/30 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background",children:(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:c?(0,b.jsx)(e.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):(0,b.jsx)(f.XCircle,{className:"h-4 w-4 text-rose-500"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(o,{priority:a.priority}),(0,b.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:a.title}),(0,b.jsx)("span",{className:`ml-1 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ${c?"bg-emerald-500/10 text-emerald-400 ring-1 ring-emerald-500/20":"bg-rose-500/10 text-rose-400 ring-1 ring-rose-500/20"}`,children:c?s("archive.status.done"):s("archive.status.cancelled")})]}),a.labels.length>0&&(0,b.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:a.labels.map(a=>(0,b.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`${a.label.color}20`,color:a.label.color,outline:`1px solid ${a.label.color}40`},children:a.label.name},a.label.id))}),(0,b.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,b.jsxs)("span",{children:[s("archive.createdAt"),": ",n(a.createdAt)]}),(0,b.jsxs)("span",{children:[c?s("archive.completedAt"):s("archive.cancelledAt"),": ",n(a.updatedAt)]}),d&&(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[s("archive.lastExecution"),":"," ",(0,b.jsx)("span",{className:`rounded px-1 py-0.5 font-mono text-[10px] ${"COMPLETED"===d.status?"bg-emerald-500/10 text-emerald-400":"FAILED"===d.status?"bg-rose-500/10 text-rose-400":"bg-amber-500/10 text-amber-400"}`,children:d.status})]})]})]})]})},a.id)})})]})}),(0,b.jsx)(m.TaskOverviewDrawer,{open:!!B,onOpenChange:a=>{a||C(null)},taskId:B})]})}],149234)}];
1
+ module.exports=[913284,468862,a=>{"use strict";var b=a.i(884664);a.s(["CheckCircle2",()=>b.default],913284);let c=(0,a.i(711796).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);a.s(["XCircle",0,c],468862)},865011,a=>{"use strict";var b=a.i(728778),c=a.i(634910),d=a.i(553798),e=a.i(269280),f=a.i(350739),g=a.i(347165),h=a.i(607219),i=a.i(951192);let j=[{key:"notes",icon:f.FileText},{key:"assets",icon:g.FolderOpen},{key:"archive",icon:h.Archive}];a.s(["SubPageNav",0,function({workspaceId:a}){let{t:f}=(0,i.useI18n)(),g=(0,d.usePathname)(),h=j.find(a=>g.includes(`/${a.key}`))?.key;return(0,b.jsxs)("div",{className:"header-sm flex items-center gap-1 px-4",children:[(0,b.jsxs)(c.default,{href:`/workspaces/${a}`,className:"mr-2 inline-flex h-8 items-center gap-1.5 rounded-md px-2 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:[(0,b.jsx)(e.ArrowLeft,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f("archive.backToBoard")})]}),(0,b.jsx)("span",{className:"mr-2 h-4 w-px bg-border"}),j.map(d=>{let e=d.icon,g=h===d.key;return(0,b.jsxs)(c.default,{href:`/workspaces/${a}/${d.key}`,className:`inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors ${g?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:[(0,b.jsx)(e,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:f(`sidebar.${d.key}`)})]},d.key)})]})}])},264589,a=>{"use strict";let b=(0,a.i(711796).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);a.s(["Package",0,b],264589)},786304,a=>{"use strict";var b=a.i(475295),c=a.i(213200),d=a.i(142261),e=a.i(368114);let f=(0,d.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],786304)},412783,a=>{"use strict";var b=a.i(728778),c=a.i(368114);a.s(["Label",0,function({className:a,...d}){return(0,b.jsx)("label",{"data-slot":"label",className:(0,c.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a),...d})}])},521007,a=>{"use strict";a.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},269280,a=>{"use strict";let b=(0,a.i(711796).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],269280)},165614,a=>{"use strict";let b=(0,a.i(711796).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["PlayCircle",0,b],165614)},757061,340221,a=>{"use strict";var b=a.i(728778),c=a.i(432949),d=a.i(368114),e=a.i(699570),f=a.i(14906);function g({...a}){return(0,b.jsx)(c.Dialog.Portal,{"data-slot":"sheet-portal",...a})}function h({className:a,...e}){return(0,b.jsx)(c.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,d.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",a),...e})}a.s(["Sheet",0,function({...a}){return(0,b.jsx)(c.Dialog.Root,{"data-slot":"sheet",...a})},"SheetContent",0,function({className:a,children:i,side:j="right",showCloseButton:k=!0,...l}){return(0,b.jsxs)(g,{children:[(0,b.jsx)(h,{}),(0,b.jsxs)(c.Dialog.Popup,{"data-slot":"sheet-content","data-side":j,className:(0,d.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",a),...l,children:[i,k&&(0,b.jsxs)(c.Dialog.Close,{"data-slot":"sheet-close",render:(0,b.jsx)(e.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,b.jsx)(f.XIcon,{}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:a,...e}){return(0,b.jsx)(c.Dialog.Description,{"data-slot":"sheet-description",className:(0,d.cn)("text-sm text-muted-foreground",a),...e})},"SheetHeader",0,function({className:a,...c}){return(0,b.jsx)("div",{"data-slot":"sheet-header",className:(0,d.cn)("flex flex-col gap-0.5 p-4",a),...c})},"SheetTitle",0,function({className:a,...e}){return(0,b.jsx)(c.Dialog.Title,{"data-slot":"sheet-title",className:(0,d.cn)("font-heading text-base font-medium text-foreground",a),...e})}],757061);var i=a.i(780410);let j=(0,i.createServerReference)("408432700cf2b8320487521790d310de922b0ecff7",i.callServer,void 0,i.findSourceMapURL,"getTaskOverview");a.s(["getTaskOverview",0,j],340221)},157551,a=>{"use strict";let b=(0,a.i(711796).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["Calendar",0,b],157551)},972420,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(757061),e=a.i(269876),f=a.i(786304),g=a.i(699570),h=a.i(951192),i=a.i(612472),j=a.i(340221),k=a.i(699723),l=a.i(445798),m=a.i(521007),n=a.i(157551),o=a.i(22761),p=a.i(264589),q=a.i(165614);function r({added:a,removed:c}){let{t:d}=(0,h.useI18n)();return(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,b.jsx)("span",{children:d("diff.filesChanged",{count:String(a+c)})}),a>0&&(0,b.jsxs)("span",{className:"text-green-500",children:["+",a]}),c>0&&(0,b.jsxs)("span",{className:"text-red-500",children:["-",c]})]})}var s=a.i(952313);a.s(["TaskOverviewDrawer",0,function({open:a,onOpenChange:t,taskId:u}){let{t:v}=(0,h.useI18n)(),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useTransition)(),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)([]);(0,c.useEffect)(()=>{u&&a?z(async()=>{let a=await (0,j.getTaskOverview)(u);a&&(x(a),a.project?.workspaceId&&(0,k.getLabelsForWorkspace)(a.project.workspaceId).then(a=>{D(a.map(a=>({id:a.id,name:a.name,color:a.color,isBuiltin:a.isBuiltin})))}).catch(()=>D([])))}):x(null)},[u,a]);let E=w?m.BOARD_COLUMNS.find(a=>a.id===w.status):null,F=w?m.PRIORITY_CONFIG[w.priority]:null,G=w?.executions?.[0]??null,H=(()=>{let a=G?.gitStats;if(!a)return null;try{let b=JSON.parse(a);return{added:b.insertions??0,removed:b.deletions??0}}catch{return null}})(),I=async a=>{if(w?.project)try{await (0,i.createTask)({...a,projectId:w.project.id}),s.toast.success(v("taskDrawer.duplicateSuccess")),B(!1),t(!1)}catch{s.toast.error(v("taskDrawer.duplicateFailed"))}};return(0,b.jsxs)(d.Sheet,{open:a,onOpenChange:t,children:[(0,b.jsxs)(d.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,b.jsxs)(d.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,b.jsx)(d.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:w?.title??""}),(0,b.jsx)(d.SheetDescription,{className:"sr-only",children:v("taskDrawer.title")}),w&&(0,b.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[E&&(0,b.jsxs)(f.Badge,{variant:"secondary",className:"text-xs",children:[(0,b.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${E.color}`}),E.label]}),F&&(0,b.jsx)(f.Badge,{variant:"secondary",className:`text-xs ${F.color}`,children:F.label})]})]}),(0,b.jsx)(e.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:y&&!w?(0,b.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:v("assets.loading")}):w?(0,b.jsxs)("div",{className:"p-4 space-y-4",children:[(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:v("taskDrawer.description")}),(0,b.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:w.description||v("taskDrawer.noDescription")})]}),w.labels.length>0&&(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:v("taskDrawer.labels")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:w.labels.map(a=>(0,b.jsx)(f.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${a.label.color}20`,color:a.label.color,borderColor:`${a.label.color}40`},children:a.label.name},a.label.id))})]}),(0,b.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(n.Calendar,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:v("taskDrawer.createdAt")}),(0,b.jsx)("span",{className:"text-foreground",children:new Date(w.createdAt).toLocaleDateString()})]}),(0,b.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(p.Package,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:v("taskDrawer.resources")}),(0,b.jsx)("span",{className:"text-foreground",children:w._count.assets})]}),(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:v("taskDrawer.fileChanges")}),H?(0,b.jsx)(r,{added:H.added,removed:H.removed}):(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:v("taskDrawer.noFileChanges")})]}),(0,b.jsxs)("section",{children:[(0,b.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,b.jsx)(q.PlayCircle,{className:"h-3.5 w-3.5"}),v("taskDrawer.lastExecution")]}),G?(0,b.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,b.jsx)(f.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:G.status}),G.summary&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:G.summary.slice(0,200)})]}):(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:v("taskDrawer.noExecution")})]}),(0,b.jsx)("section",{children:(0,b.jsxs)(g.Button,{variant:"default",className:"w-full",onClick:()=>{w&&B(!0)},disabled:!w,children:[(0,b.jsx)(o.Copy,{className:"h-4 w-4"}),v("taskDrawer.duplicate")]})})]}):null})]}),w?.project&&(0,b.jsx)(l.CreateTaskDialog,{open:A,onOpenChange:B,onSubmit:I,labels:C,projectType:w.project.type,projectLocalPath:w.project.localPath,prefillFromTask:{title:w.title,description:w.description,priority:w.priority,subPath:w.subPath,labelIds:w.labels.map(a=>a.label.id),baseBranch:w.baseBranch}})]})}],972420)},149234,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(607219),e=a.i(913284),f=a.i(468862),g=a.i(704494),h=a.i(580701),i=a.i(951192),j=a.i(865011),k=a.i(780410);let l=(0,k.createServerReference)("400a83c5a3284de78c677f400afb2f133682c97bf7",k.callServer,void 0,k.findSourceMapURL,"getArchivedTasks");var m=a.i(972420);function n(a){return new Date(a).toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function o({priority:a}){return(0,b.jsx)("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${{LOW:"bg-slate-400",MEDIUM:"bg-amber-400",HIGH:"bg-orange-500",CRITICAL:"bg-rose-500"}[a]??"bg-slate-400"}`})}a.s(["ArchivePageClient",0,function({allWorkspaces:a,initialWorkspaceId:k,initialProjectId:p,initialTasks:q}){let r,{t:s}=(0,i.useI18n)(),[t,u]=(0,c.useTransition)(),[v,w]=(0,c.useState)(k),[x,y]=(0,c.useState)(p),[z,A]=(0,c.useState)(q),[B,C]=(0,c.useState)(null),D=a.find(a=>a.id===v),E=D?.projects??[],F=(0,c.useCallback)(a=>{a?u(async()=>{A(await l(a))}):A([])},[u]);return(0,b.jsxs)("div",{className:"flex h-full flex-col overflow-hidden",children:[(0,b.jsx)(j.SubPageNav,{workspaceId:v}),(0,b.jsxs)("div",{className:"header-sm flex items-center gap-3 px-6 py-2",children:[(0,b.jsxs)(h.Select,{value:v,onValueChange:b=>b&&(b=>{if(b===v)return;w(b);let c=a.find(a=>a.id===b),d=c?.projects[0]??null;y(d?.id??null),F(d?.id??null)})(b),children:[(0,b.jsx)(h.SelectTrigger,{className:"h-8 w-auto min-w-[120px]",children:(0,b.jsx)("span",{className:"truncate",children:D?.name??v})}),(0,b.jsx)(h.SelectContent,{children:a.map(a=>(0,b.jsx)(h.SelectItem,{value:a.id,children:a.name},a.id))})]}),E.length>0&&(0,b.jsxs)(h.Select,{value:x??"",onValueChange:a=>a&&void(a!==x&&(y(a),F(a))),children:[(0,b.jsx)(h.SelectTrigger,{className:"h-8 w-auto min-w-[140px]",children:(0,b.jsx)("span",{className:"truncate",children:(r=E.find(a=>a.id===x))?r.alias?`${r.name} (${r.alias})`:r.name:""})}),(0,b.jsx)(h.SelectContent,{children:E.map(a=>(0,b.jsxs)(h.SelectItem,{value:a.id,children:[a.name,a.alias?` (${a.alias})`:""]},a.id))})]}),(0,b.jsxs)("span",{className:"ml-auto rounded-full bg-muted px-2.5 py-0.5 text-[11px] text-muted-foreground",children:[z.length," ",s("archive.tasksCount")]})]}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-6 py-4",children:(0,b.jsxs)("div",{className:`relative ${t?"opacity-40 pointer-events-none":""} transition-opacity`,children:[t&&(0,b.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,b.jsx)(g.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}),0===z.length?(0,b.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-16 text-center",children:[(0,b.jsx)(d.Archive,{className:"h-10 w-10 text-muted-foreground/30"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:s("archive.noTasks")}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:s("archive.noTasksDesc")})]}):(0,b.jsx)("div",{className:"space-y-2",children:z.map(a=>{let c="DONE"===a.status,d=a.executions[0];return(0,b.jsx)("div",{role:"button",tabIndex:0,onClick:()=>C(a.id),onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),C(a.id))},className:"group cursor-pointer rounded-lg border border-border bg-card px-4 py-3 transition-colors hover:border-border/80 hover:bg-accent/30 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background",children:(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"mt-0.5 shrink-0",children:c?(0,b.jsx)(e.CheckCircle2,{className:"h-4 w-4 text-emerald-500"}):(0,b.jsx)(f.XCircle,{className:"h-4 w-4 text-rose-500"})}),(0,b.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(o,{priority:a.priority}),(0,b.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:a.title}),(0,b.jsx)("span",{className:`ml-1 shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium ${c?"bg-emerald-500/10 text-emerald-400 ring-1 ring-emerald-500/20":"bg-rose-500/10 text-rose-400 ring-1 ring-rose-500/20"}`,children:c?s("archive.status.done"):s("archive.status.cancelled")})]}),a.labels.length>0&&(0,b.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1",children:a.labels.map(a=>(0,b.jsx)("span",{className:"rounded-full px-1.5 py-0.5 text-[10px] font-medium",style:{backgroundColor:`${a.label.color}20`,color:a.label.color,outline:`1px solid ${a.label.color}40`},children:a.label.name},a.label.id))}),(0,b.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-3 text-[11px] text-muted-foreground",children:[(0,b.jsxs)("span",{children:[s("archive.createdAt"),": ",n(a.createdAt)]}),(0,b.jsxs)("span",{children:[c?s("archive.completedAt"):s("archive.cancelledAt"),": ",n(a.updatedAt)]}),d&&(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[s("archive.lastExecution"),":"," ",(0,b.jsx)("span",{className:`rounded px-1 py-0.5 font-mono text-[10px] ${"COMPLETED"===d.status?"bg-emerald-500/10 text-emerald-400":"FAILED"===d.status?"bg-rose-500/10 text-rose-400":"bg-amber-500/10 text-amber-400"}`,children:d.status})]})]})]})]})},a.id)})})]})}),(0,b.jsx)(m.TaskOverviewDrawer,{open:!!B,onOpenChange:a=>{a||C(null)},taskId:B})]})}],149234)}];
2
2
 
3
3
  //# sourceMappingURL=_05h.8a~._.js.map
@@ -27,4 +27,4 @@ Rules:
27
27
  - insights array can be empty if nothing notable
28
28
  - Keep each insight concise (1-2 sentences)`,h=await c(g,b);if(!h)return null;try{let a=h,b=a.match(/\{[\s\S]*\}/);b&&(a=b[0]);let c=JSON.parse(a);if("string"!=typeof c.summary||"boolean"!=typeof c.shouldCreateNote)return console.error("[generateDreamingInsight] Invalid response structure"),null;return c}catch(a){return console.error("[generateDreamingInsight] JSON parse failed:",a.message),null}}a.s(["aiQuery",0,c,"generateDreamingInsight",0,e,"generateSummaryFromLog",0,d])},818992,a=>{"use strict";var b=a.i(233405),c=a.i(522734),d=a.i(761469),e=a.i(897667);function f(a,c){return(0,b.execFileSync)("git",a,{cwd:c,timeout:1e4,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim()}function g(a){for(let b of["main","master","develop"])try{return f(["merge-base","HEAD",b],a)}catch{}return null}function h(a){if(!a)return null;let b=a.split("\n").filter(Boolean);if(0===b.length)return null;let c=b[0].replace(/^[a-f0-9]+\s+/,"");return 1===b.length?c:`${b.length} commits: ${c}`}async function i(a,b,i,j,k){try{let b;console.error(`[captureExecutionSummary] Starting: exec=${a.slice(0,8)} exit=${i} buffer=${j.length}chars worktree=${k}`);let l=null,m=null,n=null;if(k&&(0,c.existsSync)(k))try{if(f(["rev-parse","--git-dir"],k),l=function(a){try{let b=g(a);if(b){let c=f(["log","--oneline",`${b}..HEAD`],a);if(c)return c}return f(["log","--oneline","-3"],a)||null}catch{return null}}(k),(m=function(a){try{let b,c=g(a);if(!(b=c?f(["diff","--stat",`${c}..HEAD`],a):f(["diff","--stat","HEAD~20","HEAD"],a)))return null;return function(a){let b=a.split("\n"),c=b[b.length-1];if(!c)return null;let d=c.match(/(\d+)\s+files?\s+changed/),e=c.match(/(\d+)\s+insertions?\(\+\)/),f=c.match(/(\d+)\s+deletions?\(-\)/);return d||e||f?{commits:0,filesChanged:d?parseInt(d[1],10):0,insertions:e?parseInt(e[1],10):0,deletions:f?parseInt(f[1],10):0}:null}(b)}catch{return null}}(k))&&l){let a=l.split("\n").filter(Boolean).length;m={...m,commits:a}}n=h(l)}catch{}let o=(b=j.replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)/g,"").replace(/\x1b\[[0-9;?]*[A-Za-z]/g,"").replace(/\x1b[^[\]()][^\x1b]*/g,"").replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"").replace(/\n{3,}/g,"\n\n").trim()).length<=10240?b:b.slice(b.length-10240);await d.db.taskExecution.update({where:{id:a},data:{summary:n??(l?h(l):null),gitLog:l??null,gitStats:m?JSON.stringify(m):null,exitCode:i,terminalLog:o||null}}),o&&k&&(console.error("[captureExecutionSummary] Starting background AI summary..."),(0,e.generateSummaryFromLog)(o,k).then(async b=>{b&&(console.error(`[captureExecutionSummary] AI summary ready: ${b.slice(0,80)}`),await d.db.taskExecution.update({where:{id:a},data:{summary:b}}))}).catch(a=>{console.error("[captureExecutionSummary] Background AI summary failed:",a)}))}catch(a){console.error("[captureExecutionSummary] Failed to capture summary:",a)}}async function j(a){try{let b=await d.db.task.findUnique({where:{id:a},select:{projectId:!0,executions:{orderBy:{createdAt:"desc"},select:{id:!0,terminalLog:!0,worktreePath:!0,summary:!0}}}});if(!b||0===b.executions.length)return;let c="",f=null,g=[];for(let a of b.executions)a.terminalLog&&(c+=a.terminalLog+"\n---\n"),a.summary&&g.push(a.summary),!f&&a.worktreePath&&(f=a.worktreePath);if(!(c=c.slice(-8e3)).trim())return;let h=g.join("\n"),i=f||process.cwd();console.error(`[captureTaskDreaming] Starting for task=${a.slice(0,8)}, ${b.executions.length} executions`);let j=await (0,e.generateDreamingInsight)(c,i,h);if(!j||!j.shouldCreateNote)return void console.error("[captureTaskDreaming] No note needed");let k=await d.db.projectNote.create({data:{title:j.noteTitle||j.summary.slice(0,50),content:function(a){let b=[];if(b.push("## Summary"),b.push(a.summary),b.push(""),a.insights.length>0)for(let c of(b.push("## Insights"),a.insights))b.push(`- **[${c.type}]**: ${c.content}`);return b.join("\n")}(j),category:"session-insight",projectId:b.projectId,taskId:a}}),l=b.executions[0].id;await d.db.taskExecution.update({where:{id:l},data:{insightNoteId:k.id}}),console.error(`[captureTaskDreaming] Note created: ${k.id}`)}catch(a){console.error("[captureTaskDreaming] Failed:",a)}}a.s(["captureExecutionSummary",0,i,"captureTaskDreaming",0,j])},719041,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__0u-vzb1._.js","server/chunks/ssr/07-d_@anthropic-ai_claude-agent-sdk_sdk_mjs_0myippv._.js"].map(b=>a.l(b))).then(()=>b(845454)))}];
29
29
 
30
- //# sourceMappingURL=_07scffz._.js.map
30
+ //# sourceMappingURL=_086yn8o._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[283857,a=>{"use strict";let b=(0,a.i(711796).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);a.s(["Lightbulb",0,b],283857)},791717,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(577565),e=a.i(442620),f=a.i(573242),g=a.i(668116),h=a.i(704494),i=a.i(814574),j=a.i(699570),k=a.i(866718),l=a.i(429246),m=a.i(951192);a.s(["CreateBranchDialog",0,function({open:a,onOpenChange:n,branches:o,currentBranch:p,localPath:q,onCreated:r,onError:s}){let{t}=(0,m.useI18n)(),[u,v]=(0,c.useState)(""),[w,x]=(0,c.useState)(p),[y,z]=(0,c.useState)(""),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(""),[E,F]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(v(""),x(p),z(""),D(""))},[a,p]);let G=[...new Set(o)].filter(a=>a.toLowerCase().includes(C.toLowerCase())),H=async()=>{if(u.trim()){B(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:q,branch:u.trim(),baseBranch:w})});if(a.ok)n(!1),r();else{let b=await a.json();s(b.error||"Unknown error")}}catch{s("Network error")}finally{B(!1)}}};return(0,b.jsx)(i.Dialog,{open:a,onOpenChange:n,children:(0,b.jsxs)(i.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(i.DialogHeader,{children:(0,b.jsx)(i.DialogTitle,{children:t("git.createBranch")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchName")}),(0,b.jsx)(k.Input,{value:u,onChange:a=>v(a.target.value),placeholder:t("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&H()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>F(!E),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 text-emerald-400"}),(0,b.jsx)("span",{className:"font-mono text-xs text-foreground",children:w})]}),(0,b.jsx)(e.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${E?"rotate-180":""}`})]}),E&&(0,b.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(f.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:C,onChange:a=>D(a.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,b.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:G.map(a=>(0,b.jsxs)("button",{onClick:()=>{x(a),F(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===w?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",children:a}),a===w&&(0,b.jsx)(g.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},a))})]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchDesc")}),(0,b.jsx)(l.Textarea,{value:y,onChange:a=>z(a.target.value),placeholder:t("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,b.jsxs)(i.DialogFooter,{children:[(0,b.jsx)(j.Button,{variant:"outline",onClick:()=>n(!1),children:t("common.cancel")}),(0,b.jsxs)(j.Button,{onClick:H,disabled:!u.trim()||A,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[A?(0,b.jsx)(h.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,t("common.create")]})]})]})})}])},324263,a=>{"use strict";let b=(0,a.i(711796).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);a.s(["ArrowUpFromLine",0,b],324263)},7285,a=>{"use strict";async function b(a,c,d={}){let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:c,path:a,...d})});if(!e.ok)throw Error((await e.json()).error||`${c} failed`);return e.json()}a.s(["gitAction",0,b])},300141,639138,88757,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,c],300141);var d=a.i(728778),e=a.i(374637),f=a.i(10390),g=a.i(442620),h=a.i(811344),i=a.i(394869),j=a.i(207339),k=a.i(704494),l=a.i(699570),m=a.i(579834),n=a.i(786304),o=a.i(814574),p=a.i(429246),q=a.i(951192);function r({patchState:a,isLargeFold:b,onLoad:c}){let{t:e}=(0,q.useI18n)();return b?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,d.jsx)(l.Button,{variant:"link",onClick:c,className:"h-auto p-0 text-sm",children:e("diff.loadDiff")}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:e("diff.foldedLarge")})]}):a&&"loading"!==a.kind?"error"===a.kind?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,d.jsx)("span",{children:e("diff.loadFailed")}),(0,d.jsx)(l.Button,{variant:"ghost",onClick:c,children:e("diff.retry")})]}):"binary"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.binaryNotShown")}):"empty"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.noChanges")}):(0,d.jsx)(s,{patch:a.patch??""}):(0,d.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,d.jsx)(k.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function s({patch:a}){let{t:b}=(0,q.useI18n)(),c=a.split("\n"),e=c.length>500,f=e?c.slice(0,500):c;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:f.map((a,b)=>{let c=a.startsWith("+++")||a.startsWith("---")?"px-4 block text-muted-foreground":a.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":a.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":a.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,d.jsx)("span",{className:c,children:a||" "},b)})}),e&&(0,d.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:b("diff.patchTruncated",{n:String(500),total:String(c.length)})})]})}a.s(["TaskDiffView",0,function({taskId:a,files:b,totalAdded:c,totalRemoved:k,hasConflicts:s,conflictFiles:t,onCommit:u,hasUncommitted:v}){let{t:w}=(0,q.useI18n)(),[x,y]=(0,e.useState)(new Set),[z,A]=(0,e.useState)(new Map),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),H=b=>{A(a=>new Map(a).set(b,{kind:"loading"})),fetch(`/api/tasks/${a}/diff-patch?file=${encodeURIComponent(b)}`).then(a=>a.ok?a.json():Promise.reject(Error(`HTTP ${a.status}`))).then(a=>{A(c=>{let d=new Map(c);return"binary"===a.kind?d.set(b,{kind:"binary"}):"empty"===a.kind?d.set(b,{kind:"empty"}):d.set(b,{kind:"ready",patch:a.patch??""}),d})}).catch(()=>{A(a=>new Map(a).set(b,{kind:"error"}))})};return(0,d.jsxs)("div",{className:"flex flex-col h-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,d.jsxs)("span",{className:"font-medium text-foreground",children:[b.length," files changed"]}),(0,d.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",c]}),(0,d.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",k]})]}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:v&&u&&(0,d.jsxs)(l.Button,{variant:"outline",onClick:()=>C(!0),className:"gap-2",children:[(0,d.jsx)(j.GitCommitHorizontal,{className:"h-4 w-4"}),w("diff.commit")]})})]}),s&&(0,d.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,d.jsx)(h.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,d.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",t.length," conflicting file",1!==t.length?"s":""]})]}),(0,d.jsx)("ul",{className:"ml-6 space-y-1",children:t.map(a=>(0,d.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,d.jsx)("div",{className:"flex-1 overflow-auto",children:0===b.length?(0,d.jsx)(m.EmptyState,{icon:i.GitCompare,title:w("diff.noChanges"),className:"h-full"}):(0,d.jsx)("div",{className:"divide-y divide-border",children:b.map(a=>{let b=x.has(a.filename),c=z.get(a.filename),e=a.added+a.removed;return(0,d.jsxs)("div",{children:[(0,d.jsxs)(l.Button,{variant:"ghost",type:"button",onClick:()=>{let b;return b=x.has(a.filename),void(y(b=>{let c=new Set(b);return c.has(a.filename)?c.delete(a.filename):c.add(a.filename),c}),b||a.isBinary||z.has(a.filename)||a.added+a.removed<=200&&H(a.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[b?(0,d.jsx)(g.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,d.jsx)(f.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,d.jsx)(n.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:w("diff.binary")}):(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,d.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),b&&!a.isBinary&&(0,d.jsx)("div",{className:"border-t border-border bg-background",children:(0,d.jsx)(r,{filename:a.filename,patchState:c,isLargeFold:!c&&e>200,onLoad:()=>H(a.filename)})})]},a.filename)})})}),(0,d.jsx)(o.Dialog,{open:B,onOpenChange:C,children:(0,d.jsxs)(o.DialogContent,{className:"max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsx)(o.DialogTitle,{children:w("diff.commitChanges")})}),(0,d.jsx)("div",{className:"flex flex-col gap-3",children:(0,d.jsx)(p.Textarea,{value:D,onChange:a=>E(a.target.value),placeholder:w("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"ghost",onClick:()=>C(!1),children:w("common.cancel")}),(0,d.jsx)(l.Button,{onClick:async()=>{if(D.trim()&&u){G(!0);try{await u(D.trim()),E(""),C(!1)}finally{G(!1)}}},disabled:!D.trim()||F,children:F?"...":w("diff.commit")})]})]})})]})}],639138);var t=a.i(553798);let u=(0,b.default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);a.s(["TaskMergeConfirmDialog",0,function({open:a,onOpenChange:b,taskId:c,taskTitle:f,baseBranch:g,fileCount:h,commitCount:i,commitLog:j=[],onMergeComplete:m}){let n=(0,t.useRouter)(),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),v=async()=>{q(!0),s(null);try{let a=await fetch(`/api/tasks/${c}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(a.ok){b(!1),m(),n.refresh();return}let d=await a.json().catch(()=>({error:"Merge failed"}));409===a.status?s(`Merge conflicts detected: ${Array.isArray(d.conflictFiles)?d.conflictFiles.join(", "):"unknown files"}`):s(d.error??"Merge failed")}catch{s("Network error — merge failed")}finally{q(!1)}};return(0,d.jsx)(o.Dialog,{open:a,onOpenChange:b,children:(0,d.jsxs)(o.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsxs)(o.DialogTitle,{className:"flex items-center gap-2",children:[(0,d.jsx)(u,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,d.jsxs)("div",{className:"space-y-3 py-2",children:[(0,d.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,d.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:g})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:i})]})]}),j.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,d.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:j.map((a,b)=>(0,d.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:a},b))})]}),r&&(0,d.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,d.jsx)("p",{className:"text-xs text-red-400",children:r})})]}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"outline",onClick:()=>b(!1),disabled:p,children:"Cancel"}),(0,d.jsx)(l.Button,{onClick:v,disabled:p,className:"gap-2",children:p?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],88757)},43085,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40d59748411a3a25872b85aab4a4175a89dd143e94",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},254420,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40233004ae67d9ba423556f54bcd250c4f83cbc987",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,c])},887229,624435,841502,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60f4c78494c43e7d556d4ce7c3c488d1910e78fc41",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],887229);let d=(0,b.createServerReference)("4094de802b172b703cf5fdaf296860f8bd65799a66",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],624435);let e=(0,b.createServerReference)("604be9f4860daafba8f70b6fa644375aa678b18d50",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],841502)},970535,359948,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",0,c],970535);let d=(0,b.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);a.s(["History",0,d],359948)},715525,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(442620),e=a.i(745539),f=a.i(913284),g=a.i(468862),h=a.i(704494),i=a.i(970535),j=a.i(165614),k=a.i(161664),l=a.i(283857),m=a.i(359948),n=a.i(699570),o=a.i(579834),p=a.i(951192);function q({status:a}){switch(a){case"COMPLETED":return(0,b.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,b.jsx)(g.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,b.jsx)(h.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,b.jsx)(i.Clock,{className:"h-4 w-4 text-neutral-500"})}}a.s(["ExecutionTimeline",0,function({executions:a,onResume:f,onContinueLatest:g}){let{t:h,locale:i}=(0,p.useI18n)(),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(null);return 0===a.length?(0,b.jsx)(o.EmptyState,{icon:m.History,title:h("execution.noHistory")}):(0,b.jsxs)("div",{className:"space-y-2 p-3",children:[(0,b.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:h("execution.history")}),a.map(c=>{let m=function(a){if(!a)return null;try{return JSON.parse(a)}catch{return null}}(c.gitStats??null),o=function(a,b){if(!a||!b)return"";let c=new Date(b).getTime()-new Date(a).getTime();if(c<0)return"";let d=Math.floor(c/1e3);if(d<60)return`${d}s`;let e=Math.floor(d/60);if(e<60)return`${e}m ${d%60}s`;let f=Math.floor(e/60);return`${f}h ${e%60}m`}(c.startedAt??null,c.endedAt??null),p=r===c.id;return(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,b.jsxs)("div",{className:"p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(q,{status:c.status}),(0,b.jsx)("span",{className:`font-medium ${function(a){switch(a){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(c.status)}`,children:function(a,b){switch(a){case"COMPLETED":return b("execution.success");case"FAILED":return b("execution.failed");case"RUNNING":return b("execution.running");default:return a}}(c.status,h)}),(0,b.jsx)("span",{className:"text-muted-foreground",children:function(a,b="zh"){if(!a)return"";let c=new Date(a),d=Math.floor((new Date().getTime()-c.getTime())/864e5),e="zh"===b?"zh-CN":"en-US",f=c.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit"});return 0===d?f:1===d?"zh"===b?`昨天 ${f}`:`Yesterday ${f}`:d<7?"zh"===b?`${d}天前 ${f}`:`${d}d ago ${f}`:c.toLocaleDateString(e,{month:"2-digit",day:"2-digit"})+" "+f}(c.startedAt??null,i)}),o&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["(",o,")"]})]}),(0,b.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:c.summary||h("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,b.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,b.jsxs)("span",{children:[m.commits," ",h("execution.commits")]}):null,m.filesChanged?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{children:[m.filesChanged," ",h("execution.files")]})]}):null,m.insertions||m.deletions?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),m.insertions?(0,b.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,b.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),c.insightNote&&(0,b.jsxs)("div",{className:"mt-2",children:[(0,b.jsxs)("button",{onClick:()=>u(t===c.id?null:c.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,b.jsx)(l.Lightbulb,{className:"h-3.5 w-3.5"}),(0,b.jsxs)("span",{className:"font-medium",children:[h("execution.insight"),":"]}),(0,b.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:c.insightNote.title}),t===c.id?(0,b.jsx)(e.ChevronUp,{className:"h-3 w-3"}):(0,b.jsx)(d.ChevronDown,{className:"h-3 w-3"})]}),t===c.id&&(0,b.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:c.insightNote.content})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[c.sessionId&&f?(0,b.jsxs)(n.Button,{size:"sm",onClick:()=>f(c.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,b.jsx)(j.PlayCircle,{className:"h-3.5 w-3.5"}),h("execution.resume")]}):!c.sessionId&&"FAILED"===c.status&&c.id===a[0]?.id&&g?(0,b.jsxs)(n.Button,{size:"sm",onClick:g,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"}),h("execution.tryRecover")]}):null,(0,b.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>s(p?null:c.id),className:"bg-muted text-muted-foreground",children:[p?(0,b.jsx)(e.ChevronUp,{className:"h-3.5 w-3.5"}):(0,b.jsx)(d.ChevronDown,{className:"h-3.5 w-3.5"}),p?h("execution.collapse"):h("execution.details")]})]})]}),p&&(0,b.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[c.gitLog&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.gitLog")}),(0,b.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:c.gitLog.split("\n").slice(0,3).join("\n")})]}),c.terminalLog&&(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.terminalOutput")}),(0,b.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:c.terminalLog})]}),"FAILED"===c.status&&null!=c.exitCode&&(0,b.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",c.exitCode]})]})]},c.id)})]})}])},170026,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60ee5be31ada904c08098cc09586ba5f81726eb962",b.callServer,void 0,b.findSourceMapURL,"updateTask");a.s(["updateTask",0,c])}];
1
+ module.exports=[283857,a=>{"use strict";let b=(0,a.i(711796).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);a.s(["Lightbulb",0,b],283857)},791717,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(577565),e=a.i(442620),f=a.i(573242),g=a.i(668116),h=a.i(704494),i=a.i(814574),j=a.i(699570),k=a.i(866718),l=a.i(429246),m=a.i(951192);a.s(["CreateBranchDialog",0,function({open:a,onOpenChange:n,branches:o,currentBranch:p,localPath:q,onCreated:r,onError:s}){let{t}=(0,m.useI18n)(),[u,v]=(0,c.useState)(""),[w,x]=(0,c.useState)(p),[y,z]=(0,c.useState)(""),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(""),[E,F]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(v(""),x(p),z(""),D(""))},[a,p]);let G=[...new Set(o)].filter(a=>a.toLowerCase().includes(C.toLowerCase())),H=async()=>{if(u.trim()){B(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:q,branch:u.trim(),baseBranch:w})});if(a.ok)n(!1),r();else{let b=await a.json();s(b.error||"Unknown error")}}catch{s("Network error")}finally{B(!1)}}};return(0,b.jsx)(i.Dialog,{open:a,onOpenChange:n,children:(0,b.jsxs)(i.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(i.DialogHeader,{children:(0,b.jsx)(i.DialogTitle,{children:t("git.createBranch")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchName")}),(0,b.jsx)(k.Input,{value:u,onChange:a=>v(a.target.value),placeholder:t("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&H()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>F(!E),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 text-emerald-400"}),(0,b.jsx)("span",{className:"font-mono text-xs text-foreground",children:w})]}),(0,b.jsx)(e.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${E?"rotate-180":""}`})]}),E&&(0,b.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(f.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:C,onChange:a=>D(a.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,b.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:G.map(a=>(0,b.jsxs)("button",{onClick:()=>{x(a),F(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===w?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",children:a}),a===w&&(0,b.jsx)(g.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},a))})]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchDesc")}),(0,b.jsx)(l.Textarea,{value:y,onChange:a=>z(a.target.value),placeholder:t("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,b.jsxs)(i.DialogFooter,{children:[(0,b.jsx)(j.Button,{variant:"outline",onClick:()=>n(!1),children:t("common.cancel")}),(0,b.jsxs)(j.Button,{onClick:H,disabled:!u.trim()||A,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[A?(0,b.jsx)(h.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,t("common.create")]})]})]})})}])},324263,a=>{"use strict";let b=(0,a.i(711796).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);a.s(["ArrowUpFromLine",0,b],324263)},7285,a=>{"use strict";async function b(a,c,d={}){let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:c,path:a,...d})});if(!e.ok)throw Error((await e.json()).error||`${c} failed`);return e.json()}a.s(["gitAction",0,b])},300141,639138,88757,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,c],300141);var d=a.i(728778),e=a.i(374637),f=a.i(10390),g=a.i(442620),h=a.i(811344),i=a.i(394869),j=a.i(207339),k=a.i(704494),l=a.i(699570),m=a.i(579834),n=a.i(786304),o=a.i(814574),p=a.i(429246),q=a.i(951192);function r({patchState:a,isLargeFold:b,onLoad:c}){let{t:e}=(0,q.useI18n)();return b?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,d.jsx)(l.Button,{variant:"link",onClick:c,className:"h-auto p-0 text-sm",children:e("diff.loadDiff")}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:e("diff.foldedLarge")})]}):a&&"loading"!==a.kind?"error"===a.kind?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,d.jsx)("span",{children:e("diff.loadFailed")}),(0,d.jsx)(l.Button,{variant:"ghost",onClick:c,children:e("diff.retry")})]}):"binary"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.binaryNotShown")}):"empty"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.noChanges")}):(0,d.jsx)(s,{patch:a.patch??""}):(0,d.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,d.jsx)(k.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function s({patch:a}){let{t:b}=(0,q.useI18n)(),c=a.split("\n"),e=c.length>500,f=e?c.slice(0,500):c;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:f.map((a,b)=>{let c=a.startsWith("+++")||a.startsWith("---")?"px-4 block text-muted-foreground":a.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":a.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":a.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,d.jsx)("span",{className:c,children:a||" "},b)})}),e&&(0,d.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:b("diff.patchTruncated",{n:String(500),total:String(c.length)})})]})}a.s(["TaskDiffView",0,function({taskId:a,files:b,totalAdded:c,totalRemoved:k,hasConflicts:s,conflictFiles:t,onCommit:u,hasUncommitted:v}){let{t:w}=(0,q.useI18n)(),[x,y]=(0,e.useState)(new Set),[z,A]=(0,e.useState)(new Map),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),H=b=>{A(a=>new Map(a).set(b,{kind:"loading"})),fetch(`/api/tasks/${a}/diff-patch?file=${encodeURIComponent(b)}`).then(a=>a.ok?a.json():Promise.reject(Error(`HTTP ${a.status}`))).then(a=>{A(c=>{let d=new Map(c);return"binary"===a.kind?d.set(b,{kind:"binary"}):"empty"===a.kind?d.set(b,{kind:"empty"}):d.set(b,{kind:"ready",patch:a.patch??""}),d})}).catch(()=>{A(a=>new Map(a).set(b,{kind:"error"}))})};return(0,d.jsxs)("div",{className:"flex flex-col h-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,d.jsxs)("span",{className:"font-medium text-foreground",children:[b.length," files changed"]}),(0,d.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",c]}),(0,d.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",k]})]}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:v&&u&&(0,d.jsxs)(l.Button,{variant:"outline",onClick:()=>C(!0),className:"gap-2",children:[(0,d.jsx)(j.GitCommitHorizontal,{className:"h-4 w-4"}),w("diff.commit")]})})]}),s&&(0,d.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,d.jsx)(h.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,d.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",t.length," conflicting file",1!==t.length?"s":""]})]}),(0,d.jsx)("ul",{className:"ml-6 space-y-1",children:t.map(a=>(0,d.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,d.jsx)("div",{className:"flex-1 overflow-auto",children:0===b.length?(0,d.jsx)(m.EmptyState,{icon:i.GitCompare,title:w("diff.noChanges"),className:"h-full"}):(0,d.jsx)("div",{className:"divide-y divide-border",children:b.map(a=>{let b=x.has(a.filename),c=z.get(a.filename),e=a.added+a.removed;return(0,d.jsxs)("div",{children:[(0,d.jsxs)(l.Button,{variant:"ghost",type:"button",onClick:()=>{let b;return b=x.has(a.filename),void(y(b=>{let c=new Set(b);return c.has(a.filename)?c.delete(a.filename):c.add(a.filename),c}),b||a.isBinary||z.has(a.filename)||a.added+a.removed<=200&&H(a.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[b?(0,d.jsx)(g.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,d.jsx)(f.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,d.jsx)(n.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:w("diff.binary")}):(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,d.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),b&&!a.isBinary&&(0,d.jsx)("div",{className:"border-t border-border bg-background",children:(0,d.jsx)(r,{filename:a.filename,patchState:c,isLargeFold:!c&&e>200,onLoad:()=>H(a.filename)})})]},a.filename)})})}),(0,d.jsx)(o.Dialog,{open:B,onOpenChange:C,children:(0,d.jsxs)(o.DialogContent,{className:"max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsx)(o.DialogTitle,{children:w("diff.commitChanges")})}),(0,d.jsx)("div",{className:"flex flex-col gap-3",children:(0,d.jsx)(p.Textarea,{value:D,onChange:a=>E(a.target.value),placeholder:w("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"ghost",onClick:()=>C(!1),children:w("common.cancel")}),(0,d.jsx)(l.Button,{onClick:async()=>{if(D.trim()&&u){G(!0);try{await u(D.trim()),E(""),C(!1)}finally{G(!1)}}},disabled:!D.trim()||F,children:F?"...":w("diff.commit")})]})]})})]})}],639138);var t=a.i(553798);let u=(0,b.default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);a.s(["TaskMergeConfirmDialog",0,function({open:a,onOpenChange:b,taskId:c,taskTitle:f,baseBranch:g,fileCount:h,commitCount:i,commitLog:j=[],onMergeComplete:m}){let n=(0,t.useRouter)(),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),v=async()=>{q(!0),s(null);try{let a=await fetch(`/api/tasks/${c}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(a.ok){b(!1),m(),n.refresh();return}let d=await a.json().catch(()=>({error:"Merge failed"}));409===a.status?s(`Merge conflicts detected: ${Array.isArray(d.conflictFiles)?d.conflictFiles.join(", "):"unknown files"}`):s(d.error??"Merge failed")}catch{s("Network error — merge failed")}finally{q(!1)}};return(0,d.jsx)(o.Dialog,{open:a,onOpenChange:b,children:(0,d.jsxs)(o.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsxs)(o.DialogTitle,{className:"flex items-center gap-2",children:[(0,d.jsx)(u,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,d.jsxs)("div",{className:"space-y-3 py-2",children:[(0,d.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,d.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:g})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:i})]})]}),j.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,d.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:j.map((a,b)=>(0,d.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:a},b))})]}),r&&(0,d.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,d.jsx)("p",{className:"text-xs text-red-400",children:r})})]}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"outline",onClick:()=>b(!1),disabled:p,children:"Cancel"}),(0,d.jsx)(l.Button,{onClick:v,disabled:p,className:"gap-2",children:p?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],88757)},433937,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40a813cdf74154bec902df674c529f867645c21632",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},28306,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40c4b3da758ed99d058994e50125e2bacb87c02177",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,c])},400969,386615,792e3,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("601172fb23e968143b4ab89f03812a9da36edda611",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],400969);let d=(0,b.createServerReference)("40a0d04e2182c19049121a129bc097fd7a246bb71e",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],386615);let e=(0,b.createServerReference)("601e1f2fa0826aad4b151f644631ed3de772839cf3",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],792e3)},970535,359948,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",0,c],970535);let d=(0,b.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);a.s(["History",0,d],359948)},715525,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(442620),e=a.i(745539),f=a.i(913284),g=a.i(468862),h=a.i(704494),i=a.i(970535),j=a.i(165614),k=a.i(161664),l=a.i(283857),m=a.i(359948),n=a.i(699570),o=a.i(579834),p=a.i(951192);function q({status:a}){switch(a){case"COMPLETED":return(0,b.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,b.jsx)(g.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,b.jsx)(h.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,b.jsx)(i.Clock,{className:"h-4 w-4 text-neutral-500"})}}a.s(["ExecutionTimeline",0,function({executions:a,onResume:f,onContinueLatest:g}){let{t:h,locale:i}=(0,p.useI18n)(),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(null);return 0===a.length?(0,b.jsx)(o.EmptyState,{icon:m.History,title:h("execution.noHistory")}):(0,b.jsxs)("div",{className:"space-y-2 p-3",children:[(0,b.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:h("execution.history")}),a.map(c=>{let m=function(a){if(!a)return null;try{return JSON.parse(a)}catch{return null}}(c.gitStats??null),o=function(a,b){if(!a||!b)return"";let c=new Date(b).getTime()-new Date(a).getTime();if(c<0)return"";let d=Math.floor(c/1e3);if(d<60)return`${d}s`;let e=Math.floor(d/60);if(e<60)return`${e}m ${d%60}s`;let f=Math.floor(e/60);return`${f}h ${e%60}m`}(c.startedAt??null,c.endedAt??null),p=r===c.id;return(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,b.jsxs)("div",{className:"p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(q,{status:c.status}),(0,b.jsx)("span",{className:`font-medium ${function(a){switch(a){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(c.status)}`,children:function(a,b){switch(a){case"COMPLETED":return b("execution.success");case"FAILED":return b("execution.failed");case"RUNNING":return b("execution.running");default:return a}}(c.status,h)}),(0,b.jsx)("span",{className:"text-muted-foreground",children:function(a,b="zh"){if(!a)return"";let c=new Date(a),d=Math.floor((new Date().getTime()-c.getTime())/864e5),e="zh"===b?"zh-CN":"en-US",f=c.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit"});return 0===d?f:1===d?"zh"===b?`昨天 ${f}`:`Yesterday ${f}`:d<7?"zh"===b?`${d}天前 ${f}`:`${d}d ago ${f}`:c.toLocaleDateString(e,{month:"2-digit",day:"2-digit"})+" "+f}(c.startedAt??null,i)}),o&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["(",o,")"]})]}),(0,b.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:c.summary||h("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,b.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,b.jsxs)("span",{children:[m.commits," ",h("execution.commits")]}):null,m.filesChanged?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{children:[m.filesChanged," ",h("execution.files")]})]}):null,m.insertions||m.deletions?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),m.insertions?(0,b.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,b.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),c.insightNote&&(0,b.jsxs)("div",{className:"mt-2",children:[(0,b.jsxs)("button",{onClick:()=>u(t===c.id?null:c.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,b.jsx)(l.Lightbulb,{className:"h-3.5 w-3.5"}),(0,b.jsxs)("span",{className:"font-medium",children:[h("execution.insight"),":"]}),(0,b.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:c.insightNote.title}),t===c.id?(0,b.jsx)(e.ChevronUp,{className:"h-3 w-3"}):(0,b.jsx)(d.ChevronDown,{className:"h-3 w-3"})]}),t===c.id&&(0,b.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:c.insightNote.content})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[c.sessionId&&f?(0,b.jsxs)(n.Button,{size:"sm",onClick:()=>f(c.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,b.jsx)(j.PlayCircle,{className:"h-3.5 w-3.5"}),h("execution.resume")]}):!c.sessionId&&"FAILED"===c.status&&c.id===a[0]?.id&&g?(0,b.jsxs)(n.Button,{size:"sm",onClick:g,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"}),h("execution.tryRecover")]}):null,(0,b.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>s(p?null:c.id),className:"bg-muted text-muted-foreground",children:[p?(0,b.jsx)(e.ChevronUp,{className:"h-3.5 w-3.5"}):(0,b.jsx)(d.ChevronDown,{className:"h-3.5 w-3.5"}),p?h("execution.collapse"):h("execution.details")]})]})]}),p&&(0,b.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[c.gitLog&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.gitLog")}),(0,b.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:c.gitLog.split("\n").slice(0,3).join("\n")})]}),c.terminalLog&&(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.terminalOutput")}),(0,b.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:c.terminalLog})]}),"FAILED"===c.status&&null!=c.exitCode&&(0,b.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",c.exitCode]})]})]},c.id)})]})}])},392698,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("6018c79bde2d7d7b690c57b9fef03c703cef7ac30f",b.callServer,void 0,b.findSourceMapURL,"updateTask");a.s(["updateTask",0,c])}];
2
2
 
3
- //# sourceMappingURL=_0wxd6t.._.js.map
3
+ //# sourceMappingURL=_08t2xag._.js.map
@@ -27,4 +27,4 @@ Rules:
27
27
  - insights array can be empty if nothing notable
28
28
  - Keep each insight concise (1-2 sentences)`,h=await c(g,b);if(!h)return null;try{let a=h,b=a.match(/\{[\s\S]*\}/);b&&(a=b[0]);let c=JSON.parse(a);if("string"!=typeof c.summary||"boolean"!=typeof c.shouldCreateNote)return console.error("[generateDreamingInsight] Invalid response structure"),null;return c}catch(a){return console.error("[generateDreamingInsight] JSON parse failed:",a.message),null}}a.s(["aiQuery",0,c,"generateDreamingInsight",0,e,"generateSummaryFromLog",0,d])},719041,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__0u-vzb1._.js","server/chunks/ssr/07-d_@anthropic-ai_claude-agent-sdk_sdk_mjs_0myippv._.js"].map(b=>a.l(b))).then(()=>b(845454)))}];
29
29
 
30
- //# sourceMappingURL=_0cie3rm._.js.map
30
+ //# sourceMappingURL=_0_gqtgq._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[264589,a=>{"use strict";let b=(0,a.i(711796).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);a.s(["Package",0,b],264589)},786304,a=>{"use strict";var b=a.i(475295),c=a.i(213200),d=a.i(142261),e=a.i(368114);let f=(0,d.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],786304)},412783,a=>{"use strict";var b=a.i(728778),c=a.i(368114);a.s(["Label",0,function({className:a,...d}){return(0,b.jsx)("label",{"data-slot":"label",className:(0,c.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a),...d})}])},521007,a=>{"use strict";a.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},269280,a=>{"use strict";let b=(0,a.i(711796).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],269280)},165614,a=>{"use strict";let b=(0,a.i(711796).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["PlayCircle",0,b],165614)},157551,a=>{"use strict";let b=(0,a.i(711796).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["Calendar",0,b],157551)},757061,99665,a=>{"use strict";var b=a.i(728778),c=a.i(432949),d=a.i(368114),e=a.i(699570),f=a.i(14906);function g({...a}){return(0,b.jsx)(c.Dialog.Portal,{"data-slot":"sheet-portal",...a})}function h({className:a,...e}){return(0,b.jsx)(c.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,d.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",a),...e})}a.s(["Sheet",0,function({...a}){return(0,b.jsx)(c.Dialog.Root,{"data-slot":"sheet",...a})},"SheetContent",0,function({className:a,children:i,side:j="right",showCloseButton:k=!0,...l}){return(0,b.jsxs)(g,{children:[(0,b.jsx)(h,{}),(0,b.jsxs)(c.Dialog.Popup,{"data-slot":"sheet-content","data-side":j,className:(0,d.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",a),...l,children:[i,k&&(0,b.jsxs)(c.Dialog.Close,{"data-slot":"sheet-close",render:(0,b.jsx)(e.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,b.jsx)(f.XIcon,{}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:a,...e}){return(0,b.jsx)(c.Dialog.Description,{"data-slot":"sheet-description",className:(0,d.cn)("text-sm text-muted-foreground",a),...e})},"SheetHeader",0,function({className:a,...c}){return(0,b.jsx)("div",{"data-slot":"sheet-header",className:(0,d.cn)("flex flex-col gap-0.5 p-4",a),...c})},"SheetTitle",0,function({className:a,...e}){return(0,b.jsx)(c.Dialog.Title,{"data-slot":"sheet-title",className:(0,d.cn)("font-heading text-base font-medium text-foreground",a),...e})}],757061);var i=a.i(780410);let j=(0,i.createServerReference)("40c0f1f3358e69ad57657d2555cfee73e994dad43f",i.callServer,void 0,i.findSourceMapURL,"getTaskOverview");a.s(["getTaskOverview",0,j],99665)},972420,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(757061),e=a.i(269876),f=a.i(786304),g=a.i(699570),h=a.i(951192),i=a.i(76688),j=a.i(99665),k=a.i(120999),l=a.i(445798),m=a.i(521007),n=a.i(157551),o=a.i(22761),p=a.i(264589),q=a.i(165614);function r({added:a,removed:c}){let{t:d}=(0,h.useI18n)();return(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,b.jsx)("span",{children:d("diff.filesChanged",{count:String(a+c)})}),a>0&&(0,b.jsxs)("span",{className:"text-green-500",children:["+",a]}),c>0&&(0,b.jsxs)("span",{className:"text-red-500",children:["-",c]})]})}var s=a.i(952313);a.s(["TaskOverviewDrawer",0,function({open:a,onOpenChange:t,taskId:u}){let{t:v}=(0,h.useI18n)(),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useTransition)(),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)([]);(0,c.useEffect)(()=>{u&&a?z(async()=>{let a=await (0,j.getTaskOverview)(u);a&&(x(a),a.project?.workspaceId&&(0,k.getLabelsForWorkspace)(a.project.workspaceId).then(a=>{D(a.map(a=>({id:a.id,name:a.name,color:a.color,isBuiltin:a.isBuiltin})))}).catch(()=>D([])))}):x(null)},[u,a]);let E=w?m.BOARD_COLUMNS.find(a=>a.id===w.status):null,F=w?m.PRIORITY_CONFIG[w.priority]:null,G=w?.executions?.[0]??null,H=(()=>{let a=G?.gitStats;if(!a)return null;try{let b=JSON.parse(a);return{added:b.insertions??0,removed:b.deletions??0}}catch{return null}})(),I=async a=>{if(w?.project)try{await (0,i.createTask)({...a,projectId:w.project.id}),s.toast.success(v("taskDrawer.duplicateSuccess")),B(!1),t(!1)}catch{s.toast.error(v("taskDrawer.duplicateFailed"))}};return(0,b.jsxs)(d.Sheet,{open:a,onOpenChange:t,children:[(0,b.jsxs)(d.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,b.jsxs)(d.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,b.jsx)(d.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:w?.title??""}),(0,b.jsx)(d.SheetDescription,{className:"sr-only",children:v("taskDrawer.title")}),w&&(0,b.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[E&&(0,b.jsxs)(f.Badge,{variant:"secondary",className:"text-xs",children:[(0,b.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${E.color}`}),E.label]}),F&&(0,b.jsx)(f.Badge,{variant:"secondary",className:`text-xs ${F.color}`,children:F.label})]})]}),(0,b.jsx)(e.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:y&&!w?(0,b.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:v("assets.loading")}):w?(0,b.jsxs)("div",{className:"p-4 space-y-4",children:[(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:v("taskDrawer.description")}),(0,b.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:w.description||v("taskDrawer.noDescription")})]}),w.labels.length>0&&(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:v("taskDrawer.labels")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:w.labels.map(a=>(0,b.jsx)(f.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${a.label.color}20`,color:a.label.color,borderColor:`${a.label.color}40`},children:a.label.name},a.label.id))})]}),(0,b.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(n.Calendar,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:v("taskDrawer.createdAt")}),(0,b.jsx)("span",{className:"text-foreground",children:new Date(w.createdAt).toLocaleDateString()})]}),(0,b.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(p.Package,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:v("taskDrawer.resources")}),(0,b.jsx)("span",{className:"text-foreground",children:w._count.assets})]}),(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:v("taskDrawer.fileChanges")}),H?(0,b.jsx)(r,{added:H.added,removed:H.removed}):(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:v("taskDrawer.noFileChanges")})]}),(0,b.jsxs)("section",{children:[(0,b.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,b.jsx)(q.PlayCircle,{className:"h-3.5 w-3.5"}),v("taskDrawer.lastExecution")]}),G?(0,b.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,b.jsx)(f.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:G.status}),G.summary&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:G.summary.slice(0,200)})]}):(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:v("taskDrawer.noExecution")})]}),(0,b.jsx)("section",{children:(0,b.jsxs)(g.Button,{variant:"default",className:"w-full",onClick:()=>{w&&B(!0)},disabled:!w,children:[(0,b.jsx)(o.Copy,{className:"h-4 w-4"}),v("taskDrawer.duplicate")]})})]}):null})]}),w?.project&&(0,b.jsx)(l.CreateTaskDialog,{open:A,onOpenChange:B,onSubmit:I,labels:C,projectType:w.project.type,projectLocalPath:w.project.localPath,prefillFromTask:{title:w.title,description:w.description,priority:w.priority,subPath:w.subPath,labelIds:w.labels.map(a=>a.label.id),baseBranch:w.baseBranch}})]})}],972420)},10390,a=>{"use strict";var b=a.i(421992);a.s(["ChevronRight",()=>b.default])},207339,a=>{"use strict";let b=(0,a.i(711796).default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);a.s(["GitCommitHorizontal",0,b],207339)},394869,a=>{"use strict";let b=(0,a.i(711796).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);a.s(["GitCompare",0,b],394869)},945513,(a,b,c)=>{b.exports=a=>{if(!a||"string"!=typeof a||a.match(/^\s+$/))return[];let b=a.split(`
1
+ module.exports=[264589,a=>{"use strict";let b=(0,a.i(711796).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);a.s(["Package",0,b],264589)},786304,a=>{"use strict";var b=a.i(475295),c=a.i(213200),d=a.i(142261),e=a.i(368114);let f=(0,d.cva)("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});a.s(["Badge",0,function({className:a,variant:d="default",render:g,...h}){var i;return i={defaultTagName:"span",props:(0,b.mergeProps)({className:(0,e.cn)(f({variant:d}),a)},h),render:g,state:{slot:"badge",variant:d}},(0,c.useRenderElement)(i.defaultTagName??"div",i,i)}],786304)},412783,a=>{"use strict";var b=a.i(728778),c=a.i(368114);a.s(["Label",0,function({className:a,...d}){return(0,b.jsx)("label",{"data-slot":"label",className:(0,c.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a),...d})}])},521007,a=>{"use strict";a.s(["BOARD_COLUMNS",0,[{id:"TODO",label:"To Do",color:"bg-slate-400"},{id:"IN_PROGRESS",label:"In Progress",color:"bg-amber-400"},{id:"IN_REVIEW",label:"In Review",color:"bg-sky-400"},{id:"DONE",label:"Done",color:"bg-emerald-400"},{id:"CANCELLED",label:"Cancelled",color:"bg-rose-400"}],"NOTE_CATEGORIES_PRESET",0,["账号","环境","需求","备忘"],"PRIORITY_CONFIG",0,{LOW:{label:"低",color:"bg-slate-500/20 text-slate-300 border border-slate-500/30"},MEDIUM:{label:"中",color:"bg-amber-500/20 text-amber-300 border border-amber-500/30"},HIGH:{label:"高",color:"bg-orange-500/20 text-orange-300 border border-orange-500/30"},CRITICAL:{label:"紧急",color:"bg-rose-500/20 text-rose-300 border border-rose-500/30"}},"TOWER_LABEL_NAME",0,"Tower"])},269280,a=>{"use strict";let b=(0,a.i(711796).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["ArrowLeft",0,b],269280)},165614,a=>{"use strict";let b=(0,a.i(711796).default)("circle-play",[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);a.s(["PlayCircle",0,b],165614)},157551,a=>{"use strict";let b=(0,a.i(711796).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);a.s(["Calendar",0,b],157551)},757061,340221,a=>{"use strict";var b=a.i(728778),c=a.i(432949),d=a.i(368114),e=a.i(699570),f=a.i(14906);function g({...a}){return(0,b.jsx)(c.Dialog.Portal,{"data-slot":"sheet-portal",...a})}function h({className:a,...e}){return(0,b.jsx)(c.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,d.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",a),...e})}a.s(["Sheet",0,function({...a}){return(0,b.jsx)(c.Dialog.Root,{"data-slot":"sheet",...a})},"SheetContent",0,function({className:a,children:i,side:j="right",showCloseButton:k=!0,...l}){return(0,b.jsxs)(g,{children:[(0,b.jsx)(h,{}),(0,b.jsxs)(c.Dialog.Popup,{"data-slot":"sheet-content","data-side":j,className:(0,d.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",a),...l,children:[i,k&&(0,b.jsxs)(c.Dialog.Close,{"data-slot":"sheet-close",render:(0,b.jsx)(e.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,b.jsx)(f.XIcon,{}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:a,...e}){return(0,b.jsx)(c.Dialog.Description,{"data-slot":"sheet-description",className:(0,d.cn)("text-sm text-muted-foreground",a),...e})},"SheetHeader",0,function({className:a,...c}){return(0,b.jsx)("div",{"data-slot":"sheet-header",className:(0,d.cn)("flex flex-col gap-0.5 p-4",a),...c})},"SheetTitle",0,function({className:a,...e}){return(0,b.jsx)(c.Dialog.Title,{"data-slot":"sheet-title",className:(0,d.cn)("font-heading text-base font-medium text-foreground",a),...e})}],757061);var i=a.i(780410);let j=(0,i.createServerReference)("408432700cf2b8320487521790d310de922b0ecff7",i.callServer,void 0,i.findSourceMapURL,"getTaskOverview");a.s(["getTaskOverview",0,j],340221)},972420,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(757061),e=a.i(269876),f=a.i(786304),g=a.i(699570),h=a.i(951192),i=a.i(612472),j=a.i(340221),k=a.i(699723),l=a.i(445798),m=a.i(521007),n=a.i(157551),o=a.i(22761),p=a.i(264589),q=a.i(165614);function r({added:a,removed:c}){let{t:d}=(0,h.useI18n)();return(0,b.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-gray-500",children:[(0,b.jsx)("span",{children:d("diff.filesChanged",{count:String(a+c)})}),a>0&&(0,b.jsxs)("span",{className:"text-green-500",children:["+",a]}),c>0&&(0,b.jsxs)("span",{className:"text-red-500",children:["-",c]})]})}var s=a.i(952313);a.s(["TaskOverviewDrawer",0,function({open:a,onOpenChange:t,taskId:u}){let{t:v}=(0,h.useI18n)(),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useTransition)(),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)([]);(0,c.useEffect)(()=>{u&&a?z(async()=>{let a=await (0,j.getTaskOverview)(u);a&&(x(a),a.project?.workspaceId&&(0,k.getLabelsForWorkspace)(a.project.workspaceId).then(a=>{D(a.map(a=>({id:a.id,name:a.name,color:a.color,isBuiltin:a.isBuiltin})))}).catch(()=>D([])))}):x(null)},[u,a]);let E=w?m.BOARD_COLUMNS.find(a=>a.id===w.status):null,F=w?m.PRIORITY_CONFIG[w.priority]:null,G=w?.executions?.[0]??null,H=(()=>{let a=G?.gitStats;if(!a)return null;try{let b=JSON.parse(a);return{added:b.insertions??0,removed:b.deletions??0}}catch{return null}})(),I=async a=>{if(w?.project)try{await (0,i.createTask)({...a,projectId:w.project.id}),s.toast.success(v("taskDrawer.duplicateSuccess")),B(!1),t(!1)}catch{s.toast.error(v("taskDrawer.duplicateFailed"))}};return(0,b.jsxs)(d.Sheet,{open:a,onOpenChange:t,children:[(0,b.jsxs)(d.SheetContent,{side:"right",className:"w-[380px] sm:max-w-[380px] p-0",children:[(0,b.jsxs)(d.SheetHeader,{className:"px-4 pt-4 pb-3 border-b border-border",children:[(0,b.jsx)(d.SheetTitle,{className:"text-base font-semibold leading-tight pr-8",children:w?.title??""}),(0,b.jsx)(d.SheetDescription,{className:"sr-only",children:v("taskDrawer.title")}),w&&(0,b.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[E&&(0,b.jsxs)(f.Badge,{variant:"secondary",className:"text-xs",children:[(0,b.jsx)("span",{className:`inline-block w-2 h-2 rounded-full mr-1.5 ${E.color}`}),E.label]}),F&&(0,b.jsx)(f.Badge,{variant:"secondary",className:`text-xs ${F.color}`,children:F.label})]})]}),(0,b.jsx)(e.ScrollArea,{className:"flex-1 h-[calc(100%-80px)]",children:y&&!w?(0,b.jsx)("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:v("assets.loading")}):w?(0,b.jsxs)("div",{className:"p-4 space-y-4",children:[(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1",children:v("taskDrawer.description")}),(0,b.jsx)("p",{className:"text-sm text-foreground whitespace-pre-wrap",children:w.description||v("taskDrawer.noDescription")})]}),w.labels.length>0&&(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:v("taskDrawer.labels")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:w.labels.map(a=>(0,b.jsx)(f.Badge,{variant:"secondary",className:"text-xs",style:{backgroundColor:`${a.label.color}20`,color:a.label.color,borderColor:`${a.label.color}40`},children:a.label.name},a.label.id))})]}),(0,b.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(n.Calendar,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:v("taskDrawer.createdAt")}),(0,b.jsx)("span",{className:"text-foreground",children:new Date(w.createdAt).toLocaleDateString()})]}),(0,b.jsxs)("section",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,b.jsx)(p.Package,{className:"h-3.5 w-3.5"}),(0,b.jsx)("span",{children:v("taskDrawer.resources")}),(0,b.jsx)("span",{className:"text-foreground",children:w._count.assets})]}),(0,b.jsxs)("section",{children:[(0,b.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:v("taskDrawer.fileChanges")}),H?(0,b.jsx)(r,{added:H.added,removed:H.removed}):(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:v("taskDrawer.noFileChanges")})]}),(0,b.jsxs)("section",{children:[(0,b.jsxs)("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5 flex items-center gap-1.5",children:[(0,b.jsx)(q.PlayCircle,{className:"h-3.5 w-3.5"}),v("taskDrawer.lastExecution")]}),G?(0,b.jsxs)("div",{className:"rounded-md border border-border p-2.5 text-sm",children:[(0,b.jsx)(f.Badge,{variant:"secondary",className:"text-xs mb-1.5",children:G.status}),G.summary&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-4",children:G.summary.slice(0,200)})]}):(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:v("taskDrawer.noExecution")})]}),(0,b.jsx)("section",{children:(0,b.jsxs)(g.Button,{variant:"default",className:"w-full",onClick:()=>{w&&B(!0)},disabled:!w,children:[(0,b.jsx)(o.Copy,{className:"h-4 w-4"}),v("taskDrawer.duplicate")]})})]}):null})]}),w?.project&&(0,b.jsx)(l.CreateTaskDialog,{open:A,onOpenChange:B,onSubmit:I,labels:C,projectType:w.project.type,projectLocalPath:w.project.localPath,prefillFromTask:{title:w.title,description:w.description,priority:w.priority,subPath:w.subPath,labelIds:w.labels.map(a=>a.label.id),baseBranch:w.baseBranch}})]})}],972420)},10390,a=>{"use strict";var b=a.i(421992);a.s(["ChevronRight",()=>b.default])},207339,a=>{"use strict";let b=(0,a.i(711796).default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);a.s(["GitCommitHorizontal",0,b],207339)},394869,a=>{"use strict";let b=(0,a.i(711796).default)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);a.s(["GitCompare",0,b],394869)},945513,(a,b,c)=>{b.exports=a=>{if(!a||"string"!=typeof a||a.match(/^\s+$/))return[];let b=a.split(`
2
2
  `);if(0===b.length)return[];let c=[],d=null,e=null,g=0,i=0,j=null,k=a=>{let[b,e]=f(a)??[];d={chunks:[],deletions:0,additions:0,from:b,to:e},c.push(d)},l=()=>{(!d||d.chunks.length)&&k()},m=a=>{if(!e)return;let[b]=e.changes.slice(-1);e.changes.push({type:b.type,[b.type]:!0,ln1:b.ln1,ln2:b.ln2,ln:b.ln,content:a})},n=[[/^diff\s/,k],[/^new file mode (\d+)$/,(a,b)=>{l(),d.new=!0,d.newMode=b[1],d.from="/dev/null"}],[/^deleted file mode (\d+)$/,(a,b)=>{l(),d.deleted=!0,d.oldMode=b[1],d.to="/dev/null"}],[/^old mode (\d+)$/,(a,b)=>{l(),d.oldMode=b[1]}],[/^new mode (\d+)$/,(a,b)=>{l(),d.newMode=b[1]}],[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/,(a,b)=>{l(),d.index=a.split(" ").slice(1),b[1]&&(d.oldMode=d.newMode=b[1].trim())}],[/^---\s/,a=>{l(),d.from=h(a)}],[/^\+\+\+\s/,a=>{l(),d.to=h(a)}],[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/,(a,b)=>{d||k(a);let[c,f,h,l]=b.slice(1);g=+c,i=+h,e={content:a,changes:[],oldStart:+c,oldLines:+(f||1),newStart:+h,newLines:+(l||1)},j={oldLines:+(f||1),newLines:+(l||1)},d.chunks.push(e)}],[/^\$/,m]],o=[[/^\$/,m],[/^-/,a=>{e&&(e.changes.push({type:"del",del:!0,ln:g++,content:a}),d.deletions++,j.oldLines--)}],[/^\+/,a=>{e&&(e.changes.push({type:"add",add:!0,ln:i++,content:a}),d.additions++,j.newLines--)}],[/^\s*/,a=>{e?.changes.push({type:"normal",normal:!0,ln1:g++,ln2:i++,content:a}),j.oldLines--,j.newLines--}]],p=a=>{j?(a=>{for(let[b,c]of o){let d=a.match(b);if(d){c(a,d);break}}0===j.oldLines&&0===j.newLines&&(j=null)})(a):(a=>{for(let[b,c]of n){let d=a.match(b);if(d){c(a,d);break}}})(a)};for(let a of b)p(a);return c};let d=/(a|i|w|c|o|1|2)\/.*(?=["']? ["']?(b|i|w|c|o|1|2)\/)|(b|i|w|c|o|1|2)\/.*$/g,e=/^(a|b|i|w|c|o|1|2)\//,f=a=>a?.match(d)?.map(a=>a.replace(e,"").replace(/("|')$/,"")),g=/^\\?['"]|\\?['"]$/g,h=a=>{let b=i(a,"-+").trim();return(b=k(b)).replace(g,"").replace(e,"")},i=(a,b)=>{if(a=m(a),!b&&String.prototype.trimLeft)return a.trimLeft();let c=l(b);return a.replace(RegExp(`^${c}+`),"")},j=/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/,k=a=>{let b=j.exec(a);return b&&(a=a.substring(0,b.index).trim()),a},l=a=>null==a?"\\s":a instanceof RegExp?a.source:`[${m(a).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}]`,m=a=>`${a??""}`},514872,a=>{"use strict";var b=a.i(945513);function c(a){return a.replace(/\r\n/g,"\n")}a.s(["normalizeLF",0,c,"parseUnifiedDiff",0,function(a){return(0,b.default)(c(a))}])}];
3
3
 
4
4
  //# sourceMappingURL=_0_l8.dg._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[300141,639138,88757,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,c],300141);var d=a.i(728778),e=a.i(374637),f=a.i(10390),g=a.i(442620),h=a.i(811344),i=a.i(394869),j=a.i(207339),k=a.i(704494),l=a.i(699570),m=a.i(579834),n=a.i(786304),o=a.i(814574),p=a.i(429246),q=a.i(951192);function r({patchState:a,isLargeFold:b,onLoad:c}){let{t:e}=(0,q.useI18n)();return b?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,d.jsx)(l.Button,{variant:"link",onClick:c,className:"h-auto p-0 text-sm",children:e("diff.loadDiff")}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:e("diff.foldedLarge")})]}):a&&"loading"!==a.kind?"error"===a.kind?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,d.jsx)("span",{children:e("diff.loadFailed")}),(0,d.jsx)(l.Button,{variant:"ghost",onClick:c,children:e("diff.retry")})]}):"binary"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.binaryNotShown")}):"empty"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.noChanges")}):(0,d.jsx)(s,{patch:a.patch??""}):(0,d.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,d.jsx)(k.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function s({patch:a}){let{t:b}=(0,q.useI18n)(),c=a.split("\n"),e=c.length>500,f=e?c.slice(0,500):c;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:f.map((a,b)=>{let c=a.startsWith("+++")||a.startsWith("---")?"px-4 block text-muted-foreground":a.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":a.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":a.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,d.jsx)("span",{className:c,children:a||" "},b)})}),e&&(0,d.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:b("diff.patchTruncated",{n:String(500),total:String(c.length)})})]})}a.s(["TaskDiffView",0,function({taskId:a,files:b,totalAdded:c,totalRemoved:k,hasConflicts:s,conflictFiles:t,onCommit:u,hasUncommitted:v}){let{t:w}=(0,q.useI18n)(),[x,y]=(0,e.useState)(new Set),[z,A]=(0,e.useState)(new Map),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),H=b=>{A(a=>new Map(a).set(b,{kind:"loading"})),fetch(`/api/tasks/${a}/diff-patch?file=${encodeURIComponent(b)}`).then(a=>a.ok?a.json():Promise.reject(Error(`HTTP ${a.status}`))).then(a=>{A(c=>{let d=new Map(c);return"binary"===a.kind?d.set(b,{kind:"binary"}):"empty"===a.kind?d.set(b,{kind:"empty"}):d.set(b,{kind:"ready",patch:a.patch??""}),d})}).catch(()=>{A(a=>new Map(a).set(b,{kind:"error"}))})};return(0,d.jsxs)("div",{className:"flex flex-col h-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,d.jsxs)("span",{className:"font-medium text-foreground",children:[b.length," files changed"]}),(0,d.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",c]}),(0,d.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",k]})]}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:v&&u&&(0,d.jsxs)(l.Button,{variant:"outline",onClick:()=>C(!0),className:"gap-2",children:[(0,d.jsx)(j.GitCommitHorizontal,{className:"h-4 w-4"}),w("diff.commit")]})})]}),s&&(0,d.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,d.jsx)(h.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,d.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",t.length," conflicting file",1!==t.length?"s":""]})]}),(0,d.jsx)("ul",{className:"ml-6 space-y-1",children:t.map(a=>(0,d.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,d.jsx)("div",{className:"flex-1 overflow-auto",children:0===b.length?(0,d.jsx)(m.EmptyState,{icon:i.GitCompare,title:w("diff.noChanges"),className:"h-full"}):(0,d.jsx)("div",{className:"divide-y divide-border",children:b.map(a=>{let b=x.has(a.filename),c=z.get(a.filename),e=a.added+a.removed;return(0,d.jsxs)("div",{children:[(0,d.jsxs)(l.Button,{variant:"ghost",type:"button",onClick:()=>{let b;return b=x.has(a.filename),void(y(b=>{let c=new Set(b);return c.has(a.filename)?c.delete(a.filename):c.add(a.filename),c}),b||a.isBinary||z.has(a.filename)||a.added+a.removed<=200&&H(a.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[b?(0,d.jsx)(g.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,d.jsx)(f.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,d.jsx)(n.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:w("diff.binary")}):(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,d.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),b&&!a.isBinary&&(0,d.jsx)("div",{className:"border-t border-border bg-background",children:(0,d.jsx)(r,{filename:a.filename,patchState:c,isLargeFold:!c&&e>200,onLoad:()=>H(a.filename)})})]},a.filename)})})}),(0,d.jsx)(o.Dialog,{open:B,onOpenChange:C,children:(0,d.jsxs)(o.DialogContent,{className:"max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsx)(o.DialogTitle,{children:w("diff.commitChanges")})}),(0,d.jsx)("div",{className:"flex flex-col gap-3",children:(0,d.jsx)(p.Textarea,{value:D,onChange:a=>E(a.target.value),placeholder:w("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"ghost",onClick:()=>C(!1),children:w("common.cancel")}),(0,d.jsx)(l.Button,{onClick:async()=>{if(D.trim()&&u){G(!0);try{await u(D.trim()),E(""),C(!1)}finally{G(!1)}}},disabled:!D.trim()||F,children:F?"...":w("diff.commit")})]})]})})]})}],639138);var t=a.i(553798);let u=(0,b.default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);a.s(["TaskMergeConfirmDialog",0,function({open:a,onOpenChange:b,taskId:c,taskTitle:f,baseBranch:g,fileCount:h,commitCount:i,commitLog:j=[],onMergeComplete:m}){let n=(0,t.useRouter)(),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),v=async()=>{q(!0),s(null);try{let a=await fetch(`/api/tasks/${c}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(a.ok){b(!1),m(),n.refresh();return}let d=await a.json().catch(()=>({error:"Merge failed"}));409===a.status?s(`Merge conflicts detected: ${Array.isArray(d.conflictFiles)?d.conflictFiles.join(", "):"unknown files"}`):s(d.error??"Merge failed")}catch{s("Network error — merge failed")}finally{q(!1)}};return(0,d.jsx)(o.Dialog,{open:a,onOpenChange:b,children:(0,d.jsxs)(o.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsxs)(o.DialogTitle,{className:"flex items-center gap-2",children:[(0,d.jsx)(u,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,d.jsxs)("div",{className:"space-y-3 py-2",children:[(0,d.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,d.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:g})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:i})]})]}),j.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,d.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:j.map((a,b)=>(0,d.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:a},b))})]}),r&&(0,d.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,d.jsx)("p",{className:"text-xs text-red-400",children:r})})]}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"outline",onClick:()=>b(!1),disabled:p,children:"Cancel"}),(0,d.jsx)(l.Button,{onClick:v,disabled:p,className:"gap-2",children:p?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],88757)},970535,359948,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",0,c],970535);let d=(0,b.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);a.s(["History",0,d],359948)},7285,a=>{"use strict";async function b(a,c,d={}){let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:c,path:a,...d})});if(!e.ok)throw Error((await e.json()).error||`${c} failed`);return e.json()}a.s(["gitAction",0,b])},324263,a=>{"use strict";let b=(0,a.i(711796).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);a.s(["ArrowUpFromLine",0,b],324263)},791717,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(577565),e=a.i(442620),f=a.i(573242),g=a.i(668116),h=a.i(704494),i=a.i(814574),j=a.i(699570),k=a.i(866718),l=a.i(429246),m=a.i(951192);a.s(["CreateBranchDialog",0,function({open:a,onOpenChange:n,branches:o,currentBranch:p,localPath:q,onCreated:r,onError:s}){let{t}=(0,m.useI18n)(),[u,v]=(0,c.useState)(""),[w,x]=(0,c.useState)(p),[y,z]=(0,c.useState)(""),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(""),[E,F]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(v(""),x(p),z(""),D(""))},[a,p]);let G=[...new Set(o)].filter(a=>a.toLowerCase().includes(C.toLowerCase())),H=async()=>{if(u.trim()){B(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:q,branch:u.trim(),baseBranch:w})});if(a.ok)n(!1),r();else{let b=await a.json();s(b.error||"Unknown error")}}catch{s("Network error")}finally{B(!1)}}};return(0,b.jsx)(i.Dialog,{open:a,onOpenChange:n,children:(0,b.jsxs)(i.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(i.DialogHeader,{children:(0,b.jsx)(i.DialogTitle,{children:t("git.createBranch")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchName")}),(0,b.jsx)(k.Input,{value:u,onChange:a=>v(a.target.value),placeholder:t("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&H()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>F(!E),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 text-emerald-400"}),(0,b.jsx)("span",{className:"font-mono text-xs text-foreground",children:w})]}),(0,b.jsx)(e.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${E?"rotate-180":""}`})]}),E&&(0,b.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(f.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:C,onChange:a=>D(a.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,b.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:G.map(a=>(0,b.jsxs)("button",{onClick:()=>{x(a),F(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===w?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",children:a}),a===w&&(0,b.jsx)(g.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},a))})]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchDesc")}),(0,b.jsx)(l.Textarea,{value:y,onChange:a=>z(a.target.value),placeholder:t("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,b.jsxs)(i.DialogFooter,{children:[(0,b.jsx)(j.Button,{variant:"outline",onClick:()=>n(!1),children:t("common.cancel")}),(0,b.jsxs)(j.Button,{onClick:H,disabled:!u.trim()||A,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[A?(0,b.jsx)(h.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,t("common.create")]})]})]})})}])},170026,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60ee5be31ada904c08098cc09586ba5f81726eb962",b.callServer,void 0,b.findSourceMapURL,"updateTask");a.s(["updateTask",0,c])},254420,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40233004ae67d9ba423556f54bcd250c4f83cbc987",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,c])},43085,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40d59748411a3a25872b85aab4a4175a89dd143e94",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},887229,624435,841502,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60f4c78494c43e7d556d4ce7c3c488d1910e78fc41",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],887229);let d=(0,b.createServerReference)("4094de802b172b703cf5fdaf296860f8bd65799a66",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],624435);let e=(0,b.createServerReference)("604be9f4860daafba8f70b6fa644375aa678b18d50",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],841502)},283857,a=>{"use strict";let b=(0,a.i(711796).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);a.s(["Lightbulb",0,b],283857)},715525,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(442620),e=a.i(745539),f=a.i(913284),g=a.i(468862),h=a.i(704494),i=a.i(970535),j=a.i(165614),k=a.i(161664),l=a.i(283857),m=a.i(359948),n=a.i(699570),o=a.i(579834),p=a.i(951192);function q({status:a}){switch(a){case"COMPLETED":return(0,b.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,b.jsx)(g.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,b.jsx)(h.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,b.jsx)(i.Clock,{className:"h-4 w-4 text-neutral-500"})}}a.s(["ExecutionTimeline",0,function({executions:a,onResume:f,onContinueLatest:g}){let{t:h,locale:i}=(0,p.useI18n)(),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(null);return 0===a.length?(0,b.jsx)(o.EmptyState,{icon:m.History,title:h("execution.noHistory")}):(0,b.jsxs)("div",{className:"space-y-2 p-3",children:[(0,b.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:h("execution.history")}),a.map(c=>{let m=function(a){if(!a)return null;try{return JSON.parse(a)}catch{return null}}(c.gitStats??null),o=function(a,b){if(!a||!b)return"";let c=new Date(b).getTime()-new Date(a).getTime();if(c<0)return"";let d=Math.floor(c/1e3);if(d<60)return`${d}s`;let e=Math.floor(d/60);if(e<60)return`${e}m ${d%60}s`;let f=Math.floor(e/60);return`${f}h ${e%60}m`}(c.startedAt??null,c.endedAt??null),p=r===c.id;return(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,b.jsxs)("div",{className:"p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(q,{status:c.status}),(0,b.jsx)("span",{className:`font-medium ${function(a){switch(a){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(c.status)}`,children:function(a,b){switch(a){case"COMPLETED":return b("execution.success");case"FAILED":return b("execution.failed");case"RUNNING":return b("execution.running");default:return a}}(c.status,h)}),(0,b.jsx)("span",{className:"text-muted-foreground",children:function(a,b="zh"){if(!a)return"";let c=new Date(a),d=Math.floor((new Date().getTime()-c.getTime())/864e5),e="zh"===b?"zh-CN":"en-US",f=c.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit"});return 0===d?f:1===d?"zh"===b?`昨天 ${f}`:`Yesterday ${f}`:d<7?"zh"===b?`${d}天前 ${f}`:`${d}d ago ${f}`:c.toLocaleDateString(e,{month:"2-digit",day:"2-digit"})+" "+f}(c.startedAt??null,i)}),o&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["(",o,")"]})]}),(0,b.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:c.summary||h("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,b.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,b.jsxs)("span",{children:[m.commits," ",h("execution.commits")]}):null,m.filesChanged?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{children:[m.filesChanged," ",h("execution.files")]})]}):null,m.insertions||m.deletions?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),m.insertions?(0,b.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,b.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),c.insightNote&&(0,b.jsxs)("div",{className:"mt-2",children:[(0,b.jsxs)("button",{onClick:()=>u(t===c.id?null:c.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,b.jsx)(l.Lightbulb,{className:"h-3.5 w-3.5"}),(0,b.jsxs)("span",{className:"font-medium",children:[h("execution.insight"),":"]}),(0,b.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:c.insightNote.title}),t===c.id?(0,b.jsx)(e.ChevronUp,{className:"h-3 w-3"}):(0,b.jsx)(d.ChevronDown,{className:"h-3 w-3"})]}),t===c.id&&(0,b.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:c.insightNote.content})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[c.sessionId&&f?(0,b.jsxs)(n.Button,{size:"sm",onClick:()=>f(c.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,b.jsx)(j.PlayCircle,{className:"h-3.5 w-3.5"}),h("execution.resume")]}):!c.sessionId&&"FAILED"===c.status&&c.id===a[0]?.id&&g?(0,b.jsxs)(n.Button,{size:"sm",onClick:g,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"}),h("execution.tryRecover")]}):null,(0,b.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>s(p?null:c.id),className:"bg-muted text-muted-foreground",children:[p?(0,b.jsx)(e.ChevronUp,{className:"h-3.5 w-3.5"}):(0,b.jsx)(d.ChevronDown,{className:"h-3.5 w-3.5"}),p?h("execution.collapse"):h("execution.details")]})]})]}),p&&(0,b.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[c.gitLog&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.gitLog")}),(0,b.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:c.gitLog.split("\n").slice(0,3).join("\n")})]}),c.terminalLog&&(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.terminalOutput")}),(0,b.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:c.terminalLog})]}),"FAILED"===c.status&&null!=c.exitCode&&(0,b.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",c.exitCode]})]})]},c.id)})]})}])}];
1
+ module.exports=[300141,639138,88757,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,c],300141);var d=a.i(728778),e=a.i(374637),f=a.i(10390),g=a.i(442620),h=a.i(811344),i=a.i(394869),j=a.i(207339),k=a.i(704494),l=a.i(699570),m=a.i(579834),n=a.i(786304),o=a.i(814574),p=a.i(429246),q=a.i(951192);function r({patchState:a,isLargeFold:b,onLoad:c}){let{t:e}=(0,q.useI18n)();return b?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,d.jsx)(l.Button,{variant:"link",onClick:c,className:"h-auto p-0 text-sm",children:e("diff.loadDiff")}),(0,d.jsx)("span",{className:"text-xs text-muted-foreground",children:e("diff.foldedLarge")})]}):a&&"loading"!==a.kind?"error"===a.kind?(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,d.jsx)("span",{children:e("diff.loadFailed")}),(0,d.jsx)(l.Button,{variant:"ghost",onClick:c,children:e("diff.retry")})]}):"binary"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.binaryNotShown")}):"empty"===a.kind?(0,d.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.noChanges")}):(0,d.jsx)(s,{patch:a.patch??""}):(0,d.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,d.jsx)(k.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function s({patch:a}){let{t:b}=(0,q.useI18n)(),c=a.split("\n"),e=c.length>500,f=e?c.slice(0,500):c;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:f.map((a,b)=>{let c=a.startsWith("+++")||a.startsWith("---")?"px-4 block text-muted-foreground":a.startsWith("+")?"px-4 block bg-green-500/10 text-green-400":a.startsWith("-")?"px-4 block bg-red-500/10 text-red-400":a.startsWith("@@")?"px-4 block bg-blue-500/10 text-blue-300":"px-4 block text-muted-foreground";return(0,d.jsx)("span",{className:c,children:a||" "},b)})}),e&&(0,d.jsx)("div",{className:"px-4 py-2 text-xs text-muted-foreground border-t border-border",children:b("diff.patchTruncated",{n:String(500),total:String(c.length)})})]})}a.s(["TaskDiffView",0,function({taskId:a,files:b,totalAdded:c,totalRemoved:k,hasConflicts:s,conflictFiles:t,onCommit:u,hasUncommitted:v}){let{t:w}=(0,q.useI18n)(),[x,y]=(0,e.useState)(new Set),[z,A]=(0,e.useState)(new Map),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),H=b=>{A(a=>new Map(a).set(b,{kind:"loading"})),fetch(`/api/tasks/${a}/diff-patch?file=${encodeURIComponent(b)}`).then(a=>a.ok?a.json():Promise.reject(Error(`HTTP ${a.status}`))).then(a=>{A(c=>{let d=new Map(c);return"binary"===a.kind?d.set(b,{kind:"binary"}):"empty"===a.kind?d.set(b,{kind:"empty"}):d.set(b,{kind:"ready",patch:a.patch??""}),d})}).catch(()=>{A(a=>new Map(a).set(b,{kind:"error"}))})};return(0,d.jsxs)("div",{className:"flex flex-col h-full",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,d.jsxs)("span",{className:"font-medium text-foreground",children:[b.length," files changed"]}),(0,d.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",c]}),(0,d.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",k]})]}),(0,d.jsx)("div",{className:"flex items-center gap-2",children:v&&u&&(0,d.jsxs)(l.Button,{variant:"outline",onClick:()=>C(!0),className:"gap-2",children:[(0,d.jsx)(j.GitCommitHorizontal,{className:"h-4 w-4"}),w("diff.commit")]})})]}),s&&(0,d.jsxs)("div",{className:"flex flex-col gap-2 border-b border-border bg-amber-500/5 px-4 py-3 flex-shrink-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,d.jsx)(h.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,d.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",t.length," conflicting file",1!==t.length?"s":""]})]}),(0,d.jsx)("ul",{className:"ml-6 space-y-1",children:t.map(a=>(0,d.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,d.jsx)("div",{className:"flex-1 overflow-auto",children:0===b.length?(0,d.jsx)(m.EmptyState,{icon:i.GitCompare,title:w("diff.noChanges"),className:"h-full"}):(0,d.jsx)("div",{className:"divide-y divide-border",children:b.map(a=>{let b=x.has(a.filename),c=z.get(a.filename),e=a.added+a.removed;return(0,d.jsxs)("div",{children:[(0,d.jsxs)(l.Button,{variant:"ghost",type:"button",onClick:()=>{let b;return b=x.has(a.filename),void(y(b=>{let c=new Set(b);return c.has(a.filename)?c.delete(a.filename):c.add(a.filename),c}),b||a.isBinary||z.has(a.filename)||a.added+a.removed<=200&&H(a.filename))},className:"flex w-full items-center gap-2 px-4 py-2.5 text-left hover:bg-accent/50 transition-colors rounded-none h-auto",children:[b?(0,d.jsx)(g.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,d.jsx)(f.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,d.jsx)(n.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:w("diff.binary")}):(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,d.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),b&&!a.isBinary&&(0,d.jsx)("div",{className:"border-t border-border bg-background",children:(0,d.jsx)(r,{filename:a.filename,patchState:c,isLargeFold:!c&&e>200,onLoad:()=>H(a.filename)})})]},a.filename)})})}),(0,d.jsx)(o.Dialog,{open:B,onOpenChange:C,children:(0,d.jsxs)(o.DialogContent,{className:"max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsx)(o.DialogTitle,{children:w("diff.commitChanges")})}),(0,d.jsx)("div",{className:"flex flex-col gap-3",children:(0,d.jsx)(p.Textarea,{value:D,onChange:a=>E(a.target.value),placeholder:w("diff.commitMessagePlaceholder"),rows:5,className:"w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none resize-y min-h-[80px]"})}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"ghost",onClick:()=>C(!1),children:w("common.cancel")}),(0,d.jsx)(l.Button,{onClick:async()=>{if(D.trim()&&u){G(!0);try{await u(D.trim()),E(""),C(!1)}finally{G(!1)}}},disabled:!D.trim()||F,children:F?"...":w("diff.commit")})]})]})})]})}],639138);var t=a.i(553798);let u=(0,b.default)("git-merge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);a.s(["TaskMergeConfirmDialog",0,function({open:a,onOpenChange:b,taskId:c,taskTitle:f,baseBranch:g,fileCount:h,commitCount:i,commitLog:j=[],onMergeComplete:m}){let n=(0,t.useRouter)(),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(null),v=async()=>{q(!0),s(null);try{let a=await fetch(`/api/tasks/${c}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(a.ok){b(!1),m(),n.refresh();return}let d=await a.json().catch(()=>({error:"Merge failed"}));409===a.status?s(`Merge conflicts detected: ${Array.isArray(d.conflictFiles)?d.conflictFiles.join(", "):"unknown files"}`):s(d.error??"Merge failed")}catch{s("Network error — merge failed")}finally{q(!1)}};return(0,d.jsx)(o.Dialog,{open:a,onOpenChange:b,children:(0,d.jsxs)(o.DialogContent,{showCloseButton:!0,className:"sm:max-w-md",children:[(0,d.jsx)(o.DialogHeader,{children:(0,d.jsxs)(o.DialogTitle,{className:"flex items-center gap-2",children:[(0,d.jsx)(u,{className:"h-4 w-4 text-emerald-400"}),"Confirm Merge"]})}),(0,d.jsxs)("div",{className:"space-y-3 py-2",children:[(0,d.jsxs)("div",{className:"rounded-lg border border-border bg-muted/30 p-3 space-y-2.5",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Target branch"}),(0,d.jsx)("code",{className:"text-xs font-mono bg-muted px-2 py-0.5 rounded text-foreground",children:g})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Changed files"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:h})]}),(0,d.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Commits"}),(0,d.jsx)("span",{className:"text-xs font-medium text-foreground",children:i})]})]}),j.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"text-xs text-muted-foreground mb-1 block",children:"Commits"}),(0,d.jsx)("div",{className:"rounded-md border border-border bg-muted/30 p-2 space-y-1 max-h-32 overflow-y-auto",children:j.map((a,b)=>(0,d.jsx)("div",{className:"text-xs font-mono text-foreground/80",children:a},b))})]}),r&&(0,d.jsx)("div",{className:"rounded-lg border border-red-500/20 bg-red-500/10 px-3 py-2",children:(0,d.jsx)("p",{className:"text-xs text-red-400",children:r})})]}),(0,d.jsxs)(o.DialogFooter,{children:[(0,d.jsx)(l.Button,{variant:"outline",onClick:()=>b(!1),disabled:p,children:"Cancel"}),(0,d.jsx)(l.Button,{onClick:v,disabled:p,className:"gap-2",children:p?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(k.Loader2,{className:"h-4 w-4 animate-spin"}),"Merging..."]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u,{className:"h-4 w-4"}),"Confirm Merge"]})})]})]})})}],88757)},970535,359948,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);a.s(["Clock",0,c],970535);let d=(0,b.default)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);a.s(["History",0,d],359948)},7285,a=>{"use strict";async function b(a,c,d={}){let e=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:c,path:a,...d})});if(!e.ok)throw Error((await e.json()).error||`${c} failed`);return e.json()}a.s(["gitAction",0,b])},324263,a=>{"use strict";let b=(0,a.i(711796).default)("arrow-up-from-line",[["path",{d:"m18 9-6-6-6 6",key:"kcunyi"}],["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 21h14",key:"11awu3"}]]);a.s(["ArrowUpFromLine",0,b],324263)},791717,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(577565),e=a.i(442620),f=a.i(573242),g=a.i(668116),h=a.i(704494),i=a.i(814574),j=a.i(699570),k=a.i(866718),l=a.i(429246),m=a.i(951192);a.s(["CreateBranchDialog",0,function({open:a,onOpenChange:n,branches:o,currentBranch:p,localPath:q,onCreated:r,onError:s}){let{t}=(0,m.useI18n)(),[u,v]=(0,c.useState)(""),[w,x]=(0,c.useState)(p),[y,z]=(0,c.useState)(""),[A,B]=(0,c.useState)(!1),[C,D]=(0,c.useState)(""),[E,F]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(v(""),x(p),z(""),D(""))},[a,p]);let G=[...new Set(o)].filter(a=>a.toLowerCase().includes(C.toLowerCase())),H=async()=>{if(u.trim()){B(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:q,branch:u.trim(),baseBranch:w})});if(a.ok)n(!1),r();else{let b=await a.json();s(b.error||"Unknown error")}}catch{s("Network error")}finally{B(!1)}}};return(0,b.jsx)(i.Dialog,{open:a,onOpenChange:n,children:(0,b.jsxs)(i.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(i.DialogHeader,{children:(0,b.jsx)(i.DialogTitle,{children:t("git.createBranch")})}),(0,b.jsxs)("div",{className:"space-y-3 py-2",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchName")}),(0,b.jsx)(k.Input,{value:u,onChange:a=>v(a.target.value),placeholder:t("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&H()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>F(!E),className:"flex w-full items-center justify-between rounded-lg border border-border bg-muted/50 px-3 py-2 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 text-emerald-400"}),(0,b.jsx)("span",{className:"font-mono text-xs text-foreground",children:w})]}),(0,b.jsx)(e.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${E?"rotate-180":""}`})]}),E&&(0,b.jsxs)("div",{className:"absolute left-0 right-0 top-full z-20 mt-1 rounded-lg border border-border bg-popover shadow-xl",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(f.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:C,onChange:a=>D(a.target.value),placeholder:"Filter...",autoFocus:!0,className:"h-7 w-full rounded-md bg-muted/50 pl-7 pr-2 text-xs text-foreground placeholder-muted-foreground outline-none focus:ring-1 focus:ring-ring"})]})}),(0,b.jsx)("div",{className:"max-h-40 overflow-auto py-1",children:G.map(a=>(0,b.jsxs)("button",{onClick:()=>{x(a),F(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===w?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(d.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",children:a}),a===w&&(0,b.jsx)(g.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},a))})]})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:t("git.branchDesc")}),(0,b.jsx)(l.Textarea,{value:y,onChange:a=>z(a.target.value),placeholder:t("git.branchDescPlaceholder"),rows:2,className:"mt-1.5 w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none"})]})]}),(0,b.jsxs)(i.DialogFooter,{children:[(0,b.jsx)(j.Button,{variant:"outline",onClick:()=>n(!1),children:t("common.cancel")}),(0,b.jsxs)(j.Button,{onClick:H,disabled:!u.trim()||A,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[A?(0,b.jsx)(h.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,t("common.create")]})]})]})})}])},392698,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("6018c79bde2d7d7b690c57b9fef03c703cef7ac30f",b.callServer,void 0,b.findSourceMapURL,"updateTask");a.s(["updateTask",0,c])},28306,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40c4b3da758ed99d058994e50125e2bacb87c02177",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,c])},433937,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40a813cdf74154bec902df674c529f867645c21632",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},400969,386615,792e3,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("601172fb23e968143b4ab89f03812a9da36edda611",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],400969);let d=(0,b.createServerReference)("40a0d04e2182c19049121a129bc097fd7a246bb71e",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],386615);let e=(0,b.createServerReference)("601e1f2fa0826aad4b151f644631ed3de772839cf3",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],792e3)},283857,a=>{"use strict";let b=(0,a.i(711796).default)("lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);a.s(["Lightbulb",0,b],283857)},715525,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(442620),e=a.i(745539),f=a.i(913284),g=a.i(468862),h=a.i(704494),i=a.i(970535),j=a.i(165614),k=a.i(161664),l=a.i(283857),m=a.i(359948),n=a.i(699570),o=a.i(579834),p=a.i(951192);function q({status:a}){switch(a){case"COMPLETED":return(0,b.jsx)(f.CheckCircle2,{className:"h-4 w-4 text-emerald-400"});case"FAILED":return(0,b.jsx)(g.XCircle,{className:"h-4 w-4 text-red-400"});case"RUNNING":return(0,b.jsx)(h.Loader2,{className:"h-4 w-4 text-blue-400 animate-spin"});default:return(0,b.jsx)(i.Clock,{className:"h-4 w-4 text-neutral-500"})}}a.s(["ExecutionTimeline",0,function({executions:a,onResume:f,onContinueLatest:g}){let{t:h,locale:i}=(0,p.useI18n)(),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)(null);return 0===a.length?(0,b.jsx)(o.EmptyState,{icon:m.History,title:h("execution.noHistory")}):(0,b.jsxs)("div",{className:"space-y-2 p-3",children:[(0,b.jsx)("p",{className:"px-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:h("execution.history")}),a.map(c=>{let m=function(a){if(!a)return null;try{return JSON.parse(a)}catch{return null}}(c.gitStats??null),o=function(a,b){if(!a||!b)return"";let c=new Date(b).getTime()-new Date(a).getTime();if(c<0)return"";let d=Math.floor(c/1e3);if(d<60)return`${d}s`;let e=Math.floor(d/60);if(e<60)return`${e}m ${d%60}s`;let f=Math.floor(e/60);return`${f}h ${e%60}m`}(c.startedAt??null,c.endedAt??null),p=r===c.id;return(0,b.jsxs)("div",{className:"rounded-lg border border-border bg-background/50 overflow-hidden",children:[(0,b.jsxs)("div",{className:"p-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(q,{status:c.status}),(0,b.jsx)("span",{className:`font-medium ${function(a){switch(a){case"COMPLETED":return"text-emerald-400";case"FAILED":return"text-red-400";case"RUNNING":return"text-blue-400";default:return"text-neutral-400"}}(c.status)}`,children:function(a,b){switch(a){case"COMPLETED":return b("execution.success");case"FAILED":return b("execution.failed");case"RUNNING":return b("execution.running");default:return a}}(c.status,h)}),(0,b.jsx)("span",{className:"text-muted-foreground",children:function(a,b="zh"){if(!a)return"";let c=new Date(a),d=Math.floor((new Date().getTime()-c.getTime())/864e5),e="zh"===b?"zh-CN":"en-US",f=c.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit"});return 0===d?f:1===d?"zh"===b?`昨天 ${f}`:`Yesterday ${f}`:d<7?"zh"===b?`${d}天前 ${f}`:`${d}d ago ${f}`:c.toLocaleDateString(e,{month:"2-digit",day:"2-digit"})+" "+f}(c.startedAt??null,i)}),o&&(0,b.jsxs)("span",{className:"text-muted-foreground/60",children:["(",o,")"]})]}),(0,b.jsx)("p",{className:"mt-1.5 text-sm text-foreground/80 line-clamp-2",children:c.summary||h("execution.noSummary")}),m&&(m.commits||m.filesChanged)&&(0,b.jsxs)("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-muted-foreground font-mono",children:[m.commits?(0,b.jsxs)("span",{children:[m.commits," ",h("execution.commits")]}):null,m.filesChanged?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),(0,b.jsxs)("span",{children:[m.filesChanged," ",h("execution.files")]})]}):null,m.insertions||m.deletions?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{children:"·"}),m.insertions?(0,b.jsxs)("span",{className:"text-emerald-500",children:["+",m.insertions]}):null,m.deletions?(0,b.jsxs)("span",{className:"text-red-400",children:["-",m.deletions]}):null]}):null]}),c.insightNote&&(0,b.jsxs)("div",{className:"mt-2",children:[(0,b.jsxs)("button",{onClick:()=>u(t===c.id?null:c.id),className:"flex items-center gap-1.5 text-xs text-primary/90 hover:text-primary transition-colors",children:[(0,b.jsx)(l.Lightbulb,{className:"h-3.5 w-3.5"}),(0,b.jsxs)("span",{className:"font-medium",children:[h("execution.insight"),":"]}),(0,b.jsx)("span",{className:"text-foreground/70 truncate max-w-[200px]",children:c.insightNote.title}),t===c.id?(0,b.jsx)(e.ChevronUp,{className:"h-3 w-3"}):(0,b.jsx)(d.ChevronDown,{className:"h-3 w-3"})]}),t===c.id&&(0,b.jsx)("div",{className:"mt-2 rounded-md bg-primary/[0.06] border border-primary/10 p-3 text-xs text-foreground/80 whitespace-pre-wrap",children:c.insightNote.content})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex items-center gap-2",children:[c.sessionId&&f?(0,b.jsxs)(n.Button,{size:"sm",onClick:()=>f(c.sessionId),className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[(0,b.jsx)(j.PlayCircle,{className:"h-3.5 w-3.5"}),h("execution.resume")]}):!c.sessionId&&"FAILED"===c.status&&c.id===a[0]?.id&&g?(0,b.jsxs)(n.Button,{size:"sm",onClick:g,className:"bg-blue-500/15 text-blue-300 ring-1 ring-blue-500/20 hover:bg-blue-500/25",children:[(0,b.jsx)(k.RotateCcw,{className:"h-3.5 w-3.5"}),h("execution.tryRecover")]}):null,(0,b.jsxs)(n.Button,{variant:"ghost",size:"sm",onClick:()=>s(p?null:c.id),className:"bg-muted text-muted-foreground",children:[p?(0,b.jsx)(e.ChevronUp,{className:"h-3.5 w-3.5"}):(0,b.jsx)(d.ChevronDown,{className:"h-3.5 w-3.5"}),p?h("execution.collapse"):h("execution.details")]})]})]}),p&&(0,b.jsxs)("div",{className:"border-t border-border px-3 pb-3 space-y-3",children:[c.gitLog&&(0,b.jsxs)("div",{className:"mt-3",children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.gitLog")}),(0,b.jsx)("pre",{className:"rounded-md bg-muted/50 p-2.5 text-xs font-mono text-foreground/70 overflow-x-auto whitespace-pre-wrap",children:c.gitLog.split("\n").slice(0,3).join("\n")})]}),c.terminalLog&&(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground mb-1.5",children:h("execution.terminalOutput")}),(0,b.jsx)("pre",{className:"rounded-md bg-[#0f1419] p-2.5 text-xs font-mono text-neutral-300 overflow-x-auto max-h-48 overflow-y-auto whitespace-pre-wrap",children:c.terminalLog})]}),"FAILED"===c.status&&null!=c.exitCode&&(0,b.jsxs)("p",{className:"text-xs text-red-400/70",children:["Exit code: ",c.exitCode]})]})]},c.id)})]})}])}];
2
2
 
3
- //# sourceMappingURL=_0l6vadw._.js.map
3
+ //# sourceMappingURL=_0_~ftjv._.js.map
@@ -27,4 +27,4 @@ Rules:
27
27
  - insights array can be empty if nothing notable
28
28
  - Keep each insight concise (1-2 sentences)`,h=await c(g,b);if(!h)return null;try{let a=h,b=a.match(/\{[\s\S]*\}/);b&&(a=b[0]);let c=JSON.parse(a);if("string"!=typeof c.summary||"boolean"!=typeof c.shouldCreateNote)return console.error("[generateDreamingInsight] Invalid response structure"),null;return c}catch(a){return console.error("[generateDreamingInsight] JSON parse failed:",a.message),null}}a.s(["aiQuery",0,c,"generateDreamingInsight",0,e,"generateSummaryFromLog",0,d])},719041,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__0u-vzb1._.js","server/chunks/ssr/07-d_@anthropic-ai_claude-agent-sdk_sdk_mjs_0myippv._.js"].map(b=>a.l(b))).then(()=>b(845454)))}];
29
29
 
30
- //# sourceMappingURL=_0a-rizg._.js.map
30
+ //# sourceMappingURL=_0ah80pn._.js.map