tower-studio 0.2.46 → 0.2.47

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 (290) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/build-manifest.json +3 -3
  3. package/.next/standalone/.next/prerender-manifest.json +3 -3
  4. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  5. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_not-found/page/react-loadable-manifest.json +3 -3
  12. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +82 -70
  13. package/.next/standalone/.next/server/app/_not-found/page.js +2 -1
  14. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/api/browse-fs/route.js.nft.json +1 -1
  17. package/.next/standalone/.next/server/app/api/git/route.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/api/tasks/[taskId]/merge/route.js.nft.json +1 -1
  19. package/.next/standalone/.next/server/app/harness/page/react-loadable-manifest.json +3 -3
  20. package/.next/standalone/.next/server/app/harness/page/server-reference-manifest.json +92 -80
  21. package/.next/standalone/.next/server/app/harness/page.js +2 -1
  22. package/.next/standalone/.next/server/app/harness/page.js.nft.json +1 -1
  23. package/.next/standalone/.next/server/app/harness/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/missions/page/react-loadable-manifest.json +3 -3
  25. package/.next/standalone/.next/server/app/missions/page/server-reference-manifest.json +150 -138
  26. package/.next/standalone/.next/server/app/missions/page.js +5 -4
  27. package/.next/standalone/.next/server/app/missions/page.js.nft.json +1 -1
  28. package/.next/standalone/.next/server/app/missions/page_client-reference-manifest.js +1 -1
  29. package/.next/standalone/.next/server/app/onboarding/page/react-loadable-manifest.json +3 -3
  30. package/.next/standalone/.next/server/app/onboarding/page/server-reference-manifest.json +82 -70
  31. package/.next/standalone/.next/server/app/onboarding/page.js +2 -1
  32. package/.next/standalone/.next/server/app/onboarding/page.js.nft.json +1 -1
  33. package/.next/standalone/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  34. package/.next/standalone/.next/server/app/page/react-loadable-manifest.json +3 -3
  35. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +82 -70
  36. package/.next/standalone/.next/server/app/page.js +2 -1
  37. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  38. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  39. package/.next/standalone/.next/server/app/settings/page/react-loadable-manifest.json +3 -3
  40. package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +128 -116
  41. package/.next/standalone/.next/server/app/settings/page.js +4 -3
  42. package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/react-loadable-manifest.json +3 -3
  45. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page/server-reference-manifest.json +190 -178
  46. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js +3 -2
  47. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page.js.nft.json +1 -1
  48. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/archive/page_client-reference-manifest.js +1 -1
  49. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/react-loadable-manifest.json +3 -3
  50. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page/server-reference-manifest.json +166 -154
  51. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js +3 -2
  52. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page.js.nft.json +1 -1
  53. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/assets/page_client-reference-manifest.js +1 -1
  54. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/react-loadable-manifest.json +3 -3
  55. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page/server-reference-manifest.json +86 -74
  56. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js +2 -1
  57. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page.js.nft.json +1 -1
  58. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/groups/page_client-reference-manifest.js +1 -1
  59. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/react-loadable-manifest.json +3 -3
  60. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page/server-reference-manifest.json +150 -138
  61. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js +3 -2
  62. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page.js.nft.json +1 -1
  63. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/notes/page_client-reference-manifest.js +1 -1
  64. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/react-loadable-manifest.json +3 -3
  65. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page/server-reference-manifest.json +162 -162
  66. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js +4 -3
  67. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/react-loadable-manifest.json +3 -3
  70. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page/server-reference-manifest.json +82 -70
  71. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js +3 -2
  72. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page.js.nft.json +1 -1
  73. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/page_client-reference-manifest.js +1 -1
  74. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/react-loadable-manifest.json +3 -3
  75. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page/server-reference-manifest.json +140 -140
  76. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js +3 -2
  77. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page.js.nft.json +1 -1
  78. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/projects/[projectId]/versions/page_client-reference-manifest.js +1 -1
  79. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/react-loadable-manifest.json +4 -4
  80. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page/server-reference-manifest.json +182 -170
  81. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js +6 -5
  82. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page.js.nft.json +1 -1
  83. package/.next/standalone/.next/server/app/workspaces/[workspaceId]/tasks/[taskId]/page_client-reference-manifest.js +1 -1
  84. package/.next/standalone/.next/server/app/workspaces/page/react-loadable-manifest.json +3 -3
  85. package/.next/standalone/.next/server/app/workspaces/page/server-reference-manifest.json +108 -96
  86. package/.next/standalone/.next/server/app/workspaces/page.js +2 -1
  87. package/.next/standalone/.next/server/app/workspaces/page.js.nft.json +1 -1
  88. package/.next/standalone/.next/server/app/workspaces/page_client-reference-manifest.js +1 -1
  89. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0eh8dj_.js +7 -7
  90. package/.next/standalone/.next/server/chunks/0se9_next_dist_esm_build_templates_app-route_0gr2wxq.js +1 -1
  91. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0esywxf._.js +1 -1
  92. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0kkrbn-._.js +1 -1
  93. package/.next/standalone/.next/server/chunks/_0_w835g._.js +1 -1
  94. package/.next/standalone/.next/server/chunks/src_05balzk._.js +1 -1
  95. package/.next/standalone/.next/server/chunks/src_0gif-f5._.js +1 -1
  96. package/.next/standalone/.next/server/chunks/src_0pg9w-x._.js +1 -1
  97. package/.next/standalone/.next/server/chunks/src_0vp6.co._.js +1 -1
  98. package/.next/standalone/.next/server/chunks/src_11k6i~l._.js +1 -1
  99. package/.next/standalone/.next/server/chunks/src_actions_agent-actions_ts_10q9r5b._.js +3 -3
  100. package/.next/standalone/.next/server/chunks/ssr/0iu._[workspaceId]_projects_[projectId]_versions_version-timeline-client_tsx_07o_kyi._.js +1 -1
  101. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__00qdvw7._.js +3 -0
  102. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07rk6ic._.js → [root-of-the-server]__0282989._.js} +1 -1
  103. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0hzwoy5._.js → [root-of-the-server]__03jikql._.js} +1 -1
  104. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0trmndk._.js → [root-of-the-server]__04dod9d._.js} +1 -1
  105. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__05tx27l._.js +3 -0
  106. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0m8m7vc._.js → [root-of-the-server]__07ha-7q._.js} +1 -1
  107. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__07~giyb._.js +3 -0
  108. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0bx_h2u._.js → [root-of-the-server]__0872sqe._.js} +2 -2
  109. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__090y_.y._.js +1 -1
  110. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0b6hugs._.js → [root-of-the-server]__09qoc8v._.js} +1 -1
  111. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.0m12b._.js → [root-of-the-server]__0bl842b._.js} +1 -1
  112. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0br5e7w._.js → [root-of-the-server]__0c81jqz._.js} +1 -1
  113. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dh0alq._.js +3 -0
  114. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0u3~-.g._.js → [root-of-the-server]__0fy8mj6._.js} +1 -1
  115. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0kqp70x._.js → [root-of-the-server]__0gsk~9d._.js} +1 -1
  116. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h4ltpn._.js +5 -0
  117. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0hx2p17._.js +3 -0
  118. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ie8~g5._.js +3 -0
  119. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0n02kfa._.js → [root-of-the-server]__0j1w7ro._.js} +1 -1
  120. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0esg88l._.js → [root-of-the-server]__0jxfeb6._.js} +1 -1
  121. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0jymb~t._.js +1 -1
  122. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__00qzvly._.js → [root-of-the-server]__0mi.v4q._.js} +1 -1
  123. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__06sew6r._.js → [root-of-the-server]__0nell0t._.js} +1 -1
  124. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0odoa97._.js +30 -0
  125. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__12viys4._.js → [root-of-the-server]__0q8o5us._.js} +1 -1
  126. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0b6fbjv._.js → [root-of-the-server]__0qjjy1r._.js} +1 -1
  127. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0rg73f.._.js +3 -0
  128. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0t3q30a._.js +3 -0
  129. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tpho3f._.js +3 -0
  130. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0dhq_gl._.js → [root-of-the-server]__0tusyj0._.js} +1 -1
  131. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0~edc3d._.js → [root-of-the-server]__0x6eyvj._.js} +1 -1
  132. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0n3uc.v._.js → [root-of-the-server]__0xftcya._.js} +2 -2
  133. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0xiiocg._.js +30 -0
  134. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0x7br99._.js → [root-of-the-server]__0znl9us._.js} +2 -2
  135. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0zsnp~d._.js +1 -1
  136. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~fdua7._.js +3 -0
  137. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11fp64w._.js +1 -1
  138. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0vyl8to._.js → [root-of-the-server]__1290yo~._.js} +2 -2
  139. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12s3kky._.js +3 -0
  140. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0s_q09t._.js → [root-of-the-server]__136sh9u._.js} +1 -1
  141. package/.next/standalone/.next/server/chunks/ssr/_0-~9em3._.js +1 -1
  142. package/.next/standalone/.next/server/chunks/ssr/_0.-.0zk._.js +3 -0
  143. package/.next/standalone/.next/server/chunks/ssr/_0..h3hk._.js +1 -1
  144. package/.next/standalone/.next/server/chunks/ssr/{_0b660g4._.js → _0111pr2._.js} +1 -1
  145. package/.next/standalone/.next/server/chunks/ssr/{_0czsddm._.js → _029yl-g._.js} +1 -1
  146. package/.next/standalone/.next/server/chunks/ssr/{_0q2pep_._.js → _02mcoex._.js} +2 -2
  147. package/.next/standalone/.next/server/chunks/ssr/_02t7f2_._.js +3 -0
  148. package/.next/standalone/.next/server/chunks/ssr/{_0gomvsp._.js → _04brhyt._.js} +2 -2
  149. package/.next/standalone/.next/server/chunks/ssr/{_1118hto._.js → _08b3kyv._.js} +1 -1
  150. package/.next/standalone/.next/server/chunks/ssr/{_0-5.hgb._.js → _0a___34._.js} +2 -2
  151. package/.next/standalone/.next/server/chunks/ssr/{_0ami9yt._.js → _0b4v~ls._.js} +2 -2
  152. package/.next/standalone/.next/server/chunks/ssr/_0bdyusg._.js +6 -0
  153. package/.next/standalone/.next/server/chunks/ssr/{_0hsuip_._.js → _0c8-9m9._.js} +2 -2
  154. package/.next/standalone/.next/server/chunks/ssr/{_0j7m~u6._.js → _0gcox_6._.js} +1 -1
  155. package/.next/standalone/.next/server/chunks/ssr/{_0snv7nt._.js → _0gte_c4._.js} +1 -1
  156. package/.next/standalone/.next/server/chunks/ssr/{_0g~p9_x._.js → _0hyn4md._.js} +2 -2
  157. package/.next/standalone/.next/server/chunks/ssr/{_0l6byg1._.js → _0lqjtwo._.js} +1 -1
  158. package/.next/standalone/.next/server/chunks/ssr/_0noar.v._.js +3 -0
  159. package/.next/standalone/.next/server/chunks/ssr/_0os43sb._.js +1 -1
  160. package/.next/standalone/.next/server/chunks/ssr/{_0o_c3b2._.js → _0rilhs1._.js} +2 -2
  161. package/.next/standalone/.next/server/chunks/ssr/{_0ak77.u._.js → _0sbkase._.js} +1 -1
  162. package/.next/standalone/.next/server/chunks/ssr/{_00_h2nx._.js → _0t-0.1o._.js} +2 -2
  163. package/.next/standalone/.next/server/chunks/ssr/_0wbcp88._.js +1 -1
  164. package/.next/standalone/.next/server/chunks/ssr/{_0mmy~98._.js → _0w~~xn0._.js} +2 -2
  165. package/.next/standalone/.next/server/chunks/ssr/{_0awn2mm._.js → _0xexuoi._.js} +2 -2
  166. package/.next/standalone/.next/server/chunks/ssr/_0xu906p._.js +4 -0
  167. package/.next/standalone/.next/server/chunks/ssr/_0z-z415._.js +3 -0
  168. package/.next/standalone/.next/server/chunks/ssr/_0zx1ubq._.js +3 -0
  169. package/.next/standalone/.next/server/chunks/ssr/{_0ty4xe6._.js → _0~2k74h._.js} +1 -1
  170. package/.next/standalone/.next/server/chunks/ssr/{_0hx2o_8._.js → _0~rpgs_._.js} +2 -2
  171. package/.next/standalone/.next/server/chunks/ssr/_10a_vqn._.js +3 -0
  172. package/.next/standalone/.next/server/chunks/ssr/{_0p5ft59._.js → _10or.ne._.js} +1 -1
  173. package/.next/standalone/.next/server/chunks/ssr/_11.knhq._.js +1 -1
  174. package/.next/standalone/.next/server/chunks/ssr/{_12s8n8g._.js → _124j7aj._.js} +1 -1
  175. package/.next/standalone/.next/server/chunks/ssr/_13yv8at._.js +3 -0
  176. package/.next/standalone/.next/server/chunks/ssr/src_11j0qlp._.js +1 -1
  177. package/.next/standalone/.next/server/chunks/ssr/src_actions_07_wts6._.js +47 -0
  178. package/.next/standalone/.next/server/chunks/ssr/src_actions_agent-actions_ts_0~wc.sy._.js +1 -1
  179. package/.next/standalone/.next/server/chunks/ssr/src_actions_file-actions_ts_0gcvqwm._.js +1 -1
  180. package/.next/standalone/.next/server/chunks/ssr/src_app_missions_missions-client_tsx_11429lj._.js +1 -1
  181. package/.next/standalone/.next/server/chunks/ssr/src_app_onboarding_page_tsx_0xf7hpz._.js +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/src_app_settings_page_tsx_0h9v7dr._.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_assets_assets-page-client_tsx_0wyzpam._.js +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_board-page-client_tsx_0gips66._.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_notes_notes-page-client_tsx_10gyo3v._.js +1 -1
  186. package/.next/standalone/.next/server/chunks/ssr/src_app_workspaces_[workspaceId]_tasks_[taskId]_task-page-client_tsx_02t7blt._.js +1 -1
  187. package/.next/standalone/.next/server/chunks/ssr/src_components_0rowjw~._.js +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0cld9rt._.js → src_lib_0-3zx.v._.js} +1 -1
  189. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0_px2pz._.js → src_lib_00ial55._.js} +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0a.zy31._.js → src_lib_01-0ix1._.js} +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0b73q0a._.js → src_lib_01d~ml9._.js} +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/{src_lib_04nzvfd._.js → src_lib_0278czx._.js} +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/src_lib_07o.0r6._.js +3 -0
  194. package/.next/standalone/.next/server/chunks/ssr/src_lib_09jpiip._.js +3 -0
  195. package/.next/standalone/.next/server/chunks/ssr/src_lib_0bmg7ix._.js +3 -0
  196. package/.next/standalone/.next/server/chunks/ssr/src_lib_0cb~2g1._.js +3 -0
  197. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fdsvpu._.js +3 -0
  198. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fyrfen._.js +3 -0
  199. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0dbf2qa._.js → src_lib_0gqe-g3._.js} +1 -1
  200. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ixnmd0._.js +3 -0
  201. package/.next/standalone/.next/server/chunks/ssr/src_lib_0lpxsj~._.js +1 -1
  202. package/.next/standalone/.next/server/chunks/ssr/src_lib_0pgz5n6._.js +3 -0
  203. package/.next/standalone/.next/server/chunks/ssr/{src_lib_0h2u7a0._.js → src_lib_0tq69ek._.js} +1 -1
  204. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  205. package/.next/standalone/.next/server/pages/500.html +1 -1
  206. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  207. package/.next/standalone/.next/server/server-reference-manifest.json +1146 -1068
  208. package/.next/standalone/.next/static/chunks/{0oyskd~8~j.j7.js → 00agq5_c-.llc.js} +1 -1
  209. package/.next/standalone/.next/static/chunks/015i97g3voot2.js +2 -0
  210. package/.next/standalone/.next/static/chunks/{02v-9v~885t9c.js → 01wvj~s3skc-5.js} +1 -1
  211. package/.next/standalone/.next/static/chunks/{0.gedys.tq.~k.js → 031br6.h-zycv.js} +1 -1
  212. package/.next/standalone/.next/static/chunks/{07qijq9o5jccu.js → 054ztat09k8d8.js} +1 -1
  213. package/.next/standalone/.next/static/chunks/07f592yv~pptf.js +1 -0
  214. package/.next/standalone/.next/static/chunks/{06x7oq8_iu~9d.js → 08j4ettv1zbmn.js} +1 -1
  215. package/.next/standalone/.next/static/chunks/{03uix~1ru.ovv.js → 08kc0~d-bpqxd.js} +1 -1
  216. package/.next/standalone/.next/static/chunks/{0j5olwb~d3~3j.js → 08s_oyki61yjf.js} +1 -1
  217. package/.next/standalone/.next/static/chunks/09bc_~h466~tj.js +1 -0
  218. package/.next/standalone/.next/static/chunks/{0q1872yhybt55.js → 0_hj_1l73v-on.js} +1 -1
  219. package/.next/standalone/.next/static/chunks/{00o_eiv12t~.1.js → 0a54zbhpg7-ql.js} +1 -1
  220. package/.next/standalone/.next/static/chunks/0c2po53wqe-op.js +1 -0
  221. package/.next/standalone/.next/static/chunks/0clhvl~13pwv2.js +1 -0
  222. package/.next/standalone/.next/static/chunks/0fi1kdxrc9m~d.js +1 -0
  223. package/.next/standalone/.next/static/chunks/0j56_.0_wup.m.js +1 -0
  224. package/.next/standalone/.next/static/chunks/{17z9uivez~kp3.js → 0lokkque~1fox.js} +1 -1
  225. package/.next/standalone/.next/static/chunks/0m5k~sgt78d8a.js +1 -0
  226. package/.next/standalone/.next/static/chunks/{0d9u2xspag~4h.js → 0mzzaly9-cwhd.js} +1 -1
  227. package/.next/standalone/.next/static/chunks/0pg~fc3o64-u0.js +1 -0
  228. package/.next/standalone/.next/static/chunks/{0-kkc.ibted8y.js → 0pvc93qomwhkq.js} +1 -1
  229. package/.next/standalone/.next/static/chunks/0smoiulyzysrc.js +2 -0
  230. package/.next/standalone/.next/static/chunks/0ufatfbq87c84.js +1 -0
  231. package/.next/standalone/.next/static/chunks/{09om2gfwimh7k.js → 0ujznvfinjpzn.js} +1 -1
  232. package/.next/standalone/.next/static/chunks/{0cf7e1scao3zk.js → 0ux~8zee88x-j.js} +1 -1
  233. package/.next/standalone/.next/static/chunks/0vy01_a6xhhrr.js +1 -0
  234. package/.next/standalone/.next/static/chunks/0xd_tk4asn0qj.js +1 -0
  235. package/.next/standalone/.next/static/chunks/{12-mlz2vukuga.js → 0~l470bpaoz9f.js} +1 -1
  236. package/.next/standalone/.next/static/chunks/118j.0w2pbdea.js +1 -0
  237. package/.next/standalone/.next/static/chunks/13yfli6~6o4z~.js +1 -0
  238. package/.next/standalone/.next/static/chunks/{0t1awv68pnn-e.js → 15rlbf5rw1dd..js} +1 -1
  239. package/.next/standalone/package.json +1 -1
  240. package/dist/mcp-server.cjs +6 -0
  241. package/package.json +1 -1
  242. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0-geq20._.js +0 -3
  243. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02~hdzx._.js +0 -3
  244. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h_pt4a._.js +0 -3
  245. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0idkp76._.js +0 -3
  246. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0j4m.1s._.js +0 -3
  247. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kmonje._.js +0 -3
  248. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0lh3mlq._.js +0 -3
  249. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0muf4wq._.js +0 -49
  250. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0o5ohqy._.js +0 -47
  251. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ta_mpj._.js +0 -30
  252. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ws0_c1._.js +0 -3
  253. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0~mhv4m._.js +0 -3
  254. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1013v_g._.js +0 -47
  255. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__123rmn-._.js +0 -30
  256. package/.next/standalone/.next/server/chunks/ssr/_05~lqg-._.js +0 -4
  257. package/.next/standalone/.next/server/chunks/ssr/_0771b4a._.js +0 -47
  258. package/.next/standalone/.next/server/chunks/ssr/_0fmko25._.js +0 -3
  259. package/.next/standalone/.next/server/chunks/ssr/_0hg~.4w._.js +0 -6
  260. package/.next/standalone/.next/server/chunks/ssr/_0nrxhfb._.js +0 -47
  261. package/.next/standalone/.next/server/chunks/ssr/_0vkl7.h._.js +0 -47
  262. package/.next/standalone/.next/server/chunks/ssr/_0x09t_o._.js +0 -47
  263. package/.next/standalone/.next/server/chunks/ssr/_0zn.4bi._.js +0 -47
  264. package/.next/standalone/.next/server/chunks/ssr/_1086w4p._.js +0 -47
  265. package/.next/standalone/.next/server/chunks/ssr/src_lib_0er7rzd._.js +0 -3
  266. package/.next/standalone/.next/server/chunks/ssr/src_lib_0f0v8_~._.js +0 -3
  267. package/.next/standalone/.next/server/chunks/ssr/src_lib_0fr6fzy._.js +0 -3
  268. package/.next/standalone/.next/server/chunks/ssr/src_lib_0k04rl3._.js +0 -3
  269. package/.next/standalone/.next/server/chunks/ssr/src_lib_0sq6aqm._.js +0 -3
  270. package/.next/standalone/.next/server/chunks/ssr/src_lib_0ui-~7g._.js +0 -3
  271. package/.next/standalone/.next/server/chunks/ssr/src_lib_0z-gn78._.js +0 -3
  272. package/.next/standalone/.next/server/chunks/ssr/src_lib_13c4a4g._.js +0 -3
  273. package/.next/standalone/.next/static/chunks/00g58.es_hxli.js +0 -1
  274. package/.next/standalone/.next/static/chunks/01qtgj0xv1fsm.js +0 -2
  275. package/.next/standalone/.next/static/chunks/024euw7po0d0w.js +0 -1
  276. package/.next/standalone/.next/static/chunks/03ct4d8znb7tp.js +0 -1
  277. package/.next/standalone/.next/static/chunks/0alhq.h4~iogi.js +0 -1
  278. package/.next/standalone/.next/static/chunks/0ck~sr0nkabl~.js +0 -1
  279. package/.next/standalone/.next/static/chunks/0d1ok-v-u-xe~.js +0 -1
  280. package/.next/standalone/.next/static/chunks/0ftptcpntzaux.js +0 -1
  281. package/.next/standalone/.next/static/chunks/0gk~m5bwgoafi.js +0 -1
  282. package/.next/standalone/.next/static/chunks/0in_7s8n4lmfr.js +0 -1
  283. package/.next/standalone/.next/static/chunks/0mtrtl-jl46in.js +0 -2
  284. package/.next/standalone/.next/static/chunks/0~2l3wz-gxs2j.js +0 -1
  285. package/.next/standalone/.next/static/chunks/0~7h_a_dofg-4.js +0 -1
  286. package/.next/standalone/.next/static/chunks/15gztq9f12uhe.js +0 -1
  287. package/.next/standalone/.next/static/chunks/15ue90qe1sh-9.js +0 -1
  288. /package/.next/standalone/.next/static/{Pf_z-PYy0CJhvcyPEi-LM → dFewkdixeBoRBY6Fvw11J}/_buildManifest.js +0 -0
  289. /package/.next/standalone/.next/static/{Pf_z-PYy0CJhvcyPEi-LM → dFewkdixeBoRBY6Fvw11J}/_clientMiddlewareManifest.js +0 -0
  290. /package/.next/standalone/.next/static/{Pf_z-PYy0CJhvcyPEi-LM → dFewkdixeBoRBY6Fvw11J}/_ssgManifest.js +0 -0
