@ai-development-environment/server 0.0.29 → 0.0.31

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 (357) hide show
  1. package/package.json +1 -1
  2. package/prisma-runtime/prisma/migrations/20260719010000_add_build_reports/migration.sql +29 -0
  3. package/prisma-runtime/prisma/schema.prisma +23 -0
  4. package/standalone/.next/BUILD_ID +1 -1
  5. package/standalone/.next/app-path-routes-manifest.json +3 -0
  6. package/standalone/.next/build-manifest.json +6 -6
  7. package/standalone/.next/prerender-manifest.json +3 -3
  8. package/standalone/.next/routes-manifest.json +26 -0
  9. package/standalone/.next/server/app/[locale]/actions/page/build-manifest.json +3 -3
  10. package/standalone/.next/server/app/[locale]/actions/page.js.nft.json +1 -1
  11. package/standalone/.next/server/app/[locale]/actions/page_client-reference-manifest.js +1 -1
  12. package/standalone/.next/server/app/[locale]/agents/[id]/page/build-manifest.json +3 -3
  13. package/standalone/.next/server/app/[locale]/agents/[id]/page.js.nft.json +1 -1
  14. package/standalone/.next/server/app/[locale]/agents/[id]/page_client-reference-manifest.js +1 -1
  15. package/standalone/.next/server/app/[locale]/agents/page/build-manifest.json +3 -3
  16. package/standalone/.next/server/app/[locale]/agents/page.js.nft.json +1 -1
  17. package/standalone/.next/server/app/[locale]/agents/page_client-reference-manifest.js +1 -1
  18. package/standalone/.next/server/app/[locale]/build-data/page/build-manifest.json +3 -3
  19. package/standalone/.next/server/app/[locale]/build-data/page.js.nft.json +1 -1
  20. package/standalone/.next/server/app/[locale]/build-data/page_client-reference-manifest.js +1 -1
  21. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page/app-paths-manifest.json +3 -0
  22. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page/build-manifest.json +16 -0
  23. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page/next-font-manifest.json +11 -0
  24. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page/react-loadable-manifest.json +1 -0
  25. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page/server-reference-manifest.json +4 -0
  26. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page.js +16 -0
  27. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page.js.map +5 -0
  28. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page.js.nft.json +1 -0
  29. package/standalone/.next/server/app/[locale]/builds/[buildId]/coverage/page_client-reference-manifest.js +3 -0
  30. package/standalone/.next/server/app/[locale]/builds/[buildId]/page/build-manifest.json +3 -3
  31. package/standalone/.next/server/app/[locale]/builds/[buildId]/page.js.nft.json +1 -1
  32. package/standalone/.next/server/app/[locale]/builds/[buildId]/page_client-reference-manifest.js +1 -1
  33. package/standalone/.next/server/app/[locale]/builds/page/build-manifest.json +3 -3
  34. package/standalone/.next/server/app/[locale]/builds/page.js.nft.json +1 -1
  35. package/standalone/.next/server/app/[locale]/builds/page_client-reference-manifest.js +1 -1
  36. package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page/build-manifest.json +3 -3
  37. package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page.js.nft.json +1 -1
  38. package/standalone/.next/server/app/[locale]/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
  39. package/standalone/.next/server/app/[locale]/codebases/page/build-manifest.json +3 -3
  40. package/standalone/.next/server/app/[locale]/codebases/page.js.nft.json +1 -1
  41. package/standalone/.next/server/app/[locale]/codebases/page_client-reference-manifest.js +1 -1
  42. package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page/build-manifest.json +3 -3
  43. package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page.js.nft.json +1 -1
  44. package/standalone/.next/server/app/[locale]/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
  45. package/standalone/.next/server/app/[locale]/comments/page/build-manifest.json +3 -3
  46. package/standalone/.next/server/app/[locale]/comments/page.js.nft.json +1 -1
  47. package/standalone/.next/server/app/[locale]/comments/page_client-reference-manifest.js +1 -1
  48. package/standalone/.next/server/app/[locale]/jira/cache/page/build-manifest.json +3 -3
  49. package/standalone/.next/server/app/[locale]/jira/cache/page.js.nft.json +1 -1
  50. package/standalone/.next/server/app/[locale]/jira/cache/page_client-reference-manifest.js +1 -1
  51. package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page/build-manifest.json +3 -3
  52. package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page.js.nft.json +1 -1
  53. package/standalone/.next/server/app/[locale]/jira/cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  54. package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page/build-manifest.json +3 -3
  55. package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page.js.nft.json +1 -1
  56. package/standalone/.next/server/app/[locale]/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  57. package/standalone/.next/server/app/[locale]/jira/tickets/page/build-manifest.json +3 -3
  58. package/standalone/.next/server/app/[locale]/jira/tickets/page.js.nft.json +1 -1
  59. package/standalone/.next/server/app/[locale]/jira/tickets/page_client-reference-manifest.js +1 -1
  60. package/standalone/.next/server/app/[locale]/jobs/[jobId]/page/build-manifest.json +3 -3
  61. package/standalone/.next/server/app/[locale]/jobs/[jobId]/page.js.nft.json +1 -1
  62. package/standalone/.next/server/app/[locale]/jobs/[jobId]/page_client-reference-manifest.js +1 -1
  63. package/standalone/.next/server/app/[locale]/page/build-manifest.json +3 -3
  64. package/standalone/.next/server/app/[locale]/page.js.nft.json +1 -1
  65. package/standalone/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
  66. package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page/build-manifest.json +3 -3
  67. package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page.js.nft.json +1 -1
  68. package/standalone/.next/server/app/[locale]/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
  69. package/standalone/.next/server/app/[locale]/pull-requests/page/build-manifest.json +3 -3
  70. package/standalone/.next/server/app/[locale]/pull-requests/page.js.nft.json +1 -1
  71. package/standalone/.next/server/app/[locale]/pull-requests/page_client-reference-manifest.js +1 -1
  72. package/standalone/.next/server/app/[locale]/settings/page/build-manifest.json +3 -3
  73. package/standalone/.next/server/app/[locale]/settings/page.js.nft.json +1 -1
  74. package/standalone/.next/server/app/[locale]/settings/page_client-reference-manifest.js +1 -1
  75. package/standalone/.next/server/app/[locale]/skills/[skillId]/page/build-manifest.json +3 -3
  76. package/standalone/.next/server/app/[locale]/skills/[skillId]/page.js.nft.json +1 -1
  77. package/standalone/.next/server/app/[locale]/skills/[skillId]/page_client-reference-manifest.js +1 -1
  78. package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page/build-manifest.json +3 -3
  79. package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page.js.nft.json +1 -1
  80. package/standalone/.next/server/app/[locale]/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
  81. package/standalone/.next/server/app/[locale]/skills/groups/page/build-manifest.json +3 -3
  82. package/standalone/.next/server/app/[locale]/skills/groups/page.js.nft.json +1 -1
  83. package/standalone/.next/server/app/[locale]/skills/groups/page_client-reference-manifest.js +1 -1
  84. package/standalone/.next/server/app/[locale]/skills/page/build-manifest.json +3 -3
  85. package/standalone/.next/server/app/[locale]/skills/page.js.nft.json +1 -1
  86. package/standalone/.next/server/app/[locale]/skills/page_client-reference-manifest.js +1 -1
  87. package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page/build-manifest.json +3 -3
  88. package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page.js.nft.json +1 -1
  89. package/standalone/.next/server/app/[locale]/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
  90. package/standalone/.next/server/app/[locale]/tools/page/build-manifest.json +3 -3
  91. package/standalone/.next/server/app/[locale]/tools/page.js.nft.json +1 -1
  92. package/standalone/.next/server/app/[locale]/tools/page_client-reference-manifest.js +1 -1
  93. package/standalone/.next/server/app/[locale]/usage/page/build-manifest.json +3 -3
  94. package/standalone/.next/server/app/[locale]/usage/page.js.nft.json +1 -1
  95. package/standalone/.next/server/app/[locale]/usage/page_client-reference-manifest.js +1 -1
  96. package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page/build-manifest.json +3 -3
  97. package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page.js.nft.json +1 -1
  98. package/standalone/.next/server/app/[locale]/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
  99. package/standalone/.next/server/app/[locale]/worktrees/page/build-manifest.json +3 -3
  100. package/standalone/.next/server/app/[locale]/worktrees/page.js.nft.json +1 -1
  101. package/standalone/.next/server/app/[locale]/worktrees/page_client-reference-manifest.js +1 -1
  102. package/standalone/.next/server/app/_global-error/page/build-manifest.json +3 -3
  103. package/standalone/.next/server/app/_global-error.html +1 -1
  104. package/standalone/.next/server/app/_global-error.rsc +1 -1
  105. package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  106. package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  107. package/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  108. package/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  109. package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  110. package/standalone/.next/server/app/_not-found/page/build-manifest.json +3 -3
  111. package/standalone/.next/server/app/_not-found.html +1 -1
  112. package/standalone/.next/server/app/_not-found.rsc +1 -1
  113. package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  114. package/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  115. package/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  116. package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  117. package/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  118. package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  119. package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js +1 -1
  120. package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js.nft.json +1 -1
  121. package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route/app-paths-manifest.json +3 -0
  122. package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route/build-manifest.json +9 -0
  123. package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route/server-reference-manifest.json +4 -0
  124. package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route.js +11 -0
  125. package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route.js.map +5 -0
  126. package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route.js.nft.json +1 -0
  127. package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route_client-reference-manifest.js +3 -0
  128. package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/route.js +4 -3
  129. package/standalone/.next/server/app/api/builds/[buildId]/artifacts/[artifactId]/route.js.nft.json +1 -1
  130. package/standalone/.next/server/app/api/codebases/by-path/route.js.nft.json +1 -1
  131. package/standalone/.next/server/app/api/codebases/route.js.nft.json +1 -1
  132. package/standalone/.next/server/app/api/graphql/route.js.nft.json +1 -1
  133. package/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  134. package/standalone/.next/server/app/api/tools/call/route.js.nft.json +1 -1
  135. package/standalone/.next/server/app/api/tools/catalog/route.js.nft.json +1 -1
  136. package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route/app-paths-manifest.json +3 -0
  137. package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route/build-manifest.json +9 -0
  138. package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route/server-reference-manifest.json +4 -0
  139. package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route.js +10 -0
  140. package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route.js.map +5 -0
  141. package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route.js.nft.json +1 -0
  142. package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route_client-reference-manifest.js +3 -0
  143. package/standalone/.next/server/app-paths-manifest.json +3 -0
  144. package/standalone/.next/server/chunks/07_e_builds_[buildId]_artifacts_[artifactId]_manifest_plist_route_actions_18mzaf3.js +3 -0
  145. package/standalone/.next/server/chunks/1oeh_server_app_api_worktrees_[worktreeId]_diff-image_route_actions_0nie5n3.js +3 -0
  146. package/standalone/.next/server/chunks/[root-of-the-server]__08mnmfs._.js +3 -0
  147. package/standalone/.next/server/chunks/[root-of-the-server]__0906ea6._.js +3 -0
  148. package/standalone/.next/server/chunks/{[root-of-the-server]__0-ypkf7._.js → [root-of-the-server]__09v6swg._.js} +1 -1
  149. package/standalone/.next/server/chunks/{[root-of-the-server]__1wtng3p._.js → [root-of-the-server]__0aiyd05._.js} +1 -1
  150. package/standalone/.next/server/chunks/{[root-of-the-server]__09skp6r._.js → [root-of-the-server]__0cz4ap5._.js} +1 -1
  151. package/standalone/.next/server/chunks/[root-of-the-server]__0nvcazp._.js +3 -0
  152. package/standalone/.next/server/chunks/[root-of-the-server]__12807ia._.js +3 -0
  153. package/standalone/.next/server/chunks/[root-of-the-server]__15_clsj._.js +3 -0
  154. package/standalone/.next/server/chunks/[root-of-the-server]__1csx222._.js +3 -0
  155. package/standalone/.next/server/chunks/[root-of-the-server]__1ix62p0._.js +122 -0
  156. package/standalone/.next/server/chunks/[root-of-the-server]__1j-hk6b._.js +3 -0
  157. package/standalone/.next/server/chunks/{[root-of-the-server]__15aat79._.js → [root-of-the-server]__1j0u03u._.js} +1 -1
  158. package/standalone/.next/server/chunks/{[root-of-the-server]__0c02fce._.js → [root-of-the-server]__1oa-sy6._.js} +2 -2
  159. package/standalone/.next/server/chunks/[root-of-the-server]__1qmvsu_._.js +3 -0
  160. package/standalone/.next/server/chunks/[root-of-the-server]__1vxtcsq._.js +3 -0
  161. package/standalone/.next/server/chunks/[root-of-the-server]__1w59u6o._.js +3 -0
  162. package/standalone/.next/server/chunks/[root-of-the-server]__1z-3x8k._.js +3 -0
  163. package/standalone/.next/server/chunks/_0exkna-._.js +193 -8
  164. package/standalone/.next/server/chunks/_0jurkow._.js +1 -1
  165. package/standalone/.next/server/chunks/_0rx5rfm._.js +1 -1
  166. package/standalone/.next/server/chunks/_0tufgj0._.js +263 -78
  167. package/standalone/.next/server/chunks/_0w2eghf._.js +193 -8
  168. package/standalone/.next/server/chunks/_152rnkf._.js +17 -17
  169. package/standalone/.next/server/chunks/_16x77b_._.js +1 -1
  170. package/standalone/.next/server/chunks/_1dbqy8c._.js +17 -17
  171. package/standalone/.next/server/chunks/_1vrixpc._.js +17 -17
  172. package/standalone/.next/server/chunks/_1yfz-9u._.js +17 -17
  173. package/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_08x37wy.js +6 -0
  174. package/standalone/.next/server/chunks/node_modules_next_dist_esm_build_templates_app-route_0eghv0a.js +3 -0
  175. package/standalone/.next/server/chunks/src_0o4-snj._.js +1 -1
  176. package/standalone/.next/server/chunks/ssr/1oeh_server_app_[locale]_builds_[buildId]_coverage_page_actions_20i_0zd.js +3 -0
  177. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__08bbv6z._.js +9 -0
  178. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ckj6wg._.js +13 -0
  179. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0eit075._.js +3 -0
  180. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qy28ku._.js +3 -0
  181. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0tsac-e._.js +15 -0
  182. package/standalone/.next/server/chunks/ssr/{_19fwji0._.js → [root-of-the-server]__0uo4dhz._.js} +2 -2
  183. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__15v1geo._.js +3 -0
  184. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__1qm_j4s._.js +3 -0
  185. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__1s6_fta._.js +3 -0
  186. package/standalone/.next/server/chunks/ssr/_0-o77zz._.js +3 -0
  187. package/standalone/.next/server/chunks/ssr/_00m30gw._.js +3 -0
  188. package/standalone/.next/server/chunks/ssr/_03961l6._.js +3 -0
  189. package/standalone/.next/server/chunks/ssr/{_00ye62k._.js → _08q5hnx._.js} +2 -2
  190. package/standalone/.next/server/chunks/ssr/_093--4s._.js +3 -0
  191. package/standalone/.next/server/chunks/ssr/{_1kaz2gq._.js → _09lh67h._.js} +2 -2
  192. package/standalone/.next/server/chunks/ssr/_0a1ligo._.js +3 -0
  193. package/standalone/.next/server/chunks/ssr/{_1h3p6oi._.js → _0cw_tqx._.js} +2 -2
  194. package/standalone/.next/server/chunks/ssr/_0dq-84j._.js +22 -0
  195. package/standalone/.next/server/chunks/ssr/_0dy1ovj._.js +3 -0
  196. package/standalone/.next/server/chunks/ssr/_0ezo890._.js +3 -0
  197. package/standalone/.next/server/chunks/ssr/{_1_1j9nd._.js → _0id1774._.js} +3 -3
  198. package/standalone/.next/server/chunks/ssr/_0j48up8._.js +1 -1
  199. package/standalone/.next/server/chunks/ssr/_0nhtqty._.js +1 -1
  200. package/standalone/.next/server/chunks/ssr/_0oh246z._.js +3 -0
  201. package/standalone/.next/server/chunks/ssr/_0q8sy0w._.js +3 -0
  202. package/standalone/.next/server/chunks/ssr/_0qra30j._.js +3 -0
  203. package/standalone/.next/server/chunks/ssr/_0t2jwg3._.js +109 -0
  204. package/standalone/.next/server/chunks/ssr/{_1zyjq9y._.js → _0ufkrvm._.js} +2 -2
  205. package/standalone/.next/server/chunks/ssr/{_07tglcd._.js → _0vjihfb._.js} +2 -10
  206. package/standalone/.next/server/chunks/ssr/_0xh-lyy._.js +3 -0
  207. package/standalone/.next/server/chunks/ssr/_15erjna._.js +3 -0
  208. package/standalone/.next/server/chunks/ssr/_17a3xuq._.js +3 -0
  209. package/standalone/.next/server/chunks/ssr/_17p59oz._.js +1 -1
  210. package/standalone/.next/server/chunks/ssr/_1bzibio._.js +109 -0
  211. package/standalone/.next/server/chunks/ssr/{_12ws_f2._.js → _1c2fde9._.js} +2 -2
  212. package/standalone/.next/server/chunks/ssr/{_0mr9u9p._.js → _1dnm1d4._.js} +2 -2
  213. package/standalone/.next/server/chunks/ssr/_1ekznx8._.js +3 -0
  214. package/standalone/.next/server/chunks/ssr/{_1r2rmfp._.js → _1f5k6bj._.js} +2 -2
  215. package/standalone/.next/server/chunks/ssr/_1k1tyz4._.js +3 -0
  216. package/standalone/.next/server/chunks/ssr/_1och_zk._.js +3 -0
  217. package/standalone/.next/server/chunks/ssr/{_0xrpdyy._.js → _1tpguta._.js} +2 -2
  218. package/standalone/.next/server/chunks/ssr/_1v1lo7c._.js +3 -0
  219. package/standalone/.next/server/chunks/ssr/_1vv-dg-._.js +3 -0
  220. package/standalone/.next/server/chunks/ssr/_1zgu74l._.js +1 -1
  221. package/standalone/.next/server/chunks/ssr/messages_de_json_[json]_cjs_1uig1ud._.js +1 -1
  222. package/standalone/.next/server/chunks/ssr/messages_en_json_[json]_cjs_206072-._.js +1 -1
  223. package/standalone/.next/server/chunks/ssr/messages_es_json_[json]_cjs_082yukd._.js +1 -1
  224. package/standalone/.next/server/chunks/ssr/messages_fr_json_[json]_cjs_0j6-w0i._.js +1 -1
  225. package/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1uzalot.js +4 -0
  226. package/standalone/.next/server/chunks/ssr/src_components_builds_build-detail-page_tsx_0q1lvps._.js +25 -9
  227. package/standalone/.next/server/chunks/ssr/src_components_builds_coverage-report-page_tsx_1nhwba1._.js +11 -0
  228. package/standalone/.next/server/chunks/ssr/src_components_codebases_repository-detail-page_tsx_20_7wk_._.js +5 -5
  229. package/standalone/.next/server/chunks/ssr/src_components_jira_cache-page_tsx_1znt1yl._.js +1 -1
  230. package/standalone/.next/server/chunks/ssr/src_components_skills_skill-sync-page_tsx_15sidhb._.js +1 -1
  231. package/standalone/.next/server/chunks/ssr/src_components_skills_skills-page_tsx_0o1nlbg._.js +3 -3
  232. package/standalone/.next/server/chunks/ssr/src_components_worktrees_worktree-detail-page_tsx_1oexgu_._.js +13 -5
  233. package/standalone/.next/server/functions-config-manifest.json +7 -1
  234. package/standalone/.next/server/middleware-build-manifest.js +6 -6
  235. package/standalone/.next/server/next-font-manifest.js +1 -1
  236. package/standalone/.next/server/next-font-manifest.json +4 -0
  237. package/standalone/.next/server/pages/404.html +1 -1
  238. package/standalone/.next/server/pages/500.html +1 -1
  239. package/standalone/.next/server/server-reference-manifest.js +1 -1
  240. package/standalone/.next/server/server-reference-manifest.json +1 -1
  241. package/standalone/.next/static/chunks/08ujwkhzkokhf.js +1 -0
  242. package/standalone/.next/static/chunks/{16tfdsma_h0r5.js → 0a82bgw37ev__.js} +1 -1
  243. package/standalone/.next/static/chunks/0cw4z7_m01m5f.js +31 -0
  244. package/standalone/.next/static/chunks/0emxr8tr7kji0.js +33 -0
  245. package/standalone/.next/static/chunks/0h8zu6aywqh1-.js +27 -0
  246. package/standalone/.next/static/chunks/0hwbkceik59kx.js +35 -0
  247. package/standalone/.next/static/chunks/0mq066ue0yufb.js +7 -0
  248. package/standalone/.next/static/chunks/0ng892ycfzv2q.js +1 -0
  249. package/standalone/.next/static/chunks/0tgtji0dbbefa.js +107 -0
  250. package/standalone/.next/static/chunks/15_8kla24ff9f.js +1 -0
  251. package/standalone/.next/static/chunks/16-l4kp9o217d.js +1 -0
  252. package/standalone/.next/static/chunks/175269y15-grc.js +48 -0
  253. package/standalone/.next/static/chunks/1c7ci5ai5qyfo.js +1 -0
  254. package/standalone/.next/static/chunks/1egccqmgk3kbi.js +1 -0
  255. package/standalone/.next/static/chunks/1gwvywh0e6i17.js +3 -0
  256. package/standalone/.next/static/chunks/1hehq94hslvbl.js +7 -0
  257. package/standalone/.next/static/chunks/1k5cw41bd4e5r.js +51 -0
  258. package/standalone/.next/static/chunks/{2rjf8o4g23no8.js → 1mprxk0uebv70.js} +1 -1
  259. package/standalone/.next/static/chunks/1rus13s58mkxy.js +1 -0
  260. package/standalone/.next/static/chunks/{2fzxwi39odugq.js → 1rwqeg_l_plzt.js} +1 -1
  261. package/standalone/.next/static/chunks/1u_jwc-bo10k3.js +1 -0
  262. package/standalone/.next/static/chunks/1w_zvfx_jdyv_.js +29 -0
  263. package/standalone/.next/static/chunks/2-wrd12dmwbo-.js +1 -0
  264. package/standalone/.next/static/chunks/208k3moxxd_53.js +51 -0
  265. package/standalone/.next/static/chunks/23kut2_l2y2-w.js +9 -0
  266. package/standalone/.next/static/chunks/{1nnp0crt0mi_-.js → 23xyv764-kx8z.js} +12 -12
  267. package/standalone/.next/static/chunks/{1wihkuyju-wa-.js → 25haryfoj4x3h.js} +1 -1
  268. package/standalone/.next/static/chunks/{0fr0zp4cwlyrr.js → 28ljy-uz6n_g9.js} +2 -2
  269. package/standalone/.next/static/chunks/{4013cp3x6bvuw.js → 2__bi79el56lb.js} +5 -5
  270. package/standalone/.next/static/chunks/2aq80hyo4l8a2.js +7 -0
  271. package/standalone/.next/static/chunks/{24a_ux27e8jj4.js → 2l_wayk-ioguc.js} +1 -1
  272. package/standalone/.next/static/chunks/2swvzbwm_dr9y.js +1 -0
  273. package/standalone/.next/static/chunks/2zwijj9t6y7gn.js +7 -0
  274. package/standalone/.next/static/chunks/{0m26h4h36cb_0.js → 3120xcqaqci82.js} +1 -1
  275. package/standalone/.next/static/chunks/{3-u7pvogc5_bx.js → 315cis1es_5t3.js} +12 -12
  276. package/standalone/.next/static/chunks/321feys_9vp2v.js +33 -0
  277. package/standalone/.next/static/chunks/{0d-e51sawr2y8.js → 34oyci46fsc5w.js} +1 -1
  278. package/standalone/.next/static/chunks/37mczlawlcx5l.js +1 -0
  279. package/standalone/.next/static/chunks/398uw5_4-ciaz.css +1 -0
  280. package/standalone/.next/static/chunks/{1tcqtaedz7922.js → 3d4ijy7zglgv5.js} +1 -1
  281. package/standalone/.next/static/chunks/3ir4b8po439x7.js +40 -0
  282. package/standalone/.next/static/chunks/3l2g83119oyl0.js +1 -0
  283. package/standalone/.next/static/chunks/3r-6igcofcwxj.js +107 -0
  284. package/standalone/.next/static/chunks/{0m--47yk9j-ec.js → 3tycetq7o8g3h.js} +1 -1
  285. package/standalone/.next/static/chunks/{0biu8z1f8c42u.js → 40ovzayigkz_-.js} +1 -1
  286. package/standalone/.next/static/chunks/41wq-96yyl0uw.js +1 -0
  287. package/standalone/.next/static/chunks/44xu63hsh11xp.js +1 -0
  288. package/standalone/.next/static/chunks/{turbopack-1rw7om86c18dg.js → turbopack-1v9ogj_5hv56l.js} +1 -1
  289. package/standalone/src/services/builds/artifact-cache.test.ts +241 -0
  290. package/standalone/src/services/builds/artifact-cache.ts +235 -0
  291. package/standalone/src/services/builds/artifact-transfer.ts +2 -1
  292. package/standalone/src/services/builds/builds.service.test.ts +55 -0
  293. package/standalone/src/services/builds/builds.service.ts +499 -17
  294. package/standalone/.next/server/chunks/[root-of-the-server]__02vqwey._.js +0 -3
  295. package/standalone/.next/server/chunks/[root-of-the-server]__1oahp4o._.js +0 -122
  296. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0361lgt._.js +0 -33
  297. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__06f05jg._.js +0 -3
  298. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ay4_3d._.js +0 -37
  299. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__0dm8osz._.js +0 -3
  300. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__1349-us._.js +0 -3
  301. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__1xv798-._.js +0 -3
  302. package/standalone/.next/server/chunks/ssr/[root-of-the-server]__1z955gh._.js +0 -3
  303. package/standalone/.next/server/chunks/ssr/_0bvpmhm._.js +0 -101
  304. package/standalone/.next/server/chunks/ssr/_0eb36qa._.js +0 -3
  305. package/standalone/.next/server/chunks/ssr/_0ndnmkz._.js +0 -3
  306. package/standalone/.next/server/chunks/ssr/_0nm6upn._.js +0 -3
  307. package/standalone/.next/server/chunks/ssr/_0pe56xv._.js +0 -3
  308. package/standalone/.next/server/chunks/ssr/_0quhjav._.js +0 -3
  309. package/standalone/.next/server/chunks/ssr/_0w05v7m._.js +0 -3
  310. package/standalone/.next/server/chunks/ssr/_0xozjkz._.js +0 -3
  311. package/standalone/.next/server/chunks/ssr/_1-1mnp6._.js +0 -3
  312. package/standalone/.next/server/chunks/ssr/_1-7r8vu._.js +0 -3
  313. package/standalone/.next/server/chunks/ssr/_1-grolz._.js +0 -3
  314. package/standalone/.next/server/chunks/ssr/_10evhql._.js +0 -3
  315. package/standalone/.next/server/chunks/ssr/_142x9wn._.js +0 -22
  316. package/standalone/.next/server/chunks/ssr/_1_ta7g1._.js +0 -3
  317. package/standalone/.next/server/chunks/ssr/_1ey5mmy._.js +0 -3
  318. package/standalone/.next/server/chunks/ssr/_1fdyu2w._.js +0 -3
  319. package/standalone/.next/server/chunks/ssr/_1g3i459._.js +0 -15
  320. package/standalone/.next/server/chunks/ssr/_1g_aflc._.js +0 -3
  321. package/standalone/.next/server/chunks/ssr/_1lcwubl._.js +0 -3
  322. package/standalone/.next/server/chunks/ssr/_1lseili._.js +0 -3
  323. package/standalone/.next/server/chunks/ssr/_1za3z6k._.js +0 -101
  324. package/standalone/.next/server/chunks/ssr/_20ufqtr._.js +0 -3
  325. package/standalone/.next/static/chunks/0a3s519wuzjet.js +0 -1
  326. package/standalone/.next/static/chunks/0newuocvg03xy.js +0 -3
  327. package/standalone/.next/static/chunks/0rlomhlt6030e.js +0 -1
  328. package/standalone/.next/static/chunks/1802j8gq2g47d.js +0 -7
  329. package/standalone/.next/static/chunks/1_tnhhn4f122y.js +0 -9
  330. package/standalone/.next/static/chunks/1eny65xy2ho48.js +0 -1
  331. package/standalone/.next/static/chunks/1joeb4m-mmn69.js +0 -7
  332. package/standalone/.next/static/chunks/1l4bkigul15i3.js +0 -25
  333. package/standalone/.next/static/chunks/1qd6cse_d9ae1.js +0 -99
  334. package/standalone/.next/static/chunks/2-mxmazwsh-wz.js +0 -1
  335. package/standalone/.next/static/chunks/24sd_kmnetibb.js +0 -1
  336. package/standalone/.next/static/chunks/27k7_zc-iuppd.js +0 -1
  337. package/standalone/.next/static/chunks/2baaj4mpr6i-i.js +0 -1
  338. package/standalone/.next/static/chunks/2cj2ndz_e0hbz.js +0 -1
  339. package/standalone/.next/static/chunks/2fzwgr2iq_783.css +0 -1
  340. package/standalone/.next/static/chunks/2hv6pkoloju0g.js +0 -33
  341. package/standalone/.next/static/chunks/2jbygfc0lzu0t.js +0 -55
  342. package/standalone/.next/static/chunks/2n7u72nxziv_5.js +0 -7
  343. package/standalone/.next/static/chunks/2sqprazdqp7f7.js +0 -1
  344. package/standalone/.next/static/chunks/2x8qovg070057.js +0 -1
  345. package/standalone/.next/static/chunks/3-zh9b0tcttiw.js +0 -33
  346. package/standalone/.next/static/chunks/31wyih3wwkeid.js +0 -1
  347. package/standalone/.next/static/chunks/33y_b6dqfx3tk.js +0 -1
  348. package/standalone/.next/static/chunks/3h1pxh5fd97ym.js +0 -27
  349. package/standalone/.next/static/chunks/3jbfibit05k5o.js +0 -29
  350. package/standalone/.next/static/chunks/3jd8_7lna-j_x.js +0 -40
  351. package/standalone/.next/static/chunks/3jv2gnnn4vx-j.js +0 -43
  352. package/standalone/.next/static/chunks/3k0oakdayt9yt.js +0 -40
  353. package/standalone/.next/static/chunks/3pgngh8lg3be3.js +0 -99
  354. package/standalone/.next/static/chunks/43gw6_6hbw18w.js +0 -51
  355. /package/standalone/.next/static/{8uBWJ8MOV-OEPe88M3PhU → sJ09NBDjsLncJEkHNWbdR}/_buildManifest.js +0 -0
  356. /package/standalone/.next/static/{8uBWJ8MOV-OEPe88M3PhU → sJ09NBDjsLncJEkHNWbdR}/_clientMiddlewareManifest.js +0 -0
  357. /package/standalone/.next/static/{8uBWJ8MOV-OEPe88M3PhU → sJ09NBDjsLncJEkHNWbdR}/_ssgManifest.js +0 -0
