tower-studio 0.2.40 → 0.2.42

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 (285) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +2 -0
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/routes-manifest.json +16 -0
  6. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
  14. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +31 -31
  15. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  16. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/api/adapters/test/route.js +2 -2
  18. package/.next/standalone/.next/server/app/api/adapters/test/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/api/files/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  21. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  22. package/.next/standalone/.next/server/app/api/internal/assets/[projectId]/[filename]/route.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/api/internal/assets/reveal/route.js.nft.json +1 -1
  24. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js +1 -1
  25. package/.next/standalone/.next/server/app/api/internal/assistant/attachments/route.js.nft.json +1 -1
  26. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js +1 -1
  27. package/.next/standalone/.next/server/app/api/internal/assistant/chat/route.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/api/internal/assistant/route.js +1 -1
  29. package/.next/standalone/.next/server/app/api/internal/assistant/route.js.nft.json +1 -1
  30. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js +1 -1
  31. package/.next/standalone/.next/server/app/api/internal/assistant/sessions/route.js.nft.json +1 -1
  32. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js +1 -1
  33. package/.next/standalone/.next/server/app/api/internal/backup/import/route.js.nft.json +1 -1
  34. package/.next/standalone/.next/server/app/api/internal/cache/[...segments]/route.js.nft.json +1 -1
  35. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js +2 -3
  36. package/.next/standalone/.next/server/app/api/internal/hooks/install/route.js.nft.json +1 -1
  37. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js +1 -1
  38. package/.next/standalone/.next/server/app/api/internal/hooks/stop/route.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js +1 -1
  40. package/.next/standalone/.next/server/app/api/internal/hooks/upload/route.js.nft.json +1 -1
  41. package/.next/standalone/.next/server/app/api/internal/monaco/[...path]/route.js.nft.json +1 -1
  42. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/buffer/route.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/input/route.js.nft.json +1 -1
  44. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route/app-paths-manifest.json +3 -0
  45. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route/build-manifest.json +9 -0
  46. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route/server-reference-manifest.json +4 -0
  47. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js +11 -0
  48. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route.js.nft.json +1 -0
  49. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/resume/route_client-reference-manifest.js +3 -0
  50. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js +5 -5
  51. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/start/route.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route/app-paths-manifest.json +3 -0
  53. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route/build-manifest.json +9 -0
  54. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route/server-reference-manifest.json +4 -0
  55. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js +11 -0
  56. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route.js.nft.json +1 -0
  57. package/.next/standalone/.next/server/app/api/internal/terminal/[taskId]/stop/route_client-reference-manifest.js +3 -0
  58. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js +1 -1
  59. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff/route.js.nft.json +1 -1
  60. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js +1 -1
  61. package/.next/standalone/.next/server/app/api/tasks/[taskId]/diff-patch/route.js.nft.json +1 -1
  62. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js +1 -1
  63. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +2 -2
  65. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +118 -118
  66. package/.next/standalone/.next/server/app/missions/page.js +2 -3
  67. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +3 -3
  70. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +31 -31
  71. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  72. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  73. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +3 -3
  74. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +31 -31
  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 +3 -3
  78. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +48 -48
  79. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  80. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +3 -3
  82. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +118 -106
  83. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  84. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  85. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +3 -3
  86. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +97 -85
  87. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  88. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  89. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +3 -3
  90. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +74 -62
  91. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  92. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  93. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +3 -3
  94. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +77 -77
  95. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  96. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  97. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +3 -3
  98. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +31 -31
  99. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  100. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  101. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +3 -3
  102. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +73 -73
  103. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  104. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  105. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +4 -4
  106. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +88 -76
  107. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  108. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  109. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +3 -3
  110. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +59 -47
  111. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  112. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  113. package/.next/standalone/.next/server/app-paths-manifest.json +2 -0
  114. package/.next/standalone/.next/server/chunks/07-d_@anthropic-ai_claude-agent-sdk_sdk_mjs_0.721uk._.js +16 -9
  115. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +5 -5
  116. package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_terminal_[taskId]_resume_route_actions_0uascj..js +3 -0
  117. package/.next/standalone/.next/server/chunks/0zjb_server_app_api_internal_terminal_[taskId]_stop_route_actions_0r3bvc-.js +3 -0
  118. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.tbb~k._.js +3 -0
  119. package/.next/standalone/.next/server/chunks/[root-of-the-server]__05zlbau._.js +4 -0
  120. package/.next/standalone/.next/server/chunks/[root-of-the-server]__06qz5fz._.js +4 -0
  121. package/.next/standalone/.next/server/chunks/[root-of-the-server]__075f7rs._.js +4 -0
  122. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08b~~wj._.js +3 -0
  123. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__037x-0a._.js → [root-of-the-server]__0askhfg._.js} +4 -4
  124. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__04u7b2g._.js → [root-of-the-server]__0bo_6v~._.js} +2 -2
  125. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0e~6fr~._.js +3 -0
  126. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0kexk71._.js → [root-of-the-server]__0fxmnch._.js} +3 -3
  127. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0gr~8aq._.js +3 -0
  128. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0hd.0to._.js +3 -0
  129. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0g2lv9x._.js → [root-of-the-server]__0j3l3l4._.js} +2 -2
  130. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0obk~80._.js +28 -0
  131. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__05nz.tg._.js → [root-of-the-server]__0skk0fd._.js} +2 -2
  132. package/.next/standalone/.next/server/chunks/{[root-of-the-server]__0ag-i9m._.js → [root-of-the-server]__0v2nkck._.js} +2 -2
  133. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0~6py0f._.js +4 -0
  134. package/.next/standalone/.next/server/chunks/[root-of-the-server]__126b53k._.js +4 -0
  135. package/.next/standalone/.next/server/chunks/_0aflzks._.js +7 -0
  136. package/.next/standalone/.next/server/chunks/_0b~hjvi._.js +7 -0
  137. package/.next/standalone/.next/server/chunks/_0qk_esg._.js +4 -0
  138. package/.next/standalone/.next/server/chunks/src_02ruq-1._.js +1 -1
  139. package/.next/standalone/.next/server/chunks/src_07gek7k._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/src_0mqkaid._.js +3 -0
  141. package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +4 -0
  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/{0ws9_lucide-react_dist_esm_icons_10_90yo._.js → 0ws9_lucide-react_dist_esm_icons_0pkla8j._.js} +2 -2
  144. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0.-z9ts._.js +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__038u_kv._.js +3 -3
  146. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__045k323._.js +3 -0
  147. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__04wbr9x._.js +1 -1
  148. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__058rbx5._.js +3 -3
  149. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05xg05r._.js +1 -1
  150. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__087pocz._.js +3 -0
  151. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0c2mh1c._.js +47 -0
  152. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ce3fpq._.js +3 -3
  153. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dsaqeq._.js +3 -0
  154. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0gt5dbj._.js +3 -0
  155. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h-se8t._.js +3 -0
  156. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h589~0._.js +3 -3
  157. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  158. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oq-j16._.js +3 -3
  159. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0whlq2_._.js +4 -0
  160. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0z7je5_._.js +1 -1
  161. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__10s67lq._.js +3 -3
  162. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12w35bx._.js +3 -3
  163. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  164. package/.next/standalone/.next/server/chunks/ssr/_03lt1_x._.js +3 -3
  165. package/.next/standalone/.next/server/chunks/ssr/_04~zqvy._.js +3 -3
  166. package/.next/standalone/.next/server/chunks/ssr/_070t_mh._.js +2 -2
  167. package/.next/standalone/.next/server/chunks/ssr/{_0_z-t6g._.js → _08bq4g8._.js} +2 -2
  168. package/.next/standalone/.next/server/chunks/ssr/{_0t863nl._.js → _09z2zmm._.js} +1 -1
  169. package/.next/standalone/.next/server/chunks/ssr/_0_5abui._.js +3 -0
  170. package/.next/standalone/.next/server/chunks/ssr/_0axcfvf._.js +3 -0
  171. package/.next/standalone/.next/server/chunks/ssr/_0c2gong._.js +3 -0
  172. package/.next/standalone/.next/server/chunks/ssr/_0cj9a7y._.js +1 -1
  173. package/.next/standalone/.next/server/chunks/ssr/{_0ecu98s._.js → _0dye20y._.js} +2 -2
  174. package/.next/standalone/.next/server/chunks/ssr/{_0zqwuq~._.js → _0f~l8kv._.js} +3 -3
  175. package/.next/standalone/.next/server/chunks/ssr/{_0o3rthp._.js → _0m.wslt._.js} +2 -2
  176. package/.next/standalone/.next/server/chunks/ssr/_0o2tntr._.js +3 -0
  177. package/.next/standalone/.next/server/chunks/ssr/_0p6p_68._.js +3 -3
  178. package/.next/standalone/.next/server/chunks/ssr/{_0u_uywm._.js → _0q2mf9q._.js} +1 -1
  179. package/.next/standalone/.next/server/chunks/ssr/_0rdyrfd._.js +1 -1
  180. package/.next/standalone/.next/server/chunks/ssr/{_0be3783._.js → _0rq68d8._.js} +2 -2
  181. package/.next/standalone/.next/server/chunks/ssr/{_0hh17jg._.js → _0rxeqmo._.js} +2 -2
  182. package/.next/standalone/.next/server/chunks/ssr/{_07_8m~l._.js → _0u.n7v8._.js} +2 -2
  183. package/.next/standalone/.next/server/chunks/ssr/_0u7c6bz._.js +3 -3
  184. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/_0whlnt7._.js +3 -0
  186. package/.next/standalone/.next/server/chunks/ssr/_0~oc5bl._.js +3 -0
  187. package/.next/standalone/.next/server/chunks/ssr/_116-_2z._.js +3 -0
  188. package/.next/standalone/.next/server/chunks/ssr/_12ca88g._.js +3 -3
  189. package/.next/standalone/.next/server/chunks/ssr/src_0djxlqx._.js +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/src_0eufeyj._.js +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +2 -2
  192. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  194. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  195. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  196. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  197. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  198. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  199. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  200. package/.next/standalone/.next/server/chunks/ssr/src_components_ui_select_tsx_0d2ra01._.js +1 -1
  201. package/.next/standalone/.next/server/chunks/ssr/{src_lib_11w~.ge._.js → src_lib_0x6grav._.js} +1 -1
  202. package/.next/standalone/.next/server/functions-config-manifest.json +2 -0
  203. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  204. package/.next/standalone/.next/server/pages/500.html +1 -1
  205. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  206. package/.next/standalone/.next/server/server-reference-manifest.json +364 -322
  207. package/.next/standalone/.next/static/chunks/0-efd~h5j2ufi.js +1 -0
  208. package/.next/standalone/.next/static/chunks/{0s6gcjv24hfkq.js → 0.onaugl2w8ci.js} +1 -1
  209. package/.next/standalone/.next/static/chunks/{03jo4masky_ji.js → 0.wxa05y455w7.js} +1 -1
  210. package/.next/standalone/.next/static/chunks/{0nc-n~ecfjozt.js → 0.z171pzeg-.7.js} +1 -1
  211. package/.next/standalone/.next/static/chunks/01zlxs4rl~h_o.js +1 -0
  212. package/.next/standalone/.next/static/chunks/{0vm6adb7s2i4g.js → 02f8-ju2se8qw.js} +1 -1
  213. package/.next/standalone/.next/static/chunks/{0roncmx7dp-47.js → 035a_v6g7ioyw.js} +1 -1
  214. package/.next/standalone/.next/static/chunks/{11brr5_f60yx-.js → 040j8d.w8mkyn.js} +1 -1
  215. package/.next/standalone/.next/static/chunks/0_d04kox03m72.css +1 -0
  216. package/.next/standalone/.next/static/chunks/0af7afat3acfx.js +1 -0
  217. package/.next/standalone/.next/static/chunks/0ais32-8.3wlj.js +1 -0
  218. package/.next/standalone/.next/static/chunks/{0tb.0x~6y.21w.js → 0bdwzhoelky9-.js} +1 -1
  219. package/.next/standalone/.next/static/chunks/{0.65.u3zhwau~.js → 0clewc5ifaruu.js} +1 -1
  220. package/.next/standalone/.next/static/chunks/0dewfthzwmcwb.js +1 -0
  221. package/.next/standalone/.next/static/chunks/0f43x~jzb70f4.js +1 -0
  222. package/.next/standalone/.next/static/chunks/{0v.l5.sqos562.js → 0i-x__600fys6.js} +1 -1
  223. package/.next/standalone/.next/static/chunks/{050agjgyp545k.js → 0l25d0nc5ygyd.js} +1 -1
  224. package/.next/standalone/.next/static/chunks/0lyq0-a32.15m.js +1 -0
  225. package/.next/standalone/.next/static/chunks/{0~33w7-91bik-.js → 0m~m1~si.ot17.js} +1 -1
  226. package/.next/standalone/.next/static/chunks/{0bq80txkiwk0q.js → 0rozlwh3y46l0.js} +1 -1
  227. package/.next/standalone/.next/static/chunks/{1821tyytk30ed.js → 0t8lz62rmr801.js} +2 -2
  228. package/.next/standalone/.next/static/chunks/0utrquxfg25b2.js +1 -0
  229. package/.next/standalone/.next/static/chunks/{0bx6xpa7fgedh.js → 0wcdxs4sl-gjf.js} +1 -1
  230. package/.next/standalone/.next/static/chunks/0wcwdbtpm0~r6.js +1 -0
  231. package/.next/standalone/.next/static/chunks/0x-ug4iz~~qr2.js +1 -0
  232. package/.next/standalone/.next/static/chunks/0xj6v_80hlyv0.js +1 -0
  233. package/.next/standalone/.next/static/chunks/0xl7h5fsfc7zk.js +1 -0
  234. package/.next/standalone/.next/static/chunks/{0xxn47mtozln~.js → 0ypd9eqm_pj-o.js} +1 -1
  235. package/.next/standalone/.next/static/chunks/115ae91fq~slq.js +1 -0
  236. package/.next/standalone/.next/static/chunks/{120u45g91sx4q.js → 13.3woq55msp..js} +1 -1
  237. package/.next/standalone/.next/static/chunks/17fug-zaik-v~.js +1 -0
  238. package/.next/standalone/.next/static/chunks/{0v8apmh_d7lz3.js → 17m4o~gdsvuo3.js} +1 -1
  239. package/.next/standalone/package.json +1 -1
  240. package/README.md +25 -3
  241. package/README.zh.md +25 -3
  242. package/dist/mcp-server.cjs +115 -0
  243. package/package.json +1 -1
  244. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0hrprmi.js +0 -4
  245. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.wld9h._.js +0 -3
  246. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0.z8.oi._.js +0 -4
  247. package/.next/standalone/.next/server/chunks/[root-of-the-server]__02jy80j._.js +0 -4
  248. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0az764e._.js +0 -3
  249. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d1bhsb._.js +0 -28
  250. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kuo6q5._.js +0 -4
  251. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0np.553._.js +0 -4
  252. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0u_-4~7._.js +0 -3
  253. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01kyzx1._.js +0 -3
  254. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02mo_kb._.js +0 -3
  255. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02~6htc._.js +0 -4
  256. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__077c1-u._.js +0 -3
  257. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da~mv~._.js +0 -47
  258. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ea-1l0._.js +0 -3
  259. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__10~3-.h._.js +0 -3
  260. package/.next/standalone/.next/server/chunks/ssr/_0-_yznx._.js +0 -43
  261. package/.next/standalone/.next/server/chunks/ssr/_04jcctt._.js +0 -3
  262. package/.next/standalone/.next/server/chunks/ssr/_0a-.s7z._.js +0 -3
  263. package/.next/standalone/.next/server/chunks/ssr/_0aqfqr5._.js +0 -3
  264. package/.next/standalone/.next/server/chunks/ssr/_0g8mw1b._.js +0 -3
  265. package/.next/standalone/.next/server/chunks/ssr/_0qrc1eu._.js +0 -3
  266. package/.next/standalone/.next/server/chunks/ssr/_0~cy-h1._.js +0 -3
  267. package/.next/standalone/.next/server/chunks/ssr/_11rjd4d._.js +0 -3
  268. package/.next/standalone/.next/static/chunks/02zqmiej0opg7.js +0 -1
  269. package/.next/standalone/.next/static/chunks/03rl6s3rpptas.js +0 -1
  270. package/.next/standalone/.next/static/chunks/05n5tgexx2_92.js +0 -1
  271. package/.next/standalone/.next/static/chunks/0651zmy-w~saj.js +0 -1
  272. package/.next/standalone/.next/static/chunks/09ossbd-6zx4g.js +0 -1
  273. package/.next/standalone/.next/static/chunks/0_d-xz2x5qb_c.js +0 -1
  274. package/.next/standalone/.next/static/chunks/0dp-d685xgb68.js +0 -1
  275. package/.next/standalone/.next/static/chunks/0kf6kwtt_mouu.js +0 -1
  276. package/.next/standalone/.next/static/chunks/0l2-qbv0tx44i.js +0 -1
  277. package/.next/standalone/.next/static/chunks/0l3n_2z5xfhor.js +0 -1
  278. package/.next/standalone/.next/static/chunks/0mu2posb9cg4b.js +0 -1
  279. package/.next/standalone/.next/static/chunks/0t1nk8jlwgyb-.js +0 -1
  280. package/.next/standalone/.next/static/chunks/0~qrkswofk7zn.css +0 -1
  281. package/.next/standalone/.next/static/chunks/16e-u8e~pzz_-.js +0 -1
  282. package/.next/standalone/.next/static/chunks/183m8iouij_n8.js +0 -1
  283. /package/.next/standalone/.next/static/{wtOlqKEl8oeuEeWLbCnuv → LCBoYZWhXzs8PjuBmxw7g}/_buildManifest.js +0 -0
  284. /package/.next/standalone/.next/static/{wtOlqKEl8oeuEeWLbCnuv → LCBoYZWhXzs8PjuBmxw7g}/_clientMiddlewareManifest.js +0 -0
  285. /package/.next/standalone/.next/static/{wtOlqKEl8oeuEeWLbCnuv → LCBoYZWhXzs8PjuBmxw7g}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- module.exports=[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)},161664,a=>{"use strict";let b=(0,a.i(711796).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);a.s(["RotateCcw",0,b],161664)},10390,a=>{"use strict";var b=a.i(421992);a.s(["ChevronRight",()=>b.default])},648512,a=>{"use strict";let b=(0,a.i(711796).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],648512)},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)},509405,a=>{"use strict";let b=(0,a.i(711796).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);a.s(["Eye",0,b],509405)},625892,939859,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);a.s(["FolderSearch",0,c],625892);let d=(0,b.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);a.s(["Code",0,d],939859)},551578,a=>{"use strict";var b=a.i(728778);let c=(0,a.i(711796).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var d=a.i(951192);let e=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function f(a){return e[function(a){let b=0;for(let c=0;c<a.length;c++)b=31*b+a.charCodeAt(c)>>>0;return b}(a)%e.length]}let g={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};a.s(["TaskVersionTag",0,function({number:a,name:d,showName:e=!1,className:f="",title:g}){return(0,b.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${f}`,title:g??(d?`${a} \xb7 ${d}`:a),children:[(0,b.jsx)(c,{className:"h-2.5 w-2.5 shrink-0"}),(0,b.jsx)("span",{className:"font-mono",children:a}),e&&d?(0,b.jsx)("span",{className:"max-w-[140px] truncate",children:d}):null]})},"VersionStatusBadge",0,function({status:a}){let{t:c}=(0,d.useI18n)();return(0,b.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${g[a]}`,children:c(`version.status.${a}`)})},"VersionTypeBadge",0,function({name:a}){let{t:c}=(0,d.useI18n)();return a?(0,b.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${f(a)}`,children:a}):(0,b.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:c("version.type.uncategorized")})},"typeBadgeColor",0,f],551578)},241536,382350,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40281d621dd70d1fbc713370a94791e0253b85e135",b.callServer,void 0,b.findSourceMapURL,"openInFileManager");a.s(["openInFileManager",0,c],241536);let d=(0,b.createServerReference)("400abae25b9c151faef7bfe32d33de81b1fb412f18",b.callServer,void 0,b.findSourceMapURL,"openInEditor");a.s(["openInEditor",0,d],382350)},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)},579834,a=>{"use strict";var b=a.i(728778),c=a.i(368114);a.s(["EmptyState",0,function({icon:a,title:d,description:e,action:f,className:g}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",g),children:[a&&(0,b.jsx)(a,{className:"h-10 w-10 text-muted-foreground/40"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e}),f&&(0,b.jsx)("div",{className:"mt-2",children:f})]})}])},420988,572528,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("402138c18dc19abad95f20fefe5d78e3bd4fdc7002",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c],420988);let d=(0,b.createServerReference)("6086b7e9f1d0857cc7cea4604025089fad67005b16",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,d],572528)},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)},811344,a=>{"use strict";var b=a.i(622945);a.s(["AlertTriangle",()=>b.default])},925725,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("408009f4718aa7a8e717942da6ee5b43b0f98a496e",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},627141,a=>{"use strict";var b=a.i(374637),c=a.i(87309);a.s(["useExtension",0,function(a){let d=(0,b.useContext)(c.ExtensionContext);if(!d)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:d.statusMap[a],loading:d.loading,isInstalling:d.installing.has(a),install:()=>d.install(a),uninstall:()=>d.uninstall(a),refresh:()=>d.refresh(a)}}])},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)},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)},945513,(a,b,c)=>{b.exports=a=>{if(!a||"string"!=typeof a||a.match(/^\s+$/))return[];let b=a.split(`
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))}])},651192,690196,723524,365974,419719,157277,272204,844998,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60ed89ca928413677e8dc1f480590040ec51b65d47",b.callServer,void 0,b.findSourceMapURL,"listDirectory");a.s(["listDirectory",0,c],651192);let d=(0,b.createServerReference)("7072d7f26b53006551d8d9dc39281555d07f872c43",b.callServer,void 0,b.findSourceMapURL,"getGitStatus");a.s(["getGitStatus",0,d],690196);let e=(0,b.createServerReference)("60c4496c8e95f98a17f38e51a7e3f3fb1f0a1e188d",b.callServer,void 0,b.findSourceMapURL,"createFile");a.s(["createFile",0,e],723524);let f=(0,b.createServerReference)("60e679bdff6f8bd7926b6a45feae4764041fb21550",b.callServer,void 0,b.findSourceMapURL,"createDirectory");a.s(["createDirectory",0,f],365974);let g=(0,b.createServerReference)("708b6bcc8016d4334f5ed40e6003517b1e584ac41b",b.callServer,void 0,b.findSourceMapURL,"renameEntry");a.s(["renameEntry",0,g],419719);let h=(0,b.createServerReference)("60854c728907bd82fa3f24f96fdb7c8eb9ea1e21a6",b.callServer,void 0,b.findSourceMapURL,"deleteEntry");a.s(["deleteEntry",0,h],157277);let i=(0,b.createServerReference)("40b1930f86f03370140bdba157b30bbeefeef768ee",b.callServer,void 0,b.findSourceMapURL,"listAllFiles");a.s(["listAllFiles",0,i],272204);let j=(0,b.createServerReference)("603d4e9f5a8b9c7414f980e9eb1f53c9f6badb1dc4",b.callServer,void 0,b.findSourceMapURL,"readFileContent");a.s(["readFileContent",0,j],844998)},20298,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("70960cc37dad8fd130d2febe17200a64fb516380a9",b.callServer,void 0,b.findSourceMapURL,"writeFileContent");a.s(["writeFileContent",0,c])},629195,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60d792d13b4d20c8bfb81a87b7d5adc1ef6356f77a",b.callServer,void 0,b.findSourceMapURL,"readFileContentForce");a.s(["readFileContentForce",0,c])},742231,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js"].map(b=>a.l(b))).then(()=>b(610024)))},672257,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0pb0_@monaco-editor_react_dist_index_mjs_0dkxa~o._.js"].map(b=>a.l(b))).then(()=>b(566310)))}];
1
+ module.exports=[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)},161664,a=>{"use strict";let b=(0,a.i(711796).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);a.s(["RotateCcw",0,b],161664)},10390,a=>{"use strict";var b=a.i(421992);a.s(["ChevronRight",()=>b.default])},648512,a=>{"use strict";let b=(0,a.i(711796).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);a.s(["Terminal",0,b],648512)},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)},509405,a=>{"use strict";let b=(0,a.i(711796).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);a.s(["Eye",0,b],509405)},625892,939859,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);a.s(["FolderSearch",0,c],625892);let d=(0,b.default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);a.s(["Code",0,d],939859)},551578,a=>{"use strict";var b=a.i(728778);let c=(0,a.i(711796).default)("milestone",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18.172 6a2 2 0 0 1 1.414.586l2.06 2.06a1.207 1.207 0 0 1 0 1.708l-2.06 2.06a2 2 0 0 1-1.414.586H4a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1z",key:"8gz4t4"}]]);var d=a.i(951192);let e=["bg-sky-500/20 text-sky-300 border border-sky-500/30","bg-amber-500/20 text-amber-300 border border-amber-500/30","bg-violet-500/20 text-violet-300 border border-violet-500/30","bg-emerald-500/20 text-emerald-300 border border-emerald-500/30","bg-rose-500/20 text-rose-300 border border-rose-500/30","bg-cyan-500/20 text-cyan-300 border border-cyan-500/30","bg-indigo-500/20 text-indigo-300 border border-indigo-500/30"];function f(a){return e[function(a){let b=0;for(let c=0;c<a.length;c++)b=31*b+a.charCodeAt(c)>>>0;return b}(a)%e.length]}let g={PLANNED:"bg-slate-500/20 text-slate-300 border border-slate-500/30",ACTIVE:"bg-emerald-500/20 text-emerald-300 border border-emerald-500/30",RELEASED:"bg-zinc-500/20 text-zinc-400 border border-zinc-500/30"};a.s(["TaskVersionTag",0,function({number:a,name:d,showName:e=!1,className:f="",title:g}){return(0,b.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground ${f}`,title:g??(d?`${a} \xb7 ${d}`:a),children:[(0,b.jsx)(c,{className:"h-2.5 w-2.5 shrink-0"}),(0,b.jsx)("span",{className:"font-mono",children:a}),e&&d?(0,b.jsx)("span",{className:"max-w-[140px] truncate",children:d}):null]})},"VersionStatusBadge",0,function({status:a}){let{t:c}=(0,d.useI18n)();return(0,b.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${g[a]}`,children:c(`version.status.${a}`)})},"VersionTypeBadge",0,function({name:a}){let{t:c}=(0,d.useI18n)();return a?(0,b.jsx)("span",{className:`inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium ${f(a)}`,children:a}):(0,b.jsx)("span",{className:"inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium text-muted-foreground",children:c("version.type.uncategorized")})},"typeBadgeColor",0,f],551578)},231780,441143,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40d355190aa13f7b29eb4ae960d07d3f17efbc9494",b.callServer,void 0,b.findSourceMapURL,"openInFileManager");a.s(["openInFileManager",0,c],231780);let d=(0,b.createServerReference)("40887b42fd63bf331153abc27703393fbce3ca35b4",b.callServer,void 0,b.findSourceMapURL,"openInEditor");a.s(["openInEditor",0,d],441143)},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)},579834,a=>{"use strict";var b=a.i(728778),c=a.i(368114);a.s(["EmptyState",0,function({icon:a,title:d,description:e,action:f,className:g}){return(0,b.jsxs)("div",{className:(0,c.cn)("flex h-48 flex-col items-center justify-center gap-2 text-center",g),children:[a&&(0,b.jsx)(a,{className:"h-10 w-10 text-muted-foreground/40"}),(0,b.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:d}),e&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground/60",children:e}),f&&(0,b.jsx)("div",{className:"mt-2",children:f})]})}])},938813,388795,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40440496d342c8b9a8abc5babc36d91186e2d060ef",b.callServer,void 0,b.findSourceMapURL,"stopPtyExecution");a.s(["stopPtyExecution",0,c],938813);let d=(0,b.createServerReference)("60daaf44fc82c289f40d6d430c9f39ac67379ca846",b.callServer,void 0,b.findSourceMapURL,"resumePtyExecution");a.s(["resumePtyExecution",0,d],388795)},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)},811344,a=>{"use strict";var b=a.i(622945);a.s(["AlertTriangle",()=>b.default])},692448,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("402d893c5a621a969e01ad18f836ca670ab21cd95a",b.callServer,void 0,b.findSourceMapURL,"getPrompts");a.s(["getPrompts",0,c])},627141,a=>{"use strict";var b=a.i(374637),c=a.i(87309);a.s(["useExtension",0,function(a){let d=(0,b.useContext)(c.ExtensionContext);if(!d)throw Error("useExtension must be used inside <ExtensionProvider>");return{status:d.statusMap[a],loading:d.loading,isInstalling:d.installing.has(a),install:()=>d.install(a),uninstall:()=>d.uninstall(a),refresh:()=>d.refresh(a)}}])},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)},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)},945513,(a,b,c)=>{b.exports=a=>{if(!a||"string"!=typeof a||a.match(/^\s+$/))return[];let b=a.split(`
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))}])},964663,104791,900030,90871,535829,582445,186480,149473,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("604644f30a1a018f2574d8716b1667df04c61b3df8",b.callServer,void 0,b.findSourceMapURL,"listDirectory");a.s(["listDirectory",0,c],964663);let d=(0,b.createServerReference)("702b7b4cafe04bd1f06a8acff5ddd9819b1b040a6c",b.callServer,void 0,b.findSourceMapURL,"getGitStatus");a.s(["getGitStatus",0,d],104791);let e=(0,b.createServerReference)("60bc31e84a5f231095ac400c6ed0366a1efb75b02a",b.callServer,void 0,b.findSourceMapURL,"createFile");a.s(["createFile",0,e],900030);let f=(0,b.createServerReference)("6013494532f5595f902b12d24f26d3898fe833e194",b.callServer,void 0,b.findSourceMapURL,"createDirectory");a.s(["createDirectory",0,f],90871);let g=(0,b.createServerReference)("70479bc56b507a8acaea22b79f84865c0ac8d9dcbf",b.callServer,void 0,b.findSourceMapURL,"renameEntry");a.s(["renameEntry",0,g],535829);let h=(0,b.createServerReference)("60aa7d76120f845fe5b04a34071142d28ccbd31b1c",b.callServer,void 0,b.findSourceMapURL,"deleteEntry");a.s(["deleteEntry",0,h],582445);let i=(0,b.createServerReference)("405e004a2b52e8a6d92ccad98b1019a40dc7ecd5e4",b.callServer,void 0,b.findSourceMapURL,"listAllFiles");a.s(["listAllFiles",0,i],186480);let j=(0,b.createServerReference)("60e9adb6f53e7e1b0b14efbbc5990b5b081c299cb0",b.callServer,void 0,b.findSourceMapURL,"readFileContent");a.s(["readFileContent",0,j],149473)},504882,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("70952ac40ac2b93c77f49ad33533bdea2657e3d9eb",b.callServer,void 0,b.findSourceMapURL,"writeFileContent");a.s(["writeFileContent",0,c])},425826,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("6075a764fe624c08cc4621c70b164fd6ddfee1e5f2",b.callServer,void 0,b.findSourceMapURL,"readFileContentForce");a.s(["readFileContentForce",0,c])},742231,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js"].map(b=>a.l(b))).then(()=>b(610024)))},672257,a=>{a.v(b=>Promise.all(["server/chunks/ssr/0pb0_@monaco-editor_react_dist_index_mjs_0dkxa~o._.js"].map(b=>a.l(b))).then(()=>b(566310)))}];
3
3
 
4
- //# sourceMappingURL=_0zqwuq~._.js.map
4
+ //# sourceMappingURL=_0f~l8kv._.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)},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])},140597,694116,a=>{"use strict";let b=(0,a.i(711796).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);a.s(["default",0,b],694116),a.s(["File",0,b],140597)},771313,307373,646788,806671,114884,604456,703903,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);a.s(["FilePlus",0,c],771313);let d=(0,b.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);a.s(["FileMinus",0,d],307373);let e=(0,b.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);a.s(["FileQuestion",0,e],646788);let f=(0,b.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);a.s(["FileEdit",0,f],806671);let g=(0,b.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);a.s(["ArrowDown",0,g],114884);let h=(0,b.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);a.s(["ArrowUp",0,h],604456);let i=(0,b.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);a.s(["Minus",0,i],703903)},985716,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(140597),e=a.i(771313),f=a.i(307373),g=a.i(646788),h=a.i(806671),i=a.i(704494),j=a.i(114884),k=a.i(604456),l=a.i(668116),m=a.i(10390),n=a.i(442620),o=a.i(146758),p=a.i(703903),q=a.i(774881),r=a.i(336771),s=a.i(192369),t=a.i(607219),u=a.i(324263);let v=(0,a.i(711796).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var w=a.i(577565),x=a.i(573242),y=a.i(851378),z=a.i(975231),A=a.i(699570),B=a.i(335732),C=a.i(269876),D=a.i(599209),E=a.i(785259),F=a.i(814574),G=a.i(866718),H=a.i(429246),I=a.i(951192);function J({open:a,onOpenChange:d,branches:e,currentBranch:f,localPath:g,onCreated:h,onError:j}){let{t:k}=(0,I.useI18n)(),[m,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(f),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)(!1),[v,y]=(0,c.useState)(""),[z,B]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(o(""),q(f),s(""),y(""))},[a,f]);let C=[...new Set(e)].filter(a=>a.toLowerCase().includes(v.toLowerCase())),D=async()=>{if(m.trim()){u(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:g,branch:m.trim(),baseBranch:p})});if(a.ok)d(!1),h();else{let b=await a.json();j(b.error||"Unknown error")}}catch{j("Network error")}finally{u(!1)}}};return(0,b.jsx)(F.Dialog,{open:a,onOpenChange:d,children:(0,b.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(F.DialogHeader,{children:(0,b.jsx)(F.DialogTitle,{children:k("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:k("git.branchName")}),(0,b.jsx)(G.Input,{value:m,onChange:a=>o(a.target.value),placeholder:k("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&D()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>B(!z),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 min-w-0 items-center gap-2",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:p,children:p})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${z?"rotate-180":""}`})]}),z&&(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)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:v,onChange:a=>y(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:C.map(a=>(0,b.jsxs)("button",{onClick:()=>{q(a),B(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===p?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),a===p&&(0,b.jsx)(l.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:k("git.branchDesc")}),(0,b.jsx)(H.Textarea,{value:r,onChange:a=>s(a.target.value),placeholder:k("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)(F.DialogFooter,{children:[(0,b.jsx)(A.Button,{variant:"outline",onClick:()=>d(!1),children:k("common.cancel")}),(0,b.jsxs)(A.Button,{onClick:D,disabled:!m.trim()||t,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[t?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,k("common.create")]})]})]})})}var K=a.i(952313),L=a.i(7285);let M={modified:h.FileEdit,added:e.FilePlus,deleted:f.FileMinus,untracked:g.FileQuestion,renamed:h.FileEdit},N={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},O={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function P(a){let b={name:"",path:"",isDir:!0,children:[]};for(let c of a){let a=c.file.split("/").filter(Boolean);if(0===a.length)continue;let d=b;for(let b=0;b<a.length;b++){let e=a[b],f=b===a.length-1,g=a.slice(0,b+1).join("/");if(f)d.children.push({name:e,path:g,isDir:!1,children:[],file:c});else{let a=d.children.find(a=>a.isDir&&a.name===e);a||(a={name:e,path:g,isDir:!0,children:[]},d.children.push(a)),d=a}}}return(function a(b){if(b.isDir&&(b.children=b.children.map(a),1===b.children.length&&b.children[0].isDir&&""!==b.name)){let a=b.children[0];return{...a,name:`${b.name}/${a.name}`}}return b})(b).children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name))}function Q({scroll:a,children:c}){return a?(0,b.jsx)(C.ScrollArea,{className:"flex-1 min-h-0",children:c}):(0,b.jsx)("div",{children:c})}function R({label:a,count:d,labelColor:e,tree:f,batchAction:g,batchLabel:h,batchIcon:i,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r}){let[s,t]=(0,c.useState)(!0);return 0===d?null:(0,b.jsxs)("div",{className:"border-b border-border",children:[(0,b.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,b.jsxs)("button",{onClick:()=>t(!s),className:"flex items-center gap-1 flex-1 min-w-0",children:[s?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${e}`,children:[a," (",d,")"]})]}),(0,b.jsx)(A.Button,{variant:"ghost",size:"icon-xs",onClick:g,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":h,children:i})]}),s&&(0,b.jsx)("div",{className:"pb-1",children:f.map(a=>(0,b.jsx)(S,{node:a,depth:0,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r},a.path))})]})}function S({node:a,depth:e,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l}){let[p,q]=(0,c.useState)(!0),r={paddingLeft:`calc(${e} * 8px + 4px)`};if(a.isDir)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{onClick:()=>q(!p),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:r,children:[p?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsx)(o.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,b.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:a.name})]}),p&&a.children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name)).map(a=>(0,b.jsx)(S,{node:a,depth:e+1,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l},a.path))]});let s=a.file,t=M[s.status]||d.File,u=N[s.status]||"text-muted-foreground",v=O[s.status]||"?";return(0,b.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:r,onClick:()=>f(s),children:[(0,b.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,b.jsx)(t,{className:`h-3.5 w-3.5 shrink-0 ${u}`}),(0,b.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:a.name}),(0,b.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${u}`,children:v}),j&&(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:a=>{a.stopPropagation(),j(s.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":l??"",children:k}),l&&(0,b.jsx)(E.TooltipContent,{side:"bottom",children:l})]}),(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:a=>{a.stopPropagation(),g(s.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":i??"",children:h}),i&&(0,b.jsx)(E.TooltipContent,{side:"bottom",children:i})]})]})}a.s(["EditorGitPanel",0,function({localPath:a,onFileSelect:d,mode:e="project"}){let f="task"===e,{t:g}=(0,I.useI18n)(),[h,m]=(0,c.useState)(null),[o,C]=(0,c.useState)(!0),[F,G]=(0,c.useState)(""),[H,M]=(0,c.useState)(!1),[N,O]=(0,c.useState)(!1),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(!1),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(""),[$,_]=(0,c.useState)(!1),aa=(0,c.useCallback)(async()=>{try{let b=await fetch(`/api/git?path=${encodeURIComponent(a)}`);if(b.ok){let c=await b.json();m({changedFiles:c.changedFiles??[],ahead:c.ahead??0,behind:c.behind??0,remoteUrl:c.remoteUrl??"",currentBranch:c.currentBranch??"",branches:c.branches??[],remoteBranches:c.remoteBranches??[],topLevel:c.topLevel??a})}}catch{}finally{C(!1)}},[a]);(0,c.useEffect)(()=>{aa();let a=setInterval(aa,5e3);return()=>clearInterval(a)},[aa]);let ab=async b=>{try{await (0,L.gitAction)(a,"stage",{files:b}),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ac=async b=>{try{await (0,L.gitAction)(a,"unstage",{files:b}),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ad=async()=>{if(F.trim()){M(!0);try{await (0,L.gitAction)(a,"commit",{message:F}),G(""),K.toast.success(g("git.commitSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{M(!1)}}},ae=async b=>{O(!0);try{await (0,L.gitAction)(a,"pull",b?{branch:b}:{}),K.toast.success(g("git.pullSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{O(!1)}},af=async b=>{T(!0);try{await (0,L.gitAction)(a,"push",b?{branch:b}:{}),K.toast.success(g("git.pushSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{T(!1)}},ag=async()=>{V(!0);try{await (0,L.gitAction)(a,"fetch"),K.toast.success(g("git.fetchSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{V(!1)}},ah=async b=>{try{await (0,L.gitAction)(a,"checkout",{branch:b}),X(!1),K.toast.success(`${g("git.switchSuccess")} ${b}`),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ai=async()=>{try{await (0,L.gitAction)(a,"stash-save",{message:F||void 0}),G(""),K.toast.success(g("git.stashSaved")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},aj=async()=>{try{await (0,L.gitAction)(a,"stash-pop",{index:0}),K.toast.success(g("git.stashApplied")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ak=async b=>{try{await (0,L.gitAction)(a,"discard-file",{file:b}),K.toast.success(g("git.discardFileSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},al=async()=>{try{await (0,L.gitAction)(a,"discard-all"),K.toast.success(g("git.discardSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},am=async b=>{if("deleted"===b.status)return;let c=h?.topLevel??a;try{let e=await (0,L.gitAction)(a,"show",{file:b.file});d?.(b.file,e.content??"",c)}catch{d?.(b.file,"",c)}},an=h?.changedFiles.filter(a=>a.staged)??[],ao=h?.changedFiles.filter(a=>!a.staged)??[],ap=(0,c.useMemo)(()=>P(an),[an]),aq=(0,c.useMemo)(()=>P(ao),[ao]);if(o)return(0,b.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,b.jsx)(i.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!h)return null;function ar(a){let b=[];for(let c of a)c.isDir?b.push(...ar(c.children)):c.file&&b.push(c.file.file);return b}let as=[...h?.branches??[],...(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a))],at=Y?as.filter(a=>a.toLowerCase().includes(Y.toLowerCase())):as;return(0,b.jsxs)("div",{className:f?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,b.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[f?(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{render:(0,b.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:h?.currentBranch||"—"})]})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:h?.currentBranch||"—"})]}):(0,b.jsxs)(D.Popover,{open:W,onOpenChange:a=>{X(a),a&&Z("")},children:[(0,b.jsxs)(D.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:h?.currentBranch||void 0,children:h?.currentBranch||"—"})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${W?"rotate-180":""}`})]}),(0,b.jsxs)(D.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:Y,onChange:a=>Z(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.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(h?.branches??[]).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.localBranches")}),(h?.branches??[]).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).map(a=>{let c=a===h?.currentBranch;return(0,b.jsxs)("button",{onClick:()=>{c?X(!1):ah(a)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${c?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),c&&(0,b.jsx)(l.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${a}`)}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.remoteBranches")}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).map(a=>(0,b.jsxs)("button",{onClick:()=>ah(a),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,b.jsx)(y.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a})]},`remote-${a}`)),0===at.length&&(0,b.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:ag,disabled:U,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 ${U?"animate-spin":""}`})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:()=>{X(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":g("git.createBranch"),children:(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",children:g("git.createBranch")})]})]})]}),(0,b.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,b.jsx)("textarea",{value:F,onChange:a=>G(a.target.value),placeholder:g("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:a=>{(a.metaKey||a.ctrlKey)&&"Enter"===a.key&&ad()}}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsxs)(A.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:ad,disabled:H||!F.trim()||0===an.length,children:[H?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(l.Check,{className:"h-3 w-3"}),g("git.commit")]}),(0,b.jsxs)(B.DropdownMenu,{children:[(0,b.jsx)(B.DropdownMenuTrigger,{render:(0,b.jsx)(A.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,b.jsx)(r.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,b.jsxs)(B.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.commit")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ad,disabled:!F.trim()||0===an.length,children:[(0,b.jsx)(l.Check,{className:"h-3.5 w-3.5 mr-2"}),g("git.commit")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.changes")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ab(ar(aq)),disabled:0===ao.length,children:[(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5 mr-2"}),g("git.stageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ac(ar(ap)),disabled:0===an.length,children:[(0,b.jsx)(p.Minus,{className:"h-3.5 w-3.5 mr-2"}),g("git.unstageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:al,disabled:0===ao.length,children:[(0,b.jsx)(v,{className:"h-3.5 w-3.5 mr-2"}),g("git.discardAll")]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.sync")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pull")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),disabled:S,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.push")]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pullFrom"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.behind>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",h.behind]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:S,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.pushTo"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.ahead>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",h.ahead]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ag,disabled:U,children:[(0,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${U?"animate-spin":""}`}),g("git.fetchAll")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.stash")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ai,disabled:0===h.changedFiles.length,children:[(0,b.jsx)(t.Archive,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashSave")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:aj,children:[(0,b.jsx)(u.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashPopLatest")]})]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,b.jsx)(w.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),h.currentBranch]})]})]})]})]}),(0,b.jsxs)(Q,{scroll:f,children:[(0,b.jsx)(R,{label:g("git.stagedChanges"),count:an.length,labelColor:"text-emerald-400",tree:ap,batchAction:()=>ac(ar(ap)),batchLabel:g("git.unstageAll"),batchIcon:(0,b.jsx)(p.Minus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ac([a]),fileActionIcon:"−",fileActionLabel:g("git.unstageFile")}),(0,b.jsx)(R,{label:g("git.unstagedChanges"),count:ao.length,labelColor:"text-muted-foreground",tree:aq,batchAction:()=>ab(ar(aq)),batchLabel:g("git.stageAll"),batchIcon:(0,b.jsx)(q.Plus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ab([a]),fileActionIcon:"+",fileActionLabel:g("git.stageFile"),onFileSecondaryAction:a=>ak(a),fileSecondaryIcon:(0,b.jsx)(z.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:g("git.discardFile")}),0===h.changedFiles.length&&(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,b.jsx)(l.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g("git.noChanges")})]})]}),(0,b.jsx)(J,{open:$,onOpenChange:_,branches:[...h?.branches??[],...h?.remoteBranches??[]],currentBranch:h?.currentBranch??"",localPath:a,onCreated:async()=>{K.toast.success(g("git.createSuccess")),await aa()},onError:a=>K.toast.error(`${g("git.createFailed")}: ${a}`)})]})}],985716)},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)},886472,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40c2f366328ec18d2a9177b41d8767c8da1d4d294f",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},670285,850586,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("7c56aaadccf8125da890390685edc56b0cf4213044",b.callServer,void 0,b.findSourceMapURL,"startPtyExecutionSafe");a.s(["startPtyExecutionSafe",0,c],670285);let d=(0,b.createServerReference)("405eab1cdb8c0bf4f681f82198def577a1923e6197",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,d],850586)},352151,778767,370697,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("6032fabcdfa44aa55c8ee0f125b85926ee14909f93",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],352151);let d=(0,b.createServerReference)("40daee2c4e1b8dd556a7a4760314d360046424658d",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],778767);let e=(0,b.createServerReference)("601216e295802ef9bc4de68c36d8f4da292222defe",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],370697)},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)})]})}])},572480,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60946df3f23a8cf5add05e656d0eeeac5dde6bcd3b",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)},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])},140597,694116,a=>{"use strict";let b=(0,a.i(711796).default)("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);a.s(["default",0,b],694116),a.s(["File",0,b],140597)},771313,307373,646788,806671,114884,604456,703903,a=>{"use strict";var b=a.i(711796);let c=(0,b.default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);a.s(["FilePlus",0,c],771313);let d=(0,b.default)("file-minus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}]]);a.s(["FileMinus",0,d],307373);let e=(0,b.default)("file-question-mark",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]]);a.s(["FileQuestion",0,e],646788);let f=(0,b.default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);a.s(["FileEdit",0,f],806671);let g=(0,b.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);a.s(["ArrowDown",0,g],114884);let h=(0,b.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);a.s(["ArrowUp",0,h],604456);let i=(0,b.default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);a.s(["Minus",0,i],703903)},985716,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(140597),e=a.i(771313),f=a.i(307373),g=a.i(646788),h=a.i(806671),i=a.i(704494),j=a.i(114884),k=a.i(604456),l=a.i(668116),m=a.i(10390),n=a.i(442620),o=a.i(146758),p=a.i(703903),q=a.i(774881),r=a.i(336771),s=a.i(192369),t=a.i(607219),u=a.i(324263);let v=(0,a.i(711796).default)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);var w=a.i(577565),x=a.i(573242),y=a.i(851378),z=a.i(975231),A=a.i(699570),B=a.i(335732),C=a.i(269876),D=a.i(599209),E=a.i(785259),F=a.i(814574),G=a.i(866718),H=a.i(429246),I=a.i(951192);function J({open:a,onOpenChange:d,branches:e,currentBranch:f,localPath:g,onCreated:h,onError:j}){let{t:k}=(0,I.useI18n)(),[m,o]=(0,c.useState)(""),[p,q]=(0,c.useState)(f),[r,s]=(0,c.useState)(""),[t,u]=(0,c.useState)(!1),[v,y]=(0,c.useState)(""),[z,B]=(0,c.useState)(!1);(0,c.useEffect)(()=>{a&&(o(""),q(f),s(""),y(""))},[a,f]);let C=[...new Set(e)].filter(a=>a.toLowerCase().includes(v.toLowerCase())),D=async()=>{if(m.trim()){u(!0);try{let a=await fetch("/api/git",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create-branch",path:g,branch:m.trim(),baseBranch:p})});if(a.ok)d(!1),h();else{let b=await a.json();j(b.error||"Unknown error")}}catch{j("Network error")}finally{u(!1)}}};return(0,b.jsx)(F.Dialog,{open:a,onOpenChange:d,children:(0,b.jsxs)(F.DialogContent,{className:"sm:max-w-sm",children:[(0,b.jsx)(F.DialogHeader,{children:(0,b.jsx)(F.DialogTitle,{children:k("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:k("git.branchName")}),(0,b.jsx)(G.Input,{value:m,onChange:a=>o(a.target.value),placeholder:k("git.branchNamePlaceholder"),className:"mt-1.5 font-mono text-xs",onKeyDown:a=>"Enter"===a.key&&D()})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{className:"text-xs font-medium text-muted-foreground",children:k("git.baseBranch")}),(0,b.jsxs)("div",{className:"relative mt-1.5",children:[(0,b.jsxs)("button",{onClick:()=>B(!z),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 min-w-0 items-center gap-2",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:p,children:p})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 text-muted-foreground transition-transform ${z?"rotate-180":""}`})]}),z&&(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)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:v,onChange:a=>y(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:C.map(a=>(0,b.jsxs)("button",{onClick:()=>{q(a),B(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left transition-colors ${a===p?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),a===p&&(0,b.jsx)(l.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:k("git.branchDesc")}),(0,b.jsx)(H.Textarea,{value:r,onChange:a=>s(a.target.value),placeholder:k("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)(F.DialogFooter,{children:[(0,b.jsx)(A.Button,{variant:"outline",onClick:()=>d(!1),children:k("common.cancel")}),(0,b.jsxs)(A.Button,{onClick:D,disabled:!m.trim()||t,className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:[t?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin mr-1"}):null,k("common.create")]})]})]})})}var K=a.i(952313),L=a.i(7285);let M={modified:h.FileEdit,added:e.FilePlus,deleted:f.FileMinus,untracked:g.FileQuestion,renamed:h.FileEdit},N={modified:"text-amber-400",added:"text-emerald-400",deleted:"text-rose-400",untracked:"text-muted-foreground",renamed:"text-sky-400"},O={modified:"M",added:"A",deleted:"D",untracked:"U",renamed:"R"};function P(a){let b={name:"",path:"",isDir:!0,children:[]};for(let c of a){let a=c.file.split("/").filter(Boolean);if(0===a.length)continue;let d=b;for(let b=0;b<a.length;b++){let e=a[b],f=b===a.length-1,g=a.slice(0,b+1).join("/");if(f)d.children.push({name:e,path:g,isDir:!1,children:[],file:c});else{let a=d.children.find(a=>a.isDir&&a.name===e);a||(a={name:e,path:g,isDir:!0,children:[]},d.children.push(a)),d=a}}}return(function a(b){if(b.isDir&&(b.children=b.children.map(a),1===b.children.length&&b.children[0].isDir&&""!==b.name)){let a=b.children[0];return{...a,name:`${b.name}/${a.name}`}}return b})(b).children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name))}function Q({scroll:a,children:c}){return a?(0,b.jsx)(C.ScrollArea,{className:"flex-1 min-h-0",children:c}):(0,b.jsx)("div",{children:c})}function R({label:a,count:d,labelColor:e,tree:f,batchAction:g,batchLabel:h,batchIcon:i,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r}){let[s,t]=(0,c.useState)(!0);return 0===d?null:(0,b.jsxs)("div",{className:"border-b border-border",children:[(0,b.jsxs)("div",{className:"group flex items-center justify-between px-2 py-1.5 hover:bg-accent/50 transition-colors",children:[(0,b.jsxs)("button",{onClick:()=>t(!s),className:"flex items-center gap-1 flex-1 min-w-0",children:[s?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsxs)("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${e}`,children:[a," (",d,")"]})]}),(0,b.jsx)(A.Button,{variant:"ghost",size:"icon-xs",onClick:g,className:"text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity","aria-label":h,children:i})]}),s&&(0,b.jsx)("div",{className:"pb-1",children:f.map(a=>(0,b.jsx)(S,{node:a,depth:0,onFileClick:j,onFileAction:k,fileActionIcon:l,fileActionLabel:o,onFileSecondaryAction:p,fileSecondaryIcon:q,fileSecondaryLabel:r},a.path))})]})}function S({node:a,depth:e,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l}){let[p,q]=(0,c.useState)(!0),r={paddingLeft:`calc(${e} * 8px + 4px)`};if(a.isDir)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{onClick:()=>q(!p),className:"flex w-full items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors text-left",style:r,children:[p?(0,b.jsx)(n.ChevronDown,{className:"h-3 w-3 shrink-0 text-muted-foreground"}):(0,b.jsx)(m.ChevronRight,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,b.jsx)(o.Folder,{className:"h-3.5 w-3.5 shrink-0 text-amber-400"}),(0,b.jsx)("span",{className:"text-[13px] text-muted-foreground truncate",children:a.name})]}),p&&a.children.sort((a,b)=>a.isDir!==b.isDir?a.isDir?-1:1:a.name.localeCompare(b.name)).map(a=>(0,b.jsx)(S,{node:a,depth:e+1,onFileClick:f,onFileAction:g,fileActionIcon:h,fileActionLabel:i,onFileSecondaryAction:j,fileSecondaryIcon:k,fileSecondaryLabel:l},a.path))]});let s=a.file,t=M[s.status]||d.File,u=N[s.status]||"text-muted-foreground",v=O[s.status]||"?";return(0,b.jsxs)("div",{className:"group flex items-center gap-1 py-0.5 px-1 rounded-sm min-h-[28px] hover:bg-accent hover:text-accent-foreground transition-colors cursor-pointer",style:r,onClick:()=>f(s),children:[(0,b.jsx)("span",{className:"h-3 w-3 shrink-0"}),(0,b.jsx)(t,{className:`h-3.5 w-3.5 shrink-0 ${u}`}),(0,b.jsx)("span",{className:"text-[13px] text-foreground truncate flex-1",children:a.name}),(0,b.jsx)("span",{className:`text-[11px] font-mono font-bold shrink-0 mr-1 ${u}`,children:v}),j&&(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:a=>{a.stopPropagation(),j(s.file)},className:"shrink-0 rounded p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-destructive/20 hover:text-destructive transition-all","aria-label":l??"",children:k}),l&&(0,b.jsx)(E.TooltipContent,{side:"bottom",children:l})]}),(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:a=>{a.stopPropagation(),g(s.file)},className:"shrink-0 rounded px-1 text-xs font-mono text-muted-foreground opacity-0 group-hover:opacity-100 hover:bg-background hover:text-foreground transition-all mr-1","aria-label":i??"",children:h}),i&&(0,b.jsx)(E.TooltipContent,{side:"bottom",children:i})]})]})}a.s(["EditorGitPanel",0,function({localPath:a,onFileSelect:d,mode:e="project"}){let f="task"===e,{t:g}=(0,I.useI18n)(),[h,m]=(0,c.useState)(null),[o,C]=(0,c.useState)(!0),[F,G]=(0,c.useState)(""),[H,M]=(0,c.useState)(!1),[N,O]=(0,c.useState)(!1),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(!1),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(""),[$,_]=(0,c.useState)(!1),aa=(0,c.useCallback)(async()=>{try{let b=await fetch(`/api/git?path=${encodeURIComponent(a)}`);if(b.ok){let c=await b.json();m({changedFiles:c.changedFiles??[],ahead:c.ahead??0,behind:c.behind??0,remoteUrl:c.remoteUrl??"",currentBranch:c.currentBranch??"",branches:c.branches??[],remoteBranches:c.remoteBranches??[],topLevel:c.topLevel??a})}}catch{}finally{C(!1)}},[a]);(0,c.useEffect)(()=>{aa();let a=setInterval(aa,5e3);return()=>clearInterval(a)},[aa]);let ab=async b=>{try{await (0,L.gitAction)(a,"stage",{files:b}),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ac=async b=>{try{await (0,L.gitAction)(a,"unstage",{files:b}),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ad=async()=>{if(F.trim()){M(!0);try{await (0,L.gitAction)(a,"commit",{message:F}),G(""),K.toast.success(g("git.commitSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{M(!1)}}},ae=async b=>{O(!0);try{await (0,L.gitAction)(a,"pull",b?{branch:b}:{}),K.toast.success(g("git.pullSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{O(!1)}},af=async b=>{T(!0);try{await (0,L.gitAction)(a,"push",b?{branch:b}:{}),K.toast.success(g("git.pushSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{T(!1)}},ag=async()=>{V(!0);try{await (0,L.gitAction)(a,"fetch"),K.toast.success(g("git.fetchSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}finally{V(!1)}},ah=async b=>{try{await (0,L.gitAction)(a,"checkout",{branch:b}),X(!1),K.toast.success(`${g("git.switchSuccess")} ${b}`),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ai=async()=>{try{await (0,L.gitAction)(a,"stash-save",{message:F||void 0}),G(""),K.toast.success(g("git.stashSaved")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},aj=async()=>{try{await (0,L.gitAction)(a,"stash-pop",{index:0}),K.toast.success(g("git.stashApplied")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},ak=async b=>{try{await (0,L.gitAction)(a,"discard-file",{file:b}),K.toast.success(g("git.discardFileSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},al=async()=>{try{await (0,L.gitAction)(a,"discard-all"),K.toast.success(g("git.discardSuccess")),await aa()}catch(a){K.toast.error(a instanceof Error?a.message:String(a))}},am=async b=>{if("deleted"===b.status)return;let c=h?.topLevel??a;try{let e=await (0,L.gitAction)(a,"show",{file:b.file});d?.(b.file,e.content??"",c)}catch{d?.(b.file,"",c)}},an=h?.changedFiles.filter(a=>a.staged)??[],ao=h?.changedFiles.filter(a=>!a.staged)??[],ap=(0,c.useMemo)(()=>P(an),[an]),aq=(0,c.useMemo)(()=>P(ao),[ao]);if(o)return(0,b.jsx)("div",{className:"flex h-full items-center justify-center",children:(0,b.jsx)(i.Loader2,{className:"h-4 w-4 animate-spin text-muted-foreground"})});if(!h)return null;function ar(a){let b=[];for(let c of a)c.isDir?b.push(...ar(c.children)):c.file&&b.push(c.file.file);return b}let as=[...h?.branches??[],...(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a))],at=Y?as.filter(a=>a.toLowerCase().includes(Y.toLowerCase())):as;return(0,b.jsxs)("div",{className:f?"flex flex-col h-full overflow-hidden":"flex flex-col",children:[(0,b.jsxs)("div",{className:"shrink-0 px-2 pt-2 pb-1 flex items-center gap-1",children:[f?(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{render:(0,b.jsxs)("div",{className:"flex flex-1 min-w-0 items-center gap-1.5 rounded-md border border-border bg-muted/30 px-2 py-1.5",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",children:h?.currentBranch||"—"})]})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",className:"font-mono text-xs",children:h?.currentBranch||"—"})]}):(0,b.jsxs)(D.Popover,{open:W,onOpenChange:a=>{X(a),a&&Z("")},children:[(0,b.jsxs)(D.PopoverTrigger,{className:"flex flex-1 min-w-0 items-center justify-between rounded-md border border-border bg-muted/50 px-2 py-1.5 text-left transition-colors hover:bg-accent",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0 text-emerald-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs text-foreground",title:h?.currentBranch||void 0,children:h?.currentBranch||"—"})]}),(0,b.jsx)(n.ChevronDown,{className:`h-3 w-3 shrink-0 text-muted-foreground transition-transform ${W?"rotate-180":""}`})]}),(0,b.jsxs)(D.PopoverContent,{align:"start",sideOffset:4,className:"w-max min-w-[var(--anchor-width)] max-w-[320px] gap-0 overflow-hidden p-0",children:[(0,b.jsx)("div",{className:"border-b border-border p-1.5",children:(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(x.Search,{className:"absolute left-2 top-1/2 -translate-y-1/2 h-3 w-3 text-muted-foreground"}),(0,b.jsx)("input",{value:Y,onChange:a=>Z(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.jsxs)("div",{className:"max-h-48 overflow-auto py-1",children:[(h?.branches??[]).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-1 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.localBranches")}),(h?.branches??[]).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).map(a=>{let c=a===h?.currentBranch;return(0,b.jsxs)("button",{onClick:()=>{c?X(!1):ah(a)},className:`flex w-full items-center gap-2 px-3 py-1 text-left transition-colors ${c?"bg-emerald-500/10 text-emerald-400":"text-secondary-foreground hover:bg-accent"}`,children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 shrink-0"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a}),c&&(0,b.jsx)(l.Check,{className:"h-3 w-3 ml-auto shrink-0"})]},`local-${a}`)}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).length>0&&(0,b.jsx)("p",{className:"px-3 pt-2 pb-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground",children:g("git.remoteBranches")}),(h?.remoteBranches??[]).filter(a=>!h?.branches?.includes(a)).filter(a=>a.toLowerCase().includes(Y.toLowerCase())).map(a=>(0,b.jsxs)("button",{onClick:()=>ah(a),className:"flex w-full items-center gap-2 px-3 py-1 text-left text-secondary-foreground transition-colors hover:bg-accent",children:[(0,b.jsx)(y.Globe,{className:"h-3 w-3 shrink-0 text-sky-400"}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a,children:a})]},`remote-${a}`)),0===at.length&&(0,b.jsx)("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"No branches found"})]})]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:ag,disabled:U,className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"Fetch",children:(0,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 ${U?"animate-spin":""}`})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",children:"Fetch"})]}),(0,b.jsxs)(E.Tooltip,{children:[(0,b.jsx)(E.TooltipTrigger,{onClick:()=>{X(!1),_(!0)},className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground transition-colors","aria-label":g("git.createBranch"),children:(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5"})}),(0,b.jsx)(E.TooltipContent,{side:"bottom",children:g("git.createBranch")})]})]})]}),(0,b.jsxs)("div",{className:"shrink-0 px-2 pb-2 space-y-1.5 border-b border-border",children:[(0,b.jsx)("textarea",{value:F,onChange:a=>G(a.target.value),placeholder:g("git.commitMsgPlaceholder"),rows:3,className:"w-full rounded-md border border-border bg-background px-2 py-1.5 text-xs text-foreground placeholder-muted-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring resize-none",onKeyDown:a=>{(a.metaKey||a.ctrlKey)&&"Enter"===a.key&&ad()}}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsxs)(A.Button,{variant:"default",className:"flex-1 h-7 gap-1.5 text-xs",onClick:ad,disabled:H||!F.trim()||0===an.length,children:[H?(0,b.jsx)(i.Loader2,{className:"h-3 w-3 animate-spin"}):(0,b.jsx)(l.Check,{className:"h-3 w-3"}),g("git.commit")]}),(0,b.jsxs)(B.DropdownMenu,{children:[(0,b.jsx)(B.DropdownMenuTrigger,{render:(0,b.jsx)(A.Button,{variant:"outline",size:"icon-xs",className:"h-7 w-7 shrink-0"}),children:(0,b.jsx)(r.MoreHorizontal,{className:"h-3.5 w-3.5"})}),(0,b.jsxs)(B.DropdownMenuContent,{align:"end",side:"bottom",className:"w-52",children:[(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.commit")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ad,disabled:!F.trim()||0===an.length,children:[(0,b.jsx)(l.Check,{className:"h-3.5 w-3.5 mr-2"}),g("git.commit")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.changes")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ab(ar(aq)),disabled:0===ao.length,children:[(0,b.jsx)(q.Plus,{className:"h-3.5 w-3.5 mr-2"}),g("git.stageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ac(ar(ap)),disabled:0===an.length,children:[(0,b.jsx)(p.Minus,{className:"h-3.5 w-3.5 mr-2"}),g("git.unstageAll")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:al,disabled:0===ao.length,children:[(0,b.jsx)(v,{className:"h-3.5 w-3.5 mr-2"}),g("git.discardAll")]})]}),!f&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.sync")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pull")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),disabled:S,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.push")]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:N,children:[(0,b.jsx)(j.ArrowDown,{className:"h-3.5 w-3.5 mr-2"}),g("git.pullFrom"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.behind>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↓",h.behind]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>ae(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuSub,{children:[(0,b.jsxs)(B.DropdownMenuSubTrigger,{disabled:S,children:[(0,b.jsx)(k.ArrowUp,{className:"h-3.5 w-3.5 mr-2"}),g("git.pushTo"),"..."]}),(0,b.jsxs)(B.DropdownMenuSubContent,{className:"max-h-60 overflow-y-auto",children:[(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-emerald-400"}),h.currentBranch,h.ahead>0&&(0,b.jsxs)("span",{className:"ml-auto text-[10px] text-muted-foreground",children:["↑",h.ahead]})]}),h.remoteBranches.filter(a=>a!==h.currentBranch).map(a=>(0,b.jsxs)(B.DropdownMenuItem,{onClick:()=>af(a),children:[(0,b.jsx)(w.GitBranch,{className:"h-3 w-3 mr-2 text-sky-400"}),a]},a))]})]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ag,disabled:U,children:[(0,b.jsx)(s.RefreshCw,{className:`h-3.5 w-3.5 mr-2 ${U?"animate-spin":""}`}),g("git.fetchAll")]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuGroup,{children:[(0,b.jsx)(B.DropdownMenuLabel,{children:g("git.stash")}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:ai,disabled:0===h.changedFiles.length,children:[(0,b.jsx)(t.Archive,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashSave")]}),(0,b.jsxs)(B.DropdownMenuItem,{onClick:aj,children:[(0,b.jsx)(u.ArrowUpFromLine,{className:"h-3.5 w-3.5 mr-2"}),g("git.stashPopLatest")]})]})]}),(0,b.jsx)(B.DropdownMenuSeparator,{}),(0,b.jsxs)(B.DropdownMenuItem,{disabled:!0,className:"text-muted-foreground",children:[(0,b.jsx)(w.GitBranch,{className:"h-3.5 w-3.5 mr-2"}),h.currentBranch]})]})]})]})]}),(0,b.jsxs)(Q,{scroll:f,children:[(0,b.jsx)(R,{label:g("git.stagedChanges"),count:an.length,labelColor:"text-emerald-400",tree:ap,batchAction:()=>ac(ar(ap)),batchLabel:g("git.unstageAll"),batchIcon:(0,b.jsx)(p.Minus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ac([a]),fileActionIcon:"−",fileActionLabel:g("git.unstageFile")}),(0,b.jsx)(R,{label:g("git.unstagedChanges"),count:ao.length,labelColor:"text-muted-foreground",tree:aq,batchAction:()=>ab(ar(aq)),batchLabel:g("git.stageAll"),batchIcon:(0,b.jsx)(q.Plus,{className:"h-3 w-3"}),onFileClick:am,onFileAction:a=>ab([a]),fileActionIcon:"+",fileActionLabel:g("git.stageFile"),onFileSecondaryAction:a=>ak(a),fileSecondaryIcon:(0,b.jsx)(z.Trash2,{className:"h-2.5 w-2.5"}),fileSecondaryLabel:g("git.discardFile")}),0===h.changedFiles.length&&(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[(0,b.jsx)(l.Check,{className:"h-5 w-5 text-emerald-400 mb-2"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:g("git.noChanges")})]})]}),(0,b.jsx)(J,{open:$,onOpenChange:_,branches:[...h?.branches??[],...h?.remoteBranches??[]],currentBranch:h?.currentBranch??"",localPath:a,onCreated:async()=>{K.toast.success(g("git.createSuccess")),await aa()},onError:a=>K.toast.error(`${g("git.createFailed")}: ${a}`)})]})}],985716)},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)},375942,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("4059ebe87310fd6051a72d03ec63d9c6b59e067c77",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},803726,879203,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("7c861f495fd28ff313b1aa5a0c701fc1903aceeefb",b.callServer,void 0,b.findSourceMapURL,"startPtyExecutionSafe");a.s(["startPtyExecutionSafe",0,c],803726);let d=(0,b.createServerReference)("40b3259dcce14539c8949fbff3152fe01393aa9e78",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,d],879203)},32105,362822,75414,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("601267a6272535b2fd7c6fc6542c9f87d6c25944dc",b.callServer,void 0,b.findSourceMapURL,"updateTaskStatus");a.s(["updateTaskStatus",0,c],32105);let d=(0,b.createServerReference)("40331361e5c17195f9d0465a28076aab0f63d76013",b.callServer,void 0,b.findSourceMapURL,"checkWorktreeClean");a.s(["checkWorktreeClean",0,d],362822);let e=(0,b.createServerReference)("60ee4268e18658ca11a25fc44a40584e545b153e23",b.callServer,void 0,b.findSourceMapURL,"commitWorktreeChanges");a.s(["commitWorktreeChanges",0,e],75414)},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)})]})}])},583590,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("60b32d96afc12010ca0b2d2638c1f36cf9a7ae04c5",b.callServer,void 0,b.findSourceMapURL,"updateTask");a.s(["updateTask",0,c])}];
2
2
 
3
- //# sourceMappingURL=_0o3rthp._.js.map
3
+ //# sourceMappingURL=_0m.wslt._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[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"])},113047,556403,482229,a=>{"use strict";let b=(0,a.i(711796).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);a.s(["ChevronsUpDown",0,b],113047);var c=a.i(780410);let d=(0,c.createServerReference)("40089d4052e961b88ce9db260f019e2ebf89ebeedb",c.callServer,void 0,c.findSourceMapURL,"getProjectBranches");a.s(["getProjectBranches",0,d],556403);let e=(0,c.createServerReference)("4092134b47c02eb51ba3858c22029dc33c3aa49084",c.callServer,void 0,c.findSourceMapURL,"fetchRemoteBranches");a.s(["fetchRemoteBranches",0,e],482229)},445798,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(814574),e=a.i(699570),f=a.i(866718),g=a.i(429246),h=a.i(412783),i=a.i(577565),j=a.i(668116),k=a.i(113047),l=a.i(580701),m=a.i(599209),n=a.i(419622),o=a.i(951192),p=a.i(556403),q=a.i(482229),r=a.i(780410);let s=(0,r.createServerReference)("40d983089d134142cd86ebd81bff685b6e80e6d9a5",r.callServer,void 0,r.findSourceMapURL,"getCurrentBranch");var t=a.i(207050);a.s(["CreateTaskDialog",0,function({open:a,onOpenChange:r,onSubmit:u,onUpdate:v,defaultStatus:w="TODO",editTask:x,editTaskLabelIds:y,prefillFromTask:z,labels:A,projectType:B,projectLocalPath:C,versions:D,defaultVersionId:E}){let F,[G,H]=(0,c.useState)(""),[I,J]=(0,c.useState)(""),[K,L]=(0,c.useState)("MEDIUM"),[M,N]=(0,c.useState)(""),[O,P]=(0,c.useState)([]),[Q,R]=(0,c.useState)([]),[S,T]=(0,c.useState)(!1),[U,V]=(0,c.useState)(""),[W,X]=(0,c.useState)(!1),[Y,Z]=(0,c.useState)(!0),[$,_]=(0,c.useState)(!1),[aa,ab]=(0,c.useState)(null),{t:ac}=(0,o.useI18n)();(0,c.useEffect)(()=>{if(!a||x)return;let b=!1;return(0,t.getConfigValues)(["task.defaultUseWorktree","task.defaultAutoStart"]).then(a=>{if(b)return;let c=a["task.defaultUseWorktree"],d=a["task.defaultAutoStart"];"boolean"==typeof c&&Z(c),"boolean"==typeof d&&_(d)}).catch(()=>{}),()=>{b=!0}},[a,x]);let ad=!!x,ae=!!C;return(0,c.useEffect)(()=>{x?(H(x.title),J(x.description??""),L(x.priority),N(x.subPath??""),P(y??[]),ab(x.versionId??null)):(z?(H(z.title??""),J(z.description??""),L(z.priority??"MEDIUM"),N(z.subPath??""),P(z.labelIds??[])):(H(""),J(""),L("MEDIUM"),N(""),P([])),ab(E??null))},[x,y,z,E]),(0,c.useEffect)(()=>{a||x||(H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),X(!1),ab(E??null))},[a,x,E]),(0,c.useEffect)(()=>{a&&ae&&!x&&(T(!0),Promise.all([(0,p.getProjectBranches)(C),s(C)]).then(([a,b])=>{R(a);let c=z?.baseBranch??null;c&&a.includes(c)?V(c):V(b&&a.includes(b)?b:a[0]??""),T(!1),(0,q.fetchRemoteBranches)(C).then(()=>{setTimeout(()=>{(0,p.getProjectBranches)(C).then(a=>{R(a),V(b=>a.includes(b)?b:a[0]??"")}).catch(()=>{})},3e3)})}).catch(()=>{R([]),V(""),T(!1)}))},[a,ae,C,x,z]),(0,b.jsx)(d.Dialog,{open:a,onOpenChange:r,disablePointerDismissal:!0,children:(0,b.jsxs)(d.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(d.DialogHeader,{children:(0,b.jsx)(d.DialogTitle,{children:ad?ac("task.edit"):ac("task.create")})}),(0,b.jsxs)("div",{className:"space-y-4 py-2",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"title",children:ac("task.title")}),(0,b.jsx)(f.Input,{id:"title","data-testid":"task-title",placeholder:ac("task.titlePlaceholder"),value:G,onChange:a=>H(a.target.value),onKeyDown:a=>"Enter"===a.key&&a.preventDefault()})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"description",children:ac("task.description")}),(0,b.jsx)(g.Textarea,{id:"description",placeholder:ac("task.descPlaceholder"),rows:4,value:I,onChange:a=>J(a.target.value),className:"max-h-[200px] overflow-y-auto"})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{htmlFor:"subPath",children:ac("task.subPath")}),(0,b.jsx)(f.Input,{id:"subPath",placeholder:ac("task.subPathPlaceholder"),value:M,onChange:a=>N(a.target.value)}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:ac("task.subPathHint")})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.priority")}),(0,b.jsx)("div",{className:"flex gap-1.5",children:["LOW","MEDIUM","HIGH","CRITICAL"].map(a=>{let c={LOW:{label:ac("task.priorityLow"),style:"text-slate-300 border-slate-500/30 bg-slate-500/10"},MEDIUM:{label:ac("task.priorityMedium"),style:"text-amber-300 border-amber-500/30 bg-amber-500/10"},HIGH:{label:ac("task.priorityHigh"),style:"text-orange-300 border-orange-500/30 bg-orange-500/10"},CRITICAL:{label:ac("task.priorityCritical"),style:"text-rose-300 border-rose-500/30 bg-rose-500/10"}}[a];return(0,b.jsx)("button",{type:"button",onClick:()=>L(a),className:`rounded-lg border px-3 py-1.5 text-xs font-medium transition-all ${K===a?`${c.style} ring-1 ring-current/20`:"border-border text-muted-foreground hover:bg-accent"}`,children:c.label},a)})})]}),ae&&!ad&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.baseBranch")}),S?(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchLoading")}):Q.length>0?(0,b.jsxs)(m.Popover,{open:W,onOpenChange:X,children:[(0,b.jsxs)(m.PopoverTrigger,{className:"flex w-full items-center gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm font-mono transition-colors hover:bg-accent focus:outline-none focus:ring-1 focus:ring-ring","data-testid":"branch-selector",children:[(0,b.jsx)(i.GitBranch,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate text-left text-xs",title:U||void 0,children:U||ac("task.branchNone")}),(0,b.jsx)(k.ChevronsUpDown,{className:"h-3.5 w-3.5 shrink-0 opacity-50"})]}),(0,b.jsx)(m.PopoverContent,{className:"w-[min(32rem,90vw)] p-0",align:"start",children:(0,b.jsxs)(n.Command,{children:[(0,b.jsx)(n.CommandInput,{placeholder:ac("task.branchSearch")}),(0,b.jsxs)(n.CommandList,{children:[(0,b.jsx)(n.CommandEmpty,{children:ac("task.branchNone")}),(0,b.jsx)(n.CommandGroup,{children:Q.map(a=>(0,b.jsxs)(n.CommandItem,{value:a,onSelect:()=>{V(a),X(!1)},children:[(0,b.jsx)(i.GitBranch,{className:"h-3 w-3 text-muted-foreground shrink-0 mr-2"}),(0,b.jsx)("span",{className:"flex-1 truncate font-mono",title:a,children:a}),a===U&&(0,b.jsx)(j.Check,{className:"h-3 w-3 text-primary shrink-0 ml-auto"})]},a))})]})]})})]}):(0,b.jsx)("div",{className:"text-sm text-muted-foreground",children:ac("task.branchNone")}),(0,b.jsxs)("div",{className:"mt-3 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.worktreeLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>Z(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${Y===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.worktreeYes"):ac("task.worktreeNo")},String(a)))})]}),(0,b.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,b.jsx)(h.Label,{className:"text-xs text-muted-foreground",children:ac("task.autoStartLabel")}),(0,b.jsx)("div",{className:"flex gap-1",children:[!0,!1].map(a=>(0,b.jsx)("button",{type:"button",onClick:()=>_(a),className:`rounded-md px-3 py-1 text-xs font-medium transition-colors ${$===a?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:text-foreground"}`,children:a?ac("task.autoStartYes"):ac("task.autoStartNo")},String(a)))})]})]}),A.length>0&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("task.labels")}),(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:A.map(a=>{let c=O.includes(a.id);return(0,b.jsx)("button",{type:"button",onClick:()=>{P(b=>c?b.filter(b=>b!==a.id):[...b,a.id])},className:`rounded-full px-2.5 py-1 text-xs font-medium transition-all ${c?"ring-1 ring-current/30":"opacity-50 hover:opacity-80"}`,style:{backgroundColor:a.color+"20",color:a.color,borderColor:c?a.color+"40":"transparent",borderWidth:"1px"},children:a.name},a.id)})})]}),(!ad||D&&D.length>0)&&(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(h.Label,{children:ac("version.picker.label")}),D&&D.length>0?(0,b.jsxs)(l.Select,{value:aa??"__none__",onValueChange:a=>ab("__none__"===a?null:a),children:[(0,b.jsx)(l.SelectTrigger,{children:(0,b.jsx)("span",{className:"truncate text-sm",children:aa&&(F=D.find(a=>a.id===aa))?F.isCurrent?`${F.number} \xb7 ${F.name} \xb7 ${ac("version.currentShort")}`:`${F.number} \xb7 ${F.name}`:ac("version.picker.none")})}),(0,b.jsxs)(l.SelectContent,{children:[(0,b.jsx)(l.SelectItem,{value:"__none__",children:ac("version.picker.none")}),D.map(a=>(0,b.jsx)(l.SelectItem,{value:a.id,children:a.isCurrent?`${a.number} \xb7 ${a.name} \xb7 ${ac("version.currentShort")}`:`${a.number} \xb7 ${a.name}`},a.id))]})]}):(0,b.jsx)("p",{className:"rounded-md border border-dashed border-border px-3 py-2 text-xs text-muted-foreground",children:ac("version.picker.empty")})]})]}),(0,b.jsxs)(d.DialogFooter,{children:[(0,b.jsx)(e.Button,{variant:"outline",onClick:()=>r(!1),children:ac("common.cancel")}),(0,b.jsx)(e.Button,{onClick:()=>{G.trim()&&(ad&&v?v(x.id,{title:G,description:I,priority:K,labelIds:O,subPath:M.trim()||"",versionId:aa}):u({title:G,description:I,priority:K,status:w,labelIds:O,...ae&&Y&&U?{baseBranch:U}:{},...M.trim()?{subPath:M.trim()}:{},versionId:aa,autoStart:$}),H(""),J(""),L("MEDIUM"),N(""),P([]),R([]),V(""),Z(!0),ab(null),r(!1))},className:"bg-primary/10 text-primary ring-1 ring-primary/20 hover:bg-primary/15",children:ad?ac("common.save"):ac("common.create")})]})]})})}],445798)},87339,a=>{"use strict";let b=(0,a.i(711796).default)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);a.s(["Paperclip",0,b],87339)},226758,958726,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("407b25dcf594d8f7c2bd8bfe60d61dd2f45c2495a3",b.callServer,void 0,b.findSourceMapURL,"getTaskNotes");a.s(["getTaskNotes",0,c],226758);let d=(0,b.createServerReference)("40dcff96f17130009ebcf1aa9207414d4e599ff823",b.callServer,void 0,b.findSourceMapURL,"getTaskAssets");a.s(["getTaskAssets",0,d],958726)},532615,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(986099),e=a.i(54384),f=a.i(912868),g=a.i(10390),h=a.i(91756);let i=(0,a.i(711796).default)("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);var j=a.i(161664),k=a.i(951192);function l({children:a,onClick:c,title:d,disabled:e,...f}){return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||c()},title:d,disabled:e,className:"inline-flex h-8 w-8 items-center justify-center rounded-md text-white/80 hover:bg-white/15 hover:text-white disabled:opacity-30 disabled:hover:bg-transparent disabled:hover:text-white/80 transition-colors",...f,children:a})}a.s(["ImageLightbox",0,function({imageUrl:a,filename:m,open:n,onOpenChange:o,assets:p,currentIndex:q,onIndexChange:r}){let{t:s}=(0,k.useI18n)(),[t,u]=(0,c.useState)(1),[v,w]=(0,c.useState)({x:0,y:0}),[x,y]=(0,c.useState)(!1),z=(0,c.useRef)(null),[A,B]=(0,c.useState)(!1),C=!!p&&p.length>1&&"number"==typeof q&&!!r,D=C&&q>0,E=C&&q<p.length-1,F=C?p.length:0,G=F>0?Math.ceil(F/10):0,H=C?Math.floor(q/10):0,I=10*H,J=Math.min(I+10,F),K=G>1,L=C&&H>0,M=C&&H<G-1;(0,c.useEffect)(()=>{B(!0)},[]),(0,c.useEffect)(()=>{u(1),w({x:0,y:0})},[a]),(0,c.useEffect)(()=>{if(!n)return;let a=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=a}},[n]);let N=(0,c.useCallback)(()=>o(!1),[o]),O=(0,c.useCallback)(()=>{C&&D&&r(q-1)},[C,D,r,q]),P=(0,c.useCallback)(()=>{C&&E&&r(q+1)},[C,E,r,q]),Q=(0,c.useCallback)(()=>{C&&L&&r((H-1)*10)},[C,L,r,H]),R=(0,c.useCallback)(()=>{C&&M&&r(Math.min((H+1)*10,F-1))},[C,M,r,H,F]),S=(0,c.useCallback)(()=>{u(a=>Math.min(8,1.25*a))},[]),T=(0,c.useCallback)(()=>{u(a=>{let b=Math.max(.1,a/1.25);return b<=1&&w({x:0,y:0}),b})},[]),U=(0,c.useCallback)(()=>{u(1),w({x:0,y:0})},[]);(0,c.useEffect)(()=>{if(!n)return;let a=a=>{switch(a.key){case"Escape":a.preventDefault(),N();break;case"ArrowLeft":C&&(a.preventDefault(),O());break;case"ArrowRight":C&&(a.preventDefault(),P());break;case"+":case"=":a.preventDefault(),S();break;case"-":case"_":a.preventDefault(),T();break;case"0":a.preventDefault(),U()}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n,C,N,O,P,S,T,U]);let V=(0,c.useRef)(!1),W=()=>{x&&y(!1),z.current=null},X=x?"cursor-grabbing":"cursor-grab";if(!n||!A)return null;let Y=(0,b.jsxs)("div",{className:"fixed inset-0 z-[100] bg-black/70 dark:bg-black/40 backdrop-blur-md",role:"dialog","aria-modal":"true","aria-label":s("assets.lightbox.zoomFit"),children:[(0,b.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 max-w-[80vw] truncate rounded-md bg-black/40 px-3 py-1 text-xs text-white/80 backdrop-blur-sm pointer-events-none",children:[m,C?` \xb7 ${q+1} / ${p.length}`:""]}),(0,b.jsx)("div",{className:`absolute inset-0 flex items-center justify-center overflow-hidden select-none ${X}`,onClick:a=>{a.target===a.currentTarget&&N()},onWheel:a=>{a.preventDefault();let b=-a.deltaY>0?1.25:.8;u(a=>{let c=Math.min(8,Math.max(.1,a*b));return c<=1&&w({x:0,y:0}),c})},children:a&&(0,b.jsx)("img",{src:a,alt:m,onClick:a=>{a.stopPropagation(),V.current&&(V.current=!1)},onPointerDown:a=>{0===a.button&&(a.stopPropagation(),V.current=!1,a.target.setPointerCapture?.(a.pointerId),z.current={x:a.clientX,y:a.clientY,panX:v.x,panY:v.y},y(!0))},onPointerMove:a=>{if(!z.current)return;let b=a.clientX-z.current.x,c=a.clientY-z.current.y;Math.abs(b)+Math.abs(c)>5&&(V.current=!0),x&&w({x:z.current.panX+b,y:z.current.panY+c})},onPointerUp:W,onPointerLeave:W,onPointerCancel:W,className:"max-h-[88vh] max-w-[92vw] object-contain pointer-events-auto",style:{transform:`translate3d(${v.x}px, ${v.y}px, 0) scale(${t})`,transformOrigin:"center center",transition:x?"none":"transform 120ms ease-out",willChange:x?"transform":"auto"},draggable:!1})}),(0,b.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex flex-col items-center gap-2 max-w-[92vw]",onClick:a=>a.stopPropagation(),children:[C&&(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-1.5 py-1.5 backdrop-blur-md ring-1 ring-white/10 max-w-[92vw]",children:[K&&(0,b.jsx)(l,{onClick:Q,title:`${s("assets.lightbox.prev")} (-10)`,"aria-label":`${s("assets.lightbox.prev")} (-10)`,disabled:!L,children:(0,b.jsx)(h.ChevronsLeft,{className:"h-4 w-4"})}),(0,b.jsx)(l,{onClick:O,title:s("assets.lightbox.prev"),"aria-label":s("assets.lightbox.prev"),disabled:!D,children:(0,b.jsx)(f.ChevronLeft,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"flex items-center gap-1.5",children:p.slice(I,J).map((a,c)=>{let d=I+c,e=d===q;return(0,b.jsx)("button",{type:"button",onClick:a=>{a.stopPropagation(),e||r(d)},title:a.filename,className:`shrink-0 h-12 w-12 overflow-hidden rounded-md transition-all ${e?"ring-2 ring-white opacity-100 scale-105":"opacity-60 hover:opacity-100 ring-1 ring-white/20"}`,children:(0,b.jsx)("img",{src:a.url,alt:a.filename,className:"h-full w-full object-cover",loading:"lazy",draggable:!1})},a.url+d)})}),(0,b.jsx)(l,{onClick:P,title:s("assets.lightbox.next"),"aria-label":s("assets.lightbox.next"),disabled:!E,children:(0,b.jsx)(g.ChevronRight,{className:"h-4 w-4"})}),K&&(0,b.jsx)(l,{onClick:R,title:`${s("assets.lightbox.next")} (+10)`,"aria-label":`${s("assets.lightbox.next")} (+10)`,disabled:!M,children:(0,b.jsx)(i,{className:"h-4 w-4"})})]}),(0,b.jsxs)("div",{className:"flex items-center gap-1 rounded-lg bg-black/50 px-2 py-1.5 backdrop-blur-md ring-1 ring-white/10",children:[(0,b.jsxs)("span",{className:"px-2 text-xs text-white/80 tabular-nums select-none min-w-12 text-center",children:[Math.round(100*t),"%"]}),(0,b.jsx)(l,{onClick:U,title:s("assets.lightbox.reset"),"aria-label":s("assets.lightbox.reset"),disabled:1===t&&0===v.x&&0===v.y,children:(0,b.jsx)(j.RotateCcw,{className:"h-4 w-4"})}),(0,b.jsx)("div",{className:"mx-1 h-5 w-px bg-white/20"}),(0,b.jsx)(l,{onClick:N,title:s("assets.lightbox.close"),"aria-label":s("assets.lightbox.close"),children:(0,b.jsx)(e.X,{className:"h-4 w-4"})})]})]})]});return(0,d.createPortal)(Y,document.body)}],532615)},757942,950314,a=>{"use strict";var b=a.i(90393);a.s([],757942),a.s(["Streamdown",()=>b.C],950314)},894148,a=>{"use strict";var b=a.i(728778),c=a.i(374637),d=a.i(704494);a.i(757942);var e=a.i(950314),f=a.i(814574),g=a.i(951192);a.s(["TextPreviewDialog",0,function({url:a,filename:h,open:i,onOpenChange:j}){let{t:k}=(0,g.useI18n)(),[l,m]=(0,c.useState)(null),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(null);(0,c.useEffect)(()=>{if(!i||!a){m(null),q(null);return}let b=!1;return o(!0),q(null),m(null),fetch(a).then(a=>{let b=a.headers.get("content-length");if(b&&parseInt(b,10)>1048576)throw Error("FILE_TOO_LARGE");return a.text()}).then(a=>{if(a.length>1048576)throw Error("FILE_TOO_LARGE");b||(m(a),o(!1))}).catch(a=>{b||(a instanceof Error&&"FILE_TOO_LARGE"===a.message?q(k("assets.fileTooLarge")):q(k("assets.previewError")),o(!1))}),()=>{b=!0}},[i,a,k]);let r=h.split(".").pop()?.toLowerCase();return(0,b.jsx)(f.Dialog,{open:i,onOpenChange:j,children:(0,b.jsxs)(f.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:h}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:(()=>{if(n)return(0,b.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-2",children:[(0,b.jsx)(d.Loader2,{className:"size-5 animate-spin text-muted-foreground"}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:k("assets.loadingPreview")})]});if(p)return(0,b.jsx)("p",{className:"text-sm text-destructive",children:p});if(null===l)return null;if("md"===r)return(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(e.Streamdown,{children:l})});if("json"===r){let a;try{a=JSON.stringify(JSON.parse(l),null,2)}catch{a=l}return(0,b.jsx)("pre",{className:"font-mono text-xs whitespace-pre-wrap text-foreground",children:a})}return(0,b.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap text-foreground",children:l})})()})]})})}])},510650,a=>{"use strict";var b=a.i(728778);a.i(757942);var c=a.i(950314),d=a.i(814574),e=a.i(951192);a.s(["NotePreviewDialog",0,function({note:a,open:f,onOpenChange:g}){let{t:h}=(0,e.useI18n)();return(0,b.jsx)(d.Dialog,{open:f,onOpenChange:g,children:(0,b.jsxs)(d.DialogContent,{className:"w-[min(960px,92vw)] max-w-none sm:max-w-none h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0",children:[(0,b.jsx)("h3",{className:"text-sm font-medium truncate px-5 py-3 border-b border-border/50",children:a?.title}),(0,b.jsx)("div",{className:"flex-1 overflow-auto px-5 py-4",children:a&&a.content.trim()?(0,b.jsx)("div",{className:"text-sm leading-relaxed",children:(0,b.jsx)(c.Streamdown,{children:a.content})}):(0,b.jsx)("p",{className:"text-sm text-muted-foreground",children:h("taskPage.noteEmpty")})})]})})}])},161181,a=>{"use strict";let b=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif","apng"]);a.s(["isImageAsset",0,function(a,c){if(c?.startsWith("image/"))return!0;let d=a.split(".").pop()?.toLowerCase();return!!d&&b.has(d)},"localPathToApiUrl",0,function(a){let b=a.replace(/\\/g,"/").match(/\/assets\/([^/]+)\/([^/]+)$/);return b?`/api/files/assets/${b[1]}/${b[2]}`:a}])},374531,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("406164d0875801f4fc8d154f2a576627f6f47d6cc5",b.callServer,void 0,b.findSourceMapURL,"createTask");a.s(["createTask",0,c])}];
2
+
3
+ //# sourceMappingURL=_0o2tntr._.js.map
@@ -1,4 +1,4 @@
1
- module.exports=[495370,a=>{"use strict";var b=a.i(815429),c=a.i(761469),d=a.i(188139),e=a.i(496877);async function f(a){return c.db.label.findMany({where:{OR:[{isBuiltin:!0},{workspaceId:a}]},orderBy:[{isBuiltin:"desc"},{name:"asc"}]})}async function g(a){let b=e.createLabelSchema.parse(a),f=await c.db.label.create({data:{name:b.name,color:b.color,workspaceId:b.workspaceId}});return(0,d.revalidatePath)("/workspaces"),f}async function h(a){let b=await c.db.label.findUnique({where:{id:a}});if(!b)throw Error("Label not found");if(b.isBuiltin)throw Error("Cannot delete builtin labels");await c.db.label.delete({where:{id:a}}),(0,d.revalidatePath)("/workspaces")}async function i(a,b){await c.db.$transaction(async c=>{await c.taskLabel.deleteMany({where:{taskId:a}}),b.length>0&&await c.taskLabel.createMany({data:b.map(b=>({taskId:a,labelId:b}))})}),(0,d.revalidatePath)("/workspaces")}async function j(a){return(await c.db.taskLabel.findMany({where:{taskId:a},include:{label:!0}})).map(a=>a.label)}(0,a.i(630048).ensureServerEntryExports)([f,g,h,i,j]),(0,b.registerServerReference)(f,"40c6ef05b327e1ff3f0cc87ade2939c3f2f2a9b0a0",null),(0,b.registerServerReference)(g,"4040e514c0e86c1e63a2c6083863734b1a46a6a94a",null),(0,b.registerServerReference)(h,"400f0148b5485708f54064fbab771ea77a57f45f68",null),(0,b.registerServerReference)(i,"60a746858a35272c8aae90e6d846226b49641202a1",null),(0,b.registerServerReference)(j,"40cc221e414eed8d546be92a395d14d2ed19625079",null),a.s(["createLabel",0,g,"deleteLabel",0,h,"getLabelsForWorkspace",0,f,"getTaskLabels",0,j,"setTaskLabels",0,i])},287068,a=>{"use strict";var b=a.i(761469);function c(a,b){return{id:a.note_id,type:"note",title:a.title,subtitle:`${a.workspace_name} / ${a.project_name}`,navigateTo:`/workspaces/${a.workspaceId}/notes?projectId=${a.projectId}`,snippet:a.content?a.content.slice(0,b):void 0}}async function d(a,e="task",f){if(!a.trim())return[];let g=a.trim(),{resultLimit:h,allModeCap:i,snippetLength:j}=f;if("all"===e){let[a,b,c,e,h]=await Promise.allSettled([d(g,"task",f),d(g,"project",f),d(g,"repository",f),d(g,"note",f),d(g,"asset",f)]),j=a=>"fulfilled"===a.status?a.value.slice(0,i):[];return[...j(a),...j(b),...j(c),...j(e),...j(h)]}if("task"===e)return(await b.db.task.findMany({where:{OR:[{title:{contains:g}},{description:{contains:g}}]},include:{project:{include:{workspace:!0}}},take:h,orderBy:{updatedAt:"desc"}})).map(a=>{let b="DONE"===a.status||"CANCELLED"===a.status,c=a.project.workspaceId;return{id:a.id,type:"task",title:a.title,subtitle:`${a.project.workspace.name} / ${a.project.name}`,navigateTo:b?`/workspaces/${c}/archive?projectId=${a.projectId}`:`/workspaces/${c}?projectId=${a.projectId}`}});if("project"===e)return(await b.db.project.findMany({where:{OR:[{name:{contains:g}},{alias:{contains:g}},{description:{contains:g}}]},include:{workspace:!0},take:h,orderBy:{updatedAt:"desc"}})).map(a=>({id:a.id,type:"project",title:a.alias?`${a.name} (${a.alias})`:a.name,subtitle:a.workspace.name,navigateTo:`/workspaces/${a.workspaceId}?projectId=${a.id}`}));if("repository"===e)return(await b.db.repository.findMany({where:{OR:[{name:{contains:g}},{path:{contains:g}}]},include:{project:{include:{workspace:!0}}},take:h})).map(a=>({id:a.id,type:"repository",title:a.name,subtitle:`${a.project.workspace.name} / ${a.project.name} \xb7 ${a.branch}`,navigateTo:`/workspaces/${a.project.workspaceId}?projectId=${a.projectId}`}));if("note"===e){if(g.length<3)return(await b.db.$queryRawUnsafe(`SELECT n.id as note_id, n.title, n.content,
1
+ module.exports=[495370,a=>{"use strict";var b=a.i(815429),c=a.i(761469),d=a.i(188139),e=a.i(496877);async function f(a){return c.db.label.findMany({where:{OR:[{isBuiltin:!0},{workspaceId:a}]},orderBy:[{isBuiltin:"desc"},{name:"asc"}]})}async function g(a){let b=e.createLabelSchema.parse(a),f=await c.db.label.create({data:{name:b.name,color:b.color,workspaceId:b.workspaceId}});return(0,d.revalidatePath)("/workspaces"),f}async function h(a){let b=await c.db.label.findUnique({where:{id:a}});if(!b)throw Error("Label not found");if(b.isBuiltin)throw Error("Cannot delete builtin labels");await c.db.label.delete({where:{id:a}}),(0,d.revalidatePath)("/workspaces")}async function i(a,b){await c.db.$transaction(async c=>{await c.taskLabel.deleteMany({where:{taskId:a}}),b.length>0&&await c.taskLabel.createMany({data:b.map(b=>({taskId:a,labelId:b}))})}),(0,d.revalidatePath)("/workspaces")}async function j(a){return(await c.db.taskLabel.findMany({where:{taskId:a},include:{label:!0}})).map(a=>a.label)}(0,a.i(630048).ensureServerEntryExports)([f,g,h,i,j]),(0,b.registerServerReference)(f,"40678a2b403c111cdd409176df5bba928e0f63a5b4",null),(0,b.registerServerReference)(g,"407fab8fa8b7793fb8f25a418f04559876792ca21c",null),(0,b.registerServerReference)(h,"402bbc93aabd476c75ea98b62565514688b910719d",null),(0,b.registerServerReference)(i,"6035dc364b0b931662d0d6fe73fb33918084cbf5f0",null),(0,b.registerServerReference)(j,"4028a1d511533e45afbd300ff59e95b5ae98c8b38a",null),a.s(["createLabel",0,g,"deleteLabel",0,h,"getLabelsForWorkspace",0,f,"getTaskLabels",0,j,"setTaskLabels",0,i])},287068,a=>{"use strict";var b=a.i(761469);function c(a,b){return{id:a.note_id,type:"note",title:a.title,subtitle:`${a.workspace_name} / ${a.project_name}`,navigateTo:`/workspaces/${a.workspaceId}/notes?projectId=${a.projectId}`,snippet:a.content?a.content.slice(0,b):void 0}}async function d(a,e="task",f){if(!a.trim())return[];let g=a.trim(),{resultLimit:h,allModeCap:i,snippetLength:j}=f;if("all"===e){let[a,b,c,e,h]=await Promise.allSettled([d(g,"task",f),d(g,"project",f),d(g,"repository",f),d(g,"note",f),d(g,"asset",f)]),j=a=>"fulfilled"===a.status?a.value.slice(0,i):[];return[...j(a),...j(b),...j(c),...j(e),...j(h)]}if("task"===e)return(await b.db.task.findMany({where:{OR:[{title:{contains:g}},{description:{contains:g}}]},include:{project:{include:{workspace:!0}}},take:h,orderBy:{updatedAt:"desc"}})).map(a=>{let b="DONE"===a.status||"CANCELLED"===a.status,c=a.project.workspaceId;return{id:a.id,type:"task",title:a.title,subtitle:`${a.project.workspace.name} / ${a.project.name}`,navigateTo:b?`/workspaces/${c}/archive?projectId=${a.projectId}`:`/workspaces/${c}?projectId=${a.projectId}`}});if("project"===e)return(await b.db.project.findMany({where:{OR:[{name:{contains:g}},{alias:{contains:g}},{description:{contains:g}}]},include:{workspace:!0},take:h,orderBy:{updatedAt:"desc"}})).map(a=>({id:a.id,type:"project",title:a.alias?`${a.name} (${a.alias})`:a.name,subtitle:a.workspace.name,navigateTo:`/workspaces/${a.workspaceId}?projectId=${a.id}`}));if("repository"===e)return(await b.db.repository.findMany({where:{OR:[{name:{contains:g}},{path:{contains:g}}]},include:{project:{include:{workspace:!0}}},take:h})).map(a=>({id:a.id,type:"repository",title:a.name,subtitle:`${a.project.workspace.name} / ${a.project.name} \xb7 ${a.branch}`,navigateTo:`/workspaces/${a.project.workspaceId}?projectId=${a.projectId}`}));if("note"===e){if(g.length<3)return(await b.db.$queryRawUnsafe(`SELECT n.id as note_id, n.title, n.content,
2
2
  n."projectId", p."workspaceId", p.name as project_name, w.name as workspace_name
3
3
  FROM "ProjectNote" n
4
4
  JOIN "Project" p ON p.id = n."projectId"
@@ -18,7 +18,7 @@ module.exports=[495370,a=>{"use strict";var b=a.i(815429),c=a.i(761469),d=a.i(18
18
18
  JOIN "Project" p ON p.id = n."projectId"
19
19
  JOIN "Workspace" w ON w.id = p."workspaceId"
20
20
  WHERE n.title LIKE ? OR n.content LIKE ?
21
- LIMIT ?`,`%${g}%`,`%${g}%`,h)).map(a=>c(a,j))}}return"asset"===e?(await b.db.projectAsset.findMany({where:{OR:[{filename:{contains:g}},{description:{contains:g}}]},include:{project:{include:{workspace:!0}}},take:h,orderBy:{createdAt:"desc"}})).map(a=>({id:a.id,type:"asset",title:a.filename,subtitle:`${a.project.workspace.name} / ${a.project.name}`,navigateTo:`/workspaces/${a.project.workspaceId}/assets?projectId=${a.projectId}`,snippet:a.description||void 0})):[]}a.s(["search",0,d])},396904,a=>a.a(async(b,c)=>{try{var d=a.i(815429),e=a.i(287068),f=a.i(980999),g=a.i(630048),h=b([f]);async function i(a,b="task"){let c=await (0,f.getConfigValues)(["search.resultLimit","search.allModeCap","search.snippetLength"]);return(0,e.search)(a,b,{resultLimit:c["search.resultLimit"]??20,allModeCap:c["search.allModeCap"]??5,snippetLength:c["search.snippetLength"]??80})}[f]=h.then?(await h)():h,(0,g.ensureServerEntryExports)([i]),(0,d.registerServerReference)(i,"601986152ab7d30f21c3b9d1cdaf29f905cb2edf9a",null),a.s(["globalSearch",0,i]),c()}catch(a){c(a)}},!1),101844,a=>{"use strict";var b=a.i(815429),c=a.i(924868),d=a.i(522734),e=a.i(814747),f=a.i(761469),g=a.i(188139),h=a.i(630048);async function i(b){if(!b||"string"!=typeof b)return{safe:!1,reason:"无效的项目 ID"};let g=await f.db.project.findUnique({where:{id:b}});if(!g||!g.localPath)return{safe:!1,reason:"项目不存在或未设置本地路径"};if((await f.db.taskExecution.findMany({where:{task:{projectId:b},status:"RUNNING"},select:{id:!0}})).length>0)return{safe:!1,reason:"该项目有正在运行的任务执行,请先停止所有执行"};let h=await f.db.task.findMany({where:{projectId:b},select:{id:!0}}),{getSession:i}=await a.A(98813);for(let a of h)if(void 0!==i(a.id))return{safe:!1,reason:"该项目有活跃的终端会话,请先关闭"};let j=e.default.join(g.localPath,".worktrees");if((0,d.existsSync)(j))try{if((await (0,c.readdir)(j)).length>0)return{safe:!1,reason:"该项目有活跃的 Git Worktree,请先清理"}}catch{}return{safe:!0}}async function j(b,h){if(!b||"string"!=typeof b)return{success:!1,error:"无效的项目 ID"};if(!h||"string"!=typeof h||!e.default.isAbsolute(h))return{success:!1,error:"目标路径必须是非空的绝对路径"};let i=await f.db.project.findUnique({where:{id:b}});if(!i||!i.localPath)return{success:!1,error:"项目不存在或未设置本地路径"};let j=i.localPath;if(h===j)return{success:!1,error:"源路径和目标路径相同"};if((await f.db.taskExecution.findMany({where:{task:{projectId:b},status:"RUNNING"},select:{id:!0}})).length>0)return{success:!1,error:"该项目有正在运行的任务执行,请先停止所有执行"};let k=await f.db.task.findMany({where:{projectId:b},select:{id:!0}}),{getSession:l}=await a.A(98813);for(let a of k)if(void 0!==l(a.id))return{success:!1,error:"该项目有活跃的终端会话,请先关闭"};let m=e.default.join(j,".worktrees");if((0,d.existsSync)(m))try{if((await (0,c.readdir)(m)).length>0)return{success:!1,error:"该项目有活跃的 Git Worktree,请先清理"}}catch{}if((0,d.existsSync)(h))try{if((await (0,c.readdir)(h)).length>0)return{success:!1,error:"目标路径已存在且不为空"}}catch{return{success:!1,error:"目标路径已存在且不为空"}}let n=e.default.dirname(h);try{await (0,c.mkdir)(n,{recursive:!0})}catch(a){if("EACCES"===a.code||"EPERM"===a.code)return{success:!1,error:`无权限创建父目录 ${n} — 请检查 Git 路径映射规则的模板是否漏了 "~/" 前缀`};if("EROFS"===a.code)return{success:!1,error:`父目录所在文件系统只读:${n}`};return{success:!1,error:`创建父目录失败:${a.message||a.code||"未知错误"}`}}try{await (0,c.rename)(j,h)}catch(a){if("EXDEV"===a.code)return{success:!1,error:"源路径和目标路径不在同一文件系统,不支持跨设备迁移"};if("EACCES"===a.code||"EPERM"===a.code)return{success:!1,error:`无权限移动到 ${h}`};return{success:!1,error:a.message||"文件系统操作失败"}}return await f.db.project.update({where:{id:b},data:{localPath:h}}),(0,g.revalidatePath)("/workspaces"),{success:!0}}let k=`分析这个项目目录,生成一段简短的 Markdown 项目描述。
21
+ LIMIT ?`,`%${g}%`,`%${g}%`,h)).map(a=>c(a,j))}}return"asset"===e?(await b.db.projectAsset.findMany({where:{OR:[{filename:{contains:g}},{description:{contains:g}}]},include:{project:{include:{workspace:!0}}},take:h,orderBy:{createdAt:"desc"}})).map(a=>({id:a.id,type:"asset",title:a.filename,subtitle:`${a.project.workspace.name} / ${a.project.name}`,navigateTo:`/workspaces/${a.project.workspaceId}/assets?projectId=${a.projectId}`,snippet:a.description||void 0})):[]}a.s(["search",0,d])},396904,a=>a.a(async(b,c)=>{try{var d=a.i(815429),e=a.i(287068),f=a.i(980999),g=a.i(630048),h=b([f]);async function i(a,b="task"){let c=await (0,f.getConfigValues)(["search.resultLimit","search.allModeCap","search.snippetLength"]);return(0,e.search)(a,b,{resultLimit:c["search.resultLimit"]??20,allModeCap:c["search.allModeCap"]??5,snippetLength:c["search.snippetLength"]??80})}[f]=h.then?(await h)():h,(0,g.ensureServerEntryExports)([i]),(0,d.registerServerReference)(i,"6051197133a60d5756beb41200c1dbffb7f56bea66",null),a.s(["globalSearch",0,i]),c()}catch(a){c(a)}},!1),101844,a=>{"use strict";var b=a.i(815429),c=a.i(924868),d=a.i(522734),e=a.i(814747),f=a.i(761469),g=a.i(188139),h=a.i(630048);async function i(b){if(!b||"string"!=typeof b)return{safe:!1,reason:"无效的项目 ID"};let g=await f.db.project.findUnique({where:{id:b}});if(!g||!g.localPath)return{safe:!1,reason:"项目不存在或未设置本地路径"};if((await f.db.taskExecution.findMany({where:{task:{projectId:b},status:"RUNNING"},select:{id:!0}})).length>0)return{safe:!1,reason:"该项目有正在运行的任务执行,请先停止所有执行"};let h=await f.db.task.findMany({where:{projectId:b},select:{id:!0}}),{getSession:i}=await a.A(98813);for(let a of h)if(void 0!==i(a.id))return{safe:!1,reason:"该项目有活跃的终端会话,请先关闭"};let j=e.default.join(g.localPath,".worktrees");if((0,d.existsSync)(j))try{if((await (0,c.readdir)(j)).length>0)return{safe:!1,reason:"该项目有活跃的 Git Worktree,请先清理"}}catch{}return{safe:!0}}async function j(b,h){if(!b||"string"!=typeof b)return{success:!1,error:"无效的项目 ID"};if(!h||"string"!=typeof h||!e.default.isAbsolute(h))return{success:!1,error:"目标路径必须是非空的绝对路径"};let i=await f.db.project.findUnique({where:{id:b}});if(!i||!i.localPath)return{success:!1,error:"项目不存在或未设置本地路径"};let j=i.localPath;if(h===j)return{success:!1,error:"源路径和目标路径相同"};if((await f.db.taskExecution.findMany({where:{task:{projectId:b},status:"RUNNING"},select:{id:!0}})).length>0)return{success:!1,error:"该项目有正在运行的任务执行,请先停止所有执行"};let k=await f.db.task.findMany({where:{projectId:b},select:{id:!0}}),{getSession:l}=await a.A(98813);for(let a of k)if(void 0!==l(a.id))return{success:!1,error:"该项目有活跃的终端会话,请先关闭"};let m=e.default.join(j,".worktrees");if((0,d.existsSync)(m))try{if((await (0,c.readdir)(m)).length>0)return{success:!1,error:"该项目有活跃的 Git Worktree,请先清理"}}catch{}if((0,d.existsSync)(h))try{if((await (0,c.readdir)(h)).length>0)return{success:!1,error:"目标路径已存在且不为空"}}catch{return{success:!1,error:"目标路径已存在且不为空"}}let n=e.default.dirname(h);try{await (0,c.mkdir)(n,{recursive:!0})}catch(a){if("EACCES"===a.code||"EPERM"===a.code)return{success:!1,error:`无权限创建父目录 ${n} — 请检查 Git 路径映射规则的模板是否漏了 "~/" 前缀`};if("EROFS"===a.code)return{success:!1,error:`父目录所在文件系统只读:${n}`};return{success:!1,error:`创建父目录失败:${a.message||a.code||"未知错误"}`}}try{await (0,c.rename)(j,h)}catch(a){if("EXDEV"===a.code)return{success:!1,error:"源路径和目标路径不在同一文件系统,不支持跨设备迁移"};if("EACCES"===a.code||"EPERM"===a.code)return{success:!1,error:`无权限移动到 ${h}`};return{success:!1,error:a.message||"文件系统操作失败"}}return await f.db.project.update({where:{id:b},data:{localPath:h}}),(0,g.revalidatePath)("/workspaces"),{success:!0}}let k=`分析这个项目目录,生成一段简短的 Markdown 项目描述。
22
22
 
23
23
  读取 package.json、README.md 等关键文件,然后概括:
24
24
 
@@ -42,6 +42,6 @@ Requirements:
42
42
  - Keep it under 1000 words
43
43
  - Use concise Markdown (bold labels + short sentences), no ## headings or tables
44
44
  - Don't list every file/directory, only key information
45
- - Output in English`;async function m(b,c="zh"){if(!b||"string"!=typeof b)throw Error("无效的本地路径");if(b.startsWith("~"))throw Error("不支持 ~ 别名,请提供绝对路径");if(!e.default.isAbsolute(b))throw Error("本地路径必须为绝对路径");let{aiQuery:d}=await a.A(752453),f=await d("en"===c?l:k,b,{maxTurns:10,tools:["Read","Glob"],allowedTools:["Read","Glob"]});if(!f)throw Error("AI 分析未返回结果");return f.length>2e3?f.slice(0,2e3).trimEnd()+"\n\n...":f}(0,h.ensureServerEntryExports)([i,j,m]),(0,b.registerServerReference)(i,"4029475c053df759a784303074a6420acee19376be",null),(0,b.registerServerReference)(j,"60321d5147392353e76b214e8b73181012181e5201",null),(0,b.registerServerReference)(m,"609ea8ca1defc3df857b640eb087fdefc22399a180",null),a.s(["analyzeProjectDirectory",0,m,"checkMigrationSafety",0,i,"migrateProjectPath",0,j])},692497,a=>a.a(async(b,c)=>{try{a.i(244256),a.i(495370);var d=a.i(396904),e=a.i(980999);a.i(101844),a.i(563736),a.i(4634);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),656705,a=>a.a(async(b,c)=>{try{var d=a.i(692497),e=a.i(244256),f=a.i(495370),g=a.i(396904),h=a.i(980999),i=a.i(101844),j=a.i(563736),k=a.i(4634),l=b([d,g,h]);[d,g,h]=l.then?(await l)():l,a.s(["00413b547e0e0d468326cec9bf6c30ed65f5575665",()=>h.getActualWsPort,"0081c85331da833a7fd8c5f37fdf6a5f8f9a9ba368",()=>k.getOnboardingStatus,"00823b1819103f819153c21530d63a5450a302dd2d",()=>j.listAllExtensionStatus,"4007335cf8231370416bc70b1f531b7698d697e696",()=>h.getConfigValues,"400f0148b5485708f54064fbab771ea77a57f45f68",()=>f.deleteLabel,"4029475c053df759a784303074a6420acee19376be",()=>i.checkMigrationSafety,"402ed70ece4086fd712cd83dac97cb4d31c7d7061c",()=>j.checkExtension,"4040e514c0e86c1e63a2c6083863734b1a46a6a94a",()=>f.createLabel,"40430175ef8b026515e6a1e3b8d71aa4e7bb96710c",()=>e.reorderWorkspaces,"4044cbff38122cfb891d73da1024aaf42f8be71c98",()=>j.installExtension,"404ae4e3345246005e8745fdb16f42a5c2167f25eb",()=>h.resolveGitLocalPathWithSource,"4050baee4b1031261c62d0086e3cb8af5c94ac8ce8",()=>k.setOnboardingProgress,"40662d64052149f84b1770d6e0cd76b8f38c59a878",()=>e.createProject,"406ecbfe687ce69d8b0a10733e116e6aa9a85db861",()=>k.dispatchTaskCompletionEvent,"4074ece00bb7527960238616faa6ba3411562eebf8",()=>j.uninstallExtension,"407b680fb61b264ba275d503095716deb7e5d7b034",()=>e.createWorkspace,"4086e0d744b898a756e032ce33014521032af2a11b",()=>h.resolveGitLocalPath,"40c6ef05b327e1ff3f0cc87ade2939c3f2f2a9b0a0",()=>f.getLabelsForWorkspace,"40e07482bf0fceb5002d37d00c9cf641a784521f21",()=>e.deleteWorkspace,"6015ff2f825ac4008436c4ffa405d30a66694785da",()=>e.updateWorkspace,"601986152ab7d30f21c3b9d1cdaf29f905cb2edf9a",()=>g.globalSearch,"602f68c786934a35694da1a9b4ac2695d249977699",()=>h.setConfigValue,"60321d5147392353e76b214e8b73181012181e5201",()=>i.migrateProjectPath,"606d48f6b7a060850db7eef05aac9d5c07a7a72537",()=>h.getConfigValue,"6076d05b67e5f909610c1f5f6af8e047d8cca58392",()=>k.completeOnboarding,"6092dee1bcaf5393ca19e7e4bfe59f9df15f956ddf",()=>k.setOnboardingExtensions,"609ea8ca1defc3df857b640eb087fdefc22399a180",()=>i.analyzeProjectDirectory]),c()}catch(a){c(a)}},!1),76052,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_110am8v._.js"].map(b=>a.l(b))).then(()=>b(492067)))},98813,a=>{a.v(a=>Promise.resolve().then(()=>a(962620)))},507502,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js"].map(b=>a.l(b))).then(()=>b(845427)))},752453,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__09z_ddd._.js"].map(b=>a.l(b))).then(()=>b(897667)))}];
45
+ - Output in English`;async function m(b,c="zh"){if(!b||"string"!=typeof b)throw Error("无效的本地路径");if(b.startsWith("~"))throw Error("不支持 ~ 别名,请提供绝对路径");if(!e.default.isAbsolute(b))throw Error("本地路径必须为绝对路径");let{aiQuery:d}=await a.A(752453),f=await d("en"===c?l:k,b,{maxTurns:10,tools:["Read","Glob"],allowedTools:["Read","Glob"]});if(!f)throw Error("AI 分析未返回结果");return f.length>2e3?f.slice(0,2e3).trimEnd()+"\n\n...":f}(0,h.ensureServerEntryExports)([i,j,m]),(0,b.registerServerReference)(i,"40e8327e313b39fc99571773ca1cac1217f978fc83",null),(0,b.registerServerReference)(j,"60e921b4290b893e15be9b596f68c0d8d5748450de",null),(0,b.registerServerReference)(m,"60d6bdc95a2a456d0e0dc627f1f08c495e85e3c291",null),a.s(["analyzeProjectDirectory",0,m,"checkMigrationSafety",0,i,"migrateProjectPath",0,j])},692497,a=>a.a(async(b,c)=>{try{a.i(244256),a.i(495370);var d=a.i(396904),e=a.i(980999);a.i(101844),a.i(563736),a.i(4634);var f=b([d,e]);[d,e]=f.then?(await f)():f,a.s([]),c()}catch(a){c(a)}},!1),656705,a=>a.a(async(b,c)=>{try{var d=a.i(692497),e=a.i(244256),f=a.i(495370),g=a.i(396904),h=a.i(980999),i=a.i(101844),j=a.i(563736),k=a.i(4634),l=b([d,g,h]);[d,g,h]=l.then?(await l)():l,a.s(["0020d458849af3dea02c06547ca93681820093cd60",()=>j.listAllExtensionStatus,"008ca26582a6bc86f8a81485dafd39264601108780",()=>h.getActualWsPort,"00cbd31136fc6774db005529c98fc11975e67706fc",()=>k.getOnboardingStatus,"4002d954765b9e56566e449fc3bc78e4fb03be7b35",()=>k.dispatchTaskCompletionEvent,"4004282668f38cbee8857d302368731b5ab318a755",()=>j.installExtension,"401a552a24f8644baa876aacdcf5eba7d28ab5cc3a",()=>e.createProject,"40240a5845f1968bde6e8e0e74ac4a2e123226c978",()=>h.resolveGitLocalPathWithSource,"402bbc93aabd476c75ea98b62565514688b910719d",()=>f.deleteLabel,"4045a4e8dc6e5750aaa5486feb11ec8f39f84f79cc",()=>e.reorderWorkspaces,"4049e0ef7ccd78445d833ed4f81e1914612c618a1a",()=>k.setOnboardingProgress,"40678a2b403c111cdd409176df5bba928e0f63a5b4",()=>f.getLabelsForWorkspace,"4071f8336f22edfe28929da6c8ff0f4029617d3711",()=>j.checkExtension,"407fab8fa8b7793fb8f25a418f04559876792ca21c",()=>f.createLabel,"40a3c6df81ffdfc61bfe62695cc844afa21f21a1ac",()=>j.uninstallExtension,"40b0a7436022990255822bd0a66b4fbb3eed825bfe",()=>h.resolveGitLocalPath,"40b7eec0bb0bcd1c9c8f305cb7f9cb2aa9d17c5331",()=>h.getConfigValues,"40c028aa754fb395b011ca98a0d8998d941ba9b275",()=>e.createWorkspace,"40e8327e313b39fc99571773ca1cac1217f978fc83",()=>i.checkMigrationSafety,"40e9e4643eae5f742132fff6c126cd641da7345a95",()=>e.deleteWorkspace,"600a7b6234db631cbc3d0f9a4263a6d0a9dba6455a",()=>e.updateWorkspace,"602f249ffd4feeacc003965c2280a0f6818774621f",()=>h.getConfigValue,"603ff195358b719fe71041bada759b1541862c7e83",()=>h.setConfigValue,"6051197133a60d5756beb41200c1dbffb7f56bea66",()=>g.globalSearch,"6076596bd293cdd855f89742a00cf37915e785323c",()=>k.completeOnboarding,"60989c7084fe6a3648aaebdf6450e4d69d1b62e7f2",()=>k.setOnboardingExtensions,"60d6bdc95a2a456d0e0dc627f1f08c495e85e3c291",()=>i.analyzeProjectDirectory,"60e921b4290b893e15be9b596f68c0d8d5748450de",()=>i.migrateProjectPath]),c()}catch(a){c(a)}},!1),76052,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_110am8v._.js"].map(b=>a.l(b))).then(()=>b(492067)))},98813,a=>{a.v(a=>Promise.resolve().then(()=>a(962620)))},507502,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_worktree_ts_06cucy3._.js"].map(b=>a.l(b))).then(()=>b(845427)))},752453,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__09z_ddd._.js"].map(b=>a.l(b))).then(()=>b(897667)))}];
46
46
 
47
47
  //# sourceMappingURL=_0p6p_68._.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),f=a.i(103071);function g(a,c){return(0,b.execFileSync)("git",a,{cwd:c,timeout:1e4,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim()}function h(a,b){if(b)return b;for(let b of["main","master","develop"])try{return g(["merge-base","HEAD",b],a)}catch{}return null}function i(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 j(a,b,f,k,l,m=null){try{let b;console.error(`[captureExecutionSummary] Starting: exec=${a.slice(0,8)} exit=${f} buffer=${k.length}chars worktree=${l} fork=${m?.slice(0,8)??"none"}`);let j=null,n=null,o=null;if(l&&(0,c.existsSync)(l))try{if(g(["rev-parse","--git-dir"],l),j=function(a,b){try{let c=h(a,b);if(!c)return null;return g(["log","--oneline",`${c}..HEAD`],a)||null}catch{return null}}(l,m),(n=function(a,b){try{let c=h(a,b);if(!c)return null;let d=g(["diff","--stat",`${c}..HEAD`],a);if(!d)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}(d)}catch{return null}}(l,m))&&j){let a=j.split("\n").filter(Boolean).length;n={...n,commits:a}}o=i(j)}catch{}let p=(b=k.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:o??(j?i(j):null),gitLog:j??null,gitStats:n?JSON.stringify(n):null,exitCode:f,terminalLog:p||null}}),p&&l&&(console.error("[captureExecutionSummary] Starting background AI summary..."),(0,e.generateSummaryFromLog)(p,l).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 k(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="",g=null,h=[];for(let a of b.executions)a.terminalLog&&(c+=a.terminalLog+"\n---\n"),a.summary&&h.push(a.summary),!g&&a.worktreePath&&(g=a.worktreePath);if(!(c=c.slice(-8e3)).trim())return;let i=h.join("\n"),j=g||process.cwd();console.error(`[captureTaskDreaming] Starting for task=${a.slice(0,8)}, ${b.executions.length} executions`);let k=await (0,e.generateDreamingInsight)(c,j,i);if(!k||!k.shouldCreateNote)return void console.error("[captureTaskDreaming] No note needed");let l=await d.db.projectNote.create({data:{title:k.noteTitle||k.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")}(k),category:f.SESSION_INSIGHT_CATEGORY,projectId:b.projectId,taskId:a}}),m=b.executions[0].id;await d.db.taskExecution.update({where:{id:m},data:{insightNoteId:l.id}}),console.error(`[captureTaskDreaming] Note created: ${l.id}`)}catch(a){console.error("[captureTaskDreaming] Failed:",a)}}a.s(["captureExecutionSummary",0,j,"captureTaskDreaming",0,k])},719041,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__0ti8vng._.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=_0u_uywm._.js.map
30
+ //# sourceMappingURL=_0q2mf9q._.js.map