@@ -27,4 +27,4 @@ Rules:
27
27
  - insights array can be empty if nothing notable
28
28
  - Keep each insight concise (1-2 sentences)`,h=await c(g,b);if(!h)return null;try{let a=h,b=a.match(/\{[\s\S]*\}/);b&&(a=b[0]);let c=JSON.parse(a);if("string"!=typeof c.summary||"boolean"!=typeof c.shouldCreateNote)return console.error("[generateDreamingInsight] Invalid response structure"),null;return c}catch(a){return console.error("[generateDreamingInsight] JSON parse failed:",a.message),null}}a.s(["aiQuery",0,c,"generateDreamingInsight",0,e,"generateSummaryFromLog",0,d])},719041,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__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=_0b660g4._.js.map
30
+ //# sourceMappingURL=_0111pr2._.js.map
@@ -27,4 +27,4 @@ Rules:
27
27
  - insights array can be empty if nothing notable
28
28
  - Keep each insight concise (1-2 sentences)`,h=await c(g,b);if(!h)return null;try{let a=h,b=a.match(/\{[\s\S]*\}/);b&&(a=b[0]);let c=JSON.parse(a);if("string"!=typeof c.summary||"boolean"!=typeof c.shouldCreateNote)return console.error("[generateDreamingInsight] Invalid response structure"),null;return c}catch(a){return console.error("[generateDreamingInsight] JSON parse failed:",a.message),null}}a.s(["aiQuery",0,c,"generateDreamingInsight",0,e,"generateSummaryFromLog",0,d])},719041,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]__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=_0czsddm._.js.map
