@shipit-ai/cli 1.172.0-pr16.b31ecd3 → 1.172.0

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 (346) hide show
  1. package/apis/json-schema/FeatureFlags.yaml +0 -5
  2. package/dist/packages/core/src/application/ports/output/services/index.d.ts +0 -1
  3. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  4. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  5. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +0 -1
  6. package/dist/packages/core/src/domain/generated/output.d.ts +0 -4
  7. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  8. package/dist/packages/core/src/infrastructure/di/modules/services.module.d.ts.map +1 -1
  9. package/dist/packages/core/src/infrastructure/di/modules/services.module.js +0 -3
  10. package/dist/packages/core/src/infrastructure/di/modules/use-cases.module.d.ts.map +1 -1
  11. package/dist/packages/core/src/infrastructure/di/modules/use-cases.module.js +0 -6
  12. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +0 -1
  13. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  14. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +0 -2
  15. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.d.ts.map +1 -1
  16. package/dist/packages/core/src/infrastructure/repositories/sqlite-settings.repository.js +2 -3
  17. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.d.ts.map +1 -1
  18. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.js +0 -1
  19. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
  20. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +0 -7
  21. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
  22. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +0 -2
  23. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
  24. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +0 -1
  25. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
  26. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +2 -2
  27. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
  28. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +0 -1
  29. package/dist/src/presentation/web/hooks/feature-flags-context.d.ts.map +1 -1
  30. package/dist/src/presentation/web/hooks/feature-flags-context.js +0 -1
  31. package/dist/src/presentation/web/lib/feature-flags.d.ts +0 -2
  32. package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
  33. package/dist/src/presentation/web/lib/feature-flags.js +0 -6
  34. package/dist/translations/ar/web.json +12 -49
  35. package/dist/translations/de/web.json +18 -69
  36. package/dist/translations/en/web.json +13 -50
  37. package/dist/translations/es/web.json +13 -50
  38. package/dist/translations/fr/web.json +13 -50
  39. package/dist/translations/he/web.json +13 -50
  40. package/dist/translations/pt/web.json +13 -50
  41. package/dist/translations/ru/web.json +13 -50
  42. package/dist/tsconfig.build.tsbuildinfo +1 -1
  43. package/package.json +2 -2
  44. package/web/.next/BUILD_ID +1 -1
  45. package/web/.next/app-path-routes-manifest.json +0 -1
  46. package/web/.next/build-manifest.json +3 -3
  47. package/web/.next/fallback-build-manifest.json +3 -3
  48. package/web/.next/prerender-manifest.json +3 -3
  49. package/web/.next/required-server-files.js +3 -3
  50. package/web/.next/required-server-files.json +3 -3
  51. package/web/.next/routes-manifest.json +0 -6
  52. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  53. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -1
  54. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  55. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  56. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  57. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +1 -1
  58. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  59. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  60. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +31 -31
  61. package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
  62. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  65. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +1 -1
  66. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  67. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  68. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
  69. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +1 -1
  70. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  71. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  72. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  73. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +1 -1
  74. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  75. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  77. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
  78. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  79. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  81. package/web/.next/server/app/(dashboard)/chat/page.js +1 -1
  82. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  83. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  84. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +31 -31
  85. package/web/.next/server/app/(dashboard)/create/page.js +1 -1
  86. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  87. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  88. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  89. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +1 -1
  90. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  91. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  92. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
  93. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +1 -1
  94. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  95. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  96. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  97. package/web/.next/server/app/(dashboard)/page.js +1 -1
  98. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  99. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  100. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  101. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +1 -1
  102. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  103. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  104. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  105. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
  106. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  107. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  108. package/web/.next/server/app/_global-error.html +1 -1
  109. package/web/.next/server/app/_global-error.rsc +1 -1
  110. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  111. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  112. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  113. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  114. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  115. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  116. package/web/.next/server/app/_not-found/page.js +1 -1
  117. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  118. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  119. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  120. package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
  121. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  122. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  123. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  124. package/web/.next/server/app/plugins/page/server-reference-manifest.json +15 -15
  125. package/web/.next/server/app/plugins/page.js +1 -1
  126. package/web/.next/server/app/plugins/page.js.nft.json +1 -1
  127. package/web/.next/server/app/plugins/page_client-reference-manifest.js +1 -1
  128. package/web/.next/server/app/settings/page/server-reference-manifest.json +12 -12
  129. package/web/.next/server/app/settings/page.js +1 -1
  130. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  131. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  132. package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
  133. package/web/.next/server/app/skills/page.js +1 -1
  134. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  135. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  136. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  137. package/web/.next/server/app/tools/page.js +1 -1
  138. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  139. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  140. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  141. package/web/.next/server/app/version/page.js +1 -1
  142. package/web/.next/server/app/version/page.js.nft.json +1 -1
  143. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  144. package/web/.next/server/app-paths-manifest.json +0 -1
  145. package/web/.next/server/chunks/11es_next_dist_esm_build_templates_app-route_067cwst.js.map +1 -1
  146. package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
  147. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
  148. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
  149. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +2 -2
  150. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
  151. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
  152. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/11es_next_dist_esm_build_templates_app-page_0un-3~2.js +1 -1
  154. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
  155. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
  156. package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js +1 -1
  157. package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js +1 -1
  159. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js.map +1 -1
  160. package/web/.next/server/chunks/ssr/[root-of-the-server]__0dec29w._.js +3 -0
  161. package/web/.next/server/chunks/ssr/[root-of-the-server]__0dec29w._.js.map +1 -0
  162. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js +1 -1
  163. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js +1 -1
  165. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
  167. package/web/.next/server/chunks/ssr/[root-of-the-server]__0tq2syh._.js +1 -1
  168. package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js +1 -1
  169. package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js.map +1 -1
  170. package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js +1 -1
  171. package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/[root-of-the-server]__11-~i9u._.js +1 -1
  173. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js +1 -1
  174. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js.map +1 -1
  175. package/web/.next/server/chunks/ssr/_01sesw0._.js +1 -1
  176. package/web/.next/server/chunks/ssr/_01sesw0._.js.map +1 -1
  177. package/web/.next/server/chunks/ssr/{_12y_u2z._.js → _05fk0a4._.js} +2 -2
  178. package/web/.next/server/chunks/ssr/_05fk0a4._.js.map +1 -0
  179. package/web/.next/server/chunks/ssr/_069y.js._.js +2 -2
  180. package/web/.next/server/chunks/ssr/_069y.js._.js.map +1 -1
  181. package/web/.next/server/chunks/ssr/{_1031n_-._.js → _083k45~._.js} +2 -2
  182. package/web/.next/server/chunks/ssr/{_1031n_-._.js.map → _083k45~._.js.map} +1 -1
  183. package/web/.next/server/chunks/ssr/_0__4si~._.js +1 -1
  184. package/web/.next/server/chunks/ssr/_0__4si~._.js.map +1 -1
  185. package/web/.next/server/chunks/ssr/_0_m17kl._.js +1 -1
  186. package/web/.next/server/chunks/ssr/_0_m17kl._.js.map +1 -1
  187. package/web/.next/server/chunks/ssr/_0d4miu.._.js +1 -1
  188. package/web/.next/server/chunks/ssr/_0d4miu.._.js.map +1 -1
  189. package/web/.next/server/chunks/ssr/_0e8ern9._.js +1 -1
  190. package/web/.next/server/chunks/ssr/_0e8ern9._.js.map +1 -1
  191. package/web/.next/server/chunks/ssr/{_0ig8swf._.js → _0ik5uly._.js} +2 -2
  192. package/web/.next/server/chunks/ssr/{_0ig8swf._.js.map → _0ik5uly._.js.map} +1 -1
  193. package/web/.next/server/chunks/ssr/_0i~-084._.js +3 -0
  194. package/web/.next/server/chunks/ssr/_0i~-084._.js.map +1 -0
  195. package/web/.next/server/chunks/ssr/_0o.xc6x._.js +1 -1
  196. package/web/.next/server/chunks/ssr/_0p3~u8u._.js +2 -2
  197. package/web/.next/server/chunks/ssr/_0p3~u8u._.js.map +1 -1
  198. package/web/.next/server/chunks/ssr/_0pqw.55._.js +3 -0
  199. package/web/.next/server/chunks/ssr/{_04z1jg3._.js.map → _0pqw.55._.js.map} +1 -1
  200. package/web/.next/server/chunks/ssr/_0r.3n~3._.js +1 -1
  201. package/web/.next/server/chunks/ssr/_0r.3n~3._.js.map +1 -1
  202. package/web/.next/server/chunks/ssr/_0t59q8r._.js +1 -1
  203. package/web/.next/server/chunks/ssr/_0t59q8r._.js.map +1 -1
  204. package/web/.next/server/chunks/ssr/{_0.rsra~._.js → _0tcccbb._.js} +2 -2
  205. package/web/.next/server/chunks/ssr/_0tcccbb._.js.map +1 -0
  206. package/web/.next/server/chunks/ssr/_0u3d8.n._.js.map +1 -1
  207. package/web/.next/server/chunks/ssr/_0vyfc4b._.js +1 -1
  208. package/web/.next/server/chunks/ssr/_0vyfc4b._.js.map +1 -1
  209. package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
  210. package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
  211. package/web/.next/server/chunks/ssr/_0ygafoy._.js +1 -1
  212. package/web/.next/server/chunks/ssr/_0ygafoy._.js.map +1 -1
  213. package/web/.next/server/chunks/ssr/_0zk-h5w._.js +1 -1
  214. package/web/.next/server/chunks/ssr/_0zk-h5w._.js.map +1 -1
  215. package/web/.next/server/chunks/ssr/_0~7lwu_._.js +1 -1
  216. package/web/.next/server/chunks/ssr/_0~7lwu_._.js.map +1 -1
  217. package/web/.next/server/chunks/ssr/_10joy2y._.js +3 -0
  218. package/web/.next/server/chunks/ssr/{_096x3u~._.js.map → _10joy2y._.js.map} +1 -1
  219. package/web/.next/server/chunks/ssr/_1161g9x._.js +1 -1
  220. package/web/.next/server/chunks/ssr/_1161g9x._.js.map +1 -1
  221. package/web/.next/server/chunks/ssr/{_0-z2xjv._.js → _13o1d1i._.js} +2 -2
  222. package/web/.next/server/chunks/ssr/{_0-z2xjv._.js.map → _13o1d1i._.js.map} +1 -1
  223. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js +1 -1
  224. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js.map +1 -1
  225. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js +1 -1
  226. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js.map +1 -1
  227. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js +1 -1
  228. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js.map +1 -1
  229. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_0pjb_re._.js +1 -1
  230. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
  231. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
  232. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
  233. package/web/.next/server/middleware-build-manifest.js +3 -3
  234. package/web/.next/server/next-font-manifest.js +1 -1
  235. package/web/.next/server/next-font-manifest.json +0 -3
  236. package/web/.next/server/pages/500.html +1 -1
  237. package/web/.next/server/server-reference-manifest.js +1 -1
  238. package/web/.next/server/server-reference-manifest.json +55 -145
  239. package/web/.next/static/chunks/{0sgbbtfp4hspl.js → 012cnd7koqv6d.js} +2 -2
  240. package/web/.next/static/chunks/02e5.-kk~ag_i.js +1 -0
  241. package/web/.next/static/chunks/{0tmm5-1w.tzfa.js → 07e~pkh4ikdtq.js} +1 -1
  242. package/web/.next/static/chunks/0aom-74j.wtkt.js +1 -0
  243. package/web/.next/static/chunks/{14e8.v2aj~k.c.js → 0aworyfo5xz3f.js} +1 -1
  244. package/web/.next/static/chunks/{0pm3xcdn669n~.js → 0b2pi58fg3lt3.js} +1 -1
  245. package/web/.next/static/chunks/{0v1l16yu5yi0-.js → 0ddwj6.~yj.u5.js} +1 -1
  246. package/web/.next/static/chunks/0lc0x8kcu46ae.js +1 -0
  247. package/web/.next/static/chunks/{0~~gsf7.gbljc.js → 0m0hb2m1lgy.r.js} +1 -1
  248. package/web/.next/static/chunks/{15lkkh2eg.w0h.js → 0o4m0k3642219.js} +1 -1
  249. package/web/.next/static/chunks/{0~64izks_7xas.js → 0prk~fhfyg~yg.js} +1 -1
  250. package/web/.next/static/chunks/{0hxu8.xyx0z4-.js → 0q.xmdro9u05g.js} +1 -1
  251. package/web/.next/static/chunks/{0m0h4rzeoumvg.js → 0rd5nu5ru3gje.js} +1 -1
  252. package/web/.next/static/chunks/{0f4oy2xirxwmj.js → 0rm13o3bvc9o..js} +1 -1
  253. package/web/.next/static/chunks/0ug478hm-8bog.js +5 -0
  254. package/web/.next/static/chunks/0uz.~ob1qtjhj.js +1 -0
  255. package/web/.next/static/chunks/0v7r7y~3e~oo6.css +1 -0
  256. package/web/.next/static/chunks/0vb84wrbin-ef.js +1 -0
  257. package/web/.next/static/chunks/{0g-.voyjeec~b.js → 100y4~jpwu8~t.js} +3 -3
  258. package/web/.next/static/chunks/{10j-adknfho63.js → 10rtagfoabp3b.js} +1 -1
  259. package/web/.next/static/chunks/{0bqd0fy0w5e4k.js → 16678zkd7o7-z.js} +1 -1
  260. package/dist/packages/core/src/application/ports/output/services/mcp-server-browser.interface.d.ts +0 -38
  261. package/dist/packages/core/src/application/ports/output/services/mcp-server-browser.interface.d.ts.map +0 -1
  262. package/dist/packages/core/src/application/ports/output/services/mcp-server-browser.interface.js +0 -12
  263. package/dist/packages/core/src/application/use-cases/mcp-servers/fetch-mcp-server-tools.use-case.d.ts +0 -23
  264. package/dist/packages/core/src/application/use-cases/mcp-servers/fetch-mcp-server-tools.use-case.d.ts.map +0 -1
  265. package/dist/packages/core/src/application/use-cases/mcp-servers/fetch-mcp-server-tools.use-case.js +0 -49
  266. package/dist/packages/core/src/application/use-cases/mcp-servers/fetch-mcp-servers.use-case.d.ts +0 -23
  267. package/dist/packages/core/src/application/use-cases/mcp-servers/fetch-mcp-servers.use-case.d.ts.map +0 -1
  268. package/dist/packages/core/src/application/use-cases/mcp-servers/fetch-mcp-servers.use-case.js +0 -49
  269. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/057-add-mcp-servers-flag.d.ts +0 -11
  270. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/057-add-mcp-servers-flag.d.ts.map +0 -1
  271. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/057-add-mcp-servers-flag.js +0 -16
  272. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/index.d.ts +0 -2
  273. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/index.d.ts.map +0 -1
  274. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/index.js +0 -1
  275. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.schema.d.ts +0 -65
  276. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.schema.d.ts.map +0 -1
  277. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.schema.js +0 -53
  278. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.service.d.ts +0 -17
  279. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.service.d.ts.map +0 -1
  280. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.service.js +0 -97
  281. package/dist/src/presentation/web/app/actions/fetch-mcp-server-tools.d.ts +0 -5
  282. package/dist/src/presentation/web/app/actions/fetch-mcp-server-tools.d.ts.map +0 -1
  283. package/dist/src/presentation/web/app/actions/fetch-mcp-server-tools.js +0 -11
  284. package/dist/src/presentation/web/app/actions/fetch-mcp-servers.d.ts +0 -5
  285. package/dist/src/presentation/web/app/actions/fetch-mcp-servers.d.ts.map +0 -1
  286. package/dist/src/presentation/web/app/actions/fetch-mcp-servers.js +0 -11
  287. package/dist/src/presentation/web/app/mcp-servers/page.d.ts +0 -2
  288. package/dist/src/presentation/web/app/mcp-servers/page.d.ts.map +0 -1
  289. package/dist/src/presentation/web/app/mcp-servers/page.js +0 -20
  290. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-card.d.ts +0 -8
  291. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-card.d.ts.map +0 -1
  292. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-card.js +0 -22
  293. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-card.stories.d.ts +0 -15
  294. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-card.stories.d.ts.map +0 -1
  295. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-card.stories.js +0 -56
  296. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.d.ts +0 -10
  297. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.d.ts.map +0 -1
  298. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.js +0 -41
  299. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.stories.d.ts +0 -16
  300. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.stories.d.ts.map +0 -1
  301. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.stories.js +0 -42
  302. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.d.ts +0 -6
  303. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.d.ts.map +0 -1
  304. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.js +0 -50
  305. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.stories.d.ts +0 -11
  306. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.stories.d.ts.map +0 -1
  307. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.stories.js +0 -12
  308. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.d.ts +0 -23
  309. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.d.ts.map +0 -1
  310. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.js +0 -48
  311. package/web/.next/server/app/mcp-servers/page/app-paths-manifest.json +0 -3
  312. package/web/.next/server/app/mcp-servers/page/build-manifest.json +0 -18
  313. package/web/.next/server/app/mcp-servers/page/next-font-manifest.json +0 -10
  314. package/web/.next/server/app/mcp-servers/page/react-loadable-manifest.json +0 -8
  315. package/web/.next/server/app/mcp-servers/page/server-reference-manifest.json +0 -161
  316. package/web/.next/server/app/mcp-servers/page.js +0 -17
  317. package/web/.next/server/app/mcp-servers/page.js.map +0 -5
  318. package/web/.next/server/app/mcp-servers/page.js.nft.json +0 -1
  319. package/web/.next/server/app/mcp-servers/page_client-reference-manifest.js +0 -3
  320. package/web/.next/server/chunks/ssr/11es_next_dist_esm_build_templates_app-page_0-p.z5-.js +0 -4
  321. package/web/.next/server/chunks/ssr/11es_next_dist_esm_build_templates_app-page_0-p.z5-.js.map +0 -1
  322. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b~nfa6._.js +0 -3
  323. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b~nfa6._.js.map +0 -1
  324. package/web/.next/server/chunks/ssr/[root-of-the-server]__13pshs0._.js +0 -3
  325. package/web/.next/server/chunks/ssr/[root-of-the-server]__13pshs0._.js.map +0 -1
  326. package/web/.next/server/chunks/ssr/_0.rsra~._.js.map +0 -1
  327. package/web/.next/server/chunks/ssr/_04z1jg3._.js +0 -3
  328. package/web/.next/server/chunks/ssr/_096x3u~._.js +0 -3
  329. package/web/.next/server/chunks/ssr/_0ia4o6_._.js +0 -3
  330. package/web/.next/server/chunks/ssr/_0ia4o6_._.js.map +0 -1
  331. package/web/.next/server/chunks/ssr/_0vqmej8._.js +0 -3
  332. package/web/.next/server/chunks/ssr/_0vqmej8._.js.map +0 -1
  333. package/web/.next/server/chunks/ssr/_12y_u2z._.js.map +0 -1
  334. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_mcp-servers_page_actions_0d.r4q..js +0 -3
  335. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_mcp-servers_page_actions_0d.r4q..js.map +0 -1
  336. package/web/.next/static/chunks/00h433i5-1v_-.css +0 -1
  337. package/web/.next/static/chunks/02ce237xcav6s.js +0 -1
  338. package/web/.next/static/chunks/04~wdwkqgr57x.js +0 -1
  339. package/web/.next/static/chunks/0b1d~7i5gfw1-.js +0 -1
  340. package/web/.next/static/chunks/0qjlmwu-skciu.js +0 -1
  341. package/web/.next/static/chunks/13nrt40z9yg93.js +0 -1
  342. package/web/.next/static/chunks/14qne_94ozzr5.js +0 -1
  343. package/web/.next/static/chunks/15izkiwfc5ym~.js +0 -5
  344. /package/web/.next/static/{-6CqN67a8qSHOn097fc6D → hWgOeXuQ6p-VoJvFXhk5g}/_buildManifest.js +0 -0
  345. /package/web/.next/static/{-6CqN67a8qSHOn097fc6D → hWgOeXuQ6p-VoJvFXhk5g}/_clientMiddlewareManifest.js +0 -0
  346. /package/web/.next/static/{-6CqN67a8qSHOn097fc6D → hWgOeXuQ6p-VoJvFXhk5g}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47373,27069,e=>{"use strict";var t=e.i(96871),r=e.i(16539),n=e.i(70309);function o(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",0,o],27069);var l=e.i(91967),a=e.i(87099),i=e.i(22353),s=e.i(9413),c=e.i(75649),d=e.i(3659),u=e.i(87656),p=e.i(62854),f=e.i(11207),m=e.i(73071),h=e.i(76903),v=e.i(85565),g=e.i(60310),x=e.i(88248),y=e.i(36567),w=e.i(18731),S=e.i(9641),b=e.i(87312),C=e.i(73772),j=e.i(69759),P=[" ","Enter","ArrowUp","ArrowDown"],R=[" ","Enter"],E="Select",[N,k,I]=(0,a.createCollection)(E),[T,D]=(0,s.createContextScope)(E,[I,m.createPopperScope]),L=(0,m.createPopperScope)(),[M,H]=T(E),[_,A]=T(E),B=e=>{let{__scopeSelect:n,children:o,open:l,defaultOpen:a,onOpenChange:i,value:s,defaultValue:d,onValueChange:u,dir:p,name:h,autoComplete:v,disabled:g,required:x,form:w}=e,S=L(n),[b,C]=r.useState(null),[j,P]=r.useState(null),[R,k]=r.useState(!1),I=(0,c.useDirection)(p),[T,D]=(0,y.useControllableState)({prop:l,defaultProp:a??!1,onChange:i,caller:E}),[H,A]=(0,y.useControllableState)({prop:s,defaultProp:d,onChange:u,caller:E}),B=r.useRef(null),F=!b||w||!!b.closest("form"),[O,V]=r.useState(new Set),U=Array.from(O).map(e=>e.props.value).join(";");return(0,t.jsx)(m.Root,{...S,children:(0,t.jsxs)(M,{required:x,scope:n,trigger:b,onTriggerChange:C,valueNode:j,onValueNodeChange:P,valueNodeHasChildren:R,onValueNodeHasChildrenChange:k,contentId:(0,f.useId)(),value:H,onValueChange:A,open:T,onOpenChange:D,dir:I,triggerPointerDownPosRef:B,disabled:g,children:[(0,t.jsx)(N.Provider,{scope:n,children:(0,t.jsx)(_,{scope:e.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{V(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{V(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:o})}),F?(0,t.jsxs)(eP,{"aria-hidden":!0,required:x,tabIndex:-1,name:h,autoComplete:v,value:H,onChange:e=>A(e.target.value),disabled:g,form:w,children:[void 0===H?(0,t.jsx)("option",{value:""}):null,Array.from(O)]},U):null]})})};B.displayName=E;var F="SelectTrigger",O=r.forwardRef((e,n)=>{let{__scopeSelect:o,disabled:a=!1,...s}=e,c=L(o),d=H(F,o),u=d.disabled||a,p=(0,i.useComposedRefs)(n,d.onTriggerChange),f=k(o),h=r.useRef("touch"),[g,x,y]=eE(e=>{let t=f().filter(e=>!e.disabled),r=t.find(e=>e.value===d.value),n=eN(t,e,r);void 0!==n&&d.onValueChange(n.value)}),w=e=>{u||(d.onOpenChange(!0),y()),e&&(d.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(m.Anchor,{asChild:!0,...c,children:(0,t.jsx)(v.Primitive.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":eR(d.value)?"":void 0,...s,ref:p,onClick:(0,l.composeEventHandlers)(s.onClick,e=>{e.currentTarget.focus(),"mouse"!==h.current&&w(e)}),onPointerDown:(0,l.composeEventHandlers)(s.onPointerDown,e=>{h.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(w(e),e.preventDefault())}),onKeyDown:(0,l.composeEventHandlers)(s.onKeyDown,e=>{let t=""!==g.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||x(e.key),(!t||" "!==e.key)&&P.includes(e.key)&&(w(),e.preventDefault())})})})});O.displayName=F;var V="SelectValue",U=r.forwardRef((e,r)=>{let{__scopeSelect:n,className:o,style:l,children:a,placeholder:s="",...c}=e,d=H(V,n),{onValueNodeHasChildrenChange:u}=d,p=void 0!==a,f=(0,i.useComposedRefs)(r,d.onValueNodeChange);return(0,w.useLayoutEffect)(()=>{u(p)},[u,p]),(0,t.jsx)(v.Primitive.span,{...c,ref:f,style:{pointerEvents:"none"},children:eR(d.value)?(0,t.jsx)(t.Fragment,{children:s}):a})});U.displayName=V;var K=r.forwardRef((e,r)=>{let{__scopeSelect:n,children:o,...l}=e;return(0,t.jsx)(v.Primitive.span,{"aria-hidden":!0,...l,ref:r,children:o||"▼"})});K.displayName="SelectIcon";var z=e=>(0,t.jsx)(h.Portal,{asChild:!0,...e});z.displayName="SelectPortal";var W="SelectContent",G=r.forwardRef((e,o)=>{let l=H(W,e.__scopeSelect),[a,i]=r.useState();return((0,w.useLayoutEffect)(()=>{i(new DocumentFragment)},[]),l.open)?(0,t.jsx)(X,{...e,ref:o}):a?n.createPortal((0,t.jsx)($,{scope:e.__scopeSelect,children:(0,t.jsx)(N.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),a):null});G.displayName=W;var[$,q]=T(W),Y=(0,g.createSlot)("SelectContent.RemoveScroll"),X=r.forwardRef((e,n)=>{let{__scopeSelect:o,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:c,onPointerDownOutside:f,side:m,sideOffset:h,align:v,alignOffset:g,arrowPadding:x,collisionBoundary:y,collisionPadding:w,sticky:S,hideWhenDetached:b,avoidCollisions:P,...R}=e,E=H(W,o),[N,I]=r.useState(null),[T,D]=r.useState(null),L=(0,i.useComposedRefs)(n,e=>I(e)),[M,_]=r.useState(null),[A,B]=r.useState(null),F=k(o),[O,V]=r.useState(!1),U=r.useRef(!1);r.useEffect(()=>{if(N)return(0,C.hideOthers)(N)},[N]),(0,u.useFocusGuards)();let K=r.useCallback(e=>{let[t,...r]=F().map(e=>e.ref.current),[n]=r.slice(-1),o=document.activeElement;for(let r of e)if(r===o||(r?.scrollIntoView({block:"nearest"}),r===t&&T&&(T.scrollTop=0),r===n&&T&&(T.scrollTop=T.scrollHeight),r?.focus(),document.activeElement!==o))return},[F,T]),z=r.useCallback(()=>K([M,N]),[K,M,N]);r.useEffect(()=>{O&&z()},[O,z]);let{onOpenChange:G,triggerPointerDownPosRef:q}=E;r.useEffect(()=>{if(N){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(q.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(q.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():N.contains(r.target)||G(!1),document.removeEventListener("pointermove",t),q.current=null};return null!==q.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[N,G,q]),r.useEffect(()=>{let e=()=>G(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[G]);let[X,J]=eE(e=>{let t=F().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=eN(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),ee=r.useCallback((e,t,r)=>{let n=!U.current&&!r;(void 0!==E.value&&E.value===t||n)&&(_(e),n&&(U.current=!0))},[E.value]),et=r.useCallback(()=>N?.focus(),[N]),er=r.useCallback((e,t,r)=>{let n=!U.current&&!r;(void 0!==E.value&&E.value===t||n)&&B(e)},[E.value]),en="popper"===a?Z:Q,eo=en===Z?{side:m,sideOffset:h,align:v,alignOffset:g,arrowPadding:x,collisionBoundary:y,collisionPadding:w,sticky:S,hideWhenDetached:b,avoidCollisions:P}:{};return(0,t.jsx)($,{scope:o,content:N,viewport:T,onViewportChange:D,itemRefCallback:ee,selectedItem:M,onItemLeave:et,itemTextRefCallback:er,focusSelectedItem:z,selectedItemText:A,position:a,isPositioned:O,searchRef:X,children:(0,t.jsx)(j.RemoveScroll,{as:Y,allowPinchZoom:!0,children:(0,t.jsx)(p.FocusScope,{asChild:!0,trapped:E.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,l.composeEventHandlers)(s,e=>{E.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(d.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:(0,t.jsx)(en,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:e=>e.preventDefault(),...R,...eo,onPlaced:()=>V(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:(0,l.composeEventHandlers)(R.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||J(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>K(t)),e.preventDefault()}})})})})})})});X.displayName="SelectContentImpl";var Q=r.forwardRef((e,n)=>{let{__scopeSelect:l,onPlaced:a,...s}=e,c=H(W,l),d=q(W,l),[u,p]=r.useState(null),[f,m]=r.useState(null),h=(0,i.useComposedRefs)(n,e=>m(e)),g=k(l),x=r.useRef(!1),y=r.useRef(!0),{viewport:S,selectedItem:b,selectedItemText:C,focusSelectedItem:j}=d,P=r.useCallback(()=>{if(c.trigger&&c.valueNode&&u&&f&&S&&b&&C){let e=c.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),r=c.valueNode.getBoundingClientRect(),n=C.getBoundingClientRect();if("rtl"!==c.dir){let l=n.left-t.left,a=r.left-l,i=e.left-a,s=e.width+i,c=Math.max(s,t.width),d=o(a,[10,Math.max(10,window.innerWidth-10-c)]);u.style.minWidth=s+"px",u.style.left=d+"px"}else{let l=t.right-n.right,a=window.innerWidth-r.right-l,i=window.innerWidth-e.right-a,s=e.width+i,c=Math.max(s,t.width),d=o(a,[10,Math.max(10,window.innerWidth-10-c)]);u.style.minWidth=s+"px",u.style.right=d+"px"}let l=g(),i=window.innerHeight-20,s=S.scrollHeight,d=window.getComputedStyle(f),p=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),h=parseInt(d.borderBottomWidth,10),v=p+m+s+parseInt(d.paddingBottom,10)+h,y=Math.min(5*b.offsetHeight,v),w=window.getComputedStyle(S),j=parseInt(w.paddingTop,10),P=parseInt(w.paddingBottom,10),R=e.top+e.height/2-10,E=b.offsetHeight/2,N=p+m+(b.offsetTop+E);if(N<=R){let e=l.length>0&&b===l[l.length-1].ref.current;u.style.bottom="0px";let t=Math.max(i-R,E+(e?P:0)+(f.clientHeight-S.offsetTop-S.offsetHeight)+h);u.style.height=N+t+"px"}else{let e=l.length>0&&b===l[0].ref.current;u.style.top="0px";let t=Math.max(R,p+S.offsetTop+(e?j:0)+E);u.style.height=t+(v-N)+"px",S.scrollTop=N-R+S.offsetTop}u.style.margin="10px 0",u.style.minHeight=y+"px",u.style.maxHeight=i+"px",a?.(),requestAnimationFrame(()=>x.current=!0)}},[g,c.trigger,c.valueNode,u,f,S,b,C,c.dir,a]);(0,w.useLayoutEffect)(()=>P(),[P]);let[R,E]=r.useState();(0,w.useLayoutEffect)(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);let N=r.useCallback(e=>{e&&!0===y.current&&(P(),j?.(),y.current=!1)},[P,j]);return(0,t.jsx)(J,{scope:l,contentWrapper:u,shouldExpandOnScrollRef:x,onScrollButtonChange:N,children:(0,t.jsx)("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:(0,t.jsx)(v.Primitive.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Q.displayName="SelectItemAlignedPosition";var Z=r.forwardRef((e,r)=>{let{__scopeSelect:n,align:o="start",collisionPadding:l=10,...a}=e,i=L(n);return(0,t.jsx)(m.Content,{...i,...a,ref:r,align:o,collisionPadding:l,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Z.displayName="SelectPopperPosition";var[J,ee]=T(W,{}),et="SelectViewport",er=r.forwardRef((e,n)=>{let{__scopeSelect:o,nonce:a,...s}=e,c=q(et,o),d=ee(et,o),u=(0,i.useComposedRefs)(n,c.onViewportChange),p=r.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),(0,t.jsx)(N.Slot,{scope:o,children:(0,t.jsx)(v.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:(0,l.composeEventHandlers)(s.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=d;if(n?.current&&r){let e=Math.abs(p.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,o=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(o<n){let l=o+e,a=Math.min(n,l),i=l-a;r.style.height=a+"px","0px"===r.style.bottom&&(t.scrollTop=i>0?i:0,r.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});er.displayName=et;var en="SelectGroup",[eo,el]=T(en),ea=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=(0,f.useId)();return(0,t.jsx)(eo,{scope:n,id:l,children:(0,t.jsx)(v.Primitive.div,{role:"group","aria-labelledby":l,...o,ref:r})})});ea.displayName=en;var ei="SelectLabel",es=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=el(ei,n);return(0,t.jsx)(v.Primitive.div,{id:l.id,...o,ref:r})});es.displayName=ei;var ec="SelectItem",[ed,eu]=T(ec),ep=r.forwardRef((e,n)=>{let{__scopeSelect:o,value:a,disabled:s=!1,textValue:c,...d}=e,u=H(ec,o),p=q(ec,o),m=u.value===a,[h,g]=r.useState(c??""),[x,y]=r.useState(!1),w=(0,i.useComposedRefs)(n,e=>p.itemRefCallback?.(e,a,s)),S=(0,f.useId)(),b=r.useRef("touch"),C=()=>{s||(u.onValueChange(a),u.onOpenChange(!1))};if(""===a)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(ed,{scope:o,value:a,disabled:s,textId:S,isSelected:m,onItemTextChange:r.useCallback(e=>{g(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(N.ItemSlot,{scope:o,value:a,disabled:s,textValue:h,children:(0,t.jsx)(v.Primitive.div,{role:"option","aria-labelledby":S,"data-highlighted":x?"":void 0,"aria-selected":m&&x,"data-state":m?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...d,ref:w,onFocus:(0,l.composeEventHandlers)(d.onFocus,()=>y(!0)),onBlur:(0,l.composeEventHandlers)(d.onBlur,()=>y(!1)),onClick:(0,l.composeEventHandlers)(d.onClick,()=>{"mouse"!==b.current&&C()}),onPointerUp:(0,l.composeEventHandlers)(d.onPointerUp,()=>{"mouse"===b.current&&C()}),onPointerDown:(0,l.composeEventHandlers)(d.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:(0,l.composeEventHandlers)(d.onPointerMove,e=>{b.current=e.pointerType,s?p.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,l.composeEventHandlers)(d.onPointerLeave,e=>{e.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:(0,l.composeEventHandlers)(d.onKeyDown,e=>{(p.searchRef?.current===""||" "!==e.key)&&(R.includes(e.key)&&C()," "===e.key&&e.preventDefault())})})})})});ep.displayName=ec;var ef="SelectItemText",em=r.forwardRef((e,o)=>{let{__scopeSelect:l,className:a,style:s,...c}=e,d=H(ef,l),u=q(ef,l),p=eu(ef,l),f=A(ef,l),[m,h]=r.useState(null),g=(0,i.useComposedRefs)(o,e=>h(e),p.onItemTextChange,e=>u.itemTextRefCallback?.(e,p.value,p.disabled)),x=m?.textContent,y=r.useMemo(()=>(0,t.jsx)("option",{value:p.value,disabled:p.disabled,children:x},p.value),[p.disabled,p.value,x]),{onNativeOptionAdd:S,onNativeOptionRemove:b}=f;return(0,w.useLayoutEffect)(()=>(S(y),()=>b(y)),[S,b,y]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Primitive.span,{id:p.textId,...c,ref:g}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren?n.createPortal(c.children,d.valueNode):null]})});em.displayName=ef;var eh="SelectItemIndicator",ev=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e;return eu(eh,n).isSelected?(0,t.jsx)(v.Primitive.span,{"aria-hidden":!0,...o,ref:r}):null});ev.displayName=eh;var eg="SelectScrollUpButton",ex=r.forwardRef((e,n)=>{let o=q(eg,e.__scopeSelect),l=ee(eg,e.__scopeSelect),[a,s]=r.useState(!1),c=(0,i.useComposedRefs)(n,l.onScrollButtonChange);return(0,w.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){s(t.scrollTop>0)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?(0,t.jsx)(eS,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});ex.displayName=eg;var ey="SelectScrollDownButton",ew=r.forwardRef((e,n)=>{let o=q(ey,e.__scopeSelect),l=ee(ey,e.__scopeSelect),[a,s]=r.useState(!1),c=(0,i.useComposedRefs)(n,l.onScrollButtonChange);return(0,w.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?(0,t.jsx)(eS,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ew.displayName=ey;var eS=r.forwardRef((e,n)=>{let{__scopeSelect:o,onAutoScroll:a,...i}=e,s=q("SelectScrollButton",o),c=r.useRef(null),d=k(o),u=r.useCallback(()=>{null!==c.current&&(window.clearInterval(c.current),c.current=null)},[]);return r.useEffect(()=>()=>u(),[u]),(0,w.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(v.Primitive.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:(0,l.composeEventHandlers)(i.onPointerDown,()=>{null===c.current&&(c.current=window.setInterval(a,50))}),onPointerMove:(0,l.composeEventHandlers)(i.onPointerMove,()=>{s.onItemLeave?.(),null===c.current&&(c.current=window.setInterval(a,50))}),onPointerLeave:(0,l.composeEventHandlers)(i.onPointerLeave,()=>{u()})})}),eb=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e;return(0,t.jsx)(v.Primitive.div,{"aria-hidden":!0,...o,ref:r})});eb.displayName="SelectSeparator";var eC="SelectArrow",ej=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=L(n),a=H(eC,n),i=q(eC,n);return a.open&&"popper"===i.position?(0,t.jsx)(m.Arrow,{...l,...o,ref:r}):null});ej.displayName=eC;var eP=r.forwardRef(({__scopeSelect:e,value:n,...o},l)=>{let a=r.useRef(null),s=(0,i.useComposedRefs)(l,a),c=(0,S.usePrevious)(n);return r.useEffect(()=>{let e=a.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(c!==n&&t){let r=new Event("change",{bubbles:!0});t.call(e,n),e.dispatchEvent(r)}},[c,n]),(0,t.jsx)(v.Primitive.select,{...o,style:{...b.VISUALLY_HIDDEN_STYLES,...o.style},ref:s,defaultValue:n})});function eR(e){return""===e||void 0===e}function eE(e){let t=(0,x.useCallbackRef)(e),n=r.useRef(""),o=r.useRef(0),l=r.useCallback(e=>{let r=n.current+e;t(r),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(r)},[t]),a=r.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,l,a]}function eN(e,t,r){var n,o;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=(n=e,o=Math.max(a,0),n.map((e,t)=>n[(o+t)%n.length]));1===l.length&&(i=i.filter(e=>e!==r));let s=i.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return s!==r?s:void 0}eP.displayName="SelectBubbleInput",e.s(["Arrow",0,ej,"Content",0,G,"Group",0,ea,"Icon",0,K,"Item",0,ep,"ItemIndicator",0,ev,"ItemText",0,em,"Label",0,es,"Portal",0,z,"Root",0,B,"ScrollDownButton",0,ew,"ScrollUpButton",0,ex,"Select",0,B,"SelectArrow",0,ej,"SelectContent",0,G,"SelectGroup",0,ea,"SelectIcon",0,K,"SelectItem",0,ep,"SelectItemIndicator",0,ev,"SelectItemText",0,em,"SelectLabel",0,es,"SelectPortal",0,z,"SelectScrollDownButton",0,ew,"SelectScrollUpButton",0,ex,"SelectSeparator",0,eb,"SelectTrigger",0,O,"SelectValue",0,U,"SelectViewport",0,er,"Separator",0,eb,"Trigger",0,O,"Value",0,U,"Viewport",0,er,"createSelectScope",0,D],74522);var ek=e.i(74522),ek=ek,eI=e.i(85149),eT=e.i(82479),eD=e.i(75767),eL=e.i(31777);let eM=ek.Root;ek.Group;let eH=ek.Value,e_=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(ek.Trigger,{ref:o,className:(0,eL.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[r,(0,t.jsx)(ek.Icon,{asChild:!0,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));e_.displayName=ek.Trigger.displayName;let eA=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.ScrollUpButton,{ref:n,className:(0,eL.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eD.ChevronUp,{className:"h-4 w-4"})}));eA.displayName=ek.ScrollUpButton.displayName;let eB=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.ScrollDownButton,{ref:n,className:(0,eL.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4"})}));eB.displayName=ek.ScrollDownButton.displayName;let eF=r.forwardRef(({className:e,children:r,position:n="popper",...o},l)=>(0,t.jsx)(ek.Portal,{children:(0,t.jsxs)(ek.Content,{ref:l,className:(0,eL.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:[(0,t.jsx)(eA,{}),(0,t.jsx)(ek.Viewport,{className:(0,eL.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,t.jsx)(eB,{})]})}));eF.displayName=ek.Content.displayName,r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.Label,{ref:n,className:(0,eL.cn)("px-2 py-1.5 text-sm font-semibold",e),...r})).displayName=ek.Label.displayName;let eO=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(ek.Item,{ref:o,className:(0,eL.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 ps-2 pe-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,t.jsx)("span",{className:"absolute end-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(ek.ItemIndicator,{children:(0,t.jsx)(eI.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(ek.ItemText,{children:r})]}));eO.displayName=ek.Item.displayName,r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.Separator,{ref:n,className:(0,eL.cn)("bg-muted -mx-1 my-1 h-px",e),...r})).displayName=ek.Separator.displayName,e.s(["Select",0,eM,"SelectContent",0,eF,"SelectItem",0,eO,"SelectTrigger",0,e_,"SelectValue",0,eH],47373)},44802,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let n=e.r(26728);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},70399,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},77622,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return s}});let n=e.r(96871),o=e.r(70309),l=e.r(5474),a=e.r(70399),i=e.r(58349);function s({moduleIds:e}){if("u">typeof window)return null;let t=l.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,i.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,o.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},38762,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let n=e.r(96871),o=e.r(16539),l=e.r(44802),a=e.r(77622);function i(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},c=function(e){let t={...s,...e},r=(0,o.lazy)(()=>t.loader().then(i)),c=t.loading;function d(e){let i=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,s=!t.ssr||!!t.loading,d=s?o.Suspense:o.Fragment,u=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...s?{fallback:i}:{},children:u})}return d.displayName="LoadableComponent",d}},52199,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(81258)._(e.r(38762));function o(e,t){let r={};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,n.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},13322,61201,e=>{"use strict";var t=e.i(96871),r=e.i(16539),n=e.i(52199),o=e.i(79561),l=e.i(60112),a=e.i(2287),i=e.i(35364);let s=(0,n.default)(()=>e.A(54625).then(e=>e.FileManager),{loadableGenerated:{modules:[19454]},ssr:!1,loading:()=>(0,t.jsx)(c,{})});function c(){return(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(o.LoaderCircle,{className:"text-muted-foreground h-8 w-8 animate-spin"})})}async function d(e){let t=new URLSearchParams;e&&t.set("path",e);let r=await fetch(`/api/directory/list?${t.toString()}`);if(!r.ok)throw Error((await r.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return r.json()}e.s(["ReactFileManagerDialog",0,function({open:e,onOpenChange:n,onSelect:o,initialPath:c}){let[u,p]=(0,r.useState)([]),[f,m]=(0,r.useState)(""),[h,v]=(0,r.useState)(!1),[g,x]=(0,r.useState)(null),y=(0,r.useRef)(!1),w=(0,r.useCallback)(async e=>{v(!0),x(null);try{let t=await d(e);p(t.entries),m(t.currentPath)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";l.toast.error(e)}finally{v(!1)}},[]);(0,r.useEffect)(()=>{e&&!y.current&&(y.current=!0,w(c)),e||(y.current=!1)},[e,c,w]);let S=(0,r.useCallback)(e=>{let t=e.absolutePath;e.isDirectory&&t&&w(t)},[w]),b=(0,r.useCallback)(e=>{1===e.length&&e[0].isDirectory?x(e[0].absolutePath??null):x(null)},[]);function C(){o(null),n(!1)}return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{e||C()},children:(0,t.jsxs)(a.DialogContent,{className:"flex h-[95dvh] max-w-[95vw] flex-col",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:"Select Folder"}),(0,t.jsx)(a.DialogDescription,{className:"truncate font-mono text-xs",children:f||"Loading..."})]}),(0,t.jsx)("div",{className:"shipit-ai-file-manager min-h-0 flex-1 overflow-hidden rounded-md border",children:(0,t.jsx)(s,{files:u.map(e=>({name:e.name,isDirectory:!0,path:`/${e.name}`,absolutePath:e.path,updatedAt:e.updatedAt})),isLoading:h,height:"100%",width:"100%",layout:"list",enableFilePreview:!1,permissions:{upload:!1,delete:!1,create:!1,download:!1,copy:!1,move:!1,rename:!1},onFileOpen:S,onSelectionChange:b,onRefresh:()=>w(f)},f)}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(i.Button,{variant:"outline",onClick:C,children:"Cancel"}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:function(){f&&(o(f),n(!1))},disabled:!f,children:"Select Current Folder"}),(0,t.jsx)(i.Button,{onClick:function(){g&&(o(g),n(!1))},disabled:!g,children:"Select Folder"})]})]})})}],61201),e.s([],13322)},78521,e=>{"use strict";var t=e.i(96976);let r=(0,t.createServerReference)("0057aaa24d87a231f919ec4b1ffe14b55d22719e6f",t.callServer,void 0,t.findSourceMapURL,"pickFolder");async function n(){let e=await r();if(e.error)throw Error(e.error);return e.path}e.s(["pickFolder",0,n],78521)},8791,e=>{"use strict";let t=(0,e.i(54864).default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);e.s(["GitFork",0,t],8791)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47373,27069,e=>{"use strict";var t=e.i(96871),r=e.i(16539),n=e.i(70309);function o(e,[t,r]){return Math.min(r,Math.max(t,e))}e.s(["clamp",0,o],27069);var l=e.i(91967),a=e.i(87099),i=e.i(22353),s=e.i(9413),c=e.i(75649),d=e.i(3659),u=e.i(87656),p=e.i(62854),f=e.i(11207),m=e.i(73071),h=e.i(76903),v=e.i(85565),g=e.i(60310),x=e.i(88248),y=e.i(36567),w=e.i(18731),S=e.i(9641),b=e.i(87312),C=e.i(73772),j=e.i(69759),P=[" ","Enter","ArrowUp","ArrowDown"],R=[" ","Enter"],E="Select",[N,k,I]=(0,a.createCollection)(E),[T,D]=(0,s.createContextScope)(E,[I,m.createPopperScope]),L=(0,m.createPopperScope)(),[M,H]=T(E),[_,A]=T(E),B=e=>{let{__scopeSelect:n,children:o,open:l,defaultOpen:a,onOpenChange:i,value:s,defaultValue:d,onValueChange:u,dir:p,name:h,autoComplete:v,disabled:g,required:x,form:w}=e,S=L(n),[b,C]=r.useState(null),[j,P]=r.useState(null),[R,k]=r.useState(!1),I=(0,c.useDirection)(p),[T,D]=(0,y.useControllableState)({prop:l,defaultProp:a??!1,onChange:i,caller:E}),[H,A]=(0,y.useControllableState)({prop:s,defaultProp:d,onChange:u,caller:E}),B=r.useRef(null),F=!b||w||!!b.closest("form"),[O,V]=r.useState(new Set),U=Array.from(O).map(e=>e.props.value).join(";");return(0,t.jsx)(m.Root,{...S,children:(0,t.jsxs)(M,{required:x,scope:n,trigger:b,onTriggerChange:C,valueNode:j,onValueNodeChange:P,valueNodeHasChildren:R,onValueNodeHasChildrenChange:k,contentId:(0,f.useId)(),value:H,onValueChange:A,open:T,onOpenChange:D,dir:I,triggerPointerDownPosRef:B,disabled:g,children:[(0,t.jsx)(N.Provider,{scope:n,children:(0,t.jsx)(_,{scope:e.__scopeSelect,onNativeOptionAdd:r.useCallback(e=>{V(t=>new Set(t).add(e))},[]),onNativeOptionRemove:r.useCallback(e=>{V(t=>{let r=new Set(t);return r.delete(e),r})},[]),children:o})}),F?(0,t.jsxs)(eP,{"aria-hidden":!0,required:x,tabIndex:-1,name:h,autoComplete:v,value:H,onChange:e=>A(e.target.value),disabled:g,form:w,children:[void 0===H?(0,t.jsx)("option",{value:""}):null,Array.from(O)]},U):null]})})};B.displayName=E;var F="SelectTrigger",O=r.forwardRef((e,n)=>{let{__scopeSelect:o,disabled:a=!1,...s}=e,c=L(o),d=H(F,o),u=d.disabled||a,p=(0,i.useComposedRefs)(n,d.onTriggerChange),f=k(o),h=r.useRef("touch"),[g,x,y]=eE(e=>{let t=f().filter(e=>!e.disabled),r=t.find(e=>e.value===d.value),n=eN(t,e,r);void 0!==n&&d.onValueChange(n.value)}),w=e=>{u||(d.onOpenChange(!0),y()),e&&(d.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,t.jsx)(m.Anchor,{asChild:!0,...c,children:(0,t.jsx)(v.Primitive.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":eR(d.value)?"":void 0,...s,ref:p,onClick:(0,l.composeEventHandlers)(s.onClick,e=>{e.currentTarget.focus(),"mouse"!==h.current&&w(e)}),onPointerDown:(0,l.composeEventHandlers)(s.onPointerDown,e=>{h.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(w(e),e.preventDefault())}),onKeyDown:(0,l.composeEventHandlers)(s.onKeyDown,e=>{let t=""!==g.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||x(e.key),(!t||" "!==e.key)&&P.includes(e.key)&&(w(),e.preventDefault())})})})});O.displayName=F;var V="SelectValue",U=r.forwardRef((e,r)=>{let{__scopeSelect:n,className:o,style:l,children:a,placeholder:s="",...c}=e,d=H(V,n),{onValueNodeHasChildrenChange:u}=d,p=void 0!==a,f=(0,i.useComposedRefs)(r,d.onValueNodeChange);return(0,w.useLayoutEffect)(()=>{u(p)},[u,p]),(0,t.jsx)(v.Primitive.span,{...c,ref:f,style:{pointerEvents:"none"},children:eR(d.value)?(0,t.jsx)(t.Fragment,{children:s}):a})});U.displayName=V;var K=r.forwardRef((e,r)=>{let{__scopeSelect:n,children:o,...l}=e;return(0,t.jsx)(v.Primitive.span,{"aria-hidden":!0,...l,ref:r,children:o||"▼"})});K.displayName="SelectIcon";var z=e=>(0,t.jsx)(h.Portal,{asChild:!0,...e});z.displayName="SelectPortal";var W="SelectContent",G=r.forwardRef((e,o)=>{let l=H(W,e.__scopeSelect),[a,i]=r.useState();return((0,w.useLayoutEffect)(()=>{i(new DocumentFragment)},[]),l.open)?(0,t.jsx)(X,{...e,ref:o}):a?n.createPortal((0,t.jsx)($,{scope:e.__scopeSelect,children:(0,t.jsx)(N.Slot,{scope:e.__scopeSelect,children:(0,t.jsx)("div",{children:e.children})})}),a):null});G.displayName=W;var[$,q]=T(W),Y=(0,g.createSlot)("SelectContent.RemoveScroll"),X=r.forwardRef((e,n)=>{let{__scopeSelect:o,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:c,onPointerDownOutside:f,side:m,sideOffset:h,align:v,alignOffset:g,arrowPadding:x,collisionBoundary:y,collisionPadding:w,sticky:S,hideWhenDetached:b,avoidCollisions:P,...R}=e,E=H(W,o),[N,I]=r.useState(null),[T,D]=r.useState(null),L=(0,i.useComposedRefs)(n,e=>I(e)),[M,_]=r.useState(null),[A,B]=r.useState(null),F=k(o),[O,V]=r.useState(!1),U=r.useRef(!1);r.useEffect(()=>{if(N)return(0,C.hideOthers)(N)},[N]),(0,u.useFocusGuards)();let K=r.useCallback(e=>{let[t,...r]=F().map(e=>e.ref.current),[n]=r.slice(-1),o=document.activeElement;for(let r of e)if(r===o||(r?.scrollIntoView({block:"nearest"}),r===t&&T&&(T.scrollTop=0),r===n&&T&&(T.scrollTop=T.scrollHeight),r?.focus(),document.activeElement!==o))return},[F,T]),z=r.useCallback(()=>K([M,N]),[K,M,N]);r.useEffect(()=>{O&&z()},[O,z]);let{onOpenChange:G,triggerPointerDownPosRef:q}=E;r.useEffect(()=>{if(N){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(q.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(q.current?.y??0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():N.contains(r.target)||G(!1),document.removeEventListener("pointermove",t),q.current=null};return null!==q.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[N,G,q]),r.useEffect(()=>{let e=()=>G(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[G]);let[X,J]=eE(e=>{let t=F().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=eN(t,e,r);n&&setTimeout(()=>n.ref.current.focus())}),ee=r.useCallback((e,t,r)=>{let n=!U.current&&!r;(void 0!==E.value&&E.value===t||n)&&(_(e),n&&(U.current=!0))},[E.value]),et=r.useCallback(()=>N?.focus(),[N]),er=r.useCallback((e,t,r)=>{let n=!U.current&&!r;(void 0!==E.value&&E.value===t||n)&&B(e)},[E.value]),en="popper"===a?Z:Q,eo=en===Z?{side:m,sideOffset:h,align:v,alignOffset:g,arrowPadding:x,collisionBoundary:y,collisionPadding:w,sticky:S,hideWhenDetached:b,avoidCollisions:P}:{};return(0,t.jsx)($,{scope:o,content:N,viewport:T,onViewportChange:D,itemRefCallback:ee,selectedItem:M,onItemLeave:et,itemTextRefCallback:er,focusSelectedItem:z,selectedItemText:A,position:a,isPositioned:O,searchRef:X,children:(0,t.jsx)(j.RemoveScroll,{as:Y,allowPinchZoom:!0,children:(0,t.jsx)(p.FocusScope,{asChild:!0,trapped:E.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,l.composeEventHandlers)(s,e=>{E.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(d.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:f,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:(0,t.jsx)(en,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:e=>e.preventDefault(),...R,...eo,onPlaced:()=>V(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:(0,l.composeEventHandlers)(R.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||J(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>K(t)),e.preventDefault()}})})})})})})});X.displayName="SelectContentImpl";var Q=r.forwardRef((e,n)=>{let{__scopeSelect:l,onPlaced:a,...s}=e,c=H(W,l),d=q(W,l),[u,p]=r.useState(null),[f,m]=r.useState(null),h=(0,i.useComposedRefs)(n,e=>m(e)),g=k(l),x=r.useRef(!1),y=r.useRef(!0),{viewport:S,selectedItem:b,selectedItemText:C,focusSelectedItem:j}=d,P=r.useCallback(()=>{if(c.trigger&&c.valueNode&&u&&f&&S&&b&&C){let e=c.trigger.getBoundingClientRect(),t=f.getBoundingClientRect(),r=c.valueNode.getBoundingClientRect(),n=C.getBoundingClientRect();if("rtl"!==c.dir){let l=n.left-t.left,a=r.left-l,i=e.left-a,s=e.width+i,c=Math.max(s,t.width),d=o(a,[10,Math.max(10,window.innerWidth-10-c)]);u.style.minWidth=s+"px",u.style.left=d+"px"}else{let l=t.right-n.right,a=window.innerWidth-r.right-l,i=window.innerWidth-e.right-a,s=e.width+i,c=Math.max(s,t.width),d=o(a,[10,Math.max(10,window.innerWidth-10-c)]);u.style.minWidth=s+"px",u.style.right=d+"px"}let l=g(),i=window.innerHeight-20,s=S.scrollHeight,d=window.getComputedStyle(f),p=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),h=parseInt(d.borderBottomWidth,10),v=p+m+s+parseInt(d.paddingBottom,10)+h,y=Math.min(5*b.offsetHeight,v),w=window.getComputedStyle(S),j=parseInt(w.paddingTop,10),P=parseInt(w.paddingBottom,10),R=e.top+e.height/2-10,E=b.offsetHeight/2,N=p+m+(b.offsetTop+E);if(N<=R){let e=l.length>0&&b===l[l.length-1].ref.current;u.style.bottom="0px";let t=Math.max(i-R,E+(e?P:0)+(f.clientHeight-S.offsetTop-S.offsetHeight)+h);u.style.height=N+t+"px"}else{let e=l.length>0&&b===l[0].ref.current;u.style.top="0px";let t=Math.max(R,p+S.offsetTop+(e?j:0)+E);u.style.height=t+(v-N)+"px",S.scrollTop=N-R+S.offsetTop}u.style.margin="10px 0",u.style.minHeight=y+"px",u.style.maxHeight=i+"px",a?.(),requestAnimationFrame(()=>x.current=!0)}},[g,c.trigger,c.valueNode,u,f,S,b,C,c.dir,a]);(0,w.useLayoutEffect)(()=>P(),[P]);let[R,E]=r.useState();(0,w.useLayoutEffect)(()=>{f&&E(window.getComputedStyle(f).zIndex)},[f]);let N=r.useCallback(e=>{e&&!0===y.current&&(P(),j?.(),y.current=!1)},[P,j]);return(0,t.jsx)(J,{scope:l,contentWrapper:u,shouldExpandOnScrollRef:x,onScrollButtonChange:N,children:(0,t.jsx)("div",{ref:p,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:(0,t.jsx)(v.Primitive.div,{...s,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Q.displayName="SelectItemAlignedPosition";var Z=r.forwardRef((e,r)=>{let{__scopeSelect:n,align:o="start",collisionPadding:l=10,...a}=e,i=L(n);return(0,t.jsx)(m.Content,{...i,...a,ref:r,align:o,collisionPadding:l,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Z.displayName="SelectPopperPosition";var[J,ee]=T(W,{}),et="SelectViewport",er=r.forwardRef((e,n)=>{let{__scopeSelect:o,nonce:a,...s}=e,c=q(et,o),d=ee(et,o),u=(0,i.useComposedRefs)(n,c.onViewportChange),p=r.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),(0,t.jsx)(N.Slot,{scope:o,children:(0,t.jsx)(v.Primitive.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:(0,l.composeEventHandlers)(s.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=d;if(n?.current&&r){let e=Math.abs(p.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,o=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(o<n){let l=o+e,a=Math.min(n,l),i=l-a;r.style.height=a+"px","0px"===r.style.bottom&&(t.scrollTop=i>0?i:0,r.style.justifyContent="flex-end")}}}p.current=t.scrollTop})})})]})});er.displayName=et;var en="SelectGroup",[eo,el]=T(en),ea=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=(0,f.useId)();return(0,t.jsx)(eo,{scope:n,id:l,children:(0,t.jsx)(v.Primitive.div,{role:"group","aria-labelledby":l,...o,ref:r})})});ea.displayName=en;var ei="SelectLabel",es=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=el(ei,n);return(0,t.jsx)(v.Primitive.div,{id:l.id,...o,ref:r})});es.displayName=ei;var ec="SelectItem",[ed,eu]=T(ec),ep=r.forwardRef((e,n)=>{let{__scopeSelect:o,value:a,disabled:s=!1,textValue:c,...d}=e,u=H(ec,o),p=q(ec,o),m=u.value===a,[h,g]=r.useState(c??""),[x,y]=r.useState(!1),w=(0,i.useComposedRefs)(n,e=>p.itemRefCallback?.(e,a,s)),S=(0,f.useId)(),b=r.useRef("touch"),C=()=>{s||(u.onValueChange(a),u.onOpenChange(!1))};if(""===a)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,t.jsx)(ed,{scope:o,value:a,disabled:s,textId:S,isSelected:m,onItemTextChange:r.useCallback(e=>{g(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(N.ItemSlot,{scope:o,value:a,disabled:s,textValue:h,children:(0,t.jsx)(v.Primitive.div,{role:"option","aria-labelledby":S,"data-highlighted":x?"":void 0,"aria-selected":m&&x,"data-state":m?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...d,ref:w,onFocus:(0,l.composeEventHandlers)(d.onFocus,()=>y(!0)),onBlur:(0,l.composeEventHandlers)(d.onBlur,()=>y(!1)),onClick:(0,l.composeEventHandlers)(d.onClick,()=>{"mouse"!==b.current&&C()}),onPointerUp:(0,l.composeEventHandlers)(d.onPointerUp,()=>{"mouse"===b.current&&C()}),onPointerDown:(0,l.composeEventHandlers)(d.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:(0,l.composeEventHandlers)(d.onPointerMove,e=>{b.current=e.pointerType,s?p.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,l.composeEventHandlers)(d.onPointerLeave,e=>{e.currentTarget===document.activeElement&&p.onItemLeave?.()}),onKeyDown:(0,l.composeEventHandlers)(d.onKeyDown,e=>{(p.searchRef?.current===""||" "!==e.key)&&(R.includes(e.key)&&C()," "===e.key&&e.preventDefault())})})})})});ep.displayName=ec;var ef="SelectItemText",em=r.forwardRef((e,o)=>{let{__scopeSelect:l,className:a,style:s,...c}=e,d=H(ef,l),u=q(ef,l),p=eu(ef,l),f=A(ef,l),[m,h]=r.useState(null),g=(0,i.useComposedRefs)(o,e=>h(e),p.onItemTextChange,e=>u.itemTextRefCallback?.(e,p.value,p.disabled)),x=m?.textContent,y=r.useMemo(()=>(0,t.jsx)("option",{value:p.value,disabled:p.disabled,children:x},p.value),[p.disabled,p.value,x]),{onNativeOptionAdd:S,onNativeOptionRemove:b}=f;return(0,w.useLayoutEffect)(()=>(S(y),()=>b(y)),[S,b,y]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Primitive.span,{id:p.textId,...c,ref:g}),p.isSelected&&d.valueNode&&!d.valueNodeHasChildren?n.createPortal(c.children,d.valueNode):null]})});em.displayName=ef;var eh="SelectItemIndicator",ev=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e;return eu(eh,n).isSelected?(0,t.jsx)(v.Primitive.span,{"aria-hidden":!0,...o,ref:r}):null});ev.displayName=eh;var eg="SelectScrollUpButton",ex=r.forwardRef((e,n)=>{let o=q(eg,e.__scopeSelect),l=ee(eg,e.__scopeSelect),[a,s]=r.useState(!1),c=(0,i.useComposedRefs)(n,l.onScrollButtonChange);return(0,w.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){s(t.scrollTop>0)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?(0,t.jsx)(eS,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});ex.displayName=eg;var ey="SelectScrollDownButton",ew=r.forwardRef((e,n)=>{let o=q(ey,e.__scopeSelect),l=ee(ey,e.__scopeSelect),[a,s]=r.useState(!1),c=(0,i.useComposedRefs)(n,l.onScrollButtonChange);return(0,w.useLayoutEffect)(()=>{if(o.viewport&&o.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)},t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),a?(0,t.jsx)(eS,{...e,ref:c,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});ew.displayName=ey;var eS=r.forwardRef((e,n)=>{let{__scopeSelect:o,onAutoScroll:a,...i}=e,s=q("SelectScrollButton",o),c=r.useRef(null),d=k(o),u=r.useCallback(()=>{null!==c.current&&(window.clearInterval(c.current),c.current=null)},[]);return r.useEffect(()=>()=>u(),[u]),(0,w.useLayoutEffect)(()=>{let e=d().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[d]),(0,t.jsx)(v.Primitive.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:(0,l.composeEventHandlers)(i.onPointerDown,()=>{null===c.current&&(c.current=window.setInterval(a,50))}),onPointerMove:(0,l.composeEventHandlers)(i.onPointerMove,()=>{s.onItemLeave?.(),null===c.current&&(c.current=window.setInterval(a,50))}),onPointerLeave:(0,l.composeEventHandlers)(i.onPointerLeave,()=>{u()})})}),eb=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e;return(0,t.jsx)(v.Primitive.div,{"aria-hidden":!0,...o,ref:r})});eb.displayName="SelectSeparator";var eC="SelectArrow",ej=r.forwardRef((e,r)=>{let{__scopeSelect:n,...o}=e,l=L(n),a=H(eC,n),i=q(eC,n);return a.open&&"popper"===i.position?(0,t.jsx)(m.Arrow,{...l,...o,ref:r}):null});ej.displayName=eC;var eP=r.forwardRef(({__scopeSelect:e,value:n,...o},l)=>{let a=r.useRef(null),s=(0,i.useComposedRefs)(l,a),c=(0,S.usePrevious)(n);return r.useEffect(()=>{let e=a.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(c!==n&&t){let r=new Event("change",{bubbles:!0});t.call(e,n),e.dispatchEvent(r)}},[c,n]),(0,t.jsx)(v.Primitive.select,{...o,style:{...b.VISUALLY_HIDDEN_STYLES,...o.style},ref:s,defaultValue:n})});function eR(e){return""===e||void 0===e}function eE(e){let t=(0,x.useCallbackRef)(e),n=r.useRef(""),o=r.useRef(0),l=r.useCallback(e=>{let r=n.current+e;t(r),function e(t){n.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(r)},[t]),a=r.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,l,a]}function eN(e,t,r){var n,o;let l=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=(n=e,o=Math.max(a,0),n.map((e,t)=>n[(o+t)%n.length]));1===l.length&&(i=i.filter(e=>e!==r));let s=i.find(e=>e.textValue.toLowerCase().startsWith(l.toLowerCase()));return s!==r?s:void 0}eP.displayName="SelectBubbleInput",e.s(["Arrow",0,ej,"Content",0,G,"Group",0,ea,"Icon",0,K,"Item",0,ep,"ItemIndicator",0,ev,"ItemText",0,em,"Label",0,es,"Portal",0,z,"Root",0,B,"ScrollDownButton",0,ew,"ScrollUpButton",0,ex,"Select",0,B,"SelectArrow",0,ej,"SelectContent",0,G,"SelectGroup",0,ea,"SelectIcon",0,K,"SelectItem",0,ep,"SelectItemIndicator",0,ev,"SelectItemText",0,em,"SelectLabel",0,es,"SelectPortal",0,z,"SelectScrollDownButton",0,ew,"SelectScrollUpButton",0,ex,"SelectSeparator",0,eb,"SelectTrigger",0,O,"SelectValue",0,U,"SelectViewport",0,er,"Separator",0,eb,"Trigger",0,O,"Value",0,U,"Viewport",0,er,"createSelectScope",0,D],74522);var ek=e.i(74522),ek=ek,eI=e.i(85149),eT=e.i(82479),eD=e.i(75767),eL=e.i(31777);let eM=ek.Root;ek.Group;let eH=ek.Value,e_=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(ek.Trigger,{ref:o,className:(0,eL.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-sm focus:ring-1 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[r,(0,t.jsx)(ek.Icon,{asChild:!0,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));e_.displayName=ek.Trigger.displayName;let eA=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.ScrollUpButton,{ref:n,className:(0,eL.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eD.ChevronUp,{className:"h-4 w-4"})}));eA.displayName=ek.ScrollUpButton.displayName;let eB=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.ScrollDownButton,{ref:n,className:(0,eL.cn)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eT.ChevronDown,{className:"h-4 w-4"})}));eB.displayName=ek.ScrollDownButton.displayName;let eF=r.forwardRef(({className:e,children:r,position:n="popper",...o},l)=>(0,t.jsx)(ek.Portal,{children:(0,t.jsxs)(ek.Content,{ref:l,className:(0,eL.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:[(0,t.jsx)(eA,{}),(0,t.jsx)(ek.Viewport,{className:(0,eL.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,t.jsx)(eB,{})]})}));eF.displayName=ek.Content.displayName,r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.Label,{ref:n,className:(0,eL.cn)("px-2 py-1.5 text-sm font-semibold",e),...r})).displayName=ek.Label.displayName;let eO=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(ek.Item,{ref:o,className:(0,eL.cn)("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 ps-2 pe-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,t.jsx)("span",{className:"absolute end-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(ek.ItemIndicator,{children:(0,t.jsx)(eI.Check,{className:"h-4 w-4"})})}),(0,t.jsx)(ek.ItemText,{children:r})]}));eO.displayName=ek.Item.displayName,r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ek.Separator,{ref:n,className:(0,eL.cn)("bg-muted -mx-1 my-1 h-px",e),...r})).displayName=ek.Separator.displayName,e.s(["Select",0,eM,"SelectContent",0,eF,"SelectItem",0,eO,"SelectTrigger",0,e_,"SelectValue",0,eH],47373)},44802,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let n=e.r(26728);function o({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},70399,(e,t,r)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"encodeURIPath",{enumerable:!0,get:function(){return n}})},77622,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"PreloadChunks",{enumerable:!0,get:function(){return s}});let n=e.r(96871),o=e.r(70309),l=e.r(5474),a=e.r(70399),i=e.r(58349);function s({moduleIds:e}){if("u">typeof window)return null;let t=l.workAsyncStorage.getStore();if(void 0===t)return null;let r=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;r.push(...e)}}if(0===r.length)return null;let c=(0,i.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:r.map(e=>{let r=`${t.assetPrefix}/_next/${(0,a.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:r,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,o.preload)(r,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},38762,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return c}});let n=e.r(96871),o=e.r(16539),l=e.r(44802),a=e.r(77622);function i(e){return{default:e&&"default"in e?e.default:e}}let s={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},c=function(e){let t={...s,...e},r=(0,o.lazy)(()=>t.loader().then(i)),c=t.loading;function d(e){let i=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,s=!t.ssr||!!t.loading,d=s?o.Suspense:o.Fragment,u=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(a.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(r,{...e})]}):(0,n.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(r,{...e})});return(0,n.jsx)(d,{...s?{fallback:i}:{},children:u})}return d.displayName="LoadableComponent",d}},52199,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(81258)._(e.r(38762));function o(e,t){let r={};"function"==typeof e&&(r.loader=e);let o={...r,...t};return(0,n.default)({...o,modules:o.loadableGenerated?.modules})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},13322,61201,e=>{"use strict";var t=e.i(96871),r=e.i(16539),n=e.i(52199),o=e.i(79561),l=e.i(60112),a=e.i(2287),i=e.i(35364);let s=(0,n.default)(()=>e.A(54625).then(e=>e.FileManager),{loadableGenerated:{modules:[19454]},ssr:!1,loading:()=>(0,t.jsx)(c,{})});function c(){return(0,t.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,t.jsx)(o.LoaderCircle,{className:"text-muted-foreground h-8 w-8 animate-spin"})})}async function d(e){let t=new URLSearchParams;e&&t.set("path",e);let r=await fetch(`/api/directory/list?${t.toString()}`);if(!r.ok)throw Error((await r.json().catch(()=>({error:"Failed to load directory"}))).error??"Failed to load directory");return r.json()}e.s(["ReactFileManagerDialog",0,function({open:e,onOpenChange:n,onSelect:o,initialPath:c}){let[u,p]=(0,r.useState)([]),[f,m]=(0,r.useState)(""),[h,v]=(0,r.useState)(!1),[g,x]=(0,r.useState)(null),y=(0,r.useRef)(!1),w=(0,r.useCallback)(async e=>{v(!0),x(null);try{let t=await d(e);p(t.entries),m(t.currentPath)}catch(t){let e=t instanceof Error?t.message:"Failed to load directory";l.toast.error(e)}finally{v(!1)}},[]);(0,r.useEffect)(()=>{e&&!y.current&&(y.current=!0,w(c)),e||(y.current=!1)},[e,c,w]);let S=(0,r.useCallback)(e=>{let t=e.absolutePath;e.isDirectory&&t&&w(t)},[w]),b=(0,r.useCallback)(e=>{1===e.length&&e[0].isDirectory?x(e[0].absolutePath??null):x(null)},[]);function C(){o(null),n(!1)}return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{e||C()},children:(0,t.jsxs)(a.DialogContent,{className:"flex h-[95dvh] max-w-[95vw] flex-col",onCloseAutoFocus:e=>e.preventDefault(),children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:"Select Folder"}),(0,t.jsx)(a.DialogDescription,{className:"truncate font-mono text-xs",children:f||"Loading..."})]}),(0,t.jsx)("div",{className:"shipit-ai-file-manager min-h-0 flex-1 overflow-hidden rounded-md border",children:(0,t.jsx)(s,{files:u.map(e=>({name:e.name,isDirectory:!0,path:`/${e.name}`,absolutePath:e.path,updatedAt:e.updatedAt})),isLoading:h,height:"100%",width:"100%",layout:"list",enableFilePreview:!1,permissions:{upload:!1,delete:!1,create:!1,download:!1,copy:!1,move:!1,rename:!1},onFileOpen:S,onSelectionChange:b,onRefresh:()=>w(f)},f)}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(i.Button,{variant:"outline",onClick:C,children:"Cancel"}),(0,t.jsx)(i.Button,{variant:"secondary",onClick:function(){f&&(o(f),n(!1))},disabled:!f,children:"Select Current Folder"}),(0,t.jsx)(i.Button,{onClick:function(){g&&(o(g),n(!1))},disabled:!g,children:"Select Folder"})]})]})})}],61201),e.s([],13322)},78521,e=>{"use strict";var t=e.i(96976);let r=(0,t.createServerReference)("009c2ce13787d87731005e2caf24c3b04c1fe25f07",t.callServer,void 0,t.findSourceMapURL,"pickFolder");async function n(){let e=await r();if(e.error)throw Error(e.error);return e.path}e.s(["pickFolder",0,n],78521)},8791,e=>{"use strict";let t=(0,e.i(54864).default)("git-fork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);e.s(["GitFork",0,t],8791)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54793,7729,e=>{"use strict";var t=e.i(96871),r=e.i(31777);e.s(["EmptyState",0,function({icon:e,title:a,description:l,action:c,className:s,...i}){return(0,t.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center gap-4 px-4 py-12 text-center",s),...i,children:[e?(0,t.jsx)("div",{className:"text-muted-foreground",children:e}):null,(0,t.jsx)("h3",{className:"text-lg font-semibold",children:a}),l?(0,t.jsx)("p",{className:"text-muted-foreground max-w-md text-sm",children:l}):null,c?(0,t.jsx)("div",{className:"mt-2",children:c}):null]})}],7729),e.s([],54793)},74442,e=>{"use strict";var t=e.i(16539),r=e.i(87609),a=e.i(95510),l=e.i(9246),c=e.i(96976);let s=(0,c.createServerReference)("409e53aa0db4c4ebb60e7daf780f3c89b06f2b138f",c.callServer,void 0,c.findSourceMapURL,"syncRepository");e.s(["useRepositoryActions",0,function(e){let[c,i]=(0,t.useState)(!1),[u,d]=(0,t.useState)(!1),[n,o]=(0,t.useState)(!1),[p,h]=(0,t.useState)(!1),[f,y]=(0,t.useState)(null),[m,k]=(0,t.useState)(null),[v,x]=(0,t.useState)(null),[S,b]=(0,t.useState)(null),M=(0,t.useRef)(null),R=(0,t.useRef)(null),g=(0,t.useRef)(null),C=(0,t.useRef)(null);(0,t.useEffect)(()=>()=>{M.current&&clearTimeout(M.current),R.current&&clearTimeout(R.current),g.current&&clearTimeout(g.current),C.current&&clearTimeout(C.current)},[]);let T=(0,t.useCallback)(async(t,r,a,l,c)=>{if(e&&!c){l.current&&clearTimeout(l.current),r(!0),a(null);try{let e=await t();if(!e.success){let t=e.error??"An unexpected error occurred";a(t),l.current=setTimeout(()=>a(null),5e3)}}catch(e){a(e instanceof Error?e.message:"An unexpected error occurred"),l.current=setTimeout(()=>a(null),5e3)}finally{r(!1)}}},[e]);return{openInIde:(0,t.useCallback)(()=>T(()=>(0,r.openIde)({repositoryPath:e.repositoryPath}),i,y,M,c),[T,c,e]),openInShell:(0,t.useCallback)(()=>T(()=>(0,a.openShell)({repositoryPath:e.repositoryPath}),d,k,R,u),[T,u,e]),openFolder:(0,t.useCallback)(()=>T(()=>(0,l.openFolder)(e.repositoryPath),o,x,g,n),[T,n,e]),syncMain:(0,t.useCallback)(()=>T(()=>s(e.repositoryId??""),h,b,C,p),[T,p,e]),ideLoading:c,shellLoading:u,folderLoading:n,syncLoading:p,ideError:f,shellError:m,folderError:v,syncError:S}}],74442)},84735,e=>{"use strict";let t=(0,e.i(54864).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],84735)},70727,e=>{"use strict";let t=(0,e.i(54864).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",0,t],70727)},1650,e=>{"use strict";e.i(11495),e.s([])},63524,e=>{"use strict";let t=(0,e.i(54864).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",0,t],63524)},60589,e=>{"use strict";let t=(0,e.i(54864).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",0,t],60589)},63995,e=>{"use strict";let t=(0,e.i(54864).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},83764,e=>{"use strict";let t=(0,e.i(54864).default)("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);e.s(["Archive",0,t],83764)},17759,e=>{"use strict";let t=(0,e.i(54864).default)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);e.s(["Code2",0,t],17759)},64778,e=>{"use strict";let t=(0,e.i(54864).default)("git-commit-horizontal",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]]);e.s(["GitCommitHorizontal",0,t],64778)},87609,95510,9246,e=>{"use strict";var t=e.i(96976);let r=(0,t.createServerReference)("4086324af8316f7a5f289333519a86ca2a1b7604ef",t.callServer,void 0,t.findSourceMapURL,"openIde");e.s(["openIde",0,r],87609);let a=(0,t.createServerReference)("40d7c3a8720ab75d31cf93170f55faff35ec55c05b",t.callServer,void 0,t.findSourceMapURL,"openShell");e.s(["openShell",0,a],95510);let l=(0,t.createServerReference)("403de2be54d420e6c908508702d2d177b6c366978b",t.callServer,void 0,t.findSourceMapURL,"openFolder");e.s(["openFolder",0,l],9246)},60958,e=>{"use strict";var t=e.i(63995);e.s(["TriangleAlert",()=>t.default])},68637,e=>{"use strict";let t=(0,e.i(54864).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],68637)},84812,e=>{"use strict";let t=(0,e.i(54864).default)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);e.s(["default",0,t])},29549,e=>{"use strict";let t=(0,e.i(54864).default)("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);e.s(["Circle",0,t],29549)},91653,e=>{"use strict";var t=e.i(15786);e.s(["CheckIcon",()=>t.default])},27381,e=>{"use strict";let t=(0,e.i(54864).default)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);e.s(["Shield",0,t],27381)},47930,e=>{"use strict";let t=(0,e.i(54864).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",0,t],47930)},32238,e=>{"use strict";var t=e.i(96976);let r=(0,t.createServerReference)("404b35bf290a9fc40f85b9c946426d9fc174919d71",t.callServer,void 0,t.findSourceMapURL,"addRepository");e.s(["addRepository",0,r])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(96871),i=e.i(16539),n=e.i(51818),s=e.i(70727),a=e.i(60589),o=e.i(91060),l=e.i(54864);let r=(0,l.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),c=(0,l.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),d=(0,l.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var u=e.i(99413),g=e.i(85202);let p=(0,l.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),m=(0,l.default)("layout-list",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]);var h=e.i(68316);e.i(26759);var f=e.i(97164),x=e.i(31777),v=e.i(9749),b=e.i(84812),b=b,w=e.i(68637),y=e.i(84735),j=e.i(81481),k=e.i(41957),S=e.i(51911),C=e.i(2828);function M({label:e,description:i,htmlFor:n,tooltip:s,children:a}){let o=s??i;return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(k.Label,{htmlFor:n,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),o?(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(j.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,t.jsx)(C.TooltipContent,{side:"top",className:"max-w-64 text-[11px] leading-relaxed",children:(0,t.jsx)("span",{className:"text-muted-foreground",children:o})})]}):null]}),i?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:i}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a})]})}function P({label:e,description:i,id:n,testId:s,checked:a,onChange:o,disabled:l,tooltip:r}){return(0,t.jsx)(M,{label:e,description:i,htmlFor:n,tooltip:r,children:(0,t.jsx)(S.Switch,{id:n,"data-testid":s,checked:a,onCheckedChange:o,disabled:l,className:(0,x.cn)("cursor-pointer",l&&"cursor-not-allowed opacity-50")})})}function I({icon:e,title:i,description:n,badge:s,testId:a,tooltip:o,tooltipLinks:l,children:r}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":a,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:i}),o?(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(j.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,t.jsxs)(C.TooltipContent,{side:"bottom",className:"max-w-72 text-[11px] leading-relaxed",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:o}),null!=l&&l.length>0?(0,t.jsx)("div",{className:"border-border/50 mt-1.5 flex flex-col gap-0.5 border-t pt-1.5",children:l.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1.5 text-[10px] tracking-wide transition-colors",children:[(0,t.jsx)(y.ExternalLink,{className:"h-2.5 w-2.5 shrink-0 opacity-50"}),e.label]},e.href))}):null]})]}):null,s?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:s}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:n})]}),(0,t.jsx)("div",{className:"px-4",children:r})]})}function T({id:e,testId:i,value:n,onChange:s,onBlur:a,placeholder:o,min:l=1,max:r,step:c=1,suffix:d}){let{t:u}=(0,f.useTranslation)("web"),g=""===n?void 0:parseInt(n,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{s(String(Math.max(l,(g??parseInt(o,10))-c)))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":u("common.decrease"),children:(0,t.jsx)(b.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":i,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:n,placeholder:o,onChange:e=>{s(e.target.value.replace(/[^0-9]/g,""))},onBlur:a,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=g??parseInt(o,10),s(String(null!=r?Math.min(r,e+c):e+c))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":u("common.increase"),children:(0,t.jsx)(w.Plus,{className:"h-3 w-3"})})]}),d?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:d}):null]})}function N({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function A({settings:e}){let{t:s}=(0,f.useTranslation)("web"),[a,o]=(0,i.useState)(e.agent.type);return(0,t.jsx)(I,{icon:n.Bot,title:s("settings.agent.sectionTitle"),description:s("settings.agent.sectionDescription"),testId:"agent-settings-section",tooltip:s("settings.agent.hint"),tooltipLinks:[{label:s("settings.agent.links.agentSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/agent-system.md"},{label:s("settings.agent.links.addingAgents"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/adding-agents.md"},{label:s("settings.agent.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:(0,t.jsx)(M,{label:s("settings.agent.agentAndModel"),description:s("settings.agent.agentAndModelDescription"),tooltip:"Changing the agent switches which AI CLI tool runs your features. Each agent has different capabilities, speed, and cost tradeoffs.",htmlFor:"agent-model-picker",children:(0,t.jsx)(v.AgentModelPicker,{initialAgentType:a,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>o(e),className:"w-55"})})})}var D=e.i(60112),F=e.i(47373),L=e.i(81846),R=e.i(96976);let E=(0,R.createServerReference)("4057a9a13d65958107c4df6224affbd79b563f12da",R.callServer,void 0,R.findSourceMapURL,"updateSettingsAction");var B=e.i(17406),z=e.i(30342),U=e.i(50579),q=e.i(89048);function H(e){return(0,t.jsx)(U.Code,{className:(0,x.cn)("h-4 w-4",e.className),...e})}function K({className:e}){return(0,t.jsx)(z.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function W({className:e}){return(0,t.jsx)(z.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function O({className:e}){return(0,t.jsx)(z.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function V({className:e}){return(0,t.jsx)(z.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function $({className:e,...i}){return(0,t.jsx)(q.Rocket,{className:(0,x.cn)("h-4 w-4",e),...i})}K.displayName="VsCodeIcon",W.displayName="CursorEditorIcon",O.displayName="WindsurfIcon",V.displayName="ZedIcon",$.displayName="AntigravityIcon";let _={vscode:K,cursor:W,windsurf:O,zed:V,antigravity:$},G=[{id:"vscode",name:"VS Code",available:!0},{id:"cursor",name:"Cursor",available:!0},{id:"windsurf",name:"Windsurf",available:!0},{id:"zed",name:"Zed",available:!0},{id:"antigravity",name:"Antigravity",available:!0}],Z=[{id:"bash",name:"Bash",available:!0},{id:"zsh",name:"Zsh",available:!0},{id:"fish",name:"Fish",available:!0}];function X({settings:e,availableEditors:n,availableShells:a,availableTerminals:o}){let{t:l}=(0,f.useTranslation)("web"),[,r]=(0,i.useTransition)(),[c,d]=(0,i.useState)(e.environment.defaultEditor),[u,g]=(0,i.useState)(e.environment.shellPreference),[p,m]=(0,i.useState)(e.environment.terminalPreference??B.TerminalType.System),h=o??[{id:B.TerminalType.System,name:l("settings.environment.systemTerminal"),available:!0}];function v(e){r(async()=>{let t=await E(e);t.success||D.toast.error(t.error??l("settings.failedToSave"))})}return(0,t.jsxs)(I,{icon:s.Terminal,title:l("settings.environment.sectionTitle"),description:l("settings.environment.sectionDescription"),testId:"environment-settings-section",tooltip:l("settings.environment.hint"),tooltipLinks:[{label:l("settings.environment.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:[(0,t.jsx)(M,{label:l("settings.environment.defaultEditor"),description:l("settings.environment.defaultEditorDescription"),tooltip:"The editor that opens when you click 'Launch' on a tool card or when ShipIT needs to open a file for review.",htmlFor:"default-editor",children:(0,t.jsxs)(F.Select,{value:c,onValueChange:e=>{d(e),v({environment:{defaultEditor:e,shellPreference:u,terminalPreference:p}})},children:[(0,t.jsx)(F.SelectTrigger,{id:"default-editor","data-testid":"editor-select",className:"w-64 cursor-pointer text-xs",children:(0,t.jsx)(F.SelectValue,{})}),(0,t.jsx)(F.SelectContent,{children:(n??G).map(e=>{var i;let n=(i=e.id)&&i in _?_[i]:H;return(0,t.jsx)(F.SelectItem,{value:e.id,disabled:!e.available,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(n,{className:"h-4 w-4 shrink-0"}),e.name,(0,t.jsx)(L.Badge,{variant:"outline",className:(0,x.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",e.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:e.available?"Installed":"Not Installed"})]})},e.id)})})]})}),(0,t.jsx)(M,{label:l("settings.environment.shell"),description:l("settings.environment.shellDescription"),tooltip:"Controls which shell runs generated scripts like install commands and git operations. Match this to your daily driver shell.",htmlFor:"shell-preference",children:(0,t.jsxs)(F.Select,{value:u,onValueChange:e=>{g(e),v({environment:{defaultEditor:c,shellPreference:e,terminalPreference:p}})},children:[(0,t.jsx)(F.SelectTrigger,{id:"shell-preference","data-testid":"shell-select",className:"w-64 cursor-pointer text-xs",children:(0,t.jsx)(F.SelectValue,{})}),(0,t.jsx)(F.SelectContent,{children:(a??Z).map(e=>(0,t.jsx)(F.SelectItem,{value:e.id,disabled:!e.available,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[e.name,(0,t.jsx)(L.Badge,{variant:"outline",className:(0,x.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",e.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:e.available?"Installed":"Not Installed"})]})},e.id))})]})}),(0,t.jsx)(M,{label:l("settings.environment.terminal"),description:l("settings.environment.terminalDescription"),tooltip:"The terminal emulator launched when opening shell sessions from the web UI. Only affects web-launched terminals, not CLI usage.",htmlFor:"terminal-preference",children:(0,t.jsxs)(F.Select,{value:p,onValueChange:e=>{m(e),v({environment:{defaultEditor:c,shellPreference:u,terminalPreference:e}})},children:[(0,t.jsx)(F.SelectTrigger,{id:"terminal-preference","data-testid":"terminal-select",className:"w-64 cursor-pointer text-xs",children:(0,t.jsx)(F.SelectValue,{})}),(0,t.jsx)(F.SelectContent,{children:h.map(e=>(0,t.jsx)(F.SelectItem,{value:e.id,disabled:!e.available,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[e.name,(0,t.jsx)(L.Badge,{variant:"outline",className:(0,x.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",e.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:e.available?"Installed":"Not Installed"})]})},e.id))})]})})]})}function Y(e,t={}){let i=t.autoArchiveEnabled??e.autoArchiveEnabled,n=parseInt(t.autoArchiveDelay??e.autoArchiveDelay,10);return{workflow:{openPrOnImplementationComplete:t.openPr??e.openPr,approvalGateDefaults:{pushOnImplementationComplete:t.pushOnComplete??e.pushOnComplete,allowPrd:t.allowPrd??e.allowPrd,allowPlan:t.allowPlan??e.allowPlan,allowMerge:t.allowMerge??e.allowMerge},enableEvidence:t.enableEvidence??e.enableEvidence,commitEvidence:t.commitEvidence??e.commitEvidence,ciWatchEnabled:t.ciWatchEnabled??e.ciWatchEnabled,defaultFastMode:t.defaultFastMode??e.defaultFastMode,autoArchiveDelayMinutes:i?Number.isNaN(n)||n<1?10:n:0}}}function Q({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),[o,l]=(0,i.useState)(e.workflow.openPrOnImplementationComplete),[r,c]=(0,i.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[d,u]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPrd),[g,p]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPlan),[m,h]=(0,i.useState)(e.workflow.approvalGateDefaults.allowMerge),[x,v]=(0,i.useState)(e.workflow.enableEvidence),[b,w]=(0,i.useState)(e.workflow.commitEvidence),[y,j]=(0,i.useState)(!1!==e.workflow.ciWatchEnabled),[k,S]=(0,i.useState)(!1!==e.workflow.defaultFastMode),[C,A]=(0,i.useState)((e.workflow.autoArchiveDelayMinutes??10)>0),[F,L]=(0,i.useState)(String(e.workflow.autoArchiveDelayMinutes??10));function R(){return{openPr:o,pushOnComplete:r,allowPrd:d,allowPlan:g,allowMerge:m,enableEvidence:x,commitEvidence:b,ciWatchEnabled:y,defaultFastMode:k,autoArchiveEnabled:C,autoArchiveDelay:F}}function B(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(I,{icon:a.GitBranch,title:n("settings.workflow.title"),description:n("settings.workflow.sectionDescription"),testId:"workflow-settings-section",tooltip:n("settings.workflow.hint"),tooltipLinks:[{label:n("settings.workflow.links.approvalGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:n("settings.workflow.links.pushAndPrFlags"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:[(0,t.jsx)(P,{label:n("settings.workflow.defaultFastMode"),description:n("settings.workflow.defaultFastModeDescription"),tooltip:"When enabled, new features skip the PRD and Plan phases and go straight to implementation. Useful for quick fixes, risky for complex features.",id:"default-fast-mode",testId:"switch-default-fast-mode",checked:k,onChange:e=>{S(e),B(Y(R(),{defaultFastMode:e}))}}),(0,t.jsx)(N,{children:n("settings.workflow.subsections.approve")}),(0,t.jsx)(P,{label:n("settings.workflow.autoApprovePrd"),description:n("settings.workflow.autoApprovePrdDescription"),tooltip:"Automatically approves the requirements document without pausing for your review. Saves time but you lose the chance to refine requirements before planning.",id:"allow-prd",testId:"switch-allow-prd",checked:d,onChange:e=>{u(e),B(Y(R(),{allowPrd:e}))}}),(0,t.jsx)(P,{label:n("settings.workflow.autoApprovePlan"),description:n("settings.workflow.autoApprovePlanDescription"),tooltip:"Automatically approves the implementation plan. The agent proceeds to coding without waiting for your plan review.",id:"allow-plan",testId:"switch-allow-plan",checked:g,onChange:e=>{p(e),B(Y(R(),{allowPlan:e}))}}),(0,t.jsx)(P,{label:n("settings.workflow.autoApproveMerge"),description:n("settings.workflow.autoApproveMergeDescription"),tooltip:"Automatically merges the PR after implementation without requiring your final review. Use with caution on production branches.",id:"allow-merge",testId:"switch-allow-merge",checked:m,onChange:e=>{h(e),B(Y(R(),{allowMerge:e}))}}),(0,t.jsx)(N,{children:n("settings.workflow.subsections.evidence")}),(0,t.jsx)(P,{label:n("settings.workflow.collectEvidence"),description:n("settings.workflow.collectEvidenceDescription"),tooltip:"Captures screenshots and test outputs during implementation as proof of work. Useful for audit trails and PR documentation.",id:"enable-evidence",testId:"switch-enable-evidence",checked:x,onChange:e=>{v(e),e?B(Y(R(),{enableEvidence:e})):(w(!1),B(Y(R(),{enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(P,{label:n("settings.workflow.addEvidenceToPr"),description:n("settings.workflow.addEvidenceToPrDescription"),tooltip:"Attaches collected evidence artifacts (screenshots, logs) directly to the pull request description.",id:"commit-evidence",testId:"switch-commit-evidence",checked:b,disabled:!x||!o,onChange:e=>{w(e),B(Y(R(),{commitEvidence:e}))}}),(0,t.jsx)(N,{children:n("settings.workflow.subsections.git")}),(0,t.jsx)(P,{label:n("settings.workflow.pushOnComplete"),description:n("settings.workflow.pushOnCompleteDescription"),tooltip:"Automatically pushes the implementation branch to the remote repository when the agent finishes coding.",id:"push-on-complete",testId:"switch-push-on-complete",checked:r,onChange:e=>{c(e),B(Y(R(),{pushOnComplete:e}))}}),(0,t.jsx)(P,{label:n("settings.workflow.openPrOnComplete"),description:n("settings.workflow.openPrOnCompleteDescription"),tooltip:"Creates a pull request automatically after pushing. Combined with push-on-complete, this fully automates the delivery pipeline.",id:"open-pr",testId:"switch-open-pr",checked:o,onChange:e=>{l(e),e?B(Y(R(),{openPr:e})):(w(!1),B(Y(R(),{openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(P,{label:n("settings.workflow.watchCiAfterPush"),description:n("settings.workflow.watchCiAfterPushDescription"),tooltip:"Monitors CI/CD pipeline status after pushing and can attempt fixes if tests fail. Disable if you prefer to handle CI failures manually.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:y,onChange:e=>{j(e),B(Y(R(),{ciWatchEnabled:e}))}}),(0,t.jsx)(N,{children:"Archive"}),(0,t.jsx)(P,{label:"Auto-archive completed",description:"Automatically archive features after they reach the completed state",tooltip:"Automatically archives features from the control center canvas after they reach the completed state, keeping the board clean.",id:"auto-archive-enabled",testId:"switch-auto-archive-enabled",checked:C,onChange:e=>{A(e),B(Y(R(),{autoArchiveEnabled:e}))}}),(0,t.jsx)(M,{label:"Archive delay",description:"Minutes to wait after completion before archiving (1-1440)",tooltip:"How long to wait after a feature completes before archiving it. Gives you time to review results before the feature moves off the board.",htmlFor:"auto-archive-delay",children:(0,t.jsx)(T,{id:"auto-archive-delay",testId:"input-auto-archive-delay",value:F,placeholder:"10",min:1,max:1440,suffix:"min",onChange:e=>{L(e)},onBlur:()=>{if(!C)return;let e=parseInt(F,10),t=Number.isNaN(e)?10:Math.min(1440,Math.max(1,e));L(String(t)),B(Y(R(),{autoArchiveDelay:String(t)}))}})})]})}function J(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function ee({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),[a,l]=(0,i.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[r,c]=(0,i.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[d,u]=(0,i.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[g,p]=(0,i.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),[m,h]=(0,i.useState)(!1!==e.workflow.hideCiStatus),x=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",v=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",b=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",w=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"";function y(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}function j(e){let t=J(e.ciTimeout??r);return{workflow:{ciMaxFixAttempts:J(e.ciMaxFix??a),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:J(e.ciLogMax??d),ciWatchPollIntervalSeconds:J(e.ciPollInterval??g),hideCiStatus:e.hideCiStatus??m}}}return(0,t.jsxs)(I,{icon:o.Activity,title:n("settings.ci.title"),description:n("settings.ci.description"),testId:"ci-settings-section",tooltip:n("settings.ci.hint"),tooltipLinks:[{label:n("settings.ci.links.cicdPipeline"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/cicd.md"},{label:n("settings.ci.links.ciSecurityGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/003-cicd-security-gates/spec.md"}],children:[(0,t.jsx)(M,{label:n("settings.ci.maxFixAttempts"),description:n("settings.ci.maxFixAttemptsDescription"),tooltip:"How many times the agent will attempt to fix failing CI checks before giving up. Higher values increase the chance of auto-resolution but consume more agent time and API calls.",htmlFor:"ci-max-fix",children:(0,t.jsx)(T,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:a,onChange:l,onBlur:()=>{a!==x&&y(j({ciMaxFix:a}))},min:1,max:10})}),(0,t.jsx)(M,{label:n("settings.ci.watchTimeout"),description:n("settings.ci.watchTimeoutDescription"),tooltip:"Maximum time the agent will wait for CI to finish. If CI hasn't completed within this window, the agent stops watching. Increase for repos with slow CI pipelines.",htmlFor:"ci-timeout",children:(0,t.jsx)(T,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:r,onChange:c,onBlur:()=>{r!==v&&y(j({ciTimeout:r}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(M,{label:n("settings.ci.maxLogSize"),description:n("settings.ci.maxLogSizeDescription"),tooltip:"CI logs beyond this character limit are truncated before being sent to the agent for analysis. Keeps agent context focused and avoids excessive token usage.",htmlFor:"ci-log-max",children:(0,t.jsx)(T,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:d,onChange:u,onBlur:()=>{d!==b&&y(j({ciLogMax:d}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(M,{label:n("settings.ci.pollInterval"),description:n("settings.ci.pollIntervalDescription"),tooltip:"How frequently the agent checks GitHub for CI status updates. Lower values give faster feedback but increase API call volume.",htmlFor:"ci-poll-interval",children:(0,t.jsx)(T,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:g,onChange:p,onBlur:()=>{g!==w&&y(j({ciPollInterval:g}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(P,{label:n("settings.ci.hideCiStatus"),description:n("settings.ci.hideCiStatusDescription"),tooltip:"When enabled, CI status indicators are hidden from the feature drawer and merge review panels. Useful if you monitor CI through GitHub directly.",id:"hide-ci-status",testId:"switch-hide-ci-status",checked:m,onChange:e=>{h(e),y(j({hideCiStatus:e}))}})]})}var et=e.i(27069),ei=e.i(91967),en=e.i(22353),es=e.i(9413),ea=e.i(36567),eo=e.i(75649),el=e.i(9641),er=e.i(70391),ec=e.i(85565),ed=e.i(87099),eu=["PageUp","PageDown"],eg=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ep={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},em="Slider",[eh,ef,ex]=(0,ed.createCollection)(em),[ev,eb]=(0,es.createContextScope)(em,[ex]),[ew,ey]=ev(em),ej=i.forwardRef((e,n)=>{let{name:s,min:a=0,max:o=100,step:l=1,orientation:r="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:u=[a],value:g,onValueChange:p=()=>{},onValueCommit:m=()=>{},inverted:h=!1,form:f,...x}=e,v=i.useRef(new Set),b=i.useRef(0),w="horizontal"===r,[y=[],j]=(0,ea.useControllableState)({prop:g,defaultProp:u,onChange:e=>{let t=[...v.current];t[b.current]?.focus(),p(e)}}),k=i.useRef(y);function S(e,t,{commit:i}={commit:!1}){let n,s=(String(l).split(".")[1]||"").length,r=Math.round((Math.round((e-a)/l)*l+a)*(n=Math.pow(10,s)))/n,c=(0,et.clamp)(r,[a,o]);j((e=[])=>{let n=function(e=[],t,i){let n=[...e];return n[i]=t,n.sort((e,t)=>e-t)}(e,c,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,i)=>e[i+1]-t))>=t;return!0}(n,d*l))return e;{b.current=n.indexOf(c);let t=String(n)!==String(e);return t&&i&&m(n),t?n:e}})}return(0,t.jsx)(ew,{scope:e.__scopeSlider,name:s,disabled:c,min:a,max:o,valueIndexToChangeRef:b,thumbs:v.current,values:y,orientation:r,form:f,children:(0,t.jsx)(eh.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(eh.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(w?eC:eM,{"aria-disabled":c,"data-disabled":c?"":void 0,...x,ref:n,onPointerDown:(0,ei.composeEventHandlers)(x.onPointerDown,()=>{c||(k.current=y)}),min:a,max:o,inverted:h,onSlideStart:c?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let i=e.map(e=>Math.abs(e-t)),n=Math.min(...i);return i.indexOf(n)}(y,e);S(e,t)},onSlideMove:c?void 0:function(e){S(e,b.current)},onSlideEnd:c?void 0:function(){let e=k.current[b.current];y[b.current]!==e&&m(y)},onHomeKeyDown:()=>!c&&S(a,0,{commit:!0}),onEndKeyDown:()=>!c&&S(o,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){let i=eu.includes(e.key)||e.shiftKey&&eg.includes(e.key),n=b.current;S(y[n]+l*(i?10:1)*t,n,{commit:!0})}}})})})})});ej.displayName=em;var[ek,eS]=ev(em,{startEdge:"left",endEdge:"right",size:"width",direction:1}),eC=i.forwardRef((e,n)=>{let{min:s,max:a,dir:o,inverted:l,onSlideStart:r,onSlideMove:c,onSlideEnd:d,onStepKeyDown:u,...g}=e,[p,m]=i.useState(null),h=(0,en.useComposedRefs)(n,e=>m(e)),f=i.useRef(void 0),x=(0,eo.useDirection)(o),v="ltr"===x,b=v&&!l||!v&&l;function w(e){let t=f.current||p.getBoundingClientRect(),i=eB([0,t.width],b?[s,a]:[a,s]);return f.current=t,i(e-t.left)}return(0,t.jsx)(ek,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:(0,t.jsx)(eP,{dir:x,"data-orientation":"horizontal",...g,ref:h,style:{...g.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=w(e.clientX);r?.(t)},onSlideMove:e=>{let t=w(e.clientX);c?.(t)},onSlideEnd:()=>{f.current=void 0,d?.()},onStepKeyDown:e=>{let t=ep[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),eM=i.forwardRef((e,n)=>{let{min:s,max:a,inverted:o,onSlideStart:l,onSlideMove:r,onSlideEnd:c,onStepKeyDown:d,...u}=e,g=i.useRef(null),p=(0,en.useComposedRefs)(n,g),m=i.useRef(void 0),h=!o;function f(e){let t=m.current||g.current.getBoundingClientRect(),i=eB([0,t.height],h?[a,s]:[s,a]);return m.current=t,i(e-t.top)}return(0,t.jsx)(ek,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:(0,t.jsx)(eP,{"data-orientation":"vertical",...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=f(e.clientY);l?.(t)},onSlideMove:e=>{let t=f(e.clientY);r?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{let t=ep[h?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),eP=i.forwardRef((e,i)=>{let{__scopeSlider:n,onSlideStart:s,onSlideMove:a,onSlideEnd:o,onHomeKeyDown:l,onEndKeyDown:r,onStepKeyDown:c,...d}=e,u=ey(em,n);return(0,t.jsx)(ec.Primitive.span,{...d,ref:i,onKeyDown:(0,ei.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(l(e),e.preventDefault()):"End"===e.key?(r(e),e.preventDefault()):eu.concat(eg).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:(0,ei.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():s(e)}),onPointerMove:(0,ei.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:(0,ei.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),o(e))})})}),eI="SliderTrack",eT=i.forwardRef((e,i)=>{let{__scopeSlider:n,...s}=e,a=ey(eI,n);return(0,t.jsx)(ec.Primitive.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...s,ref:i})});eT.displayName=eI;var eN="SliderRange",eA=i.forwardRef((e,n)=>{let{__scopeSlider:s,...a}=e,o=ey(eN,s),l=eS(eN,s),r=i.useRef(null),c=(0,en.useComposedRefs)(n,r),d=o.values.length,u=o.values.map(e=>eE(e,o.min,o.max)),g=d>1?Math.min(...u):0,p=100-Math.max(...u);return(0,t.jsx)(ec.Primitive.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...a,ref:c,style:{...e.style,[l.startEdge]:g+"%",[l.endEdge]:p+"%"}})});eA.displayName=eN;var eD="SliderThumb",eF=i.forwardRef((e,n)=>{let s=ef(e.__scopeSlider),[a,o]=i.useState(null),l=(0,en.useComposedRefs)(n,e=>o(e)),r=i.useMemo(()=>a?s().findIndex(e=>e.ref.current===a):-1,[s,a]);return(0,t.jsx)(eL,{...e,ref:l,index:r})}),eL=i.forwardRef((e,n)=>{var s,a,o,l,r;let c,d,{__scopeSlider:u,index:g,name:p,...m}=e,h=ey(eD,u),f=eS(eD,u),[x,v]=i.useState(null),b=(0,en.useComposedRefs)(n,e=>v(e)),w=!x||h.form||!!x.closest("form"),y=(0,er.useSize)(x),j=h.values[g],k=void 0===j?0:eE(j,h.min,h.max),S=(s=g,(a=h.values.length)>2?`Value ${s+1} of ${a}`:2===a?["Minimum","Maximum"][s]:void 0),C=y?.[f.size],M=C?(o=C,l=k,r=f.direction,d=eB([0,50],[0,c=o/2]),(c-d(l)*r)*r):0;return i.useEffect(()=>{if(x)return h.thumbs.add(x),()=>{h.thumbs.delete(x)}},[x,h.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${k}% + ${M}px)`},children:[(0,t.jsx)(eh.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(ec.Primitive.span,{role:"slider","aria-label":e["aria-label"]||S,"aria-valuemin":h.min,"aria-valuenow":j,"aria-valuemax":h.max,"aria-orientation":h.orientation,"data-orientation":h.orientation,"data-disabled":h.disabled?"":void 0,tabIndex:h.disabled?void 0:0,...m,ref:b,style:void 0===j?{display:"none"}:e.style,onFocus:(0,ei.composeEventHandlers)(e.onFocus,()=>{h.valueIndexToChangeRef.current=g})})}),w&&(0,t.jsx)(eR,{name:p??(h.name?h.name+(h.values.length>1?"[]":""):void 0),form:h.form,value:j},g)]})});eF.displayName=eD;var eR=i.forwardRef(({__scopeSlider:e,value:n,...s},a)=>{let o=i.useRef(null),l=(0,en.useComposedRefs)(o,a),r=(0,el.usePrevious)(n);return i.useEffect(()=>{let e=o.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(r!==n&&t){let i=new Event("input",{bubbles:!0});t.call(e,n),e.dispatchEvent(i)}},[r,n]),(0,t.jsx)(ec.Primitive.input,{style:{display:"none"},...s,ref:l,defaultValue:n})});function eE(e,t,i){return(0,et.clamp)(100/(i-t)*(e-t),[0,100])}function eB(e,t){return i=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(i-e[0])}}eR.displayName="RadioBubbleInput",e.s(["Range",0,eA,"Root",0,ej,"Slider",0,ej,"SliderRange",0,eA,"SliderThumb",0,eF,"SliderTrack",0,eT,"Thumb",0,eF,"Track",0,eT,"createSliderScope",0,eb],98207);var ez=e.i(98207),ez=ez;function eU({className:e,defaultValue:n,value:s,min:a=0,max:o=100,...l}){let r=i.useMemo(()=>Array.isArray(s)?s:Array.isArray(n)?n:[a,o],[s,n,a,o]);return(0,t.jsxs)(ez.Root,{"data-slot":"slider",defaultValue:n,value:s,min:a,max:o,className:(0,x.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...l,children:[(0,t.jsx)(ez.Track,{"data-slot":"slider-track",className:(0,x.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(ez.Range,{"data-slot":"slider-range",className:(0,x.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:r.length},(e,i)=>(0,t.jsx)(ez.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},i))]})}let eq=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],eH=eq.length-1;function eK(e){let t=0,i=Math.abs(e-eq[0]);for(let n=1;n<eq.length;n++){let s=Math.abs(e-eq[n]);s<i&&(i=s,t=n)}return t}function eW({id:e,testId:n,value:s,onChange:a,onBlur:o,defaultSeconds:l=1800}){var r;let c,d,u=(""===s?l:parseInt(s,10))||l,[g,p]=(0,i.useState)(()=>eK(u)),m=eK(u);m!==g&&eq[g]!==u&&p(m);let h=(0,i.useCallback)(([e])=>{p(e),a(String(eq[e]))},[a]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(eU,{id:e,"data-testid":n,min:0,max:eH,step:1,value:[g],onValueChange:h,onValueCommit:()=>o(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-end text-xs tabular-nums",children:(c=Math.floor((r=eq[g])/3600),d=Math.round(r%3600/60),0===c?`${d}m`:0===d?`${c}h`:`${c}h ${d}m`)})]})}function eO(e){if(void 0===e)return;let t=function(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}(e);return null!=t?1e3*t:void 0}function eV({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.workflow.stageTimeouts,o=e.workflow.analyzeRepoTimeouts,[l,r]=(0,i.useState)(String(Math.round((a?.analyzeMs??18e5)/1e3))),[c,d]=(0,i.useState)(String(Math.round((a?.requirementsMs??18e5)/1e3))),[g,p]=(0,i.useState)(String(Math.round((a?.researchMs??18e5)/1e3))),[m,h]=(0,i.useState)(String(Math.round((a?.planMs??18e5)/1e3))),[x,v]=(0,i.useState)(String(Math.round((a?.implementMs??18e5)/1e3))),[b,w]=(0,i.useState)(String(Math.round((a?.mergeMs??18e5)/1e3))),[y,j]=(0,i.useState)(String(Math.round((o?.analyzeMs??6e5)/1e3))),k=a?.analyzeMs!=null?String(Math.round(a.analyzeMs/1e3)):"",S=a?.requirementsMs!=null?String(Math.round(a.requirementsMs/1e3)):"",C=a?.researchMs!=null?String(Math.round(a.researchMs/1e3)):"",P=a?.planMs!=null?String(Math.round(a.planMs/1e3)):"",T=a?.implementMs!=null?String(Math.round(a.implementMs/1e3)):"",A=a?.mergeMs!=null?String(Math.round(a.mergeMs/1e3)):"",F=o?.analyzeMs!=null?String(Math.round(o.analyzeMs/1e3)):"";function L(e){return{workflow:{stageTimeouts:{analyzeMs:eO(e.analyzeTimeout??l),requirementsMs:eO(e.requirementsTimeout??c),researchMs:eO(e.researchTimeout??g),planMs:eO(e.planTimeout??m),implementMs:eO(e.implementTimeout??x),mergeMs:eO(e.mergeTimeout??b)},analyzeRepoTimeouts:{analyzeMs:eO(e.analyzeRepoTimeout??y)}}}}function R(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(I,{icon:u.Timer,title:n("settings.stageTimeouts.title"),description:n("settings.stageTimeouts.description"),testId:"stage-timeouts-settings-section",tooltip:n("settings.stageTimeouts.hint"),children:[(0,t.jsx)(N,{children:n("settings.stageTimeouts.subsections.featureAgent")}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.analyze"),description:n("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze",children:(0,t.jsx)(eW,{id:"timeout-analyze",testId:"timeout-analyze-input",value:l,onChange:r,onBlur:()=>{l!==k&&R(L({analyzeTimeout:l}))},defaultSeconds:1800})}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.requirements"),description:n("settings.stageTimeouts.requirementsDescription"),htmlFor:"timeout-requirements",children:(0,t.jsx)(eW,{id:"timeout-requirements",testId:"timeout-requirements-input",value:c,onChange:d,onBlur:()=>{c!==S&&R(L({requirementsTimeout:c}))},defaultSeconds:1800})}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.research"),description:n("settings.stageTimeouts.researchDescription"),htmlFor:"timeout-research",children:(0,t.jsx)(eW,{id:"timeout-research",testId:"timeout-research-input",value:g,onChange:p,onBlur:()=>{g!==C&&R(L({researchTimeout:g}))},defaultSeconds:1800})}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.plan"),description:n("settings.stageTimeouts.planDescription"),htmlFor:"timeout-plan",children:(0,t.jsx)(eW,{id:"timeout-plan",testId:"timeout-plan-input",value:m,onChange:h,onBlur:()=>{m!==P&&R(L({planTimeout:m}))},defaultSeconds:1800})}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.implement"),description:n("settings.stageTimeouts.implementDescription"),htmlFor:"timeout-implement",children:(0,t.jsx)(eW,{id:"timeout-implement",testId:"timeout-implement-input",value:x,onChange:v,onBlur:()=>{x!==T&&R(L({implementTimeout:x}))},defaultSeconds:1800})}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.merge"),description:n("settings.stageTimeouts.mergeDescription"),htmlFor:"timeout-merge",children:(0,t.jsx)(eW,{id:"timeout-merge",testId:"timeout-merge-input",value:b,onChange:w,onBlur:()=>{b!==A&&R(L({mergeTimeout:b}))},defaultSeconds:1800})}),(0,t.jsx)(N,{children:n("settings.stageTimeouts.subsections.analyzeRepoAgent")}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.analyze"),description:n("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(eW,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:y,onChange:j,onBlur:()=>{y!==F&&R(L({analyzeRepoTimeout:y}))},defaultSeconds:600})})]})}function e$({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),[a,o]=(0,i.useState)(e.notifications.inApp.enabled),[l,c]=(0,i.useState)({...e.notifications.events});function d(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}function u(e={}){return{notifications:{inApp:{enabled:e.inApp??a},events:e.events??l}}}return(0,t.jsxs)(I,{icon:r,title:n("settings.notifications.title"),description:n("settings.notifications.sectionDescription"),testId:"notification-settings-section",tooltip:n("settings.notifications.hint"),tooltipLinks:[{label:n("settings.notifications.links.notificationSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/021-agent-notifications/spec.yaml"}],children:[(0,t.jsx)(N,{children:n("settings.notifications.channels")}),(0,t.jsx)(P,{label:n("settings.notifications.inAppLabel"),description:n("settings.notifications.inAppDescription"),tooltip:"Master toggle for in-app toast notifications. When disabled, no event toasts will appear regardless of individual event settings below.",id:"notif-in-app",testId:"switch-in-app",checked:a,onChange:e=>{o(e),d(u({inApp:e}))}}),(0,t.jsx)(N,{children:n("settings.notifications.subsections.agentEvents")}),(0,t.jsx)(P,{label:n("settings.notifications.events.agentStarted"),tooltip:"Controls whether you receive an in-app toast notification when an agent begins working on a feature.",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:l.agentStarted,onChange:e=>{let t={...l,agentStarted:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.phaseCompleted"),tooltip:"Controls whether you receive an in-app toast notification when an agent completes a workflow phase (e.g., requirements, planning, implementation).",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:l.phaseCompleted,onChange:e=>{let t={...l,phaseCompleted:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.waitingApproval"),tooltip:"Controls whether you receive an in-app toast notification when a feature is paused and waiting for your approval to continue.",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:l.waitingApproval,onChange:e=>{let t={...l,waitingApproval:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.agentCompleted"),tooltip:"Controls whether you receive an in-app toast notification when an agent finishes all work on a feature successfully.",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:l.agentCompleted,onChange:e=>{let t={...l,agentCompleted:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.agentFailed"),tooltip:"Controls whether you receive an in-app toast notification when an agent encounters an error and stops working on a feature.",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:l.agentFailed,onChange:e=>{let t={...l,agentFailed:e};c(t),d(u({events:t}))}}),(0,t.jsx)(N,{children:n("settings.notifications.subsections.pullRequestEvents")}),(0,t.jsx)(P,{label:n("settings.notifications.events.prMerged"),tooltip:"Controls whether you receive an in-app toast notification when a feature's pull request is merged into the target branch.",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:l.prMerged,onChange:e=>{let t={...l,prMerged:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.prClosed"),tooltip:"Controls whether you receive an in-app toast notification when a feature's pull request is closed without merging.",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:l.prClosed,onChange:e=>{let t={...l,prClosed:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.prChecksPassed"),tooltip:"Controls whether you receive an in-app toast notification when all CI checks pass on a feature's pull request.",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:l.prChecksPassed,onChange:e=>{let t={...l,prChecksPassed:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.prChecksFailed"),tooltip:"Controls whether you receive an in-app toast notification when CI checks fail on a feature's pull request.",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:l.prChecksFailed,onChange:e=>{let t={...l,prChecksFailed:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.prBlocked"),tooltip:"Controls whether you receive an in-app toast notification when a pull request is blocked by merge conflicts or branch protection rules.",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:l.prBlocked,onChange:e=>{let t={...l,prBlocked:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.mergeReviewReady"),tooltip:"Controls whether you receive an in-app toast notification when a feature's PR passes all checks and is ready for your merge review.",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:l.mergeReviewReady,onChange:e=>{let t={...l,mergeReviewReady:e};c(t),d(u({events:t}))}})]})}function e_({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1,plugins:!1,mcpServers:!1},[o,l]=(0,i.useState)({...a});function r(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(I,{icon:c,title:n("settings.featureFlags.title"),description:n("settings.featureFlags.sectionDescription"),badge:n("settings.featureFlags.badge"),testId:"feature-flags-settings-section",tooltip:n("settings.featureFlags.hint"),children:[(0,t.jsx)(P,{label:n("settings.featureFlags.skills"),description:n("settings.featureFlags.skillsDescription"),tooltip:"Enables the Skills page in the sidebar for browsing and managing Claude Code skills.",id:"flag-skills",testId:"switch-flag-skills",checked:o.skills,onChange:e=>{let t={...o,skills:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.deployments"),description:n("settings.featureFlags.deploymentsDescription"),tooltip:"Enables experimental deployment features for environment management.",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:o.envDeploy,onChange:e=>{let t={...o,envDeploy:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.debug"),description:n("settings.featureFlags.debugDescription"),tooltip:"Shows additional debugging information in the UI for troubleshooting.",id:"flag-debug",testId:"switch-flag-debug",checked:o.debug,onChange:e=>{let t={...o,debug:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.githubImport"),description:n("settings.featureFlags.githubImportDescription"),tooltip:"Enables importing repositories directly from GitHub.",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:o.githubImport,onChange:e=>{let t={...o,githubImport:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.adoptBranch"),description:n("settings.featureFlags.adoptBranchDescription"),tooltip:"Enables adopting existing git branches as ShipIT features.",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:o.adoptBranch,onChange:e=>{let t={...o,adoptBranch:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.gitRebaseSync"),description:n("settings.featureFlags.gitRebaseSyncDescription"),tooltip:"Uses git rebase instead of merge when syncing feature branches with the upstream branch.",id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:o.gitRebaseSync,onChange:e=>{let t={...o,gitRebaseSync:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.reactFileManager"),description:n("settings.featureFlags.reactFileManagerDescription"),tooltip:"Replaces the native file picker dialog with a React-based file browser for selecting project folders.",id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:o.reactFileManager,onChange:e=>{let t={...o,reactFileManager:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.plugins"),description:e.litellmProxy?.baseUrl?n("settings.featureFlags.pluginsDescription"):`${n("settings.featureFlags.pluginsDescription")} — ${n("plugins.noProxy")}`,tooltip:"Enables the Plugins page for browsing and managing Claude Code plugins from a LiteLLM marketplace. Requires a LiteLLM proxy URL to be configured.",id:"flag-plugins",testId:"switch-flag-plugins",checked:o.plugins,disabled:!e.litellmProxy?.baseUrl,onChange:e=>{let t={...o,plugins:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.mcpServers"),description:e.litellmProxy?.baseUrl?n("settings.featureFlags.mcpServersDescription"):`${n("settings.featureFlags.mcpServersDescription")} — ${n("mcpServers.noProxy")}`,tooltip:"Enables the MCP Servers page for viewing MCP servers deployed on your LiteLLM proxy. Requires a LiteLLM proxy URL to be configured.",id:"flag-mcp-servers",testId:"switch-flag-mcp-servers",checked:o.mcpServers,disabled:!e.litellmProxy?.baseUrl,onChange:e=>{let t={...o,mcpServers:e};l(t),r({featureFlags:t})}})]})}function eG({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[o,l]=(0,i.useState)(a.enabled),[r,c]=(0,i.useState)(String(a.autoTimeoutMinutes)),[d,u]=(0,i.useState)(String(a.maxConcurrentSessions));function p(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(I,{icon:g.MessageSquare,title:n("settings.interactiveAgent.title"),description:n("settings.interactiveAgent.description"),testId:"interactive-agent-settings-section",tooltip:n("settings.interactiveAgent.hint"),children:[(0,t.jsx)(P,{label:n("settings.interactiveAgent.enableChatTab"),description:n("settings.interactiveAgent.enableChatTabDescription"),tooltip:"Shows or hides the Chat tab on feature detail pages. When enabled, you can have interactive conversations with the agent about a specific feature.",id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:o,onChange:e=>{l(e),p({interactiveAgent:{enabled:e,autoTimeoutMinutes:parseInt(r,10)||15,maxConcurrentSessions:parseInt(d,10)||3}})}}),(0,t.jsx)(M,{label:n("settings.interactiveAgent.autoTimeout"),description:n("settings.interactiveAgent.autoTimeoutDescription"),tooltip:"Minutes of inactivity before a chat agent session is automatically terminated. Prevents idle agent processes from consuming resources indefinitely.",htmlFor:"interactive-agent-timeout",children:(0,t.jsx)(T,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:r,placeholder:"15",min:1,max:120,suffix:"min",onChange:c,onBlur:()=>{let e=parseInt(r,10),t=Number.isNaN(e)?15:Math.min(120,Math.max(1,e));c(String(t)),p({interactiveAgent:{enabled:o,autoTimeoutMinutes:t,maxConcurrentSessions:parseInt(d,10)||3}})}})}),(0,t.jsx)(M,{label:n("settings.interactiveAgent.maxConcurrentSessions"),description:n("settings.interactiveAgent.maxConcurrentSessionsDescription"),tooltip:"Maximum number of interactive agent sessions that can run simultaneously. Each session spawns a separate agent process, so higher values use more CPU and memory.",htmlFor:"interactive-agent-sessions",children:(0,t.jsx)(T,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:d,placeholder:"3",min:1,max:10,onChange:u,onBlur:()=>{let e=parseInt(d,10),t=Number.isNaN(e)?3:Math.min(10,Math.max(1,e));u(String(t)),p({interactiveAgent:{enabled:o,autoTimeoutMinutes:parseInt(r,10)||15,maxConcurrentSessions:t}})}})})]})}function eZ({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.fabLayout??{swapPosition:!1},[o,l]=(0,i.useState)(a.swapPosition);return(0,t.jsx)(I,{icon:p,title:n("settings.fabLayout.title"),description:n("settings.fabLayout.description"),testId:"fab-layout-settings-section",tooltip:n("settings.fabLayout.hint"),children:(0,t.jsx)(P,{label:n("settings.fabLayout.swapPosition"),description:n("settings.fabLayout.swapPositionDescription"),tooltip:"Swaps the Create button (bottom-right) and Chat button (bottom-left) positions on the control center canvas.",id:"fab-swap-position",testId:"switch-fab-swap-position",checked:o,onChange:e=>{var t;l(e),t={fabLayout:{swapPosition:e}},s(async()=>{let e=await E(t);e.success||D.toast.error(e.error??n("settings.failedToSave"))})}})})}function eX({shipitAiHome:e,dbFileSize:i}){let{t:n}=(0,f.useTranslation)("web");return(0,t.jsxs)(I,{icon:d,title:n("settings.database.title"),description:n("settings.database.sectionDescription"),testId:"database-settings-section",tooltip:n("settings.database.hint"),tooltipLinks:[{label:n("settings.database.links.settingsService"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/settings-service.md"},{label:n("settings.database.links.settingsSpec"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/005-global-settings-service/spec.md"}],children:[(0,t.jsx)(M,{label:n("settings.database.location"),description:n("settings.database.locationDescription"),tooltip:"The directory where ShipIT stores its SQLite database, logs, and configuration files. Change this via the SHIPIT_AI_HOME environment variable.",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shipit-ai-home-path",children:e})}),(0,t.jsx)(M,{label:n("settings.database.size"),tooltip:"Current size of the SQLite database file on disk. Large databases may slow down startup; consider archiving old features if this grows significantly.",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:i})})]})}var eY=e.i(37628),eY=eY,eQ=e.i(81391),eQ=eQ;let eJ=(0,R.createServerReference)("406b1547eb44a49a1e79a7e6d6915980c2f991cbe8",R.callServer,void 0,R.findSourceMapURL,"addMarketplaceAction");var e0=e.i(98127),e1=e.i(35364);function e4({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),[a,o]=(0,i.useState)(e.litellmProxy?.baseUrl??""),[l,r]=(0,i.useState)(e.litellmProxy?.apiKey??""),[c,d]=(0,i.useState)("idle"),[u,g]=(0,i.useState)(!1),p=e.litellmProxy?.baseUrl??"",m=e.litellmProxy?.apiKey??"";function x(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}function v(e){let t=e?.baseUrl??a;return{litellmProxy:{baseUrl:t,apiKey:e?.apiKey??l,marketplaceEnabled:!!t}}}async function b(){if(a){g(!0),d("idle");try{let e=`${a.replace(/\/+$/,"")}/claude-code/marketplace.json`,t=await eJ(e);d(t.success?"success":"failed"),t.success?D.toast.success(n("settings.litellmProxy.testSuccess")):D.toast.error(n("settings.litellmProxy.testFailed"))}catch{d("failed"),D.toast.error(n("settings.litellmProxy.testFailed"))}finally{g(!1)}}}return(0,t.jsxs)(I,{icon:h.Server,title:n("settings.litellmProxy.title"),description:n("settings.litellmProxy.description"),testId:"litellm-proxy-settings-section",tooltip:n("settings.litellmProxy.hint"),children:[(0,t.jsx)(M,{label:n("settings.litellmProxy.baseUrl"),description:n("settings.litellmProxy.baseUrlDescription"),tooltip:"The base URL of your LiteLLM proxy server. This is used to fetch the plugin marketplace catalog and route model requests.",htmlFor:"litellm-proxy-url",children:(0,t.jsx)(e0.Input,{id:"litellm-proxy-url","data-testid":"litellm-proxy-url-input",type:"text",placeholder:"http://localhost:4000",value:a,onChange:e=>{o(e.target.value),d("idle")},onBlur:()=>{a!==p&&x(v({baseUrl:a}))},className:"w-64 text-xs"})}),(0,t.jsx)(M,{label:n("settings.litellmProxy.apiKey"),description:n("settings.litellmProxy.apiKeyDescription"),tooltip:"A virtual API key for authenticating with the LiteLLM proxy. Stored locally alongside other agent credentials.",htmlFor:"litellm-api-key",children:(0,t.jsx)(e0.Input,{id:"litellm-api-key","data-testid":"litellm-api-key-input",type:"password",placeholder:"sk-...",value:l,onChange:e=>r(e.target.value),onBlur:()=>{l!==m&&x(v({apiKey:l}))},className:"w-64 text-xs"})}),(0,t.jsx)(M,{label:n("settings.litellmProxy.testConnection"),tooltip:"Attempt to connect to the proxy and fetch the marketplace catalog to verify the configuration is correct.",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e1.Button,{variant:"outline",size:"sm","data-testid":"litellm-test-connection-btn",disabled:!a||u,onClick:b,className:"cursor-pointer text-xs",children:u?n("settings.saving"):n("settings.litellmProxy.testConnection")}),"success"===c&&(0,t.jsx)(eY.default,{className:"h-4 w-4 text-emerald-500","data-testid":"litellm-test-success"}),"failed"===c&&(0,t.jsx)(eQ.default,{className:"text-destructive h-4 w-4","data-testid":"litellm-test-failed"})]})})]})}let e3=(0,l.default)("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);var e5=e.i(48306);let e2=new Set(["claude-code","gemini-cli","codex-cli"]),e8=new Set(["cursor","copilot-cli"]);function e6({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.agent.type,o=e.litellmProxy?.claudeCode,[l,r]=(0,i.useState)(function(e){switch(e.agent.type){case"claude-code":return e.litellmProxy?.claudeCode?.routingMode??B.LiteLLMProxyRoutingMode.direct;case"gemini-cli":return e.litellmProxy?.geminiCli?.routingMode??B.LiteLLMProxyRoutingMode.direct;case"codex-cli":return e.litellmProxy?.codexCli?.routingMode??B.LiteLLMProxyRoutingMode.direct;default:return B.LiteLLMProxyRoutingMode.direct}}(e)),[c,d]=(0,i.useState)(o?.customHeaders??""),[u,g]=(0,i.useState)(o?.sonnetModel??""),[p,m]=(0,i.useState)(o?.haikuModel??""),[h,x]=(0,i.useState)(o?.opusModel??""),v=o?.customHeaders??"",b=o?.sonnetModel??"",w=o?.haikuModel??"",y=o?.opusModel??"",j=l!==B.LiteLLMProxyRoutingMode.direct,k=e2.has(a),S=e8.has(a),C=e.litellmProxy?.baseUrl??"",P=e.litellmProxy?.apiKey??"";function T(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}function N(e){let t=function(e){switch(e){case"claude-code":return"claudeCode";case"gemini-cli":return"geminiCli";case"codex-cli":return"codexCli";default:return null}}(a);return t?"claude-code"===a?{litellmProxy:{claudeCode:{routingMode:e?.routingMode??l,customHeaders:e?.customHeaders??c,sonnetModel:e?.sonnetModel??u,haikuModel:e?.haikuModel??p,opusModel:e?.opusModel??h}}}:{litellmProxy:{[t]:{routingMode:e?.routingMode??l}}}:{}}if(!k&&!S)return(0,t.jsx)(I,{icon:e3,title:n("settings.litellmProxy.routing.title"),description:n("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:n("settings.litellmProxy.routing.hint"),children:(0,t.jsx)(M,{label:"",description:n("settings.litellmProxy.routing.notSupported"),children:(0,t.jsx)("span",{})})});if(S){let e="cursor"===a,i=C?e?`${C.replace(/\/+$/,"")}/cursor`:C:"";return(0,t.jsx)(I,{icon:e3,title:n("settings.litellmProxy.routing.title"),description:n("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:n("settings.litellmProxy.routing.hint"),children:(0,t.jsx)(M,{label:e?n("settings.litellmProxy.routing.cursorInstructions"):n("settings.litellmProxy.routing.copilotInstructions"),description:e?n("settings.litellmProxy.routing.cursorDescription"):n("settings.litellmProxy.routing.copilotDescription"),children:(0,t.jsxs)("div",{className:"w-64 space-y-2",children:[(0,t.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:i}),e&&P?(0,t.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:P}):null]})})})}return(0,t.jsxs)(I,{icon:e3,title:n("settings.litellmProxy.routing.title"),description:n("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:n("settings.litellmProxy.routing.hint"),children:[(0,t.jsx)(M,{label:n("settings.litellmProxy.routing.mode"),description:n("settings.litellmProxy.routing.modeDescription"),htmlFor:"litellm-routing-mode",children:(0,t.jsxs)(F.Select,{value:l,onValueChange:function(e){r(e),T(N({routingMode:e}))},children:[(0,t.jsx)(F.SelectTrigger,{id:"litellm-routing-mode","data-testid":"litellm-routing-mode-select",className:"w-48 text-xs",children:(0,t.jsx)(F.SelectValue,{})}),(0,t.jsxs)(F.SelectContent,{children:[(0,t.jsx)(F.SelectItem,{value:B.LiteLLMProxyRoutingMode.direct,children:n("settings.litellmProxy.routing.modeDirect")}),(0,t.jsx)(F.SelectItem,{value:B.LiteLLMProxyRoutingMode.proxy,children:n("settings.litellmProxy.routing.modeProxy")}),"claude-code"===a&&(0,t.jsx)(F.SelectItem,{value:B.LiteLLMProxyRoutingMode.passthrough,children:n("settings.litellmProxy.routing.modePassthrough")})]})]})}),l===B.LiteLLMProxyRoutingMode.passthrough&&(0,t.jsx)(M,{label:"",description:n("settings.litellmProxy.routing.passthroughHelp"),children:(0,t.jsx)("span",{})}),j&&"claude-code"===a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M,{label:n("settings.litellmProxy.routing.customHeaders"),description:n("settings.litellmProxy.routing.customHeadersDescription"),htmlFor:"litellm-custom-headers",children:(0,t.jsx)(e5.Textarea,{id:"litellm-custom-headers","data-testid":"litellm-custom-headers-input",placeholder:"x-litellm-customer-id: my-user\nx-litellm-tags: project:acme",value:c,onChange:e=>d(e.target.value),onBlur:()=>{c!==v&&T(N({customHeaders:c}))},rows:3,className:"w-64 text-xs"})}),(0,t.jsx)(M,{label:n("settings.litellmProxy.routing.sonnetModel"),description:n("settings.litellmProxy.routing.modelOverrideDescription"),htmlFor:"litellm-sonnet-model",children:(0,t.jsx)(e0.Input,{id:"litellm-sonnet-model","data-testid":"litellm-sonnet-model-input",type:"text",placeholder:"claude-sonnet-4-6",value:u,onChange:e=>g(e.target.value),onBlur:()=>{u!==b&&T(N({sonnetModel:u}))},className:"w-64 text-xs"})}),(0,t.jsx)(M,{label:n("settings.litellmProxy.routing.haikuModel"),htmlFor:"litellm-haiku-model",children:(0,t.jsx)(e0.Input,{id:"litellm-haiku-model","data-testid":"litellm-haiku-model-input",type:"text",placeholder:"claude-haiku-4-5",value:p,onChange:e=>m(e.target.value),onBlur:()=>{p!==w&&T(N({haikuModel:p}))},className:"w-64 text-xs"})}),(0,t.jsx)(M,{label:n("settings.litellmProxy.routing.opusModel"),htmlFor:"litellm-opus-model",children:(0,t.jsx)(e0.Input,{id:"litellm-opus-model","data-testid":"litellm-opus-model-input",type:"text",placeholder:"claude-opus-4-6",value:h,onChange:e=>x(e.target.value),onBlur:()=>{h!==y&&T(N({opusModel:h}))},className:"w-64 text-xs"})})]}):null]})}let e7=[{id:"agent",labelKey:"settings.sections.agent",icon:n.Bot},{id:"environment",labelKey:"settings.sections.environment",icon:s.Terminal},{id:"workflow",labelKey:"settings.sections.workflow",icon:a.GitBranch},{id:"ci",labelKey:"settings.sections.ci",icon:o.Activity},{id:"stage-timeouts",labelKey:"settings.sections.timeouts",icon:u.Timer},{id:"notifications",labelKey:"settings.sections.notifications",icon:r},{id:"feature-flags",labelKey:"settings.sections.flags",icon:c},{id:"interactive-agent",labelKey:"settings.sections.chat",icon:g.MessageSquare},{id:"fab-layout",labelKey:"settings.sections.layout",icon:p},{id:"database",labelKey:"settings.sections.database",icon:d},{id:"litellm-proxy",labelKey:"settings.sections.proxy",icon:h.Server}],e9=[{id:"all",labelKey:"settings.sections.all",icon:m},...e7];e.s(["SettingsPageClient",0,function({settings:e,shipitAiHome:n,dbFileSize:s,availableTerminals:a,availableEditors:o,availableShells:l}){let{t:r}=(0,f.useTranslation)("web"),[c,d]=(0,i.useState)("all"),[u,g]=(0,i.useState)("agent");return(0,i.useEffect)(()=>{if("all"!==c)return;let e=e7.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&g(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let i of e)t.observe(i);return()=>t.disconnect()},[c]),(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl px-8 pt-8",children:[(0,t.jsxs)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 pb-4 backdrop-blur",children:[(0,t.jsxs)("div",{className:"mb-4 space-y-1.5",children:[(0,t.jsx)("span",{className:"text-[10px] font-bold tracking-[0.2em] text-slate-400 uppercase",children:"Developer Portal"}),(0,t.jsx)("div",{className:"flex items-baseline gap-3",children:(0,t.jsx)("h1",{className:"text-foreground text-3xl font-black tracking-tight",children:r("settings.title")})})]}),(0,t.jsx)("nav",{className:"bg-card editorial-shadow flex flex-wrap items-center gap-0.5 rounded-lg p-1",children:e9.map(e=>{let i=e.icon,n=c===e.id||"all"===c&&"all"!==e.id&&u===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>d(e.id),className:(0,x.cn)("flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-bold transition-all",n?"bg-muted text-primary shadow-sm ring-1 ring-slate-200/70 dark:ring-slate-700/50":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(i,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:r(e.labelKey)})]},e.id)})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[("all"===c||"agent"===c)&&(0,t.jsx)("div",{id:"section-agent",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(A,{settings:e})}),("all"===c||"environment"===c)&&(0,t.jsx)("div",{id:"section-environment",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(X,{settings:e,availableEditors:o,availableShells:l,availableTerminals:a})}),("all"===c||"workflow"===c)&&(0,t.jsx)("div",{id:"section-workflow",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(Q,{settings:e})}),("all"===c||"ci"===c)&&(0,t.jsx)("div",{id:"section-ci",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(ee,{settings:e})}),("all"===c||"stage-timeouts"===c)&&(0,t.jsx)("div",{id:"section-stage-timeouts",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(eV,{settings:e})}),("all"===c||"notifications"===c)&&(0,t.jsx)("div",{id:"section-notifications",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(e$,{settings:e})}),("all"===c||"feature-flags"===c)&&(0,t.jsx)("div",{id:"section-feature-flags",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(e_,{settings:e})}),("all"===c||"interactive-agent"===c)&&(0,t.jsx)("div",{id:"section-interactive-agent",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(eG,{settings:e})}),("all"===c||"fab-layout"===c)&&(0,t.jsx)("div",{id:"section-fab-layout",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(eZ,{settings:e})}),("all"===c||"database"===c)&&(0,t.jsx)("div",{id:"section-database",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(eX,{shipitAiHome:n,dbFileSize:s})}),("all"===c||"litellm-proxy"===c)&&(0,t.jsxs)("div",{id:"section-litellm-proxy",className:"scroll-mt-18 rounded-lg",children:[(0,t.jsx)(e4,{settings:e}),e.litellmProxy?.baseUrl?(0,t.jsx)(e6,{settings:e}):null]})]})]})}],41952)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,41952,e=>{"use strict";var t=e.i(96871),i=e.i(16539),n=e.i(51818),s=e.i(70727),a=e.i(60589),o=e.i(91060),l=e.i(54864);let r=(0,l.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),c=(0,l.default)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]),d=(0,l.default)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);var u=e.i(99413),g=e.i(85202);let p=(0,l.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),h=(0,l.default)("layout-list",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]);var m=e.i(68316);e.i(26759);var f=e.i(97164),x=e.i(31777),b=e.i(9749),v=e.i(84812),v=v,w=e.i(68637),y=e.i(84735),j=e.i(81481),k=e.i(41957),S=e.i(51911),C=e.i(2828);function M({label:e,description:i,htmlFor:n,tooltip:s,children:a}){let o=s??i;return(0,t.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(k.Label,{htmlFor:n,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:e}),o?(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(j.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,t.jsx)(C.TooltipContent,{side:"top",className:"max-w-64 text-[11px] leading-relaxed",children:(0,t.jsx)("span",{className:"text-muted-foreground",children:o})})]}):null]}),i?(0,t.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:i}):null]}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a})]})}function P({label:e,description:i,id:n,testId:s,checked:a,onChange:o,disabled:l,tooltip:r}){return(0,t.jsx)(M,{label:e,description:i,htmlFor:n,tooltip:r,children:(0,t.jsx)(S.Switch,{id:n,"data-testid":s,checked:a,onCheckedChange:o,disabled:l,className:(0,x.cn)("cursor-pointer",l&&"cursor-not-allowed opacity-50")})})}function I({icon:e,title:i,description:n,badge:s,testId:a,tooltip:o,tooltipLinks:l,children:r}){return(0,t.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":a,children:[(0,t.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,t.jsx)("h2",{className:"text-sm font-semibold",children:i}),o?(0,t.jsxs)(C.Tooltip,{children:[(0,t.jsx)(C.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(j.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,t.jsxs)(C.TooltipContent,{side:"bottom",className:"max-w-72 text-[11px] leading-relaxed",children:[(0,t.jsx)("p",{className:"text-muted-foreground",children:o}),null!=l&&l.length>0?(0,t.jsx)("div",{className:"border-border/50 mt-1.5 flex flex-col gap-0.5 border-t pt-1.5",children:l.map(e=>(0,t.jsxs)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1.5 text-[10px] tracking-wide transition-colors",children:[(0,t.jsx)(y.ExternalLink,{className:"h-2.5 w-2.5 shrink-0 opacity-50"}),e.label]},e.href))}):null]})]}):null,s?(0,t.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:s}):null]}),(0,t.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:n})]}),(0,t.jsx)("div",{className:"px-4",children:r})]})}function T({id:e,testId:i,value:n,onChange:s,onBlur:a,placeholder:o,min:l=1,max:r,step:c=1,suffix:d}){let{t:u}=(0,f.useTranslation)("web"),g=""===n?void 0:parseInt(n,10);return(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{s(String(Math.max(l,(g??parseInt(o,10))-c)))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-r transition-colors","aria-label":u("common.decrease"),children:(0,t.jsx)(v.default,{className:"h-3 w-3"})}),(0,t.jsx)("input",{id:e,"data-testid":i,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:n,placeholder:o,onChange:e=>{s(e.target.value.replace(/[^0-9]/g,""))},onBlur:a,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,t.jsx)("button",{type:"button",onClick:()=>{let e;e=g??parseInt(o,10),s(String(null!=r?Math.min(r,e+c):e+c))},onMouseUp:a,className:"text-muted-foreground hover:bg-muted hover:text-foreground flex h-8 w-7 cursor-pointer items-center justify-center border-l transition-colors","aria-label":u("common.increase"),children:(0,t.jsx)(w.Plus,{className:"h-3 w-3"})})]}),d?(0,t.jsx)("span",{className:"text-muted-foreground text-[11px]",children:d}):null]})}function N({children:e}){return(0,t.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,t.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:e})})}function A({settings:e}){let{t:s}=(0,f.useTranslation)("web"),[a,o]=(0,i.useState)(e.agent.type);return(0,t.jsx)(I,{icon:n.Bot,title:s("settings.agent.sectionTitle"),description:s("settings.agent.sectionDescription"),testId:"agent-settings-section",tooltip:s("settings.agent.hint"),tooltipLinks:[{label:s("settings.agent.links.agentSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/agent-system.md"},{label:s("settings.agent.links.addingAgents"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/adding-agents.md"},{label:s("settings.agent.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:(0,t.jsx)(M,{label:s("settings.agent.agentAndModel"),description:s("settings.agent.agentAndModelDescription"),tooltip:"Changing the agent switches which AI CLI tool runs your features. Each agent has different capabilities, speed, and cost tradeoffs.",htmlFor:"agent-model-picker",children:(0,t.jsx)(b.AgentModelPicker,{initialAgentType:a,initialModel:e.models.default,mode:"settings",onAgentModelChange:e=>o(e),className:"w-55"})})})}var D=e.i(60112),F=e.i(47373),R=e.i(81846),L=e.i(96976);let E=(0,L.createServerReference)("4024108af07f16cb32e374f90b479112aea38131c0",L.callServer,void 0,L.findSourceMapURL,"updateSettingsAction");var B=e.i(17406),z=e.i(30342),q=e.i(50579),H=e.i(89048);function K(e){return(0,t.jsx)(q.Code,{className:(0,x.cn)("h-4 w-4",e.className),...e})}function U({className:e}){return(0,t.jsx)(z.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function W({className:e}){return(0,t.jsx)(z.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function O({className:e}){return(0,t.jsx)(z.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function V({className:e}){return(0,t.jsx)(z.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,x.cn)("rounded-sm object-contain",e)})}function _({className:e,...i}){return(0,t.jsx)(H.Rocket,{className:(0,x.cn)("h-4 w-4",e),...i})}U.displayName="VsCodeIcon",W.displayName="CursorEditorIcon",O.displayName="WindsurfIcon",V.displayName="ZedIcon",_.displayName="AntigravityIcon";let G={vscode:U,cursor:W,windsurf:O,zed:V,antigravity:_},$=[{id:"vscode",name:"VS Code",available:!0},{id:"cursor",name:"Cursor",available:!0},{id:"windsurf",name:"Windsurf",available:!0},{id:"zed",name:"Zed",available:!0},{id:"antigravity",name:"Antigravity",available:!0}],Z=[{id:"bash",name:"Bash",available:!0},{id:"zsh",name:"Zsh",available:!0},{id:"fish",name:"Fish",available:!0}];function X({settings:e,availableEditors:n,availableShells:a,availableTerminals:o}){let{t:l}=(0,f.useTranslation)("web"),[,r]=(0,i.useTransition)(),[c,d]=(0,i.useState)(e.environment.defaultEditor),[u,g]=(0,i.useState)(e.environment.shellPreference),[p,h]=(0,i.useState)(e.environment.terminalPreference??B.TerminalType.System),m=o??[{id:B.TerminalType.System,name:l("settings.environment.systemTerminal"),available:!0}];function b(e){r(async()=>{let t=await E(e);t.success||D.toast.error(t.error??l("settings.failedToSave"))})}return(0,t.jsxs)(I,{icon:s.Terminal,title:l("settings.environment.sectionTitle"),description:l("settings.environment.sectionDescription"),testId:"environment-settings-section",tooltip:l("settings.environment.hint"),tooltipLinks:[{label:l("settings.environment.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:[(0,t.jsx)(M,{label:l("settings.environment.defaultEditor"),description:l("settings.environment.defaultEditorDescription"),tooltip:"The editor that opens when you click 'Launch' on a tool card or when ShipIT needs to open a file for review.",htmlFor:"default-editor",children:(0,t.jsxs)(F.Select,{value:c,onValueChange:e=>{d(e),b({environment:{defaultEditor:e,shellPreference:u,terminalPreference:p}})},children:[(0,t.jsx)(F.SelectTrigger,{id:"default-editor","data-testid":"editor-select",className:"w-64 cursor-pointer text-xs",children:(0,t.jsx)(F.SelectValue,{})}),(0,t.jsx)(F.SelectContent,{children:(n??$).map(e=>{var i;let n=(i=e.id)&&i in G?G[i]:K;return(0,t.jsx)(F.SelectItem,{value:e.id,disabled:!e.available,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsx)(n,{className:"h-4 w-4 shrink-0"}),e.name,(0,t.jsx)(R.Badge,{variant:"outline",className:(0,x.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",e.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:e.available?"Installed":"Not Installed"})]})},e.id)})})]})}),(0,t.jsx)(M,{label:l("settings.environment.shell"),description:l("settings.environment.shellDescription"),tooltip:"Controls which shell runs generated scripts like install commands and git operations. Match this to your daily driver shell.",htmlFor:"shell-preference",children:(0,t.jsxs)(F.Select,{value:u,onValueChange:e=>{g(e),b({environment:{defaultEditor:c,shellPreference:e,terminalPreference:p}})},children:[(0,t.jsx)(F.SelectTrigger,{id:"shell-preference","data-testid":"shell-select",className:"w-64 cursor-pointer text-xs",children:(0,t.jsx)(F.SelectValue,{})}),(0,t.jsx)(F.SelectContent,{children:(a??Z).map(e=>(0,t.jsx)(F.SelectItem,{value:e.id,disabled:!e.available,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[e.name,(0,t.jsx)(R.Badge,{variant:"outline",className:(0,x.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",e.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:e.available?"Installed":"Not Installed"})]})},e.id))})]})}),(0,t.jsx)(M,{label:l("settings.environment.terminal"),description:l("settings.environment.terminalDescription"),tooltip:"The terminal emulator launched when opening shell sessions from the web UI. Only affects web-launched terminals, not CLI usage.",htmlFor:"terminal-preference",children:(0,t.jsxs)(F.Select,{value:p,onValueChange:e=>{h(e),b({environment:{defaultEditor:c,shellPreference:u,terminalPreference:e}})},children:[(0,t.jsx)(F.SelectTrigger,{id:"terminal-preference","data-testid":"terminal-select",className:"w-64 cursor-pointer text-xs",children:(0,t.jsx)(F.SelectValue,{})}),(0,t.jsx)(F.SelectContent,{children:m.map(e=>(0,t.jsx)(F.SelectItem,{value:e.id,disabled:!e.available,children:(0,t.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[e.name,(0,t.jsx)(R.Badge,{variant:"outline",className:(0,x.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",e.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:e.available?"Installed":"Not Installed"})]})},e.id))})]})})]})}function Y(e,t={}){let i=t.autoArchiveEnabled??e.autoArchiveEnabled,n=parseInt(t.autoArchiveDelay??e.autoArchiveDelay,10);return{workflow:{openPrOnImplementationComplete:t.openPr??e.openPr,approvalGateDefaults:{pushOnImplementationComplete:t.pushOnComplete??e.pushOnComplete,allowPrd:t.allowPrd??e.allowPrd,allowPlan:t.allowPlan??e.allowPlan,allowMerge:t.allowMerge??e.allowMerge},enableEvidence:t.enableEvidence??e.enableEvidence,commitEvidence:t.commitEvidence??e.commitEvidence,ciWatchEnabled:t.ciWatchEnabled??e.ciWatchEnabled,defaultFastMode:t.defaultFastMode??e.defaultFastMode,autoArchiveDelayMinutes:i?Number.isNaN(n)||n<1?10:n:0}}}function Q({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),[o,l]=(0,i.useState)(e.workflow.openPrOnImplementationComplete),[r,c]=(0,i.useState)(e.workflow.approvalGateDefaults.pushOnImplementationComplete),[d,u]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPrd),[g,p]=(0,i.useState)(e.workflow.approvalGateDefaults.allowPlan),[h,m]=(0,i.useState)(e.workflow.approvalGateDefaults.allowMerge),[x,b]=(0,i.useState)(e.workflow.enableEvidence),[v,w]=(0,i.useState)(e.workflow.commitEvidence),[y,j]=(0,i.useState)(!1!==e.workflow.ciWatchEnabled),[k,S]=(0,i.useState)(!1!==e.workflow.defaultFastMode),[C,A]=(0,i.useState)((e.workflow.autoArchiveDelayMinutes??10)>0),[F,R]=(0,i.useState)(String(e.workflow.autoArchiveDelayMinutes??10));function L(){return{openPr:o,pushOnComplete:r,allowPrd:d,allowPlan:g,allowMerge:h,enableEvidence:x,commitEvidence:v,ciWatchEnabled:y,defaultFastMode:k,autoArchiveEnabled:C,autoArchiveDelay:F}}function B(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(I,{icon:a.GitBranch,title:n("settings.workflow.title"),description:n("settings.workflow.sectionDescription"),testId:"workflow-settings-section",tooltip:n("settings.workflow.hint"),tooltipLinks:[{label:n("settings.workflow.links.approvalGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:n("settings.workflow.links.pushAndPrFlags"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:[(0,t.jsx)(P,{label:n("settings.workflow.defaultFastMode"),description:n("settings.workflow.defaultFastModeDescription"),tooltip:"When enabled, new features skip the PRD and Plan phases and go straight to implementation. Useful for quick fixes, risky for complex features.",id:"default-fast-mode",testId:"switch-default-fast-mode",checked:k,onChange:e=>{S(e),B(Y(L(),{defaultFastMode:e}))}}),(0,t.jsx)(N,{children:n("settings.workflow.subsections.approve")}),(0,t.jsx)(P,{label:n("settings.workflow.autoApprovePrd"),description:n("settings.workflow.autoApprovePrdDescription"),tooltip:"Automatically approves the requirements document without pausing for your review. Saves time but you lose the chance to refine requirements before planning.",id:"allow-prd",testId:"switch-allow-prd",checked:d,onChange:e=>{u(e),B(Y(L(),{allowPrd:e}))}}),(0,t.jsx)(P,{label:n("settings.workflow.autoApprovePlan"),description:n("settings.workflow.autoApprovePlanDescription"),tooltip:"Automatically approves the implementation plan. The agent proceeds to coding without waiting for your plan review.",id:"allow-plan",testId:"switch-allow-plan",checked:g,onChange:e=>{p(e),B(Y(L(),{allowPlan:e}))}}),(0,t.jsx)(P,{label:n("settings.workflow.autoApproveMerge"),description:n("settings.workflow.autoApproveMergeDescription"),tooltip:"Automatically merges the PR after implementation without requiring your final review. Use with caution on production branches.",id:"allow-merge",testId:"switch-allow-merge",checked:h,onChange:e=>{m(e),B(Y(L(),{allowMerge:e}))}}),(0,t.jsx)(N,{children:n("settings.workflow.subsections.evidence")}),(0,t.jsx)(P,{label:n("settings.workflow.collectEvidence"),description:n("settings.workflow.collectEvidenceDescription"),tooltip:"Captures screenshots and test outputs during implementation as proof of work. Useful for audit trails and PR documentation.",id:"enable-evidence",testId:"switch-enable-evidence",checked:x,onChange:e=>{b(e),e?B(Y(L(),{enableEvidence:e})):(w(!1),B(Y(L(),{enableEvidence:e,commitEvidence:!1})))}}),(0,t.jsx)(P,{label:n("settings.workflow.addEvidenceToPr"),description:n("settings.workflow.addEvidenceToPrDescription"),tooltip:"Attaches collected evidence artifacts (screenshots, logs) directly to the pull request description.",id:"commit-evidence",testId:"switch-commit-evidence",checked:v,disabled:!x||!o,onChange:e=>{w(e),B(Y(L(),{commitEvidence:e}))}}),(0,t.jsx)(N,{children:n("settings.workflow.subsections.git")}),(0,t.jsx)(P,{label:n("settings.workflow.pushOnComplete"),description:n("settings.workflow.pushOnCompleteDescription"),tooltip:"Automatically pushes the implementation branch to the remote repository when the agent finishes coding.",id:"push-on-complete",testId:"switch-push-on-complete",checked:r,onChange:e=>{c(e),B(Y(L(),{pushOnComplete:e}))}}),(0,t.jsx)(P,{label:n("settings.workflow.openPrOnComplete"),description:n("settings.workflow.openPrOnCompleteDescription"),tooltip:"Creates a pull request automatically after pushing. Combined with push-on-complete, this fully automates the delivery pipeline.",id:"open-pr",testId:"switch-open-pr",checked:o,onChange:e=>{l(e),e?B(Y(L(),{openPr:e})):(w(!1),B(Y(L(),{openPr:e,commitEvidence:!1})))}}),(0,t.jsx)(P,{label:n("settings.workflow.watchCiAfterPush"),description:n("settings.workflow.watchCiAfterPushDescription"),tooltip:"Monitors CI/CD pipeline status after pushing and can attempt fixes if tests fail. Disable if you prefer to handle CI failures manually.",id:"ci-watch-enabled",testId:"switch-ci-watch-enabled",checked:y,onChange:e=>{j(e),B(Y(L(),{ciWatchEnabled:e}))}}),(0,t.jsx)(N,{children:"Archive"}),(0,t.jsx)(P,{label:"Auto-archive completed",description:"Automatically archive features after they reach the completed state",tooltip:"Automatically archives features from the control center canvas after they reach the completed state, keeping the board clean.",id:"auto-archive-enabled",testId:"switch-auto-archive-enabled",checked:C,onChange:e=>{A(e),B(Y(L(),{autoArchiveEnabled:e}))}}),(0,t.jsx)(M,{label:"Archive delay",description:"Minutes to wait after completion before archiving (1-1440)",tooltip:"How long to wait after a feature completes before archiving it. Gives you time to review results before the feature moves off the board.",htmlFor:"auto-archive-delay",children:(0,t.jsx)(T,{id:"auto-archive-delay",testId:"input-auto-archive-delay",value:F,placeholder:"10",min:1,max:1440,suffix:"min",onChange:e=>{R(e)},onBlur:()=>{if(!C)return;let e=parseInt(F,10),t=Number.isNaN(e)?10:Math.min(1440,Math.max(1,e));R(String(t)),B(Y(L(),{autoArchiveDelay:String(t)}))}})})]})}function J(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}function ee({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),[a,l]=(0,i.useState)(null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):""),[r,c]=(0,i.useState)(null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):""),[d,u]=(0,i.useState)(null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):""),[g,p]=(0,i.useState)(null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):""),[h,m]=(0,i.useState)(!1!==e.workflow.hideCiStatus),x=null!=e.workflow.ciMaxFixAttempts?String(e.workflow.ciMaxFixAttempts):"",b=null!=e.workflow.ciWatchTimeoutMs?String(Math.round(e.workflow.ciWatchTimeoutMs/1e3)):"",v=null!=e.workflow.ciLogMaxChars?String(e.workflow.ciLogMaxChars):"",w=null!=e.workflow.ciWatchPollIntervalSeconds?String(e.workflow.ciWatchPollIntervalSeconds):"";function y(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}function j(e){let t=J(e.ciTimeout??r);return{workflow:{ciMaxFixAttempts:J(e.ciMaxFix??a),ciWatchTimeoutMs:null!=t?1e3*t:void 0,ciLogMaxChars:J(e.ciLogMax??d),ciWatchPollIntervalSeconds:J(e.ciPollInterval??g),hideCiStatus:e.hideCiStatus??h}}}return(0,t.jsxs)(I,{icon:o.Activity,title:n("settings.ci.title"),description:n("settings.ci.description"),testId:"ci-settings-section",tooltip:n("settings.ci.hint"),tooltipLinks:[{label:n("settings.ci.links.cicdPipeline"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/cicd.md"},{label:n("settings.ci.links.ciSecurityGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/003-cicd-security-gates/spec.md"}],children:[(0,t.jsx)(M,{label:n("settings.ci.maxFixAttempts"),description:n("settings.ci.maxFixAttemptsDescription"),tooltip:"How many times the agent will attempt to fix failing CI checks before giving up. Higher values increase the chance of auto-resolution but consume more agent time and API calls.",htmlFor:"ci-max-fix",children:(0,t.jsx)(T,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:a,onChange:l,onBlur:()=>{a!==x&&y(j({ciMaxFix:a}))},min:1,max:10})}),(0,t.jsx)(M,{label:n("settings.ci.watchTimeout"),description:n("settings.ci.watchTimeoutDescription"),tooltip:"Maximum time the agent will wait for CI to finish. If CI hasn't completed within this window, the agent stops watching. Increase for repos with slow CI pipelines.",htmlFor:"ci-timeout",children:(0,t.jsx)(T,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:r,onChange:c,onBlur:()=>{r!==b&&y(j({ciTimeout:r}))},min:30,step:30,suffix:"sec"})}),(0,t.jsx)(M,{label:n("settings.ci.maxLogSize"),description:n("settings.ci.maxLogSizeDescription"),tooltip:"CI logs beyond this character limit are truncated before being sent to the agent for analysis. Keeps agent context focused and avoids excessive token usage.",htmlFor:"ci-log-max",children:(0,t.jsx)(T,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:d,onChange:u,onBlur:()=>{d!==v&&y(j({ciLogMax:d}))},min:1e3,step:5e3,suffix:"chars"})}),(0,t.jsx)(M,{label:n("settings.ci.pollInterval"),description:n("settings.ci.pollIntervalDescription"),tooltip:"How frequently the agent checks GitHub for CI status updates. Lower values give faster feedback but increase API call volume.",htmlFor:"ci-poll-interval",children:(0,t.jsx)(T,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:g,onChange:p,onBlur:()=>{g!==w&&y(j({ciPollInterval:g}))},min:5,step:5,suffix:"sec"})}),(0,t.jsx)(P,{label:n("settings.ci.hideCiStatus"),description:n("settings.ci.hideCiStatusDescription"),tooltip:"When enabled, CI status indicators are hidden from the feature drawer and merge review panels. Useful if you monitor CI through GitHub directly.",id:"hide-ci-status",testId:"switch-hide-ci-status",checked:h,onChange:e=>{m(e),y(j({hideCiStatus:e}))}})]})}var et=e.i(27069),ei=e.i(91967),en=e.i(22353),es=e.i(9413),ea=e.i(36567),eo=e.i(75649),el=e.i(9641),er=e.i(70391),ec=e.i(85565),ed=e.i(87099),eu=["PageUp","PageDown"],eg=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ep={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},eh="Slider",[em,ef,ex]=(0,ed.createCollection)(eh),[eb,ev]=(0,es.createContextScope)(eh,[ex]),[ew,ey]=eb(eh),ej=i.forwardRef((e,n)=>{let{name:s,min:a=0,max:o=100,step:l=1,orientation:r="horizontal",disabled:c=!1,minStepsBetweenThumbs:d=0,defaultValue:u=[a],value:g,onValueChange:p=()=>{},onValueCommit:h=()=>{},inverted:m=!1,form:f,...x}=e,b=i.useRef(new Set),v=i.useRef(0),w="horizontal"===r,[y=[],j]=(0,ea.useControllableState)({prop:g,defaultProp:u,onChange:e=>{let t=[...b.current];t[v.current]?.focus(),p(e)}}),k=i.useRef(y);function S(e,t,{commit:i}={commit:!1}){let n,s=(String(l).split(".")[1]||"").length,r=Math.round((Math.round((e-a)/l)*l+a)*(n=Math.pow(10,s)))/n,c=(0,et.clamp)(r,[a,o]);j((e=[])=>{let n=function(e=[],t,i){let n=[...e];return n[i]=t,n.sort((e,t)=>e-t)}(e,c,t);if(!function(e,t){if(t>0)return Math.min(...e.slice(0,-1).map((t,i)=>e[i+1]-t))>=t;return!0}(n,d*l))return e;{v.current=n.indexOf(c);let t=String(n)!==String(e);return t&&i&&h(n),t?n:e}})}return(0,t.jsx)(ew,{scope:e.__scopeSlider,name:s,disabled:c,min:a,max:o,valueIndexToChangeRef:v,thumbs:b.current,values:y,orientation:r,form:f,children:(0,t.jsx)(em.Provider,{scope:e.__scopeSlider,children:(0,t.jsx)(em.Slot,{scope:e.__scopeSlider,children:(0,t.jsx)(w?eC:eM,{"aria-disabled":c,"data-disabled":c?"":void 0,...x,ref:n,onPointerDown:(0,ei.composeEventHandlers)(x.onPointerDown,()=>{c||(k.current=y)}),min:a,max:o,inverted:m,onSlideStart:c?void 0:function(e){let t=function(e,t){if(1===e.length)return 0;let i=e.map(e=>Math.abs(e-t)),n=Math.min(...i);return i.indexOf(n)}(y,e);S(e,t)},onSlideMove:c?void 0:function(e){S(e,v.current)},onSlideEnd:c?void 0:function(){let e=k.current[v.current];y[v.current]!==e&&h(y)},onHomeKeyDown:()=>!c&&S(a,0,{commit:!0}),onEndKeyDown:()=>!c&&S(o,y.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!c){let i=eu.includes(e.key)||e.shiftKey&&eg.includes(e.key),n=v.current;S(y[n]+l*(i?10:1)*t,n,{commit:!0})}}})})})})});ej.displayName=eh;var[ek,eS]=eb(eh,{startEdge:"left",endEdge:"right",size:"width",direction:1}),eC=i.forwardRef((e,n)=>{let{min:s,max:a,dir:o,inverted:l,onSlideStart:r,onSlideMove:c,onSlideEnd:d,onStepKeyDown:u,...g}=e,[p,h]=i.useState(null),m=(0,en.useComposedRefs)(n,e=>h(e)),f=i.useRef(void 0),x=(0,eo.useDirection)(o),b="ltr"===x,v=b&&!l||!b&&l;function w(e){let t=f.current||p.getBoundingClientRect(),i=eB([0,t.width],v?[s,a]:[a,s]);return f.current=t,i(e-t.left)}return(0,t.jsx)(ek,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:(0,t.jsx)(eP,{dir:x,"data-orientation":"horizontal",...g,ref:m,style:{...g.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{let t=w(e.clientX);r?.(t)},onSlideMove:e=>{let t=w(e.clientX);c?.(t)},onSlideEnd:()=>{f.current=void 0,d?.()},onStepKeyDown:e=>{let t=ep[v?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})}),eM=i.forwardRef((e,n)=>{let{min:s,max:a,inverted:o,onSlideStart:l,onSlideMove:r,onSlideEnd:c,onStepKeyDown:d,...u}=e,g=i.useRef(null),p=(0,en.useComposedRefs)(n,g),h=i.useRef(void 0),m=!o;function f(e){let t=h.current||g.current.getBoundingClientRect(),i=eB([0,t.height],m?[a,s]:[s,a]);return h.current=t,i(e-t.top)}return(0,t.jsx)(ek,{scope:e.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:(0,t.jsx)(eP,{"data-orientation":"vertical",...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{let t=f(e.clientY);l?.(t)},onSlideMove:e=>{let t=f(e.clientY);r?.(t)},onSlideEnd:()=>{h.current=void 0,c?.()},onStepKeyDown:e=>{let t=ep[m?"from-bottom":"from-top"].includes(e.key);d?.({event:e,direction:t?-1:1})}})})}),eP=i.forwardRef((e,i)=>{let{__scopeSlider:n,onSlideStart:s,onSlideMove:a,onSlideEnd:o,onHomeKeyDown:l,onEndKeyDown:r,onStepKeyDown:c,...d}=e,u=ey(eh,n);return(0,t.jsx)(ec.Primitive.span,{...d,ref:i,onKeyDown:(0,ei.composeEventHandlers)(e.onKeyDown,e=>{"Home"===e.key?(l(e),e.preventDefault()):"End"===e.key?(r(e),e.preventDefault()):eu.concat(eg).includes(e.key)&&(c(e),e.preventDefault())}),onPointerDown:(0,ei.composeEventHandlers)(e.onPointerDown,e=>{let t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():s(e)}),onPointerMove:(0,ei.composeEventHandlers)(e.onPointerMove,e=>{e.target.hasPointerCapture(e.pointerId)&&a(e)}),onPointerUp:(0,ei.composeEventHandlers)(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),o(e))})})}),eI="SliderTrack",eT=i.forwardRef((e,i)=>{let{__scopeSlider:n,...s}=e,a=ey(eI,n);return(0,t.jsx)(ec.Primitive.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...s,ref:i})});eT.displayName=eI;var eN="SliderRange",eA=i.forwardRef((e,n)=>{let{__scopeSlider:s,...a}=e,o=ey(eN,s),l=eS(eN,s),r=i.useRef(null),c=(0,en.useComposedRefs)(n,r),d=o.values.length,u=o.values.map(e=>eE(e,o.min,o.max)),g=d>1?Math.min(...u):0,p=100-Math.max(...u);return(0,t.jsx)(ec.Primitive.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...a,ref:c,style:{...e.style,[l.startEdge]:g+"%",[l.endEdge]:p+"%"}})});eA.displayName=eN;var eD="SliderThumb",eF=i.forwardRef((e,n)=>{let s=ef(e.__scopeSlider),[a,o]=i.useState(null),l=(0,en.useComposedRefs)(n,e=>o(e)),r=i.useMemo(()=>a?s().findIndex(e=>e.ref.current===a):-1,[s,a]);return(0,t.jsx)(eR,{...e,ref:l,index:r})}),eR=i.forwardRef((e,n)=>{var s,a,o,l,r;let c,d,{__scopeSlider:u,index:g,name:p,...h}=e,m=ey(eD,u),f=eS(eD,u),[x,b]=i.useState(null),v=(0,en.useComposedRefs)(n,e=>b(e)),w=!x||m.form||!!x.closest("form"),y=(0,er.useSize)(x),j=m.values[g],k=void 0===j?0:eE(j,m.min,m.max),S=(s=g,(a=m.values.length)>2?`Value ${s+1} of ${a}`:2===a?["Minimum","Maximum"][s]:void 0),C=y?.[f.size],M=C?(o=C,l=k,r=f.direction,d=eB([0,50],[0,c=o/2]),(c-d(l)*r)*r):0;return i.useEffect(()=>{if(x)return m.thumbs.add(x),()=>{m.thumbs.delete(x)}},[x,m.thumbs]),(0,t.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[f.startEdge]:`calc(${k}% + ${M}px)`},children:[(0,t.jsx)(em.ItemSlot,{scope:e.__scopeSlider,children:(0,t.jsx)(ec.Primitive.span,{role:"slider","aria-label":e["aria-label"]||S,"aria-valuemin":m.min,"aria-valuenow":j,"aria-valuemax":m.max,"aria-orientation":m.orientation,"data-orientation":m.orientation,"data-disabled":m.disabled?"":void 0,tabIndex:m.disabled?void 0:0,...h,ref:v,style:void 0===j?{display:"none"}:e.style,onFocus:(0,ei.composeEventHandlers)(e.onFocus,()=>{m.valueIndexToChangeRef.current=g})})}),w&&(0,t.jsx)(eL,{name:p??(m.name?m.name+(m.values.length>1?"[]":""):void 0),form:m.form,value:j},g)]})});eF.displayName=eD;var eL=i.forwardRef(({__scopeSlider:e,value:n,...s},a)=>{let o=i.useRef(null),l=(0,en.useComposedRefs)(o,a),r=(0,el.usePrevious)(n);return i.useEffect(()=>{let e=o.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(r!==n&&t){let i=new Event("input",{bubbles:!0});t.call(e,n),e.dispatchEvent(i)}},[r,n]),(0,t.jsx)(ec.Primitive.input,{style:{display:"none"},...s,ref:l,defaultValue:n})});function eE(e,t,i){return(0,et.clamp)(100/(i-t)*(e-t),[0,100])}function eB(e,t){return i=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(i-e[0])}}eL.displayName="RadioBubbleInput",e.s(["Range",0,eA,"Root",0,ej,"Slider",0,ej,"SliderRange",0,eA,"SliderThumb",0,eF,"SliderTrack",0,eT,"Thumb",0,eF,"Track",0,eT,"createSliderScope",0,ev],98207);var ez=e.i(98207),ez=ez;function eq({className:e,defaultValue:n,value:s,min:a=0,max:o=100,...l}){let r=i.useMemo(()=>Array.isArray(s)?s:Array.isArray(n)?n:[a,o],[s,n,a,o]);return(0,t.jsxs)(ez.Root,{"data-slot":"slider",defaultValue:n,value:s,min:a,max:o,className:(0,x.cn)("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...l,children:[(0,t.jsx)(ez.Track,{"data-slot":"slider-track",className:(0,x.cn)("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:(0,t.jsx)(ez.Range,{"data-slot":"slider-range",className:(0,x.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:r.length},(e,i)=>(0,t.jsx)(ez.Thumb,{"data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},i))]})}let eH=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],eK=eH.length-1;function eU(e){let t=0,i=Math.abs(e-eH[0]);for(let n=1;n<eH.length;n++){let s=Math.abs(e-eH[n]);s<i&&(i=s,t=n)}return t}function eW({id:e,testId:n,value:s,onChange:a,onBlur:o,defaultSeconds:l=1800}){var r;let c,d,u=(""===s?l:parseInt(s,10))||l,[g,p]=(0,i.useState)(()=>eU(u)),h=eU(u);h!==g&&eH[g]!==u&&p(h);let m=(0,i.useCallback)(([e])=>{p(e),a(String(eH[e]))},[a]);return(0,t.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,t.jsx)(eq,{id:e,"data-testid":n,min:0,max:eK,step:1,value:[g],onValueChange:m,onValueCommit:()=>o(),className:"min-w-0 flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground shrink-0 text-end text-xs tabular-nums",children:(c=Math.floor((r=eH[g])/3600),d=Math.round(r%3600/60),0===c?`${d}m`:0===d?`${c}h`:`${c}h ${d}m`)})]})}function eO(e){if(void 0===e)return;let t=function(e){if(""===e)return;let t=parseInt(e,10);return Number.isNaN(t)||t<=0?void 0:t}(e);return null!=t?1e3*t:void 0}function eV({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.workflow.stageTimeouts,o=e.workflow.analyzeRepoTimeouts,[l,r]=(0,i.useState)(String(Math.round((a?.analyzeMs??18e5)/1e3))),[c,d]=(0,i.useState)(String(Math.round((a?.requirementsMs??18e5)/1e3))),[g,p]=(0,i.useState)(String(Math.round((a?.researchMs??18e5)/1e3))),[h,m]=(0,i.useState)(String(Math.round((a?.planMs??18e5)/1e3))),[x,b]=(0,i.useState)(String(Math.round((a?.implementMs??18e5)/1e3))),[v,w]=(0,i.useState)(String(Math.round((a?.mergeMs??18e5)/1e3))),[y,j]=(0,i.useState)(String(Math.round((o?.analyzeMs??6e5)/1e3))),k=a?.analyzeMs!=null?String(Math.round(a.analyzeMs/1e3)):"",S=a?.requirementsMs!=null?String(Math.round(a.requirementsMs/1e3)):"",C=a?.researchMs!=null?String(Math.round(a.researchMs/1e3)):"",P=a?.planMs!=null?String(Math.round(a.planMs/1e3)):"",T=a?.implementMs!=null?String(Math.round(a.implementMs/1e3)):"",A=a?.mergeMs!=null?String(Math.round(a.mergeMs/1e3)):"",F=o?.analyzeMs!=null?String(Math.round(o.analyzeMs/1e3)):"";function R(e){return{workflow:{stageTimeouts:{analyzeMs:eO(e.analyzeTimeout??l),requirementsMs:eO(e.requirementsTimeout??c),researchMs:eO(e.researchTimeout??g),planMs:eO(e.planTimeout??h),implementMs:eO(e.implementTimeout??x),mergeMs:eO(e.mergeTimeout??v)},analyzeRepoTimeouts:{analyzeMs:eO(e.analyzeRepoTimeout??y)}}}}function L(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(I,{icon:u.Timer,title:n("settings.stageTimeouts.title"),description:n("settings.stageTimeouts.description"),testId:"stage-timeouts-settings-section",tooltip:n("settings.stageTimeouts.hint"),children:[(0,t.jsx)(N,{children:n("settings.stageTimeouts.subsections.featureAgent")}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.analyze"),description:n("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze",children:(0,t.jsx)(eW,{id:"timeout-analyze",testId:"timeout-analyze-input",value:l,onChange:r,onBlur:()=>{l!==k&&L(R({analyzeTimeout:l}))},defaultSeconds:1800})}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.requirements"),description:n("settings.stageTimeouts.requirementsDescription"),htmlFor:"timeout-requirements",children:(0,t.jsx)(eW,{id:"timeout-requirements",testId:"timeout-requirements-input",value:c,onChange:d,onBlur:()=>{c!==S&&L(R({requirementsTimeout:c}))},defaultSeconds:1800})}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.research"),description:n("settings.stageTimeouts.researchDescription"),htmlFor:"timeout-research",children:(0,t.jsx)(eW,{id:"timeout-research",testId:"timeout-research-input",value:g,onChange:p,onBlur:()=>{g!==C&&L(R({researchTimeout:g}))},defaultSeconds:1800})}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.plan"),description:n("settings.stageTimeouts.planDescription"),htmlFor:"timeout-plan",children:(0,t.jsx)(eW,{id:"timeout-plan",testId:"timeout-plan-input",value:h,onChange:m,onBlur:()=>{h!==P&&L(R({planTimeout:h}))},defaultSeconds:1800})}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.implement"),description:n("settings.stageTimeouts.implementDescription"),htmlFor:"timeout-implement",children:(0,t.jsx)(eW,{id:"timeout-implement",testId:"timeout-implement-input",value:x,onChange:b,onBlur:()=>{x!==T&&L(R({implementTimeout:x}))},defaultSeconds:1800})}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.merge"),description:n("settings.stageTimeouts.mergeDescription"),htmlFor:"timeout-merge",children:(0,t.jsx)(eW,{id:"timeout-merge",testId:"timeout-merge-input",value:v,onChange:w,onBlur:()=>{v!==A&&L(R({mergeTimeout:v}))},defaultSeconds:1800})}),(0,t.jsx)(N,{children:n("settings.stageTimeouts.subsections.analyzeRepoAgent")}),(0,t.jsx)(M,{label:n("settings.stageTimeouts.analyze"),description:n("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze-repo",children:(0,t.jsx)(eW,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:y,onChange:j,onBlur:()=>{y!==F&&L(R({analyzeRepoTimeout:y}))},defaultSeconds:600})})]})}function e_({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),[a,o]=(0,i.useState)(e.notifications.inApp.enabled),[l,c]=(0,i.useState)({...e.notifications.events});function d(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}function u(e={}){return{notifications:{inApp:{enabled:e.inApp??a},events:e.events??l}}}return(0,t.jsxs)(I,{icon:r,title:n("settings.notifications.title"),description:n("settings.notifications.sectionDescription"),testId:"notification-settings-section",tooltip:n("settings.notifications.hint"),tooltipLinks:[{label:n("settings.notifications.links.notificationSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/021-agent-notifications/spec.yaml"}],children:[(0,t.jsx)(N,{children:n("settings.notifications.channels")}),(0,t.jsx)(P,{label:n("settings.notifications.inAppLabel"),description:n("settings.notifications.inAppDescription"),tooltip:"Master toggle for in-app toast notifications. When disabled, no event toasts will appear regardless of individual event settings below.",id:"notif-in-app",testId:"switch-in-app",checked:a,onChange:e=>{o(e),d(u({inApp:e}))}}),(0,t.jsx)(N,{children:n("settings.notifications.subsections.agentEvents")}),(0,t.jsx)(P,{label:n("settings.notifications.events.agentStarted"),tooltip:"Controls whether you receive an in-app toast notification when an agent begins working on a feature.",id:"notif-event-agentStarted",testId:"switch-event-agentStarted",checked:l.agentStarted,onChange:e=>{let t={...l,agentStarted:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.phaseCompleted"),tooltip:"Controls whether you receive an in-app toast notification when an agent completes a workflow phase (e.g., requirements, planning, implementation).",id:"notif-event-phaseCompleted",testId:"switch-event-phaseCompleted",checked:l.phaseCompleted,onChange:e=>{let t={...l,phaseCompleted:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.waitingApproval"),tooltip:"Controls whether you receive an in-app toast notification when a feature is paused and waiting for your approval to continue.",id:"notif-event-waitingApproval",testId:"switch-event-waitingApproval",checked:l.waitingApproval,onChange:e=>{let t={...l,waitingApproval:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.agentCompleted"),tooltip:"Controls whether you receive an in-app toast notification when an agent finishes all work on a feature successfully.",id:"notif-event-agentCompleted",testId:"switch-event-agentCompleted",checked:l.agentCompleted,onChange:e=>{let t={...l,agentCompleted:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.agentFailed"),tooltip:"Controls whether you receive an in-app toast notification when an agent encounters an error and stops working on a feature.",id:"notif-event-agentFailed",testId:"switch-event-agentFailed",checked:l.agentFailed,onChange:e=>{let t={...l,agentFailed:e};c(t),d(u({events:t}))}}),(0,t.jsx)(N,{children:n("settings.notifications.subsections.pullRequestEvents")}),(0,t.jsx)(P,{label:n("settings.notifications.events.prMerged"),tooltip:"Controls whether you receive an in-app toast notification when a feature's pull request is merged into the target branch.",id:"notif-event-prMerged",testId:"switch-event-prMerged",checked:l.prMerged,onChange:e=>{let t={...l,prMerged:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.prClosed"),tooltip:"Controls whether you receive an in-app toast notification when a feature's pull request is closed without merging.",id:"notif-event-prClosed",testId:"switch-event-prClosed",checked:l.prClosed,onChange:e=>{let t={...l,prClosed:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.prChecksPassed"),tooltip:"Controls whether you receive an in-app toast notification when all CI checks pass on a feature's pull request.",id:"notif-event-prChecksPassed",testId:"switch-event-prChecksPassed",checked:l.prChecksPassed,onChange:e=>{let t={...l,prChecksPassed:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.prChecksFailed"),tooltip:"Controls whether you receive an in-app toast notification when CI checks fail on a feature's pull request.",id:"notif-event-prChecksFailed",testId:"switch-event-prChecksFailed",checked:l.prChecksFailed,onChange:e=>{let t={...l,prChecksFailed:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.prBlocked"),tooltip:"Controls whether you receive an in-app toast notification when a pull request is blocked by merge conflicts or branch protection rules.",id:"notif-event-prBlocked",testId:"switch-event-prBlocked",checked:l.prBlocked,onChange:e=>{let t={...l,prBlocked:e};c(t),d(u({events:t}))}}),(0,t.jsx)(P,{label:n("settings.notifications.events.mergeReviewReady"),tooltip:"Controls whether you receive an in-app toast notification when a feature's PR passes all checks and is ready for your merge review.",id:"notif-event-mergeReviewReady",testId:"switch-event-mergeReviewReady",checked:l.mergeReviewReady,onChange:e=>{let t={...l,mergeReviewReady:e};c(t),d(u({events:t}))}})]})}function eG({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1,plugins:!1},[o,l]=(0,i.useState)({...a});function r(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(I,{icon:c,title:n("settings.featureFlags.title"),description:n("settings.featureFlags.sectionDescription"),badge:n("settings.featureFlags.badge"),testId:"feature-flags-settings-section",tooltip:n("settings.featureFlags.hint"),children:[(0,t.jsx)(P,{label:n("settings.featureFlags.skills"),description:n("settings.featureFlags.skillsDescription"),tooltip:"Enables the Skills page in the sidebar for browsing and managing Claude Code skills.",id:"flag-skills",testId:"switch-flag-skills",checked:o.skills,onChange:e=>{let t={...o,skills:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.deployments"),description:n("settings.featureFlags.deploymentsDescription"),tooltip:"Enables experimental deployment features for environment management.",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:o.envDeploy,onChange:e=>{let t={...o,envDeploy:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.debug"),description:n("settings.featureFlags.debugDescription"),tooltip:"Shows additional debugging information in the UI for troubleshooting.",id:"flag-debug",testId:"switch-flag-debug",checked:o.debug,onChange:e=>{let t={...o,debug:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.githubImport"),description:n("settings.featureFlags.githubImportDescription"),tooltip:"Enables importing repositories directly from GitHub.",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:o.githubImport,onChange:e=>{let t={...o,githubImport:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.adoptBranch"),description:n("settings.featureFlags.adoptBranchDescription"),tooltip:"Enables adopting existing git branches as ShipIT features.",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:o.adoptBranch,onChange:e=>{let t={...o,adoptBranch:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.gitRebaseSync"),description:n("settings.featureFlags.gitRebaseSyncDescription"),tooltip:"Uses git rebase instead of merge when syncing feature branches with the upstream branch.",id:"flag-gitRebaseSync",testId:"switch-flag-gitRebaseSync",checked:o.gitRebaseSync,onChange:e=>{let t={...o,gitRebaseSync:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.reactFileManager"),description:n("settings.featureFlags.reactFileManagerDescription"),tooltip:"Replaces the native file picker dialog with a React-based file browser for selecting project folders.",id:"flag-reactFileManager",testId:"switch-flag-reactFileManager",checked:o.reactFileManager,onChange:e=>{let t={...o,reactFileManager:e};l(t),r({featureFlags:t})}}),(0,t.jsx)(P,{label:n("settings.featureFlags.plugins"),description:e.litellmProxy?.baseUrl?n("settings.featureFlags.pluginsDescription"):`${n("settings.featureFlags.pluginsDescription")} — ${n("plugins.noProxy")}`,tooltip:"Enables the Plugins page for browsing and managing Claude Code plugins from a LiteLLM marketplace. Requires a LiteLLM proxy URL to be configured.",id:"flag-plugins",testId:"switch-flag-plugins",checked:o.plugins,disabled:!e.litellmProxy?.baseUrl,onChange:e=>{let t={...o,plugins:e};l(t),r({featureFlags:t})}})]})}function e$({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[o,l]=(0,i.useState)(a.enabled),[r,c]=(0,i.useState)(String(a.autoTimeoutMinutes)),[d,u]=(0,i.useState)(String(a.maxConcurrentSessions));function p(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}return(0,t.jsxs)(I,{icon:g.MessageSquare,title:n("settings.interactiveAgent.title"),description:n("settings.interactiveAgent.description"),testId:"interactive-agent-settings-section",tooltip:n("settings.interactiveAgent.hint"),children:[(0,t.jsx)(P,{label:n("settings.interactiveAgent.enableChatTab"),description:n("settings.interactiveAgent.enableChatTabDescription"),tooltip:"Shows or hides the Chat tab on feature detail pages. When enabled, you can have interactive conversations with the agent about a specific feature.",id:"interactive-agent-enabled",testId:"switch-interactive-agent-enabled",checked:o,onChange:e=>{l(e),p({interactiveAgent:{enabled:e,autoTimeoutMinutes:parseInt(r,10)||15,maxConcurrentSessions:parseInt(d,10)||3}})}}),(0,t.jsx)(M,{label:n("settings.interactiveAgent.autoTimeout"),description:n("settings.interactiveAgent.autoTimeoutDescription"),tooltip:"Minutes of inactivity before a chat agent session is automatically terminated. Prevents idle agent processes from consuming resources indefinitely.",htmlFor:"interactive-agent-timeout",children:(0,t.jsx)(T,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:r,placeholder:"15",min:1,max:120,suffix:"min",onChange:c,onBlur:()=>{let e=parseInt(r,10),t=Number.isNaN(e)?15:Math.min(120,Math.max(1,e));c(String(t)),p({interactiveAgent:{enabled:o,autoTimeoutMinutes:t,maxConcurrentSessions:parseInt(d,10)||3}})}})}),(0,t.jsx)(M,{label:n("settings.interactiveAgent.maxConcurrentSessions"),description:n("settings.interactiveAgent.maxConcurrentSessionsDescription"),tooltip:"Maximum number of interactive agent sessions that can run simultaneously. Each session spawns a separate agent process, so higher values use more CPU and memory.",htmlFor:"interactive-agent-sessions",children:(0,t.jsx)(T,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:d,placeholder:"3",min:1,max:10,onChange:u,onBlur:()=>{let e=parseInt(d,10),t=Number.isNaN(e)?3:Math.min(10,Math.max(1,e));u(String(t)),p({interactiveAgent:{enabled:o,autoTimeoutMinutes:parseInt(r,10)||15,maxConcurrentSessions:t}})}})})]})}function eZ({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.fabLayout??{swapPosition:!1},[o,l]=(0,i.useState)(a.swapPosition);return(0,t.jsx)(I,{icon:p,title:n("settings.fabLayout.title"),description:n("settings.fabLayout.description"),testId:"fab-layout-settings-section",tooltip:n("settings.fabLayout.hint"),children:(0,t.jsx)(P,{label:n("settings.fabLayout.swapPosition"),description:n("settings.fabLayout.swapPositionDescription"),tooltip:"Swaps the Create button (bottom-right) and Chat button (bottom-left) positions on the control center canvas.",id:"fab-swap-position",testId:"switch-fab-swap-position",checked:o,onChange:e=>{var t;l(e),t={fabLayout:{swapPosition:e}},s(async()=>{let e=await E(t);e.success||D.toast.error(e.error??n("settings.failedToSave"))})}})})}function eX({shipitAiHome:e,dbFileSize:i}){let{t:n}=(0,f.useTranslation)("web");return(0,t.jsxs)(I,{icon:d,title:n("settings.database.title"),description:n("settings.database.sectionDescription"),testId:"database-settings-section",tooltip:n("settings.database.hint"),tooltipLinks:[{label:n("settings.database.links.settingsService"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/settings-service.md"},{label:n("settings.database.links.settingsSpec"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/005-global-settings-service/spec.md"}],children:[(0,t.jsx)(M,{label:n("settings.database.location"),description:n("settings.database.locationDescription"),tooltip:"The directory where ShipIT stores its SQLite database, logs, and configuration files. Change this via the SHIPIT_AI_HOME environment variable.",children:(0,t.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shipit-ai-home-path",children:e})}),(0,t.jsx)(M,{label:n("settings.database.size"),tooltip:"Current size of the SQLite database file on disk. Large databases may slow down startup; consider archiving old features if this grows significantly.",children:(0,t.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:i})})]})}var eY=e.i(37628),eY=eY,eQ=e.i(81391),eQ=eQ;let eJ=(0,L.createServerReference)("403756dd269138f04d749d81e18386cdc183e87c45",L.callServer,void 0,L.findSourceMapURL,"addMarketplaceAction");var e0=e.i(98127),e1=e.i(35364);function e3({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),[a,o]=(0,i.useState)(e.litellmProxy?.baseUrl??""),[l,r]=(0,i.useState)(e.litellmProxy?.apiKey??""),[c,d]=(0,i.useState)("idle"),[u,g]=(0,i.useState)(!1),p=e.litellmProxy?.baseUrl??"",h=e.litellmProxy?.apiKey??"";function x(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}function b(e){let t=e?.baseUrl??a;return{litellmProxy:{baseUrl:t,apiKey:e?.apiKey??l,marketplaceEnabled:!!t}}}async function v(){if(a){g(!0),d("idle");try{let e=`${a.replace(/\/+$/,"")}/claude-code/marketplace.json`,t=await eJ(e);d(t.success?"success":"failed"),t.success?D.toast.success(n("settings.litellmProxy.testSuccess")):D.toast.error(n("settings.litellmProxy.testFailed"))}catch{d("failed"),D.toast.error(n("settings.litellmProxy.testFailed"))}finally{g(!1)}}}return(0,t.jsxs)(I,{icon:m.Server,title:n("settings.litellmProxy.title"),description:n("settings.litellmProxy.description"),testId:"litellm-proxy-settings-section",tooltip:n("settings.litellmProxy.hint"),children:[(0,t.jsx)(M,{label:n("settings.litellmProxy.baseUrl"),description:n("settings.litellmProxy.baseUrlDescription"),tooltip:"The base URL of your LiteLLM proxy server. This is used to fetch the plugin marketplace catalog and route model requests.",htmlFor:"litellm-proxy-url",children:(0,t.jsx)(e0.Input,{id:"litellm-proxy-url","data-testid":"litellm-proxy-url-input",type:"text",placeholder:"http://localhost:4000",value:a,onChange:e=>{o(e.target.value),d("idle")},onBlur:()=>{a!==p&&x(b({baseUrl:a}))},className:"w-64 text-xs"})}),(0,t.jsx)(M,{label:n("settings.litellmProxy.apiKey"),description:n("settings.litellmProxy.apiKeyDescription"),tooltip:"A virtual API key for authenticating with the LiteLLM proxy. Stored locally alongside other agent credentials.",htmlFor:"litellm-api-key",children:(0,t.jsx)(e0.Input,{id:"litellm-api-key","data-testid":"litellm-api-key-input",type:"password",placeholder:"sk-...",value:l,onChange:e=>r(e.target.value),onBlur:()=>{l!==h&&x(b({apiKey:l}))},className:"w-64 text-xs"})}),(0,t.jsx)(M,{label:n("settings.litellmProxy.testConnection"),tooltip:"Attempt to connect to the proxy and fetch the marketplace catalog to verify the configuration is correct.",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(e1.Button,{variant:"outline",size:"sm","data-testid":"litellm-test-connection-btn",disabled:!a||u,onClick:v,className:"cursor-pointer text-xs",children:u?n("settings.saving"):n("settings.litellmProxy.testConnection")}),"success"===c&&(0,t.jsx)(eY.default,{className:"h-4 w-4 text-emerald-500","data-testid":"litellm-test-success"}),"failed"===c&&(0,t.jsx)(eQ.default,{className:"text-destructive h-4 w-4","data-testid":"litellm-test-failed"})]})})]})}let e4=(0,l.default)("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);var e5=e.i(48306);let e8=new Set(["claude-code","gemini-cli","codex-cli"]),e2=new Set(["cursor","copilot-cli"]);function e6({settings:e}){let{t:n}=(0,f.useTranslation)("web"),[,s]=(0,i.useTransition)(),a=e.agent.type,o=e.litellmProxy?.claudeCode,[l,r]=(0,i.useState)(function(e){switch(e.agent.type){case"claude-code":return e.litellmProxy?.claudeCode?.routingMode??B.LiteLLMProxyRoutingMode.direct;case"gemini-cli":return e.litellmProxy?.geminiCli?.routingMode??B.LiteLLMProxyRoutingMode.direct;case"codex-cli":return e.litellmProxy?.codexCli?.routingMode??B.LiteLLMProxyRoutingMode.direct;default:return B.LiteLLMProxyRoutingMode.direct}}(e)),[c,d]=(0,i.useState)(o?.customHeaders??""),[u,g]=(0,i.useState)(o?.sonnetModel??""),[p,h]=(0,i.useState)(o?.haikuModel??""),[m,x]=(0,i.useState)(o?.opusModel??""),b=o?.customHeaders??"",v=o?.sonnetModel??"",w=o?.haikuModel??"",y=o?.opusModel??"",j=l!==B.LiteLLMProxyRoutingMode.direct,k=e8.has(a),S=e2.has(a),C=e.litellmProxy?.baseUrl??"",P=e.litellmProxy?.apiKey??"";function T(e){s(async()=>{let t=await E(e);t.success||D.toast.error(t.error??n("settings.failedToSave"))})}function N(e){let t=function(e){switch(e){case"claude-code":return"claudeCode";case"gemini-cli":return"geminiCli";case"codex-cli":return"codexCli";default:return null}}(a);return t?"claude-code"===a?{litellmProxy:{claudeCode:{routingMode:e?.routingMode??l,customHeaders:e?.customHeaders??c,sonnetModel:e?.sonnetModel??u,haikuModel:e?.haikuModel??p,opusModel:e?.opusModel??m}}}:{litellmProxy:{[t]:{routingMode:e?.routingMode??l}}}:{}}if(!k&&!S)return(0,t.jsx)(I,{icon:e4,title:n("settings.litellmProxy.routing.title"),description:n("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:n("settings.litellmProxy.routing.hint"),children:(0,t.jsx)(M,{label:"",description:n("settings.litellmProxy.routing.notSupported"),children:(0,t.jsx)("span",{})})});if(S){let e="cursor"===a,i=C?e?`${C.replace(/\/+$/,"")}/cursor`:C:"";return(0,t.jsx)(I,{icon:e4,title:n("settings.litellmProxy.routing.title"),description:n("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:n("settings.litellmProxy.routing.hint"),children:(0,t.jsx)(M,{label:e?n("settings.litellmProxy.routing.cursorInstructions"):n("settings.litellmProxy.routing.copilotInstructions"),description:e?n("settings.litellmProxy.routing.cursorDescription"):n("settings.litellmProxy.routing.copilotDescription"),children:(0,t.jsxs)("div",{className:"w-64 space-y-2",children:[(0,t.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:i}),e&&P?(0,t.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:P}):null]})})})}return(0,t.jsxs)(I,{icon:e4,title:n("settings.litellmProxy.routing.title"),description:n("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:n("settings.litellmProxy.routing.hint"),children:[(0,t.jsx)(M,{label:n("settings.litellmProxy.routing.mode"),description:n("settings.litellmProxy.routing.modeDescription"),htmlFor:"litellm-routing-mode",children:(0,t.jsxs)(F.Select,{value:l,onValueChange:function(e){r(e),T(N({routingMode:e}))},children:[(0,t.jsx)(F.SelectTrigger,{id:"litellm-routing-mode","data-testid":"litellm-routing-mode-select",className:"w-48 text-xs",children:(0,t.jsx)(F.SelectValue,{})}),(0,t.jsxs)(F.SelectContent,{children:[(0,t.jsx)(F.SelectItem,{value:B.LiteLLMProxyRoutingMode.direct,children:n("settings.litellmProxy.routing.modeDirect")}),(0,t.jsx)(F.SelectItem,{value:B.LiteLLMProxyRoutingMode.proxy,children:n("settings.litellmProxy.routing.modeProxy")}),"claude-code"===a&&(0,t.jsx)(F.SelectItem,{value:B.LiteLLMProxyRoutingMode.passthrough,children:n("settings.litellmProxy.routing.modePassthrough")})]})]})}),l===B.LiteLLMProxyRoutingMode.passthrough&&(0,t.jsx)(M,{label:"",description:n("settings.litellmProxy.routing.passthroughHelp"),children:(0,t.jsx)("span",{})}),j&&"claude-code"===a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M,{label:n("settings.litellmProxy.routing.customHeaders"),description:n("settings.litellmProxy.routing.customHeadersDescription"),htmlFor:"litellm-custom-headers",children:(0,t.jsx)(e5.Textarea,{id:"litellm-custom-headers","data-testid":"litellm-custom-headers-input",placeholder:"x-litellm-customer-id: my-user\nx-litellm-tags: project:acme",value:c,onChange:e=>d(e.target.value),onBlur:()=>{c!==b&&T(N({customHeaders:c}))},rows:3,className:"w-64 text-xs"})}),(0,t.jsx)(M,{label:n("settings.litellmProxy.routing.sonnetModel"),description:n("settings.litellmProxy.routing.modelOverrideDescription"),htmlFor:"litellm-sonnet-model",children:(0,t.jsx)(e0.Input,{id:"litellm-sonnet-model","data-testid":"litellm-sonnet-model-input",type:"text",placeholder:"claude-sonnet-4-6",value:u,onChange:e=>g(e.target.value),onBlur:()=>{u!==v&&T(N({sonnetModel:u}))},className:"w-64 text-xs"})}),(0,t.jsx)(M,{label:n("settings.litellmProxy.routing.haikuModel"),htmlFor:"litellm-haiku-model",children:(0,t.jsx)(e0.Input,{id:"litellm-haiku-model","data-testid":"litellm-haiku-model-input",type:"text",placeholder:"claude-haiku-4-5",value:p,onChange:e=>h(e.target.value),onBlur:()=>{p!==w&&T(N({haikuModel:p}))},className:"w-64 text-xs"})}),(0,t.jsx)(M,{label:n("settings.litellmProxy.routing.opusModel"),htmlFor:"litellm-opus-model",children:(0,t.jsx)(e0.Input,{id:"litellm-opus-model","data-testid":"litellm-opus-model-input",type:"text",placeholder:"claude-opus-4-6",value:m,onChange:e=>x(e.target.value),onBlur:()=>{m!==y&&T(N({opusModel:m}))},className:"w-64 text-xs"})})]}):null]})}let e7=[{id:"agent",labelKey:"settings.sections.agent",icon:n.Bot},{id:"environment",labelKey:"settings.sections.environment",icon:s.Terminal},{id:"workflow",labelKey:"settings.sections.workflow",icon:a.GitBranch},{id:"ci",labelKey:"settings.sections.ci",icon:o.Activity},{id:"stage-timeouts",labelKey:"settings.sections.timeouts",icon:u.Timer},{id:"notifications",labelKey:"settings.sections.notifications",icon:r},{id:"feature-flags",labelKey:"settings.sections.flags",icon:c},{id:"interactive-agent",labelKey:"settings.sections.chat",icon:g.MessageSquare},{id:"fab-layout",labelKey:"settings.sections.layout",icon:p},{id:"database",labelKey:"settings.sections.database",icon:d},{id:"litellm-proxy",labelKey:"settings.sections.proxy",icon:m.Server}],e9=[{id:"all",labelKey:"settings.sections.all",icon:h},...e7];e.s(["SettingsPageClient",0,function({settings:e,shipitAiHome:n,dbFileSize:s,availableTerminals:a,availableEditors:o,availableShells:l}){let{t:r}=(0,f.useTranslation)("web"),[c,d]=(0,i.useState)("all"),[u,g]=(0,i.useState)("agent");return(0,i.useEffect)(()=>{if("all"!==c)return;let e=e7.map(e=>document.getElementById(`section-${e.id}`)).filter(Boolean);if(0===e.length)return;let t=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&g(t.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let i of e)t.observe(i);return()=>t.disconnect()},[c]),(0,t.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl px-8 pt-8",children:[(0,t.jsxs)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 pb-4 backdrop-blur",children:[(0,t.jsxs)("div",{className:"mb-4 space-y-1.5",children:[(0,t.jsx)("span",{className:"text-[10px] font-bold tracking-[0.2em] text-slate-400 uppercase",children:"Developer Portal"}),(0,t.jsx)("div",{className:"flex items-baseline gap-3",children:(0,t.jsx)("h1",{className:"text-foreground text-3xl font-black tracking-tight",children:r("settings.title")})})]}),(0,t.jsx)("nav",{className:"bg-card editorial-shadow flex flex-wrap items-center gap-0.5 rounded-lg p-1",children:e9.map(e=>{let i=e.icon,n=c===e.id||"all"===c&&"all"!==e.id&&u===e.id;return(0,t.jsxs)("button",{type:"button",onClick:()=>d(e.id),className:(0,x.cn)("flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-bold transition-all",n?"bg-muted text-primary shadow-sm ring-1 ring-slate-200/70 dark:ring-slate-700/50":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),children:[(0,t.jsx)(i,{className:"h-3 w-3"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:r(e.labelKey)})]},e.id)})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[("all"===c||"agent"===c)&&(0,t.jsx)("div",{id:"section-agent",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(A,{settings:e})}),("all"===c||"environment"===c)&&(0,t.jsx)("div",{id:"section-environment",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(X,{settings:e,availableEditors:o,availableShells:l,availableTerminals:a})}),("all"===c||"workflow"===c)&&(0,t.jsx)("div",{id:"section-workflow",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(Q,{settings:e})}),("all"===c||"ci"===c)&&(0,t.jsx)("div",{id:"section-ci",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(ee,{settings:e})}),("all"===c||"stage-timeouts"===c)&&(0,t.jsx)("div",{id:"section-stage-timeouts",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(eV,{settings:e})}),("all"===c||"notifications"===c)&&(0,t.jsx)("div",{id:"section-notifications",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(e_,{settings:e})}),("all"===c||"feature-flags"===c)&&(0,t.jsx)("div",{id:"section-feature-flags",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(eG,{settings:e})}),("all"===c||"interactive-agent"===c)&&(0,t.jsx)("div",{id:"section-interactive-agent",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(e$,{settings:e})}),("all"===c||"fab-layout"===c)&&(0,t.jsx)("div",{id:"section-fab-layout",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(eZ,{settings:e})}),("all"===c||"database"===c)&&(0,t.jsx)("div",{id:"section-database",className:"scroll-mt-18 rounded-lg",children:(0,t.jsx)(eX,{shipitAiHome:n,dbFileSize:s})}),("all"===c||"litellm-proxy"===c)&&(0,t.jsxs)("div",{id:"section-litellm-proxy",className:"scroll-mt-18 rounded-lg",children:[(0,t.jsx)(e3,{settings:e}),e.litellmProxy?.baseUrl?(0,t.jsx)(e6,{settings:e}):null]})]})]})}],41952)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96612,e=>{"use strict";let t=(0,e.i(54864).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],96612)},64376,e=>{"use strict";let t=(0,e.i(54864).default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);e.s(["LayoutDashboard",0,t],64376)},24901,e=>{"use strict";let t=(0,e.i(54864).default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,t],24901)},50990,e=>{"use strict";let t=(0,e.i(54864).default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,t],50990)},13867,e=>{"use strict";var t=e.i(99706);e.s(["FileText",()=>t.default])},82639,e=>{"use strict";var t=e.i(14771);e.s(["PaperclipIcon",()=>t.default])},42076,e=>{"use strict";async function t(){let e=await fetch("/api/dialog/pick-files",{method:"POST"});if(!e.ok)throw Error("Failed to open file dialog");let t=await e.json();return t.cancelled?null:t.files}e.s(["pickFiles",0,t])},81481,e=>{"use strict";let t=(0,e.i(54864).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",0,t],81481)},86024,e=>{"use strict";let t=(0,e.i(54864).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],86024)},79558,e=>{"use strict";var t=e.i(88641);e.s(["Download",()=>t.default])},68316,e=>{"use strict";var t=e.i(25034);e.s(["Server",()=>t.default])},91060,99413,50579,e=>{"use strict";var t=e.i(54864);let a=(0,t.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["Activity",0,a],91060);let i=(0,t.default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);e.s(["Timer",0,i],99413);var l=e.i(9063);e.s(["Code",()=>l.default],50579)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96612,e=>{"use strict";let t=(0,e.i(54864).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],96612)},64376,e=>{"use strict";let t=(0,e.i(54864).default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);e.s(["LayoutDashboard",0,t],64376)},24901,e=>{"use strict";let t=(0,e.i(54864).default)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]]);e.s(["FilePlus",0,t],24901)},50990,e=>{"use strict";let t=(0,e.i(54864).default)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]]);e.s(["FileEdit",0,t],50990)},13867,e=>{"use strict";var t=e.i(99706);e.s(["FileText",()=>t.default])},82639,e=>{"use strict";var t=e.i(14771);e.s(["PaperclipIcon",()=>t.default])},42076,e=>{"use strict";async function t(){let e=await fetch("/api/dialog/pick-files",{method:"POST"});if(!e.ok)throw Error("Failed to open file dialog");let t=await e.json();return t.cancelled?null:t.files}e.s(["pickFiles",0,t])},81481,e=>{"use strict";let t=(0,e.i(54864).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["Info",0,t],81481)},86024,e=>{"use strict";let t=(0,e.i(54864).default)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);e.s(["Package",0,t],86024)},79558,e=>{"use strict";var t=e.i(88641);e.s(["Download",()=>t.default])},91060,99413,e=>{"use strict";var t=e.i(54864);let a=(0,t.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["Activity",0,a],91060);let i=(0,t.default)("timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);e.s(["Timer",0,i],99413)},50579,e=>{"use strict";var t=e.i(9063);e.s(["Code",()=>t.default])},68316,e=>{"use strict";let t=(0,e.i(54864).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["Server",0,t],68316)}]);