@@ -1,38 +1,38 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(30030);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return a.useCallback(function(...e){return t=>{let a=!1,n=e.map(e=>{let n=r(e,t);return a||"function"!=typeof n||(a=!0),n});if(a)return()=>{for(let t=0;t<n.length;t++){let a=n[t];"function"==typeof a?a():r(e[t],null)}}}}(...e),e)}var s=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var l="AlertDialog",[o,d]=(0,n.createContextScope)(l,[s.createDialogScope]),c=(0,s.createDialogScope)(),u=e=>{let{__scopeAlertDialog:a,...n}=e,r=c(a);return(0,t.jsx)(s.Root,{...r,...n,modal:!0})};u.displayName=l;var p=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Trigger,{...i,...r,ref:a})});p.displayName="AlertDialogTrigger";var h=e=>{let{__scopeAlertDialog:a,...n}=e,r=c(a);return(0,t.jsx)(s.Portal,{...r,...n})};h.displayName="AlertDialogPortal";var f=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Overlay,{...i,...r,ref:a})});f.displayName="AlertDialogOverlay";var m="AlertDialogContent",[x,g]=o(m),v=a.forwardRef((e,n)=>{let{__scopeAlertDialog:r,children:l,...o}=e,d=c(r),u=i(n,a.useRef(null)),p=a.useRef(null);return(0,t.jsx)(x,{scope:r,cancelRef:p,children:(0,t.jsx)(s.Content,{role:"alertdialog",...d,...o,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(n){if(e?.(n),!1===a||!n||!n.defaultPrevented)return t?.(n)}}(o.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:l})})});v.displayName=m;var b=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Title,{...i,...r,ref:a})});b.displayName="AlertDialogTitle";var y=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Description,{...i,...r,ref:a})});y.displayName="AlertDialogDescription";var j=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,i=c(n);return(0,t.jsx)(s.Close,{...i,...r,ref:a})});j.displayName="AlertDialogAction";var E="AlertDialogCancel",C=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:l}=g(E,n),o=c(n),d=i(a,l);return(0,t.jsx)(s.Close,{...o,...r,ref:d})});C.displayName=E,e.s(["Action",0,j,"AlertDialog",0,u,"AlertDialogAction",0,j,"AlertDialogCancel",0,C,"AlertDialogContent",0,v,"AlertDialogDescription",0,y,"AlertDialogOverlay",0,f,"AlertDialogPortal",0,h,"AlertDialogTitle",0,b,"AlertDialogTrigger",0,p,"Cancel",0,C,"Content",0,v,"Description",0,y,"Overlay",0,f,"Portal",0,h,"Root",0,u,"Title",0,b,"Trigger",0,p,"createAlertDialogScope",0,d],691162);var N=e.i(691162),N=N,S=e.i(975157),D=e.i(519455);function _({...e}){return(0,t.jsx)(N.Root,{"data-slot":"alert-dialog",...e})}function A({...e}){return(0,t.jsx)(N.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function R({...e}){return(0,t.jsx)(N.Portal,{"data-slot":"alert-dialog-portal",...e})}function w({className:e,...a}){return(0,t.jsx)(N.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,S.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function I({className:e,size:a="default",...n}){return(0,t.jsxs)(R,{children:[(0,t.jsx)(w,{}),(0,t.jsx)(N.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,S.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...n})]})}function O({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,S.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function T({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,S.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function k({className:e,...a}){return(0,t.jsx)(N.Title,{"data-slot":"alert-dialog-title",className:(0,S.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function B({className:e,...a}){return(0,t.jsx)(N.Description,{"data-slot":"alert-dialog-description",className:(0,S.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function L({className:e,variant:a="default",size:n="default",...r}){return(0,t.jsx)(D.Button,{variant:a,size:n,asChild:!0,children:(0,t.jsx)(N.Action,{"data-slot":"alert-dialog-action",className:(0,S.cn)(e),...r})})}function F({className:e,variant:a="outline",size:n="default",...r}){return(0,t.jsx)(D.Button,{variant:a,size:n,asChild:!0,children:(0,t.jsx)(N.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,S.cn)(e),...r})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:a,description:n,onConfirm:r,onOpenChange:i,open:s,title:l,trigger:o}){return(0,t.jsxs)(_,{onOpenChange:i,open:s,children:[o&&(0,t.jsx)(A,{asChild:!0,children:o}),(0,t.jsxs)(I,{children:[(0,t.jsxs)(O,{children:[(0,t.jsx)(k,{children:l}),(0,t.jsx)(B,{children:n})]}),(0,t.jsxs)(T,{children:[(0,t.jsx)(F,{children:a}),(0,t.jsx)(L,{onClick:()=>void r(),variant:"destructive",children:e})]})]})]})}],340953)},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},82612,e=>{"use strict";var t=e.i(843476),a=e.i(225913),n=e.i(975157);let r=(0,a.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,n.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...a})},"EmptyDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,n.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})},"EmptyHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,n.cn)("flex max-w-sm flex-col items-center gap-2",e),...a})},"EmptyMedia",0,function({className:e,variant:a="default",...i}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":a,className:(0,n.cn)(r({variant:a,className:e})),...i})},"EmptyTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,n.cn)("font-heading text-sm font-medium tracking-tight",e),...a})}])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let a=document.execCommand("copy");if(t.remove(),!a)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},250832,e=>{"use strict";let t=(0,e.i(456420).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],250832)},762368,e=>{"use strict";let t=(0,e.i(456420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],762368)},59497,e=>{"use strict";var t=e.i(843476),a=e.i(271645);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function r(...e){return a.useCallback(function(...e){return t=>{let a=!1,r=e.map(e=>{let r=n(e,t);return a||"function"!=typeof r||(a=!0),r});if(a)return()=>{for(let t=0;t<r.length;t++){let a=r[t];"function"==typeof a?a():n(e[t],null)}}}}(...e),e)}var i=e.i(30030);function s(e,t,{checkForDefaultPrevented:a=!0}={}){return function(n){if(e?.(n),!1===a||!n||!n.defaultPrevented)return t?.(n)}}"u">typeof window&&window.document&&window.document.createElement;var l=globalThis?.document?a.useLayoutEffect:()=>{};a[" useEffectEvent ".trim().toString()],a[" useInsertionEffect ".trim().toString()];var o=a[" useInsertionEffect ".trim().toString()]||l;Symbol("RADIX:SYNC_STATE");var d=e.i(999682),c=e.i(635804),u=e.i(296626);e.i(174080);var p=Symbol.for("radix.slottable"),h=Symbol.for("react.lazy");function f(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===h&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var m=a[" use ".trim().toString()],x=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{var i;let s,l=(i=`Primitive.${n}`,(s=a.forwardRef((e,t)=>{var n;let s,l,{children:o,...d}=e,c=null,u=!1,h=[];f(o)&&"function"==typeof m&&(o=m(o._payload)),a.Children.forEach(o,e=>{var t;if(t=e,a.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===p){u=!0;let t="child"in e.props?e.props.child:e.props.children;f(t)&&"function"==typeof m&&(t=m(t._payload)),c=((e,t)=>{if("child"in e.props){let t=e.props.child;return a.isValidElement(t)?a.cloneElement(t,void 0,e.props.children(t.props.children)):null}return a.isValidElement(t)?t:null})(e,t),h.push(c?.props?.children)}else h.push(e)}),c?c=a.cloneElement(c,void 0,h):!u&&1===a.Children.count(o)&&a.isValidElement(o)&&(c=o);let x=c?(n=c,(l=(s=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?n.ref:(l=(s=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?n.props.ref:n.props.ref||n.ref):void 0,g=r(t,x);if(!c){if(o||0===o){let e,t;throw Error(u?(e=i,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=i,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return o}let v=function(e,t){let a={...t};for(let n in t){let r=e[n],i=t[n];/^on[A-Z]/.test(n)?r&&i?a[n]=(...e)=>{let t=i(...e);return r(...e),t}:r&&(a[n]=r):"style"===n?a[n]={...r,...i}:"className"===n&&(a[n]=[r,i].filter(Boolean).join(" "))}return{...e,...a}}(d,c.props??{});return c.type!==a.Fragment&&(v.ref=t?g:x),a.cloneElement(c,v)})).displayName=`${i}.Slot`,s),o=a.forwardRef((e,a)=>{let{asChild:r,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(r?l:n,{...i,ref:a})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{}),g="Checkbox",[v,b]=(0,i.createContextScope)(g),[y,j]=v(g);function E(e){let{__scopeCheckbox:n,checked:r,children:i,defaultChecked:s,disabled:l,form:d,name:c,onCheckedChange:u,required:p,value:h="on",internal_do_not_use_render:f}=e,[m,x]=function({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,s,l]=function({defaultProp:e,onChange:t}){let[n,r]=a.useState(e),i=a.useRef(n),s=a.useRef(t);return o(()=>{s.current=t},[t]),a.useEffect(()=>{i.current!==n&&(s.current?.(n),i.current=n)},[n,i]),[n,r,s]}({defaultProp:t,onChange:n}),d=void 0!==e,c=d?e:i;{let t=a.useRef(void 0!==e);a.useEffect(()=>{let e=t.current;if(e!==d){let t=d?"controlled":"uncontrolled";console.warn(`${r} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=d},[d,r])}return[c,a.useCallback(t=>{if(d){let a="function"==typeof t?t(e):t;a!==e&&l.current?.(a)}else s(t)},[d,e,s,l])]}({prop:r,defaultProp:s??!1,onChange:u,caller:g}),[v,b]=a.useState(null),[j,E]=a.useState(null),C=a.useRef(!1),N=!v||!!d||!!v.closest("form"),S={checked:m,disabled:l,setChecked:x,control:v,setControl:b,name:c,form:d,value:h,hasConsumerStoppedPropagationRef:C,required:p,defaultChecked:!w(s)&&s,isFormControl:N,bubbleInput:j,setBubbleInput:E};return(0,t.jsx)(y,{scope:n,...S,children:"function"==typeof f?f(S):i})}var C="CheckboxTrigger",N=a.forwardRef(({__scopeCheckbox:e,onKeyDown:n,onClick:i,...l},o)=>{let{control:d,value:c,disabled:u,checked:p,required:h,setControl:f,setChecked:m,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:b}=j(C,e),y=r(o,f),E=a.useRef(p);return a.useEffect(()=>{let e=d?.form;if(e){let t=()=>m(E.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,m]),(0,t.jsx)(x.button,{type:"button",role:"checkbox","aria-checked":w(p)?"mixed":p,"aria-required":h,"data-state":I(p),"data-disabled":u?"":void 0,disabled:u,value:c,...l,ref:y,onKeyDown:s(n,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:s(i,e=>{m(e=>!!w(e)||!e),b&&v&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})})});N.displayName=C;var S=a.forwardRef((e,a)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:s,required:l,disabled:o,value:d,onCheckedChange:c,form:u,...p}=e;return(0,t.jsx)(E,{__scopeCheckbox:n,checked:i,defaultChecked:s,disabled:o,required:l,onCheckedChange:c,name:r,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N,{...p,ref:a,__scopeCheckbox:n}),e&&(0,t.jsx)(R,{__scopeCheckbox:n})]})})});S.displayName=g;var D="CheckboxIndicator",_=a.forwardRef((e,a)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,s=j(D,n);return(0,t.jsx)(u.Presence,{present:r||w(s.checked)||!0===s.checked,children:(0,t.jsx)(x.span,{"data-state":I(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:a,style:{pointerEvents:"none",...e.style}})})});_.displayName=D;var A="CheckboxBubbleInput",R=a.forwardRef(({__scopeCheckbox:e,...n},i)=>{let{control:s,hasConsumerStoppedPropagationRef:l,checked:o,defaultChecked:u,required:p,disabled:h,name:f,value:m,form:g,bubbleInput:v,setBubbleInput:b}=j(A,e),y=r(i,b),E=(0,d.usePrevious)(o),C=(0,c.useSize)(s);a.useEffect(()=>{if(!v)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!l.current;if(E!==o&&e){let a=new Event("click",{bubbles:t});v.indeterminate=w(o),e.call(v,!w(o)&&o),v.dispatchEvent(a)}},[v,E,o,l]);let N=a.useRef(!w(o)&&o);return(0,t.jsx)(x.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??N.current,required:p,disabled:h,name:f,value:m,form:g,...n,tabIndex:-1,ref:y,style:{...n.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function w(e){return"indeterminate"===e}function I(e){return w(e)?"indeterminate":e?"checked":"unchecked"}R.displayName=A,e.s(["Checkbox",0,S,"CheckboxIndicator",0,_,"Indicator",0,_,"Root",0,S,"createCheckboxScope",0,b,"unstable_BubbleInput",0,R,"unstable_CheckboxBubbleInput",0,R,"unstable_CheckboxProvider",0,E,"unstable_CheckboxTrigger",0,N,"unstable_Provider",0,E,"unstable_Trigger",0,N],388474);var O=e.i(388474),O=O,T=e.i(975157),k=e.i(593698);e.s(["Checkbox",0,function({className:e,...a}){return(0,t.jsx)(O.Root,{"data-slot":"checkbox",className:(0,T.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...a,children:(0,t.jsx)(O.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,t.jsx)(k.CheckIcon,{})})})}],59497)},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},776639,e=>{"use strict";var t=e.i(843476),a=e.i(560964),n=e.i(964053),r=e.i(519455),i=e.i(975157);function s({...e}){return(0,t.jsx)(n.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function l({className:e,...a}){return(0,t.jsx)(n.Dialog.Overlay,{className:(0,i.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),"data-slot":"dialog-overlay",...a})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(n.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:o,showCloseButton:d=!0,...c}){return(0,t.jsxs)(s,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(n.Dialog.Content,{className:(0,i.cn)("fixed top-1/2 left-1/2 z-50 grid max-h-[85dvh] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),"data-slot":"dialog-content",...c,children:[o,d&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,"data-slot":"dialog-close",children:(0,t.jsxs)(r.Button,{className:"absolute top-2 right-2",size:"icon-sm",variant:"ghost",children:[(0,t.jsx)(a.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})})]})]})},"DialogDescription",0,function({className:e,...a}){return(0,t.jsx)(n.Dialog.Description,{className:(0,i.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),"data-slot":"dialog-description",...a})},"DialogFooter",0,function({className:e,showCloseButton:a=!1,children:s,...l}){return(0,t.jsxs)("div",{className:(0,i.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),"data-slot":"dialog-footer",...l,children:[s,a&&(0,t.jsx)(n.Dialog.Close,{asChild:!0,children:(0,t.jsx)(r.Button,{variant:"outline",children:"Close"})})]})},"DialogHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col gap-2",e),"data-slot":"dialog-header",...a})},"DialogTitle",0,function({className:e,...a}){return(0,t.jsx)(n.Dialog.Title,{className:(0,i.cn)("font-heading text-base leading-none font-medium",e),"data-slot":"dialog-title",...a})}])},986253,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},515281,e=>{"use strict";let t=(0,e.i(456420).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],515281)},768877,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],768877)},434719,e=>{"use strict";let t=String.raw`\b([A-Z][A-Z0-9_]*-\d+)\b`;e.s(["DEFAULT_JIRA_BRANCH_REGEX",0,t,"DEFAULT_WORKTREE_FETCH_INTERVAL_SECONDS",0,300,"MAX_WORKTREE_FETCH_INTERVAL_SECONDS",0,86400,"MIN_WORKTREE_FETCH_INTERVAL_SECONDS",0,60,"WORKTREE_BRANCH_JOB_KIND",0,"worktree.branch","WORKTREE_DELETE_JOB_KIND",0,"worktree.delete","WORKTREE_INSPECT_JOB_KIND",0,"worktree.inspect","WORKTREE_MOVE_CHECKOUT_JOB_KIND",0,"worktree.move.checkout","WORKTREE_MOVE_PUSH_JOB_KIND",0,"worktree.move.push","WORKTREE_OPERATION_JOB_KIND",0,"worktree.operation","WORKTREE_WATCH_JOB_KIND",0,"worktree.watch"])},421645,e=>{"use strict";e.s(["CODEBASE_BROWSE_JOB_KIND",0,"codebase.browse","CODEBASE_FETCH_JOB_KIND",0,"codebase.fetch","CODEBASE_GIT_INSPECT_JOB_KIND",0,"codebase.git.inspect","CODEBASE_GIT_OPERATION_JOB_KIND",0,"codebase.git.operation","CODEBASE_INSPECT_JOB_KIND",0,"codebase.inspect","CODEBASE_RECONCILE_EVENT_CAPABILITY",0,"codebase.reconcile.requested","CODEBASE_REFRESH_JOB_KIND",0,"codebase.refresh","DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,30,"MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,3600,"MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,10])},874801,e=>{"use strict";var t=e.i(843476),a=e.i(867927),n=e.i(456420);let r=(0,n.default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),i=(0,n.default)("folder-check",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]]);var s=e.i(902434),s=s,l=e.i(948148),o=e.i(271645),d=e.i(929592),c=e.i(519455),u=e.i(59497),p=e.i(110204),h=e.i(987968),f=e.i(462777),m=e.i(637611);e.s(["AgentDirectoryBrowser",0,function({agentId:e,browseLabel:n,disabled:x=!1,initialPath:g=null,onPathChange:v,onSelect:b,selectIcon:y,selectLabel:j}){var E;let C=(0,l.useTranslations)("codebases"),[N,S]=(0,o.useState)(null),[D,_]=(0,o.useState)(!1),[A,R]=(0,o.useState)(!1),[w,I]=(0,o.useState)(null),O=(0,o.useRef)(0),T=(0,o.useCallback)(async t=>{let a=++O.current;R(!0);try{let n=await (0,m.controlPlaneRequest)(`mutation BrowseAgentDirectory($input: BrowseAgentDirectoryInput!) {
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(30030);function n(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function i(...e){return a.useCallback(function(...e){return t=>{let a=!1,r=e.map(e=>{let r=n(e,t);return a||"function"!=typeof r||(a=!0),r});if(a)return()=>{for(let t=0;t<r.length;t++){let a=r[t];"function"==typeof a?a():n(e[t],null)}}}}(...e),e)}var s=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var l="AlertDialog",[o,d]=(0,r.createContextScope)(l,[s.createDialogScope]),c=(0,s.createDialogScope)(),u=e=>{let{__scopeAlertDialog:a,...r}=e,n=c(a);return(0,t.jsx)(s.Root,{...n,...r,modal:!0})};u.displayName=l;var p=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=c(r);return(0,t.jsx)(s.Trigger,{...i,...n,ref:a})});p.displayName="AlertDialogTrigger";var h=e=>{let{__scopeAlertDialog:a,...r}=e,n=c(a);return(0,t.jsx)(s.Portal,{...n,...r})};h.displayName="AlertDialogPortal";var m=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=c(r);return(0,t.jsx)(s.Overlay,{...i,...n,ref:a})});m.displayName="AlertDialogOverlay";var f="AlertDialogContent",[x,g]=o(f),v=a.forwardRef((e,r)=>{let{__scopeAlertDialog:n,children:l,...o}=e,d=c(n),u=i(r,a.useRef(null)),p=a.useRef(null);return(0,t.jsx)(x,{scope:n,cancelRef:p,children:(0,t.jsx)(s.Content,{role:"alertdialog",...d,...o,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(r){if(e?.(r),!1===a||!r||!r.defaultPrevented)return t?.(r)}}(o.onOpenAutoFocus,e=>{e.preventDefault(),p.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:l})})});v.displayName=f;var b=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=c(r);return(0,t.jsx)(s.Title,{...i,...n,ref:a})});b.displayName="AlertDialogTitle";var y=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=c(r);return(0,t.jsx)(s.Description,{...i,...n,ref:a})});y.displayName="AlertDialogDescription";var E=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,i=c(r);return(0,t.jsx)(s.Close,{...i,...n,ref:a})});E.displayName="AlertDialogAction";var j="AlertDialogCancel",C=a.forwardRef((e,a)=>{let{__scopeAlertDialog:r,...n}=e,{cancelRef:l}=g(j,r),o=c(r),d=i(a,l);return(0,t.jsx)(s.Close,{...o,...n,ref:d})});C.displayName=j,e.s(["Action",0,E,"AlertDialog",0,u,"AlertDialogAction",0,E,"AlertDialogCancel",0,C,"AlertDialogContent",0,v,"AlertDialogDescription",0,y,"AlertDialogOverlay",0,m,"AlertDialogPortal",0,h,"AlertDialogTitle",0,b,"AlertDialogTrigger",0,p,"Cancel",0,C,"Content",0,v,"Description",0,y,"Overlay",0,m,"Portal",0,h,"Root",0,u,"Title",0,b,"Trigger",0,p,"createAlertDialogScope",0,d],691162);var N=e.i(691162),N=N,S=e.i(975157),_=e.i(519455);function A({...e}){return(0,t.jsx)(N.Root,{"data-slot":"alert-dialog",...e})}function D({...e}){return(0,t.jsx)(N.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function R({...e}){return(0,t.jsx)(N.Portal,{"data-slot":"alert-dialog-portal",...e})}function w({className:e,...a}){return(0,t.jsx)(N.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,S.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function I({className:e,size:a="default",...r}){return(0,t.jsxs)(R,{children:[(0,t.jsx)(w,{}),(0,t.jsx)(N.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,S.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})]})}function O({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,S.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function T({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,S.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function k({className:e,...a}){return(0,t.jsx)(N.Title,{"data-slot":"alert-dialog-title",className:(0,S.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function B({className:e,...a}){return(0,t.jsx)(N.Description,{"data-slot":"alert-dialog-description",className:(0,S.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function L({className:e,variant:a="default",size:r="default",...n}){return(0,t.jsx)(_.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(N.Action,{"data-slot":"alert-dialog-action",className:(0,S.cn)(e),...n})})}function F({className:e,variant:a="outline",size:r="default",...n}){return(0,t.jsx)(_.Button,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(N.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,S.cn)(e),...n})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:a,description:r,onConfirm:n,onOpenChange:i,open:s,title:l,trigger:o}){return(0,t.jsxs)(A,{onOpenChange:i,open:s,children:[o&&(0,t.jsx)(D,{asChild:!0,children:o}),(0,t.jsxs)(I,{children:[(0,t.jsxs)(O,{children:[(0,t.jsx)(k,{children:l}),(0,t.jsx)(B,{children:r})]}),(0,t.jsxs)(T,{children:[(0,t.jsx)(F,{children:a}),(0,t.jsx)(L,{onClick:()=>void n(),variant:"destructive",children:e})]})]})]})}],340953)},741120,e=>{"use strict";let t=(0,e.i(456420).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],741120)},82612,e=>{"use strict";var t=e.i(843476),a=e.i(225913),r=e.i(975157);let n=(0,a.cva)("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",icon:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default"}});e.s(["Empty",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty",className:(0,r.cn)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",e),...a})},"EmptyDescription",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-description",className:(0,r.cn)("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})},"EmptyHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-header",className:(0,r.cn)("flex max-w-sm flex-col items-center gap-2",e),...a})},"EmptyMedia",0,function({className:e,variant:a="default",...i}){return(0,t.jsx)("div",{"data-slot":"empty-icon","data-variant":a,className:(0,r.cn)(n({variant:a,className:e})),...i})},"EmptyTitle",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"empty-title",className:(0,r.cn)("font-heading text-sm font-medium tracking-tight",e),...a})}])},462777,e=>{"use strict";async function t(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.append(t),t.select();let a=document.execCommand("copy");if(t.remove(),!a)throw Error("Copy is not supported by this browser")}e.s(["copyText",0,t,"createClientId",0,function(){try{if(globalThis.crypto?.randomUUID)return globalThis.crypto.randomUUID()}catch{}if(globalThis.crypto?.getRandomValues)try{let e=globalThis.crypto.getRandomValues(new Uint8Array(16));return Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")}catch{}return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}])},778434,e=>{"use strict";e.s(["AGENT_FIELDS",0,"id name hostname version osVersion architecture cpuModel memoryTotalBytes memoryFreeBytes diskTotalBytes diskFreeBytes capabilities baseRepoDirectory derivedDataLocationMode derivedDataPath buildsDirectory defaultBuildsDirectory effectiveBuildsDirectory connectionStatus ipAddress lastSeenAt disconnectedAt createdAt","JOB_FIELDS",0,"id agentId kind payload status error result timeoutSeconds createdAt startedAt finishedAt updatedAt","JOB_LOG_FIELDS",0,"id jobId sequence stream message createdAt"])},250832,e=>{"use strict";let t=(0,e.i(456420).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],250832)},762368,e=>{"use strict";let t=(0,e.i(456420).default)("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);e.s(["Download",0,t],762368)},59497,e=>{"use strict";var t=e.i(843476),a=e.i(271645);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function n(...e){return a.useCallback(function(...e){return t=>{let a=!1,n=e.map(e=>{let n=r(e,t);return a||"function"!=typeof n||(a=!0),n});if(a)return()=>{for(let t=0;t<n.length;t++){let a=n[t];"function"==typeof a?a():r(e[t],null)}}}}(...e),e)}var i=e.i(30030);function s(e,t,{checkForDefaultPrevented:a=!0}={}){return function(r){if(e?.(r),!1===a||!r||!r.defaultPrevented)return t?.(r)}}"u">typeof window&&window.document&&window.document.createElement;var l=globalThis?.document?a.useLayoutEffect:()=>{};a[" useEffectEvent ".trim().toString()],a[" useInsertionEffect ".trim().toString()];var o=a[" useInsertionEffect ".trim().toString()]||l;Symbol("RADIX:SYNC_STATE");var d=e.i(999682),c=e.i(635804),u=e.i(296626);e.i(174080);var p=Symbol.for("radix.slottable"),h=Symbol.for("react.lazy");function m(e){var t;return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===h&&"_payload"in e&&"object"==typeof(t=e._payload)&&null!==t&&"then"in t}var f=a[" use ".trim().toString()],x=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,r)=>{var i;let s,l=(i=`Primitive.${r}`,(s=a.forwardRef((e,t)=>{var r;let s,l,{children:o,...d}=e,c=null,u=!1,h=[];m(o)&&"function"==typeof f&&(o=f(o._payload)),a.Children.forEach(o,e=>{var t;if(t=e,a.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===p){u=!0;let t="child"in e.props?e.props.child:e.props.children;m(t)&&"function"==typeof f&&(t=f(t._payload)),c=((e,t)=>{if("child"in e.props){let t=e.props.child;return a.isValidElement(t)?a.cloneElement(t,void 0,e.props.children(t.props.children)):null}return a.isValidElement(t)?t:null})(e,t),h.push(c?.props?.children)}else h.push(e)}),c?c=a.cloneElement(c,void 0,h):!u&&1===a.Children.count(o)&&a.isValidElement(o)&&(c=o);let x=c?(r=c,(l=(s=Object.getOwnPropertyDescriptor(r.props,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?r.ref:(l=(s=Object.getOwnPropertyDescriptor(r,"ref")?.get)&&"isReactWarning"in s&&s.isReactWarning)?r.props.ref:r.props.ref||r.ref):void 0,g=n(t,x);if(!c){if(o||0===o){let e,t;throw Error(u?(e=i,`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`):(t=i,`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`))}return o}let v=function(e,t){let a={...t};for(let r in t){let n=e[r],i=t[r];/^on[A-Z]/.test(r)?n&&i?a[r]=(...e)=>{let t=i(...e);return n(...e),t}:n&&(a[r]=n):"style"===r?a[r]={...n,...i}:"className"===r&&(a[r]=[n,i].filter(Boolean).join(" "))}return{...e,...a}}(d,c.props??{});return c.type!==a.Fragment&&(v.ref=t?g:x),a.cloneElement(c,v)})).displayName=`${i}.Slot`,s),o=a.forwardRef((e,a)=>{let{asChild:n,...i}=e;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(n?l:r,{...i,ref:a})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),g="Checkbox",[v,b]=(0,i.createContextScope)(g),[y,E]=v(g);function j(e){let{__scopeCheckbox:r,checked:n,children:i,defaultChecked:s,disabled:l,form:d,name:c,onCheckedChange:u,required:p,value:h="on",internal_do_not_use_render:m}=e,[f,x]=function({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[i,s,l]=function({defaultProp:e,onChange:t}){let[r,n]=a.useState(e),i=a.useRef(r),s=a.useRef(t);return o(()=>{s.current=t},[t]),a.useEffect(()=>{i.current!==r&&(s.current?.(r),i.current=r)},[r,i]),[r,n,s]}({defaultProp:t,onChange:r}),d=void 0!==e,c=d?e:i;{let t=a.useRef(void 0!==e);a.useEffect(()=>{let e=t.current;if(e!==d){let t=d?"controlled":"uncontrolled";console.warn(`${n} is changing from ${e?"controlled":"uncontrolled"} to ${t}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=d},[d,n])}return[c,a.useCallback(t=>{if(d){let a="function"==typeof t?t(e):t;a!==e&&l.current?.(a)}else s(t)},[d,e,s,l])]}({prop:n,defaultProp:s??!1,onChange:u,caller:g}),[v,b]=a.useState(null),[E,j]=a.useState(null),C=a.useRef(!1),N=!v||!!d||!!v.closest("form"),S={checked:f,disabled:l,setChecked:x,control:v,setControl:b,name:c,form:d,value:h,hasConsumerStoppedPropagationRef:C,required:p,defaultChecked:!w(s)&&s,isFormControl:N,bubbleInput:E,setBubbleInput:j};return(0,t.jsx)(y,{scope:r,...S,children:"function"==typeof m?m(S):i})}var C="CheckboxTrigger",N=a.forwardRef(({__scopeCheckbox:e,onKeyDown:r,onClick:i,...l},o)=>{let{control:d,value:c,disabled:u,checked:p,required:h,setControl:m,setChecked:f,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:b}=E(C,e),y=n(o,m),j=a.useRef(p);return a.useEffect(()=>{let e=d?.form;if(e){let t=()=>f(j.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,f]),(0,t.jsx)(x.button,{type:"button",role:"checkbox","aria-checked":w(p)?"mixed":p,"aria-required":h,"data-state":I(p),"data-disabled":u?"":void 0,disabled:u,value:c,...l,ref:y,onKeyDown:s(r,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:s(i,e=>{f(e=>!!w(e)||!e),b&&v&&(g.current=e.isPropagationStopped(),g.current||e.stopPropagation())})})});N.displayName=C;var S=a.forwardRef((e,a)=>{let{__scopeCheckbox:r,name:n,checked:i,defaultChecked:s,required:l,disabled:o,value:d,onCheckedChange:c,form:u,...p}=e;return(0,t.jsx)(j,{__scopeCheckbox:r,checked:i,defaultChecked:s,disabled:o,required:l,onCheckedChange:c,name:n,form:u,value:d,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N,{...p,ref:a,__scopeCheckbox:r}),e&&(0,t.jsx)(R,{__scopeCheckbox:r})]})})});S.displayName=g;var _="CheckboxIndicator",A=a.forwardRef((e,a)=>{let{__scopeCheckbox:r,forceMount:n,...i}=e,s=E(_,r);return(0,t.jsx)(u.Presence,{present:n||w(s.checked)||!0===s.checked,children:(0,t.jsx)(x.span,{"data-state":I(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:a,style:{pointerEvents:"none",...e.style}})})});A.displayName=_;var D="CheckboxBubbleInput",R=a.forwardRef(({__scopeCheckbox:e,...r},i)=>{let{control:s,hasConsumerStoppedPropagationRef:l,checked:o,defaultChecked:u,required:p,disabled:h,name:m,value:f,form:g,bubbleInput:v,setBubbleInput:b}=E(D,e),y=n(i,b),j=(0,d.usePrevious)(o),C=(0,c.useSize)(s);a.useEffect(()=>{if(!v)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set,t=!l.current;if(j!==o&&e){let a=new Event("click",{bubbles:t});v.indeterminate=w(o),e.call(v,!w(o)&&o),v.dispatchEvent(a)}},[v,j,o,l]);let N=a.useRef(!w(o)&&o);return(0,t.jsx)(x.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??N.current,required:p,disabled:h,name:m,value:f,form:g,...r,tabIndex:-1,ref:y,style:{...r.style,...C,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});function w(e){return"indeterminate"===e}function I(e){return w(e)?"indeterminate":e?"checked":"unchecked"}R.displayName=D,e.s(["Checkbox",0,S,"CheckboxIndicator",0,A,"Indicator",0,A,"Root",0,S,"createCheckboxScope",0,b,"unstable_BubbleInput",0,R,"unstable_CheckboxBubbleInput",0,R,"unstable_CheckboxProvider",0,j,"unstable_CheckboxTrigger",0,N,"unstable_Provider",0,j,"unstable_Trigger",0,N],388474);var O=e.i(388474),O=O,T=e.i(975157),k=e.i(593698);e.s(["Checkbox",0,function({className:e,...a}){return(0,t.jsx)(O.Root,{"data-slot":"checkbox",className:(0,T.cn)("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...a,children:(0,t.jsx)(O.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:(0,t.jsx)(k.CheckIcon,{})})})}],59497)},77071,e=>{"use strict";let t=(0,e.i(456420).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],77071)},986253,e=>{"use strict";let t=(0,e.i(456420).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t])},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},515281,e=>{"use strict";let t=(0,e.i(456420).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],515281)},768877,e=>{"use strict";let t=(0,e.i(456420).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],768877)},434719,e=>{"use strict";let t=String.raw`\b([A-Z][A-Z0-9_]*-\d+)\b`;e.s(["DEFAULT_JIRA_BRANCH_REGEX",0,t,"DEFAULT_WORKTREE_FETCH_INTERVAL_SECONDS",0,300,"MAX_WORKTREE_FETCH_INTERVAL_SECONDS",0,86400,"MIN_WORKTREE_FETCH_INTERVAL_SECONDS",0,60,"WORKTREE_BRANCH_JOB_KIND",0,"worktree.branch","WORKTREE_DELETE_JOB_KIND",0,"worktree.delete","WORKTREE_INSPECT_JOB_KIND",0,"worktree.inspect","WORKTREE_MOVE_CHECKOUT_JOB_KIND",0,"worktree.move.checkout","WORKTREE_MOVE_PUSH_JOB_KIND",0,"worktree.move.push","WORKTREE_OPERATION_JOB_KIND",0,"worktree.operation","WORKTREE_WATCH_JOB_KIND",0,"worktree.watch"])},421645,e=>{"use strict";e.s(["CODEBASE_BROWSE_JOB_KIND",0,"codebase.browse","CODEBASE_FETCH_JOB_KIND",0,"codebase.fetch","CODEBASE_GIT_INSPECT_JOB_KIND",0,"codebase.git.inspect","CODEBASE_GIT_OPERATION_JOB_KIND",0,"codebase.git.operation","CODEBASE_INSPECT_JOB_KIND",0,"codebase.inspect","CODEBASE_RECONCILE_EVENT_CAPABILITY",0,"codebase.reconcile.requested","CODEBASE_REFRESH_JOB_KIND",0,"codebase.refresh","DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,30,"MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,3600,"MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS",0,10])},874801,e=>{"use strict";var t=e.i(843476),a=e.i(867927),r=e.i(456420);let n=(0,r.default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),i=(0,r.default)("folder-check",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}],["path",{d:"m9 13 2 2 4-4",key:"6343dt"}]]);var s=e.i(902434),s=s,l=e.i(948148),o=e.i(271645),d=e.i(929592),c=e.i(519455),u=e.i(59497),p=e.i(110204),h=e.i(987968),m=e.i(462777),f=e.i(637611);e.s(["AgentDirectoryBrowser",0,function({agentId:e,browseLabel:r,disabled:x=!1,initialPath:g=null,onPathChange:v,onSelect:b,selectIcon:y,selectLabel:E}){var j;let C=(0,l.useTranslations)("codebases"),[N,S]=(0,o.useState)(null),[_,A]=(0,o.useState)(!1),[D,R]=(0,o.useState)(!1),[w,I]=(0,o.useState)(null),O=(0,o.useRef)(0),T=(0,o.useCallback)(async t=>{let a=++O.current;R(!0);try{let r=await (0,f.controlPlaneRequest)(`mutation BrowseAgentDirectory($input: BrowseAgentDirectoryInput!) {
2
2
  browseAgentDirectory(input: $input) {
3
3
  path parentPath homePath truncated entries { name path hidden }
4
4
  }
5
- }`,{input:{agentId:e,path:t,requestId:(0,f.createClientId)()}});if(a!==O.current)return;S(n.browseAgentDirectory),v?.(n.browseAgentDirectory.path),I(null)}catch(e){if(a!==O.current)return;I(e instanceof Error?e.message:String(e))}finally{a===O.current&&R(!1)}},[e,v]);if((0,o.useEffect)(()=>{if(!g)return;let e=window.setTimeout(()=>void T(g),0);return()=>window.clearTimeout(e)},[T,g]),(0,o.useEffect)(()=>()=>{O.current+=1},[]),!N)return(0,t.jsxs)("div",{className:"space-y-3",children:[w&&(0,t.jsx)(d.Alert,{variant:"destructive",children:(0,t.jsx)(d.AlertDescription,{children:w})}),(0,t.jsxs)(c.Button,{disabled:A||x,onClick:()=>void T(null),type:"button",variant:"outline",children:[A?(0,t.jsx)(h.Spinner,{}):(0,t.jsx)(r,{})," ",n??C("browseHome")]})]});let k="/"===(E=N.path)?[{label:"/",path:"/"}]:[{label:"/",path:"/"},...E.split("/").filter(Boolean).map((e,t,a)=>({label:e,path:`/${a.slice(0,t+1).join("/")}`}))];return(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border p-3",children:[w&&(0,t.jsx)(d.Alert,{variant:"destructive",children:(0,t.jsx)(d.AlertDescription,{children:w})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,t.jsx)(c.Button,{"aria-label":C("home"),disabled:A||x,onClick:()=>void T(N.homePath),size:"icon-sm",type:"button",variant:"ghost",children:(0,t.jsx)(s.default,{})}),k.map((e,n)=>(0,t.jsxs)("span",{className:"flex items-center",children:[n>0&&(0,t.jsx)(a.ChevronRight,{className:"size-3 text-muted-foreground"}),(0,t.jsx)(c.Button,{disabled:A||x,onClick:()=>void T(e.path),size:"sm",type:"button",variant:"ghost",children:e.label})]},e.path))]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(u.Checkbox,{checked:D,id:`show-hidden-${e}`,onCheckedChange:e=>_(!!e)}),(0,t.jsx)(p.Label,{htmlFor:`show-hidden-${e}`,children:C("showHidden")})]}),(0,t.jsx)("div",{className:"max-h-64 overflow-y-auto rounded-md border",children:N.entries.filter(e=>D||!e.hidden).map(e=>(0,t.jsxs)(c.Button,{className:"h-auto w-full justify-start rounded-none border-b px-3 py-2 last:border-0",disabled:A||x,onClick:()=>void T(e.path),size:"sm",type:"button",variant:"ghost",children:[(0,t.jsx)(r,{className:"size-4"})," ",e.name]},e.path))}),N.truncated&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:C("truncated")}),b&&j&&(0,t.jsxs)(c.Button,{disabled:A||x,onClick:()=>void b(N.path),type:"button",children:[x?(0,t.jsx)(h.Spinner,{}):y??(0,t.jsx)(i,{})," ",j]})]})}],874801)},274730,e=>{"use strict";var t=e.i(843476),a=e.i(421645),n=e.i(434719),r=e.i(768877),i=e.i(762368),s=e.i(835079),l=e.i(515281),o=e.i(77071),d=e.i(741120),c=e.i(250832),u=e.i(573474),p=e.i(861745),h=e.i(948148),f=e.i(271645),m=e.i(778434),x=e.i(874801),g=e.i(340953),v=e.i(929592),b=e.i(487486),y=e.i(519455),j=e.i(515288),E=e.i(776639),C=e.i(82612),N=e.i(793479),S=e.i(110204),D=e.i(967489),_=e.i(987968),A=e.i(677572),R=e.i(624687),w=e.i(462777),I=e.i(520133),O=e.i(637611),T=e.i(975157);let k=`
5
+ }`,{input:{agentId:e,path:t,requestId:(0,m.createClientId)()}});if(a!==O.current)return;S(r.browseAgentDirectory),v?.(r.browseAgentDirectory.path),I(null)}catch(e){if(a!==O.current)return;I(e instanceof Error?e.message:String(e))}finally{a===O.current&&R(!1)}},[e,v]);if((0,o.useEffect)(()=>{if(!g)return;let e=window.setTimeout(()=>void T(g),0);return()=>window.clearTimeout(e)},[T,g]),(0,o.useEffect)(()=>()=>{O.current+=1},[]),!N)return(0,t.jsxs)("div",{className:"space-y-3",children:[w&&(0,t.jsx)(d.Alert,{variant:"destructive",children:(0,t.jsx)(d.AlertDescription,{children:w})}),(0,t.jsxs)(c.Button,{disabled:D||x,onClick:()=>void T(null),type:"button",variant:"outline",children:[D?(0,t.jsx)(h.Spinner,{}):(0,t.jsx)(n,{})," ",r??C("browseHome")]})]});let k="/"===(j=N.path)?[{label:"/",path:"/"}]:[{label:"/",path:"/"},...j.split("/").filter(Boolean).map((e,t,a)=>({label:e,path:`/${a.slice(0,t+1).join("/")}`}))];return(0,t.jsxs)("div",{className:"space-y-3 rounded-lg border p-3",children:[w&&(0,t.jsx)(d.Alert,{variant:"destructive",children:(0,t.jsx)(d.AlertDescription,{children:w})}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,t.jsx)(c.Button,{"aria-label":C("home"),disabled:D||x,onClick:()=>void T(N.homePath),size:"icon-sm",type:"button",variant:"ghost",children:(0,t.jsx)(s.default,{})}),k.map((e,r)=>(0,t.jsxs)("span",{className:"flex items-center",children:[r>0&&(0,t.jsx)(a.ChevronRight,{className:"size-3 text-muted-foreground"}),(0,t.jsx)(c.Button,{disabled:D||x,onClick:()=>void T(e.path),size:"sm",type:"button",variant:"ghost",children:e.label})]},e.path))]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(u.Checkbox,{checked:_,id:`show-hidden-${e}`,onCheckedChange:e=>A(!!e)}),(0,t.jsx)(p.Label,{htmlFor:`show-hidden-${e}`,children:C("showHidden")})]}),(0,t.jsx)("div",{className:"max-h-64 overflow-y-auto rounded-md border",children:N.entries.filter(e=>_||!e.hidden).map(e=>(0,t.jsxs)(c.Button,{className:"h-auto w-full justify-start rounded-none border-b px-3 py-2 last:border-0",disabled:D||x,onClick:()=>void T(e.path),size:"sm",type:"button",variant:"ghost",children:[(0,t.jsx)(n,{className:"size-4"})," ",e.name]},e.path))}),N.truncated&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:C("truncated")}),b&&E&&(0,t.jsxs)(c.Button,{disabled:D||x,onClick:()=>void b(N.path),type:"button",children:[x?(0,t.jsx)(h.Spinner,{}):y??(0,t.jsx)(i,{})," ",E]})]})}],874801)},274730,e=>{"use strict";var t=e.i(843476),a=e.i(421645),r=e.i(434719),n=e.i(768877),i=e.i(762368),s=e.i(835079),l=e.i(515281),o=e.i(77071),d=e.i(741120),c=e.i(250832),u=e.i(573474),p=e.i(861745),h=e.i(948148),m=e.i(271645),f=e.i(778434),x=e.i(874801),g=e.i(340953),v=e.i(929592),b=e.i(487486),y=e.i(519455),E=e.i(515288),j=e.i(776639),C=e.i(82612),N=e.i(793479),S=e.i(110204),_=e.i(967489),A=e.i(987968),D=e.i(677572),R=e.i(624687),w=e.i(462777),I=e.i(520133),O=e.i(637611),T=e.i(975157);let k=`
6
6
  id folder observedOrigin branch headSha upstream ahead behind syncState availability
7
7
  statusError defaultBranch localBranches remoteBranches lastCheckedAt lastFetchedAt lastFetchAttemptAt lastFetchError
8
- agent { ${m.AGENT_FIELDS} }
8
+ agent { ${f.AGENT_FIELDS} }
9
9
  activeJob { id agentId kind payload status idempotencyKey result error timeoutSeconds createdAt startedAt finishedAt updatedAt }
10
10
  `,B=`
11
11
  id canonicalOrigin displayOrigin name description jiraBranchRegex keepBaseBranchUpToDate createdAt updatedAt
12
12
  codebases { ${k} }
13
- `;function L({open:e,settings:r,onOpenChange:i,onSaved:s}){let l=(0,h.useTranslations)("codebases"),[o,d]=(0,f.useState)(String(r?.refreshIntervalSeconds??a.DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS)),[c,u]=(0,f.useState)(String(r?.fetchIntervalSeconds??n.DEFAULT_WORKTREE_FETCH_INTERVAL_SECONDS)),[p,m]=(0,f.useState)(r?.defaultJiraBranchRegex??n.DEFAULT_JIRA_BRANCH_REGEX),[x,g]=(0,f.useState)(!1),[b,j]=(0,f.useState)(null),C=Number(o),D=Number.isInteger(C)&&C>=a.MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS&&C<=a.MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS,A=Number(c),R=Number.isInteger(A)&&A>=n.MIN_WORKTREE_FETCH_INTERVAL_SECONDS&&A<=n.MAX_WORKTREE_FETCH_INTERVAL_SECONDS,w=!0;try{p&&RegExp(p,"i")}catch{w=!1}let I=async e=>{if(e.preventDefault(),D&&R&&w){g(!0);try{let e=await (0,O.controlPlaneRequest)(`mutation UpdateCodebaseSettings($input: UpdateCodebaseSettingsInput!) {
13
+ `;function L({open:e,settings:n,onOpenChange:i,onSaved:s}){let l=(0,h.useTranslations)("codebases"),[o,d]=(0,m.useState)(String(n?.refreshIntervalSeconds??a.DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS)),[c,u]=(0,m.useState)(String(n?.fetchIntervalSeconds??r.DEFAULT_WORKTREE_FETCH_INTERVAL_SECONDS)),[p,f]=(0,m.useState)(n?.defaultJiraBranchRegex??r.DEFAULT_JIRA_BRANCH_REGEX),[x,g]=(0,m.useState)(!1),[b,E]=(0,m.useState)(null),C=Number(o),_=Number.isInteger(C)&&C>=a.MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS&&C<=a.MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS,D=Number(c),R=Number.isInteger(D)&&D>=r.MIN_WORKTREE_FETCH_INTERVAL_SECONDS&&D<=r.MAX_WORKTREE_FETCH_INTERVAL_SECONDS,w=!0;try{p&&RegExp(p,"i")}catch{w=!1}let I=async e=>{if(e.preventDefault(),_&&R&&w){g(!0);try{let e=await (0,O.controlPlaneRequest)(`mutation UpdateCodebaseSettings($input: UpdateCodebaseSettingsInput!) {
14
14
  updateCodebaseSettings(input: $input) {
15
15
  refreshIntervalSeconds fetchIntervalSeconds defaultJiraBranchRegex updatedAt
16
16
  }
17
- }`,{input:{refreshIntervalSeconds:C,fetchIntervalSeconds:A,defaultJiraBranchRegex:p}});s(e.updateCodebaseSettings)}catch(e){j(e instanceof Error?e.message:String(e))}finally{g(!1)}}};return(0,t.jsx)(E.Dialog,{open:e,onOpenChange:i,children:(0,t.jsxs)(E.DialogContent,{children:[(0,t.jsxs)(E.DialogHeader,{children:[(0,t.jsx)(E.DialogTitle,{children:l("settingsTitle")}),(0,t.jsx)(E.DialogDescription,{children:l("settingsDescription")})]}),(0,t.jsxs)("form",{className:"space-y-4",onSubmit:I,children:[b&&(0,t.jsx)(v.Alert,{variant:"destructive",children:(0,t.jsx)(v.AlertDescription,{children:b})}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"codebase-refresh-interval",children:l("refreshInterval")}),(0,t.jsx)(N.Input,{id:"codebase-refresh-interval",inputMode:"numeric",max:a.MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS,min:a.MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS,onChange:e=>d(e.target.value),required:!0,step:1,type:"number",value:o}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l("refreshIntervalHelp",{min:a.MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS,max:a.MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"codebase-fetch-interval",children:l("fetchInterval")}),(0,t.jsx)(N.Input,{id:"codebase-fetch-interval",inputMode:"numeric",max:n.MAX_WORKTREE_FETCH_INTERVAL_SECONDS,min:n.MIN_WORKTREE_FETCH_INTERVAL_SECONDS,onChange:e=>u(e.target.value),required:!0,step:1,type:"number",value:c}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l("fetchIntervalHelp",{min:n.MIN_WORKTREE_FETCH_INTERVAL_SECONDS,max:n.MAX_WORKTREE_FETCH_INTERVAL_SECONDS})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"default-jira-branch-regex",children:l("defaultJiraBranchRegex")}),(0,t.jsx)(N.Input,{id:"default-jira-branch-regex",onChange:e=>m(e.target.value),value:p}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l("jiraBranchRegexHelp")})]}),(0,t.jsxs)(E.DialogFooter,{children:[(0,t.jsx)(y.Button,{onClick:()=>i(!1),type:"button",variant:"outline",children:l("cancel")}),(0,t.jsxs)(y.Button,{disabled:x||!D||!R||!w,type:"submit",children:[x&&(0,t.jsx)(_.Spinner,{})," ",l("save")]})]})]})]})})}function F({agents:e,entries:a,onFetch:n,onRemove:r}){let i=(0,h.useTranslations)("codebases");return(0,t.jsx)("div",{className:"space-y-6",children:e.map(e=>({agent:e,entries:a.filter(({codebase:t})=>t.agent.id===e.id)})).filter(({entries:e})=>e.length>0).map(({agent:e,entries:a})=>(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:e.name}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e.hostname}),(0,t.jsx)(b.Badge,{children:"ONLINE"===e.connectionStatus?i("online"):i("offline")})]}),(0,t.jsx)("div",{className:"grid gap-3 xl:grid-cols-2",children:a.map(({codebase:e,repository:a})=>(0,t.jsx)(M,{codebase:e,onFetch:n,onRemove:r,repository:a,showAgent:!1},e.id))})]},e.id))})}function P({repositories:e,onFetch:a,onRemove:n}){let r=(0,h.useTranslations)("codebases");return(0,t.jsx)("div",{className:"space-y-6",children:e.map(e=>(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:e.name}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:e.displayOrigin}),e.description&&(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e.description})]}),(0,t.jsx)(y.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsxs)(I.Link,{href:`/codebases/repositories/${e.id}`,children:[(0,t.jsx)(l.Pencil,{})," ",r("edit")]})})]}),(0,t.jsx)("div",{className:"grid gap-3 xl:grid-cols-2",children:e.codebases.map(r=>(0,t.jsx)(M,{codebase:r,onFetch:a,onRemove:n,repository:e,showAgent:!0,showMetadata:!1},r.id))})]},e.id))})}function M({codebase:e,repository:n,onFetch:s,onRemove:l,showAgent:o,showMetadata:d=!0}){let c=(0,h.useTranslations)("codebases"),f=(0,p.useLocale)(),m=e.activeJob,x="ONLINE"===e.agent.connectionStatus&&e.agent.capabilities.includes(a.CODEBASE_FETCH_JOB_KIND)&&"AVAILABLE"===e.availability&&!m,E=e=>e?new Date(e).toLocaleString(f):c("never"),C="AHEAD"===e.syncState||"BEHIND"===e.syncState?c(e.syncState.toLowerCase(),{count:"AHEAD"===e.syncState?e.ahead??0:e.behind??0}):c(`sync.${e.syncState}`);return(0,t.jsx)(j.Card,{children:(0,t.jsxs)(j.CardContent,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[d&&(0,t.jsx)("h3",{className:"font-medium",children:n.name}),o&&(0,t.jsx)("h3",{className:"font-medium",children:e.agent.name}),d&&n.description&&(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:n.description})]}),(0,t.jsx)(b.Badge,{className:(0,T.cn)("IN_SYNC"===e.syncState&&"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"),children:C})]}),(0,t.jsxs)("dl",{className:"grid gap-3 text-sm sm:grid-cols-2",children:[(0,t.jsx)(V,{label:c("folder"),value:e.folder,mono:!0}),(0,t.jsx)(V,{label:c("origin"),value:e.observedOrigin,mono:!0}),(0,t.jsx)(V,{label:c("branch"),value:e.branch??e.headSha?.slice(0,10)??c("unknown"),mono:!0}),(0,t.jsx)(V,{label:c("upstream"),value:e.upstream??c("none"),mono:!0}),(0,t.jsx)(V,{label:c("lastChecked"),value:E(e.lastCheckedAt)}),(0,t.jsx)(V,{label:c("lastFetched"),value:E(e.lastFetchedAt)})]}),(e.statusError||"AVAILABLE"!==e.availability)&&(0,t.jsx)(v.Alert,{variant:"destructive",children:(0,t.jsx)(v.AlertDescription,{children:e.statusError??c(`availability.${e.availability}`)})}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:m?c("operationRunning"):"OFFLINE"===e.agent.connectionStatus?c("offline"):""}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsxs)(I.Link,{href:`/codebases/${e.id}`,children:[c("view")," ",(0,t.jsx)(r.ArrowRight,{})]})}),(0,t.jsx)(g.ConfirmationDialog,{actionLabel:c("remove"),cancelLabel:c("cancel"),description:c("confirmRemoveDescription",{folder:e.folder}),onConfirm:()=>l(e.id),title:c("confirmRemoveTitle"),trigger:(0,t.jsxs)(y.Button,{disabled:!!m,size:"sm",variant:"destructive",children:[(0,t.jsx)(u.Trash2,{})," ",c("remove")]})}),(0,t.jsxs)(y.Button,{disabled:!x,onClick:()=>void s(e.id),size:"sm",variant:"outline",children:[m?(0,t.jsx)(_.Spinner,{}):(0,t.jsx)(i.Download,{})," ",c("fetch")]})]})]})]})})}function V({label:e,value:a,mono:n=!1}){return(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:(0,T.cn)("truncate",n&&"font-mono text-xs"),title:a,children:a})]})}function z({agents:e,open:n,onOpenChange:r,onAdded:i}){let l=(0,h.useTranslations)("codebases"),[o,d]=(0,f.useState)(""),[c,u]=(0,f.useState)(null),[p,m]=(0,f.useState)(null),[g,b]=(0,f.useState)(""),[j,C]=(0,f.useState)(""),[A,I]=(0,f.useState)(!1),[T,k]=(0,f.useState)(null),B=(0,f.useRef)(0),L=e.filter(e=>"ONLINE"===e.connectionStatus&&e.capabilities.includes(a.CODEBASE_BROWSE_JOB_KIND)&&e.capabilities.includes(a.CODEBASE_INSPECT_JOB_KIND)),F=L.find(e=>e.id===o),P=()=>{B.current+=1,d(""),u(null),m(null),b(""),C(""),k(null),I(!1)},M=e=>{e||P(),r(e)},$=async e=>{let t=++B.current;I(!0);try{let a=await (0,O.controlPlaneRequest)(`mutation InspectAgentCodebase($input: InspectAgentCodebaseInput!) {
17
+ }`,{input:{refreshIntervalSeconds:C,fetchIntervalSeconds:D,defaultJiraBranchRegex:p}});s(e.updateCodebaseSettings)}catch(e){E(e instanceof Error?e.message:String(e))}finally{g(!1)}}};return(0,t.jsx)(j.Dialog,{open:e,onOpenChange:i,children:(0,t.jsxs)(j.DialogContent,{children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsx)(j.DialogTitle,{children:l("settingsTitle")}),(0,t.jsx)(j.DialogDescription,{children:l("settingsDescription")})]}),(0,t.jsxs)("form",{className:"space-y-4",onSubmit:I,children:[b&&(0,t.jsx)(v.Alert,{variant:"destructive",children:(0,t.jsx)(v.AlertDescription,{children:b})}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"codebase-refresh-interval",children:l("refreshInterval")}),(0,t.jsx)(N.Input,{id:"codebase-refresh-interval",inputMode:"numeric",max:a.MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS,min:a.MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS,onChange:e=>d(e.target.value),required:!0,step:1,type:"number",value:o}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l("refreshIntervalHelp",{min:a.MIN_CODEBASE_RECONCILE_INTERVAL_SECONDS,max:a.MAX_CODEBASE_RECONCILE_INTERVAL_SECONDS})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"codebase-fetch-interval",children:l("fetchInterval")}),(0,t.jsx)(N.Input,{id:"codebase-fetch-interval",inputMode:"numeric",max:r.MAX_WORKTREE_FETCH_INTERVAL_SECONDS,min:r.MIN_WORKTREE_FETCH_INTERVAL_SECONDS,onChange:e=>u(e.target.value),required:!0,step:1,type:"number",value:c}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l("fetchIntervalHelp",{min:r.MIN_WORKTREE_FETCH_INTERVAL_SECONDS,max:r.MAX_WORKTREE_FETCH_INTERVAL_SECONDS})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"default-jira-branch-regex",children:l("defaultJiraBranchRegex")}),(0,t.jsx)(N.Input,{id:"default-jira-branch-regex",onChange:e=>f(e.target.value),value:p}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:l("jiraBranchRegexHelp")})]}),(0,t.jsxs)(j.DialogFooter,{children:[(0,t.jsx)(y.Button,{onClick:()=>i(!1),type:"button",variant:"outline",children:l("cancel")}),(0,t.jsxs)(y.Button,{disabled:x||!_||!R||!w,type:"submit",children:[x&&(0,t.jsx)(A.Spinner,{})," ",l("save")]})]})]})]})})}function F({agents:e,entries:a,onFetch:r,onRemove:n}){let i=(0,h.useTranslations)("codebases");return(0,t.jsx)("div",{className:"space-y-6",children:e.map(e=>({agent:e,entries:a.filter(({codebase:t})=>t.agent.id===e.id)})).filter(({entries:e})=>e.length>0).map(({agent:e,entries:a})=>(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:e.name}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e.hostname}),(0,t.jsx)(b.Badge,{children:"ONLINE"===e.connectionStatus?i("online"):i("offline")})]}),(0,t.jsx)("div",{className:"grid gap-3 xl:grid-cols-2",children:a.map(({codebase:e,repository:a})=>(0,t.jsx)(M,{codebase:e,onFetch:r,onRemove:n,repository:a,showAgent:!1},e.id))})]},e.id))})}function P({repositories:e,onFetch:a,onRemove:r}){let n=(0,h.useTranslations)("codebases");return(0,t.jsx)("div",{className:"space-y-6",children:e.map(e=>(0,t.jsxs)("section",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold",children:e.name}),(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:e.displayOrigin}),e.description&&(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e.description})]}),(0,t.jsx)(y.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsxs)(I.Link,{href:`/codebases/repositories/${e.id}`,children:[(0,t.jsx)(l.Pencil,{})," ",n("edit")]})})]}),(0,t.jsx)("div",{className:"grid gap-3 xl:grid-cols-2",children:e.codebases.map(n=>(0,t.jsx)(M,{codebase:n,onFetch:a,onRemove:r,repository:e,showAgent:!0,showMetadata:!1},n.id))})]},e.id))})}function M({codebase:e,repository:r,onFetch:s,onRemove:l,showAgent:o,showMetadata:d=!0}){let c=(0,h.useTranslations)("codebases"),m=(0,p.useLocale)(),f=e.activeJob,x="ONLINE"===e.agent.connectionStatus&&e.agent.capabilities.includes(a.CODEBASE_FETCH_JOB_KIND)&&"AVAILABLE"===e.availability&&!f,j=e=>e?new Date(e).toLocaleString(m):c("never"),C="AHEAD"===e.syncState||"BEHIND"===e.syncState?c(e.syncState.toLowerCase(),{count:"AHEAD"===e.syncState?e.ahead??0:e.behind??0}):c(`sync.${e.syncState}`);return(0,t.jsx)(E.Card,{children:(0,t.jsxs)(E.CardContent,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[d&&(0,t.jsx)("h3",{className:"font-medium",children:r.name}),o&&(0,t.jsx)("h3",{className:"font-medium",children:e.agent.name}),d&&r.description&&(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:r.description})]}),(0,t.jsx)(b.Badge,{className:(0,T.cn)("IN_SYNC"===e.syncState&&"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300"),children:C})]}),(0,t.jsxs)("dl",{className:"grid gap-3 text-sm sm:grid-cols-2",children:[(0,t.jsx)(V,{label:c("folder"),value:e.folder,mono:!0}),(0,t.jsx)(V,{label:c("origin"),value:e.observedOrigin,mono:!0}),(0,t.jsx)(V,{label:c("branch"),value:e.branch??e.headSha?.slice(0,10)??c("unknown"),mono:!0}),(0,t.jsx)(V,{label:c("upstream"),value:e.upstream??c("none"),mono:!0}),(0,t.jsx)(V,{label:c("lastChecked"),value:j(e.lastCheckedAt)}),(0,t.jsx)(V,{label:c("lastFetched"),value:j(e.lastFetchedAt)})]}),(e.statusError||"AVAILABLE"!==e.availability)&&(0,t.jsx)(v.Alert,{variant:"destructive",children:(0,t.jsx)(v.AlertDescription,{children:e.statusError??c(`availability.${e.availability}`)})}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:f?c("operationRunning"):"OFFLINE"===e.agent.connectionStatus?c("offline"):""}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(y.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsxs)(I.Link,{href:`/codebases/${e.id}`,children:[c("view")," ",(0,t.jsx)(n.ArrowRight,{})]})}),(0,t.jsx)(g.ConfirmationDialog,{actionLabel:c("remove"),cancelLabel:c("cancel"),description:c("confirmRemoveDescription",{folder:e.folder}),onConfirm:()=>l(e.id),title:c("confirmRemoveTitle"),trigger:(0,t.jsxs)(y.Button,{disabled:!!f,size:"sm",variant:"destructive",children:[(0,t.jsx)(u.Trash2,{})," ",c("remove")]})}),(0,t.jsxs)(y.Button,{disabled:!x,onClick:()=>void s(e.id),size:"sm",variant:"outline",children:[f?(0,t.jsx)(A.Spinner,{}):(0,t.jsx)(i.Download,{})," ",c("fetch")]})]})]})]})})}function V({label:e,value:a,mono:r=!1}){return(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("dd",{className:(0,T.cn)("truncate",r&&"font-mono text-xs"),title:a,children:a})]})}function $({agents:e,open:r,onOpenChange:n,onAdded:i}){let l=(0,h.useTranslations)("codebases"),[o,d]=(0,m.useState)(""),[c,u]=(0,m.useState)(null),[p,f]=(0,m.useState)(null),[g,b]=(0,m.useState)(""),[E,C]=(0,m.useState)(""),[D,I]=(0,m.useState)(!1),[T,k]=(0,m.useState)(null),B=(0,m.useRef)(0),L=e.filter(e=>"ONLINE"===e.connectionStatus&&e.capabilities.includes(a.CODEBASE_BROWSE_JOB_KIND)&&e.capabilities.includes(a.CODEBASE_INSPECT_JOB_KIND)),F=L.find(e=>e.id===o),P=()=>{B.current+=1,d(""),u(null),f(null),b(""),C(""),k(null),I(!1)},M=e=>{e||P(),n(e)},H=async e=>{let t=++B.current;I(!0);try{let a=await (0,O.controlPlaneRequest)(`mutation InspectAgentCodebase($input: InspectAgentCodebaseInput!) {
18
18
  inspectAgentCodebase(input: $input) {
19
19
  jobId
20
20
  snapshot { folder observedOrigin canonicalOrigin displayOrigin branch syncState }
21
21
  existingRepository { id canonicalOrigin displayOrigin name description createdAt updatedAt }
22
22
  }
23
- }`,{input:{agentId:o,folder:e,requestId:(0,w.createClientId)()}});if(t!==B.current)return;let n=a.inspectAgentCodebase;m(n);let r=n.snapshot.displayOrigin.split("/").at(-1)??"";b(n.existingRepository?.name??r),C(n.existingRepository?.description??""),k(null)}catch(e){if(t!==B.current)return;k(e instanceof Error?e.message:String(e))}finally{t===B.current&&I(!1)}},H=async e=>{if(e.preventDefault(),p){I(!0);try{await (0,O.controlPlaneRequest)(`mutation ConfirmCodebase($input: ConfirmCodebaseInput!) {
23
+ }`,{input:{agentId:o,folder:e,requestId:(0,w.createClientId)()}});if(t!==B.current)return;let r=a.inspectAgentCodebase;f(r);let n=r.snapshot.displayOrigin.split("/").at(-1)??"";b(r.existingRepository?.name??n),C(r.existingRepository?.description??""),k(null)}catch(e){if(t!==B.current)return;k(e instanceof Error?e.message:String(e))}finally{t===B.current&&I(!1)}},K=async e=>{if(e.preventDefault(),p){I(!0);try{await (0,O.controlPlaneRequest)(`mutation ConfirmCodebase($input: ConfirmCodebaseInput!) {
24
24
  confirmCodebase(input: $input) { id }
25
- }`,{input:{inspectionJobId:p.jobId,name:g,description:j}}),P(),await i()}catch(e){k(e instanceof Error?e.message:String(e))}finally{I(!1)}}};return(0,t.jsx)(E.Dialog,{open:n,onOpenChange:M,children:(0,t.jsxs)(E.DialogContent,{className:"sm:max-w-2xl",children:[(0,t.jsxs)(E.DialogHeader,{children:[(0,t.jsx)(E.DialogTitle,{children:l("addTitle")}),(0,t.jsx)(E.DialogDescription,{children:l("addDescription")})]}),(0,t.jsxs)("form",{className:"space-y-4",onSubmit:H,children:[T&&(0,t.jsx)(v.Alert,{variant:"destructive",children:(0,t.jsx)(v.AlertDescription,{children:T})}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"codebase-agent",children:l("agent")}),(0,t.jsxs)(D.Select,{onValueChange:e=>{B.current+=1,d(e),u(null),m(null),I(!1),k(null)},value:o,children:[(0,t.jsx)(D.SelectTrigger,{className:"w-full",id:"codebase-agent",children:(0,t.jsx)(D.SelectValue,{placeholder:l("selectAgent")})}),(0,t.jsx)(D.SelectContent,{children:L.map(e=>(0,t.jsxs)(D.SelectItem,{value:e.id,children:[e.name," · ",e.hostname]},e.id))})]})]}),o&&!p&&(0,t.jsx)(x.AgentDirectoryBrowser,{agentId:o,disabled:A,initialPath:F?.baseRepoDirectory,onPathChange:u},o),p&&(0,t.jsxs)("div",{className:"space-y-4 rounded-lg border p-4",children:[(0,t.jsx)(V,{label:l("folder"),value:p.snapshot.folder,mono:!0}),(0,t.jsx)(V,{label:l("origin"),value:p.snapshot.displayOrigin,mono:!0}),(0,t.jsx)(V,{label:l("branch"),value:p.snapshot.branch??l("detached"),mono:!0}),p.existingRepository?(0,t.jsx)(v.Alert,{children:(0,t.jsx)(v.AlertDescription,{children:l("existingOrigin",{name:p.existingRepository.name})})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"codebase-name",children:l("name")}),(0,t.jsx)(N.Input,{id:"codebase-name",maxLength:120,onChange:e=>b(e.target.value),required:!0,value:g})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"codebase-description",children:l("repositoryDescription")}),(0,t.jsx)(R.Textarea,{id:"codebase-description",maxLength:2e3,onChange:e=>C(e.target.value),value:j})]})]})]}),(0,t.jsxs)(E.DialogFooter,{className:"flex-row items-center justify-between sm:justify-between",children:[c&&!p&&(0,t.jsxs)(y.Button,{disabled:A,onClick:()=>void $(c),type:"button",children:[A?(0,t.jsx)(_.Spinner,{}):(0,t.jsx)(s.FolderGit2,{})," ",l("addFolder")]}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(y.Button,{onClick:()=>M(!1),type:"button",variant:"outline",children:l("cancel")}),p&&(0,t.jsxs)(y.Button,{disabled:A||!p.existingRepository&&!g.trim(),type:"submit",children:[A&&(0,t.jsx)(_.Spinner,{})," ",l("confirm")]})]})]})]})]})})}e.s(["CodebasesPage",0,function(){let e=(0,h.useTranslations)("codebases"),[n,r]=(0,f.useState)([]),[l,u]=(0,f.useState)([]),[p,x]=(0,f.useState)(null),[g,b]=(0,f.useState)("agents"),[j,E]=(0,f.useState)(!0),[N,S]=(0,f.useState)(!1),[D,R]=(0,f.useState)(null),[I,T]=(0,f.useState)(null),[k,M]=(0,f.useState)(!1),[V,$]=(0,f.useState)(!1),H=(0,f.useRef)(0),K=(0,f.useCallback)(async()=>{let e=++H.current;try{let t=await (0,O.controlPlaneRequest)(`query CodebaseOverview {
25
+ }`,{input:{inspectionJobId:p.jobId,name:g,description:E}}),P(),await i()}catch(e){k(e instanceof Error?e.message:String(e))}finally{I(!1)}}};return(0,t.jsx)(j.Dialog,{open:r,onOpenChange:M,children:(0,t.jsxs)(j.DialogContent,{className:"sm:max-w-2xl",children:[(0,t.jsxs)(j.DialogHeader,{children:[(0,t.jsx)(j.DialogTitle,{children:l("addTitle")}),(0,t.jsx)(j.DialogDescription,{children:l("addDescription")})]}),(0,t.jsxs)("form",{className:"space-y-4",onSubmit:K,children:[T&&(0,t.jsx)(v.Alert,{variant:"destructive",children:(0,t.jsx)(v.AlertDescription,{children:T})}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"codebase-agent",children:l("agent")}),(0,t.jsxs)(_.Select,{onValueChange:e=>{B.current+=1,d(e),u(null),f(null),I(!1),k(null)},value:o,children:[(0,t.jsx)(_.SelectTrigger,{className:"w-full",id:"codebase-agent",children:(0,t.jsx)(_.SelectValue,{placeholder:l("selectAgent")})}),(0,t.jsx)(_.SelectContent,{children:L.map(e=>(0,t.jsxs)(_.SelectItem,{value:e.id,children:[e.name," · ",e.hostname]},e.id))})]})]}),o&&!p&&(0,t.jsx)(x.AgentDirectoryBrowser,{agentId:o,disabled:D,initialPath:F?.baseRepoDirectory,onPathChange:u},o),p&&(0,t.jsxs)("div",{className:"space-y-4 rounded-lg border p-4",children:[(0,t.jsx)(V,{label:l("folder"),value:p.snapshot.folder,mono:!0}),(0,t.jsx)(V,{label:l("origin"),value:p.snapshot.displayOrigin,mono:!0}),(0,t.jsx)(V,{label:l("branch"),value:p.snapshot.branch??l("detached"),mono:!0}),p.existingRepository?(0,t.jsx)(v.Alert,{children:(0,t.jsx)(v.AlertDescription,{children:l("existingOrigin",{name:p.existingRepository.name})})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"codebase-name",children:l("name")}),(0,t.jsx)(N.Input,{id:"codebase-name",maxLength:120,onChange:e=>b(e.target.value),required:!0,value:g})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"codebase-description",children:l("repositoryDescription")}),(0,t.jsx)(R.Textarea,{id:"codebase-description",maxLength:2e3,onChange:e=>C(e.target.value),value:E})]})]})]}),(0,t.jsxs)(j.DialogFooter,{className:"flex-row items-center justify-between sm:justify-between",children:[c&&!p&&(0,t.jsxs)(y.Button,{disabled:D,onClick:()=>void H(c),type:"button",children:[D?(0,t.jsx)(A.Spinner,{}):(0,t.jsx)(s.FolderGit2,{})," ",l("addFolder")]}),(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsx)(y.Button,{onClick:()=>M(!1),type:"button",variant:"outline",children:l("cancel")}),p&&(0,t.jsxs)(y.Button,{disabled:D||!p.existingRepository&&!g.trim(),type:"submit",children:[D&&(0,t.jsx)(A.Spinner,{})," ",l("confirm")]})]})]})]})]})})}e.s(["CodebasesPage",0,function(){let e=(0,h.useTranslations)("codebases"),[r,n]=(0,m.useState)([]),[l,u]=(0,m.useState)([]),[p,x]=(0,m.useState)(null),[g,b]=(0,m.useState)("agents"),[E,j]=(0,m.useState)(!0),[N,S]=(0,m.useState)(!1),[_,R]=(0,m.useState)(null),[I,T]=(0,m.useState)(null),[k,M]=(0,m.useState)(!1),[V,H]=(0,m.useState)(!1),K=(0,m.useRef)(0),z=(0,m.useCallback)(async()=>{let e=++K.current;try{let t=await (0,O.controlPlaneRequest)(`query CodebaseOverview {
26
26
  codebaseOverview { repositories { ${B} } }
27
27
  codebaseSettings { refreshIntervalSeconds fetchIntervalSeconds defaultJiraBranchRegex updatedAt }
28
- agents { ${m.AGENT_FIELDS} }
29
- }`);if(e!==H.current)return;r(t.codebaseOverview.repositories),x(t.codebaseSettings),u(t.agents),R(null)}catch(t){if(e!==H.current)return;R(t instanceof Error?t.message:String(t))}finally{e===H.current&&E(!1)}},[]);(0,f.useEffect)(()=>{let e=null,t=window.setTimeout(()=>void K(),0),a=window.setInterval(()=>void K(),3e4),n=(0,O.controlPlaneSubscriptions)().subscribe({query:`subscription CodebaseOverviewChanged {
28
+ agents { ${f.AGENT_FIELDS} }
29
+ }`);if(e!==K.current)return;n(t.codebaseOverview.repositories),x(t.codebaseSettings),u(t.agents),R(null)}catch(t){if(e!==K.current)return;R(t instanceof Error?t.message:String(t))}finally{e===K.current&&j(!1)}},[]);(0,m.useEffect)(()=>{let e=null,t=window.setTimeout(()=>void z(),0),a=window.setInterval(()=>void z(),3e4),r=(0,O.controlPlaneSubscriptions)().subscribe({query:`subscription CodebaseOverviewChanged {
30
30
  codebaseOverviewChanged { codebaseId repositoryId }
31
- }`},{next:()=>{null!==e&&window.clearTimeout(e),e=window.setTimeout(()=>{e=null,K()},100)},error:()=>void 0,complete:()=>void 0});return()=>{window.clearTimeout(t),window.clearInterval(a),null!==e&&window.clearTimeout(e),H.current+=1,n()}},[K]);let J=(0,f.useMemo)(()=>n.flatMap(e=>e.codebases.map(t=>({codebase:t,repository:e}))),[n]),W=async(t,a=J.map(({codebase:e})=>e.id))=>{S(!0);try{let n=(await (0,O.controlPlaneRequest)(`mutation RunCodebaseOperation($input: RunCodebaseOperationInput!) {
31
+ }`},{next:()=>{null!==e&&window.clearTimeout(e),e=window.setTimeout(()=>{e=null,z()},100)},error:()=>void 0,complete:()=>void 0});return()=>{window.clearTimeout(t),window.clearInterval(a),null!==e&&window.clearTimeout(e),K.current+=1,r()}},[z]);let J=(0,m.useMemo)(()=>r.flatMap(e=>e.codebases.map(t=>({codebase:t,repository:e}))),[r]),W=async(t,a=J.map(({codebase:e})=>e.id))=>{S(!0);try{let r=(await (0,O.controlPlaneRequest)(`mutation RunCodebaseOperation($input: RunCodebaseOperationInput!) {
32
32
  ${t}(input: $input) {
33
33
  jobs { id }
34
34
  skipped { codebaseId reason }
35
35
  }
36
- }`,{input:{codebaseIds:a,requestId:(0,w.createClientId)()}}))[t];T(n?.skipped.length?e("skipped",{count:n.skipped.length}):"fetchCodebases"===t?e("fetchQueued"):e("refreshQueued")),R(null),await K()}catch(e){R(e instanceof Error?e.message:String(e)),T(null)}finally{S(!1)}},q=async t=>{S(!0);try{await (0,O.controlPlaneRequest)(`mutation RemoveCodebase($id: ID!) {
36
+ }`,{input:{codebaseIds:a,requestId:(0,w.createClientId)()}}))[t];T(r?.skipped.length?e("skipped",{count:r.skipped.length}):"fetchCodebases"===t?e("fetchQueued"):e("refreshQueued")),R(null),await z()}catch(e){R(e instanceof Error?e.message:String(e)),T(null)}finally{S(!1)}},q=async t=>{S(!0);try{await (0,O.controlPlaneRequest)(`mutation RemoveCodebase($id: ID!) {
37
37
  removeCodebase(id: $id) { id repositoryId repositoryRemoved }
38
- }`,{id:t}),T(e("removed")),R(null),await K()}catch(e){R(e instanceof Error?e.message:String(e)),T(null)}finally{S(!1)}};return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-[1500px] flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:e("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e("description")})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsxs)(y.Button,{disabled:N||0===J.length,onClick:()=>void W("refreshCodebases"),variant:"outline",children:[(0,t.jsx)(d.RefreshCw,{className:N?"animate-spin":void 0}),e("refreshAll")]}),(0,t.jsxs)(y.Button,{disabled:N||0===J.length,onClick:()=>void W("fetchCodebases"),variant:"outline",children:[(0,t.jsx)(i.Download,{}),e("fetchAll")]}),(0,t.jsxs)(y.Button,{disabled:!p,onClick:()=>$(!0),variant:"outline",children:[(0,t.jsx)(c.Settings2,{}),e("settings")]}),(0,t.jsxs)(y.Button,{onClick:()=>M(!0),children:[(0,t.jsx)(o.Plus,{}),e("add")]})]})]}),D&&(0,t.jsx)(v.Alert,{variant:"destructive",children:(0,t.jsx)(v.AlertDescription,{children:D})}),I&&(0,t.jsx)(v.Alert,{children:(0,t.jsx)(v.AlertDescription,{children:I})}),(0,t.jsx)(A.Tabs,{onValueChange:e=>b(e),value:g,children:(0,t.jsxs)(A.TabsList,{"aria-label":e("groupBy"),children:[(0,t.jsx)(A.TabsTrigger,{value:"agents",children:e("agents")}),(0,t.jsx)(A.TabsTrigger,{value:"repositories",children:e("repositories")})]})}),j?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(_.Spinner,{})," ",e("loading")]}):0===J.length?(0,t.jsx)(C.Empty,{className:"border py-12",children:(0,t.jsxs)(C.EmptyHeader,{children:[(0,t.jsx)(C.EmptyMedia,{variant:"icon",children:(0,t.jsx)(s.FolderGit2,{})}),(0,t.jsx)(C.EmptyTitle,{children:e("emptyTitle")}),(0,t.jsx)(C.EmptyDescription,{children:e("emptyDescription")})]})}):"agents"===g?(0,t.jsx)(F,{agents:l,entries:J,onFetch:e=>W("fetchCodebases",[e]),onRemove:q}):(0,t.jsx)(P,{repositories:n,onFetch:e=>W("fetchCodebases",[e]),onRemove:q}),(0,t.jsx)(z,{agents:l,onAdded:async()=>{M(!1),await K()},onOpenChange:M,open:k}),(0,t.jsx)(L,{onOpenChange:$,onSaved:t=>{x(t),$(!1),T(e("settingsSaved")),R(null)},open:V,settings:p},`${V?"open":"closed"}-${p?.refreshIntervalSeconds??a.DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS}`)]})}])}]);
38
+ }`,{id:t}),T(e("removed")),R(null),await z()}catch(e){R(e instanceof Error?e.message:String(e)),T(null)}finally{S(!1)}};return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-[1500px] flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:e("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e("description")})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsxs)(y.Button,{disabled:N||0===J.length,onClick:()=>void W("refreshCodebases"),variant:"outline",children:[(0,t.jsx)(d.RefreshCw,{className:N?"animate-spin":void 0}),e("refreshAll")]}),(0,t.jsxs)(y.Button,{disabled:N||0===J.length,onClick:()=>void W("fetchCodebases"),variant:"outline",children:[(0,t.jsx)(i.Download,{}),e("fetchAll")]}),(0,t.jsxs)(y.Button,{disabled:!p,onClick:()=>H(!0),variant:"outline",children:[(0,t.jsx)(c.Settings2,{}),e("settings")]}),(0,t.jsxs)(y.Button,{onClick:()=>M(!0),children:[(0,t.jsx)(o.Plus,{}),e("add")]})]})]}),_&&(0,t.jsx)(v.Alert,{variant:"destructive",children:(0,t.jsx)(v.AlertDescription,{children:_})}),I&&(0,t.jsx)(v.Alert,{children:(0,t.jsx)(v.AlertDescription,{children:I})}),(0,t.jsx)(D.Tabs,{onValueChange:e=>b(e),value:g,children:(0,t.jsxs)(D.TabsList,{"aria-label":e("groupBy"),children:[(0,t.jsx)(D.TabsTrigger,{value:"agents",children:e("agents")}),(0,t.jsx)(D.TabsTrigger,{value:"repositories",children:e("repositories")})]})}),E?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(A.Spinner,{})," ",e("loading")]}):0===J.length?(0,t.jsx)(C.Empty,{className:"border py-12",children:(0,t.jsxs)(C.EmptyHeader,{children:[(0,t.jsx)(C.EmptyMedia,{variant:"icon",children:(0,t.jsx)(s.FolderGit2,{})}),(0,t.jsx)(C.EmptyTitle,{children:e("emptyTitle")}),(0,t.jsx)(C.EmptyDescription,{children:e("emptyDescription")})]})}):"agents"===g?(0,t.jsx)(F,{agents:l,entries:J,onFetch:e=>W("fetchCodebases",[e]),onRemove:q}):(0,t.jsx)(P,{repositories:r,onFetch:e=>W("fetchCodebases",[e]),onRemove:q}),(0,t.jsx)($,{agents:l,onAdded:async()=>{M(!1),await z()},onOpenChange:M,open:k}),(0,t.jsx)(L,{onOpenChange:H,onSaved:t=>{x(t),H(!1),T(e("settingsSaved")),R(null)},open:V,settings:p},`${V?"open":"closed"}-${p?.refreshIntervalSeconds??a.DEFAULT_CODEBASE_RECONCILE_INTERVAL_SECONDS}`)]})}])}]);
@@ -1,4 +1,4 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(30030);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function l(...e){return a.useCallback(function(...e){return t=>{let a=!1,n=e.map(e=>{let n=r(e,t);return a||"function"!=typeof n||(a=!0),n});if(a)return()=>{for(let t=0;t<n.length;t++){let a=n[t];"function"==typeof a?a():r(e[t],null)}}}}(...e),e)}var i=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var s="AlertDialog",[o,d]=(0,n.createContextScope)(s,[i.createDialogScope]),c=(0,i.createDialogScope)(),u=e=>{let{__scopeAlertDialog:a,...n}=e,r=c(a);return(0,t.jsx)(i.Root,{...r,...n,modal:!0})};u.displayName=s;var m=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,l=c(n);return(0,t.jsx)(i.Trigger,{...l,...r,ref:a})});m.displayName="AlertDialogTrigger";var p=e=>{let{__scopeAlertDialog:a,...n}=e,r=c(a);return(0,t.jsx)(i.Portal,{...r,...n})};p.displayName="AlertDialogPortal";var x=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,l=c(n);return(0,t.jsx)(i.Overlay,{...l,...r,ref:a})});x.displayName="AlertDialogOverlay";var g="AlertDialogContent",[f,h]=o(g),j=a.forwardRef((e,n)=>{let{__scopeAlertDialog:r,children:s,...o}=e,d=c(r),u=l(n,a.useRef(null)),m=a.useRef(null);return(0,t.jsx)(f,{scope:r,cancelRef:m,children:(0,t.jsx)(i.Content,{role:"alertdialog",...d,...o,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(n){if(e?.(n),!1===a||!n||!n.defaultPrevented)return t?.(n)}}(o.onOpenAutoFocus,e=>{e.preventDefault(),m.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:s})})});j.displayName=g;var v=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,l=c(n);return(0,t.jsx)(i.Title,{...l,...r,ref:a})});v.displayName="AlertDialogTitle";var b=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,l=c(n);return(0,t.jsx)(i.Description,{...l,...r,ref:a})});b.displayName="AlertDialogDescription";var y=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,l=c(n);return(0,t.jsx)(i.Close,{...l,...r,ref:a})});y.displayName="AlertDialogAction";var S="AlertDialogCancel",C=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=h(S,n),o=c(n),d=l(a,s);return(0,t.jsx)(i.Close,{...o,...r,ref:d})});C.displayName=S,e.s(["Action",0,y,"AlertDialog",0,u,"AlertDialogAction",0,y,"AlertDialogCancel",0,C,"AlertDialogContent",0,j,"AlertDialogDescription",0,b,"AlertDialogOverlay",0,x,"AlertDialogPortal",0,p,"AlertDialogTitle",0,v,"AlertDialogTrigger",0,m,"Cancel",0,C,"Content",0,j,"Description",0,b,"Overlay",0,x,"Portal",0,p,"Root",0,u,"Title",0,v,"Trigger",0,m,"createAlertDialogScope",0,d],691162);var k=e.i(691162),k=k,N=e.i(975157),w=e.i(519455);function A({...e}){return(0,t.jsx)(k.Root,{"data-slot":"alert-dialog",...e})}function D({...e}){return(0,t.jsx)(k.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function T({...e}){return(0,t.jsx)(k.Portal,{"data-slot":"alert-dialog-portal",...e})}function R({className:e,...a}){return(0,t.jsx)(k.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,N.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function E({className:e,size:a="default",...n}){return(0,t.jsxs)(T,{children:[(0,t.jsx)(R,{}),(0,t.jsx)(k.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,N.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...n})]})}function I({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,N.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function P({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,N.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function H({className:e,...a}){return(0,t.jsx)(k.Title,{"data-slot":"alert-dialog-title",className:(0,N.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function q({className:e,...a}){return(0,t.jsx)(k.Description,{"data-slot":"alert-dialog-description",className:(0,N.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function z({className:e,variant:a="default",size:n="default",...r}){return(0,t.jsx)(w.Button,{variant:a,size:n,asChild:!0,children:(0,t.jsx)(k.Action,{"data-slot":"alert-dialog-action",className:(0,N.cn)(e),...r})})}function L({className:e,variant:a="outline",size:n="default",...r}){return(0,t.jsx)(w.Button,{variant:a,size:n,asChild:!0,children:(0,t.jsx)(k.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,N.cn)(e),...r})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:a,description:n,onConfirm:r,onOpenChange:l,open:i,title:s,trigger:o}){return(0,t.jsxs)(A,{onOpenChange:l,open:i,children:[o&&(0,t.jsx)(D,{asChild:!0,children:o}),(0,t.jsxs)(E,{children:[(0,t.jsxs)(I,{children:[(0,t.jsx)(H,{children:s}),(0,t.jsx)(q,{children:n})]}),(0,t.jsxs)(P,{children:[(0,t.jsx)(L,{children:a}),(0,t.jsx)(z,{onClick:()=>void r(),variant:"destructive",children:e})]})]})]})}],340953)},482022,e=>{"use strict";let t=(0,e.i(456420).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],482022)},856522,e=>{"use strict";let t=(0,e.i(456420).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",0,t],856522)},452330,725981,e=>{"use strict";var t=e.i(456420);let a=(0,t.default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",0,a],452330);let n=(0,t.default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,n],725981)},825398,e=>{"use strict";let t=(0,e.i(456420).default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);e.s(["RotateCw",0,t],825398)},534710,e=>{"use strict";var t=e.i(843476),a=e.i(456420);let n=(0,a.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var r=e.i(452330),l=e.i(482022),i=e.i(634398);let s=(0,a.default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);var o=e.i(825398),d=e.i(856522);let c=(0,a.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var u=e.i(573474);let m=(0,a.default)("unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);var p=e.i(725981),x=e.i(948148),g=e.i(271645),f=e.i(340953),h=e.i(929592),j=e.i(487486),v=e.i(519455),b=e.i(515288),y=e.i(793479),S=e.i(110204),C=e.i(987968),k=e.i(637611);let N="siteUrl email tokenConfigured cacheTtlSeconds updatedAt";function w({embedded:e=!1}={}){let a=(0,x.useTranslations)("jiraSettings"),r=(0,x.useTranslations)("common"),[l,i]=(0,g.useState)(null),[o,c]=(0,g.useState)(""),[p,A]=(0,g.useState)(""),[D,T]=(0,g.useState)(""),[R,E]=(0,g.useState)(null),[I,P]=(0,g.useState)(!0),[H,q]=(0,g.useState)(!1),[z,L]=(0,g.useState)(null),[G,M]=(0,g.useState)(null),[B,$]=(0,g.useState)(!1),F=e=>{i(e),c(e.siteUrl??""),A(e.email??""),T("")},K=(0,g.useCallback)(async()=>{try{let e=await (0,k.controlPlaneRequest)(`query { jiraSettings { ${N} } }`);F(e.jiraSettings)}catch(e){L(e instanceof Error?e.message:String(e))}finally{P(!1)}},[]);(0,g.useEffect)(()=>{let e=window.setTimeout(()=>void K(),0);return()=>window.clearTimeout(e)},[K]);let O=async e=>{q(!0);try{let t=await (0,k.controlPlaneRequest)(`mutation SaveJiraSettings($input: SaveJiraSettingsInput!) { saveJiraSettings(input: $input) { ${N} } }`,{input:{siteUrl:o,email:p,apiToken:D||null,resetSite:e}});F(t.saveJiraSettings),E(null),L(null),M(a("saved"))}catch(e){L(e instanceof Error?e.message:String(e)),M(null)}finally{q(!1)}},V=async()=>{q(!0);try{let e=await (0,k.controlPlaneRequest)("mutation { testJiraConnection { accountId displayName emailAddress } }");E(e.testJiraConnection),L(null),M(a("connectionSucceeded"))}catch(e){E(null),L(e instanceof Error?e.message:String(e)),M(null)}finally{q(!1)}},U=async()=>{q(!0);try{let e=await (0,k.controlPlaneRequest)(`mutation { clearJiraCredentials { ${N} } }`);F(e.clearJiraCredentials),E(null),L(null),M(a("removed"))}catch(e){L(e instanceof Error?e.message:String(e))}finally{q(!1)}};return(0,t.jsxs)("section",{className:e?"flex w-full flex-col gap-6":"mx-auto flex w-full max-w-3xl flex-col gap-6",children:[!e&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:a("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:a("description")})]}),I?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(C.Spinner,{}),a("loading")]}):(0,t.jsx)("form",{onSubmit:e=>{(e.preventDefault(),l?.siteUrl&&l.siteUrl!==o.trim().replace(/\/$/,""))?$(!0):O(!1)},children:(0,t.jsx)(b.Card,{children:(0,t.jsxs)(b.CardContent,{className:"space-y-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s,{className:"size-5"}),(0,t.jsx)("h2",{className:"font-semibold",children:a("credentials")})]}),(0,t.jsx)(j.Badge,{className:l?.tokenConfigured?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":void 0,children:l?.tokenConfigured?a("configured"):a("notConfigured")})]}),z&&(0,t.jsx)(h.Alert,{variant:"destructive",children:(0,t.jsx)(h.AlertDescription,{children:z})}),G&&(0,t.jsxs)(h.Alert,{className:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",children:[(0,t.jsx)(n,{}),(0,t.jsx)(h.AlertDescription,{className:"text-current",children:G})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(S.Label,{className:"mb-1.5 block text-sm font-medium",htmlFor:"jira-site-url",children:a("siteUrl")}),(0,t.jsx)(y.Input,{autoComplete:"url",id:"jira-site-url",onChange:e=>c(e.target.value),placeholder:"https://example.atlassian.net",required:!0,type:"url",value:o}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a("siteUrlHelp")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(S.Label,{className:"mb-1.5 block text-sm font-medium",htmlFor:"jira-email",children:a("email")}),(0,t.jsx)(y.Input,{autoComplete:"username",id:"jira-email",onChange:e=>A(e.target.value),required:!0,type:"email",value:p})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(S.Label,{className:"mb-1.5 block text-sm font-medium",htmlFor:"jira-token",children:a("apiToken")}),(0,t.jsx)(y.Input,{autoComplete:"new-password",id:"jira-token",onChange:e=>T(e.target.value),placeholder:l?.tokenConfigured?a("tokenPlaceholderConfigured"):a("tokenPlaceholder"),required:!l?.tokenConfigured,type:"password",value:D}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:l?.tokenConfigured?a("tokenKeepHelp"):a("tokenHelp")})]}),R&&(0,t.jsx)(h.Alert,{className:"bg-muted",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:R.displayName}),(0,t.jsx)("p",{className:"text-muted-foreground",children:R.emailAddress??R.accountId})]})}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-end gap-2 border-t pt-4",children:[(0,t.jsx)(f.ConfirmationDialog,{actionLabel:a("remove"),cancelLabel:r("cancel"),description:r("cannotBeUndone"),onConfirm:U,title:a("confirmRemove"),trigger:(0,t.jsxs)(v.Button,{disabled:H||!l?.tokenConfigured,type:"button",variant:"ghost",children:[(0,t.jsx)(u.Trash2,{}),a("remove")]})}),(0,t.jsxs)(v.Button,{disabled:H||!l?.tokenConfigured,onClick:()=>void V(),type:"button",variant:"outline",children:[(0,t.jsx)(m,{}),a("test")]}),(0,t.jsxs)(v.Button,{disabled:H,type:"submit",children:[H?(0,t.jsx)(C.Spinner,{}):(0,t.jsx)(d.Save,{}),a("save")]})]})]})})}),(0,t.jsx)(f.ConfirmationDialog,{actionLabel:r("continue"),cancelLabel:r("cancel"),description:r("cannotBeUndone"),onConfirm:()=>O(!0),onOpenChange:$,open:B,title:a("confirmSiteChange")})]})}var A=e.i(967489),D=e.i(624687);let T="tokenConfigured defaultJiraKeyRegex updatedAt",R="configured appId installationId privateKeyConfigured keyFingerprint appSlug accountLogin repositorySelection actionsPermission verifiedAt updatedAt";function E(){let e=(0,x.useTranslations)("editorSettings"),[a,n]=(0,g.useState)("CODE"),[l,i]=(0,g.useState)(!0),[s,o]=(0,g.useState)(!1),[c,u]=(0,g.useState)(null),[m,p]=(0,g.useState)(null);(0,g.useEffect)(()=>{let e=window.setTimeout(()=>{(0,k.controlPlaneRequest)("query EditorSettings { worktreeSettings { editorVariant } }").then(e=>n(e.worktreeSettings.editorVariant)).catch(e=>p(e instanceof Error?e.message:String(e))).finally(()=>i(!1))},0);return()=>window.clearTimeout(e)},[]);let f=async()=>{o(!0);try{await (0,k.controlPlaneRequest)(`mutation SaveEditorSettings($editorVariant: WorktreeEditorVariant!) {
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,573474,e=>{"use strict";let t=(0,e.i(456420).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",0,t],573474)},340953,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(30030);function r(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function l(...e){return a.useCallback(function(...e){return t=>{let a=!1,n=e.map(e=>{let n=r(e,t);return a||"function"!=typeof n||(a=!0),n});if(a)return()=>{for(let t=0;t<n.length;t++){let a=n[t];"function"==typeof a?a():r(e[t],null)}}}}(...e),e)}var i=e.i(326999);"u">typeof window&&window.document&&window.document.createElement;var s="AlertDialog",[o,d]=(0,n.createContextScope)(s,[i.createDialogScope]),c=(0,i.createDialogScope)(),u=e=>{let{__scopeAlertDialog:a,...n}=e,r=c(a);return(0,t.jsx)(i.Root,{...r,...n,modal:!0})};u.displayName=s;var m=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,l=c(n);return(0,t.jsx)(i.Trigger,{...l,...r,ref:a})});m.displayName="AlertDialogTrigger";var p=e=>{let{__scopeAlertDialog:a,...n}=e,r=c(a);return(0,t.jsx)(i.Portal,{...r,...n})};p.displayName="AlertDialogPortal";var x=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,l=c(n);return(0,t.jsx)(i.Overlay,{...l,...r,ref:a})});x.displayName="AlertDialogOverlay";var g="AlertDialogContent",[f,h]=o(g),j=a.forwardRef((e,n)=>{let{__scopeAlertDialog:r,children:s,...o}=e,d=c(r),u=l(n,a.useRef(null)),m=a.useRef(null);return(0,t.jsx)(f,{scope:r,cancelRef:m,children:(0,t.jsx)(i.Content,{role:"alertdialog",...d,...o,ref:u,onOpenAutoFocus:function(e,t,{checkForDefaultPrevented:a=!0}={}){return function(n){if(e?.(n),!1===a||!n||!n.defaultPrevented)return t?.(n)}}(o.onOpenAutoFocus,e=>{e.preventDefault(),m.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:s})})});j.displayName=g;var v=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,l=c(n);return(0,t.jsx)(i.Title,{...l,...r,ref:a})});v.displayName="AlertDialogTitle";var b=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,l=c(n);return(0,t.jsx)(i.Description,{...l,...r,ref:a})});b.displayName="AlertDialogDescription";var y=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,l=c(n);return(0,t.jsx)(i.Close,{...l,...r,ref:a})});y.displayName="AlertDialogAction";var S="AlertDialogCancel",C=a.forwardRef((e,a)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:s}=h(S,n),o=c(n),d=l(a,s);return(0,t.jsx)(i.Close,{...o,...r,ref:d})});C.displayName=S,e.s(["Action",0,y,"AlertDialog",0,u,"AlertDialogAction",0,y,"AlertDialogCancel",0,C,"AlertDialogContent",0,j,"AlertDialogDescription",0,b,"AlertDialogOverlay",0,x,"AlertDialogPortal",0,p,"AlertDialogTitle",0,v,"AlertDialogTrigger",0,m,"Cancel",0,C,"Content",0,j,"Description",0,b,"Overlay",0,x,"Portal",0,p,"Root",0,u,"Title",0,v,"Trigger",0,m,"createAlertDialogScope",0,d],691162);var k=e.i(691162),k=k,N=e.i(975157),w=e.i(519455);function A({...e}){return(0,t.jsx)(k.Root,{"data-slot":"alert-dialog",...e})}function D({...e}){return(0,t.jsx)(k.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function T({...e}){return(0,t.jsx)(k.Portal,{"data-slot":"alert-dialog-portal",...e})}function R({className:e,...a}){return(0,t.jsx)(k.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,N.cn)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function E({className:e,size:a="default",...n}){return(0,t.jsxs)(T,{children:[(0,t.jsx)(R,{}),(0,t.jsx)(k.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,N.cn)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...n})]})}function I({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,N.cn)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function P({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,N.cn)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function H({className:e,...a}){return(0,t.jsx)(k.Title,{"data-slot":"alert-dialog-title",className:(0,N.cn)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function q({className:e,...a}){return(0,t.jsx)(k.Description,{"data-slot":"alert-dialog-description",className:(0,N.cn)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function z({className:e,variant:a="default",size:n="default",...r}){return(0,t.jsx)(w.Button,{variant:a,size:n,asChild:!0,children:(0,t.jsx)(k.Action,{"data-slot":"alert-dialog-action",className:(0,N.cn)(e),...r})})}function L({className:e,variant:a="outline",size:n="default",...r}){return(0,t.jsx)(w.Button,{variant:a,size:n,asChild:!0,children:(0,t.jsx)(k.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,N.cn)(e),...r})})}e.s(["ConfirmationDialog",0,function({actionLabel:e,cancelLabel:a,description:n,onConfirm:r,onOpenChange:l,open:i,title:s,trigger:o}){return(0,t.jsxs)(A,{onOpenChange:l,open:i,children:[o&&(0,t.jsx)(D,{asChild:!0,children:o}),(0,t.jsxs)(E,{children:[(0,t.jsxs)(I,{children:[(0,t.jsx)(H,{children:s}),(0,t.jsx)(q,{children:n})]}),(0,t.jsxs)(P,{children:[(0,t.jsx)(L,{children:a}),(0,t.jsx)(z,{onClick:()=>void r(),variant:"destructive",children:e})]})]})]})}],340953)},482022,e=>{"use strict";let t=(0,e.i(456420).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],482022)},856522,e=>{"use strict";let t=(0,e.i(456420).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",0,t],856522)},452330,e=>{"use strict";let t=(0,e.i(456420).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",0,t],452330)},725981,e=>{"use strict";let t=(0,e.i(456420).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",0,t],725981)},825398,e=>{"use strict";let t=(0,e.i(456420).default)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);e.s(["RotateCw",0,t],825398)},534710,e=>{"use strict";var t=e.i(843476),a=e.i(456420);let n=(0,a.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var r=e.i(452330),l=e.i(482022),i=e.i(634398);let s=(0,a.default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);var o=e.i(825398),d=e.i(856522);let c=(0,a.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var u=e.i(573474);let m=(0,a.default)("unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);var p=e.i(725981),x=e.i(948148),g=e.i(271645),f=e.i(340953),h=e.i(929592),j=e.i(487486),v=e.i(519455),b=e.i(515288),y=e.i(793479),S=e.i(110204),C=e.i(987968),k=e.i(637611);let N="siteUrl email tokenConfigured cacheTtlSeconds updatedAt";function w({embedded:e=!1}={}){let a=(0,x.useTranslations)("jiraSettings"),r=(0,x.useTranslations)("common"),[l,i]=(0,g.useState)(null),[o,c]=(0,g.useState)(""),[p,A]=(0,g.useState)(""),[D,T]=(0,g.useState)(""),[R,E]=(0,g.useState)(null),[I,P]=(0,g.useState)(!0),[H,q]=(0,g.useState)(!1),[z,L]=(0,g.useState)(null),[G,M]=(0,g.useState)(null),[B,$]=(0,g.useState)(!1),F=e=>{i(e),c(e.siteUrl??""),A(e.email??""),T("")},K=(0,g.useCallback)(async()=>{try{let e=await (0,k.controlPlaneRequest)(`query { jiraSettings { ${N} } }`);F(e.jiraSettings)}catch(e){L(e instanceof Error?e.message:String(e))}finally{P(!1)}},[]);(0,g.useEffect)(()=>{let e=window.setTimeout(()=>void K(),0);return()=>window.clearTimeout(e)},[K]);let O=async e=>{q(!0);try{let t=await (0,k.controlPlaneRequest)(`mutation SaveJiraSettings($input: SaveJiraSettingsInput!) { saveJiraSettings(input: $input) { ${N} } }`,{input:{siteUrl:o,email:p,apiToken:D||null,resetSite:e}});F(t.saveJiraSettings),E(null),L(null),M(a("saved"))}catch(e){L(e instanceof Error?e.message:String(e)),M(null)}finally{q(!1)}},V=async()=>{q(!0);try{let e=await (0,k.controlPlaneRequest)("mutation { testJiraConnection { accountId displayName emailAddress } }");E(e.testJiraConnection),L(null),M(a("connectionSucceeded"))}catch(e){E(null),L(e instanceof Error?e.message:String(e)),M(null)}finally{q(!1)}},U=async()=>{q(!0);try{let e=await (0,k.controlPlaneRequest)(`mutation { clearJiraCredentials { ${N} } }`);F(e.clearJiraCredentials),E(null),L(null),M(a("removed"))}catch(e){L(e instanceof Error?e.message:String(e))}finally{q(!1)}};return(0,t.jsxs)("section",{className:e?"flex w-full flex-col gap-6":"mx-auto flex w-full max-w-3xl flex-col gap-6",children:[!e&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:a("title")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:a("description")})]}),I?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(C.Spinner,{}),a("loading")]}):(0,t.jsx)("form",{onSubmit:e=>{(e.preventDefault(),l?.siteUrl&&l.siteUrl!==o.trim().replace(/\/$/,""))?$(!0):O(!1)},children:(0,t.jsx)(b.Card,{children:(0,t.jsxs)(b.CardContent,{className:"space-y-5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s,{className:"size-5"}),(0,t.jsx)("h2",{className:"font-semibold",children:a("credentials")})]}),(0,t.jsx)(j.Badge,{className:l?.tokenConfigured?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":void 0,children:l?.tokenConfigured?a("configured"):a("notConfigured")})]}),z&&(0,t.jsx)(h.Alert,{variant:"destructive",children:(0,t.jsx)(h.AlertDescription,{children:z})}),G&&(0,t.jsxs)(h.Alert,{className:"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",children:[(0,t.jsx)(n,{}),(0,t.jsx)(h.AlertDescription,{className:"text-current",children:G})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(S.Label,{className:"mb-1.5 block text-sm font-medium",htmlFor:"jira-site-url",children:a("siteUrl")}),(0,t.jsx)(y.Input,{autoComplete:"url",id:"jira-site-url",onChange:e=>c(e.target.value),placeholder:"https://example.atlassian.net",required:!0,type:"url",value:o}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a("siteUrlHelp")})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(S.Label,{className:"mb-1.5 block text-sm font-medium",htmlFor:"jira-email",children:a("email")}),(0,t.jsx)(y.Input,{autoComplete:"username",id:"jira-email",onChange:e=>A(e.target.value),required:!0,type:"email",value:p})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(S.Label,{className:"mb-1.5 block text-sm font-medium",htmlFor:"jira-token",children:a("apiToken")}),(0,t.jsx)(y.Input,{autoComplete:"new-password",id:"jira-token",onChange:e=>T(e.target.value),placeholder:l?.tokenConfigured?a("tokenPlaceholderConfigured"):a("tokenPlaceholder"),required:!l?.tokenConfigured,type:"password",value:D}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:l?.tokenConfigured?a("tokenKeepHelp"):a("tokenHelp")})]}),R&&(0,t.jsx)(h.Alert,{className:"bg-muted",children:(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-medium",children:R.displayName}),(0,t.jsx)("p",{className:"text-muted-foreground",children:R.emailAddress??R.accountId})]})}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-end gap-2 border-t pt-4",children:[(0,t.jsx)(f.ConfirmationDialog,{actionLabel:a("remove"),cancelLabel:r("cancel"),description:r("cannotBeUndone"),onConfirm:U,title:a("confirmRemove"),trigger:(0,t.jsxs)(v.Button,{disabled:H||!l?.tokenConfigured,type:"button",variant:"ghost",children:[(0,t.jsx)(u.Trash2,{}),a("remove")]})}),(0,t.jsxs)(v.Button,{disabled:H||!l?.tokenConfigured,onClick:()=>void V(),type:"button",variant:"outline",children:[(0,t.jsx)(m,{}),a("test")]}),(0,t.jsxs)(v.Button,{disabled:H,type:"submit",children:[H?(0,t.jsx)(C.Spinner,{}):(0,t.jsx)(d.Save,{}),a("save")]})]})]})})}),(0,t.jsx)(f.ConfirmationDialog,{actionLabel:r("continue"),cancelLabel:r("cancel"),description:r("cannotBeUndone"),onConfirm:()=>O(!0),onOpenChange:$,open:B,title:a("confirmSiteChange")})]})}var A=e.i(967489),D=e.i(624687);let T="tokenConfigured defaultJiraKeyRegex updatedAt",R="configured appId installationId privateKeyConfigured keyFingerprint appSlug accountLogin repositorySelection actionsPermission verifiedAt updatedAt";function E(){let e=(0,x.useTranslations)("editorSettings"),[a,n]=(0,g.useState)("CODE"),[l,i]=(0,g.useState)(!0),[s,o]=(0,g.useState)(!1),[c,u]=(0,g.useState)(null),[m,p]=(0,g.useState)(null);(0,g.useEffect)(()=>{let e=window.setTimeout(()=>{(0,k.controlPlaneRequest)("query EditorSettings { worktreeSettings { editorVariant } }").then(e=>n(e.worktreeSettings.editorVariant)).catch(e=>p(e instanceof Error?e.message:String(e))).finally(()=>i(!1))},0);return()=>window.clearTimeout(e)},[]);let f=async()=>{o(!0);try{await (0,k.controlPlaneRequest)(`mutation SaveEditorSettings($editorVariant: WorktreeEditorVariant!) {
2
2
  saveWorktreeSettings(editorVariant: $editorVariant) { editorVariant }
3
3
  }`,{editorVariant:a}),u(e("saved")),p(null)}catch(e){p(e instanceof Error?e.message:String(e)),u(null)}finally{o(!1)}};return(0,t.jsx)(b.Card,{children:(0,t.jsxs)(b.CardContent,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.Code2,{className:"size-5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"font-semibold",children:e("title")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e("description")})]})]}),m&&(0,t.jsx)(h.Alert,{variant:"destructive",children:(0,t.jsx)(h.AlertDescription,{children:m})}),c&&(0,t.jsx)(h.Alert,{children:(0,t.jsx)(h.AlertDescription,{children:c})}),l?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(C.Spinner,{})," ",e("loading")]}):(0,t.jsxs)("div",{className:"flex flex-wrap items-end gap-3",children:[(0,t.jsxs)("div",{className:"min-w-64 flex-1 space-y-2",children:[(0,t.jsx)(S.Label,{htmlFor:"editor-variant",children:e("label")}),(0,t.jsxs)(A.Select,{onValueChange:e=>n(e),value:a,children:[(0,t.jsx)(A.SelectTrigger,{className:"w-full",id:"editor-variant",children:(0,t.jsx)(A.SelectValue,{})}),(0,t.jsxs)(A.SelectContent,{children:[(0,t.jsx)(A.SelectItem,{value:"CODE",children:e("code")}),(0,t.jsx)(A.SelectItem,{value:"CODE_INSIDERS",children:e("insiders")}),(0,t.jsx)(A.SelectItem,{value:"NONE",children:e("none")})]})]})]}),(0,t.jsxs)(v.Button,{disabled:s,onClick:()=>void f(),children:[s?(0,t.jsx)(C.Spinner,{}):(0,t.jsx)(d.Save,{})," ",e("save")]})]})]})})}function I(){let e=(0,x.useTranslations)("githubAppSettings"),a=(0,x.useTranslations)("common"),[r,i]=(0,g.useState)(null),[N,w]=(0,g.useState)(""),[A,T]=(0,g.useState)(""),[E,I]=(0,g.useState)(""),[P,H]=(0,g.useState)(""),[q,z]=(0,g.useState)(!1),[L,G]=(0,g.useState)(!0),[M,B]=(0,g.useState)(!1),[$,F]=(0,g.useState)(null),[K,O]=(0,g.useState)(null),V=(0,g.useCallback)(e=>{i(e),w(e.appId??""),T(e.installationId??""),I("")},[]),U=(0,g.useCallback)(async()=>{try{let e=await (0,k.controlPlaneRequest)(`query GitHubAppSettings { githubAppSettings { ${R} } }`);V(e.githubAppSettings)}catch(e){F(e instanceof Error?e.message:String(e))}finally{G(!1)}},[V]);(0,g.useEffect)(()=>{let e=window.setTimeout(()=>{H(window.location.origin),U()},0);return()=>window.clearTimeout(e)},[U]);let J=async t=>{t.preventDefault(),B(!0);try{let t=await (0,k.controlPlaneRequest)(`mutation SaveGitHubAppSettings($input: SaveGitHubAppSettingsInput!) {
4
4
  saveGitHubAppSettings(input: $input) { ${R} }