30
+ //# sourceMappingURL=_029yl-g._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[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,a=>{"use strict";let b=(0,a.i(711796).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,b],300141);var c=a.i(728778),d=a.i(374637),e=a.i(10390),f=a.i(442620),g=a.i(811344),h=a.i(394869),i=a.i(207339),j=a.i(704494),k=a.i(699570),l=a.i(579834),m=a.i(786304),n=a.i(814574),o=a.i(429246),p=a.i(951192);function q({patchState:a,isLargeFold:b,onLoad:d}){let{t:e}=(0,p.useI18n)();return b?(0,c.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,c.jsx)(k.Button,{variant:"link",onClick:d,className:"h-auto p-0 text-sm",children:e("diff.loadDiff")}),(0,c.jsx)("span",{className:"text-xs text-muted-foreground",children:e("diff.foldedLarge")})]}):a&&"loading"!==a.kind?"error"===a.kind?(0,c.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,c.jsx)("span",{children:e("diff.loadFailed")}),(0,c.jsx)(k.Button,{variant:"ghost",onClick:d,children:e("diff.retry")})]}):"binary"===a.kind?(0,c.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.binaryNotShown")}):"empty"===a.kind?(0,c.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.noChanges")}):(0,c.jsx)(r,{patch:a.patch??""}):(0,c.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,c.jsx)(j.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function r({patch:a}){let{t:b}=(0,p.useI18n)(),d=a.split("\n"),e=d.length>500,f=e?d.slice(0,500):d;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:f.map((a,b)=>{let d=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,c.jsx)("span",{className:d,children:a||" "},b)})}),e&&(0,c.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(d.length)})})]})}a.s(["TaskDiffView",0,function({taskId:a,files:b,totalAdded:j,totalRemoved:r,hasConflicts:s,conflictFiles:t,onCommit:u,hasUncommitted:v}){let{t:w}=(0,p.useI18n)(),[x,y]=(0,d.useState)(new Set),[z,A]=(0,d.useState)(new Map),[B,C]=(0,d.useState)(!1),[D,E]=(0,d.useState)(""),[F,G]=(0,d.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,c.jsxs)("div",{className:"flex flex-col h-full",children:[(0,c.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,c.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,c.jsxs)("span",{className:"font-medium text-foreground",children:[b.length," files changed"]}),(0,c.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",j]}),(0,c.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",r]})]}),(0,c.jsx)("div",{className:"flex items-center gap-2",children:v&&u&&(0,c.jsxs)(k.Button,{variant:"outline",onClick:()=>C(!0),className:"gap-2",children:[(0,c.jsx)(i.GitCommitHorizontal,{className:"h-4 w-4"}),w("diff.commit")]})})]}),s&&(0,c.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,c.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,c.jsx)(g.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,c.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",t.length," conflicting file",1!==t.length?"s":""]})]}),(0,c.jsx)("ul",{className:"ml-6 space-y-1",children:t.map(a=>(0,c.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,c.jsx)("div",{className:"flex-1 overflow-auto",children:0===b.length?(0,c.jsx)(l.EmptyState,{icon:h.GitCompare,title:w("diff.noChanges"),className:"h-full"}):(0,c.jsx)("div",{className:"divide-y divide-border",children:b.map(a=>{let b=x.has(a.filename),d=z.get(a.filename),g=a.added+a.removed;return(0,c.jsxs)("div",{children:[(0,c.jsxs)(k.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,c.jsx)(f.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,c.jsx)(e.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,c.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,c.jsx)(m.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:w("diff.binary")}):(0,c.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,c.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,c.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),b&&!a.isBinary&&(0,c.jsx)("div",{className:"border-t border-border bg-background",children:(0,c.jsx)(q,{filename:a.filename,patchState:d,isLargeFold:!d&&g>200,onLoad:()=>H(a.filename)})})]},a.filename)})})}),(0,c.jsx)(n.Dialog,{open:B,onOpenChange:C,children:(0,c.jsxs)(n.DialogContent,{className:"max-w-md",children:[(0,c.jsx)(n.DialogHeader,{children:(0,c.jsx)(n.DialogTitle,{children:w("diff.commitChanges")})}),(0,c.jsx)("div",{className:"flex flex-col gap-3",children:(0,c.jsx)(o.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,c.jsxs)(n.DialogFooter,{children:[(0,c.jsx)(k.Button,{variant:"ghost",onClick:()=>C(!1),children:w("common.cancel")}),(0,c.jsx)(k.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)},115798,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("403c35c2389d293cdefc8a0b3788a1215ad7f93c68",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},702559,857386,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("7c636a9922893aeb4dcf2cea81b0a4c429bef4146e",b.callServer,void 0,b.findSourceMapURL,"startPtyExecutionSafe");a.s(["startPtyExecutionSafe",0,c],702559);let d=(0,b.createServerReference)("4044d6c5c594edca1f2190b98b13690c7930ebe6fb",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,d],857386)},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)})]})}])},92988,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("6076bcc79f9958bb057ccdd60911f9d7b735d7a931",b.callServer,void 0,b.findSourceMapURL,"updateTask");a.s(["updateTask",0,c])}];
1
+ module.exports=[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,a=>{"use strict";let b=(0,a.i(711796).default)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);a.s(["Square",0,b],300141);var c=a.i(728778),d=a.i(374637),e=a.i(10390),f=a.i(442620),g=a.i(811344),h=a.i(394869),i=a.i(207339),j=a.i(704494),k=a.i(699570),l=a.i(579834),m=a.i(786304),n=a.i(814574),o=a.i(429246),p=a.i(951192);function q({patchState:a,isLargeFold:b,onLoad:d}){let{t:e}=(0,p.useI18n)();return b?(0,c.jsxs)("div",{className:"flex flex-col items-center justify-center gap-1 py-6",children:[(0,c.jsx)(k.Button,{variant:"link",onClick:d,className:"h-auto p-0 text-sm",children:e("diff.loadDiff")}),(0,c.jsx)("span",{className:"text-xs text-muted-foreground",children:e("diff.foldedLarge")})]}):a&&"loading"!==a.kind?"error"===a.kind?(0,c.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,c.jsx)("span",{children:e("diff.loadFailed")}),(0,c.jsx)(k.Button,{variant:"ghost",onClick:d,children:e("diff.retry")})]}):"binary"===a.kind?(0,c.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.binaryNotShown")}):"empty"===a.kind?(0,c.jsx)("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:e("diff.noChanges")}):(0,c.jsx)(r,{patch:a.patch??""}):(0,c.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,c.jsx)(j.Loader2,{className:"h-5 w-5 animate-spin text-muted-foreground"})})}function r({patch:a}){let{t:b}=(0,p.useI18n)(),d=a.split("\n"),e=d.length>500,f=e?d.slice(0,500):d;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("pre",{className:"overflow-x-auto p-0 text-xs font-mono leading-5",children:f.map((a,b)=>{let d=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,c.jsx)("span",{className:d,children:a||" "},b)})}),e&&(0,c.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(d.length)})})]})}a.s(["TaskDiffView",0,function({taskId:a,files:b,totalAdded:j,totalRemoved:r,hasConflicts:s,conflictFiles:t,onCommit:u,hasUncommitted:v}){let{t:w}=(0,p.useI18n)(),[x,y]=(0,d.useState)(new Set),[z,A]=(0,d.useState)(new Map),[B,C]=(0,d.useState)(!1),[D,E]=(0,d.useState)(""),[F,G]=(0,d.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,c.jsxs)("div",{className:"flex flex-col h-full",children:[(0,c.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3 flex-shrink-0",children:[(0,c.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,c.jsxs)("span",{className:"font-medium text-foreground",children:[b.length," files changed"]}),(0,c.jsxs)("span",{className:"text-green-400 font-mono text-xs",children:["+",j]}),(0,c.jsxs)("span",{className:"text-red-400 font-mono text-xs",children:["-",r]})]}),(0,c.jsx)("div",{className:"flex items-center gap-2",children:v&&u&&(0,c.jsxs)(k.Button,{variant:"outline",onClick:()=>C(!0),className:"gap-2",children:[(0,c.jsx)(i.GitCommitHorizontal,{className:"h-4 w-4"}),w("diff.commit")]})})]}),s&&(0,c.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,c.jsxs)("div",{className:"flex items-center gap-2 text-amber-400",children:[(0,c.jsx)(g.AlertTriangle,{className:"h-4 w-4 flex-shrink-0"}),(0,c.jsxs)("span",{className:"text-sm font-medium",children:["Merge blocked: ",t.length," conflicting file",1!==t.length?"s":""]})]}),(0,c.jsx)("ul",{className:"ml-6 space-y-1",children:t.map(a=>(0,c.jsx)("li",{className:"text-xs font-mono text-amber-300/80",children:a},a))})]}),(0,c.jsx)("div",{className:"flex-1 overflow-auto",children:0===b.length?(0,c.jsx)(l.EmptyState,{icon:h.GitCompare,title:w("diff.noChanges"),className:"h-full"}):(0,c.jsx)("div",{className:"divide-y divide-border",children:b.map(a=>{let b=x.has(a.filename),d=z.get(a.filename),g=a.added+a.removed;return(0,c.jsxs)("div",{children:[(0,c.jsxs)(k.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,c.jsx)(f.ChevronDown,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}):(0,c.jsx)(e.ChevronRight,{className:"h-3.5 w-3.5 flex-shrink-0 text-muted-foreground"}),(0,c.jsx)("span",{className:"flex-1 truncate text-sm font-mono text-foreground",children:a.filename}),a.isBinary?(0,c.jsx)(m.Badge,{variant:"secondary",className:"text-[10px] bg-muted text-muted-foreground border border-border",children:w("diff.binary")}):(0,c.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,c.jsxs)("span",{className:"text-xs font-mono text-green-400",children:["+",a.added]}),(0,c.jsxs)("span",{className:"text-xs font-mono text-red-400",children:["-",a.removed]})]})]}),b&&!a.isBinary&&(0,c.jsx)("div",{className:"border-t border-border bg-background",children:(0,c.jsx)(q,{filename:a.filename,patchState:d,isLargeFold:!d&&g>200,onLoad:()=>H(a.filename)})})]},a.filename)})})}),(0,c.jsx)(n.Dialog,{open:B,onOpenChange:C,children:(0,c.jsxs)(n.DialogContent,{className:"max-w-md",children:[(0,c.jsx)(n.DialogHeader,{children:(0,c.jsx)(n.DialogTitle,{children:w("diff.commitChanges")})}),(0,c.jsx)("div",{className:"flex flex-col gap-3",children:(0,c.jsx)(o.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,c.jsxs)(n.DialogFooter,{children:[(0,c.jsx)(k.Button,{variant:"ghost",onClick:()=>C(!1),children:w("common.cancel")}),(0,c.jsx)(k.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)},870243,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40fcbdd25f7ffbf65ef1e764bec9f7555bc5224ee8",b.callServer,void 0,b.findSourceMapURL,"getTaskExecutions");a.s(["getTaskExecutions",0,c])},439516,522625,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("7c561eb8a34485679a353d7aa9c6c93b55caf3c279",b.callServer,void 0,b.findSourceMapURL,"startPtyExecutionSafe");a.s(["startPtyExecutionSafe",0,c],439516);let d=(0,b.createServerReference)("40ebcb2acc9d7ae9814881df6334f2e4042bd07ff1",b.callServer,void 0,b.findSourceMapURL,"continueLatestPtyExecution");a.s(["continueLatestPtyExecution",0,d],522625)},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)})]})}])},936468,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("6071378a52322d69d1d855a654f44350019f55ad75",b.callServer,void 0,b.findSourceMapURL,"updateTask");a.s(["updateTask",0,c])}];
2
2
 
