@shepai/cli 1.201.0-pr600.2bbad7b → 1.202.0-pr601.3b893d1

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 (367) hide show
  1. package/package.json +2 -1
  2. package/web/.next/BUILD_ID +1 -1
  3. package/web/.next/build-manifest.json +2 -2
  4. package/web/.next/fallback-build-manifest.json +2 -2
  5. package/web/.next/prerender-manifest.json +3 -3
  6. package/web/.next/required-server-files.js +2 -2
  7. package/web/.next/required-server-files.json +2 -2
  8. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/react-loadable-manifest.json +4 -4
  9. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +37 -37
  10. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  11. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  12. package/web/.next/server/app/(dashboard)/@drawer/chat/page/react-loadable-manifest.json +4 -4
  13. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +35 -35
  14. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  15. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  16. package/web/.next/server/app/(dashboard)/@drawer/create/page/react-loadable-manifest.json +4 -4
  17. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +38 -38
  18. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  19. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  20. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/react-loadable-manifest.json +4 -4
  21. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +47 -47
  22. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  23. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  24. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/react-loadable-manifest.json +4 -4
  25. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +47 -47
  26. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  27. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  28. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +4 -4
  29. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +36 -36
  30. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  31. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  32. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/react-loadable-manifest.json +4 -4
  33. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +36 -36
  34. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  35. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  36. package/web/.next/server/app/(dashboard)/chat/page/react-loadable-manifest.json +4 -4
  37. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +35 -35
  38. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  39. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  40. package/web/.next/server/app/(dashboard)/control-center/page/react-loadable-manifest.json +4 -4
  41. package/web/.next/server/app/(dashboard)/control-center/page/server-reference-manifest.json +35 -35
  42. package/web/.next/server/app/(dashboard)/control-center/page.js.nft.json +1 -1
  43. package/web/.next/server/app/(dashboard)/control-center/page_client-reference-manifest.js +1 -1
  44. package/web/.next/server/app/(dashboard)/create/page/react-loadable-manifest.json +4 -4
  45. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +38 -38
  46. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  47. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  48. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/react-loadable-manifest.json +4 -4
  49. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +47 -47
  50. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  51. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  52. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/react-loadable-manifest.json +4 -4
  53. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +47 -47
  54. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  55. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  56. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/react-loadable-manifest.json +4 -4
  57. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +36 -36
  58. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  59. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  60. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/react-loadable-manifest.json +4 -4
  61. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +36 -36
  62. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/_global-error.html +2 -2
  65. package/web/.next/server/app/_global-error.rsc +1 -1
  66. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  67. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  68. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  69. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  70. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  71. package/web/.next/server/app/_not-found/page/react-loadable-manifest.json +4 -4
  72. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +9 -9
  73. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  74. package/web/.next/server/app/agent-questions/page/react-loadable-manifest.json +4 -4
  75. package/web/.next/server/app/agent-questions/page/server-reference-manifest.json +11 -11
  76. package/web/.next/server/app/agent-questions/page_client-reference-manifest.js +1 -1
  77. package/web/.next/server/app/agents/[agentType]/page/react-loadable-manifest.json +4 -4
  78. package/web/.next/server/app/agents/[agentType]/page/server-reference-manifest.json +13 -13
  79. package/web/.next/server/app/agents/[agentType]/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/agents/page/react-loadable-manifest.json +4 -4
  81. package/web/.next/server/app/agents/page/server-reference-manifest.json +10 -10
  82. package/web/.next/server/app/agents/page_client-reference-manifest.js +1 -1
  83. package/web/.next/server/app/application/[id]/page/react-loadable-manifest.json +4 -4
  84. package/web/.next/server/app/application/[id]/page/server-reference-manifest.json +18 -18
  85. package/web/.next/server/app/application/[id]/page.js.nft.json +1 -1
  86. package/web/.next/server/app/application/[id]/page_client-reference-manifest.js +1 -1
  87. package/web/.next/server/app/application/[id]/supervisor/page/react-loadable-manifest.json +4 -4
  88. package/web/.next/server/app/application/[id]/supervisor/page/server-reference-manifest.json +10 -10
  89. package/web/.next/server/app/application/[id]/supervisor/page_client-reference-manifest.js +1 -1
  90. package/web/.next/server/app/applications/page/react-loadable-manifest.json +4 -4
  91. package/web/.next/server/app/applications/page/server-reference-manifest.json +19 -19
  92. package/web/.next/server/app/applications/page.js.nft.json +1 -1
  93. package/web/.next/server/app/applications/page_client-reference-manifest.js +1 -1
  94. package/web/.next/server/app/features/page/react-loadable-manifest.json +4 -4
  95. package/web/.next/server/app/features/page/server-reference-manifest.json +31 -31
  96. package/web/.next/server/app/features/page.js.nft.json +1 -1
  97. package/web/.next/server/app/features/page_client-reference-manifest.js +1 -1
  98. package/web/.next/server/app/onboarding/page/react-loadable-manifest.json +4 -4
  99. package/web/.next/server/app/onboarding/page/server-reference-manifest.json +9 -9
  100. package/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
  101. package/web/.next/server/app/page/react-loadable-manifest.json +4 -4
  102. package/web/.next/server/app/page/server-reference-manifest.json +9 -9
  103. package/web/.next/server/app/page_client-reference-manifest.js +1 -1
  104. package/web/.next/server/app/projects/[slug]/items/[itemId]/page/react-loadable-manifest.json +4 -4
  105. package/web/.next/server/app/projects/[slug]/items/[itemId]/page/server-reference-manifest.json +16 -16
  106. package/web/.next/server/app/projects/[slug]/items/[itemId]/page_client-reference-manifest.js +1 -1
  107. package/web/.next/server/app/projects/[slug]/page/react-loadable-manifest.json +4 -4
  108. package/web/.next/server/app/projects/[slug]/page/server-reference-manifest.json +28 -28
  109. package/web/.next/server/app/projects/[slug]/page_client-reference-manifest.js +1 -1
  110. package/web/.next/server/app/projects/[slug]/pages/page/react-loadable-manifest.json +4 -4
  111. package/web/.next/server/app/projects/[slug]/pages/page/server-reference-manifest.json +12 -12
  112. package/web/.next/server/app/projects/[slug]/pages/page_client-reference-manifest.js +1 -1
  113. package/web/.next/server/app/projects/[slug]/settings/page/react-loadable-manifest.json +4 -4
  114. package/web/.next/server/app/projects/[slug]/settings/page/server-reference-manifest.json +18 -18
  115. package/web/.next/server/app/projects/[slug]/settings/page_client-reference-manifest.js +1 -1
  116. package/web/.next/server/app/projects/page/react-loadable-manifest.json +4 -4
  117. package/web/.next/server/app/projects/page/server-reference-manifest.json +10 -10
  118. package/web/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  119. package/web/.next/server/app/settings/page/react-loadable-manifest.json +4 -4
  120. package/web/.next/server/app/settings/page/server-reference-manifest.json +15 -15
  121. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  122. package/web/.next/server/app/skills/page/react-loadable-manifest.json +4 -4
  123. package/web/.next/server/app/skills/page/server-reference-manifest.json +17 -17
  124. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  125. package/web/.next/server/app/supervisor/feature/[featureId]/page/react-loadable-manifest.json +4 -4
  126. package/web/.next/server/app/supervisor/feature/[featureId]/page/server-reference-manifest.json +10 -10
  127. package/web/.next/server/app/supervisor/feature/[featureId]/page_client-reference-manifest.js +1 -1
  128. package/web/.next/server/app/supervisor/page/react-loadable-manifest.json +4 -4
  129. package/web/.next/server/app/supervisor/page/server-reference-manifest.json +10 -10
  130. package/web/.next/server/app/supervisor/page_client-reference-manifest.js +1 -1
  131. package/web/.next/server/app/supervisor/repo/[repositoryId]/page/react-loadable-manifest.json +4 -4
  132. package/web/.next/server/app/supervisor/repo/[repositoryId]/page/server-reference-manifest.json +10 -10
  133. package/web/.next/server/app/supervisor/repo/[repositoryId]/page_client-reference-manifest.js +1 -1
  134. package/web/.next/server/app/tools/page/react-loadable-manifest.json +4 -4
  135. package/web/.next/server/app/tools/page/server-reference-manifest.json +15 -15
  136. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  137. package/web/.next/server/app/version/page/react-loadable-manifest.json +4 -4
  138. package/web/.next/server/app/version/page/server-reference-manifest.json +9 -9
  139. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  140. package/web/.next/server/chunks/[root-of-the-server]__10e976f3._.js +1 -1
  141. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agent-questions_page_actions_4b694f8d.js +1 -1
  142. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agent-questions_page_actions_4b694f8d.js.map +1 -1
  143. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agents_[agentType]_page_actions_103679a6.js +1 -1
  144. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_agents_[agentType]_page_actions_103679a6.js.map +1 -1
  145. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_projects_[slug]_pages_page_actions_19d50f6c.js +1 -1
  146. package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_projects_[slug]_pages_page_actions_19d50f6c.js.map +1 -1
  147. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_items_[itemId]_work-item-detail-client_tsx_d2e02407._.js +1 -1
  148. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_items_[itemId]_work-item-detail-client_tsx_d2e02407._.js.map +1 -1
  149. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_settings_project-settings-client_tsx_e8b85ddc._.js +1 -1
  150. package/web/.next/server/chunks/ssr/744ca_web_app_projects_[slug]_settings_project-settings-client_tsx_e8b85ddc._.js.map +1 -1
  151. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +2 -2
  152. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/744ca_web_components_features_applications_applications-page-client_tsx_d0db9938._.js +1 -1
  154. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b652a2f._.js +1 -1
  155. package/web/.next/server/chunks/ssr/[root-of-the-server]__56cf47e7._.js +1 -1
  156. package/web/.next/server/chunks/ssr/[root-of-the-server]__56cf47e7._.js.map +1 -1
  157. package/web/.next/server/chunks/ssr/[root-of-the-server]__648730d4._.js +1 -1
  158. package/web/.next/server/chunks/ssr/[root-of-the-server]__68df6415._.js +1 -1
  159. package/web/.next/server/chunks/ssr/[root-of-the-server]__68df6415._.js.map +1 -1
  160. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bc6bf96._.js +1 -1
  161. package/web/.next/server/chunks/ssr/[root-of-the-server]__6bc6bf96._.js.map +1 -1
  162. package/web/.next/server/chunks/ssr/[root-of-the-server]__9852cb08._.js +2 -2
  163. package/web/.next/server/chunks/ssr/[root-of-the-server]__9852cb08._.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/[root-of-the-server]__a1167cec._.js +1 -1
  165. package/web/.next/server/chunks/ssr/[root-of-the-server]__a1167cec._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/{[root-of-the-server]__796984c7._.js → [root-of-the-server]__acaaed62._.js} +2 -2
  167. package/web/.next/server/chunks/ssr/{[root-of-the-server]__796984c7._.js.map → [root-of-the-server]__acaaed62._.js.map} +1 -1
  168. package/web/.next/server/chunks/ssr/[root-of-the-server]__b0d7cca3._.js +3 -3
  169. package/web/.next/server/chunks/ssr/[root-of-the-server]__b0d7cca3._.js.map +1 -1
  170. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba699bec._.js +1 -1
  171. package/web/.next/server/chunks/ssr/[root-of-the-server]__ba699bec._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/[root-of-the-server]__e0741ee1._.js +1 -1
  173. package/web/.next/server/chunks/ssr/[root-of-the-server]__e0fa59e6._.js +1 -1
  174. package/web/.next/server/chunks/ssr/[root-of-the-server]__e0fa59e6._.js.map +1 -1
  175. package/web/.next/server/chunks/ssr/[root-of-the-server]__ea26ff90._.js +3 -3
  176. package/web/.next/server/chunks/ssr/{[root-of-the-server]__abab3b61._.js → [root-of-the-server]__f83cecd5._.js} +2 -2
  177. package/web/.next/server/chunks/ssr/{[root-of-the-server]__abab3b61._.js.map → [root-of-the-server]__f83cecd5._.js.map} +1 -1
  178. package/web/.next/server/chunks/ssr/[root-of-the-server]__ff0095e3._.js +1 -1
  179. package/web/.next/server/chunks/ssr/_07036593._.js +1 -1
  180. package/web/.next/server/chunks/ssr/_07036593._.js.map +1 -1
  181. package/web/.next/server/chunks/ssr/{_7c360295._.js → _0a666f6f._.js} +2 -2
  182. package/web/.next/server/chunks/ssr/{_7c360295._.js.map → _0a666f6f._.js.map} +1 -1
  183. package/web/.next/server/chunks/ssr/_0d2a7595._.js +1 -1
  184. package/web/.next/server/chunks/ssr/_0d2a7595._.js.map +1 -1
  185. package/web/.next/server/chunks/ssr/_101de7c3._.js +1 -1
  186. package/web/.next/server/chunks/ssr/_101de7c3._.js.map +1 -1
  187. package/web/.next/server/chunks/ssr/_24fca3cf._.js +1 -1
  188. package/web/.next/server/chunks/ssr/_24fca3cf._.js.map +1 -1
  189. package/web/.next/server/chunks/ssr/_2bc48f3d._.js +1 -1
  190. package/web/.next/server/chunks/ssr/_2bc48f3d._.js.map +1 -1
  191. package/web/.next/server/chunks/ssr/_32f66845._.js +1 -1
  192. package/web/.next/server/chunks/ssr/_408848e6._.js +1 -1
  193. package/web/.next/server/chunks/ssr/_408848e6._.js.map +1 -1
  194. package/web/.next/server/chunks/ssr/_40e02782._.js +1 -1
  195. package/web/.next/server/chunks/ssr/_40e02782._.js.map +1 -1
  196. package/web/.next/server/chunks/ssr/_486d45d6._.js +1 -1
  197. package/web/.next/server/chunks/ssr/_486d45d6._.js.map +1 -1
  198. package/web/.next/server/chunks/ssr/{_7b8add77._.js → _4c81bcc4._.js} +2 -2
  199. package/web/.next/server/chunks/ssr/{_7b8add77._.js.map → _4c81bcc4._.js.map} +1 -1
  200. package/web/.next/server/chunks/ssr/{_92c3fc3d._.js → _4cec17d6._.js} +2 -2
  201. package/web/.next/server/chunks/ssr/{_92c3fc3d._.js.map → _4cec17d6._.js.map} +1 -1
  202. package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
  203. package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
  204. package/web/.next/server/chunks/ssr/{_1d23a6ad._.js → _5916a65c._.js} +2 -2
  205. package/web/.next/server/chunks/ssr/{_1d23a6ad._.js.map → _5916a65c._.js.map} +1 -1
  206. package/web/.next/server/chunks/ssr/_5cbb0e22._.js +1 -1
  207. package/web/.next/server/chunks/ssr/_5cbb0e22._.js.map +1 -1
  208. package/web/.next/server/chunks/ssr/{_4a25fd2a._.js → _69d28743._.js} +2 -2
  209. package/web/.next/server/chunks/ssr/{_4a25fd2a._.js.map → _69d28743._.js.map} +1 -1
  210. package/web/.next/server/chunks/ssr/{_c37ef8be._.js → _74ee33b9._.js} +2 -2
  211. package/web/.next/server/chunks/ssr/{_c37ef8be._.js.map → _74ee33b9._.js.map} +1 -1
  212. package/web/.next/server/chunks/ssr/_7ba67729._.js +1 -1
  213. package/web/.next/server/chunks/ssr/_7ba67729._.js.map +1 -1
  214. package/web/.next/server/chunks/ssr/_805ae1aa._.js +1 -1
  215. package/web/.next/server/chunks/ssr/_805ae1aa._.js.map +1 -1
  216. package/web/.next/server/chunks/ssr/_87cf18c3._.js +1 -1
  217. package/web/.next/server/chunks/ssr/_87cf18c3._.js.map +1 -1
  218. package/web/.next/server/chunks/ssr/_8a700ff4._.js +1 -1
  219. package/web/.next/server/chunks/ssr/_8a700ff4._.js.map +1 -1
  220. package/web/.next/server/chunks/ssr/{_c77a0a62._.js → _904d6c22._.js} +2 -2
  221. package/web/.next/server/chunks/ssr/{_c77a0a62._.js.map → _904d6c22._.js.map} +1 -1
  222. package/web/.next/server/chunks/ssr/_95b97274._.js +1 -1
  223. package/web/.next/server/chunks/ssr/_95b97274._.js.map +1 -1
  224. package/web/.next/server/chunks/ssr/{_3f6a8669._.js → _a85af8c2._.js} +2 -2
  225. package/web/.next/server/chunks/ssr/{_3f6a8669._.js.map → _a85af8c2._.js.map} +1 -1
  226. package/web/.next/server/chunks/ssr/_c2e196ee._.js +1 -1
  227. package/web/.next/server/chunks/ssr/_c2e196ee._.js.map +1 -1
  228. package/web/.next/server/chunks/ssr/_ca3b7bf7._.js +1 -1
  229. package/web/.next/server/chunks/ssr/_ca3b7bf7._.js.map +1 -1
  230. package/web/.next/server/chunks/ssr/_d53224a9._.js +1 -1
  231. package/web/.next/server/chunks/ssr/_d53224a9._.js.map +1 -1
  232. package/web/.next/server/chunks/ssr/_d573dcc2._.js +1 -1
  233. package/web/.next/server/chunks/ssr/_e2671e14._.js +1 -1
  234. package/web/.next/server/chunks/ssr/_e2671e14._.js.map +1 -1
  235. package/web/.next/server/chunks/ssr/_ecd45b17._.js +1 -1
  236. package/web/.next/server/chunks/ssr/_ecd45b17._.js.map +1 -1
  237. package/web/.next/server/chunks/ssr/{_3a9f8b6f._.js → _f0bdafe2._.js} +2 -2
  238. package/web/.next/server/chunks/ssr/{_3a9f8b6f._.js.map → _f0bdafe2._.js.map} +1 -1
  239. package/web/.next/server/chunks/ssr/_f602cc9f._.js +1 -1
  240. package/web/.next/server/chunks/ssr/_f602cc9f._.js.map +1 -1
  241. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  242. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  243. package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +1 -1
  244. package/web/.next/server/chunks/ssr/src_presentation_web_0e291f0b._.js +1 -1
  245. package/web/.next/server/chunks/ssr/src_presentation_web_0e291f0b._.js.map +1 -1
  246. package/web/.next/server/chunks/ssr/src_presentation_web_1d8d177f._.js +1 -1
  247. package/web/.next/server/chunks/ssr/src_presentation_web_1d8d177f._.js.map +1 -1
  248. package/web/.next/server/chunks/ssr/src_presentation_web_450b58fc._.js +1 -1
  249. package/web/.next/server/chunks/ssr/src_presentation_web_450b58fc._.js.map +1 -1
  250. package/web/.next/server/chunks/ssr/src_presentation_web_47727150._.js +1 -1
  251. package/web/.next/server/chunks/ssr/src_presentation_web_47727150._.js.map +1 -1
  252. package/web/.next/server/chunks/ssr/src_presentation_web_64fcfc84._.js +1 -1
  253. package/web/.next/server/chunks/ssr/src_presentation_web_64fcfc84._.js.map +1 -1
  254. package/web/.next/server/chunks/ssr/{src_presentation_web_011b1b2b._.js → src_presentation_web_6f8efc48._.js} +2 -2
  255. package/web/.next/server/chunks/ssr/{src_presentation_web_011b1b2b._.js.map → src_presentation_web_6f8efc48._.js.map} +1 -1
  256. package/web/.next/server/chunks/ssr/src_presentation_web_74b7bdb2._.js +1 -1
  257. package/web/.next/server/chunks/ssr/src_presentation_web_74b7bdb2._.js.map +1 -1
  258. package/web/.next/server/chunks/ssr/src_presentation_web_82aeca34._.js +1 -1
  259. package/web/.next/server/chunks/ssr/src_presentation_web_82aeca34._.js.map +1 -1
  260. package/web/.next/server/chunks/ssr/src_presentation_web_8a564d47._.js +1 -1
  261. package/web/.next/server/chunks/ssr/src_presentation_web_8a564d47._.js.map +1 -1
  262. package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js +1 -1
  263. package/web/.next/server/chunks/ssr/src_presentation_web_9a543843._.js.map +1 -1
  264. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_f4f3fad9.js +1 -1
  265. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app__not-found_page_actions_f4f3fad9.js.map +1 -1
  266. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_agents_page_actions_d4bd4711.js +1 -1
  267. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_agents_page_actions_d4bd4711.js.map +1 -1
  268. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_onboarding_page_actions_bb695e8d.js +1 -1
  269. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_onboarding_page_actions_bb695e8d.js.map +1 -1
  270. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_page_actions_ac47e420.js +1 -1
  271. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_page_actions_ac47e420.js.map +1 -1
  272. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_projects_page_actions_c91a23a8.js +1 -1
  273. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_projects_page_actions_c91a23a8.js.map +1 -1
  274. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_63c2d912.js +1 -1
  275. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_version_page_actions_63c2d912.js.map +1 -1
  276. package/web/.next/server/chunks/ssr/src_presentation_web_a53a3da6._.js +1 -1
  277. package/web/.next/server/chunks/ssr/src_presentation_web_a53a3da6._.js.map +1 -1
  278. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_246617fe._.js +3 -3
  279. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_adopt-local-directory_ts_75f1f28c._.js +1 -1
  280. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_adopt-local-directory_ts_75f1f28c._.js.map +1 -1
  281. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_9453ce8b._.js +1 -1
  282. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-directory_ts_1209d917._.js +1 -1
  283. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-directory_ts_1209d917._.js.map +1 -1
  284. package/web/.next/server/chunks/ssr/src_presentation_web_app_features_feature-tree-page-client_tsx_34c5cbbf._.js +1 -1
  285. package/web/.next/server/chunks/ssr/src_presentation_web_b1b3c26c._.js +1 -1
  286. package/web/.next/server/chunks/ssr/src_presentation_web_b1b3c26c._.js.map +1 -1
  287. package/web/.next/server/chunks/ssr/src_presentation_web_b98a4353._.js +1 -1
  288. package/web/.next/server/chunks/ssr/src_presentation_web_b98a4353._.js.map +1 -1
  289. package/web/.next/server/chunks/ssr/src_presentation_web_c96ca051._.js +1 -1
  290. package/web/.next/server/chunks/ssr/src_presentation_web_c96ca051._.js.map +1 -1
  291. package/web/.next/server/chunks/ssr/{src_presentation_web_4992017e._.js → src_presentation_web_cc905835._.js} +2 -2
  292. package/web/.next/server/chunks/ssr/{src_presentation_web_4992017e._.js.map → src_presentation_web_cc905835._.js.map} +1 -1
  293. package/web/.next/server/chunks/ssr/src_presentation_web_components_66643378._.js +1 -1
  294. package/web/.next/server/chunks/ssr/src_presentation_web_components_66643378._.js.map +1 -1
  295. package/web/.next/server/chunks/ssr/src_presentation_web_components_agent-editor_agent-editor-tabs_tsx_d5a954b4._.js +1 -1
  296. package/web/.next/server/chunks/ssr/src_presentation_web_components_agent-editor_agent-editor-tabs_tsx_d5a954b4._.js.map +1 -1
  297. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js +1 -1
  298. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_skills_8a174cac._.js.map +1 -1
  299. package/web/.next/server/chunks/ssr/src_presentation_web_d3858f16._.js +1 -1
  300. package/web/.next/server/chunks/ssr/src_presentation_web_d3858f16._.js.map +1 -1
  301. package/web/.next/server/chunks/ssr/src_presentation_web_d7f8130c._.js +1 -1
  302. package/web/.next/server/chunks/ssr/src_presentation_web_d7f8130c._.js.map +1 -1
  303. package/web/.next/server/chunks/ssr/src_presentation_web_dddd8ccd._.js +1 -1
  304. package/web/.next/server/chunks/ssr/src_presentation_web_dddd8ccd._.js.map +1 -1
  305. package/web/.next/server/chunks/ssr/src_presentation_web_e13d58b0._.js +1 -1
  306. package/web/.next/server/chunks/ssr/src_presentation_web_e13d58b0._.js.map +1 -1
  307. package/web/.next/server/chunks/ssr/src_presentation_web_ee94a9aa._.js +1 -1
  308. package/web/.next/server/chunks/ssr/src_presentation_web_ee94a9aa._.js.map +1 -1
  309. package/web/.next/server/chunks/ssr/src_presentation_web_f0fcfdff._.js +1 -1
  310. package/web/.next/server/chunks/ssr/src_presentation_web_f0fcfdff._.js.map +1 -1
  311. package/web/.next/server/chunks/ssr/src_presentation_web_f17e8516._.js +1 -1
  312. package/web/.next/server/chunks/ssr/src_presentation_web_f17e8516._.js.map +1 -1
  313. package/web/.next/server/chunks/ssr/src_presentation_web_f7180fec._.js +1 -1
  314. package/web/.next/server/chunks/ssr/src_presentation_web_f7180fec._.js.map +1 -1
  315. package/web/.next/server/pages/500.html +2 -2
  316. package/web/.next/server/server-reference-manifest.js +1 -1
  317. package/web/.next/server/server-reference-manifest.json +110 -110
  318. package/web/.next/static/chunks/{a8d8f9c61ec519d7.js → 06a3ce6f0a63bb38.js} +1 -1
  319. package/web/.next/static/chunks/{a7920ec2696dea6b.js → 0872ff9e21208474.js} +1 -1
  320. package/web/.next/static/chunks/{8505947d14732a53.js → 18d0b0f66c3a5030.js} +1 -1
  321. package/web/.next/static/chunks/{21ae217482df277e.js → 1935b7e366ff3eb6.js} +1 -1
  322. package/web/.next/static/chunks/{bc7ff90acabf822e.js → 19aa3cc6df5f5833.js} +1 -1
  323. package/web/.next/static/chunks/{14ae33e3d05df7ae.js → 25277f492a8e114f.js} +1 -1
  324. package/web/.next/static/chunks/{a9b788473a1a2f74.js → 2fd21b1e8f74dddd.js} +1 -1
  325. package/web/.next/static/chunks/{73de88f5c150f826.js → 35ea128cac9da3aa.js} +1 -1
  326. package/web/.next/static/chunks/{16a0872b47a0c873.js → 3b0e5f1d61bbe5b9.js} +1 -1
  327. package/web/.next/static/chunks/{2e2bbe08a2ced79d.js → 3e4b4cc39d18c2d3.js} +1 -1
  328. package/web/.next/static/chunks/{8aa1b266648944de.js → 3fdf3bfbaa542a58.js} +1 -1
  329. package/web/.next/static/chunks/{28b1e727e07ee99e.js → 46bacb3927eb4aad.js} +1 -1
  330. package/web/.next/static/chunks/{f2eb8ed0ba27add9.js → 4e6d1ce8b909633b.js} +1 -1
  331. package/web/.next/static/chunks/{ef1c174fb55135fb.js → 506cd958e1d95d99.js} +1 -1
  332. package/web/.next/static/chunks/{eb1c0aac34a995fe.js → 558f703ea70fb12f.js} +1 -1
  333. package/web/.next/static/chunks/{46628109fd139e38.js → 55f0874ed4cff0b4.js} +1 -1
  334. package/web/.next/static/chunks/64228763c0a5b398.js +1 -0
  335. package/web/.next/static/chunks/{df57f17a33536493.js → 66a4af80ba31ab99.js} +1 -1
  336. package/web/.next/static/chunks/{a4379769c9845bed.js → 69001f2dc93cd854.js} +1 -1
  337. package/web/.next/static/chunks/{04bf00ba0dfe132e.js → 7cd5b1d4aecb605f.js} +1 -1
  338. package/web/.next/static/chunks/{98a7e6a733c1eec1.js → 8437b14aa3d30c4a.js} +1 -1
  339. package/web/.next/static/chunks/{1d767f2bf1e60119.js → 85ddd1e61b5acfa7.js} +1 -1
  340. package/web/.next/static/chunks/{3d096d025d3a4300.js → 88e44bfd13326e0a.js} +1 -1
  341. package/web/.next/static/chunks/{cd553eaf62c59330.js → 89ea6a36b13564bb.js} +3 -3
  342. package/web/.next/static/chunks/{c3f8977262e99729.js → 8e05b72447a6de2d.js} +1 -1
  343. package/web/.next/static/chunks/92b0f4ef034da238.js +1 -0
  344. package/web/.next/static/chunks/{661ae8c69fd4c6e0.js → 9955264849876242.js} +1 -1
  345. package/web/.next/static/chunks/a8bd431b98488304.js +1 -0
  346. package/web/.next/static/chunks/{b1ce1428c415689c.js → aff24d3846940734.js} +1 -1
  347. package/web/.next/static/chunks/{6b2db436783731a9.js → bed79ff1fb1474b2.js} +1 -1
  348. package/web/.next/static/chunks/{2964ed9040700d3d.js → cafa3b9f2631ead4.js} +1 -1
  349. package/web/.next/static/chunks/{444614c3115ff33e.js → cf29be39771eed74.js} +1 -1
  350. package/web/.next/static/chunks/{6724456c4ee12a6c.js → e0033d3fa646e3ba.js} +1 -1
  351. package/web/.next/static/chunks/{29d53f36d9cf3511.js → e097ae94a23d6f6e.js} +1 -1
  352. package/web/.next/static/chunks/e4d71aefcaf0bcb8.js +1 -0
  353. package/web/.next/static/chunks/{0797756ed1f6ae7c.js → e62855ec84a7075d.js} +1 -1
  354. package/web/.next/static/chunks/e648942ddca82602.js +1 -0
  355. package/web/.next/static/chunks/{f478ef3c6d77bea8.js → f039f96340b89e08.js} +1 -1
  356. package/web/.next/static/chunks/{ea31f78dde34f8e1.js → f4c2e3f10d87b772.js} +1 -1
  357. package/web/.next/static/chunks/f671dcbbfd92b775.js +1 -0
  358. package/web/.next/static/chunks/{e1fee822ce83d4e4.js → fd4d834af4d4bf63.js} +1 -1
  359. package/web/.next/static/chunks/4d7b6685af2c61f9.js +0 -1
  360. package/web/.next/static/chunks/6352e668ea0a8df7.js +0 -1
  361. package/web/.next/static/chunks/74098475a938bee3.js +0 -1
  362. package/web/.next/static/chunks/798f66a5fdd1e765.js +0 -1
  363. package/web/.next/static/chunks/b3e91925f7db1ae9.js +0 -1
  364. package/web/.next/static/chunks/c8c4ea71670c4e55.js +0 -1
  365. /package/web/.next/static/{ChVi9RNp-ZER74W2GrrbV → iJI1BMB-BwFI6JHl9YJW8}/_buildManifest.js +0 -0
  366. /package/web/.next/static/{ChVi9RNp-ZER74W2GrrbV → iJI1BMB-BwFI6JHl9YJW8}/_clientMiddlewareManifest.json +0 -0
  367. /package/web/.next/static/{ChVi9RNp-ZER74W2GrrbV → iJI1BMB-BwFI6JHl9YJW8}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81846,e=>{"use strict";var t=e.i(679606),a=e.i(294237),r=e.i(131777);let i=(0,a.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function o({className:e,variant:a,...o}){return(0,t.jsx)("div",{className:(0,r.cn)(i({variant:a}),e),...o})}e.s(["Badge",()=>o])},151080,e=>{"use strict";var t=e.i(152155),a=e.i(291967),r=e.i(787342),i=e.i(205978),o=e.i(922528),s=e.i(713123),n=e.i(287620),l=e.i(929297),c=e.i(936589),d=e.i(566033),u=e.i(679606),f="rovingFocusGroup.onEntryFocus",m={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[g,x,v]=(0,r.createCollection)(p),[b,h]=(0,o.createContextScope)(p,[v]),[y,w]=b(p),j=t.forwardRef((e,t)=>(0,u.jsx)(g.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(g.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(N,{...e,ref:t})})}));j.displayName=p;var N=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:o,orientation:s,loop:g=!1,dir:v,currentTabStopId:b,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:w,onEntryFocus:j,preventScrollOnEntryFocus:N=!1,...S}=e,D=t.useRef(null),R=(0,i.useComposedRefs)(r,D),C=(0,d.useDirection)(v),[k,I]=(0,c.useControllableState)({prop:b,defaultProp:h??null,onChange:w,caller:p}),[F,A]=t.useState(!1),E=(0,l.useCallbackRef)(j),H=x(o),L=t.useRef(!1),[G,P]=t.useState(0);return t.useEffect(()=>{let e=D.current;if(e)return e.addEventListener(f,E),()=>e.removeEventListener(f,E)},[E]),(0,u.jsx)(y,{scope:o,orientation:s,dir:C,loop:g,currentTabStopId:k,onItemFocus:t.useCallback(e=>I(e),[I]),onItemShiftTab:t.useCallback(()=>A(!0),[]),onFocusableItemAdd:t.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>P(e=>e-1),[]),children:(0,u.jsx)(n.Primitive.div,{tabIndex:F||0===G?-1:0,"data-orientation":s,...S,ref:R,style:{outline:"none",...e.style},onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,a.composeEventHandlers)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!F){let t=new CustomEvent(f,m);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=H().filter(e=>e.focusable);T([e.find(e=>e.active),e.find(e=>e.id===k),...e].filter(Boolean).map(e=>e.ref.current),N)}}L.current=!1}),onBlur:(0,a.composeEventHandlers)(e.onBlur,()=>A(!1))})})}),S="RovingFocusGroupItem",D=t.forwardRef((e,r)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:l=!1,tabStopId:c,children:d,...f}=e,m=(0,s.useId)(),p=c||m,v=w(S,i),b=v.currentTabStopId===p,h=x(i),{onFocusableItemAdd:y,onFocusableItemRemove:j,currentTabStopId:N}=v;return t.useEffect(()=>{if(o)return y(),()=>j()},[o,y,j]),(0,u.jsx)(g.ItemSlot,{scope:i,id:p,focusable:o,active:l,children:(0,u.jsx)(n.Primitive.span,{tabIndex:b?0:-1,"data-orientation":v.orientation,...f,ref:r,onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,e=>{o?v.onItemFocus(p):e.preventDefault()}),onFocus:(0,a.composeEventHandlers)(e.onFocus,()=>v.onItemFocus(p)),onKeyDown:(0,a.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void v.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,a){var r;let i=(r=e.key,"rtl"!==a?r:"ArrowLeft"===r?"ArrowRight":"ArrowRight"===r?"ArrowLeft":r);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return R[i]}(e,v.orientation,v.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var a,r;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=v.loop?(a=i,r=o+1,a.map((e,t)=>a[(r+t)%a.length])):i.slice(o+1)}setTimeout(()=>T(i))}}),children:"function"==typeof d?d({isCurrentTabStop:b,hasTabStop:null!=N}):d})})});D.displayName=S;var R={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function T(e,t=!1){let a=document.activeElement;for(let r of e)if(r===a||(r.focus({preventScroll:t}),document.activeElement!==a))return}e.s(["Item",()=>D,"Root",()=>j,"createRovingFocusGroupScope",()=>h])},468304,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(291967),i=e.i(922528),o=e.i(151080),s=e.i(685995),n=e.i(287620),l=e.i(566033),c=e.i(936589),d=e.i(713123),u="Tabs",[f,m]=(0,i.createContextScope)(u,[o.createRovingFocusGroupScope]),p=(0,o.createRovingFocusGroupScope)(),[g,x]=f(u),v=a.forwardRef((e,a)=>{let{__scopeTabs:r,value:i,onValueChange:o,defaultValue:s,orientation:f="horizontal",dir:m,activationMode:p="automatic",...x}=e,v=(0,l.useDirection)(m),[b,h]=(0,c.useControllableState)({prop:i,onChange:o,defaultProp:s??"",caller:u});return(0,t.jsx)(g,{scope:r,baseId:(0,d.useId)(),value:b,onValueChange:h,orientation:f,dir:v,activationMode:p,children:(0,t.jsx)(n.Primitive.div,{dir:v,"data-orientation":f,...x,ref:a})})});v.displayName=u;var b="TabsList",h=a.forwardRef((e,a)=>{let{__scopeTabs:r,loop:i=!0,...s}=e,l=x(b,r),c=p(r);return(0,t.jsx)(o.Root,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:i,children:(0,t.jsx)(n.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...s,ref:a})})});h.displayName=b;var y="TabsTrigger",w=a.forwardRef((e,a)=>{let{__scopeTabs:i,value:s,disabled:l=!1,...c}=e,d=x(y,i),u=p(i),f=S(d.baseId,s),m=D(d.baseId,s),g=s===d.value;return(0,t.jsx)(o.Item,{asChild:!0,...u,focusable:!l,active:g,children:(0,t.jsx)(n.Primitive.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":m,"data-state":g?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:f,...c,ref:a,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(s)}),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(s)}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;g||l||!e||d.onValueChange(s)})})})});w.displayName=y;var j="TabsContent",N=a.forwardRef((e,r)=>{let{__scopeTabs:i,value:o,forceMount:l,children:c,...d}=e,u=x(j,i),f=S(u.baseId,o),m=D(u.baseId,o),p=o===u.value,g=a.useRef(p);return a.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(s.Presence,{present:l||p,children:({present:a})=>(0,t.jsx)(n.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!a,id:m,tabIndex:0,...d,ref:r,style:{...e.style,animationDuration:g.current?"0s":void 0},children:a&&c})})});function S(e,t){return`${e}-trigger-${t}`}function D(e,t){return`${e}-content-${t}`}N.displayName=j,e.s(["Content",()=>N,"List",()=>h,"Root",()=>v,"Tabs",()=>v,"TabsContent",()=>N,"TabsList",()=>h,"TabsTrigger",()=>w,"Trigger",()=>w,"createTabsScope",()=>m],743133);var R=e.i(743133),R=R,T=e.i(131777);let C=R.Root,k=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(R.List,{ref:r,className:(0,T.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...a}));k.displayName=R.List.displayName;let I=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(R.Trigger,{ref:r,className:(0,T.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...a}));I.displayName=R.Trigger.displayName;let F=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(R.Content,{ref:r,className:(0,T.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...a}));F.displayName=R.Content.displayName,e.s(["Tabs",()=>C,"TabsContent",()=>F,"TabsList",()=>k,"TabsTrigger",()=>I],468304)},602287,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(90033),i=e.i(860253),o=e.i(131777);let s=r.Dialog.Root,n=r.Dialog.Trigger,l=r.Dialog.Portal,c=r.Dialog.Close,d=a.forwardRef(({className:e,onClick:a,...i},s)=>(0,t.jsx)(r.Dialog.Overlay,{ref:s,className:(0,o.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),a?.(e)},...i}));d.displayName=r.Dialog.Overlay.displayName;let u=a.forwardRef(({className:e,children:a,...s},n)=>(0,t.jsxs)(l,{children:[(0,t.jsx)(d,{}),(0,t.jsxs)(r.Dialog.Content,{ref:n,className:(0,o.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...s,children:[a,(0,t.jsxs)(r.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(i.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=r.Dialog.Content.displayName;let f=({className:e,...a})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...a});f.displayName="DialogHeader";let m=({className:e,...a})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});m.displayName="DialogFooter";let p=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(r.Dialog.Title,{ref:i,className:(0,o.cn)("text-lg leading-none font-semibold tracking-tight",e),...a}));p.displayName=r.Dialog.Title.displayName;let g=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(r.Dialog.Description,{ref:i,className:(0,o.cn)("text-muted-foreground text-sm",e),...a}));g.displayName=r.Dialog.Description.displayName,e.s(["Dialog",()=>s,"DialogClose",()=>c,"DialogContent",()=>u,"DialogDescription",()=>g,"DialogFooter",()=>m,"DialogHeader",()=>f,"DialogTitle",()=>p,"DialogTrigger",()=>n])},66459,e=>{"use strict";let t=(0,e.i(903645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},32494,e=>{"use strict";let t=(0,e.i(903645).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],32494)},579687,e=>{"use strict";var t=e.i(714748);e.s(["AlertCircle",()=>t.default])},612997,e=>{"use strict";let t=(0,e.i(903645).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",()=>t],612997)},192350,e=>{"use strict";var t=e.i(679606),a=e.i(152155),r=e.i(602287),i=e.i(468304),o=e.i(83428),s=e.i(698127),n=e.i(735364),l=e.i(141957);let c=/^(?:https:\/\/github\.com\/([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|git@github\.com:([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+))$/;function d({onSubmit:e,loading:r=!1}){let[i,d]=(0,a.useState)(""),[u,f]=(0,a.useState)("");function m(){let t=i.trim();t?c.test(t.trim())?(f(""),e(t)):f("Enter a valid GitHub URL (e.g. owner/repo or https://github.com/owner/repo)"):f("Please enter a GitHub URL")}return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(l.Label,{htmlFor:"github-url-input",children:"GitHub URL"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.Input,{id:"github-url-input",placeholder:"owner/repo or https://github.com/owner/repo",value:i,onChange:e=>{d(e.target.value),u&&f("")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),m())},disabled:r,"aria-invalid":!!u,"aria-describedby":u?"github-url-error":void 0}),(0,t.jsx)(n.Button,{onClick:m,disabled:r||!i.trim(),size:"sm",children:r?(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}):"Import"})]}),u?(0,t.jsx)("p",{id:"github-url-error",className:"text-destructive text-sm",role:"alert",children:u}):null]})}var u=e.i(612997),f=e.i(32494),m=e.i(66459),p=e.i(579687),g=e.i(81846),x=e.i(461238),v=e.i(547373),b=e.i(508893);let h=(0,b.createServerReference)("4088569ab6e6a5fe2e71ba0ac2cd3856c7cb36609a",b.callServer,void 0,b.findSourceMapURL,"listGitHubRepositories"),y=(0,b.createServerReference)("0022cadc32a7a5f3ed643a86a65eecdf0738f33dd0",b.callServer,void 0,b.findSourceMapURL,"listGitHubOrganizations"),w="__personal__";function j({onSelect:e,loading:r=!1,fetchRepos:i=h,fetchOrgs:n=y}){let[l,c]=(0,a.useState)([]),[d,b]=(0,a.useState)([]),[j,N]=(0,a.useState)(!0),[S,D]=(0,a.useState)(""),[R,T]=(0,a.useState)(""),[C,k]=(0,a.useState)(w),I=(0,a.useRef)(null);(0,a.useEffect)(()=>{!async function(){try{let e=await n();e.orgs&&b(e.orgs)}catch{}}()},[n]);let F=(0,a.useCallback)(async(e,t)=>{N(!0),D("");try{let a={};e&&(a.search=e),t&&t!==w&&(a.owner=t);let r=await i(Object.keys(a).length>0?a:void 0);r.error?(D(r.error),c([])):c(r.repos??[])}catch{D("Failed to fetch repositories"),c([])}finally{N(!1)}},[i]);return((0,a.useEffect)(()=>{F(R||void 0,C)},[F,C]),S&&!j)?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-8 text-center","data-testid":"repo-browser-error",children:[(0,t.jsx)(p.AlertCircle,{className:"text-destructive h-8 w-8"}),(0,t.jsx)("p",{className:"text-destructive text-sm",children:S})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[d.length>0?(0,t.jsxs)(v.Select,{value:C,onValueChange:function(e){k(e),T("")},disabled:r,children:[(0,t.jsx)(v.SelectTrigger,{"aria-label":"Select owner",children:(0,t.jsx)(v.SelectValue,{placeholder:"Select owner"})}),(0,t.jsxs)(v.SelectContent,{children:[(0,t.jsx)(v.SelectItem,{value:w,children:"My repositories"}),d.map(e=>(0,t.jsx)(v.SelectItem,{value:e.login,children:e.login},e.login))]})]}):null,(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(m.Search,{className:"text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"}),(0,t.jsx)(s.Input,{placeholder:"Search repositories...",value:R,onChange:e=>{var t;T(t=e.target.value),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{F(t||void 0,C)},300)},className:"ps-9",disabled:r,"aria-label":"Search repositories"})]}),(0,t.jsx)("div",{className:"max-h-64 overflow-x-hidden overflow-y-auto rounded-md border",role:"listbox","aria-label":"GitHub repositories",children:j?(0,t.jsx)("div",{className:"flex flex-col gap-2 p-3","data-testid":"repo-browser-loading",children:Array.from({length:5}).map((e,a)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(x.Skeleton,{className:"h-4 w-48"}),(0,t.jsx)(x.Skeleton,{className:"h-3 w-72"})]},`skeleton-${String(a)}`))}):0===l.length?(0,t.jsx)("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"repo-browser-empty",children:"No repositories found"}):l.map(a=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":!1,className:"hover:bg-accent flex w-full items-start gap-2 border-b px-3 py-2.5 text-start last:border-b-0 disabled:opacity-50",onClick:()=>e(a.nameWithOwner),disabled:r,children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:a.nameWithOwner}),(0,t.jsx)(g.Badge,{variant:a.isPrivate?"secondary":"outline",className:"shrink-0 text-xs",children:a.isPrivate?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Lock,{className:"me-1 h-3 w-3"}),"Private"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Globe,{className:"me-1 h-3 w-3"}),"Public"]})})]}),a.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 truncate text-xs",children:a.description}):null]}),r?(0,t.jsx)(o.Loader2,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin"}):null]},a.nameWithOwner))})]})}let N=(0,b.createServerReference)("40ac687ce7283fa0b54dabe2f4ccaad99a6ce9b438",b.callServer,void 0,b.findSourceMapURL,"importGitHubRepository");function S({open:e,onOpenChange:o,onImportComplete:s}){let[n,l]=(0,a.useState)(!1),[c,u]=(0,a.useState)("");async function f(e){l(!0),u("");try{let t=await N({url:e});t.error?u(t.error):t.repository&&(s(t.repository),o(!1))}catch{u("An unexpected error occurred")}finally{l(!1)}}return(0,t.jsx)(r.Dialog,{open:e,onOpenChange:o,children:(0,t.jsxs)(r.DialogContent,{className:"overflow-hidden sm:max-w-lg",children:[(0,t.jsxs)(r.DialogHeader,{children:[(0,t.jsx)(r.DialogTitle,{children:"Import from GitHub"}),(0,t.jsx)(r.DialogDescription,{children:"Clone a GitHub repository and add it to Shep."})]}),(0,t.jsxs)(i.Tabs,{defaultValue:"url",className:"min-w-0",children:[(0,t.jsxs)(i.TabsList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(i.TabsTrigger,{value:"url",children:"URL"}),(0,t.jsx)(i.TabsTrigger,{value:"browse",children:"Browse"})]}),(0,t.jsx)(i.TabsContent,{value:"url",className:"mt-4",children:(0,t.jsx)(d,{onSubmit:f,loading:n})}),(0,t.jsx)(i.TabsContent,{value:"browse",className:"mt-4",children:(0,t.jsx)(j,{onSelect:f,loading:n})})]}),c?(0,t.jsx)("p",{className:"text-destructive text-sm",role:"alert",children:c}):null]})})}e.s([],294771),e.i(294771),e.s(["GitHubImportDialog",()=>S,"GitHubRepoBrowser",()=>j,"GitHubUrlInput",()=>d],192350)},522129,e=>{e.n(e.i(192350))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81846,e=>{"use strict";var t=e.i(679606),r=e.i(294237),a=e.i(131777);let i=(0,r.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function o({className:e,variant:r,...o}){return(0,t.jsx)("div",{className:(0,a.cn)(i({variant:r}),e),...o})}e.s(["Badge",()=>o])},151080,e=>{"use strict";var t=e.i(152155),r=e.i(291967),a=e.i(787342),i=e.i(205978),o=e.i(922528),s=e.i(713123),n=e.i(287620),l=e.i(929297),c=e.i(936589),d=e.i(566033),u=e.i(679606),f="rovingFocusGroup.onEntryFocus",m={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[g,x,v]=(0,a.createCollection)(p),[b,h]=(0,o.createContextScope)(p,[v]),[y,w]=b(p),j=t.forwardRef((e,t)=>(0,u.jsx)(g.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(g.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,u.jsx)(N,{...e,ref:t})})}));j.displayName=p;var N=t.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:o,orientation:s,loop:g=!1,dir:v,currentTabStopId:b,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:w,onEntryFocus:j,preventScrollOnEntryFocus:N=!1,...S}=e,D=t.useRef(null),R=(0,i.useComposedRefs)(a,D),C=(0,d.useDirection)(v),[k,I]=(0,c.useControllableState)({prop:b,defaultProp:h??null,onChange:w,caller:p}),[F,A]=t.useState(!1),E=(0,l.useCallbackRef)(j),H=x(o),L=t.useRef(!1),[G,P]=t.useState(0);return t.useEffect(()=>{let e=D.current;if(e)return e.addEventListener(f,E),()=>e.removeEventListener(f,E)},[E]),(0,u.jsx)(y,{scope:o,orientation:s,dir:C,loop:g,currentTabStopId:k,onItemFocus:t.useCallback(e=>I(e),[I]),onItemShiftTab:t.useCallback(()=>A(!0),[]),onFocusableItemAdd:t.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:t.useCallback(()=>P(e=>e-1),[]),children:(0,u.jsx)(n.Primitive.div,{tabIndex:F||0===G?-1:0,"data-orientation":s,...S,ref:R,style:{outline:"none",...e.style},onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,()=>{L.current=!0}),onFocus:(0,r.composeEventHandlers)(e.onFocus,e=>{let t=!L.current;if(e.target===e.currentTarget&&t&&!F){let t=new CustomEvent(f,m);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=H().filter(e=>e.focusable);T([e.find(e=>e.active),e.find(e=>e.id===k),...e].filter(Boolean).map(e=>e.ref.current),N)}}L.current=!1}),onBlur:(0,r.composeEventHandlers)(e.onBlur,()=>A(!1))})})}),S="RovingFocusGroupItem",D=t.forwardRef((e,a)=>{let{__scopeRovingFocusGroup:i,focusable:o=!0,active:l=!1,tabStopId:c,children:d,...f}=e,m=(0,s.useId)(),p=c||m,v=w(S,i),b=v.currentTabStopId===p,h=x(i),{onFocusableItemAdd:y,onFocusableItemRemove:j,currentTabStopId:N}=v;return t.useEffect(()=>{if(o)return y(),()=>j()},[o,y,j]),(0,u.jsx)(g.ItemSlot,{scope:i,id:p,focusable:o,active:l,children:(0,u.jsx)(n.Primitive.span,{tabIndex:b?0:-1,"data-orientation":v.orientation,...f,ref:a,onMouseDown:(0,r.composeEventHandlers)(e.onMouseDown,e=>{o?v.onItemFocus(p):e.preventDefault()}),onFocus:(0,r.composeEventHandlers)(e.onFocus,()=>v.onItemFocus(p)),onKeyDown:(0,r.composeEventHandlers)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void v.onItemShiftTab();if(e.target!==e.currentTarget)return;let t=function(e,t,r){var a;let i=(a=e.key,"rtl"!==r?a:"ArrowLeft"===a?"ArrowRight":"ArrowRight"===a?"ArrowLeft":a);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(i))&&!("horizontal"===t&&["ArrowUp","ArrowDown"].includes(i)))return R[i]}(e,v.orientation,v.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let i=h().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)i.reverse();else if("prev"===t||"next"===t){var r,a;"prev"===t&&i.reverse();let o=i.indexOf(e.currentTarget);i=v.loop?(r=i,a=o+1,r.map((e,t)=>r[(a+t)%r.length])):i.slice(o+1)}setTimeout(()=>T(i))}}),children:"function"==typeof d?d({isCurrentTabStop:b,hasTabStop:null!=N}):d})})});D.displayName=S;var R={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function T(e,t=!1){let r=document.activeElement;for(let a of e)if(a===r||(a.focus({preventScroll:t}),document.activeElement!==r))return}e.s(["Item",()=>D,"Root",()=>j,"createRovingFocusGroupScope",()=>h])},468304,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(291967),i=e.i(922528),o=e.i(151080),s=e.i(685995),n=e.i(287620),l=e.i(566033),c=e.i(936589),d=e.i(713123),u="Tabs",[f,m]=(0,i.createContextScope)(u,[o.createRovingFocusGroupScope]),p=(0,o.createRovingFocusGroupScope)(),[g,x]=f(u),v=r.forwardRef((e,r)=>{let{__scopeTabs:a,value:i,onValueChange:o,defaultValue:s,orientation:f="horizontal",dir:m,activationMode:p="automatic",...x}=e,v=(0,l.useDirection)(m),[b,h]=(0,c.useControllableState)({prop:i,onChange:o,defaultProp:s??"",caller:u});return(0,t.jsx)(g,{scope:a,baseId:(0,d.useId)(),value:b,onValueChange:h,orientation:f,dir:v,activationMode:p,children:(0,t.jsx)(n.Primitive.div,{dir:v,"data-orientation":f,...x,ref:r})})});v.displayName=u;var b="TabsList",h=r.forwardRef((e,r)=>{let{__scopeTabs:a,loop:i=!0,...s}=e,l=x(b,a),c=p(a);return(0,t.jsx)(o.Root,{asChild:!0,...c,orientation:l.orientation,dir:l.dir,loop:i,children:(0,t.jsx)(n.Primitive.div,{role:"tablist","aria-orientation":l.orientation,...s,ref:r})})});h.displayName=b;var y="TabsTrigger",w=r.forwardRef((e,r)=>{let{__scopeTabs:i,value:s,disabled:l=!1,...c}=e,d=x(y,i),u=p(i),f=S(d.baseId,s),m=D(d.baseId,s),g=s===d.value;return(0,t.jsx)(o.Item,{asChild:!0,...u,focusable:!l,active:g,children:(0,t.jsx)(n.Primitive.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":m,"data-state":g?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:f,...c,ref:r,onMouseDown:(0,a.composeEventHandlers)(e.onMouseDown,e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(s)}),onKeyDown:(0,a.composeEventHandlers)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(s)}),onFocus:(0,a.composeEventHandlers)(e.onFocus,()=>{let e="manual"!==d.activationMode;g||l||!e||d.onValueChange(s)})})})});w.displayName=y;var j="TabsContent",N=r.forwardRef((e,a)=>{let{__scopeTabs:i,value:o,forceMount:l,children:c,...d}=e,u=x(j,i),f=S(u.baseId,o),m=D(u.baseId,o),p=o===u.value,g=r.useRef(p);return r.useEffect(()=>{let e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,t.jsx)(s.Presence,{present:l||p,children:({present:r})=>(0,t.jsx)(n.Primitive.div,{"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":f,hidden:!r,id:m,tabIndex:0,...d,ref:a,style:{...e.style,animationDuration:g.current?"0s":void 0},children:r&&c})})});function S(e,t){return`${e}-trigger-${t}`}function D(e,t){return`${e}-content-${t}`}N.displayName=j,e.s(["Content",()=>N,"List",()=>h,"Root",()=>v,"Tabs",()=>v,"TabsContent",()=>N,"TabsList",()=>h,"TabsTrigger",()=>w,"Trigger",()=>w,"createTabsScope",()=>m],743133);var R=e.i(743133),R=R,T=e.i(131777);let C=R.Root,k=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(R.List,{ref:a,className:(0,T.cn)("bg-muted text-muted-foreground inline-flex h-9 items-center justify-center rounded-lg p-1",e),...r}));k.displayName=R.List.displayName;let I=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(R.Trigger,{ref:a,className:(0,T.cn)("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center rounded-md px-3 py-1 text-sm font-medium whitespace-nowrap transition-all focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow",e),...r}));I.displayName=R.Trigger.displayName;let F=r.forwardRef(({className:e,...r},a)=>(0,t.jsx)(R.Content,{ref:a,className:(0,T.cn)("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",e),...r}));F.displayName=R.Content.displayName,e.s(["Tabs",()=>C,"TabsContent",()=>F,"TabsList",()=>k,"TabsTrigger",()=>I],468304)},602287,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(90033),i=e.i(860253),o=e.i(131777);let s=a.Dialog.Root,n=a.Dialog.Trigger,l=a.Dialog.Portal,c=a.Dialog.Close,d=r.forwardRef(({className:e,onClick:r,...i},s)=>(0,t.jsx)(a.Dialog.Overlay,{ref:s,className:(0,o.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),r?.(e)},...i}));d.displayName=a.Dialog.Overlay.displayName;let u=r.forwardRef(({className:e,children:r,...s},n)=>(0,t.jsxs)(l,{children:[(0,t.jsx)(d,{}),(0,t.jsxs)(a.Dialog.Content,{ref:n,className:(0,o.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...s,children:[r,(0,t.jsxs)(a.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(i.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=a.Dialog.Content.displayName;let f=({className:e,...r})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...r});f.displayName="DialogHeader";let m=({className:e,...r})=>(0,t.jsx)("div",{className:(0,o.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...r});m.displayName="DialogFooter";let p=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(a.Dialog.Title,{ref:i,className:(0,o.cn)("text-lg leading-none font-semibold tracking-tight",e),...r}));p.displayName=a.Dialog.Title.displayName;let g=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(a.Dialog.Description,{ref:i,className:(0,o.cn)("text-muted-foreground text-sm",e),...r}));g.displayName=a.Dialog.Description.displayName,e.s(["Dialog",()=>s,"DialogClose",()=>c,"DialogContent",()=>u,"DialogDescription",()=>g,"DialogFooter",()=>m,"DialogHeader",()=>f,"DialogTitle",()=>p,"DialogTrigger",()=>n])},66459,e=>{"use strict";let t=(0,e.i(903645).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],66459)},32494,e=>{"use strict";let t=(0,e.i(903645).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],32494)},579687,e=>{"use strict";var t=e.i(714748);e.s(["AlertCircle",()=>t.default])},612997,e=>{"use strict";let t=(0,e.i(903645).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",()=>t],612997)},192350,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(602287),i=e.i(468304),o=e.i(83428),s=e.i(698127),n=e.i(735364),l=e.i(141957);let c=/^(?:https:\/\/github\.com\/([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|git@github\.com:([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?|([a-zA-Z0-9._-]+)\/([a-zA-Z0-9._-]+))$/;function d({onSubmit:e,loading:a=!1}){let[i,d]=(0,r.useState)(""),[u,f]=(0,r.useState)("");function m(){let t=i.trim();t?c.test(t.trim())?(f(""),e(t)):f("Enter a valid GitHub URL (e.g. owner/repo or https://github.com/owner/repo)"):f("Please enter a GitHub URL")}return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(l.Label,{htmlFor:"github-url-input",children:"GitHub URL"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.Input,{id:"github-url-input",placeholder:"owner/repo or https://github.com/owner/repo",value:i,onChange:e=>{d(e.target.value),u&&f("")},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),m())},disabled:a,"aria-invalid":!!u,"aria-describedby":u?"github-url-error":void 0}),(0,t.jsx)(n.Button,{onClick:m,disabled:a||!i.trim(),size:"sm",children:a?(0,t.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}):"Import"})]}),u?(0,t.jsx)("p",{id:"github-url-error",className:"text-destructive text-sm",role:"alert",children:u}):null]})}var u=e.i(612997),f=e.i(32494),m=e.i(66459),p=e.i(579687),g=e.i(81846),x=e.i(461238),v=e.i(547373),b=e.i(508893);let h=(0,b.createServerReference)("401c69fd0ea332b5338d2681374f58f26450e1d213",b.callServer,void 0,b.findSourceMapURL,"listGitHubRepositories"),y=(0,b.createServerReference)("002333039f4600b7fac2e032dbbff5dce622bc32c4",b.callServer,void 0,b.findSourceMapURL,"listGitHubOrganizations"),w="__personal__";function j({onSelect:e,loading:a=!1,fetchRepos:i=h,fetchOrgs:n=y}){let[l,c]=(0,r.useState)([]),[d,b]=(0,r.useState)([]),[j,N]=(0,r.useState)(!0),[S,D]=(0,r.useState)(""),[R,T]=(0,r.useState)(""),[C,k]=(0,r.useState)(w),I=(0,r.useRef)(null);(0,r.useEffect)(()=>{!async function(){try{let e=await n();e.orgs&&b(e.orgs)}catch{}}()},[n]);let F=(0,r.useCallback)(async(e,t)=>{N(!0),D("");try{let r={};e&&(r.search=e),t&&t!==w&&(r.owner=t);let a=await i(Object.keys(r).length>0?r:void 0);a.error?(D(a.error),c([])):c(a.repos??[])}catch{D("Failed to fetch repositories"),c([])}finally{N(!1)}},[i]);return((0,r.useEffect)(()=>{F(R||void 0,C)},[F,C]),S&&!j)?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-2 py-8 text-center","data-testid":"repo-browser-error",children:[(0,t.jsx)(p.AlertCircle,{className:"text-destructive h-8 w-8"}),(0,t.jsx)("p",{className:"text-destructive text-sm",children:S})]}):(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[d.length>0?(0,t.jsxs)(v.Select,{value:C,onValueChange:function(e){k(e),T("")},disabled:a,children:[(0,t.jsx)(v.SelectTrigger,{"aria-label":"Select owner",children:(0,t.jsx)(v.SelectValue,{placeholder:"Select owner"})}),(0,t.jsxs)(v.SelectContent,{children:[(0,t.jsx)(v.SelectItem,{value:w,children:"My repositories"}),d.map(e=>(0,t.jsx)(v.SelectItem,{value:e.login,children:e.login},e.login))]})]}):null,(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(m.Search,{className:"text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2"}),(0,t.jsx)(s.Input,{placeholder:"Search repositories...",value:R,onChange:e=>{var t;T(t=e.target.value),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{F(t||void 0,C)},300)},className:"ps-9",disabled:a,"aria-label":"Search repositories"})]}),(0,t.jsx)("div",{className:"max-h-64 overflow-x-hidden overflow-y-auto rounded-md border",role:"listbox","aria-label":"GitHub repositories",children:j?(0,t.jsx)("div",{className:"flex flex-col gap-2 p-3","data-testid":"repo-browser-loading",children:Array.from({length:5}).map((e,r)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)(x.Skeleton,{className:"h-4 w-48"}),(0,t.jsx)(x.Skeleton,{className:"h-3 w-72"})]},`skeleton-${String(r)}`))}):0===l.length?(0,t.jsx)("div",{className:"text-muted-foreground py-8 text-center text-sm","data-testid":"repo-browser-empty",children:"No repositories found"}):l.map(r=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":!1,className:"hover:bg-accent flex w-full items-start gap-2 border-b px-3 py-2.5 text-start last:border-b-0 disabled:opacity-50",onClick:()=>e(r.nameWithOwner),disabled:a,children:[(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:r.nameWithOwner}),(0,t.jsx)(g.Badge,{variant:r.isPrivate?"secondary":"outline",className:"shrink-0 text-xs",children:r.isPrivate?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Lock,{className:"me-1 h-3 w-3"}),"Private"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.Globe,{className:"me-1 h-3 w-3"}),"Public"]})})]}),r.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 truncate text-xs",children:r.description}):null]}),a?(0,t.jsx)(o.Loader2,{className:"mt-0.5 h-4 w-4 shrink-0 animate-spin"}):null]},r.nameWithOwner))})]})}let N=(0,b.createServerReference)("40d466ff9789889567ff0b65d9b5c87f7f7b11f943",b.callServer,void 0,b.findSourceMapURL,"importGitHubRepository");function S({open:e,onOpenChange:o,onImportComplete:s}){let[n,l]=(0,r.useState)(!1),[c,u]=(0,r.useState)("");async function f(e){l(!0),u("");try{let t=await N({url:e});t.error?u(t.error):t.repository&&(s(t.repository),o(!1))}catch{u("An unexpected error occurred")}finally{l(!1)}}return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:o,children:(0,t.jsxs)(a.DialogContent,{className:"overflow-hidden sm:max-w-lg",children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:"Import from GitHub"}),(0,t.jsx)(a.DialogDescription,{children:"Clone a GitHub repository and add it to Shep."})]}),(0,t.jsxs)(i.Tabs,{defaultValue:"url",className:"min-w-0",children:[(0,t.jsxs)(i.TabsList,{className:"grid w-full grid-cols-2",children:[(0,t.jsx)(i.TabsTrigger,{value:"url",children:"URL"}),(0,t.jsx)(i.TabsTrigger,{value:"browse",children:"Browse"})]}),(0,t.jsx)(i.TabsContent,{value:"url",className:"mt-4",children:(0,t.jsx)(d,{onSubmit:f,loading:n})}),(0,t.jsx)(i.TabsContent,{value:"browse",className:"mt-4",children:(0,t.jsx)(j,{onSelect:f,loading:n})})]}),c?(0,t.jsx)("p",{className:"text-destructive text-sm",role:"alert",children:c}):null]})})}e.s([],294771),e.i(294771),e.s(["GitHubImportDialog",()=>S,"GitHubRepoBrowser",()=>j,"GitHubUrlInput",()=>d],192350)},522129,e=>{e.n(e.i(192350))}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,283843,e=>{"use strict";let a=(0,e.i(903645).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",()=>a],283843)},187752,e=>{"use strict";var a=e.i(679606),t=e.i(152155),s=e.i(66459),r=e.i(131777);let o=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));o.displayName="Command";let n=t.forwardRef(({className:e,...t},o)=>(0,a.jsxs)("div",{className:"flex items-center border-b px-3",children:[(0,a.jsx)(s.Search,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,a.jsx)("input",{ref:o,className:(0,r.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));n.displayName="CommandInput";let l=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));l.displayName="CommandList";let c=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("text-muted-foreground py-6 text-center text-sm",e),...t}));c.displayName="CommandEmpty";let i=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("text-foreground overflow-hidden p-1",e),...t}));i.displayName="CommandGroup";let d=t.forwardRef(({className:e,selected:t,...s},o)=>(0,a.jsx)("button",{ref:o,type:"button","data-selected":t,className:(0,r.cn)("relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none","hover:bg-accent hover:text-accent-foreground","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50",e),...s}));d.displayName="CommandItem";let m=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("bg-border -mx-1 h-px",e),...t}));m.displayName="CommandSeparator",e.s(["Command",()=>o,"CommandEmpty",()=>c,"CommandGroup",()=>i,"CommandInput",()=>n,"CommandItem",()=>d,"CommandList",()=>l,"CommandSeparator",()=>m])},936479,e=>{"use strict";var a=e.i(679606),t=e.i(152155),s=e.i(711434),r=e.i(360112),o=e.i(508893);let n=(0,o.createServerReference)("4075595137c236db1a76e4cf96581a2ddc6254c1ee",o.callServer,void 0,o.findSourceMapURL,"adoptBranch"),l=(0,o.createServerReference)("404281ddf90d644f5acf507ced2be56b8aa30c41fc",o.callServer,void 0,o.findSourceMapURL,"listBranches");var c=e.i(723925),i=e.i(197667),d=e.i(283843),m=e.i(949228),p=e.i(83428);e.i(1650);var u=e.i(511495),h=e.i(845811),x=e.i(735364),f=e.i(698127),b=e.i(141957),v=e.i(187752),g=e.i(390382),j=e.i(131777);function C({open:e,onClose:s,onSubmit:r,isSubmitting:o=!1,error:n,repositories:l=[],selectedRepositoryPath:C,onRepositoryChange:w,branches:y=[],branchesLoading:N=!1}){let[S,k]=(0,t.useState)(""),[R,L]=(0,t.useState)(!1),[E,B]=(0,t.useState)(""),P=(0,t.useRef)(null),[D,I]=(0,t.useState)(!1),[T,U]=(0,t.useState)(""),A=(0,t.useRef)(null),G=l.find(e=>e.path===C),O=!!C;(0,t.useEffect)(()=>{e||(k(""),B(""),L(!1),I(!1),U(""))},[e]),(0,t.useEffect)(()=>{k(""),B("")},[C]);let F=(0,t.useCallback)(e=>{e.preventDefault();let a=S.trim();a&&C&&!o&&r(a,C)},[S,C,o,r]),K=(0,t.useCallback)(()=>{k(""),B(""),s()},[s]),M=(0,t.useCallback)(e=>{k(e),B(e),L(!1)},[]),$=(0,t.useCallback)(e=>{B(e.target.value),R||L(!0)},[R]),z=(0,t.useCallback)(e=>{if("Enter"===e.key){e.preventDefault();let a=E.trim();a&&(k(a),L(!1))}"Escape"===e.key&&(L(!1),B(S))},[E,S]),W=(0,t.useCallback)(e=>{w?.(e),I(!1),U("")},[w]),q=y.filter(e=>e.toLowerCase().includes(E.toLowerCase())),H=T.trim()?l.filter(e=>e.name.toLowerCase().includes(T.toLowerCase())||e.path.toLowerCase().includes(T.toLowerCase())):l;(0,t.useEffect)(()=>{D?setTimeout(()=>A.current?.focus(),0):U("")},[D]);let J=!S.trim()||!C||o,Q=(0,a.jsxs)("div",{children:[(0,a.jsxs)(h.DrawerTitle,{className:"flex items-center gap-2",children:[(0,a.jsx)(m.GitBranch,{className:"h-4 w-4"}),"Adopt Branch"]}),(0,a.jsx)(h.DrawerDescription,{className:"text-muted-foreground text-sm",children:"Import an existing git branch into Shep's feature tracking"})]});return(0,a.jsx)(u.BaseDrawer,{open:e,onClose:K,size:"sm",modal:!1,header:Q,"data-testid":"adopt-branch-drawer",children:(0,a.jsxs)("form",{onSubmit:F,className:"flex flex-1 flex-col",children:[(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{children:"Repository"}),(0,a.jsxs)(g.Popover,{open:D,onOpenChange:I,children:[(0,a.jsx)(g.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",role:"combobox","aria-expanded":D,"aria-label":"Repository",disabled:o,"data-testid":"adopt-repo-combobox",className:(0,j.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!G&&"text-muted-foreground"),children:[(0,a.jsx)("span",{className:"truncate",children:G?G.name:"Select repository..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(g.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"adopt-repo-combobox-content",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"border-b p-2",children:(0,a.jsx)(f.Input,{ref:A,placeholder:"Search repositories...",value:T,onChange:e=>U(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"adopt-repo-search"})}),(0,a.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===H.length?(0,a.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No repositories found."}):H.map(e=>(0,a.jsxs)("button",{type:"button",role:"option","aria-selected":C===e.path,onClick:()=>W(e.path),className:(0,j.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",C===e.path&&"bg-accent/50"),"data-testid":`adopt-repo-option-${e.id}`,children:[(0,a.jsx)(i.CheckIcon,{className:(0,j.cn)("h-4 w-4 shrink-0",C!==e.path&&"invisible")}),(0,a.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,a.jsx)("span",{className:"truncate",children:e.name}),(0,a.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select the repository that contains the branch you want to adopt."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{htmlFor:"branch-name",children:"Branch name"}),(0,a.jsxs)(g.Popover,{open:R,onOpenChange:L,children:[(0,a.jsx)(g.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)(x.Button,{variant:"outline",role:"combobox","aria-expanded":R,disabled:o||!O,className:"w-full justify-between font-normal","data-testid":"adopt-branch-input",children:[(0,a.jsx)("span",{className:"truncate",children:O?N?"Loading branches...":S||"Select a branch...":"Select a repository first..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(g.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:(0,a.jsxs)(v.Command,{children:[(0,a.jsx)(v.CommandInput,{ref:P,placeholder:"Search branches...",value:E,onChange:$,onKeyDown:z,"data-testid":"adopt-branch-search"}),(0,a.jsxs)(v.CommandList,{children:[!N&&0===q.length&&(0,a.jsx)(v.CommandEmpty,{children:0===y.length?"No branches found.":E?"No match — press Enter to use this value.":"No branches available."}),N?(0,a.jsx)(v.CommandEmpty,{children:(0,a.jsx)(p.Loader2,{className:"mx-auto h-4 w-4 animate-spin"})}):null,q.length>0&&(0,a.jsx)(v.CommandGroup,{children:q.map(e=>(0,a.jsxs)(v.CommandItem,{selected:e===S,onClick:()=>M(e),children:[(0,a.jsx)(c.Check,{className:(0,j.cn)("me-2 h-4 w-4",e===S?"opacity-100":"opacity-0")}),(0,a.jsx)(m.GitBranch,{className:"me-2 h-3 w-3 opacity-50"}),e]},e))})]})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:O?"Select a branch from the dropdown or type to search. Local and remote branches are shown.":"Please select a repository above to see available branches."})]}),n?(0,a.jsx)("p",{className:"text-destructive text-sm","data-testid":"adopt-branch-error",children:n}):null]})}),(0,a.jsx)("div",{className:"border-t p-4",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.Button,{type:"button",variant:"outline",onClick:K,disabled:o,className:"flex-1",children:"Cancel"}),(0,a.jsx)(x.Button,{type:"submit",disabled:J,className:"flex-1","data-testid":"adopt-branch-submit",children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Loader2,{className:"me-2 h-4 w-4 animate-spin"}),"Adopting..."]}):"Adopt Branch"})]})})]})})}function w({repositoryPath:e,repositories:o}){let c=(0,s.useRouter)(),i=(0,s.usePathname)(),[d,m]=(0,t.useState)(!1),[p,u]=(0,t.useState)(),[h,x]=(0,t.useState)([]),[f,b]=(0,t.useState)(!1),[v,g]=(0,t.useState)(e),j=i.startsWith("/adopt"),w=!d&&j;(0,t.useEffect)(()=>{!j&&d&&m(!1)},[j,d]),(0,t.useEffect)(()=>{j&&(u(void 0),g(e))},[j,e]),(0,t.useEffect)(()=>{j&&v?(b(!0),x([]),l(v).then(x).catch(()=>x([])).finally(()=>b(!1))):x([])},[j,v]);let y=(0,t.useCallback)(()=>{c.push("/control-center")},[c]),N=(0,t.useCallback)(e=>{g(e)},[]),S=(0,t.useCallback)((e,a)=>{u(void 0),m(!0),c.push("/control-center"),n({branchName:e,repositoryPath:a}).then(e=>{e.error?r.toast.error(e.error):(window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:e.feature.id,name:e.feature.name,description:e.feature.description,repositoryPath:e.feature.repositoryPath}})),r.toast.success(`Branch adopted as "${e.feature.name}"`))}).catch(()=>{r.toast.error("Failed to adopt branch"),m(!1)})},[c]);return(0,a.jsx)(C,{open:w,onClose:y,onSubmit:S,isSubmitting:d,error:p,repositories:o,selectedRepositoryPath:v,onRepositoryChange:N,branches:h,branchesLoading:f})}e.s(["AdoptDrawerClient",()=>w],936479)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,283843,e=>{"use strict";let a=(0,e.i(903645).default)("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);e.s(["ChevronsUpDown",()=>a],283843)},187752,e=>{"use strict";var a=e.i(679606),t=e.i(152155),s=e.i(66459),r=e.i(131777);let o=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t}));o.displayName="Command";let n=t.forwardRef(({className:e,...t},o)=>(0,a.jsxs)("div",{className:"flex items-center border-b px-3",children:[(0,a.jsx)(s.Search,{className:"me-2 h-4 w-4 shrink-0 opacity-50"}),(0,a.jsx)("input",{ref:o,className:(0,r.cn)("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));n.displayName="CommandInput";let l=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("max-h-[300px] overflow-x-hidden overflow-y-auto",e),...t}));l.displayName="CommandList";let c=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("text-muted-foreground py-6 text-center text-sm",e),...t}));c.displayName="CommandEmpty";let i=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("text-foreground overflow-hidden p-1",e),...t}));i.displayName="CommandGroup";let d=t.forwardRef(({className:e,selected:t,...s},o)=>(0,a.jsx)("button",{ref:o,type:"button","data-selected":t,className:(0,r.cn)("relative flex w-full cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none","hover:bg-accent hover:text-accent-foreground","data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50",e),...s}));d.displayName="CommandItem";let m=t.forwardRef(({className:e,...t},s)=>(0,a.jsx)("div",{ref:s,className:(0,r.cn)("bg-border -mx-1 h-px",e),...t}));m.displayName="CommandSeparator",e.s(["Command",()=>o,"CommandEmpty",()=>c,"CommandGroup",()=>i,"CommandInput",()=>n,"CommandItem",()=>d,"CommandList",()=>l,"CommandSeparator",()=>m])},936479,e=>{"use strict";var a=e.i(679606),t=e.i(152155),s=e.i(711434),r=e.i(360112),o=e.i(508893);let n=(0,o.createServerReference)("40f51a97ca4cba547b0f3b89b374de42a1065e7605",o.callServer,void 0,o.findSourceMapURL,"adoptBranch"),l=(0,o.createServerReference)("4042e6a2a4a291660a5f1aec423c677bda1dc77036",o.callServer,void 0,o.findSourceMapURL,"listBranches");var c=e.i(723925),i=e.i(197667),d=e.i(283843),m=e.i(949228),p=e.i(83428);e.i(1650);var u=e.i(511495),h=e.i(845811),x=e.i(735364),f=e.i(698127),b=e.i(141957),v=e.i(187752),g=e.i(390382),j=e.i(131777);function C({open:e,onClose:s,onSubmit:r,isSubmitting:o=!1,error:n,repositories:l=[],selectedRepositoryPath:C,onRepositoryChange:w,branches:y=[],branchesLoading:N=!1}){let[S,k]=(0,t.useState)(""),[R,L]=(0,t.useState)(!1),[E,B]=(0,t.useState)(""),P=(0,t.useRef)(null),[D,I]=(0,t.useState)(!1),[T,U]=(0,t.useState)(""),A=(0,t.useRef)(null),G=l.find(e=>e.path===C),O=!!C;(0,t.useEffect)(()=>{e||(k(""),B(""),L(!1),I(!1),U(""))},[e]),(0,t.useEffect)(()=>{k(""),B("")},[C]);let F=(0,t.useCallback)(e=>{e.preventDefault();let a=S.trim();a&&C&&!o&&r(a,C)},[S,C,o,r]),K=(0,t.useCallback)(()=>{k(""),B(""),s()},[s]),M=(0,t.useCallback)(e=>{k(e),B(e),L(!1)},[]),$=(0,t.useCallback)(e=>{B(e.target.value),R||L(!0)},[R]),z=(0,t.useCallback)(e=>{if("Enter"===e.key){e.preventDefault();let a=E.trim();a&&(k(a),L(!1))}"Escape"===e.key&&(L(!1),B(S))},[E,S]),W=(0,t.useCallback)(e=>{w?.(e),I(!1),U("")},[w]),q=y.filter(e=>e.toLowerCase().includes(E.toLowerCase())),H=T.trim()?l.filter(e=>e.name.toLowerCase().includes(T.toLowerCase())||e.path.toLowerCase().includes(T.toLowerCase())):l;(0,t.useEffect)(()=>{D?setTimeout(()=>A.current?.focus(),0):U("")},[D]);let J=!S.trim()||!C||o,Q=(0,a.jsxs)("div",{children:[(0,a.jsxs)(h.DrawerTitle,{className:"flex items-center gap-2",children:[(0,a.jsx)(m.GitBranch,{className:"h-4 w-4"}),"Adopt Branch"]}),(0,a.jsx)(h.DrawerDescription,{className:"text-muted-foreground text-sm",children:"Import an existing git branch into Shep's feature tracking"})]});return(0,a.jsx)(u.BaseDrawer,{open:e,onClose:K,size:"sm",modal:!1,header:Q,"data-testid":"adopt-branch-drawer",children:(0,a.jsxs)("form",{onSubmit:F,className:"flex flex-1 flex-col",children:[(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{children:"Repository"}),(0,a.jsxs)(g.Popover,{open:D,onOpenChange:I,children:[(0,a.jsx)(g.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",role:"combobox","aria-expanded":D,"aria-label":"Repository",disabled:o,"data-testid":"adopt-repo-combobox",className:(0,j.cn)("border-input bg-background ring-offset-background focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",!G&&"text-muted-foreground"),children:[(0,a.jsx)("span",{className:"truncate",children:G?G.name:"Select repository..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(g.PopoverContent,{className:"w-80 p-0",align:"start","data-testid":"adopt-repo-combobox-content",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"border-b p-2",children:(0,a.jsx)(f.Input,{ref:A,placeholder:"Search repositories...",value:T,onChange:e=>U(e.target.value),className:"h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0","data-testid":"adopt-repo-search"})}),(0,a.jsx)("div",{className:"max-h-48 overflow-y-auto py-1",role:"listbox","aria-label":"Repositories",children:0===H.length?(0,a.jsx)("p",{className:"text-muted-foreground px-3 py-2 text-sm",children:"No repositories found."}):H.map(e=>(0,a.jsxs)("button",{type:"button",role:"option","aria-selected":C===e.path,onClick:()=>W(e.path),className:(0,j.cn)("hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm",C===e.path&&"bg-accent/50"),"data-testid":`adopt-repo-option-${e.id}`,children:[(0,a.jsx)(i.CheckIcon,{className:(0,j.cn)("h-4 w-4 shrink-0",C!==e.path&&"invisible")}),(0,a.jsxs)("span",{className:"flex flex-col items-start truncate",children:[(0,a.jsx)("span",{className:"truncate",children:e.name}),(0,a.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:e.path})]})]},e.id))})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:"Select the repository that contains the branch you want to adopt."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(b.Label,{htmlFor:"branch-name",children:"Branch name"}),(0,a.jsxs)(g.Popover,{open:R,onOpenChange:L,children:[(0,a.jsx)(g.PopoverTrigger,{asChild:!0,children:(0,a.jsxs)(x.Button,{variant:"outline",role:"combobox","aria-expanded":R,disabled:o||!O,className:"w-full justify-between font-normal","data-testid":"adopt-branch-input",children:[(0,a.jsx)("span",{className:"truncate",children:O?N?"Loading branches...":S||"Select a branch...":"Select a repository first..."}),(0,a.jsx)(d.ChevronsUpDown,{className:"ms-2 h-4 w-4 shrink-0 opacity-50"})]})}),(0,a.jsx)(g.PopoverContent,{className:"w-[var(--radix-popover-trigger-width)] p-0",align:"start",children:(0,a.jsxs)(v.Command,{children:[(0,a.jsx)(v.CommandInput,{ref:P,placeholder:"Search branches...",value:E,onChange:$,onKeyDown:z,"data-testid":"adopt-branch-search"}),(0,a.jsxs)(v.CommandList,{children:[!N&&0===q.length&&(0,a.jsx)(v.CommandEmpty,{children:0===y.length?"No branches found.":E?"No match — press Enter to use this value.":"No branches available."}),N?(0,a.jsx)(v.CommandEmpty,{children:(0,a.jsx)(p.Loader2,{className:"mx-auto h-4 w-4 animate-spin"})}):null,q.length>0&&(0,a.jsx)(v.CommandGroup,{children:q.map(e=>(0,a.jsxs)(v.CommandItem,{selected:e===S,onClick:()=>M(e),children:[(0,a.jsx)(c.Check,{className:(0,j.cn)("me-2 h-4 w-4",e===S?"opacity-100":"opacity-0")}),(0,a.jsx)(m.GitBranch,{className:"me-2 h-3 w-3 opacity-50"}),e]},e))})]})]})})]}),(0,a.jsx)("p",{className:"text-muted-foreground text-xs",children:O?"Select a branch from the dropdown or type to search. Local and remote branches are shown.":"Please select a repository above to see available branches."})]}),n?(0,a.jsx)("p",{className:"text-destructive text-sm","data-testid":"adopt-branch-error",children:n}):null]})}),(0,a.jsx)("div",{className:"border-t p-4",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(x.Button,{type:"button",variant:"outline",onClick:K,disabled:o,className:"flex-1",children:"Cancel"}),(0,a.jsx)(x.Button,{type:"submit",disabled:J,className:"flex-1","data-testid":"adopt-branch-submit",children:o?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.Loader2,{className:"me-2 h-4 w-4 animate-spin"}),"Adopting..."]}):"Adopt Branch"})]})})]})})}function w({repositoryPath:e,repositories:o}){let c=(0,s.useRouter)(),i=(0,s.usePathname)(),[d,m]=(0,t.useState)(!1),[p,u]=(0,t.useState)(),[h,x]=(0,t.useState)([]),[f,b]=(0,t.useState)(!1),[v,g]=(0,t.useState)(e),j=i.startsWith("/adopt"),w=!d&&j;(0,t.useEffect)(()=>{!j&&d&&m(!1)},[j,d]),(0,t.useEffect)(()=>{j&&(u(void 0),g(e))},[j,e]),(0,t.useEffect)(()=>{j&&v?(b(!0),x([]),l(v).then(x).catch(()=>x([])).finally(()=>b(!1))):x([])},[j,v]);let y=(0,t.useCallback)(()=>{c.push("/control-center")},[c]),N=(0,t.useCallback)(e=>{g(e)},[]),S=(0,t.useCallback)((e,a)=>{u(void 0),m(!0),c.push("/control-center"),n({branchName:e,repositoryPath:a}).then(e=>{e.error?r.toast.error(e.error):(window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:e.feature.id,name:e.feature.name,description:e.feature.description,repositoryPath:e.feature.repositoryPath}})),r.toast.success(`Branch adopted as "${e.feature.name}"`))}).catch(()=>{r.toast.error("Failed to adopt branch"),m(!1)})},[c]);return(0,a.jsx)(C,{open:w,onClose:y,onSubmit:S,isSubmitting:d,error:p,repositories:o,selectedRepositoryPath:v,onRepositoryChange:N,branches:h,branchesLoading:f})}e.s(["AdoptDrawerClient",()=>w],936479)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,853756,e=>{"use strict";let t=(0,e.i(903645).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",()=>t],853756)},383379,e=>{"use strict";let t=(0,e.i(903645).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",()=>t],383379)},440106,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(711719),i=e.i(935946),l=e.i(83428),s=e.i(542049),n=e.i(453360),o=e.i(941698),d=e.i(99105),c=e.i(723925),p=e.i(860253);e.i(541001);var u=e.i(64780),h=e.i(131777),x=e.i(508893);let m=(0,x.createServerReference)("40d598a484e187624eab017da54f9731ce4f592c66",x.callServer,void 0,x.findSourceMapURL,"createProjectAndFeature"),g=(0,x.createServerReference)("40645357a559aa008b8943a06f8811d680bd95e865",x.callServer,void 0,x.findSourceMapURL,"createApplication");var f=e.i(180886),b=e.i(41413);e.i(650032);var v=e.i(486254);e.i(692233);var j=e.i(210025),y=e.i(102828),w=e.i(470646),k=e.i(731151);let N=["application","fast","spec"],C={application:{icon:s.LayoutGrid,label:"Application",placeholder:"Build a modern e-commerce storefront with product catalog...",suggestions:["A landing page with hero, features, and pricing sections","Full-stack SaaS app with auth, billing, and dashboard","Mobile-first social media app with real-time chat","Personal portfolio with blog and project showcase"]},fast:{icon:n.Zap,label:"Fast",placeholder:"Add a dark mode toggle to the settings page...",suggestions:["Add pagination to the users list endpoint","Fix the broken logout redirect","Add input validation to the signup form","Refactor the API error handling middleware"]},spec:{icon:o.ClipboardList,label:"Spec Driven",placeholder:"Implement a role-based access control system with audit logging...",suggestions:["OAuth2 authentication with SSO and MFA support","Event-driven notification system with email and push","REST API with versioning, rate limiting, and OpenAPI docs","Data pipeline with ETL, validation, and monitoring"]}};function D({onRepositorySelect:e,onApplicationCreated:s,onClose:n,className:o}){let{t:x}=(0,u.useTranslation)("web"),[D,A]=(0,r.useState)(""),[S,P]=(0,r.useState)(void 0),[L,M]=(0,r.useState)(void 0);(0,r.useEffect)(()=>{(0,f.getDefaultAgentAndModel)().then(e=>{P(t=>t??e.agentType),M(t=>t??e.model)})},[]);let[T,_]=(0,r.useState)("application"),[R,E]=(0,r.useState)(!1),[O,I]=(0,r.useState)(null),[z,F]=(0,r.useState)(!1),$=(0,r.useRef)(null),B=(0,k.useAttachments)(),H=!!e,Z=H?T:"application",V=(0,r.useCallback)(()=>{_(e=>{let t=N.indexOf(e);return N[(t+1)%N.length]})},[]);(0,r.useEffect)(()=>{let t=t=>{"Escape"===t.key&&n&&n(),"Tab"===t.key&&t.shiftKey&&e&&(t.preventDefault(),V())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[n,V,e]);let W=(0,r.useCallback)(async()=>{if(D.trim()&&!R){E(!0),I(null);try{if("application"!==Z&&e){let t=await m({description:D.trim(),attachments:B.completedAttachments.map(e=>({path:e.path,name:e.name,notes:e.notes})),agentType:S,model:L,fast:"fast"===Z});if(t.error){I(t.error),E(!1);return}t.repositoryPath&&e?.(t.repositoryPath),t.feature&&t.repositoryPath&&window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.repositoryPath}}))}else{let e=await g({description:D.trim(),agentType:S,modelOverride:L,initialPrompt:D.trim()});if(e.error){I(e.error),E(!1);return}e.application&&s?.(e.application.id)}}catch{I("Something went wrong. Please try again."),E(!1)}}},[D,R,Z,B.completedAttachments,S,L,e,s]),U=(0,r.useCallback)(e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),W())},[W]),G=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/dialog/pick-files");if(!e.ok)return;let t=await e.json();if(!t.paths?.length)return;for(let e of t.paths){let t=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,sessionId:"onboarding"})});if(!t.ok)continue;let r=await t.json();B.addAttachment(r)}}catch{}},[B.addAttachment]),K=(0,r.useCallback)(e=>{A(e),$.current?.focus()},[]),q=C[Z],Q=q.icon;return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,h.cn)("relative flex h-full w-full flex-col items-center justify-center overflow-hidden px-8",o),children:[(0,t.jsx)("div",{className:"onboard-bg pointer-events-none absolute inset-0 animate-[onboard-fade-in_1.2s_ease-out_both]"}),n?(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":"Close",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 absolute top-4 right-4 z-10 cursor-pointer rounded p-1.5 transition-colors",children:(0,t.jsx)(p.X,{className:"h-5 w-5"})}):null,(0,t.jsxs)("div",{className:"relative flex w-full max-w-2xl flex-col items-center",children:[(0,t.jsx)("div",{className:"mb-6 animate-[onboard-logo_0.8s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"0ms"},children:(0,t.jsx)(j.ShepLogo,{size:72,className:"text-foreground"})}),(0,t.jsx)("h1",{className:"text-foreground animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-5xl font-extralight tracking-tight",style:{animationDelay:"120ms"},children:"What do you want to build?"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-3 animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-lg leading-relaxed font-light",style:{animationDelay:"220ms"},children:"Describe your idea and Shep creates the project for you."}),(0,t.jsxs)("div",{className:"mt-10 w-full animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"350ms"},children:[(0,t.jsxs)("div",{onFocus:()=>F(!0),onBlur:()=>F(!1),onDragEnter:B.handleDragEnter,onDragLeave:B.handleDragLeave,onDragOver:B.handleDragOver,onDrop:B.handleDrop,className:(0,h.cn)("flex flex-col rounded-xl border transition-all duration-200","border-border/60 bg-background shadow-sm dark:border-white/10 dark:bg-white/[0.04]",z&&"ring-ring/50 border-ring shadow-md ring-[3px] dark:border-orange-500/40 dark:ring-orange-500/25",B.isDragOver&&"border-primary/50 bg-primary/5",R&&"opacity-70"),children:[(0,t.jsx)("textarea",{ref:$,rows:2,autoFocus:!0,value:D,onChange:e=>A(e.target.value),onKeyDown:U,onPaste:B.handlePaste,placeholder:q.placeholder,disabled:R,className:"text-foreground placeholder:text-muted-foreground/60 max-h-[10rem] min-h-[4.5rem] w-full resize-none border-0 bg-transparent px-4 py-3.5 text-sm leading-relaxed focus:outline-none disabled:cursor-not-allowed"}),B.attachments.length>0?(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2.5 overflow-x-auto overflow-y-visible px-5 pt-2 pb-2",children:B.attachments.map(e=>(0,t.jsx)(v.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>B.removeAttachment(e.id),loading:e.loading,notes:e.notes,onNotesChange:t=>B.updateNotes(e.id,t)},e.id))}):null,B.uploadError?(0,t.jsx)("p",{className:"text-destructive px-4 pb-2 text-xs",children:B.uploadError}):null,(0,t.jsxs)("div",{className:"border-border/60 flex shrink-0 items-center gap-3 border-t px-3 py-2 dark:border-white/10",children:[(0,t.jsx)(b.AgentModelPicker,{initialAgentType:S??"",initialModel:L??"",mode:"override",showInstallStatus:!0,onAgentModelChange:(e,t)=>{P(e),M(t)},className:"w-55"}),(0,t.jsx)("div",{className:"flex-1"}),H?(0,t.jsxs)(w.DropdownMenu,{children:[(0,t.jsx)(w.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button","data-testid":"build-mode-selector",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs transition-colors",children:[(0,t.jsxs)("span",{className:"flex animate-[onboard-fade-up_0.25s_ease-out_both] items-center gap-1.5",children:[(0,t.jsx)(Q,{className:"h-3.5 w-3.5"}),q.label]},Z),(0,t.jsx)(d.ChevronDown,{className:"h-3 w-3 opacity-50"})]})}),(0,t.jsx)(w.DropdownMenuContent,{align:"end",className:"min-w-[160px]",children:N.map(e=>{let r=C[e],a=r.icon,i=Z===e;return(0,t.jsxs)(w.DropdownMenuItem,{onClick:()=>_(e),"data-testid":`build-mode-${e}`,className:"flex items-center gap-2",children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"flex-1",children:r.label}),i?(0,t.jsx)(c.Check,{className:"text-foreground h-3.5 w-3.5"}):null]},e)})})]}):null,(0,t.jsxs)(y.Tooltip,{children:[(0,t.jsx)(y.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:G,disabled:R,"aria-label":x("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors disabled:opacity-50",children:(0,t.jsx)(i.Paperclip,{className:"h-4 w-4"})})}),(0,t.jsx)(y.TooltipContent,{side:"top",children:x("chat.attachFiles")})]}),(0,t.jsx)("button",{type:"button",onClick:W,disabled:!D.trim()||R,className:(0,h.cn)("bg-foreground text-background inline-flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-lg","hover:bg-foreground/90 disabled:pointer-events-none disabled:opacity-30","transition-all duration-150"),children:R?(0,t.jsx)(l.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(a.SendHorizontal,{className:"h-3.5 w-3.5"})})]})]}),O?(0,t.jsx)("p",{className:"text-destructive mt-2 text-center text-sm",children:O}):null]}),(0,t.jsx)("div",{className:"mt-6 flex animate-[onboard-fade-up_0.4s_ease-out_both] flex-wrap justify-center gap-2",children:q.suggestions.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>K(e),disabled:R,className:"text-muted-foreground hover:text-foreground border-border/60 hover:border-border hover:bg-accent/50 cursor-pointer rounded-full border px-3.5 py-1.5 text-xs transition-all duration-150 disabled:opacity-50 dark:border-white/10 dark:hover:border-white/20 dark:hover:bg-white/[0.06]",children:e},e))},Z)]})]})}e.s(["ControlCenterEmptyState",()=>D],440106)},408798,e=>{"use strict";var t=e.i(508893);let r=(0,t.createServerReference)("40ee0dce4d739915bb12ef0b956193880235b9a565",t.callServer,void 0,t.findSourceMapURL,"deleteApplication");e.s(["deleteApplication",()=>r])},942616,e=>{"use strict";function t(e,t,r,a){return"processing"===t?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:"awaiting_input"===t?{label:"Action Required",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!0,previewDisabled:!0}:"interrupted"===a?{label:"Interrupted",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!1,previewDisabled:!0}:"failed"===a?{label:"Failed",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:"building"===a?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:r?{label:"Live",dotClass:"bg-emerald-500",borderClass:"",pulse:!0,previewDisabled:!1}:"Error"===e?{label:"Error",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:{label:"Ready",dotClass:"bg-sky-500",borderClass:"",pulse:!1,previewDisabled:!1}}e.s(["deriveAppLiveStatus",()=>t])},672971,e=>{"use strict";function t(e){return`app-${e}`}e.s(["featureIdForApplication",()=>t])},370002,e=>{"use strict";var t=e.i(215131);e.s(["TriangleAlert",()=>t.default])},74573,e=>{"use strict";var t=e.i(679606),r=e.i(317406);function a({d:e,...r}){return(0,t.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...r,"aria-hidden":"true",children:(0,t.jsx)("path",{d:e})})}function i(e){return(0,t.jsx)(a,{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",...e})}let l={[r.CloudDeploymentProvider.CloudflarePages]:function(e){return(0,t.jsx)(a,{d:"M10.715 14.32H5.442l-.64-1.203L13.673 0l1.397.579-1.752 9.112h5.24l.648 1.192L10.719 24l-1.412-.54ZM4.091 5.448a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.543 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.544 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm8.657-2.7h5.424l.772.771v16.975l-.772.772h-7.392l.374-.579h6.779l.432-.432V3.758l-.432-.432h-4.676l-.552 2.85h-.59l.529-2.877.108-.552ZM2.74 21.265l-.772-.772V3.518l.772-.771h7.677l-.386.579H2.98l-.432.432v16.496l.432.432h5.586l-.092.579zm1.157-1.93h3.28l-.116.58h-3.55l-.192-.193v-3.473l.578 1.158zm13.117 0 .579.58H14.7l.385-.58z",...e})},[r.CloudDeploymentProvider.Vercel]:function(e){return(0,t.jsx)(a,{d:"m12 1.608 12 20.784H0Z",...e})},[r.CloudDeploymentProvider.Netlify]:function(e){return(0,t.jsx)(a,{d:"M6.49 19.04h-.23L5.13 17.9v-.23l1.73-1.71h1.2l.15.15v1.2L6.5 19.04ZM5.13 6.31V6.1l1.13-1.13h.23L8.2 6.68v1.2l-.15.15h-1.2L5.13 6.31Zm9.96 9.09h-1.65l-.14-.13v-3.83c0-.68-.27-1.2-1.1-1.23-.42 0-.9 0-1.43.02l-.07.08v4.96l-.14.14H8.9l-.13-.14V8.73l.13-.14h3.7a2.6 2.6 0 0 1 2.61 2.6v4.08l-.13.14Zm-8.37-2.44H.14L0 12.82v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14Zm17.14 0h-6.58l-.14-.14v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14ZM11.05 6.55V1.64l.14-.14h1.65l.14.14v4.9l-.14.14h-1.65l-.14-.13Zm0 15.81v-4.9l.14-.14h1.65l.14.13v4.91l-.14.14h-1.65l-.14-.14Z",...e})},[r.CloudDeploymentProvider.AwsAmplify]:function(e){return(0,t.jsx)(a,{d:"M11.58 2.1 1.15 20.87h4.33l1.9-3.5h9.24l1.9 3.5h4.33L12.42 2.1h-.84Zm.42 5.6 3.12 5.73H8.88L12 7.7Z",...e})},[r.CloudDeploymentProvider.GcpCloudRun]:function(e){return(0,t.jsx)(a,{d:"M12.19 2.38a9.344 9.344 0 0 0-9.234 6.893c.053-.02-.055.013 0 0-3.875 2.551-3.922 8.11-.247 10.941l.006-.007-.007.03a6.717 6.717 0 0 0 4.077 1.356h5.173l.03.03h5.192c6.687.053 9.376-8.605 3.835-12.35a9.365 9.365 0 0 0-2.821-4.552l-.043.043.006-.05A9.344 9.344 0 0 0 12.19 2.38zm-.358 4.146c1.244-.04 2.518.368 3.486 1.15a5.186 5.186 0 0 1 1.862 4.078v.518c3.53-.07 3.53 5.262 0 5.193h-5.193l-.008.009v-.04H6.785a2.59 2.59 0 0 1-1.067-.23h.001a2.597 2.597 0 1 1 3.437-3.437l3.013-3.012A6.747 6.747 0 0 0 8.11 8.24c.018-.01.04-.026.054-.023a5.186 5.186 0 0 1 3.67-1.69z",...e})}},s={[r.CloudDeploymentProvider.CloudflarePages]:"#F38020",[r.CloudDeploymentProvider.Vercel]:"#000000",[r.CloudDeploymentProvider.Netlify]:"#00C7B7",[r.CloudDeploymentProvider.AwsAmplify]:"#FF9900",[r.CloudDeploymentProvider.GcpCloudRun]:"#4285F4"};e.s(["CLOUD_PROVIDER_BRAND_HEX",0,s,"CLOUD_PROVIDER_ICONS",0,l,"GitHubIcon",()=>i])},453721,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(711434),i=e.i(962885),l=e.i(619933),s=e.i(382569),n=e.i(542049),o=e.i(83428),d=e.i(3214),c=e.i(853756),p=e.i(131777),u=e.i(873504),h=e.i(440106),x=e.i(958481),m=e.i(383379),g=e.i(730702);let f=(0,e.i(903645).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);var b=e.i(32494),v=e.i(731463),j=e.i(724042),y=e.i(43416),w=e.i(267669),k=e.i(370002),N=e.i(453360),C=e.i(434682),D=e.i(360112),A=e.i(735364),S=e.i(602287),P=e.i(470646),L=e.i(408798),M=e.i(942616),T=e.i(680554),_=e.i(8537),R=e.i(317406),E=e.i(672971),O=e.i(74573);let I="rgba(255,255,255,0.13)",z="rgba(255,255,255,0.07)",F="rgba(255,255,255,0.04)",$=[function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[Array.from({length:8},(e,r)=>Array.from({length:16},(e,a)=>(0,t.jsx)("circle",{cx:10+20*a,cy:10+20*r,r:"1.5",fill:z},`${r}-${a}`))),(0,t.jsx)("circle",{cx:"240",cy:"56",r:"52",fill:"none",stroke:F,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"240",cy:"56",r:"32",fill:"none",stroke:I,strokeWidth:"0.8"}),(0,t.jsx)("circle",{cx:"60",cy:"112",r:"14",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"60",cy:"112",r:"6",fill:F})]})},function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[[24,48,72,96,120].map((e,r)=>(0,t.jsx)("path",{d:`M0,${e} C64,${e-18+4*r} 128,${e+18-3*r} 192,${e-12+2*r} S288,${e+14} 320,${e}`,fill:"none",stroke:2===r?I:z,strokeWidth:2===r?1.5:1},`wave-${e}`)),(0,t.jsx)("path",{d:"M0,72 C64,54 128,90 192,60 S288,86 320,72 L320,160 L0,160 Z",fill:F}),(0,t.jsx)("circle",{cx:"290",cy:"30",r:"18",fill:"none",stroke:z,strokeWidth:"1"})]})},function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"160",cy:"160",r:"120",fill:"none",stroke:F,strokeWidth:"40"}),(0,t.jsx)("circle",{cx:"100",cy:"60",r:"70",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"220",cy:"80",r:"55",fill:"none",stroke:I,strokeWidth:"1"}),(0,t.jsx)("polygon",{points:"160,18 196,60 160,102 124,60",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"20",cy:"20",r:"2",fill:I}),(0,t.jsx)("circle",{cx:"300",cy:"20",r:"2",fill:I}),(0,t.jsx)("circle",{cx:"20",cy:"140",r:"2",fill:I}),(0,t.jsx)("circle",{cx:"300",cy:"140",r:"2",fill:I})]})},function(){let e=[];for(let r=32;r<320;r+=32)e.push((0,t.jsx)("line",{x1:r,y1:"0",x2:r,y2:"160",stroke:F,strokeWidth:"1"},`v${r}`));for(let r=32;r<160;r+=32)e.push((0,t.jsx)("line",{x1:"0",y1:r,x2:"320",y2:r,stroke:F,strokeWidth:"1"},`h${r}`));return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[e,[20,40,64,90].map(e=>(0,t.jsx)("circle",{cx:"160",cy:"80",r:e,fill:"none",stroke:40===e?I:z,strokeWidth:"1"},e)),(0,t.jsx)("circle",{cx:"160",cy:"80",r:"4",fill:I})]})}];function B({name:e}){let r=$[function(e){let t=0x811c9dc5;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,0x1000193)>>>0;return t}(e)%$.length];return(0,t.jsx)(r,{})}function H({application:i,className:l}){let s=(0,a.useRouter)(),n=(0,C.useQueryClient)(),[d,c]=(0,r.useState)(!1),u=(0,T.useTurnStatus)((0,E.featureIdForApplication)(i.id)),h=(0,_.useDeployAction)({targetId:i.id,targetType:"application",repositoryPath:i.repositoryPath}),I=h.url,z=(0,M.deriveAppLiveStatus)(i.status,u,!!I,i.effectiveStatus),F=i.cloudDeploymentUrl??null,$=i.cloudDeploymentProvider??null,H=$?O.CLOUD_PROVIDER_ICONS[$]:null,Z=$?O.CLOUD_PROVIDER_BRAND_HEX[$]:void 0,V=i.cloudDeploymentStatus===R.CloudDeploymentStatus.Deployed&&!!F,W=i.cloudDeploymentStatus===R.CloudDeploymentStatus.Uploading,U=i.cloudDeploymentStatus===R.CloudDeploymentStatus.Failed,G="building"===i.effectiveStatus,K="interrupted"===i.effectiveStatus,q="failed"===i.effectiveStatus,Q=h.status===R.DeploymentState.Booting||h.deployLoading,X=h.status===R.DeploymentState.Ready&&!!I,J=X?I:V?F:null,Y=!!J,ee=()=>s.push(`/application/${i.id}`),et=i.repositoryPath.split(/[/\\]/).pop()??i.repositoryPath;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("article",{"data-testid":"application-card",onClick:ee,className:(0,p.cn)("group relative flex cursor-pointer flex-col overflow-hidden rounded-sm","bg-card dark:bg-neutral-900","border-border/60 border shadow-sm dark:border-white/10","hover:border-border transition-all duration-200 hover:shadow-lg dark:hover:border-white/20 dark:hover:shadow-black/40","min-h-[280px]",l),children:[(0,t.jsxs)("div",{className:"relative overflow-hidden",style:{height:160},children:[Y?(0,t.jsxs)("div",{className:"absolute inset-0 bg-white dark:bg-neutral-900",children:[(0,t.jsx)("iframe",{src:J,title:`${i.name} preview`,className:"pointer-events-none absolute top-0 left-0 origin-top-left border-0",style:{width:"250%",height:"250%",transform:"scale(0.4)"},sandbox:"allow-same-origin allow-scripts",loading:"lazy"}),(0,t.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center gap-2 bg-black/60 opacity-0 transition-opacity group-hover:opacity-100",onClick:e=>e.stopPropagation(),children:[X?(0,t.jsxs)("button",{type:"button",onClick:()=>void h.stop(),disabled:h.stopLoading,className:"inline-flex h-7 cursor-pointer items-center gap-1 rounded-full bg-white/90 px-3 text-[11px] font-semibold text-neutral-900 hover:bg-red-50 hover:text-red-600",children:[h.stopLoading?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(y.RefreshCw,{className:"h-3 w-3"}),"Stop"]}):null,(0,t.jsxs)("button",{type:"button",onClick:()=>window.open(J,"_blank","noopener,noreferrer"),className:"inline-flex h-7 cursor-pointer items-center gap-1 rounded-full bg-white/90 px-3 text-[11px] font-semibold text-neutral-900 hover:bg-white",children:[(0,t.jsx)(g.ExternalLink,{className:"h-3 w-3"}),"Open"]})]})]}):Q?(0,t.jsx)("div",{className:"absolute inset-0 bg-white dark:bg-neutral-900",children:(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[(0,t.jsx)(o.Loader2,{className:"h-6 w-6 animate-spin text-amber-500"}),(0,t.jsx)("span",{className:"text-[11px] font-medium text-amber-600 dark:text-amber-400",children:"Starting…"})]})}):(0,t.jsx)("div",{className:"absolute inset-0 overflow-hidden bg-[#111827] dark:bg-neutral-800",children:(0,t.jsx)(B,{name:i.name})}),(0,t.jsx)("div",{className:"absolute top-2.5 left-2.5",onClick:e=>e.stopPropagation(),children:V?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white uppercase backdrop-blur-sm",children:[H?(0,t.jsx)(H,{className:"h-3 w-3",style:{color:Z??"#fff"}}):(0,t.jsx)("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-emerald-400"}),"Live"]}):W?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white/80 uppercase backdrop-blur-sm",children:[(0,t.jsx)(o.Loader2,{className:"h-2.5 w-2.5 animate-spin"}),"Deploying"]}):G?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white/80 uppercase backdrop-blur-sm",children:[(0,t.jsx)(N.Zap,{className:"h-2.5 w-2.5"}),"Building"]}):z.pulse?(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:(0,p.cn)("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",z.dotClass)}),(0,t.jsx)("span",{className:(0,p.cn)("relative inline-flex h-2 w-2 rounded-full",z.dotClass)})]}):null}),(0,t.jsx)("div",{className:"absolute top-2.5 right-2.5",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)(P.DropdownMenu,{children:[(0,t.jsx)(P.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:"flex h-6 w-6 cursor-pointer items-center justify-center rounded-full bg-black/30 text-white/80 opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100 hover:bg-black/50",children:(0,t.jsx)(v.MoreHorizontal,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(P.DropdownMenuContent,{align:"end",sideOffset:4,children:(0,t.jsxs)(P.DropdownMenuItem,{className:"text-destructive focus:text-destructive cursor-pointer",onClick:()=>c(!0),children:[(0,t.jsx)(w.Trash2,{className:"mr-2 h-3.5 w-3.5"}),"Delete"]})})]})})]}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5 px-3.5 pt-3 pb-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-foreground line-clamp-1 text-[14px] leading-tight font-semibold",children:i.name}),i.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 line-clamp-1 text-[11px] leading-relaxed",children:i.description}):null]}),W?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(o.Loader2,{className:"text-muted-foreground h-3 w-3 shrink-0 animate-spin"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-[11px]",children:["Deploying to ",$??"cloud","…"]})]}):U?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(x.AlertTriangle,{className:"text-destructive/70 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-destructive/80 text-[11px]",children:"Deployment failed"})]}):G?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(N.Zap,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Building with AI…"}),(0,t.jsx)("div",{className:"ml-auto flex gap-0.5",children:[0,1,2].map(e=>(0,t.jsx)("span",{className:"bg-muted-foreground/40 h-1 w-1 animate-bounce rounded-full",style:{animationDelay:`${120*e}ms`}},e))})]}):K?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(x.AlertTriangle,{className:"h-3 w-3 shrink-0 text-amber-500/70"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Build interrupted"})]}):q?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(k.TriangleAlert,{className:"text-destructive/70 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Build failed"})]}):V?null:(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(b.Globe,{className:"text-muted-foreground/40 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground/60 text-[11px]",children:"Not deployed yet"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3.5 pt-2 pb-3",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",title:i.repositoryPath,onClick:async t=>{t.stopPropagation();let{openDirectory:r}=await e.A(127062);await r(i.repositoryPath)},className:"text-muted-foreground/70 hover:text-foreground inline-flex shrink-0 items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(f,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:et})]}),F?(0,t.jsxs)("a",{href:F,target:"_blank",rel:"noopener noreferrer",title:F,className:"text-muted-foreground/70 hover:text-foreground inline-flex min-w-0 items-center gap-1 text-[10px] transition-colors",children:[H?(0,t.jsx)(H,{className:"h-3 w-3 shrink-0",style:{color:Z}}):(0,t.jsx)(b.Globe,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:function(e,t=22){let r=e.replace(/^https?:\/\//,"").replace(/\/$/,"");if(r.length<=t)return r;let a=r.slice(-(t-6));return`${r.slice(0,5)}…${a}`}(F)})]}):null]}),G||W?(0,t.jsxs)("span",{className:"text-muted-foreground inline-flex shrink-0 items-center gap-1.5 text-[11px]",children:[(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}),G?"Building…":"Deploying…"]}):F&&V?(0,t.jsxs)("a",{href:F,target:"_blank",rel:"noopener noreferrer",className:"bg-foreground text-background inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold transition-opacity hover:opacity-80",children:[(0,t.jsx)(g.ExternalLink,{className:"h-3 w-3"}),"Open live"]}):K?(0,t.jsxs)("button",{type:"button",onClick:ee,className:"inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-amber-500 px-3 text-[11px] font-semibold text-white transition-opacity hover:opacity-80",children:[(0,t.jsx)(j.Play,{className:"h-3 w-3 fill-current"}),"Continue"]}):q?(0,t.jsxs)("button",{type:"button",onClick:ee,className:"bg-destructive inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-white transition-opacity hover:opacity-80",children:[(0,t.jsx)(m.ArrowRight,{className:"h-3 w-3"}),"View error"]}):(0,t.jsxs)("button",{type:"button",onClick:ee,className:"bg-foreground text-background inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold transition-opacity hover:opacity-80",children:[(0,t.jsx)(m.ArrowRight,{className:"h-3 w-3"}),"Open"]})]})]}),(0,t.jsx)(S.Dialog,{open:d,onOpenChange:c,children:(0,t.jsxs)(S.DialogContent,{className:"max-w-xs",children:[(0,t.jsxs)(S.DialogHeader,{children:[(0,t.jsx)(S.DialogTitle,{children:"Delete application?"}),(0,t.jsxs)(S.DialogDescription,{children:["This will permanently remove ",(0,t.jsx)("strong",{children:i.name}),"."]})]}),(0,t.jsxs)(S.DialogFooter,{className:"grid grid-cols-2 gap-2 sm:flex-none",children:[(0,t.jsx)(S.DialogClose,{asChild:!0,children:(0,t.jsx)(A.Button,{variant:"outline",children:"Cancel"})}),(0,t.jsx)(A.Button,{variant:"destructive",onClick:async()=>{c(!1);let e=await (0,L.deleteApplication)(i.id);e.error?D.toast.error("Failed to delete",{description:e.error}):(D.toast.success("Application deleted"),n.invalidateQueries({queryKey:["applications"]}))},children:"Delete"})]})]})})]})}function Z({className:l}){let s=(0,a.useRouter)(),[d,c]=(0,r.useState)(!1),{data:x=[],isLoading:m}=(0,i.useQuery)({queryKey:["applications"],queryFn:async()=>{let e=await fetch("/api/applications");if(!e.ok)throw Error("Failed to fetch applications");return e.json()},staleTime:3e4}),g=(0,r.useMemo)(()=>[...x].sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()),[x]);return(0,t.jsx)(u.DeploymentStatusProvider,{initialDeployments:[],children:(0,t.jsxs)("div",{"data-testid":"applications-page-client",className:(0,p.cn)("relative flex min-h-full flex-col",l),children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.LayoutGrid,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Applications"}),m?null:(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[x.length," ",1===x.length?"app":"apps"]})]}),m?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(o.Loader2,{className:"text-muted-foreground h-5 w-5 animate-spin"})}):0===g.length?(0,t.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,t.jsx)(h.ControlCenterEmptyState,{onApplicationCreated:e=>{s.push(`/application/${e}`)}})}):(0,t.jsxs)("div",{"data-testid":"applications-page-grid",className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:[(0,t.jsx)(V,{onDescribe:()=>c(!0),onOpenLocalDirectory:async()=>{let{pickFolder:t}=await e.A(633405),r=await t();if(!r)return;let{adoptLocalDirectory:a}=await e.A(743797),i=await a({repositoryPath:r});i.applicationId&&s.push(`/application/${i.applicationId}`)},onImportGitHub:()=>window.dispatchEvent(new CustomEvent("shep:open-github-import"))}),g.map(e=>(0,t.jsx)(H,{application:e},e.id))]})]}),d?(0,t.jsx)("div",{className:"absolute inset-0 z-40",children:(0,t.jsx)(h.ControlCenterEmptyState,{onApplicationCreated:e=>{s.push(`/application/${e}`)},onClose:()=>c(!1),className:"bg-background"})}):null]})})}function V({onDescribe:e,onOpenLocalDirectory:r,onImportGitHub:a}){let i=[{icon:(0,t.jsx)(c.Sparkles,{className:"h-4 w-4"}),label:"Describe with AI",description:"Tell Shep what to build — it scaffolds + ships",onClick:e,accent:"text-indigo-500 bg-indigo-100 dark:bg-indigo-900/60"},...r?[{icon:(0,t.jsx)(l.FolderOpen,{className:"h-4 w-4"}),label:"Open local project",description:"Pick an existing folder and continue from there",onClick:r,accent:"text-amber-600 bg-amber-100 dark:bg-amber-900/40"}]:[],...a?[{icon:(0,t.jsx)(s.Github,{className:"h-4 w-4"}),label:"Import from GitHub",description:"Connect an existing repo to manage here",onClick:a,accent:"text-foreground bg-muted"}]:[]];return(0,t.jsxs)("div",{className:(0,p.cn)("group relative flex cursor-pointer flex-col overflow-hidden rounded-sm border-2","border-dashed border-indigo-200 bg-transparent transition-all duration-200","hover:border-indigo-400 hover:bg-indigo-500/[0.03]","dark:border-indigo-900 dark:hover:border-indigo-700","min-h-[280px]"),onClick:e,children:[(0,t.jsxs)("div",{className:(0,p.cn)("absolute inset-0 flex flex-col items-center justify-center gap-3","transition-opacity duration-200 group-hover:opacity-0","pointer-events-none"),children:[(0,t.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-full bg-indigo-100 text-indigo-500 dark:bg-indigo-900/60 dark:text-indigo-400",children:(0,t.jsx)(d.Plus,{className:"h-5 w-5 stroke-[2]"})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-foreground text-sm font-semibold",children:"New application"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:"Click to get started"})]})]}),(0,t.jsxs)("div",{className:(0,p.cn)("absolute inset-0 flex flex-col justify-center gap-1.5 px-4","translate-y-3 opacity-0 transition-all duration-200","group-hover:translate-y-0 group-hover:opacity-100"),children:[(0,t.jsx)("p",{className:"text-muted-foreground mb-1 px-1 text-[10px] font-medium tracking-wide uppercase",children:"How would you like to start?"}),i.map(e=>(0,t.jsxs)("button",{type:"button",onClick:t=>{t.stopPropagation(),e.onClick()},className:(0,p.cn)("flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-left","border-border/60 bg-background/80 border transition-all duration-150","hover:border-indigo-300 hover:bg-indigo-50 dark:hover:border-indigo-700 dark:hover:bg-indigo-950/40"),children:[(0,t.jsx)("span",{className:(0,p.cn)("flex h-7 w-7 shrink-0 items-center justify-center rounded-md",e.accent),children:e.icon}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-foreground text-[12px] font-semibold",children:e.label}),(0,t.jsx)("div",{className:"text-muted-foreground truncate text-[10px]",children:e.description})]})]},e.label))]})]})}e.s(["ApplicationsPageClient",()=>Z],453721)},127062,e=>{e.v(t=>Promise.all(["static/chunks/bc7ff90acabf822e.js"].map(t=>e.l(t))).then(()=>t(617841)))},633405,e=>{e.v(e=>Promise.resolve().then(()=>e(478521)))},743797,e=>{e.v(t=>Promise.all(["static/chunks/df57f17a33536493.js"].map(t=>e.l(t))).then(()=>t(868662)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,853756,e=>{"use strict";let t=(0,e.i(903645).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",()=>t],853756)},383379,e=>{"use strict";let t=(0,e.i(903645).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",()=>t],383379)},440106,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(711719),i=e.i(935946),l=e.i(83428),s=e.i(542049),n=e.i(453360),o=e.i(941698),d=e.i(99105),c=e.i(723925),p=e.i(860253);e.i(541001);var u=e.i(64780),h=e.i(131777),x=e.i(508893);let m=(0,x.createServerReference)("4065491a97be2a50102b694855c38043cb50fd5c4a",x.callServer,void 0,x.findSourceMapURL,"createProjectAndFeature"),g=(0,x.createServerReference)("40815776e7a6bda2e6d29f697d71e59aae910c82d1",x.callServer,void 0,x.findSourceMapURL,"createApplication");var f=e.i(797157),b=e.i(41413);e.i(650032);var v=e.i(486254);e.i(692233);var j=e.i(210025),y=e.i(102828),w=e.i(470646),k=e.i(731151);let N=["application","fast","spec"],C={application:{icon:s.LayoutGrid,label:"Application",placeholder:"Build a modern e-commerce storefront with product catalog...",suggestions:["A landing page with hero, features, and pricing sections","Full-stack SaaS app with auth, billing, and dashboard","Mobile-first social media app with real-time chat","Personal portfolio with blog and project showcase"]},fast:{icon:n.Zap,label:"Fast",placeholder:"Add a dark mode toggle to the settings page...",suggestions:["Add pagination to the users list endpoint","Fix the broken logout redirect","Add input validation to the signup form","Refactor the API error handling middleware"]},spec:{icon:o.ClipboardList,label:"Spec Driven",placeholder:"Implement a role-based access control system with audit logging...",suggestions:["OAuth2 authentication with SSO and MFA support","Event-driven notification system with email and push","REST API with versioning, rate limiting, and OpenAPI docs","Data pipeline with ETL, validation, and monitoring"]}};function D({onRepositorySelect:e,onApplicationCreated:s,onClose:n,className:o}){let{t:x}=(0,u.useTranslation)("web"),[D,A]=(0,r.useState)(""),[S,P]=(0,r.useState)(void 0),[L,M]=(0,r.useState)(void 0);(0,r.useEffect)(()=>{(0,f.getDefaultAgentAndModel)().then(e=>{P(t=>t??e.agentType),M(t=>t??e.model)})},[]);let[T,_]=(0,r.useState)("application"),[R,E]=(0,r.useState)(!1),[O,I]=(0,r.useState)(null),[z,F]=(0,r.useState)(!1),$=(0,r.useRef)(null),B=(0,k.useAttachments)(),H=!!e,Z=H?T:"application",V=(0,r.useCallback)(()=>{_(e=>{let t=N.indexOf(e);return N[(t+1)%N.length]})},[]);(0,r.useEffect)(()=>{let t=t=>{"Escape"===t.key&&n&&n(),"Tab"===t.key&&t.shiftKey&&e&&(t.preventDefault(),V())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[n,V,e]);let W=(0,r.useCallback)(async()=>{if(D.trim()&&!R){E(!0),I(null);try{if("application"!==Z&&e){let t=await m({description:D.trim(),attachments:B.completedAttachments.map(e=>({path:e.path,name:e.name,notes:e.notes})),agentType:S,model:L,fast:"fast"===Z});if(t.error){I(t.error),E(!1);return}t.repositoryPath&&e?.(t.repositoryPath),t.feature&&t.repositoryPath&&window.dispatchEvent(new CustomEvent("shep:feature-created",{detail:{featureId:t.feature.id,name:t.feature.name,description:t.feature.description,repositoryPath:t.repositoryPath}}))}else{let e=await g({description:D.trim(),agentType:S,modelOverride:L,initialPrompt:D.trim()});if(e.error){I(e.error),E(!1);return}e.application&&s?.(e.application.id)}}catch{I("Something went wrong. Please try again."),E(!1)}}},[D,R,Z,B.completedAttachments,S,L,e,s]),U=(0,r.useCallback)(e=>{"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),W())},[W]),G=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/dialog/pick-files");if(!e.ok)return;let t=await e.json();if(!t.paths?.length)return;for(let e of t.paths){let t=await fetch("/api/attachments/upload-from-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e,sessionId:"onboarding"})});if(!t.ok)continue;let r=await t.json();B.addAttachment(r)}}catch{}},[B.addAttachment]),K=(0,r.useCallback)(e=>{A(e),$.current?.focus()},[]),q=C[Z],Q=q.icon;return(0,t.jsxs)("div",{"data-testid":"control-center-empty-state",className:(0,h.cn)("relative flex h-full w-full flex-col items-center justify-center overflow-hidden px-8",o),children:[(0,t.jsx)("div",{className:"onboard-bg pointer-events-none absolute inset-0 animate-[onboard-fade-in_1.2s_ease-out_both]"}),n?(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":"Close",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 absolute top-4 right-4 z-10 cursor-pointer rounded p-1.5 transition-colors",children:(0,t.jsx)(p.X,{className:"h-5 w-5"})}):null,(0,t.jsxs)("div",{className:"relative flex w-full max-w-2xl flex-col items-center",children:[(0,t.jsx)("div",{className:"mb-6 animate-[onboard-logo_0.8s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"0ms"},children:(0,t.jsx)(j.ShepLogo,{size:72,className:"text-foreground"})}),(0,t.jsx)("h1",{className:"text-foreground animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-5xl font-extralight tracking-tight",style:{animationDelay:"120ms"},children:"What do you want to build?"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-3 animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both] text-center text-lg leading-relaxed font-light",style:{animationDelay:"220ms"},children:"Describe your idea and Shep creates the project for you."}),(0,t.jsxs)("div",{className:"mt-10 w-full animate-[onboard-fade-up_0.7s_cubic-bezier(0.16,1,0.3,1)_both]",style:{animationDelay:"350ms"},children:[(0,t.jsxs)("div",{onFocus:()=>F(!0),onBlur:()=>F(!1),onDragEnter:B.handleDragEnter,onDragLeave:B.handleDragLeave,onDragOver:B.handleDragOver,onDrop:B.handleDrop,className:(0,h.cn)("flex flex-col rounded-xl border transition-all duration-200","border-border/60 bg-background shadow-sm dark:border-white/10 dark:bg-white/[0.04]",z&&"ring-ring/50 border-ring shadow-md ring-[3px] dark:border-orange-500/40 dark:ring-orange-500/25",B.isDragOver&&"border-primary/50 bg-primary/5",R&&"opacity-70"),children:[(0,t.jsx)("textarea",{ref:$,rows:2,autoFocus:!0,value:D,onChange:e=>A(e.target.value),onKeyDown:U,onPaste:B.handlePaste,placeholder:q.placeholder,disabled:R,className:"text-foreground placeholder:text-muted-foreground/60 max-h-[10rem] min-h-[4.5rem] w-full resize-none border-0 bg-transparent px-4 py-3.5 text-sm leading-relaxed focus:outline-none disabled:cursor-not-allowed"}),B.attachments.length>0?(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2.5 overflow-x-auto overflow-y-visible px-5 pt-2 pb-2",children:B.attachments.map(e=>(0,t.jsx)(v.AttachmentChip,{name:e.name,size:e.size,mimeType:e.mimeType,path:e.path,onRemove:()=>B.removeAttachment(e.id),loading:e.loading,notes:e.notes,onNotesChange:t=>B.updateNotes(e.id,t)},e.id))}):null,B.uploadError?(0,t.jsx)("p",{className:"text-destructive px-4 pb-2 text-xs",children:B.uploadError}):null,(0,t.jsxs)("div",{className:"border-border/60 flex shrink-0 items-center gap-3 border-t px-3 py-2 dark:border-white/10",children:[(0,t.jsx)(b.AgentModelPicker,{initialAgentType:S??"",initialModel:L??"",mode:"override",showInstallStatus:!0,onAgentModelChange:(e,t)=>{P(e),M(t)},className:"w-55"}),(0,t.jsx)("div",{className:"flex-1"}),H?(0,t.jsxs)(w.DropdownMenu,{children:[(0,t.jsx)(w.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)("button",{type:"button","data-testid":"build-mode-selector",className:"text-muted-foreground hover:text-foreground hover:bg-accent/50 flex cursor-pointer items-center gap-1.5 rounded-md px-2 py-1 text-xs transition-colors",children:[(0,t.jsxs)("span",{className:"flex animate-[onboard-fade-up_0.25s_ease-out_both] items-center gap-1.5",children:[(0,t.jsx)(Q,{className:"h-3.5 w-3.5"}),q.label]},Z),(0,t.jsx)(d.ChevronDown,{className:"h-3 w-3 opacity-50"})]})}),(0,t.jsx)(w.DropdownMenuContent,{align:"end",className:"min-w-[160px]",children:N.map(e=>{let r=C[e],a=r.icon,i=Z===e;return(0,t.jsxs)(w.DropdownMenuItem,{onClick:()=>_(e),"data-testid":`build-mode-${e}`,className:"flex items-center gap-2",children:[(0,t.jsx)(a,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"flex-1",children:r.label}),i?(0,t.jsx)(c.Check,{className:"text-foreground h-3.5 w-3.5"}):null]},e)})})]}):null,(0,t.jsxs)(y.Tooltip,{children:[(0,t.jsx)(y.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",onClick:G,disabled:R,"aria-label":x("chat.attachFiles"),className:"text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors disabled:opacity-50",children:(0,t.jsx)(i.Paperclip,{className:"h-4 w-4"})})}),(0,t.jsx)(y.TooltipContent,{side:"top",children:x("chat.attachFiles")})]}),(0,t.jsx)("button",{type:"button",onClick:W,disabled:!D.trim()||R,className:(0,h.cn)("bg-foreground text-background inline-flex h-8 w-8 shrink-0 cursor-pointer items-center justify-center rounded-lg","hover:bg-foreground/90 disabled:pointer-events-none disabled:opacity-30","transition-all duration-150"),children:R?(0,t.jsx)(l.Loader2,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(a.SendHorizontal,{className:"h-3.5 w-3.5"})})]})]}),O?(0,t.jsx)("p",{className:"text-destructive mt-2 text-center text-sm",children:O}):null]}),(0,t.jsx)("div",{className:"mt-6 flex animate-[onboard-fade-up_0.4s_ease-out_both] flex-wrap justify-center gap-2",children:q.suggestions.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>K(e),disabled:R,className:"text-muted-foreground hover:text-foreground border-border/60 hover:border-border hover:bg-accent/50 cursor-pointer rounded-full border px-3.5 py-1.5 text-xs transition-all duration-150 disabled:opacity-50 dark:border-white/10 dark:hover:border-white/20 dark:hover:bg-white/[0.06]",children:e},e))},Z)]})]})}e.s(["ControlCenterEmptyState",()=>D],440106)},312121,e=>{"use strict";var t=e.i(508893);let r=(0,t.createServerReference)("40d920f3d98dbcb907e8b9309df6d6f5301fe517e8",t.callServer,void 0,t.findSourceMapURL,"deleteApplication");e.s(["deleteApplication",()=>r])},942616,e=>{"use strict";function t(e,t,r,a){return"processing"===t?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:"awaiting_input"===t?{label:"Action Required",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!0,previewDisabled:!0}:"interrupted"===a?{label:"Interrupted",dotClass:"bg-amber-500",borderClass:"border-amber-500/60",pulse:!1,previewDisabled:!0}:"failed"===a?{label:"Failed",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:"building"===a?{label:"In Progress",dotClass:"bg-violet-500",borderClass:"",pulse:!0,previewDisabled:!0}:r?{label:"Live",dotClass:"bg-emerald-500",borderClass:"",pulse:!0,previewDisabled:!1}:"Error"===e?{label:"Error",dotClass:"bg-red-500",borderClass:"border-red-500/60",pulse:!1,previewDisabled:!0}:{label:"Ready",dotClass:"bg-sky-500",borderClass:"",pulse:!1,previewDisabled:!1}}e.s(["deriveAppLiveStatus",()=>t])},672971,e=>{"use strict";function t(e){return`app-${e}`}e.s(["featureIdForApplication",()=>t])},370002,e=>{"use strict";var t=e.i(215131);e.s(["TriangleAlert",()=>t.default])},74573,e=>{"use strict";var t=e.i(679606),r=e.i(317406);function a({d:e,...r}){return(0,t.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",...r,"aria-hidden":"true",children:(0,t.jsx)("path",{d:e})})}function i(e){return(0,t.jsx)(a,{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",...e})}let l={[r.CloudDeploymentProvider.CloudflarePages]:function(e){return(0,t.jsx)(a,{d:"M10.715 14.32H5.442l-.64-1.203L13.673 0l1.397.579-1.752 9.112h5.24l.648 1.192L10.719 24l-1.412-.54ZM4.091 5.448a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.543 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm1.544 0a.5787.5787 0 1 1 0-1.1574.5787.5787 0 0 1 0 1.1574zm8.657-2.7h5.424l.772.771v16.975l-.772.772h-7.392l.374-.579h6.779l.432-.432V3.758l-.432-.432h-4.676l-.552 2.85h-.59l.529-2.877.108-.552ZM2.74 21.265l-.772-.772V3.518l.772-.771h7.677l-.386.579H2.98l-.432.432v16.496l.432.432h5.586l-.092.579zm1.157-1.93h3.28l-.116.58h-3.55l-.192-.193v-3.473l.578 1.158zm13.117 0 .579.58H14.7l.385-.58z",...e})},[r.CloudDeploymentProvider.Vercel]:function(e){return(0,t.jsx)(a,{d:"m12 1.608 12 20.784H0Z",...e})},[r.CloudDeploymentProvider.Netlify]:function(e){return(0,t.jsx)(a,{d:"M6.49 19.04h-.23L5.13 17.9v-.23l1.73-1.71h1.2l.15.15v1.2L6.5 19.04ZM5.13 6.31V6.1l1.13-1.13h.23L8.2 6.68v1.2l-.15.15h-1.2L5.13 6.31Zm9.96 9.09h-1.65l-.14-.13v-3.83c0-.68-.27-1.2-1.1-1.23-.42 0-.9 0-1.43.02l-.07.08v4.96l-.14.14H8.9l-.13-.14V8.73l.13-.14h3.7a2.6 2.6 0 0 1 2.61 2.6v4.08l-.13.14Zm-8.37-2.44H.14L0 12.82v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14Zm17.14 0h-6.58l-.14-.14v-1.64l.14-.14h6.58l.14.14v1.64l-.14.14ZM11.05 6.55V1.64l.14-.14h1.65l.14.14v4.9l-.14.14h-1.65l-.14-.13Zm0 15.81v-4.9l.14-.14h1.65l.14.13v4.91l-.14.14h-1.65l-.14-.14Z",...e})},[r.CloudDeploymentProvider.AwsAmplify]:function(e){return(0,t.jsx)(a,{d:"M11.58 2.1 1.15 20.87h4.33l1.9-3.5h9.24l1.9 3.5h4.33L12.42 2.1h-.84Zm.42 5.6 3.12 5.73H8.88L12 7.7Z",...e})},[r.CloudDeploymentProvider.GcpCloudRun]:function(e){return(0,t.jsx)(a,{d:"M12.19 2.38a9.344 9.344 0 0 0-9.234 6.893c.053-.02-.055.013 0 0-3.875 2.551-3.922 8.11-.247 10.941l.006-.007-.007.03a6.717 6.717 0 0 0 4.077 1.356h5.173l.03.03h5.192c6.687.053 9.376-8.605 3.835-12.35a9.365 9.365 0 0 0-2.821-4.552l-.043.043.006-.05A9.344 9.344 0 0 0 12.19 2.38zm-.358 4.146c1.244-.04 2.518.368 3.486 1.15a5.186 5.186 0 0 1 1.862 4.078v.518c3.53-.07 3.53 5.262 0 5.193h-5.193l-.008.009v-.04H6.785a2.59 2.59 0 0 1-1.067-.23h.001a2.597 2.597 0 1 1 3.437-3.437l3.013-3.012A6.747 6.747 0 0 0 8.11 8.24c.018-.01.04-.026.054-.023a5.186 5.186 0 0 1 3.67-1.69z",...e})}},s={[r.CloudDeploymentProvider.CloudflarePages]:"#F38020",[r.CloudDeploymentProvider.Vercel]:"#000000",[r.CloudDeploymentProvider.Netlify]:"#00C7B7",[r.CloudDeploymentProvider.AwsAmplify]:"#FF9900",[r.CloudDeploymentProvider.GcpCloudRun]:"#4285F4"};e.s(["CLOUD_PROVIDER_BRAND_HEX",0,s,"CLOUD_PROVIDER_ICONS",0,l,"GitHubIcon",()=>i])},453721,e=>{"use strict";var t=e.i(679606),r=e.i(152155),a=e.i(711434),i=e.i(962885),l=e.i(619933),s=e.i(382569),n=e.i(542049),o=e.i(83428),d=e.i(3214),c=e.i(853756),p=e.i(131777),u=e.i(873504),h=e.i(440106),x=e.i(958481),m=e.i(383379),g=e.i(730702);let f=(0,e.i(903645).default)("folder-git-2",[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]);var b=e.i(32494),v=e.i(731463),j=e.i(724042),y=e.i(43416),w=e.i(267669),k=e.i(370002),N=e.i(453360),C=e.i(434682),D=e.i(360112),A=e.i(735364),S=e.i(602287),P=e.i(470646),L=e.i(312121),M=e.i(942616),T=e.i(680554),_=e.i(8537),R=e.i(317406),E=e.i(672971),O=e.i(74573);let I="rgba(255,255,255,0.13)",z="rgba(255,255,255,0.07)",F="rgba(255,255,255,0.04)",$=[function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[Array.from({length:8},(e,r)=>Array.from({length:16},(e,a)=>(0,t.jsx)("circle",{cx:10+20*a,cy:10+20*r,r:"1.5",fill:z},`${r}-${a}`))),(0,t.jsx)("circle",{cx:"240",cy:"56",r:"52",fill:"none",stroke:F,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"240",cy:"56",r:"32",fill:"none",stroke:I,strokeWidth:"0.8"}),(0,t.jsx)("circle",{cx:"60",cy:"112",r:"14",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"60",cy:"112",r:"6",fill:F})]})},function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[[24,48,72,96,120].map((e,r)=>(0,t.jsx)("path",{d:`M0,${e} C64,${e-18+4*r} 128,${e+18-3*r} 192,${e-12+2*r} S288,${e+14} 320,${e}`,fill:"none",stroke:2===r?I:z,strokeWidth:2===r?1.5:1},`wave-${e}`)),(0,t.jsx)("path",{d:"M0,72 C64,54 128,90 192,60 S288,86 320,72 L320,160 L0,160 Z",fill:F}),(0,t.jsx)("circle",{cx:"290",cy:"30",r:"18",fill:"none",stroke:z,strokeWidth:"1"})]})},function(){return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"160",cy:"160",r:"120",fill:"none",stroke:F,strokeWidth:"40"}),(0,t.jsx)("circle",{cx:"100",cy:"60",r:"70",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"220",cy:"80",r:"55",fill:"none",stroke:I,strokeWidth:"1"}),(0,t.jsx)("polygon",{points:"160,18 196,60 160,102 124,60",fill:"none",stroke:z,strokeWidth:"1"}),(0,t.jsx)("circle",{cx:"20",cy:"20",r:"2",fill:I}),(0,t.jsx)("circle",{cx:"300",cy:"20",r:"2",fill:I}),(0,t.jsx)("circle",{cx:"20",cy:"140",r:"2",fill:I}),(0,t.jsx)("circle",{cx:"300",cy:"140",r:"2",fill:I})]})},function(){let e=[];for(let r=32;r<320;r+=32)e.push((0,t.jsx)("line",{x1:r,y1:"0",x2:r,y2:"160",stroke:F,strokeWidth:"1"},`v${r}`));for(let r=32;r<160;r+=32)e.push((0,t.jsx)("line",{x1:"0",y1:r,x2:"320",y2:r,stroke:F,strokeWidth:"1"},`h${r}`));return(0,t.jsxs)("svg",{viewBox:"0 0 320 160",className:"h-full w-full","aria-hidden":"true",children:[e,[20,40,64,90].map(e=>(0,t.jsx)("circle",{cx:"160",cy:"80",r:e,fill:"none",stroke:40===e?I:z,strokeWidth:"1"},e)),(0,t.jsx)("circle",{cx:"160",cy:"80",r:"4",fill:I})]})}];function B({name:e}){let r=$[function(e){let t=0x811c9dc5;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,0x1000193)>>>0;return t}(e)%$.length];return(0,t.jsx)(r,{})}function H({application:i,className:l}){let s=(0,a.useRouter)(),n=(0,C.useQueryClient)(),[d,c]=(0,r.useState)(!1),u=(0,T.useTurnStatus)((0,E.featureIdForApplication)(i.id)),h=(0,_.useDeployAction)({targetId:i.id,targetType:"application",repositoryPath:i.repositoryPath}),I=h.url,z=(0,M.deriveAppLiveStatus)(i.status,u,!!I,i.effectiveStatus),F=i.cloudDeploymentUrl??null,$=i.cloudDeploymentProvider??null,H=$?O.CLOUD_PROVIDER_ICONS[$]:null,Z=$?O.CLOUD_PROVIDER_BRAND_HEX[$]:void 0,V=i.cloudDeploymentStatus===R.CloudDeploymentStatus.Deployed&&!!F,W=i.cloudDeploymentStatus===R.CloudDeploymentStatus.Uploading,U=i.cloudDeploymentStatus===R.CloudDeploymentStatus.Failed,G="building"===i.effectiveStatus,K="interrupted"===i.effectiveStatus,q="failed"===i.effectiveStatus,Q=h.status===R.DeploymentState.Booting||h.deployLoading,X=h.status===R.DeploymentState.Ready&&!!I,J=X?I:V?F:null,Y=!!J,ee=()=>s.push(`/application/${i.id}`),et=i.repositoryPath.split(/[/\\]/).pop()??i.repositoryPath;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("article",{"data-testid":"application-card",onClick:ee,className:(0,p.cn)("group relative flex cursor-pointer flex-col overflow-hidden rounded-sm","bg-card dark:bg-neutral-900","border-border/60 border shadow-sm dark:border-white/10","hover:border-border transition-all duration-200 hover:shadow-lg dark:hover:border-white/20 dark:hover:shadow-black/40","min-h-[280px]",l),children:[(0,t.jsxs)("div",{className:"relative overflow-hidden",style:{height:160},children:[Y?(0,t.jsxs)("div",{className:"absolute inset-0 bg-white dark:bg-neutral-900",children:[(0,t.jsx)("iframe",{src:J,title:`${i.name} preview`,className:"pointer-events-none absolute top-0 left-0 origin-top-left border-0",style:{width:"250%",height:"250%",transform:"scale(0.4)"},sandbox:"allow-same-origin allow-scripts",loading:"lazy"}),(0,t.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center gap-2 bg-black/60 opacity-0 transition-opacity group-hover:opacity-100",onClick:e=>e.stopPropagation(),children:[X?(0,t.jsxs)("button",{type:"button",onClick:()=>void h.stop(),disabled:h.stopLoading,className:"inline-flex h-7 cursor-pointer items-center gap-1 rounded-full bg-white/90 px-3 text-[11px] font-semibold text-neutral-900 hover:bg-red-50 hover:text-red-600",children:[h.stopLoading?(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(y.RefreshCw,{className:"h-3 w-3"}),"Stop"]}):null,(0,t.jsxs)("button",{type:"button",onClick:()=>window.open(J,"_blank","noopener,noreferrer"),className:"inline-flex h-7 cursor-pointer items-center gap-1 rounded-full bg-white/90 px-3 text-[11px] font-semibold text-neutral-900 hover:bg-white",children:[(0,t.jsx)(g.ExternalLink,{className:"h-3 w-3"}),"Open"]})]})]}):Q?(0,t.jsx)("div",{className:"absolute inset-0 bg-white dark:bg-neutral-900",children:(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[(0,t.jsx)(o.Loader2,{className:"h-6 w-6 animate-spin text-amber-500"}),(0,t.jsx)("span",{className:"text-[11px] font-medium text-amber-600 dark:text-amber-400",children:"Starting…"})]})}):(0,t.jsx)("div",{className:"absolute inset-0 overflow-hidden bg-[#111827] dark:bg-neutral-800",children:(0,t.jsx)(B,{name:i.name})}),(0,t.jsx)("div",{className:"absolute top-2.5 left-2.5",onClick:e=>e.stopPropagation(),children:V?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white uppercase backdrop-blur-sm",children:[H?(0,t.jsx)(H,{className:"h-3 w-3",style:{color:Z??"#fff"}}):(0,t.jsx)("span",{className:"h-1.5 w-1.5 animate-pulse rounded-full bg-emerald-400"}),"Live"]}):W?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white/80 uppercase backdrop-blur-sm",children:[(0,t.jsx)(o.Loader2,{className:"h-2.5 w-2.5 animate-spin"}),"Deploying"]}):G?(0,t.jsxs)("span",{className:"flex items-center gap-1 rounded-full bg-black/30 px-2 py-0.5 text-[9px] font-bold tracking-wider text-white/80 uppercase backdrop-blur-sm",children:[(0,t.jsx)(N.Zap,{className:"h-2.5 w-2.5"}),"Building"]}):z.pulse?(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:(0,p.cn)("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75",z.dotClass)}),(0,t.jsx)("span",{className:(0,p.cn)("relative inline-flex h-2 w-2 rounded-full",z.dotClass)})]}):null}),(0,t.jsx)("div",{className:"absolute top-2.5 right-2.5",onClick:e=>e.stopPropagation(),children:(0,t.jsxs)(P.DropdownMenu,{children:[(0,t.jsx)(P.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)("button",{type:"button",className:"flex h-6 w-6 cursor-pointer items-center justify-center rounded-full bg-black/30 text-white/80 opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100 hover:bg-black/50",children:(0,t.jsx)(v.MoreHorizontal,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(P.DropdownMenuContent,{align:"end",sideOffset:4,children:(0,t.jsxs)(P.DropdownMenuItem,{className:"text-destructive focus:text-destructive cursor-pointer",onClick:()=>c(!0),children:[(0,t.jsx)(w.Trash2,{className:"mr-2 h-3.5 w-3.5"}),"Delete"]})})]})})]}),(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-1.5 px-3.5 pt-3 pb-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-foreground line-clamp-1 text-[14px] leading-tight font-semibold",children:i.name}),i.description?(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 line-clamp-1 text-[11px] leading-relaxed",children:i.description}):null]}),W?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(o.Loader2,{className:"text-muted-foreground h-3 w-3 shrink-0 animate-spin"}),(0,t.jsxs)("span",{className:"text-muted-foreground text-[11px]",children:["Deploying to ",$??"cloud","…"]})]}):U?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(x.AlertTriangle,{className:"text-destructive/70 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-destructive/80 text-[11px]",children:"Deployment failed"})]}):G?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(N.Zap,{className:"text-muted-foreground h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Building with AI…"}),(0,t.jsx)("div",{className:"ml-auto flex gap-0.5",children:[0,1,2].map(e=>(0,t.jsx)("span",{className:"bg-muted-foreground/40 h-1 w-1 animate-bounce rounded-full",style:{animationDelay:`${120*e}ms`}},e))})]}):K?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(x.AlertTriangle,{className:"h-3 w-3 shrink-0 text-amber-500/70"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Build interrupted"})]}):q?(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(k.TriangleAlert,{className:"text-destructive/70 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:"Build failed"})]}):V?null:(0,t.jsxs)("div",{className:"flex items-center gap-1.5 py-0.5",children:[(0,t.jsx)(b.Globe,{className:"text-muted-foreground/40 h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"text-muted-foreground/60 text-[11px]",children:"Not deployed yet"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3.5 pt-2 pb-3",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",title:i.repositoryPath,onClick:async t=>{t.stopPropagation();let{openDirectory:r}=await e.A(127062);await r(i.repositoryPath)},className:"text-muted-foreground/70 hover:text-foreground inline-flex shrink-0 items-center gap-1 text-[10px] transition-colors",children:[(0,t.jsx)(f,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:et})]}),F?(0,t.jsxs)("a",{href:F,target:"_blank",rel:"noopener noreferrer",title:F,className:"text-muted-foreground/70 hover:text-foreground inline-flex min-w-0 items-center gap-1 text-[10px] transition-colors",children:[H?(0,t.jsx)(H,{className:"h-3 w-3 shrink-0",style:{color:Z}}):(0,t.jsx)(b.Globe,{className:"h-3 w-3 shrink-0"}),(0,t.jsx)("span",{className:"font-mono",children:function(e,t=22){let r=e.replace(/^https?:\/\//,"").replace(/\/$/,"");if(r.length<=t)return r;let a=r.slice(-(t-6));return`${r.slice(0,5)}…${a}`}(F)})]}):null]}),G||W?(0,t.jsxs)("span",{className:"text-muted-foreground inline-flex shrink-0 items-center gap-1.5 text-[11px]",children:[(0,t.jsx)(o.Loader2,{className:"h-3 w-3 animate-spin"}),G?"Building…":"Deploying…"]}):F&&V?(0,t.jsxs)("a",{href:F,target:"_blank",rel:"noopener noreferrer",className:"bg-foreground text-background inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold transition-opacity hover:opacity-80",children:[(0,t.jsx)(g.ExternalLink,{className:"h-3 w-3"}),"Open live"]}):K?(0,t.jsxs)("button",{type:"button",onClick:ee,className:"inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-amber-500 px-3 text-[11px] font-semibold text-white transition-opacity hover:opacity-80",children:[(0,t.jsx)(j.Play,{className:"h-3 w-3 fill-current"}),"Continue"]}):q?(0,t.jsxs)("button",{type:"button",onClick:ee,className:"bg-destructive inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold text-white transition-opacity hover:opacity-80",children:[(0,t.jsx)(m.ArrowRight,{className:"h-3 w-3"}),"View error"]}):(0,t.jsxs)("button",{type:"button",onClick:ee,className:"bg-foreground text-background inline-flex h-7 shrink-0 cursor-pointer items-center gap-1.5 rounded-full px-3 text-[11px] font-semibold transition-opacity hover:opacity-80",children:[(0,t.jsx)(m.ArrowRight,{className:"h-3 w-3"}),"Open"]})]})]}),(0,t.jsx)(S.Dialog,{open:d,onOpenChange:c,children:(0,t.jsxs)(S.DialogContent,{className:"max-w-xs",children:[(0,t.jsxs)(S.DialogHeader,{children:[(0,t.jsx)(S.DialogTitle,{children:"Delete application?"}),(0,t.jsxs)(S.DialogDescription,{children:["This will permanently remove ",(0,t.jsx)("strong",{children:i.name}),"."]})]}),(0,t.jsxs)(S.DialogFooter,{className:"grid grid-cols-2 gap-2 sm:flex-none",children:[(0,t.jsx)(S.DialogClose,{asChild:!0,children:(0,t.jsx)(A.Button,{variant:"outline",children:"Cancel"})}),(0,t.jsx)(A.Button,{variant:"destructive",onClick:async()=>{c(!1);let e=await (0,L.deleteApplication)(i.id);e.error?D.toast.error("Failed to delete",{description:e.error}):(D.toast.success("Application deleted"),n.invalidateQueries({queryKey:["applications"]}))},children:"Delete"})]})]})})]})}function Z({className:l}){let s=(0,a.useRouter)(),[d,c]=(0,r.useState)(!1),{data:x=[],isLoading:m}=(0,i.useQuery)({queryKey:["applications"],queryFn:async()=>{let e=await fetch("/api/applications");if(!e.ok)throw Error("Failed to fetch applications");return e.json()},staleTime:3e4}),g=(0,r.useMemo)(()=>[...x].sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()),[x]);return(0,t.jsx)(u.DeploymentStatusProvider,{initialDeployments:[],children:(0,t.jsxs)("div",{"data-testid":"applications-page-client",className:(0,p.cn)("relative flex min-h-full flex-col",l),children:[(0,t.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n.LayoutGrid,{className:"text-muted-foreground h-4 w-4"}),(0,t.jsx)("h1",{className:"text-sm font-bold tracking-tight",children:"Applications"}),m?null:(0,t.jsxs)("span",{className:"text-muted-foreground text-[10px]",children:[x.length," ",1===x.length?"app":"apps"]})]}),m?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(o.Loader2,{className:"text-muted-foreground h-5 w-5 animate-spin"})}):0===g.length?(0,t.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,t.jsx)(h.ControlCenterEmptyState,{onApplicationCreated:e=>{s.push(`/application/${e}`)}})}):(0,t.jsxs)("div",{"data-testid":"applications-page-grid",className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:[(0,t.jsx)(V,{onDescribe:()=>c(!0),onOpenLocalDirectory:async()=>{let{pickFolder:t}=await e.A(633405),r=await t();if(!r)return;let{adoptLocalDirectory:a}=await e.A(743797),i=await a({repositoryPath:r});i.applicationId&&s.push(`/application/${i.applicationId}`)},onImportGitHub:()=>window.dispatchEvent(new CustomEvent("shep:open-github-import"))}),g.map(e=>(0,t.jsx)(H,{application:e},e.id))]})]}),d?(0,t.jsx)("div",{className:"absolute inset-0 z-40",children:(0,t.jsx)(h.ControlCenterEmptyState,{onApplicationCreated:e=>{s.push(`/application/${e}`)},onClose:()=>c(!1),className:"bg-background"})}):null]})})}function V({onDescribe:e,onOpenLocalDirectory:r,onImportGitHub:a}){let i=[{icon:(0,t.jsx)(c.Sparkles,{className:"h-4 w-4"}),label:"Describe with AI",description:"Tell Shep what to build — it scaffolds + ships",onClick:e,accent:"text-indigo-500 bg-indigo-100 dark:bg-indigo-900/60"},...r?[{icon:(0,t.jsx)(l.FolderOpen,{className:"h-4 w-4"}),label:"Open local project",description:"Pick an existing folder and continue from there",onClick:r,accent:"text-amber-600 bg-amber-100 dark:bg-amber-900/40"}]:[],...a?[{icon:(0,t.jsx)(s.Github,{className:"h-4 w-4"}),label:"Import from GitHub",description:"Connect an existing repo to manage here",onClick:a,accent:"text-foreground bg-muted"}]:[]];return(0,t.jsxs)("div",{className:(0,p.cn)("group relative flex cursor-pointer flex-col overflow-hidden rounded-sm border-2","border-dashed border-indigo-200 bg-transparent transition-all duration-200","hover:border-indigo-400 hover:bg-indigo-500/[0.03]","dark:border-indigo-900 dark:hover:border-indigo-700","min-h-[280px]"),onClick:e,children:[(0,t.jsxs)("div",{className:(0,p.cn)("absolute inset-0 flex flex-col items-center justify-center gap-3","transition-opacity duration-200 group-hover:opacity-0","pointer-events-none"),children:[(0,t.jsx)("div",{className:"flex h-11 w-11 items-center justify-center rounded-full bg-indigo-100 text-indigo-500 dark:bg-indigo-900/60 dark:text-indigo-400",children:(0,t.jsx)(d.Plus,{className:"h-5 w-5 stroke-[2]"})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-foreground text-sm font-semibold",children:"New application"}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:"Click to get started"})]})]}),(0,t.jsxs)("div",{className:(0,p.cn)("absolute inset-0 flex flex-col justify-center gap-1.5 px-4","translate-y-3 opacity-0 transition-all duration-200","group-hover:translate-y-0 group-hover:opacity-100"),children:[(0,t.jsx)("p",{className:"text-muted-foreground mb-1 px-1 text-[10px] font-medium tracking-wide uppercase",children:"How would you like to start?"}),i.map(e=>(0,t.jsxs)("button",{type:"button",onClick:t=>{t.stopPropagation(),e.onClick()},className:(0,p.cn)("flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2.5 text-left","border-border/60 bg-background/80 border transition-all duration-150","hover:border-indigo-300 hover:bg-indigo-50 dark:hover:border-indigo-700 dark:hover:bg-indigo-950/40"),children:[(0,t.jsx)("span",{className:(0,p.cn)("flex h-7 w-7 shrink-0 items-center justify-center rounded-md",e.accent),children:e.icon}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-foreground text-[12px] font-semibold",children:e.label}),(0,t.jsx)("div",{className:"text-muted-foreground truncate text-[10px]",children:e.description})]})]},e.label))]})]})}e.s(["ApplicationsPageClient",()=>Z],453721)},127062,e=>{e.v(t=>Promise.all(["static/chunks/19aa3cc6df5f5833.js"].map(t=>e.l(t))).then(()=>t(617841)))},633405,e=>{e.v(e=>Promise.resolve().then(()=>e(478521)))},743797,e=>{e.v(t=>Promise.all(["static/chunks/66a4af80ba31ab99.js"].map(t=>e.l(t))).then(()=>t(868662)))}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,602287,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(90033),r=e.i(860253),i=e.i(131777);let l=s.Dialog.Root,n=s.Dialog.Trigger,o=s.Dialog.Portal,d=s.Dialog.Close,c=a.forwardRef(({className:e,onClick:a,...r},l)=>(0,t.jsx)(s.Dialog.Overlay,{ref:l,className:(0,i.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),a?.(e)},...r}));c.displayName=s.Dialog.Overlay.displayName;let u=a.forwardRef(({className:e,children:a,...l},n)=>(0,t.jsxs)(o,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(s.Dialog.Content,{ref:n,className:(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...l,children:[a,(0,t.jsxs)(s.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(r.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=s.Dialog.Content.displayName;let g=({className:e,...a})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...a});g.displayName="DialogHeader";let m=({className:e,...a})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});m.displayName="DialogFooter";let p=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Dialog.Title,{ref:r,className:(0,i.cn)("text-lg leading-none font-semibold tracking-tight",e),...a}));p.displayName=s.Dialog.Title.displayName;let x=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Dialog.Description,{ref:r,className:(0,i.cn)("text-muted-foreground text-sm",e),...a}));x.displayName=s.Dialog.Description.displayName,e.s(["Dialog",()=>l,"DialogClose",()=>d,"DialogContent",()=>u,"DialogDescription",()=>x,"DialogFooter",()=>m,"DialogHeader",()=>g,"DialogTitle",()=>p,"DialogTrigger",()=>n])},48306,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function s({className:e,...s}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}e.s(["Textarea",()=>s])},141957,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(287620),r=a.forwardRef((e,a)=>(0,t.jsx)(s.Primitive.label,{...e,ref:a,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));r.displayName="Label",e.s(["Label",()=>r,"Root",()=>r],127572);var i=e.i(127572),i=i,l=e.i(294237),n=e.i(131777);let o=(0,l.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)(i.Root,{ref:s,className:(0,n.cn)(o(),e),...a}));d.displayName=i.Root.displayName,e.s(["Label",()=>d],141957)},81846,e=>{"use strict";var t=e.i(679606),a=e.i(294237),s=e.i(131777);let r=(0,a.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:a,...i}){return(0,t.jsx)("div",{className:(0,s.cn)(r({variant:a}),e),...i})}e.s(["Badge",()=>i])},853756,e=>{"use strict";let t=(0,e.i(903645).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",()=>t],853756)},383379,e=>{"use strict";let t=(0,e.i(903645).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",()=>t],383379)},123620,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(294237),r=e.i(131777);let i=(0,s.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg]:absolute [&>svg]:top-4 [&>svg]:start-4 [&>svg]:text-foreground [&>svg+div]:translate-y-[-3px] [&>svg~*]:ps-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),l=a.forwardRef(({className:e,variant:a,...s},l)=>(0,t.jsx)("div",{ref:l,role:"alert",className:(0,r.cn)(i({variant:a}),e),...s}));l.displayName="Alert",a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("h5",{ref:s,className:(0,r.cn)("mb-1 leading-none font-medium tracking-tight",e),...a})).displayName="AlertTitle";let n=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("text-sm [&_p]:leading-relaxed",e),...a}));n.displayName="AlertDescription",e.s(["Alert",()=>l,"AlertDescription",()=>n])},270198,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(256460),r=e.i(273889),i=e.i(860253),l=e.i(735364);function n({id:e,title:n,description:o,ctaLabel:d,ctaHref:c,forceVisible:u}){let g=`shep:onboarding:${e}`,[m,p]=(0,a.useState)(!1),[x,f]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{if(p(!0),u)return void f(!0);try{let e=window.localStorage.getItem(g);f("1"!==e)}catch{f(!0)}},[u,g]),m&&x)?(0,t.jsxs)("div",{className:"bg-muted/40 flex items-start gap-3 rounded-lg border p-4","data-testid":`welcome-banner-${e}`,children:[(0,t.jsx)("div",{className:"bg-primary/10 text-primary flex h-9 w-9 shrink-0 items-center justify-center rounded-md",children:(0,t.jsx)(r.GraduationCap,{className:"size-4"})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:n}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:o})]}),c&&d?(0,t.jsx)("div",{children:(0,t.jsx)(l.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsx)(s.default,{href:c,"data-testid":`welcome-banner-${e}-cta`,children:d})})}):null]}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:function(){if(f(!1),!u)try{window.localStorage.setItem(g,"1")}catch{}},"aria-label":"Dismiss this hint","data-testid":`welcome-banner-${e}-dismiss`,children:(0,t.jsx)(i.X,{className:"size-4"})})]}):null}e.s(["WelcomeBanner",()=>n])},611660,e=>{"use strict";var t=e.i(679606),a=e.i(256460),s=e.i(926370),r=e.i(383379),i=e.i(853756),l=e.i(81846);function n({agents:e}){return 0===e.length?(0,t.jsxs)("div",{className:"bg-muted/30 rounded-lg border border-dashed p-6",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"No agents registered"}),(0,t.jsxs)("p",{className:"text-muted-foreground text-sm",children:["The built-in prompt registry is empty — register slots in",(0,t.jsx)("code",{className:"bg-muted mx-1 rounded px-1 py-0.5 text-xs",children:"builtin-prompt-registry.ts"}),"to expose agents in this editor."]})]}):(0,t.jsx)("ul",{className:"flex flex-col divide-y rounded-lg border","data-testid":"agent-list",children:e.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2","data-testid":`agent-row-${e.agentType}`,children:[(0,t.jsx)("div",{className:"bg-primary/10 text-primary flex h-8 w-8 items-center justify-center rounded-md",children:e.isCustom?(0,t.jsx)(i.Sparkles,{className:"size-4","aria-hidden":!0}):(0,t.jsx)(s.Bot,{className:"size-4","aria-hidden":!0})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:e.displayName??e.agentType}),e.isCustom?(0,t.jsx)(l.Badge,{variant:"secondary",className:"shrink-0",children:"Custom"}):null]}),(0,t.jsxs)("p",{className:"text-muted-foreground text-xs",children:[e.isCustom?e.agentType:null,e.isCustom?" · ":"",e.promptCount," prompt",1===e.promptCount?"":"s",e.overrideCount>0?` \xb7 ${e.overrideCount} override${1===e.overrideCount?"":"s"}`:""]})]}),(0,t.jsxs)(a.default,{href:`/agents/${e.agentType}`,className:"text-primary inline-flex shrink-0 items-center gap-1 text-xs hover:underline",children:["Edit",(0,t.jsx)(r.ArrowRight,{className:"size-3"})]})]},e.agentType))})}e.s(["AgentList",()=>n])},687639,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(711434),r=e.i(3214),i=e.i(123620),l=e.i(735364),n=e.i(602287),o=e.i(698127),d=e.i(141957),c=e.i(48306),u=e.i(508893);let g=(0,u.createServerReference)("40026dd1e1a296d5b931914f24d562790b5eea6152",u.callServer,void 0,u.findSourceMapURL,"createCustomAgent"),m=/^[a-z][a-z0-9-]{1,63}$/;function p({onCreateOverride:e,initialOpen:u,onNavigateOverride:p}){let x=(0,s.useRouter)(),[f,h]=(0,a.useState)(!!u),[v,b]=(0,a.useState)(""),[y,j]=(0,a.useState)(""),[N,w]=(0,a.useState)(""),[D,C]=(0,a.useState)("system"),[k,S]=(0,a.useState)(""),[T,R]=(0,a.useState)(null),[z,A]=(0,a.useTransition)();function B(){b(""),j(""),w(""),C("system"),S(""),R(null)}let L=m.test(v),P=L&&y.trim().length>0&&N.trim().length>0&&!z;return(0,t.jsxs)(n.Dialog,{open:f,onOpenChange:e=>{h(e),e||B()},children:[(0,t.jsx)(n.DialogTrigger,{asChild:!0,children:(0,t.jsxs)(l.Button,{"data-testid":"create-agent-trigger",children:[(0,t.jsx)(r.Plus,{className:"size-4"}),"New agent"]})}),(0,t.jsxs)(n.DialogContent,{className:"max-w-xl","data-testid":"create-agent-dialog",children:[(0,t.jsxs)(n.DialogHeader,{children:[(0,t.jsx)(n.DialogTitle,{children:"Create custom agent"}),(0,t.jsx)(n.DialogDescription,{children:"Stand up a new agent type with its own prompt slots and editable graph. Built-in agents stay untouched."})]}),(0,t.jsxs)("form",{className:"flex flex-col gap-4",onSubmit:function(t){t.preventDefault(),P&&(R(null),A(async()=>{let t=await (e??g)({agentType:v,name:y,description:N,...D.trim()&&k.length>0?{initialPromptId:D,initialPromptBody:k}:{}});if(!t.ok)return void R(t.error??"Failed to create agent");let a=t.agentType??v;B(),h(!1);let s=`/agents/${a}`;p?p(s):x.push(s)}))},children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"create-agent-type",children:"Stable type id"}),(0,t.jsx)(o.Input,{id:"create-agent-type","data-testid":"create-agent-type",placeholder:"e.g. code-review",value:v,onChange:e=>b(e.target.value.toLowerCase()),disabled:z,autoComplete:"off","aria-invalid":v.length>0&&!L}),(0,t.jsxs)("p",{className:"text-muted-foreground text-xs",children:["kebab-case, starts with a letter, max 64 chars (matches"," ",(0,t.jsx)("code",{className:"bg-muted rounded px-1",children:"/^[a-z][a-z0-9-]+$/"}),")"]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"create-agent-name",children:"Display name"}),(0,t.jsx)(o.Input,{id:"create-agent-name","data-testid":"create-agent-name",placeholder:"e.g. Code Review Agent",value:y,onChange:e=>j(e.target.value),disabled:z})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"create-agent-description",children:"Description"}),(0,t.jsx)(o.Input,{id:"create-agent-description","data-testid":"create-agent-description",placeholder:"What does this agent do?",value:N,onChange:e=>w(e.target.value),disabled:z})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 rounded-md border border-dashed p-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Seed first prompt (optional)"}),(0,t.jsx)(d.Label,{htmlFor:"create-agent-prompt-id",children:"Prompt slot id"}),(0,t.jsx)(o.Input,{id:"create-agent-prompt-id","data-testid":"create-agent-prompt-id",value:D,onChange:e=>C(e.target.value),disabled:z,placeholder:"e.g. system, plan.system"}),(0,t.jsx)(d.Label,{htmlFor:"create-agent-prompt-body",children:"Prompt body"}),(0,t.jsx)(c.Textarea,{id:"create-agent-prompt-body","data-testid":"create-agent-prompt-body",value:k,onChange:e=>S(e.target.value),rows:5,className:"font-mono text-xs",disabled:z,placeholder:"System prompt the agent will run with…"})]}),T?(0,t.jsx)(i.Alert,{variant:"destructive","data-testid":"create-agent-error",children:(0,t.jsx)(i.AlertDescription,{children:T})}):null,(0,t.jsx)(n.DialogFooter,{children:(0,t.jsx)(l.Button,{type:"submit",disabled:!P,"data-testid":"create-agent-submit",children:z?"Creating…":"Create agent"})})]})]})]})}e.s(["CreateAgentDialog",()=>p],687639)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,602287,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(90033),r=e.i(860253),i=e.i(131777);let l=s.Dialog.Root,n=s.Dialog.Trigger,o=s.Dialog.Portal,d=s.Dialog.Close,c=a.forwardRef(({className:e,onClick:a,...r},l)=>(0,t.jsx)(s.Dialog.Overlay,{ref:l,className:(0,i.cn)("data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/80 duration-150",e),onClick:e=>{e.stopPropagation(),a?.(e)},...r}));c.displayName=s.Dialog.Overlay.displayName;let u=a.forwardRef(({className:e,children:a,...l},n)=>(0,t.jsxs)(o,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(s.Dialog.Content,{ref:n,className:(0,i.cn)("bg-background data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-150 sm:rounded-lg",e),...l,children:[a,(0,t.jsxs)(s.Dialog.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute end-4 top-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none",children:[(0,t.jsx)(r.X,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));u.displayName=s.Dialog.Content.displayName;let g=({className:e,...a})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-start",e),...a});g.displayName="DialogHeader";let m=({className:e,...a})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...a});m.displayName="DialogFooter";let p=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Dialog.Title,{ref:r,className:(0,i.cn)("text-lg leading-none font-semibold tracking-tight",e),...a}));p.displayName=s.Dialog.Title.displayName;let x=a.forwardRef(({className:e,...a},r)=>(0,t.jsx)(s.Dialog.Description,{ref:r,className:(0,i.cn)("text-muted-foreground text-sm",e),...a}));x.displayName=s.Dialog.Description.displayName,e.s(["Dialog",()=>l,"DialogClose",()=>d,"DialogContent",()=>u,"DialogDescription",()=>x,"DialogFooter",()=>m,"DialogHeader",()=>g,"DialogTitle",()=>p,"DialogTrigger",()=>n])},48306,e=>{"use strict";var t=e.i(679606),a=e.i(131777);function s({className:e,...s}){return(0,t.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)("placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input field-sizing-content min-h-[80px] w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...s})}e.s(["Textarea",()=>s])},141957,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(287620),r=a.forwardRef((e,a)=>(0,t.jsx)(s.Primitive.label,{...e,ref:a,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));r.displayName="Label",e.s(["Label",()=>r,"Root",()=>r],127572);var i=e.i(127572),i=i,l=e.i(294237),n=e.i(131777);let o=(0,l.cva)("text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)(i.Root,{ref:s,className:(0,n.cn)(o(),e),...a}));d.displayName=i.Root.displayName,e.s(["Label",()=>d],141957)},81846,e=>{"use strict";var t=e.i(679606),a=e.i(294237),s=e.i(131777);let r=(0,a.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-none",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:a,...i}){return(0,t.jsx)("div",{className:(0,s.cn)(r({variant:a}),e),...i})}e.s(["Badge",()=>i])},853756,e=>{"use strict";let t=(0,e.i(903645).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",()=>t],853756)},383379,e=>{"use strict";let t=(0,e.i(903645).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",()=>t],383379)},123620,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(294237),r=e.i(131777);let i=(0,s.cva)("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg]:absolute [&>svg]:top-4 [&>svg]:start-4 [&>svg]:text-foreground [&>svg+div]:translate-y-[-3px] [&>svg~*]:ps-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),l=a.forwardRef(({className:e,variant:a,...s},l)=>(0,t.jsx)("div",{ref:l,role:"alert",className:(0,r.cn)(i({variant:a}),e),...s}));l.displayName="Alert",a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("h5",{ref:s,className:(0,r.cn)("mb-1 leading-none font-medium tracking-tight",e),...a})).displayName="AlertTitle";let n=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("text-sm [&_p]:leading-relaxed",e),...a}));n.displayName="AlertDescription",e.s(["Alert",()=>l,"AlertDescription",()=>n])},270198,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(256460),r=e.i(273889),i=e.i(860253),l=e.i(735364);function n({id:e,title:n,description:o,ctaLabel:d,ctaHref:c,forceVisible:u}){let g=`shep:onboarding:${e}`,[m,p]=(0,a.useState)(!1),[x,f]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{if(p(!0),u)return void f(!0);try{let e=window.localStorage.getItem(g);f("1"!==e)}catch{f(!0)}},[u,g]),m&&x)?(0,t.jsxs)("div",{className:"bg-muted/40 flex items-start gap-3 rounded-lg border p-4","data-testid":`welcome-banner-${e}`,children:[(0,t.jsx)("div",{className:"bg-primary/10 text-primary flex h-9 w-9 shrink-0 items-center justify-center rounded-md",children:(0,t.jsx)(r.GraduationCap,{className:"size-4"})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:n}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm",children:o})]}),c&&d?(0,t.jsx)("div",{children:(0,t.jsx)(l.Button,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsx)(s.default,{href:c,"data-testid":`welcome-banner-${e}-cta`,children:d})})}):null]}),(0,t.jsx)(l.Button,{variant:"ghost",size:"icon",className:"size-7 shrink-0",onClick:function(){if(f(!1),!u)try{window.localStorage.setItem(g,"1")}catch{}},"aria-label":"Dismiss this hint","data-testid":`welcome-banner-${e}-dismiss`,children:(0,t.jsx)(i.X,{className:"size-4"})})]}):null}e.s(["WelcomeBanner",()=>n])},611660,e=>{"use strict";var t=e.i(679606),a=e.i(256460),s=e.i(926370),r=e.i(383379),i=e.i(853756),l=e.i(81846);function n({agents:e}){return 0===e.length?(0,t.jsxs)("div",{className:"bg-muted/30 rounded-lg border border-dashed p-6",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"No agents registered"}),(0,t.jsxs)("p",{className:"text-muted-foreground text-sm",children:["The built-in prompt registry is empty — register slots in",(0,t.jsx)("code",{className:"bg-muted mx-1 rounded px-1 py-0.5 text-xs",children:"builtin-prompt-registry.ts"}),"to expose agents in this editor."]})]}):(0,t.jsx)("ul",{className:"flex flex-col divide-y rounded-lg border","data-testid":"agent-list",children:e.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-3 px-3 py-2","data-testid":`agent-row-${e.agentType}`,children:[(0,t.jsx)("div",{className:"bg-primary/10 text-primary flex h-8 w-8 items-center justify-center rounded-md",children:e.isCustom?(0,t.jsx)(i.Sparkles,{className:"size-4","aria-hidden":!0}):(0,t.jsx)(s.Bot,{className:"size-4","aria-hidden":!0})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("p",{className:"truncate text-sm font-medium",children:e.displayName??e.agentType}),e.isCustom?(0,t.jsx)(l.Badge,{variant:"secondary",className:"shrink-0",children:"Custom"}):null]}),(0,t.jsxs)("p",{className:"text-muted-foreground text-xs",children:[e.isCustom?e.agentType:null,e.isCustom?" · ":"",e.promptCount," prompt",1===e.promptCount?"":"s",e.overrideCount>0?` \xb7 ${e.overrideCount} override${1===e.overrideCount?"":"s"}`:""]})]}),(0,t.jsxs)(a.default,{href:`/agents/${e.agentType}`,className:"text-primary inline-flex shrink-0 items-center gap-1 text-xs hover:underline",children:["Edit",(0,t.jsx)(r.ArrowRight,{className:"size-3"})]})]},e.agentType))})}e.s(["AgentList",()=>n])},687639,e=>{"use strict";var t=e.i(679606),a=e.i(152155),s=e.i(711434),r=e.i(3214),i=e.i(123620),l=e.i(735364),n=e.i(602287),o=e.i(698127),d=e.i(141957),c=e.i(48306),u=e.i(508893);let g=(0,u.createServerReference)("405fd2f3ca66b41c82abc92f0c81160af517045106",u.callServer,void 0,u.findSourceMapURL,"createCustomAgent"),m=/^[a-z][a-z0-9-]{1,63}$/;function p({onCreateOverride:e,initialOpen:u,onNavigateOverride:p}){let x=(0,s.useRouter)(),[f,h]=(0,a.useState)(!!u),[v,b]=(0,a.useState)(""),[y,j]=(0,a.useState)(""),[N,w]=(0,a.useState)(""),[D,C]=(0,a.useState)("system"),[k,S]=(0,a.useState)(""),[T,R]=(0,a.useState)(null),[z,A]=(0,a.useTransition)();function B(){b(""),j(""),w(""),C("system"),S(""),R(null)}let L=m.test(v),P=L&&y.trim().length>0&&N.trim().length>0&&!z;return(0,t.jsxs)(n.Dialog,{open:f,onOpenChange:e=>{h(e),e||B()},children:[(0,t.jsx)(n.DialogTrigger,{asChild:!0,children:(0,t.jsxs)(l.Button,{"data-testid":"create-agent-trigger",children:[(0,t.jsx)(r.Plus,{className:"size-4"}),"New agent"]})}),(0,t.jsxs)(n.DialogContent,{className:"max-w-xl","data-testid":"create-agent-dialog",children:[(0,t.jsxs)(n.DialogHeader,{children:[(0,t.jsx)(n.DialogTitle,{children:"Create custom agent"}),(0,t.jsx)(n.DialogDescription,{children:"Stand up a new agent type with its own prompt slots and editable graph. Built-in agents stay untouched."})]}),(0,t.jsxs)("form",{className:"flex flex-col gap-4",onSubmit:function(t){t.preventDefault(),P&&(R(null),A(async()=>{let t=await (e??g)({agentType:v,name:y,description:N,...D.trim()&&k.length>0?{initialPromptId:D,initialPromptBody:k}:{}});if(!t.ok)return void R(t.error??"Failed to create agent");let a=t.agentType??v;B(),h(!1);let s=`/agents/${a}`;p?p(s):x.push(s)}))},children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"create-agent-type",children:"Stable type id"}),(0,t.jsx)(o.Input,{id:"create-agent-type","data-testid":"create-agent-type",placeholder:"e.g. code-review",value:v,onChange:e=>b(e.target.value.toLowerCase()),disabled:z,autoComplete:"off","aria-invalid":v.length>0&&!L}),(0,t.jsxs)("p",{className:"text-muted-foreground text-xs",children:["kebab-case, starts with a letter, max 64 chars (matches"," ",(0,t.jsx)("code",{className:"bg-muted rounded px-1",children:"/^[a-z][a-z0-9-]+$/"}),")"]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"create-agent-name",children:"Display name"}),(0,t.jsx)(o.Input,{id:"create-agent-name","data-testid":"create-agent-name",placeholder:"e.g. Code Review Agent",value:y,onChange:e=>j(e.target.value),disabled:z})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(d.Label,{htmlFor:"create-agent-description",children:"Description"}),(0,t.jsx)(o.Input,{id:"create-agent-description","data-testid":"create-agent-description",placeholder:"What does this agent do?",value:N,onChange:e=>w(e.target.value),disabled:z})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 rounded-md border border-dashed p-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"Seed first prompt (optional)"}),(0,t.jsx)(d.Label,{htmlFor:"create-agent-prompt-id",children:"Prompt slot id"}),(0,t.jsx)(o.Input,{id:"create-agent-prompt-id","data-testid":"create-agent-prompt-id",value:D,onChange:e=>C(e.target.value),disabled:z,placeholder:"e.g. system, plan.system"}),(0,t.jsx)(d.Label,{htmlFor:"create-agent-prompt-body",children:"Prompt body"}),(0,t.jsx)(c.Textarea,{id:"create-agent-prompt-body","data-testid":"create-agent-prompt-body",value:k,onChange:e=>S(e.target.value),rows:5,className:"font-mono text-xs",disabled:z,placeholder:"System prompt the agent will run with…"})]}),T?(0,t.jsx)(i.Alert,{variant:"destructive","data-testid":"create-agent-error",children:(0,t.jsx)(i.AlertDescription,{children:T})}):null,(0,t.jsx)(n.DialogFooter,{children:(0,t.jsx)(l.Button,{type:"submit",disabled:!P,"data-testid":"create-agent-submit",children:z?"Creating…":"Create agent"})})]})]})]})}e.s(["CreateAgentDialog",()=>p],687639)}]);