3
- //# sourceMappingURL=_0q2pep_._.js.map
3
+ //# sourceMappingURL=_02mcoex._.js.map
@@ -0,0 +1,3 @@
1
+ module.exports=[171514,a=>{"use strict";var b=a.i(244256),c=a.i(495370),d=a.i(827981),e=a.i(980999),f=a.i(101844),g=a.i(491890),h=a.i(748383),i=a.i(563736),j=a.i(4634);a.s([],527308),a.i(527308),a.s(["004cbab2b0471abdbcfcc5ef54e684df499d08b135",()=>j.getOnboardingStatus,"0056908f664e1cfc956a914cdb7e860a14e02a1a68",()=>i.listAllExtensionStatus,"00b93da732303a83722bd916c65267329745912186",()=>e.getActualWsPort,"00f3a5ac6d0359935f53136426cb705d31add6dfce",()=>b.getWorkspacesWithProjects,"400e98afbf4be9265fb00eb09ee7003b696f2a2e65",()=>g.getProductGroups,"402f1c8fea387ae3e4b8b95a7585573fa8e977f439",()=>i.installExtension,"403bbb3a0c4e5987756db5b8775884827c4f3dee27",()=>i.uninstallExtension,"406473195132668ce9f5012a6ba1be75726c26c67e",()=>g.createProductGroup,"40679167b977a899bb5e92182c20234d20acfa9786",()=>h.getVersionsForPicker,"4069cb12fc0a4402d5562cdb8d9ff6471eee7db186",()=>e.resolveGitLocalPathWithSource,"40754cf5b6c66131775e7b7110bda058637e4154fc",()=>f.checkMigrationSafety,"4080b7c93be76dae986f6275ea896a09088e9822ba",()=>c.deleteLabel,"408b0b902f8e30950bae165365050794717fcfbf4d",()=>j.dispatchTaskCompletionEvent,"408dfa4996a800c25f14c60104920161daea7bfa95",()=>b.reorderWorkspaces,"409514d2e6ba0203c3eef2ce4c33c92eda1ac6df5b",()=>j.setOnboardingProgress,"40b0f9516a5d0a08eb43d0676e627fc6fe9fe50a1a",()=>b.createProject,"40b2454e5a6e7279a521ca122e07c0cd09921f168e",()=>b.deleteWorkspace,"40bdf69eb4e028eade59c9767eb683c9fb6b4f6b8f",()=>i.checkExtension,"40c81ae66fb2ac3dd2e0eaeb48b9679649a1db7316",()=>e.resolveGitLocalPath,"40d067b565f43c671ffdfc1085c9b0d4e9e8ecea72",()=>c.createLabel,"40d83973e43b58905a590e6e82361b1dd9c6de3fe9",()=>e.getConfigValues,"40e5b166685c935cb04b28ab1d5e039878b35e11da",()=>c.getLabelsForWorkspace,"40f1e601320b4b90d15cada0795af8373777f5ae7e",()=>b.createWorkspace,"6001484b600fdf5a61d003498751d8a8d6d8c8bd73",()=>f.migrateProjectPath,"60142d3511951329d3e470987027ec7fc4e43f8477",()=>d.globalSearch,"601e7d7ae616cc21a01819f777ca5d40bb12b2bbd6",()=>e.setConfigValue,"6021f728b947809f3764db1dcdeb0c25f933a3a0c5",()=>b.updateWorkspace,"6031d4e7ada91646ecb2f99fe9cd65e9da30957c74",()=>f.analyzeProjectDirectory,"6074118a8dceb454a2fcacbfbb05530a32522be2d7",()=>g.setProjectGroup,"607eaa281a5072d41ad4d099e8ccafb2d5e0da2b19",()=>j.setOnboardingExtensions,"60a4ada82f71564fac6a21d2e1acd2b54d08785d4f",()=>j.completeOnboarding,"60ce39e32c91bb6f8bbfcd28b776e54cfeabe8c9f7",()=>e.getConfigValue],171514)},76052,a=>{a.v(b=>Promise.all(["server/chunks/ssr/src_lib_0cb~2g1._.js"].map(b=>a.l(b))).then(()=>b(492067)))},98813,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[root-of-the-server]__0e79g0v._.js"].map(b=>a.l(b))).then(()=>b(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]__0odoa97._.js"].map(b=>a.l(b))).then(()=>b(897667)))}];
2
+
3
+ //# sourceMappingURL=_02t7f2_._.js.map
@@ -1,3 +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"])},757942,950314,a=>{"use strict";var b=a.i(90393);a.s([],757942),a.s(["Streamdown",()=>b.C],950314)},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")})})]})})}])},497488,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("407e209030abeb6675e3ada470cba988bc50a35fd4",b.callServer,void 0,b.findSourceMapURL,"createTask");a.s(["createTask",0,c])},712226,872312,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("40b2033149d12fdc47fc98d1590cd1043d0e262161",b.callServer,void 0,b.findSourceMapURL,"getTaskNotes");a.s(["getTaskNotes",0,c],712226);let d=(0,b.createServerReference)("40c4d22109803aff540f854a0d4cf141904829c308",b.callServer,void 0,b.findSourceMapURL,"getTaskAssets");a.s(["getTaskAssets",0,d],872312)},113047,977033,599767,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)("404d73151acdbb426096c2c26a3806d03ea98d7d81",c.callServer,void 0,c.findSourceMapURL,"getProjectBranches");a.s(["getProjectBranches",0,d],977033);let e=(0,c.createServerReference)("40801c6bd3944fa5bac78a08de736f8bdc2afbc617",c.callServer,void 0,c.findSourceMapURL,"fetchRemoteBranches");a.s(["fetchRemoteBranches",0,e],599767)},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(977033),q=a.i(599767),r=a.i(780410);let s=(0,r.createServerReference)("40c7a93795b41734e8b19cb43ad317ceb3b9a5e8f3",r.callServer,void 0,r.findSourceMapURL,"getCurrentBranch");var t=a.i(111699);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)},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)},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})})()})]})})}])},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}])},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)}];
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"])},757942,950314,a=>{"use strict";var b=a.i(90393);a.s([],757942),a.s(["Streamdown",()=>b.C],950314)},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")})})]})})}])},665518,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("4058ae66cd921be7558aa21e5fac3c2e2103bac0f7",b.callServer,void 0,b.findSourceMapURL,"createTask");a.s(["createTask",0,c])},927999,841106,a=>{"use strict";var b=a.i(780410);let c=(0,b.createServerReference)("4046f529e8c428e2241817be901d5bb40af934ed33",b.callServer,void 0,b.findSourceMapURL,"getTaskNotes");a.s(["getTaskNotes",0,c],927999);let d=(0,b.createServerReference)("40722929cf9ba9b7a74ecc35294448e155ae0fa1c6",b.callServer,void 0,b.findSourceMapURL,"getTaskAssets");a.s(["getTaskAssets",0,d],841106)},113047,828317,297318,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)("40a3fc966955de0833a4419f273a94ba4ab8422f3c",c.callServer,void 0,c.findSourceMapURL,"getProjectBranches");a.s(["getProjectBranches",0,d],828317);let e=(0,c.createServerReference)("4089ab7c3cf5ebfe89a4c928fc5ea86b3e5ebc72e8",c.callServer,void 0,c.findSourceMapURL,"fetchRemoteBranches");a.s(["fetchRemoteBranches",0,e],297318)},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(828317),q=a.i(297318),r=a.i(780410);let s=(0,r.createServerReference)("408c226fa5c96e9fdf1704a52fd380683317c6dc45",r.callServer,void 0,r.findSourceMapURL,"getCurrentBranch");var t=a.i(899896);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)},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)},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})})()})]})})}])},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}])},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)}];
2
2
 
3
- //# sourceMappingURL=_0gomvsp._.js.map
3
+ //# sourceMappingURL=_04brhyt._.js.map
@@ -40,4 +40,4 @@ diff(可能已截断):
40
40
  ${a.diffText??"(无 diff)"}
41
41
  \`\`\``,e=(0,c.existsSync)(a.cwd)?a.cwd:process.cwd(),g=await (0,f.aiQuery)(d,e,{maxTurns:1});if(g){let a=g.replace(/^[#*\->"'\s]+/,"").trim();if(a)return a}var h=a.commitLog;if(!h)return null;let i=h.split("\n").filter(Boolean);if(0===i.length)return null;let j=i[0].replace(/^[a-f0-9]+\s+/,"");return 1===i.length?j:`${i.length} 个提交:${j}`}async function m(a,b={}){let c=b.kind??"done",f=null;try{f=await k(a)}catch(a){console.error("[captureTaskOverview] Failed to gather change data:",a);return}if(!f)return void console.error(`[captureTaskOverview] No changes for task=${a.slice(0,8)} — skip`);let g=f;(async()=>{try{let b=await l(g),f=new Date().toISOString(),h=function(a,b,c,d="done"){let e=[];if(e.push("cancelled"===d?"> 本笔记由任务取消时自动生成,记录已产生的改动,作为下次重启该任务的参考经验。":"> 本笔记由任务完成时自动生成,记录本次任务的改动概览,便于后续复盘与排查。"),e.push(""),e.push("## 改动摘要"),e.push(b??"(未能生成改动摘要)"),e.push(""),e.push("## 文件清单"),a.files.length>0){let b=a.files.slice(0,100);for(let a of b)e.push(a.isBinary?`- \`${a.filename}\`(二进制)`:`- \`${a.filename}\` (+${a.added} / -${a.removed})`);a.files.length>b.length&&e.push(`- …其余 ${a.files.length-b.length} 个文件`),e.push(""),e.push(`共 ${a.files.length} 个文件、${a.commitCount} 个提交。`)}else e.push(`(未能获取精确文件清单,本次约 ${a.commitCount} 个提交。)`);if(e.push(""),e.push("## 相关附件与参考资料"),a.assets.length>0)for(let b of a.assets)e.push(b.description?`- ${b.filename} — ${b.description}`:`- ${b.filename}`);else e.push("(无)");return e.push(""),e.push("---"),e.push(`> 关联任务:${a.taskTitle} (\`${a.taskId}\`)`),e.push(`> 项目:${a.projectName}`),e.push(`> 生成时间:${c}`),e.join("\n")}(g,b,f,c),j=function(a,b="done"){return`${"cancelled"===b?"任务概览(已取消):":"任务概览:"}${a}`.slice(0,200)}(g.taskTitle,c),k=await d.db.projectNote.create({data:{title:j,content:h,category:i.TASK_OVERVIEW_CATEGORY,projectId:g.projectId,taskId:g.taskId}});await (0,e.syncNoteToFts)(d.db,{id:k.id,title:k.title,content:k.content}),console.error(`[captureTaskOverview] Note created: ${k.id} for task=${a.slice(0,8)}`)}catch(a){console.error("[captureTaskOverview] Failed to create overview note:",a)}})()}a.s(["captureTaskOverview",0,m],941750)},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)))}];
42
42
 
43
- //# sourceMappingURL=_1118hto._.js.map
43
+ //# sourceMappingURL=_08b3kyv._.js.map