@shipit-ai/cli 1.173.1 → 1.173.2

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 (249) hide show
  1. package/dist/packages/core/src/application/ports/output/services/mcp-server-browser.interface.d.ts +9 -1
  2. package/dist/packages/core/src/application/ports/output/services/mcp-server-browser.interface.d.ts.map +1 -1
  3. package/dist/packages/core/src/application/use-cases/mcp-servers/fetch-mcp-server-tools.use-case.d.ts +7 -3
  4. package/dist/packages/core/src/application/use-cases/mcp-servers/fetch-mcp-server-tools.use-case.d.ts.map +1 -1
  5. package/dist/packages/core/src/application/use-cases/mcp-servers/fetch-mcp-server-tools.use-case.js +6 -5
  6. package/dist/packages/core/src/infrastructure/di/modules/web-tokens.module.d.ts.map +1 -1
  7. package/dist/packages/core/src/infrastructure/di/modules/web-tokens.module.js +4 -0
  8. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.schema.d.ts +12 -0
  9. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.schema.d.ts.map +1 -1
  10. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.schema.js +11 -1
  11. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.service.d.ts +10 -2
  12. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.service.d.ts.map +1 -1
  13. package/dist/packages/core/src/infrastructure/services/mcp-server-browser/mcp-server-browser.service.js +50 -13
  14. package/dist/src/presentation/web/app/actions/fetch-mcp-server-tools.d.ts +1 -1
  15. package/dist/src/presentation/web/app/actions/fetch-mcp-server-tools.d.ts.map +1 -1
  16. package/dist/src/presentation/web/app/actions/fetch-mcp-server-tools.js +2 -2
  17. package/dist/src/presentation/web/app/mcp-servers/page.d.ts.map +1 -1
  18. package/dist/src/presentation/web/app/mcp-servers/page.js +3 -1
  19. package/dist/src/presentation/web/components/features/mcp-servers/mcp-connect-instructions.d.ts +19 -0
  20. package/dist/src/presentation/web/components/features/mcp-servers/mcp-connect-instructions.d.ts.map +1 -0
  21. package/dist/src/presentation/web/components/features/mcp-servers/mcp-connect-instructions.js +108 -0
  22. package/dist/src/presentation/web/components/features/mcp-servers/mcp-connect-instructions.stories.d.ts +11 -0
  23. package/dist/src/presentation/web/components/features/mcp-servers/mcp-connect-instructions.stories.d.ts.map +1 -0
  24. package/dist/src/presentation/web/components/features/mcp-servers/mcp-connect-instructions.stories.js +18 -0
  25. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.d.ts +2 -2
  26. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.d.ts.map +1 -1
  27. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.js +24 -8
  28. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.stories.d.ts +1 -1
  29. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.stories.js +1 -1
  30. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.d.ts +2 -1
  31. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.d.ts.map +1 -1
  32. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.js +2 -3
  33. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.stories.js +2 -2
  34. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.d.ts +17 -13
  35. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.d.ts.map +1 -1
  36. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.js +21 -34
  37. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.stories.d.ts +1 -1
  38. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.stories.d.ts.map +1 -1
  39. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.stories.js +7 -8
  40. package/dist/translations/ar/web.json +8 -2
  41. package/dist/translations/de/web.json +8 -2
  42. package/dist/translations/en/web.json +8 -2
  43. package/dist/translations/es/web.json +8 -2
  44. package/dist/translations/fr/web.json +8 -2
  45. package/dist/translations/he/web.json +8 -2
  46. package/dist/translations/pt/web.json +8 -2
  47. package/dist/translations/ru/web.json +8 -2
  48. package/dist/tsconfig.build.tsbuildinfo +1 -1
  49. package/package.json +1 -1
  50. package/web/.next/BUILD_ID +1 -1
  51. package/web/.next/build-manifest.json +3 -3
  52. package/web/.next/fallback-build-manifest.json +3 -3
  53. package/web/.next/prerender-manifest.json +3 -3
  54. package/web/.next/required-server-files.js +2 -2
  55. package/web/.next/required-server-files.json +2 -2
  56. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  57. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  58. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  59. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  60. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  61. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  62. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +31 -31
  63. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  64. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  65. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  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.nft.json +1 -1
  70. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  71. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  72. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  73. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  74. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  75. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  76. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  77. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  78. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  79. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  80. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +31 -31
  81. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  82. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  83. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  84. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  85. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  86. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
  87. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  88. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  89. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  90. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  91. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  92. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  93. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  94. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  95. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  96. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  97. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  98. package/web/.next/server/app/_global-error.html +1 -1
  99. package/web/.next/server/app/_global-error.rsc +1 -1
  100. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  101. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  102. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  103. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  104. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  105. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  106. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  107. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  108. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  109. package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
  110. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  111. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  112. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  113. package/web/.next/server/app/mcp-servers/page/server-reference-manifest.json +13 -13
  114. package/web/.next/server/app/mcp-servers/page.js.nft.json +1 -1
  115. package/web/.next/server/app/mcp-servers/page_client-reference-manifest.js +1 -1
  116. package/web/.next/server/app/plugins/page/server-reference-manifest.json +15 -15
  117. package/web/.next/server/app/plugins/page.js.nft.json +1 -1
  118. package/web/.next/server/app/plugins/page_client-reference-manifest.js +1 -1
  119. package/web/.next/server/app/settings/page/server-reference-manifest.json +12 -12
  120. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  121. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  122. package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
  123. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  124. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  125. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  126. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  127. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  128. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  129. package/web/.next/server/app/version/page.js.nft.json +1 -1
  130. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  131. package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
  132. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
  133. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
  134. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +2 -2
  135. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
  136. package/web/.next/server/chunks/ssr/0j.8_web_components_features_mcp-servers_mcp-servers-page-client_tsx_0dda8ih._.js +10 -0
  137. package/web/.next/server/chunks/ssr/0j.8_web_components_features_mcp-servers_mcp-servers-page-client_tsx_0dda8ih._.js.map +1 -0
  138. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
  139. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
  140. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
  141. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js +1 -1
  143. package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js.map +1 -1
  144. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js +1 -1
  145. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js.map +1 -1
  146. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js +1 -1
  147. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js.map +1 -1
  148. package/web/.next/server/chunks/ssr/[root-of-the-server]__0mwao26._.js +3 -0
  149. package/web/.next/server/chunks/ssr/[root-of-the-server]__0mwao26._.js.map +1 -0
  150. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js +1 -1
  151. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js.map +1 -1
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__0tq2syh._.js +1 -1
  154. package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js +1 -1
  155. package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js.map +1 -1
  156. package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js +1 -1
  157. package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js.map +1 -1
  158. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js +1 -1
  159. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js.map +1 -1
  160. package/web/.next/server/chunks/ssr/[root-of-the-server]__13pshs0._.js +1 -1
  161. package/web/.next/server/chunks/ssr/[root-of-the-server]__13pshs0._.js.map +1 -1
  162. package/web/.next/server/chunks/ssr/_01sesw0._.js +1 -1
  163. package/web/.next/server/chunks/ssr/_01sesw0._.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/_069y.js._.js +2 -2
  165. package/web/.next/server/chunks/ssr/_069y.js._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/_096x3u~._.js +1 -1
  167. package/web/.next/server/chunks/ssr/_096x3u~._.js.map +1 -1
  168. package/web/.next/server/chunks/ssr/{_12i_bjl._.js → _09b301s._.js} +2 -2
  169. package/web/.next/server/chunks/ssr/{_12i_bjl._.js.map → _09b301s._.js.map} +1 -1
  170. package/web/.next/server/chunks/ssr/_0__4si~._.js +1 -1
  171. package/web/.next/server/chunks/ssr/_0__4si~._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/_0_m17kl._.js +1 -1
  173. package/web/.next/server/chunks/ssr/_0_m17kl._.js.map +1 -1
  174. package/web/.next/server/chunks/ssr/_0d4miu.._.js +1 -1
  175. package/web/.next/server/chunks/ssr/_0d4miu.._.js.map +1 -1
  176. package/web/.next/server/chunks/ssr/_0e8ern9._.js +1 -1
  177. package/web/.next/server/chunks/ssr/_0e8ern9._.js.map +1 -1
  178. package/web/.next/server/chunks/ssr/_0fswe4r._.js +3 -0
  179. package/web/.next/server/chunks/ssr/_0fswe4r._.js.map +1 -0
  180. package/web/.next/server/chunks/ssr/_0p3~u8u._.js +2 -2
  181. package/web/.next/server/chunks/ssr/_0p3~u8u._.js.map +1 -1
  182. package/web/.next/server/chunks/ssr/_0r.3n~3._.js +1 -1
  183. package/web/.next/server/chunks/ssr/_0r.3n~3._.js.map +1 -1
  184. package/web/.next/server/chunks/ssr/_0t59q8r._.js +1 -1
  185. package/web/.next/server/chunks/ssr/_0t59q8r._.js.map +1 -1
  186. package/web/.next/server/chunks/ssr/{_0z6p8yi._.js → _0u09c2.._.js} +2 -2
  187. package/web/.next/server/chunks/ssr/{_0z6p8yi._.js.map → _0u09c2.._.js.map} +1 -1
  188. package/web/.next/server/chunks/ssr/_0vm01xk._.js +3 -0
  189. package/web/.next/server/chunks/ssr/_0vm01xk._.js.map +1 -0
  190. package/web/.next/server/chunks/ssr/_0vyfc4b._.js +1 -1
  191. package/web/.next/server/chunks/ssr/_0vyfc4b._.js.map +1 -1
  192. package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
  193. package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
  194. package/web/.next/server/chunks/ssr/_0zk-h5w._.js +1 -1
  195. package/web/.next/server/chunks/ssr/_0zk-h5w._.js.map +1 -1
  196. package/web/.next/server/chunks/ssr/_0~7lwu_._.js +1 -1
  197. package/web/.next/server/chunks/ssr/_0~7lwu_._.js.map +1 -1
  198. package/web/.next/server/chunks/ssr/{_0xn_dfh._.js → _0~d-l61._.js} +2 -2
  199. package/web/.next/server/chunks/ssr/{_0xn_dfh._.js.map → _0~d-l61._.js.map} +1 -1
  200. package/web/.next/server/chunks/ssr/_1161g9x._.js +1 -1
  201. package/web/.next/server/chunks/ssr/_1161g9x._.js.map +1 -1
  202. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_mcp-servers_page_actions_0d.r4q..js +1 -1
  203. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_mcp-servers_page_actions_0d.r4q..js.map +1 -1
  204. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js +1 -1
  205. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js.map +1 -1
  206. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js +1 -1
  207. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js.map +1 -1
  208. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js +1 -1
  209. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js.map +1 -1
  210. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_0pjb_re._.js +1 -1
  211. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
  212. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
  213. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
  214. package/web/.next/server/middleware-build-manifest.js +3 -3
  215. package/web/.next/server/pages/500.html +1 -1
  216. package/web/.next/server/server-reference-manifest.js +1 -1
  217. package/web/.next/server/server-reference-manifest.json +57 -57
  218. package/web/.next/static/chunks/{0vscxcwhltksg.js → 050mn~oci41h6.js} +3 -3
  219. package/web/.next/static/chunks/06_a861w0tkp6.js +1 -0
  220. package/web/.next/static/chunks/{16nbcfv~__pas.js → 07kpqi8hle98h.js} +1 -1
  221. package/web/.next/static/chunks/{07c0dde.-8.3e.js → 08w-qt8wfe5u..js} +1 -1
  222. package/web/.next/static/chunks/{0sgbbtfp4hspl.js → 0gz0lgz7pvrb5.js} +1 -1
  223. package/web/.next/static/chunks/0h2nh2s2b3ma2.css +1 -0
  224. package/web/.next/static/chunks/{0kv2-9owuv51~.js → 0mekjif_lg0-r.js} +1 -1
  225. package/web/.next/static/chunks/{0cgfywkcky60_.js → 0pb77veci.7gd.js} +1 -1
  226. package/web/.next/static/chunks/{15zjq.s38l64~.js → 0t~1ohqb2m7ma.js} +1 -1
  227. package/web/.next/static/chunks/{0k3fxd~lsx6h_.js → 0ul697ie_gsw9.js} +1 -1
  228. package/web/.next/static/chunks/0whqmoyf3zd67.js +1 -0
  229. package/web/.next/static/chunks/{11rfk7fre_6t2.js → 0xee.1sl6c~24.js} +1 -1
  230. package/web/.next/static/chunks/{0242vp5_56bjp.js → 0~9hrc9~63dvr.js} +1 -1
  231. package/web/.next/static/chunks/10p0lo4adb2~5.js +1 -0
  232. package/web/.next/static/chunks/14ixmk5pm1-rc.js +8 -0
  233. package/web/.next/static/chunks/{084nyl7us-xbo.js → 159n33nvplqug.js} +1 -1
  234. package/web/.next/static/chunks/167z9~gq-q~oy.js +1 -0
  235. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b~nfa6._.js +0 -3
  236. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b~nfa6._.js.map +0 -1
  237. package/web/.next/server/chunks/ssr/_0ia4o6_._.js +0 -3
  238. package/web/.next/server/chunks/ssr/_0ia4o6_._.js.map +0 -1
  239. package/web/.next/server/chunks/ssr/_0o.xc6x._.js +0 -3
  240. package/web/.next/server/chunks/ssr/_0o.xc6x._.js.map +0 -1
  241. package/web/.next/static/chunks/00h433i5-1v_-.css +0 -1
  242. package/web/.next/static/chunks/0jl9-2_wjbofj.js +0 -1
  243. package/web/.next/static/chunks/0j~279np0vu13.js +0 -1
  244. package/web/.next/static/chunks/0r9cddoy0xkhk.js +0 -1
  245. package/web/.next/static/chunks/0xjj0-wsaziot.js +0 -1
  246. package/web/.next/static/chunks/123j391jw_zg4.js +0 -1
  247. /package/web/.next/static/{soqWMnDMQRLxRyIj13kVU → q4u94V1z_KGlqS1uxSgT2}/_buildManifest.js +0 -0
  248. /package/web/.next/static/{soqWMnDMQRLxRyIj13kVU → q4u94V1z_KGlqS1uxSgT2}/_clientMiddlewareManifest.js +0 -0
  249. /package/web/.next/static/{soqWMnDMQRLxRyIj13kVU → q4u94V1z_KGlqS1uxSgT2}/_ssgManifest.js +0 -0
@@ -0,0 +1,10 @@
1
+ module.exports=[6790,a=>{"use strict";var b=a.i(53083),c=a.i(11321);a.i(98617);var d=a.i(50040),e=a.i(90894),f=a.i(50950),g=a.i(63466),h=a.i(90920),i=a.i(58339);a.i(38702);var j=a.i(16223),k=a.i(84117);let l=(0,a.i(97624).default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var m=a.i(8685);let n={http:g.Server,sse:l,stdio:m.Terminal};function o({server:a,onSelect:c}){let{t:e}=(0,d.useTranslation)("web"),f=n[a.transport]??g.Server,h=a.mcp_info?.description??"";return(0,b.jsxs)(k.Card,{className:"cursor-pointer p-5 transition-all duration-300 hover:scale-[1.02] hover:shadow-md hover:ring-slate-300 dark:hover:ring-slate-600",role:"button",tabIndex:0,onClick:()=>c(a),onKeyDown:b=>{("Enter"===b.key||" "===b.key)&&(b.preventDefault(),c(a))},children:[(0,b.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(f,{className:"text-muted-foreground h-4 w-4 shrink-0"}),(0,b.jsx)("h3",{className:"text-sm font-semibold",children:a.name})]}),(0,b.jsx)(i.Badge,{variant:"outline",className:"shrink-0 text-xs",children:e(`mcpServers.transport.${a.transport}`,a.transport.toUpperCase())})]}),h?(0,b.jsx)("p",{className:"text-muted-foreground mt-2 line-clamp-2 text-xs",children:h}):null,(0,b.jsx)("div",{className:"mt-3 flex items-center gap-2",children:a.auth_type&&"none"!==a.auth_type?(0,b.jsx)(i.Badge,{variant:"secondary",className:"text-xs",children:e(`mcpServers.authType.${a.auth_type}`,a.auth_type)}):null})]})}a.i(78454);var p=a.i(24255),q=a.i(2824),r=a.i(13126),s=a.i(18948),t=a.i(67664);function u({tools:a,serverName:e}){let{t:f}=(0,d.useTranslation)("web"),g=(0,c.useMemo)(()=>{let b;return b=`${e}-`,a.map(a=>({displayName:a.name.startsWith(b)?a.name.slice(b.length):a.name,description:a.description,key:a.name})).sort((a,b)=>a.displayName.localeCompare(b.displayName))},[a,e]);return 0===a.length?(0,b.jsx)("p",{className:"text-muted-foreground text-sm",children:f("mcpServers.tools.noTools")}):(0,b.jsx)("div",{className:"space-y-2",children:g.map(a=>(0,b.jsxs)("div",{className:"rounded-md border p-2",children:[(0,b.jsx)("div",{className:"flex items-center gap-2",children:(0,b.jsx)(i.Badge,{variant:"outline",className:"font-mono text-xs",children:a.displayName})}),a.description?(0,b.jsx)("p",{className:"text-muted-foreground mt-1 text-xs",children:a.description}):null]},a.key))})}var v=a.i(60197),w=a.i(34948);let x=[{id:"claude-code",label:"Claude Code"},{id:"cursor",label:"Cursor"},{id:"vscode",label:"VS Code"},{id:"gemini",label:"Gemini CLI"},{id:"codex",label:"Codex CLI"},{id:"curl",label:"cURL"}];function y({proxyBaseUrl:a,serverName:e}){let{t:f}=(0,d.useTranslation)("web"),[g,h]=(0,c.useState)("claude-code"),[i,j]=(0,c.useState)(!1),k=function(a,b,c){let d=`${b.replace(/\/$/,"")}/${c}/mcp`;switch(a){case"claude-code":return`claude mcp add --transport http ${c} \\
2
+ ${d} \\
3
+ --header "x-litellm-api-key: Bearer <LITELLM_API_KEY>"`;case"cursor":return JSON.stringify({mcpServers:{[c]:{url:d,headers:{"x-litellm-api-key":"Bearer <LITELLM_API_KEY>"}}}},null,2);case"vscode":return JSON.stringify({mcp:{servers:{[c]:{type:"http",url:d,headers:{"x-litellm-api-key":"Bearer <LITELLM_API_KEY>"}}}}},null,2);case"gemini":return JSON.stringify({mcpServers:{[c]:{httpUrl:d,headers:{"x-litellm-api-key":"Bearer <LITELLM_API_KEY>"}}}},null,2);case"codex":return`[mcp_servers.${c}]
4
+ url = "${d}"
5
+ headers = { "x-litellm-api-key" = "Bearer <LITELLM_API_KEY>" }`;case"curl":return`curl --location '${d}' \\
6
+ --header 'Content-Type: application/json' \\
7
+ --header 'x-litellm-api-key: Bearer <LITELLM_API_KEY>' \\
8
+ --data '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'`}}(g,a,e),l=async()=>{try{await navigator.clipboard.writeText(k),j(!0),setTimeout(()=>j(!1),2e3)}catch{}};return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("div",{className:"flex flex-wrap gap-1",role:"tablist",children:x.map(a=>(0,b.jsx)("button",{type:"button",role:"tab","aria-selected":g===a.id,onClick:()=>h(a.id),className:g===a.id?"bg-primary text-primary-foreground rounded-md px-2.5 py-1 text-xs font-medium":"border-border hover:bg-muted rounded-md border px-2.5 py-1 text-xs",children:a.label},a.id))}),(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)("pre",{className:"bg-muted max-h-64 overflow-auto rounded-md p-3 pr-10 font-mono text-[11px] leading-relaxed",children:(0,b.jsx)("code",{children:k})}),(0,b.jsx)(s.Button,{type:"button",variant:"ghost",size:"icon",className:"absolute top-1 right-1 h-7 w-7",onClick:l,"aria-label":f("mcpServers.connect.copy"),children:i?(0,b.jsx)(v.Check,{className:"text-primary h-3.5 w-3.5"}):(0,b.jsx)(w.Copy,{className:"h-3.5 w-3.5"})})]}),(0,b.jsx)("p",{className:"text-muted-foreground text-xs",children:f("mcpServers.connect.replaceKey")})]})}var z=a.i(6120);let A=(0,z.createServerReference)("40a6d30a870afac1c6055ea758f86bfe4d9e2b7415",z.callServer,void 0,z.findSourceMapURL,"fetchMcpServerToolsAction");function B({server:a,proxyBaseUrl:e,open:f,onClose:g}){let{t:h}=(0,d.useTranslation)("web"),[j,k]=(0,c.useState)([]),[l,m]=(0,c.useState)(!1),[n,o]=(0,c.useState)(null),[v,w]=(0,c.useState)(null),x=(0,c.useCallback)(async a=>{m(!0),o(null);try{let b=await A(a);k(b.tools),b.error&&o(b.error),w(a)}catch{o("Failed to load tools")}finally{m(!1)}},[]);(0,c.useEffect)(()=>{f&&a&&v!==a.server_name&&x(a.server_name)},[f,a,v,x]);let z=(0,c.useCallback)(()=>{a&&(w(null),x(a.server_name))},[a,x]);if(!a)return null;let C=a.mcp_info?.description??"";return(0,b.jsxs)(p.BaseDrawer,{open:f,onClose:g,children:[(0,b.jsx)(q.DrawerTitle,{children:a.name}),C?(0,b.jsx)(q.DrawerDescription,{children:C}):null,(0,b.jsx)(r.Separator,{className:"my-4"}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:h("mcpServers.detail.serverName")}),(0,b.jsx)("span",{className:"font-mono text-xs",children:a.server_name})]}),!function(a){if(!a)return!1;try{let b=new URL(a);return"http:"===b.protocol||"https:"===b.protocol}catch{return!1}}(a.url)?null:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:h("mcpServers.detail.url")}),(0,b.jsx)("span",{className:"max-w-[200px] truncate font-mono text-xs",children:a.url})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:h("mcpServers.detail.transport")}),(0,b.jsx)(i.Badge,{variant:"outline",className:"text-xs",children:h(`mcpServers.transport.${a.transport}`,a.transport.toUpperCase())})]}),a.auth_type&&"none"!==a.auth_type?(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:h("mcpServers.detail.authType")}),(0,b.jsx)(i.Badge,{variant:"secondary",className:"text-xs",children:h(`mcpServers.authType.${a.auth_type}`,a.auth_type)})]}):null]}),(0,b.jsx)(r.Separator,{className:"my-4"}),(0,b.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,b.jsx)("h3",{className:"text-sm font-semibold",children:h("mcpServers.tools.title")}),(0,b.jsx)(s.Button,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:z,disabled:l,"aria-label":h("mcpServers.tools.refresh"),"data-testid":"mcp-tools-refresh",children:(0,b.jsx)(t.RefreshCw,{className:`h-3.5 w-3.5 ${l?"animate-spin":""}`})})]}),l?(0,b.jsxs)("p",{className:"text-muted-foreground text-sm",children:[h("accessibility.loading"),"..."]}):n?(0,b.jsx)("p",{className:"text-destructive text-sm",children:n}):(0,b.jsx)(u,{tools:j,serverName:a.server_name}),(0,b.jsx)(r.Separator,{className:"my-4"}),(0,b.jsx)("h3",{className:"mb-3 text-sm font-semibold",children:h("mcpServers.connect.title")}),(0,b.jsx)(y,{proxyBaseUrl:e,serverName:a.server_name})]})}let C=(0,z.createServerReference)("0022bd456ef0028b04cd1d4afbfde320e4cadf4420",z.callServer,void 0,z.findSourceMapURL,"fetchMcpServersAction"),D=["all","http","sse","stdio"];a.s(["McpServersPageClient",0,function({proxyConfigured:a,proxyBaseUrl:k}){let{t:l}=(0,d.useTranslation)("web"),[m,n]=(0,c.useState)(""),[p,q]=(0,c.useState)("all"),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)([]),[v,w]=(0,c.useState)(!0),[x,y]=(0,c.useState)(null);(0,c.useEffect)(()=>{a?C().then(a=>{u(a.servers),a.error&&y(a.error)}).catch(()=>{y(l("mcpServers.fetchError"))}).finally(()=>{w(!1)}):w(!1)},[a,l]);let z=(0,c.useMemo)(()=>t.filter(a=>{let b=m.toLowerCase(),c=!b||a.name.toLowerCase().includes(b)||(a.mcp_info?.description??"").toLowerCase().includes(b),d="all"===p||a.transport===p;return c&&d}),[t,m,p]);return a?v?(0,b.jsx)("div",{className:"flex h-full items-center justify-center p-8",children:(0,b.jsxs)("p",{className:"text-muted-foreground",children:[l("accessibility.loading"),"..."]})}):(0,b.jsxs)("div",{className:"space-y-6 p-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("h1",{className:"text-2xl font-bold",children:l("mcpServers.title")}),x?(0,b.jsx)("div",{className:"border-destructive/50 bg-destructive/10 mt-2 rounded-md border p-3",children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(e.AlertCircle,{className:"text-destructive h-4 w-4"}),(0,b.jsx)("p",{className:"text-destructive text-sm",children:x})]})}):null,(0,b.jsx)("p",{className:"text-muted-foreground mt-1 text-sm",children:l("mcpServers.subtitle")})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,b.jsx)(h.Input,{placeholder:l("mcpServers.searchPlaceholder"),value:m,onChange:a=>n(a.target.value),className:"max-w-xs"}),(0,b.jsx)("div",{className:"flex gap-1",children:D.map(a=>(0,b.jsx)(i.Badge,{variant:p===a?"default":"outline",className:"cursor-pointer",onClick:()=>q(a),children:"all"===a?l("mcpServers.filter.all"):l(`mcpServers.transport.${a}`,a.toUpperCase())},a))})]}),0===z.length?(0,b.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,b.jsx)(j.EmptyState,{icon:0===t.length?(0,b.jsx)(g.Server,{className:"h-8 w-8"}):(0,b.jsx)(f.Search,{className:"h-8 w-8"}),title:0===t.length?l("mcpServers.noServers"):l("mcpServers.noResults")})}):(0,b.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:z.map(a=>(0,b.jsx)(o,{server:a,onSelect:s},a.server_id))}),(0,b.jsx)(B,{server:r,proxyBaseUrl:k,open:!!r,onClose:()=>s(null)})]}):(0,b.jsx)("div",{className:"flex h-full items-center justify-center p-8",children:(0,b.jsx)(j.EmptyState,{icon:(0,b.jsx)(e.AlertCircle,{className:"h-8 w-8"}),title:l("mcpServers.noProxy")})})}],6790)}];
9
+
10
+ //# sourceMappingURL=0j.8_web_components_features_mcp-servers_mcp-servers-page-client_tsx_0dda8ih._.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.tsx","../../../../../../../src/presentation/web/components/features/mcp-servers/mcp-server-card.tsx","../../../../../../../src/presentation/web/components/features/mcp-servers/mcp-tool-list.tsx","../../../../../../../src/presentation/web/components/features/mcp-servers/mcp-connect-instructions.tsx","../../../../../../../src/presentation/web/app/actions/data%3Aaf2fe2%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.tsx","../../../../../../../src/presentation/web/app/actions/data%3A597571%20%3Ctext/javascript%3E","../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/wifi.ts"],"sourcesContent":["'use client';\n\nimport { useState, useEffect, useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { AlertCircle, Search, Server } from 'lucide-react';\nimport { Input } from '@/components/ui/input';\nimport { Badge } from '@/components/ui/badge';\nimport { EmptyState } from '@/components/common/empty-state';\nimport { McpServerCard } from './mcp-server-card';\nimport { McpServerDetailDrawer } from './mcp-server-detail-drawer';\nimport { fetchMcpServersAction } from '@/app/actions/fetch-mcp-servers';\nimport type { McpServerInfo } from '@shipit-ai/core/application/ports/output/services/mcp-server-browser.interface';\n\ninterface McpServersPageClientProps {\n proxyConfigured: boolean;\n proxyBaseUrl: string;\n}\n\nconst TRANSPORT_FILTERS = ['all', 'http', 'sse', 'stdio'] as const;\n\nexport function McpServersPageClient({ proxyConfigured, proxyBaseUrl }: McpServersPageClientProps) {\n const { t } = useTranslation('web');\n const [searchQuery, setSearchQuery] = useState('');\n const [transportFilter, setTransportFilter] = useState<string>('all');\n const [selectedServer, setSelectedServer] = useState<McpServerInfo | null>(null);\n const [servers, setServers] = useState<McpServerInfo[]>([]);\n const [loading, setLoading] = useState(true);\n const [error, setError] = useState<string | null>(null);\n\n useEffect(() => {\n if (!proxyConfigured) {\n setLoading(false);\n return;\n }\n fetchMcpServersAction()\n .then((result) => {\n setServers(result.servers);\n if (result.error) setError(result.error);\n })\n .catch(() => {\n setError(t('mcpServers.fetchError'));\n })\n .finally(() => {\n setLoading(false);\n });\n }, [proxyConfigured, t]);\n\n const filtered = useMemo(() => {\n return servers.filter((server) => {\n const query = searchQuery.toLowerCase();\n const matchesQuery =\n !query ||\n server.name.toLowerCase().includes(query) ||\n (server.mcp_info?.description ?? '').toLowerCase().includes(query);\n\n const matchesTransport = transportFilter === 'all' || server.transport === transportFilter;\n\n return matchesQuery && matchesTransport;\n });\n }, [servers, searchQuery, transportFilter]);\n\n if (!proxyConfigured) {\n return (\n <div className=\"flex h-full items-center justify-center p-8\">\n <EmptyState icon={<AlertCircle className=\"h-8 w-8\" />} title={t('mcpServers.noProxy')} />\n </div>\n );\n }\n\n if (loading) {\n return (\n <div className=\"flex h-full items-center justify-center p-8\">\n <p className=\"text-muted-foreground\">{t('accessibility.loading')}...</p>\n </div>\n );\n }\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-bold\">{t('mcpServers.title')}</h1>\n {error ? (\n <div className=\"border-destructive/50 bg-destructive/10 mt-2 rounded-md border p-3\">\n <div className=\"flex items-center gap-2\">\n <AlertCircle className=\"text-destructive h-4 w-4\" />\n <p className=\"text-destructive text-sm\">{error}</p>\n </div>\n </div>\n ) : null}\n <p className=\"text-muted-foreground mt-1 text-sm\">{t('mcpServers.subtitle')}</p>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-3\">\n <Input\n placeholder={t('mcpServers.searchPlaceholder')}\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"max-w-xs\"\n />\n <div className=\"flex gap-1\">\n {TRANSPORT_FILTERS.map((filter) => (\n <Badge\n key={filter}\n variant={transportFilter === filter ? 'default' : 'outline'}\n className=\"cursor-pointer\"\n onClick={() => setTransportFilter(filter)}\n >\n {filter === 'all'\n ? t('mcpServers.filter.all')\n : t(`mcpServers.transport.${filter}`, filter.toUpperCase())}\n </Badge>\n ))}\n </div>\n </div>\n\n {filtered.length === 0 ? (\n <div className=\"flex items-center justify-center py-16\">\n <EmptyState\n icon={\n servers.length === 0 ? <Server className=\"h-8 w-8\" /> : <Search className=\"h-8 w-8\" />\n }\n title={servers.length === 0 ? t('mcpServers.noServers') : t('mcpServers.noResults')}\n />\n </div>\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {filtered.map((server) => (\n <McpServerCard key={server.server_id} server={server} onSelect={setSelectedServer} />\n ))}\n </div>\n )}\n\n <McpServerDetailDrawer\n server={selectedServer}\n proxyBaseUrl={proxyBaseUrl}\n open={!!selectedServer}\n onClose={() => setSelectedServer(null)}\n />\n </div>\n );\n}\n","'use client';\n\nimport { useTranslation } from 'react-i18next';\nimport { Card } from '@/components/ui/card';\nimport { Badge } from '@/components/ui/badge';\nimport { Server, Wifi, Terminal } from 'lucide-react';\nimport type { McpServerInfo } from '@shipit-ai/core/application/ports/output/services/mcp-server-browser.interface';\n\ninterface McpServerCardProps {\n server: McpServerInfo;\n onSelect: (server: McpServerInfo) => void;\n}\n\nconst TRANSPORT_ICONS: Record<string, typeof Server> = {\n http: Server,\n sse: Wifi,\n stdio: Terminal,\n};\n\nexport function McpServerCard({ server, onSelect }: McpServerCardProps) {\n const { t } = useTranslation('web');\n const TransportIcon = TRANSPORT_ICONS[server.transport] ?? Server;\n const description = server.mcp_info?.description ?? '';\n\n return (\n <Card\n className=\"cursor-pointer p-5 transition-all duration-300 hover:scale-[1.02] hover:shadow-md hover:ring-slate-300 dark:hover:ring-slate-600\"\n role=\"button\"\n tabIndex={0}\n onClick={() => onSelect(server)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onSelect(server);\n }\n }}\n >\n <div className=\"flex items-start justify-between gap-2\">\n <div className=\"flex items-center gap-2\">\n <TransportIcon className=\"text-muted-foreground h-4 w-4 shrink-0\" />\n <h3 className=\"text-sm font-semibold\">{server.name}</h3>\n </div>\n <Badge variant=\"outline\" className=\"shrink-0 text-xs\">\n {t(`mcpServers.transport.${server.transport}`, server.transport.toUpperCase())}\n </Badge>\n </div>\n\n {description ? (\n <p className=\"text-muted-foreground mt-2 line-clamp-2 text-xs\">{description}</p>\n ) : null}\n\n <div className=\"mt-3 flex items-center gap-2\">\n {server.auth_type && server.auth_type !== 'none' ? (\n <Badge variant=\"secondary\" className=\"text-xs\">\n {t(`mcpServers.authType.${server.auth_type}`, server.auth_type)}\n </Badge>\n ) : null}\n </div>\n </Card>\n );\n}\n","'use client';\n\nimport { useMemo } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Badge } from '@/components/ui/badge';\nimport type { McpToolInfo } from '@shipit-ai/core/application/ports/output/services/mcp-server-browser.interface';\n\ninterface McpToolListProps {\n tools: McpToolInfo[];\n /**\n * The server name that these tools belong to. Used to strip the\n * `{serverName}-` prefix from tool names for nicer display.\n */\n serverName: string;\n}\n\ninterface DisplayTool {\n displayName: string;\n description?: string;\n key: string;\n}\n\n/**\n * Normalize tools by stripping the `{serverName}-` prefix if present.\n *\n * LiteLLM sometimes prefixes tool names with the server alias (e.g.,\n * `github_mcp-list_issues`). When we're displaying tools for a single\n * known server, the prefix is redundant — strip it for cleaner UI.\n *\n * Exported for unit testing.\n */\nexport function stripServerPrefix(tools: McpToolInfo[], serverName: string): DisplayTool[] {\n const prefix = `${serverName}-`;\n return tools\n .map((tool) => {\n const displayName = tool.name.startsWith(prefix) ? tool.name.slice(prefix.length) : tool.name;\n return {\n displayName,\n description: tool.description,\n key: tool.name,\n };\n })\n .sort((a, b) => a.displayName.localeCompare(b.displayName));\n}\n\nexport function McpToolList({ tools, serverName }: McpToolListProps) {\n const { t } = useTranslation('web');\n const displayTools = useMemo(() => stripServerPrefix(tools, serverName), [tools, serverName]);\n\n if (tools.length === 0) {\n return <p className=\"text-muted-foreground text-sm\">{t('mcpServers.tools.noTools')}</p>;\n }\n\n return (\n <div className=\"space-y-2\">\n {displayTools.map((tool) => (\n <div key={tool.key} className=\"rounded-md border p-2\">\n <div className=\"flex items-center gap-2\">\n <Badge variant=\"outline\" className=\"font-mono text-xs\">\n {tool.displayName}\n </Badge>\n </div>\n {tool.description ? (\n <p className=\"text-muted-foreground mt-1 text-xs\">{tool.description}</p>\n ) : null}\n </div>\n ))}\n </div>\n );\n}\n","'use client';\n\nimport { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Button } from '@/components/ui/button';\nimport { Check, Copy } from 'lucide-react';\n\ninterface McpConnectInstructionsProps {\n proxyBaseUrl: string;\n serverName: string;\n}\n\ntype ClientId = 'claude-code' | 'cursor' | 'vscode' | 'gemini' | 'codex' | 'curl';\n\ninterface ClientOption {\n id: ClientId;\n label: string;\n}\n\nconst CLIENTS: ClientOption[] = [\n { id: 'claude-code', label: 'Claude Code' },\n { id: 'cursor', label: 'Cursor' },\n { id: 'vscode', label: 'VS Code' },\n { id: 'gemini', label: 'Gemini CLI' },\n { id: 'codex', label: 'Codex CLI' },\n { id: 'curl', label: 'cURL' },\n];\n\n/**\n * Generate copy-pasteable connection snippets for various MCP clients.\n *\n * The LiteLLM proxy exposes each MCP server at {proxyBaseUrl}/{serverName}/mcp\n * and authenticates via the `x-litellm-api-key: Bearer <key>` header.\n *\n * All snippets use `<LITELLM_API_KEY>` as a placeholder that the user must\n * replace with their actual virtual key — we never inline a real key into\n * copyable instructions.\n */\nexport function buildSnippet(clientId: ClientId, proxyBaseUrl: string, serverName: string): string {\n const endpoint = `${proxyBaseUrl.replace(/\\/$/, '')}/${serverName}/mcp`;\n\n switch (clientId) {\n case 'claude-code':\n // Claude Code supports `claude mcp add` command\n return [\n `claude mcp add --transport http ${serverName} \\\\`,\n ` ${endpoint} \\\\`,\n ` --header \"x-litellm-api-key: Bearer <LITELLM_API_KEY>\"`,\n ].join('\\n');\n\n case 'cursor':\n // Cursor: ~/.cursor/mcp.json\n return JSON.stringify(\n {\n mcpServers: {\n [serverName]: {\n url: endpoint,\n headers: {\n 'x-litellm-api-key': 'Bearer <LITELLM_API_KEY>',\n },\n },\n },\n },\n null,\n 2\n );\n\n case 'vscode':\n // VS Code / Copilot: settings.json under \"mcp\"\n return JSON.stringify(\n {\n mcp: {\n servers: {\n [serverName]: {\n type: 'http',\n url: endpoint,\n headers: {\n 'x-litellm-api-key': 'Bearer <LITELLM_API_KEY>',\n },\n },\n },\n },\n },\n null,\n 2\n );\n\n case 'gemini':\n // Gemini CLI: ~/.gemini/settings.json or project .gemini/settings.json\n return JSON.stringify(\n {\n mcpServers: {\n [serverName]: {\n httpUrl: endpoint,\n headers: {\n 'x-litellm-api-key': 'Bearer <LITELLM_API_KEY>',\n },\n },\n },\n },\n null,\n 2\n );\n\n case 'codex':\n // Codex CLI: ~/.codex/config.toml\n return [\n `[mcp_servers.${serverName}]`,\n `url = \"${endpoint}\"`,\n `headers = { \"x-litellm-api-key\" = \"Bearer <LITELLM_API_KEY>\" }`,\n ].join('\\n');\n\n case 'curl':\n return [\n `curl --location '${endpoint}' \\\\`,\n ` --header 'Content-Type: application/json' \\\\`,\n ` --header 'x-litellm-api-key: Bearer <LITELLM_API_KEY>' \\\\`,\n ` --data '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}'`,\n ].join('\\n');\n }\n}\n\nexport function McpConnectInstructions({ proxyBaseUrl, serverName }: McpConnectInstructionsProps) {\n const { t } = useTranslation('web');\n const [activeClient, setActiveClient] = useState<ClientId>('claude-code');\n const [copied, setCopied] = useState(false);\n\n const snippet = buildSnippet(activeClient, proxyBaseUrl, serverName);\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(snippet);\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n } catch {\n // Clipboard not available (e.g., insecure context) — silently ignore.\n }\n };\n\n return (\n <div className=\"space-y-3\">\n <div className=\"flex flex-wrap gap-1\" role=\"tablist\">\n {CLIENTS.map((client) => (\n <button\n key={client.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={activeClient === client.id}\n onClick={() => setActiveClient(client.id)}\n className={\n activeClient === client.id\n ? 'bg-primary text-primary-foreground rounded-md px-2.5 py-1 text-xs font-medium'\n : 'border-border hover:bg-muted rounded-md border px-2.5 py-1 text-xs'\n }\n >\n {client.label}\n </button>\n ))}\n </div>\n\n <div className=\"relative\">\n <pre className=\"bg-muted max-h-64 overflow-auto rounded-md p-3 pr-10 font-mono text-[11px] leading-relaxed\">\n <code>{snippet}</code>\n </pre>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n className=\"absolute top-1 right-1 h-7 w-7\"\n onClick={handleCopy}\n aria-label={t('mcpServers.connect.copy')}\n >\n {copied ? (\n <Check className=\"text-primary h-3.5 w-3.5\" />\n ) : (\n <Copy className=\"h-3.5 w-3.5\" />\n )}\n </Button>\n </div>\n\n <p className=\"text-muted-foreground text-xs\">{t('mcpServers.connect.replaceKey')}</p>\n </div>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"40a6d30a870afac1c6055ea758f86bfe4d9e2b7415\":{\"name\":\"fetchMcpServerToolsAction\"}},\"src/presentation/web/app/actions/fetch-mcp-server-tools.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"40a6d30a870afac1c6055ea758f86bfe4d9e2b7415\",callServer,void 0,findSourceMapURL,\"fetchMcpServerToolsAction\");export{$$RSC_SERVER_ACTION_0 as fetchMcpServerToolsAction};","'use client';\n\nimport { useEffect, useState, useCallback } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { BaseDrawer } from '@/components/common/base-drawer';\nimport { DrawerTitle, DrawerDescription } from '@/components/ui/drawer';\nimport { Separator } from '@/components/ui/separator';\nimport { Badge } from '@/components/ui/badge';\nimport { Button } from '@/components/ui/button';\nimport { RefreshCw } from 'lucide-react';\nimport { McpToolList } from './mcp-tool-list';\nimport { McpConnectInstructions } from './mcp-connect-instructions';\nimport { fetchMcpServerToolsAction } from '@/app/actions/fetch-mcp-server-tools';\nimport type {\n McpServerInfo,\n McpToolInfo,\n} from '@shipit-ai/core/application/ports/output/services/mcp-server-browser.interface';\n\ninterface McpServerDetailDrawerProps {\n server: McpServerInfo | null;\n proxyBaseUrl: string;\n open: boolean;\n onClose: () => void;\n}\n\nfunction isValidDisplayUrl(url?: string): boolean {\n if (!url) return false;\n try {\n const parsed = new URL(url);\n return parsed.protocol === 'http:' || parsed.protocol === 'https:';\n } catch {\n return false;\n }\n}\n\nexport function McpServerDetailDrawer({\n server,\n proxyBaseUrl,\n open,\n onClose,\n}: McpServerDetailDrawerProps) {\n const { t } = useTranslation('web');\n const [tools, setTools] = useState<McpToolInfo[]>([]);\n const [loadingTools, setLoadingTools] = useState(false);\n const [toolError, setToolError] = useState<string | null>(null);\n const [loadedServerName, setLoadedServerName] = useState<string | null>(null);\n\n const loadTools = useCallback(async (serverName: string) => {\n setLoadingTools(true);\n setToolError(null);\n try {\n const result = await fetchMcpServerToolsAction(serverName);\n setTools(result.tools);\n if (result.error) setToolError(result.error);\n setLoadedServerName(serverName);\n } catch {\n setToolError('Failed to load tools');\n } finally {\n setLoadingTools(false);\n }\n }, []);\n\n useEffect(() => {\n if (!open || !server) return;\n // Re-fetch whenever the drawer opens for a different server.\n if (loadedServerName === server.server_name) return;\n loadTools(server.server_name);\n }, [open, server, loadedServerName, loadTools]);\n\n const handleRefresh = useCallback(() => {\n if (!server) return;\n // Clear the cached server name to force a re-fetch on the next render\n // and call loadTools directly for immediate feedback.\n setLoadedServerName(null);\n loadTools(server.server_name);\n }, [server, loadTools]);\n\n if (!server) return null;\n\n const description = server.mcp_info?.description ?? '';\n\n return (\n <BaseDrawer open={open} onClose={onClose}>\n <DrawerTitle>{server.name}</DrawerTitle>\n {description ? <DrawerDescription>{description}</DrawerDescription> : null}\n\n <Separator className=\"my-4\" />\n\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-muted-foreground text-xs\">{t('mcpServers.detail.serverName')}</span>\n <span className=\"font-mono text-xs\">{server.server_name}</span>\n </div>\n\n {isValidDisplayUrl(server.url) ? (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-muted-foreground text-xs\">{t('mcpServers.detail.url')}</span>\n <span className=\"max-w-[200px] truncate font-mono text-xs\">{server.url}</span>\n </div>\n ) : null}\n\n <div className=\"flex items-center justify-between\">\n <span className=\"text-muted-foreground text-xs\">{t('mcpServers.detail.transport')}</span>\n <Badge variant=\"outline\" className=\"text-xs\">\n {t(`mcpServers.transport.${server.transport}`, server.transport.toUpperCase())}\n </Badge>\n </div>\n\n {server.auth_type && server.auth_type !== 'none' ? (\n <div className=\"flex items-center justify-between\">\n <span className=\"text-muted-foreground text-xs\">{t('mcpServers.detail.authType')}</span>\n <Badge variant=\"secondary\" className=\"text-xs\">\n {t(`mcpServers.authType.${server.auth_type}`, server.auth_type)}\n </Badge>\n </div>\n ) : null}\n </div>\n\n <Separator className=\"my-4\" />\n\n <div className=\"mb-3 flex items-center justify-between\">\n <h3 className=\"text-sm font-semibold\">{t('mcpServers.tools.title')}</h3>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n className=\"h-7 w-7\"\n onClick={handleRefresh}\n disabled={loadingTools}\n aria-label={t('mcpServers.tools.refresh')}\n data-testid=\"mcp-tools-refresh\"\n >\n <RefreshCw className={`h-3.5 w-3.5 ${loadingTools ? 'animate-spin' : ''}`} />\n </Button>\n </div>\n {loadingTools ? (\n <p className=\"text-muted-foreground text-sm\">{t('accessibility.loading')}...</p>\n ) : toolError ? (\n <p className=\"text-destructive text-sm\">{toolError}</p>\n ) : (\n <McpToolList tools={tools} serverName={server.server_name} />\n )}\n\n <Separator className=\"my-4\" />\n\n <h3 className=\"mb-3 text-sm font-semibold\">{t('mcpServers.connect.title')}</h3>\n <McpConnectInstructions proxyBaseUrl={proxyBaseUrl} serverName={server.server_name} />\n </BaseDrawer>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"0022bd456ef0028b04cd1d4afbfde320e4cadf4420\":{\"name\":\"fetchMcpServersAction\"}},\"src/presentation/web/app/actions/fetch-mcp-servers.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"0022bd456ef0028b04cd1d4afbfde320e4cadf4420\",callServer,void 0,findSourceMapURL,\"fetchMcpServersAction\");export{$$RSC_SERVER_ACTION_0 as fetchMcpServersAction};","import createLucideIcon from '../createLucideIcon';\nimport { IconNode } from '../types';\n\nexport const __iconNode: IconNode = [\n ['path', { d: 'M12 20h.01', key: 'zekei9' }],\n ['path', { d: 'M2 8.82a15 15 0 0 1 20 0', key: 'dnpr2z' }],\n ['path', { d: 'M5 12.859a10 10 0 0 1 14 0', key: '1x1e6c' }],\n ['path', { d: 'M8.5 16.429a5 5 0 0 1 7 0', key: '1bycff' }],\n];\n\n/**\n * @component @name Wifi\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMjBoLjAxIiAvPgogIDxwYXRoIGQ9Ik0yIDguODJhMTUgMTUgMCAwIDEgMjAgMCIgLz4KICA8cGF0aCBkPSJNNSAxMi44NTlhMTAgMTAgMCAwIDEgMTQgMCIgLz4KICA8cGF0aCBkPSJNOC41IDE2LjQyOWE1IDUgMCAwIDEgNyAwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/wifi\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Wifi = createLucideIcon('wifi', __iconNode);\n\nexport default Wifi;\n"],"names":["d"],"mappings":"uDAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,OAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAA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AAC,GACb,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAqC,OAAQ,EAAQ,SAAU,GAA5C,EAAO,SAAS,KAK1C,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CACC,OAAQ,EACR,aAAc,EACd,KAAM,CAAC,CAAC,EACR,QAAS,IAAM,EAAkB,WAzEnC,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,uDACb,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,UAAU,CAAA,CAAC,KAAM,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,WAAW,CAAA,CAAC,UAAU,YAAc,MAAO,EAAE,yBA4ExE","ignoreList":[7]}
@@ -1,3 +1,3 @@
1
- module.exports=[79020,a=>{"use strict";var b=a.i(53083),c=a.i(11321),d=a.i(87638),e=a.i(8685),f=a.i(37545),g=a.i(51423),h=a.i(97624);let i=(0,h.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"}]]),j=(0,h.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"}]]),k=(0,h.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 l=a.i(69210),m=a.i(73952);let n=(0,h.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"}]]),o=(0,h.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 p=a.i(63466);a.i(98617);var q=a.i(50040),r=a.i(85536),s=a.i(61781),t=a.i(49853),t=t,u=a.i(29370),v=a.i(2),w=a.i(77612),x=a.i(58860),y=a.i(96867),z=a.i(82934);function A({label:a,description:c,htmlFor:d,tooltip:e,children:f}){let g=e??c;return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(x.Label,{htmlFor:d,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:a}),g?(0,b.jsxs)(z.Tooltip,{children:[(0,b.jsx)(z.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,b.jsx)(z.TooltipContent,{side:"top",className:"max-w-64 text-[11px] leading-relaxed",children:(0,b.jsx)("span",{className:"text-muted-foreground",children:g})})]}):null]}),c?(0,b.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:c}):null]}),(0,b.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:f})]})}function B({label:a,description:c,id:d,testId:e,checked:f,onChange:g,disabled:h,tooltip:i}){return(0,b.jsx)(A,{label:a,description:c,htmlFor:d,tooltip:i,children:(0,b.jsx)(y.Switch,{id:d,"data-testid":e,checked:f,onCheckedChange:g,disabled:h,className:(0,r.cn)("cursor-pointer",h&&"cursor-not-allowed opacity-50")})})}function C({icon:a,title:c,description:d,badge:e,testId:f,tooltip:g,tooltipLinks:h,children:i}){return(0,b.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":f,children:[(0,b.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(a,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,b.jsx)("h2",{className:"text-sm font-semibold",children:c}),g?(0,b.jsxs)(z.Tooltip,{children:[(0,b.jsx)(z.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,b.jsxs)(z.TooltipContent,{side:"bottom",className:"max-w-72 text-[11px] leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:g}),null!=h&&h.length>0?(0,b.jsx)("div",{className:"border-border/50 mt-1.5 flex flex-col gap-0.5 border-t pt-1.5",children:h.map(a=>(0,b.jsxs)("a",{href:a.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,b.jsx)(v.ExternalLink,{className:"h-2.5 w-2.5 shrink-0 opacity-50"}),a.label]},a.href))}):null]})]}):null,e?(0,b.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:e}):null]}),(0,b.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:d})]}),(0,b.jsx)("div",{className:"px-4",children:i})]})}function D({id:a,testId:c,value:d,onChange:e,onBlur:f,placeholder:g,min:h=1,max:i,step:j=1,suffix:k}){let{t:l}=(0,q.useTranslation)("web"),m=""===d?void 0:parseInt(d,10);return(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,b.jsx)("button",{type:"button",onClick:()=>{e(String(Math.max(h,(m??parseInt(g,10))-j)))},onMouseUp:f,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":l("common.decrease"),children:(0,b.jsx)(t.default,{className:"h-3 w-3"})}),(0,b.jsx)("input",{id:a,"data-testid":c,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:d,placeholder:g,onChange:a=>{e(a.target.value.replace(/[^0-9]/g,""))},onBlur:f,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,b.jsx)("button",{type:"button",onClick:()=>{let a;a=m??parseInt(g,10),e(String(null!=i?Math.min(i,a+j):a+j))},onMouseUp:f,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":l("common.increase"),children:(0,b.jsx)(u.Plus,{className:"h-3 w-3"})})]}),k?(0,b.jsx)("span",{className:"text-muted-foreground text-[11px]",children:k}):null]})}function E({children:a}){return(0,b.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,b.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:a})})}function F({settings:a}){let{t:e}=(0,q.useTranslation)("web"),[f,g]=(0,c.useState)(a.agent.type);return(0,b.jsx)(C,{icon:d.Bot,title:e("settings.agent.sectionTitle"),description:e("settings.agent.sectionDescription"),testId:"agent-settings-section",tooltip:e("settings.agent.hint"),tooltipLinks:[{label:e("settings.agent.links.agentSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/agent-system.md"},{label:e("settings.agent.links.addingAgents"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/adding-agents.md"},{label:e("settings.agent.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:(0,b.jsx)(A,{label:e("settings.agent.agentAndModel"),description:e("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,b.jsx)(s.AgentModelPicker,{initialAgentType:f,initialModel:a.models.default,mode:"settings",onAgentModelChange:a=>g(a),className:"w-55"})})})}var G=a.i(52313),H=a.i(59175),I=a.i(58339),J=a.i(6120);let K=(0,J.createServerReference)("40172d64abad86495f132c1126033292992bb050f2",J.callServer,void 0,J.findSourceMapURL,"updateSettingsAction");var L=a.i(46847),M=a.i(7077),N=a.i(11036),O=a.i(96436);function P(a){return(0,b.jsx)(N.Code,{className:(0,r.cn)("h-4 w-4",a.className),...a})}function Q({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function R({className:a}){return(0,b.jsx)(M.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function S({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function T({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function U({className:a,...c}){return(0,b.jsx)(O.Rocket,{className:(0,r.cn)("h-4 w-4",a),...c})}Q.displayName="VsCodeIcon",R.displayName="CursorEditorIcon",S.displayName="WindsurfIcon",T.displayName="ZedIcon",U.displayName="AntigravityIcon";let V={vscode:Q,cursor:R,windsurf:S,zed:T,antigravity:U},W=[{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}],X=[{id:"bash",name:"Bash",available:!0},{id:"zsh",name:"Zsh",available:!0},{id:"fish",name:"Fish",available:!0}];function Y({settings:a,availableEditors:d,availableShells:f,availableTerminals:g}){let{t:h}=(0,q.useTranslation)("web"),[,i]=(0,c.useTransition)(),[j,k]=(0,c.useState)(a.environment.defaultEditor),[l,m]=(0,c.useState)(a.environment.shellPreference),[n,o]=(0,c.useState)(a.environment.terminalPreference??L.TerminalType.System),p=g??[{id:L.TerminalType.System,name:h("settings.environment.systemTerminal"),available:!0}];function s(a){i(async()=>{let b=await K(a);b.success||G.toast.error(b.error??h("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:e.Terminal,title:h("settings.environment.sectionTitle"),description:h("settings.environment.sectionDescription"),testId:"environment-settings-section",tooltip:h("settings.environment.hint"),tooltipLinks:[{label:h("settings.environment.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:[(0,b.jsx)(A,{label:h("settings.environment.defaultEditor"),description:h("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,b.jsxs)(H.Select,{value:j,onValueChange:a=>{k(a),s({environment:{defaultEditor:a,shellPreference:l,terminalPreference:n}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"default-editor","data-testid":"editor-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:(d??W).map(a=>{var c;let d=(c=a.id)&&c in V?V[c]:P;return(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(d,{className:"h-4 w-4 shrink-0"}),a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id)})})]})}),(0,b.jsx)(A,{label:h("settings.environment.shell"),description:h("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,b.jsxs)(H.Select,{value:l,onValueChange:a=>{m(a),s({environment:{defaultEditor:j,shellPreference:a,terminalPreference:n}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"shell-preference","data-testid":"shell-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:(f??X).map(a=>(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id))})]})}),(0,b.jsx)(A,{label:h("settings.environment.terminal"),description:h("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,b.jsxs)(H.Select,{value:n,onValueChange:a=>{o(a),s({environment:{defaultEditor:j,shellPreference:l,terminalPreference:a}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"terminal-preference","data-testid":"terminal-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:p.map(a=>(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id))})]})})]})}function Z(a,b={}){let c=b.autoArchiveEnabled??a.autoArchiveEnabled,d=parseInt(b.autoArchiveDelay??a.autoArchiveDelay,10);return{workflow:{openPrOnImplementationComplete:b.openPr??a.openPr,approvalGateDefaults:{pushOnImplementationComplete:b.pushOnComplete??a.pushOnComplete,allowPrd:b.allowPrd??a.allowPrd,allowPlan:b.allowPlan??a.allowPlan,allowMerge:b.allowMerge??a.allowMerge},enableEvidence:b.enableEvidence??a.enableEvidence,commitEvidence:b.commitEvidence??a.commitEvidence,ciWatchEnabled:b.ciWatchEnabled??a.ciWatchEnabled,defaultFastMode:b.defaultFastMode??a.defaultFastMode,autoArchiveDelayMinutes:c?Number.isNaN(d)||d<1?10:d:0}}}function $({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[g,h]=(0,c.useState)(a.workflow.openPrOnImplementationComplete),[i,j]=(0,c.useState)(a.workflow.approvalGateDefaults.pushOnImplementationComplete),[k,l]=(0,c.useState)(a.workflow.approvalGateDefaults.allowPrd),[m,n]=(0,c.useState)(a.workflow.approvalGateDefaults.allowPlan),[o,p]=(0,c.useState)(a.workflow.approvalGateDefaults.allowMerge),[r,s]=(0,c.useState)(a.workflow.enableEvidence),[t,u]=(0,c.useState)(a.workflow.commitEvidence),[v,w]=(0,c.useState)(!1!==a.workflow.ciWatchEnabled),[x,y]=(0,c.useState)(!1!==a.workflow.defaultFastMode),[z,F]=(0,c.useState)((a.workflow.autoArchiveDelayMinutes??10)>0),[H,I]=(0,c.useState)(String(a.workflow.autoArchiveDelayMinutes??10));function J(){return{openPr:g,pushOnComplete:i,allowPrd:k,allowPlan:m,allowMerge:o,enableEvidence:r,commitEvidence:t,ciWatchEnabled:v,defaultFastMode:x,autoArchiveEnabled:z,autoArchiveDelay:H}}function L(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:f.GitBranch,title:d("settings.workflow.title"),description:d("settings.workflow.sectionDescription"),testId:"workflow-settings-section",tooltip:d("settings.workflow.hint"),tooltipLinks:[{label:d("settings.workflow.links.approvalGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:d("settings.workflow.links.pushAndPrFlags"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:[(0,b.jsx)(B,{label:d("settings.workflow.defaultFastMode"),description:d("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:x,onChange:a=>{y(a),L(Z(J(),{defaultFastMode:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.approve")}),(0,b.jsx)(B,{label:d("settings.workflow.autoApprovePrd"),description:d("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:k,onChange:a=>{l(a),L(Z(J(),{allowPrd:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.autoApprovePlan"),description:d("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:m,onChange:a=>{n(a),L(Z(J(),{allowPlan:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.autoApproveMerge"),description:d("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:o,onChange:a=>{p(a),L(Z(J(),{allowMerge:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.evidence")}),(0,b.jsx)(B,{label:d("settings.workflow.collectEvidence"),description:d("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:r,onChange:a=>{s(a),a?L(Z(J(),{enableEvidence:a})):(u(!1),L(Z(J(),{enableEvidence:a,commitEvidence:!1})))}}),(0,b.jsx)(B,{label:d("settings.workflow.addEvidenceToPr"),description:d("settings.workflow.addEvidenceToPrDescription"),tooltip:"Attaches collected evidence artifacts (screenshots, logs) directly to the pull request description.",id:"commit-evidence",testId:"switch-commit-evidence",checked:t,disabled:!r||!g,onChange:a=>{u(a),L(Z(J(),{commitEvidence:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.git")}),(0,b.jsx)(B,{label:d("settings.workflow.pushOnComplete"),description:d("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:i,onChange:a=>{j(a),L(Z(J(),{pushOnComplete:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.openPrOnComplete"),description:d("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:g,onChange:a=>{h(a),a?L(Z(J(),{openPr:a})):(u(!1),L(Z(J(),{openPr:a,commitEvidence:!1})))}}),(0,b.jsx)(B,{label:d("settings.workflow.watchCiAfterPush"),description:d("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:v,onChange:a=>{w(a),L(Z(J(),{ciWatchEnabled:a}))}}),(0,b.jsx)(E,{children:"Archive"}),(0,b.jsx)(B,{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:z,onChange:a=>{F(a),L(Z(J(),{autoArchiveEnabled:a}))}}),(0,b.jsx)(A,{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,b.jsx)(D,{id:"auto-archive-delay",testId:"input-auto-archive-delay",value:H,placeholder:"10",min:1,max:1440,suffix:"min",onChange:a=>{I(a)},onBlur:()=>{if(!z)return;let a=parseInt(H,10),b=Number.isNaN(a)?10:Math.min(1440,Math.max(1,a));I(String(b)),L(Z(J(),{autoArchiveDelay:String(b)}))}})})]})}function _(a){if(""===a)return;let b=parseInt(a,10);return Number.isNaN(b)||b<=0?void 0:b}function aa({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,h]=(0,c.useState)(null!=a.workflow.ciMaxFixAttempts?String(a.workflow.ciMaxFixAttempts):""),[i,j]=(0,c.useState)(null!=a.workflow.ciWatchTimeoutMs?String(Math.round(a.workflow.ciWatchTimeoutMs/1e3)):""),[k,l]=(0,c.useState)(null!=a.workflow.ciLogMaxChars?String(a.workflow.ciLogMaxChars):""),[m,n]=(0,c.useState)(null!=a.workflow.ciWatchPollIntervalSeconds?String(a.workflow.ciWatchPollIntervalSeconds):""),[o,p]=(0,c.useState)(!1!==a.workflow.hideCiStatus),r=null!=a.workflow.ciMaxFixAttempts?String(a.workflow.ciMaxFixAttempts):"",s=null!=a.workflow.ciWatchTimeoutMs?String(Math.round(a.workflow.ciWatchTimeoutMs/1e3)):"",t=null!=a.workflow.ciLogMaxChars?String(a.workflow.ciLogMaxChars):"",u=null!=a.workflow.ciWatchPollIntervalSeconds?String(a.workflow.ciWatchPollIntervalSeconds):"";function v(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function w(a){let b=_(a.ciTimeout??i);return{workflow:{ciMaxFixAttempts:_(a.ciMaxFix??f),ciWatchTimeoutMs:null!=b?1e3*b:void 0,ciLogMaxChars:_(a.ciLogMax??k),ciWatchPollIntervalSeconds:_(a.ciPollInterval??m),hideCiStatus:a.hideCiStatus??o}}}return(0,b.jsxs)(C,{icon:g.Activity,title:d("settings.ci.title"),description:d("settings.ci.description"),testId:"ci-settings-section",tooltip:d("settings.ci.hint"),tooltipLinks:[{label:d("settings.ci.links.cicdPipeline"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/cicd.md"},{label:d("settings.ci.links.ciSecurityGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/003-cicd-security-gates/spec.md"}],children:[(0,b.jsx)(A,{label:d("settings.ci.maxFixAttempts"),description:d("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,b.jsx)(D,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:f,onChange:h,onBlur:()=>{f!==r&&v(w({ciMaxFix:f}))},min:1,max:10})}),(0,b.jsx)(A,{label:d("settings.ci.watchTimeout"),description:d("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,b.jsx)(D,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:i,onChange:j,onBlur:()=>{i!==s&&v(w({ciTimeout:i}))},min:30,step:30,suffix:"sec"})}),(0,b.jsx)(A,{label:d("settings.ci.maxLogSize"),description:d("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,b.jsx)(D,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:k,onChange:l,onBlur:()=>{k!==t&&v(w({ciLogMax:k}))},min:1e3,step:5e3,suffix:"chars"})}),(0,b.jsx)(A,{label:d("settings.ci.pollInterval"),description:d("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,b.jsx)(D,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:m,onChange:n,onBlur:()=>{m!==u&&v(w({ciPollInterval:m}))},min:5,step:5,suffix:"sec"})}),(0,b.jsx)(B,{label:d("settings.ci.hideCiStatus"),description:d("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:o,onChange:a=>{p(a),v(w({hideCiStatus:a}))}})]})}var ab=a.i(48972),ac=a.i(59653),ad=a.i(80303),ae=a.i(95819),af=a.i(47427),ag=a.i(60380),ah=a.i(41387),ai=a.i(97045),aj=a.i(30419),ak=a.i(69471),al=["PageUp","PageDown"],am=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],an={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ao="Slider",[ap,aq,ar]=(0,ak.createCollection)(ao),[as,at]=(0,ae.createContextScope)(ao,[ar]),[au,av]=as(ao),aw=c.forwardRef((a,d)=>{let{name:e,min:f=0,max:g=100,step:h=1,orientation:i="horizontal",disabled:j=!1,minStepsBetweenThumbs:k=0,defaultValue:l=[f],value:m,onValueChange:n=()=>{},onValueCommit:o=()=>{},inverted:p=!1,form:q,...r}=a,s=c.useRef(new Set),t=c.useRef(0),u="horizontal"===i,[v=[],w]=(0,af.useControllableState)({prop:m,defaultProp:l,onChange:a=>{let b=[...s.current];b[t.current]?.focus(),n(a)}}),x=c.useRef(v);function y(a,b,{commit:c}={commit:!1}){let d,e=(String(h).split(".")[1]||"").length,i=Math.round((Math.round((a-f)/h)*h+f)*(d=Math.pow(10,e)))/d,j=(0,ab.clamp)(i,[f,g]);w((a=[])=>{let d=function(a=[],b,c){let d=[...a];return d[c]=b,d.sort((a,b)=>a-b)}(a,j,b);if(!function(a,b){if(b>0)return Math.min(...a.slice(0,-1).map((b,c)=>a[c+1]-b))>=b;return!0}(d,k*h))return a;{t.current=d.indexOf(j);let b=String(d)!==String(a);return b&&c&&o(d),b?d:a}})}return(0,b.jsx)(au,{scope:a.__scopeSlider,name:e,disabled:j,min:f,max:g,valueIndexToChangeRef:t,thumbs:s.current,values:v,orientation:i,form:q,children:(0,b.jsx)(ap.Provider,{scope:a.__scopeSlider,children:(0,b.jsx)(ap.Slot,{scope:a.__scopeSlider,children:(0,b.jsx)(u?az:aA,{"aria-disabled":j,"data-disabled":j?"":void 0,...r,ref:d,onPointerDown:(0,ac.composeEventHandlers)(r.onPointerDown,()=>{j||(x.current=v)}),min:f,max:g,inverted:p,onSlideStart:j?void 0:function(a){let b=function(a,b){if(1===a.length)return 0;let c=a.map(a=>Math.abs(a-b)),d=Math.min(...c);return c.indexOf(d)}(v,a);y(a,b)},onSlideMove:j?void 0:function(a){y(a,t.current)},onSlideEnd:j?void 0:function(){let a=x.current[t.current];v[t.current]!==a&&o(v)},onHomeKeyDown:()=>!j&&y(f,0,{commit:!0}),onEndKeyDown:()=>!j&&y(g,v.length-1,{commit:!0}),onStepKeyDown:({event:a,direction:b})=>{if(!j){let c=al.includes(a.key)||a.shiftKey&&am.includes(a.key),d=t.current;y(v[d]+h*(c?10:1)*b,d,{commit:!0})}}})})})})});aw.displayName=ao;var[ax,ay]=as(ao,{startEdge:"left",endEdge:"right",size:"width",direction:1}),az=c.forwardRef((a,d)=>{let{min:e,max:f,dir:g,inverted:h,onSlideStart:i,onSlideMove:j,onSlideEnd:k,onStepKeyDown:l,...m}=a,[n,o]=c.useState(null),p=(0,ad.useComposedRefs)(d,a=>o(a)),q=c.useRef(void 0),r=(0,ag.useDirection)(g),s="ltr"===r,t=s&&!h||!s&&h;function u(a){let b=q.current||n.getBoundingClientRect(),c=aL([0,b.width],t?[e,f]:[f,e]);return q.current=b,c(a-b.left)}return(0,b.jsx)(ax,{scope:a.__scopeSlider,startEdge:t?"left":"right",endEdge:t?"right":"left",direction:t?1:-1,size:"width",children:(0,b.jsx)(aB,{dir:r,"data-orientation":"horizontal",...m,ref:p,style:{...m.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:a=>{let b=u(a.clientX);i?.(b)},onSlideMove:a=>{let b=u(a.clientX);j?.(b)},onSlideEnd:()=>{q.current=void 0,k?.()},onStepKeyDown:a=>{let b=an[t?"from-left":"from-right"].includes(a.key);l?.({event:a,direction:b?-1:1})}})})}),aA=c.forwardRef((a,d)=>{let{min:e,max:f,inverted:g,onSlideStart:h,onSlideMove:i,onSlideEnd:j,onStepKeyDown:k,...l}=a,m=c.useRef(null),n=(0,ad.useComposedRefs)(d,m),o=c.useRef(void 0),p=!g;function q(a){let b=o.current||m.current.getBoundingClientRect(),c=aL([0,b.height],p?[f,e]:[e,f]);return o.current=b,c(a-b.top)}return(0,b.jsx)(ax,{scope:a.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:(0,b.jsx)(aB,{"data-orientation":"vertical",...l,ref:n,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:a=>{let b=q(a.clientY);h?.(b)},onSlideMove:a=>{let b=q(a.clientY);i?.(b)},onSlideEnd:()=>{o.current=void 0,j?.()},onStepKeyDown:a=>{let b=an[p?"from-bottom":"from-top"].includes(a.key);k?.({event:a,direction:b?-1:1})}})})}),aB=c.forwardRef((a,c)=>{let{__scopeSlider:d,onSlideStart:e,onSlideMove:f,onSlideEnd:g,onHomeKeyDown:h,onEndKeyDown:i,onStepKeyDown:j,...k}=a,l=av(ao,d);return(0,b.jsx)(aj.Primitive.span,{...k,ref:c,onKeyDown:(0,ac.composeEventHandlers)(a.onKeyDown,a=>{"Home"===a.key?(h(a),a.preventDefault()):"End"===a.key?(i(a),a.preventDefault()):al.concat(am).includes(a.key)&&(j(a),a.preventDefault())}),onPointerDown:(0,ac.composeEventHandlers)(a.onPointerDown,a=>{let b=a.target;b.setPointerCapture(a.pointerId),a.preventDefault(),l.thumbs.has(b)?b.focus():e(a)}),onPointerMove:(0,ac.composeEventHandlers)(a.onPointerMove,a=>{a.target.hasPointerCapture(a.pointerId)&&f(a)}),onPointerUp:(0,ac.composeEventHandlers)(a.onPointerUp,a=>{let b=a.target;b.hasPointerCapture(a.pointerId)&&(b.releasePointerCapture(a.pointerId),g(a))})})}),aC="SliderTrack",aD=c.forwardRef((a,c)=>{let{__scopeSlider:d,...e}=a,f=av(aC,d);return(0,b.jsx)(aj.Primitive.span,{"data-disabled":f.disabled?"":void 0,"data-orientation":f.orientation,...e,ref:c})});aD.displayName=aC;var aE="SliderRange",aF=c.forwardRef((a,d)=>{let{__scopeSlider:e,...f}=a,g=av(aE,e),h=ay(aE,e),i=c.useRef(null),j=(0,ad.useComposedRefs)(d,i),k=g.values.length,l=g.values.map(a=>aK(a,g.min,g.max)),m=k>1?Math.min(...l):0,n=100-Math.max(...l);return(0,b.jsx)(aj.Primitive.span,{"data-orientation":g.orientation,"data-disabled":g.disabled?"":void 0,...f,ref:j,style:{...a.style,[h.startEdge]:m+"%",[h.endEdge]:n+"%"}})});aF.displayName=aE;var aG="SliderThumb",aH=c.forwardRef((a,d)=>{let e=aq(a.__scopeSlider),[f,g]=c.useState(null),h=(0,ad.useComposedRefs)(d,a=>g(a)),i=c.useMemo(()=>f?e().findIndex(a=>a.ref.current===f):-1,[e,f]);return(0,b.jsx)(aI,{...a,ref:h,index:i})}),aI=c.forwardRef((a,d)=>{var e,f,g,h,i;let j,k,{__scopeSlider:l,index:m,name:n,...o}=a,p=av(aG,l),q=ay(aG,l),[r,s]=c.useState(null),t=(0,ad.useComposedRefs)(d,a=>s(a)),u=!r||p.form||!!r.closest("form"),v=(0,ai.useSize)(r),w=p.values[m],x=void 0===w?0:aK(w,p.min,p.max),y=(e=m,(f=p.values.length)>2?`Value ${e+1} of ${f}`:2===f?["Minimum","Maximum"][e]:void 0),z=v?.[q.size],A=z?(g=z,h=x,i=q.direction,k=aL([0,50],[0,j=g/2]),(j-k(h)*i)*i):0;return c.useEffect(()=>{if(r)return p.thumbs.add(r),()=>{p.thumbs.delete(r)}},[r,p.thumbs]),(0,b.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[q.startEdge]:`calc(${x}% + ${A}px)`},children:[(0,b.jsx)(ap.ItemSlot,{scope:a.__scopeSlider,children:(0,b.jsx)(aj.Primitive.span,{role:"slider","aria-label":a["aria-label"]||y,"aria-valuemin":p.min,"aria-valuenow":w,"aria-valuemax":p.max,"aria-orientation":p.orientation,"data-orientation":p.orientation,"data-disabled":p.disabled?"":void 0,tabIndex:p.disabled?void 0:0,...o,ref:t,style:void 0===w?{display:"none"}:a.style,onFocus:(0,ac.composeEventHandlers)(a.onFocus,()=>{p.valueIndexToChangeRef.current=m})})}),u&&(0,b.jsx)(aJ,{name:n??(p.name?p.name+(p.values.length>1?"[]":""):void 0),form:p.form,value:w},m)]})});aH.displayName=aG;var aJ=c.forwardRef(({__scopeSlider:a,value:d,...e},f)=>{let g=c.useRef(null),h=(0,ad.useComposedRefs)(g,f),i=(0,ah.usePrevious)(d);return c.useEffect(()=>{let a=g.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(i!==d&&b){let c=new Event("input",{bubbles:!0});b.call(a,d),a.dispatchEvent(c)}},[i,d]),(0,b.jsx)(aj.Primitive.input,{style:{display:"none"},...e,ref:h,defaultValue:d})});function aK(a,b,c){return(0,ab.clamp)(100/(c-b)*(a-b),[0,100])}function aL(a,b){return c=>{if(a[0]===a[1]||b[0]===b[1])return b[0];let d=(b[1]-b[0])/(a[1]-a[0]);return b[0]+d*(c-a[0])}}aJ.displayName="RadioBubbleInput",a.s(["Range",0,aF,"Root",0,aw,"Slider",0,aw,"SliderRange",0,aF,"SliderThumb",0,aH,"SliderTrack",0,aD,"Thumb",0,aH,"Track",0,aD,"createSliderScope",0,at],40432);var aM=a.i(40432),aM=aM;function aN({className:a,defaultValue:d,value:e,min:f=0,max:g=100,...h}){let i=c.useMemo(()=>Array.isArray(e)?e:Array.isArray(d)?d:[f,g],[e,d,f,g]);return(0,b.jsxs)(aM.Root,{"data-slot":"slider",defaultValue:d,value:e,min:f,max:g,className:(0,r.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",a),...h,children:[(0,b.jsx)(aM.Track,{"data-slot":"slider-track",className:(0,r.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,b.jsx)(aM.Range,{"data-slot":"slider-range",className:(0,r.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:i.length},(a,c)=>(0,b.jsx)(aM.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"},c))]})}let aO=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],aP=aO.length-1;function aQ(a){let b=0,c=Math.abs(a-aO[0]);for(let d=1;d<aO.length;d++){let e=Math.abs(a-aO[d]);e<c&&(c=e,b=d)}return b}function aR({id:a,testId:d,value:e,onChange:f,onBlur:g,defaultSeconds:h=1800}){var i;let j,k,l=(""===e?h:parseInt(e,10))||h,[m,n]=(0,c.useState)(()=>aQ(l)),o=aQ(l);o!==m&&aO[m]!==l&&n(o);let p=(0,c.useCallback)(([a])=>{n(a),f(String(aO[a]))},[f]);return(0,b.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,b.jsx)(aN,{id:a,"data-testid":d,min:0,max:aP,step:1,value:[m],onValueChange:p,onValueCommit:()=>g(),className:"min-w-0 flex-1"}),(0,b.jsx)("span",{className:"text-muted-foreground shrink-0 text-end text-xs tabular-nums",children:(j=Math.floor((i=aO[m])/3600),k=Math.round(i%3600/60),0===j?`${k}m`:0===k?`${j}h`:`${j}h ${k}m`)})]})}function aS(a){if(void 0===a)return;let b=function(a){if(""===a)return;let b=parseInt(a,10);return Number.isNaN(b)||b<=0?void 0:b}(a);return null!=b?1e3*b:void 0}function aT({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.workflow.stageTimeouts,g=a.workflow.analyzeRepoTimeouts,[h,i]=(0,c.useState)(String(Math.round((f?.analyzeMs??18e5)/1e3))),[j,k]=(0,c.useState)(String(Math.round((f?.requirementsMs??18e5)/1e3))),[m,n]=(0,c.useState)(String(Math.round((f?.researchMs??18e5)/1e3))),[o,p]=(0,c.useState)(String(Math.round((f?.planMs??18e5)/1e3))),[r,s]=(0,c.useState)(String(Math.round((f?.implementMs??18e5)/1e3))),[t,u]=(0,c.useState)(String(Math.round((f?.mergeMs??18e5)/1e3))),[v,w]=(0,c.useState)(String(Math.round((g?.analyzeMs??6e5)/1e3))),x=f?.analyzeMs!=null?String(Math.round(f.analyzeMs/1e3)):"",y=f?.requirementsMs!=null?String(Math.round(f.requirementsMs/1e3)):"",z=f?.researchMs!=null?String(Math.round(f.researchMs/1e3)):"",B=f?.planMs!=null?String(Math.round(f.planMs/1e3)):"",D=f?.implementMs!=null?String(Math.round(f.implementMs/1e3)):"",F=f?.mergeMs!=null?String(Math.round(f.mergeMs/1e3)):"",H=g?.analyzeMs!=null?String(Math.round(g.analyzeMs/1e3)):"";function I(a){return{workflow:{stageTimeouts:{analyzeMs:aS(a.analyzeTimeout??h),requirementsMs:aS(a.requirementsTimeout??j),researchMs:aS(a.researchTimeout??m),planMs:aS(a.planTimeout??o),implementMs:aS(a.implementTimeout??r),mergeMs:aS(a.mergeTimeout??t)},analyzeRepoTimeouts:{analyzeMs:aS(a.analyzeRepoTimeout??v)}}}}function J(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:l.Timer,title:d("settings.stageTimeouts.title"),description:d("settings.stageTimeouts.description"),testId:"stage-timeouts-settings-section",tooltip:d("settings.stageTimeouts.hint"),children:[(0,b.jsx)(E,{children:d("settings.stageTimeouts.subsections.featureAgent")}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.analyze"),description:d("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze",children:(0,b.jsx)(aR,{id:"timeout-analyze",testId:"timeout-analyze-input",value:h,onChange:i,onBlur:()=>{h!==x&&J(I({analyzeTimeout:h}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.requirements"),description:d("settings.stageTimeouts.requirementsDescription"),htmlFor:"timeout-requirements",children:(0,b.jsx)(aR,{id:"timeout-requirements",testId:"timeout-requirements-input",value:j,onChange:k,onBlur:()=>{j!==y&&J(I({requirementsTimeout:j}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.research"),description:d("settings.stageTimeouts.researchDescription"),htmlFor:"timeout-research",children:(0,b.jsx)(aR,{id:"timeout-research",testId:"timeout-research-input",value:m,onChange:n,onBlur:()=>{m!==z&&J(I({researchTimeout:m}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.plan"),description:d("settings.stageTimeouts.planDescription"),htmlFor:"timeout-plan",children:(0,b.jsx)(aR,{id:"timeout-plan",testId:"timeout-plan-input",value:o,onChange:p,onBlur:()=>{o!==B&&J(I({planTimeout:o}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.implement"),description:d("settings.stageTimeouts.implementDescription"),htmlFor:"timeout-implement",children:(0,b.jsx)(aR,{id:"timeout-implement",testId:"timeout-implement-input",value:r,onChange:s,onBlur:()=>{r!==D&&J(I({implementTimeout:r}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.merge"),description:d("settings.stageTimeouts.mergeDescription"),htmlFor:"timeout-merge",children:(0,b.jsx)(aR,{id:"timeout-merge",testId:"timeout-merge-input",value:t,onChange:u,onBlur:()=>{t!==F&&J(I({mergeTimeout:t}))},defaultSeconds:1800})}),(0,b.jsx)(E,{children:d("settings.stageTimeouts.subsections.analyzeRepoAgent")}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.analyze"),description:d("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze-repo",children:(0,b.jsx)(aR,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:v,onChange:w,onBlur:()=>{v!==H&&J(I({analyzeRepoTimeout:v}))},defaultSeconds:600})})]})}function aU({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,g]=(0,c.useState)(a.notifications.inApp.enabled),[h,j]=(0,c.useState)({...a.notifications.events});function k(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function l(a={}){return{notifications:{inApp:{enabled:a.inApp??f},events:a.events??h}}}return(0,b.jsxs)(C,{icon:i,title:d("settings.notifications.title"),description:d("settings.notifications.sectionDescription"),testId:"notification-settings-section",tooltip:d("settings.notifications.hint"),tooltipLinks:[{label:d("settings.notifications.links.notificationSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/021-agent-notifications/spec.yaml"}],children:[(0,b.jsx)(E,{children:d("settings.notifications.channels")}),(0,b.jsx)(B,{label:d("settings.notifications.inAppLabel"),description:d("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:f,onChange:a=>{g(a),k(l({inApp:a}))}}),(0,b.jsx)(E,{children:d("settings.notifications.subsections.agentEvents")}),(0,b.jsx)(B,{label:d("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:h.agentStarted,onChange:a=>{let b={...h,agentStarted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.phaseCompleted,onChange:a=>{let b={...h,phaseCompleted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.waitingApproval,onChange:a=>{let b={...h,waitingApproval:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.agentCompleted,onChange:a=>{let b={...h,agentCompleted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.agentFailed,onChange:a=>{let b={...h,agentFailed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(E,{children:d("settings.notifications.subsections.pullRequestEvents")}),(0,b.jsx)(B,{label:d("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:h.prMerged,onChange:a=>{let b={...h,prMerged:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.prClosed,onChange:a=>{let b={...h,prClosed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.prChecksPassed,onChange:a=>{let b={...h,prChecksPassed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.prChecksFailed,onChange:a=>{let b={...h,prChecksFailed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.prBlocked,onChange:a=>{let b={...h,prBlocked:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.mergeReviewReady,onChange:a=>{let b={...h,mergeReviewReady:a};j(b),k(l({events:b}))}})]})}function aV({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1,plugins:!1,mcpServers:!1},[g,h]=(0,c.useState)({...f});function i(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:j,title:d("settings.featureFlags.title"),description:d("settings.featureFlags.sectionDescription"),badge:d("settings.featureFlags.badge"),testId:"feature-flags-settings-section",tooltip:d("settings.featureFlags.hint"),children:[(0,b.jsx)(B,{label:d("settings.featureFlags.skills"),description:d("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:g.skills,onChange:a=>{let b={...g,skills:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.deployments"),description:d("settings.featureFlags.deploymentsDescription"),tooltip:"Enables experimental deployment features for environment management.",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:g.envDeploy,onChange:a=>{let b={...g,envDeploy:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.debug"),description:d("settings.featureFlags.debugDescription"),tooltip:"Shows additional debugging information in the UI for troubleshooting.",id:"flag-debug",testId:"switch-flag-debug",checked:g.debug,onChange:a=>{let b={...g,debug:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.githubImport"),description:d("settings.featureFlags.githubImportDescription"),tooltip:"Enables importing repositories directly from GitHub.",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:g.githubImport,onChange:a=>{let b={...g,githubImport:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.adoptBranch"),description:d("settings.featureFlags.adoptBranchDescription"),tooltip:"Enables adopting existing git branches as ShipIT features.",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:g.adoptBranch,onChange:a=>{let b={...g,adoptBranch:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.gitRebaseSync"),description:d("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:g.gitRebaseSync,onChange:a=>{let b={...g,gitRebaseSync:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.reactFileManager"),description:d("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:g.reactFileManager,onChange:a=>{let b={...g,reactFileManager:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.plugins"),description:a.litellmProxy?.baseUrl?d("settings.featureFlags.pluginsDescription"):`${d("settings.featureFlags.pluginsDescription")} — ${d("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:g.plugins,disabled:!a.litellmProxy?.baseUrl,onChange:a=>{let b={...g,plugins:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.mcpServers"),description:a.litellmProxy?.baseUrl?d("settings.featureFlags.mcpServersDescription"):`${d("settings.featureFlags.mcpServersDescription")} — ${d("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:g.mcpServers,disabled:!a.litellmProxy?.baseUrl,onChange:a=>{let b={...g,mcpServers:a};h(b),i({featureFlags:b})}})]})}function aW({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[g,h]=(0,c.useState)(f.enabled),[i,j]=(0,c.useState)(String(f.autoTimeoutMinutes)),[k,l]=(0,c.useState)(String(f.maxConcurrentSessions));function n(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:m.MessageSquare,title:d("settings.interactiveAgent.title"),description:d("settings.interactiveAgent.description"),testId:"interactive-agent-settings-section",tooltip:d("settings.interactiveAgent.hint"),children:[(0,b.jsx)(B,{label:d("settings.interactiveAgent.enableChatTab"),description:d("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:g,onChange:a=>{h(a),n({interactiveAgent:{enabled:a,autoTimeoutMinutes:parseInt(i,10)||15,maxConcurrentSessions:parseInt(k,10)||3}})}}),(0,b.jsx)(A,{label:d("settings.interactiveAgent.autoTimeout"),description:d("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,b.jsx)(D,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:i,placeholder:"15",min:1,max:120,suffix:"min",onChange:j,onBlur:()=>{let a=parseInt(i,10),b=Number.isNaN(a)?15:Math.min(120,Math.max(1,a));j(String(b)),n({interactiveAgent:{enabled:g,autoTimeoutMinutes:b,maxConcurrentSessions:parseInt(k,10)||3}})}})}),(0,b.jsx)(A,{label:d("settings.interactiveAgent.maxConcurrentSessions"),description:d("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,b.jsx)(D,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:k,placeholder:"3",min:1,max:10,onChange:l,onBlur:()=>{let a=parseInt(k,10),b=Number.isNaN(a)?3:Math.min(10,Math.max(1,a));l(String(b)),n({interactiveAgent:{enabled:g,autoTimeoutMinutes:parseInt(i,10)||15,maxConcurrentSessions:b}})}})})]})}function aX({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.fabLayout??{swapPosition:!1},[g,h]=(0,c.useState)(f.swapPosition);return(0,b.jsx)(C,{icon:n,title:d("settings.fabLayout.title"),description:d("settings.fabLayout.description"),testId:"fab-layout-settings-section",tooltip:d("settings.fabLayout.hint"),children:(0,b.jsx)(B,{label:d("settings.fabLayout.swapPosition"),description:d("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:g,onChange:a=>{var b;h(a),b={fabLayout:{swapPosition:a}},e(async()=>{let a=await K(b);a.success||G.toast.error(a.error??d("settings.failedToSave"))})}})})}function aY({shipitAiHome:a,dbFileSize:c}){let{t:d}=(0,q.useTranslation)("web");return(0,b.jsxs)(C,{icon:k,title:d("settings.database.title"),description:d("settings.database.sectionDescription"),testId:"database-settings-section",tooltip:d("settings.database.hint"),tooltipLinks:[{label:d("settings.database.links.settingsService"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/settings-service.md"},{label:d("settings.database.links.settingsSpec"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/005-global-settings-service/spec.md"}],children:[(0,b.jsx)(A,{label:d("settings.database.location"),description:d("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,b.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shipit-ai-home-path",children:a})}),(0,b.jsx)(A,{label:d("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,b.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:c})})]})}var aZ=a.i(98680),aZ=aZ,a$=a.i(74605),a$=a$;let a_=(0,J.createServerReference)("40216652c202f875b8309a621bf0c0910e25006701",J.callServer,void 0,J.findSourceMapURL,"addMarketplaceAction");var a0=a.i(90920),a1=a.i(18948);function a2({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,g]=(0,c.useState)(a.litellmProxy?.baseUrl??""),[h,i]=(0,c.useState)(a.litellmProxy?.apiKey??""),[j,k]=(0,c.useState)("idle"),[l,m]=(0,c.useState)(!1),n=a.litellmProxy?.baseUrl??"",o=a.litellmProxy?.apiKey??"";function r(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function s(a){let b=a?.baseUrl??f;return{litellmProxy:{baseUrl:b,apiKey:a?.apiKey??h,marketplaceEnabled:!!b}}}async function t(){if(f){m(!0),k("idle");try{let a=`${f.replace(/\/+$/,"")}/claude-code/marketplace.json`,b=await a_(a);k(b.success?"success":"failed"),b.success?G.toast.success(d("settings.litellmProxy.testSuccess")):G.toast.error(d("settings.litellmProxy.testFailed"))}catch{k("failed"),G.toast.error(d("settings.litellmProxy.testFailed"))}finally{m(!1)}}}return(0,b.jsxs)(C,{icon:p.Server,title:d("settings.litellmProxy.title"),description:d("settings.litellmProxy.description"),testId:"litellm-proxy-settings-section",tooltip:d("settings.litellmProxy.hint"),children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.baseUrl"),description:d("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,b.jsx)(a0.Input,{id:"litellm-proxy-url","data-testid":"litellm-proxy-url-input",type:"text",placeholder:"http://localhost:4000",value:f,onChange:a=>{g(a.target.value),k("idle")},onBlur:()=>{f!==n&&r(s({baseUrl:f}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.apiKey"),description:d("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,b.jsx)(a0.Input,{id:"litellm-api-key","data-testid":"litellm-api-key-input",type:"password",placeholder:"sk-...",value:h,onChange:a=>i(a.target.value),onBlur:()=>{h!==o&&r(s({apiKey:h}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.testConnection"),tooltip:"Attempt to connect to the proxy and fetch the marketplace catalog to verify the configuration is correct.",children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(a1.Button,{variant:"outline",size:"sm","data-testid":"litellm-test-connection-btn",disabled:!f||l,onClick:t,className:"cursor-pointer text-xs",children:l?d("settings.saving"):d("settings.litellmProxy.testConnection")}),"success"===j&&(0,b.jsx)(aZ.default,{className:"h-4 w-4 text-emerald-500","data-testid":"litellm-test-success"}),"failed"===j&&(0,b.jsx)(a$.default,{className:"text-destructive h-4 w-4","data-testid":"litellm-test-failed"})]})})]})}let a3=(0,h.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 a4=a.i(79620);let a5=new Set(["claude-code","gemini-cli","codex-cli"]),a6=new Set(["cursor","copilot-cli"]);function a7({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.agent.type,g=a.litellmProxy?.claudeCode,[h,i]=(0,c.useState)(function(a){switch(a.agent.type){case"claude-code":return a.litellmProxy?.claudeCode?.routingMode??L.LiteLLMProxyRoutingMode.direct;case"gemini-cli":return a.litellmProxy?.geminiCli?.routingMode??L.LiteLLMProxyRoutingMode.direct;case"codex-cli":return a.litellmProxy?.codexCli?.routingMode??L.LiteLLMProxyRoutingMode.direct;default:return L.LiteLLMProxyRoutingMode.direct}}(a)),[j,k]=(0,c.useState)(g?.customHeaders??""),[l,m]=(0,c.useState)(g?.sonnetModel??""),[n,o]=(0,c.useState)(g?.haikuModel??""),[p,r]=(0,c.useState)(g?.opusModel??""),s=g?.customHeaders??"",t=g?.sonnetModel??"",u=g?.haikuModel??"",v=g?.opusModel??"",w=h!==L.LiteLLMProxyRoutingMode.direct,x=a5.has(f),y=a6.has(f),z=a.litellmProxy?.baseUrl??"",B=a.litellmProxy?.apiKey??"";function D(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function E(a){let b=function(a){switch(a){case"claude-code":return"claudeCode";case"gemini-cli":return"geminiCli";case"codex-cli":return"codexCli";default:return null}}(f);return b?"claude-code"===f?{litellmProxy:{claudeCode:{routingMode:a?.routingMode??h,customHeaders:a?.customHeaders??j,sonnetModel:a?.sonnetModel??l,haikuModel:a?.haikuModel??n,opusModel:a?.opusModel??p}}}:{litellmProxy:{[b]:{routingMode:a?.routingMode??h}}}:{}}if(!x&&!y)return(0,b.jsx)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:(0,b.jsx)(A,{label:"",description:d("settings.litellmProxy.routing.notSupported"),children:(0,b.jsx)("span",{})})});if(y){let a="cursor"===f,c=z?a?`${z.replace(/\/+$/,"")}/cursor`:z:"";return(0,b.jsx)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:(0,b.jsx)(A,{label:a?d("settings.litellmProxy.routing.cursorInstructions"):d("settings.litellmProxy.routing.copilotInstructions"),description:a?d("settings.litellmProxy.routing.cursorDescription"):d("settings.litellmProxy.routing.copilotDescription"),children:(0,b.jsxs)("div",{className:"w-64 space-y-2",children:[(0,b.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:c}),a&&B?(0,b.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:B}):null]})})})}return(0,b.jsxs)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.mode"),description:d("settings.litellmProxy.routing.modeDescription"),htmlFor:"litellm-routing-mode",children:(0,b.jsxs)(H.Select,{value:h,onValueChange:function(a){i(a),D(E({routingMode:a}))},children:[(0,b.jsx)(H.SelectTrigger,{id:"litellm-routing-mode","data-testid":"litellm-routing-mode-select",className:"w-48 text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsxs)(H.SelectContent,{children:[(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.direct,children:d("settings.litellmProxy.routing.modeDirect")}),(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.proxy,children:d("settings.litellmProxy.routing.modeProxy")}),"claude-code"===f&&(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.passthrough,children:d("settings.litellmProxy.routing.modePassthrough")})]})]})}),h===L.LiteLLMProxyRoutingMode.passthrough&&(0,b.jsx)(A,{label:"",description:d("settings.litellmProxy.routing.passthroughHelp"),children:(0,b.jsx)("span",{})}),w&&"claude-code"===f?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.customHeaders"),description:d("settings.litellmProxy.routing.customHeadersDescription"),htmlFor:"litellm-custom-headers",children:(0,b.jsx)(a4.Textarea,{id:"litellm-custom-headers","data-testid":"litellm-custom-headers-input",placeholder:"x-litellm-customer-id: my-user\nx-litellm-tags: project:acme",value:j,onChange:a=>k(a.target.value),onBlur:()=>{j!==s&&D(E({customHeaders:j}))},rows:3,className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.sonnetModel"),description:d("settings.litellmProxy.routing.modelOverrideDescription"),htmlFor:"litellm-sonnet-model",children:(0,b.jsx)(a0.Input,{id:"litellm-sonnet-model","data-testid":"litellm-sonnet-model-input",type:"text",placeholder:"claude-sonnet-4-6",value:l,onChange:a=>m(a.target.value),onBlur:()=>{l!==t&&D(E({sonnetModel:l}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.haikuModel"),htmlFor:"litellm-haiku-model",children:(0,b.jsx)(a0.Input,{id:"litellm-haiku-model","data-testid":"litellm-haiku-model-input",type:"text",placeholder:"claude-haiku-4-5",value:n,onChange:a=>o(a.target.value),onBlur:()=>{n!==u&&D(E({haikuModel:n}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.opusModel"),htmlFor:"litellm-opus-model",children:(0,b.jsx)(a0.Input,{id:"litellm-opus-model","data-testid":"litellm-opus-model-input",type:"text",placeholder:"claude-opus-4-6",value:p,onChange:a=>r(a.target.value),onBlur:()=>{p!==v&&D(E({opusModel:p}))},className:"w-64 text-xs"})})]}):null]})}let a8=[{id:"agent",labelKey:"settings.sections.agent",icon:d.Bot},{id:"environment",labelKey:"settings.sections.environment",icon:e.Terminal},{id:"workflow",labelKey:"settings.sections.workflow",icon:f.GitBranch},{id:"ci",labelKey:"settings.sections.ci",icon:g.Activity},{id:"stage-timeouts",labelKey:"settings.sections.timeouts",icon:l.Timer},{id:"notifications",labelKey:"settings.sections.notifications",icon:i},{id:"feature-flags",labelKey:"settings.sections.flags",icon:j},{id:"interactive-agent",labelKey:"settings.sections.chat",icon:m.MessageSquare},{id:"fab-layout",labelKey:"settings.sections.layout",icon:n},{id:"database",labelKey:"settings.sections.database",icon:k},{id:"litellm-proxy",labelKey:"settings.sections.proxy",icon:p.Server}],a9=[{id:"all",labelKey:"settings.sections.all",icon:o},...a8];a.s(["SettingsPageClient",0,function({settings:a,shipitAiHome:d,dbFileSize:e,availableTerminals:f,availableEditors:g,availableShells:h}){let{t:i}=(0,q.useTranslation)("web"),[j,k]=(0,c.useState)("all"),[l,m]=(0,c.useState)("agent");return(0,c.useEffect)(()=>{if("all"!==j)return;let a=a8.map(a=>document.getElementById(`section-${a.id}`)).filter(Boolean);if(0===a.length)return;let b=new IntersectionObserver(a=>{for(let b of a)b.isIntersecting&&m(b.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let c of a)b.observe(c);return()=>b.disconnect()},[j]),(0,b.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl px-8 pt-8",children:[(0,b.jsxs)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 pb-4 backdrop-blur",children:[(0,b.jsxs)("div",{className:"mb-4 space-y-1.5",children:[(0,b.jsx)("span",{className:"text-[10px] font-bold tracking-[0.2em] text-slate-400 uppercase",children:"Developer Portal"}),(0,b.jsx)("div",{className:"flex items-baseline gap-3",children:(0,b.jsx)("h1",{className:"text-foreground text-3xl font-black tracking-tight",children:i("settings.title")})})]}),(0,b.jsx)("nav",{className:"bg-card editorial-shadow flex flex-wrap items-center gap-0.5 rounded-lg p-1",children:a9.map(a=>{let c=a.icon,d=j===a.id||"all"===j&&"all"!==a.id&&l===a.id;return(0,b.jsxs)("button",{type:"button",onClick:()=>k(a.id),className:(0,r.cn)("flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-bold transition-all",d?"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,b.jsx)(c,{className:"h-3 w-3"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:i(a.labelKey)})]},a.id)})})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3",children:[("all"===j||"agent"===j)&&(0,b.jsx)("div",{id:"section-agent",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(F,{settings:a})}),("all"===j||"environment"===j)&&(0,b.jsx)("div",{id:"section-environment",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(Y,{settings:a,availableEditors:g,availableShells:h,availableTerminals:f})}),("all"===j||"workflow"===j)&&(0,b.jsx)("div",{id:"section-workflow",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)($,{settings:a})}),("all"===j||"ci"===j)&&(0,b.jsx)("div",{id:"section-ci",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aa,{settings:a})}),("all"===j||"stage-timeouts"===j)&&(0,b.jsx)("div",{id:"section-stage-timeouts",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aT,{settings:a})}),("all"===j||"notifications"===j)&&(0,b.jsx)("div",{id:"section-notifications",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aU,{settings:a})}),("all"===j||"feature-flags"===j)&&(0,b.jsx)("div",{id:"section-feature-flags",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aV,{settings:a})}),("all"===j||"interactive-agent"===j)&&(0,b.jsx)("div",{id:"section-interactive-agent",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aW,{settings:a})}),("all"===j||"fab-layout"===j)&&(0,b.jsx)("div",{id:"section-fab-layout",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aX,{settings:a})}),("all"===j||"database"===j)&&(0,b.jsx)("div",{id:"section-database",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aY,{shipitAiHome:d,dbFileSize:e})}),("all"===j||"litellm-proxy"===j)&&(0,b.jsxs)("div",{id:"section-litellm-proxy",className:"scroll-mt-18 rounded-lg",children:[(0,b.jsx)(a2,{settings:a}),a.litellmProxy?.baseUrl?(0,b.jsx)(a7,{settings:a}):null]})]})]})}],79020)}];
1
+ module.exports=[79020,a=>{"use strict";var b=a.i(53083),c=a.i(11321),d=a.i(87638),e=a.i(8685),f=a.i(37545),g=a.i(51423),h=a.i(97624);let i=(0,h.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"}]]),j=(0,h.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"}]]),k=(0,h.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 l=a.i(69210),m=a.i(73952);let n=(0,h.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"}]]),o=(0,h.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 p=a.i(63466);a.i(98617);var q=a.i(50040),r=a.i(85536),s=a.i(61781),t=a.i(49853),t=t,u=a.i(29370),v=a.i(2),w=a.i(77612),x=a.i(58860),y=a.i(96867),z=a.i(82934);function A({label:a,description:c,htmlFor:d,tooltip:e,children:f}){let g=e??c;return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-4 border-b py-2.5 last:border-b-0",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,b.jsx)(x.Label,{htmlFor:d,className:"cursor-pointer text-sm font-normal whitespace-nowrap",children:a}),g?(0,b.jsxs)(z.Tooltip,{children:[(0,b.jsx)(z.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,b.jsx)(z.TooltipContent,{side:"top",className:"max-w-64 text-[11px] leading-relaxed",children:(0,b.jsx)("span",{className:"text-muted-foreground",children:g})})]}):null]}),c?(0,b.jsx)("p",{className:"text-muted-foreground text-[11px] leading-tight",children:c}):null]}),(0,b.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:f})]})}function B({label:a,description:c,id:d,testId:e,checked:f,onChange:g,disabled:h,tooltip:i}){return(0,b.jsx)(A,{label:a,description:c,htmlFor:d,tooltip:i,children:(0,b.jsx)(y.Switch,{id:d,"data-testid":e,checked:f,onCheckedChange:g,disabled:h,className:(0,r.cn)("cursor-pointer",h&&"cursor-not-allowed opacity-50")})})}function C({icon:a,title:c,description:d,badge:e,testId:f,tooltip:g,tooltipLinks:h,children:i}){return(0,b.jsxs)("div",{className:"bg-background rounded-lg border","data-testid":f,children:[(0,b.jsxs)("div",{className:"bg-muted/30 border-b px-4 py-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(a,{className:"text-muted-foreground h-3.5 w-3.5"}),(0,b.jsx)("h2",{className:"text-sm font-semibold",children:c}),g?(0,b.jsxs)(z.Tooltip,{children:[(0,b.jsx)(z.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(w.Info,{className:"text-muted-foreground/40 hover:text-muted-foreground h-3.5 w-3.5 shrink-0 cursor-help transition-colors"})}),(0,b.jsxs)(z.TooltipContent,{side:"bottom",className:"max-w-72 text-[11px] leading-relaxed",children:[(0,b.jsx)("p",{className:"text-muted-foreground",children:g}),null!=h&&h.length>0?(0,b.jsx)("div",{className:"border-border/50 mt-1.5 flex flex-col gap-0.5 border-t pt-1.5",children:h.map(a=>(0,b.jsxs)("a",{href:a.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,b.jsx)(v.ExternalLink,{className:"h-2.5 w-2.5 shrink-0 opacity-50"}),a.label]},a.href))}):null]})]}):null,e?(0,b.jsx)("span",{className:"bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[9px] font-medium tracking-wider uppercase",children:e}):null]}),(0,b.jsx)("p",{className:"text-muted-foreground mt-0.5 text-[11px]",children:d})]}),(0,b.jsx)("div",{className:"px-4",children:i})]})}function D({id:a,testId:c,value:d,onChange:e,onBlur:f,placeholder:g,min:h=1,max:i,step:j=1,suffix:k}){let{t:l}=(0,q.useTranslation)("web"),m=""===d?void 0:parseInt(d,10);return(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsxs)("div",{className:"flex items-center overflow-hidden rounded-md border",children:[(0,b.jsx)("button",{type:"button",onClick:()=>{e(String(Math.max(h,(m??parseInt(g,10))-j)))},onMouseUp:f,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":l("common.decrease"),children:(0,b.jsx)(t.default,{className:"h-3 w-3"})}),(0,b.jsx)("input",{id:a,"data-testid":c,type:"text",inputMode:"numeric",pattern:"[0-9]*",value:d,placeholder:g,onChange:a=>{e(a.target.value.replace(/[^0-9]/g,""))},onBlur:f,className:"h-8 w-14 bg-transparent text-center text-xs outline-none"}),(0,b.jsx)("button",{type:"button",onClick:()=>{let a;a=m??parseInt(g,10),e(String(null!=i?Math.min(i,a+j):a+j))},onMouseUp:f,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":l("common.increase"),children:(0,b.jsx)(u.Plus,{className:"h-3 w-3"})})]}),k?(0,b.jsx)("span",{className:"text-muted-foreground text-[11px]",children:k}):null]})}function E({children:a}){return(0,b.jsx)("div",{className:"border-b pt-3 pb-1",children:(0,b.jsx)("span",{className:"text-muted-foreground text-[10px] font-semibold tracking-wider uppercase",children:a})})}function F({settings:a}){let{t:e}=(0,q.useTranslation)("web"),[f,g]=(0,c.useState)(a.agent.type);return(0,b.jsx)(C,{icon:d.Bot,title:e("settings.agent.sectionTitle"),description:e("settings.agent.sectionDescription"),testId:"agent-settings-section",tooltip:e("settings.agent.hint"),tooltipLinks:[{label:e("settings.agent.links.agentSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/agent-system.md"},{label:e("settings.agent.links.addingAgents"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/adding-agents.md"},{label:e("settings.agent.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:(0,b.jsx)(A,{label:e("settings.agent.agentAndModel"),description:e("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,b.jsx)(s.AgentModelPicker,{initialAgentType:f,initialModel:a.models.default,mode:"settings",onAgentModelChange:a=>g(a),className:"w-55"})})})}var G=a.i(52313),H=a.i(59175),I=a.i(58339),J=a.i(6120);let K=(0,J.createServerReference)("403b2511a107b82251b07c35158ea444b6edbbeb0f",J.callServer,void 0,J.findSourceMapURL,"updateSettingsAction");var L=a.i(46847),M=a.i(7077),N=a.i(11036),O=a.i(96436);function P(a){return(0,b.jsx)(N.Code,{className:(0,r.cn)("h-4 w-4",a.className),...a})}function Q({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/vscode.svg",alt:"VS Code",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function R({className:a}){return(0,b.jsx)(M.default,{src:"/icons/agents/cursor.jpeg",alt:"Cursor",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function S({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/windsurf.svg",alt:"Windsurf",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function T({className:a}){return(0,b.jsx)(M.default,{src:"/icons/editors/zed.svg",alt:"Zed",width:24,height:24,className:(0,r.cn)("rounded-sm object-contain",a)})}function U({className:a,...c}){return(0,b.jsx)(O.Rocket,{className:(0,r.cn)("h-4 w-4",a),...c})}Q.displayName="VsCodeIcon",R.displayName="CursorEditorIcon",S.displayName="WindsurfIcon",T.displayName="ZedIcon",U.displayName="AntigravityIcon";let V={vscode:Q,cursor:R,windsurf:S,zed:T,antigravity:U},W=[{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}],X=[{id:"bash",name:"Bash",available:!0},{id:"zsh",name:"Zsh",available:!0},{id:"fish",name:"Fish",available:!0}];function Y({settings:a,availableEditors:d,availableShells:f,availableTerminals:g}){let{t:h}=(0,q.useTranslation)("web"),[,i]=(0,c.useTransition)(),[j,k]=(0,c.useState)(a.environment.defaultEditor),[l,m]=(0,c.useState)(a.environment.shellPreference),[n,o]=(0,c.useState)(a.environment.terminalPreference??L.TerminalType.System),p=g??[{id:L.TerminalType.System,name:h("settings.environment.systemTerminal"),available:!0}];function s(a){i(async()=>{let b=await K(a);b.success||G.toast.error(b.error??h("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:e.Terminal,title:h("settings.environment.sectionTitle"),description:h("settings.environment.sectionDescription"),testId:"environment-settings-section",tooltip:h("settings.environment.hint"),tooltipLinks:[{label:h("settings.environment.links.configurationGuide"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/guides/configuration.md"}],children:[(0,b.jsx)(A,{label:h("settings.environment.defaultEditor"),description:h("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,b.jsxs)(H.Select,{value:j,onValueChange:a=>{k(a),s({environment:{defaultEditor:a,shellPreference:l,terminalPreference:n}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"default-editor","data-testid":"editor-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:(d??W).map(a=>{var c;let d=(c=a.id)&&c in V?V[c]:P;return(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[(0,b.jsx)(d,{className:"h-4 w-4 shrink-0"}),a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id)})})]})}),(0,b.jsx)(A,{label:h("settings.environment.shell"),description:h("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,b.jsxs)(H.Select,{value:l,onValueChange:a=>{m(a),s({environment:{defaultEditor:j,shellPreference:a,terminalPreference:n}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"shell-preference","data-testid":"shell-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:(f??X).map(a=>(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id))})]})}),(0,b.jsx)(A,{label:h("settings.environment.terminal"),description:h("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,b.jsxs)(H.Select,{value:n,onValueChange:a=>{o(a),s({environment:{defaultEditor:j,shellPreference:l,terminalPreference:a}})},children:[(0,b.jsx)(H.SelectTrigger,{id:"terminal-preference","data-testid":"terminal-select",className:"w-64 cursor-pointer text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsx)(H.SelectContent,{children:p.map(a=>(0,b.jsx)(H.SelectItem,{value:a.id,disabled:!a.available,children:(0,b.jsxs)("span",{className:"flex items-center gap-2 text-xs",children:[a.name,(0,b.jsx)(I.Badge,{variant:"outline",className:(0,r.cn)("ml-auto px-1.5 py-0 text-[10px] leading-4 font-normal",a.available?"border-emerald-500/30 text-emerald-500":"border-muted-foreground/30 text-muted-foreground"),children:a.available?"Installed":"Not Installed"})]})},a.id))})]})})]})}function Z(a,b={}){let c=b.autoArchiveEnabled??a.autoArchiveEnabled,d=parseInt(b.autoArchiveDelay??a.autoArchiveDelay,10);return{workflow:{openPrOnImplementationComplete:b.openPr??a.openPr,approvalGateDefaults:{pushOnImplementationComplete:b.pushOnComplete??a.pushOnComplete,allowPrd:b.allowPrd??a.allowPrd,allowPlan:b.allowPlan??a.allowPlan,allowMerge:b.allowMerge??a.allowMerge},enableEvidence:b.enableEvidence??a.enableEvidence,commitEvidence:b.commitEvidence??a.commitEvidence,ciWatchEnabled:b.ciWatchEnabled??a.ciWatchEnabled,defaultFastMode:b.defaultFastMode??a.defaultFastMode,autoArchiveDelayMinutes:c?Number.isNaN(d)||d<1?10:d:0}}}function $({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[g,h]=(0,c.useState)(a.workflow.openPrOnImplementationComplete),[i,j]=(0,c.useState)(a.workflow.approvalGateDefaults.pushOnImplementationComplete),[k,l]=(0,c.useState)(a.workflow.approvalGateDefaults.allowPrd),[m,n]=(0,c.useState)(a.workflow.approvalGateDefaults.allowPlan),[o,p]=(0,c.useState)(a.workflow.approvalGateDefaults.allowMerge),[r,s]=(0,c.useState)(a.workflow.enableEvidence),[t,u]=(0,c.useState)(a.workflow.commitEvidence),[v,w]=(0,c.useState)(!1!==a.workflow.ciWatchEnabled),[x,y]=(0,c.useState)(!1!==a.workflow.defaultFastMode),[z,F]=(0,c.useState)((a.workflow.autoArchiveDelayMinutes??10)>0),[H,I]=(0,c.useState)(String(a.workflow.autoArchiveDelayMinutes??10));function J(){return{openPr:g,pushOnComplete:i,allowPrd:k,allowPlan:m,allowMerge:o,enableEvidence:r,commitEvidence:t,ciWatchEnabled:v,defaultFastMode:x,autoArchiveEnabled:z,autoArchiveDelay:H}}function L(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:f.GitBranch,title:d("settings.workflow.title"),description:d("settings.workflow.sectionDescription"),testId:"workflow-settings-section",tooltip:d("settings.workflow.hint"),tooltipLinks:[{label:d("settings.workflow.links.approvalGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/016-hitl-approval-gates/spec.yaml"},{label:d("settings.workflow.links.pushAndPrFlags"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/037-feature-pr-push-flags/spec.yaml"}],children:[(0,b.jsx)(B,{label:d("settings.workflow.defaultFastMode"),description:d("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:x,onChange:a=>{y(a),L(Z(J(),{defaultFastMode:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.approve")}),(0,b.jsx)(B,{label:d("settings.workflow.autoApprovePrd"),description:d("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:k,onChange:a=>{l(a),L(Z(J(),{allowPrd:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.autoApprovePlan"),description:d("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:m,onChange:a=>{n(a),L(Z(J(),{allowPlan:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.autoApproveMerge"),description:d("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:o,onChange:a=>{p(a),L(Z(J(),{allowMerge:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.evidence")}),(0,b.jsx)(B,{label:d("settings.workflow.collectEvidence"),description:d("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:r,onChange:a=>{s(a),a?L(Z(J(),{enableEvidence:a})):(u(!1),L(Z(J(),{enableEvidence:a,commitEvidence:!1})))}}),(0,b.jsx)(B,{label:d("settings.workflow.addEvidenceToPr"),description:d("settings.workflow.addEvidenceToPrDescription"),tooltip:"Attaches collected evidence artifacts (screenshots, logs) directly to the pull request description.",id:"commit-evidence",testId:"switch-commit-evidence",checked:t,disabled:!r||!g,onChange:a=>{u(a),L(Z(J(),{commitEvidence:a}))}}),(0,b.jsx)(E,{children:d("settings.workflow.subsections.git")}),(0,b.jsx)(B,{label:d("settings.workflow.pushOnComplete"),description:d("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:i,onChange:a=>{j(a),L(Z(J(),{pushOnComplete:a}))}}),(0,b.jsx)(B,{label:d("settings.workflow.openPrOnComplete"),description:d("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:g,onChange:a=>{h(a),a?L(Z(J(),{openPr:a})):(u(!1),L(Z(J(),{openPr:a,commitEvidence:!1})))}}),(0,b.jsx)(B,{label:d("settings.workflow.watchCiAfterPush"),description:d("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:v,onChange:a=>{w(a),L(Z(J(),{ciWatchEnabled:a}))}}),(0,b.jsx)(E,{children:"Archive"}),(0,b.jsx)(B,{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:z,onChange:a=>{F(a),L(Z(J(),{autoArchiveEnabled:a}))}}),(0,b.jsx)(A,{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,b.jsx)(D,{id:"auto-archive-delay",testId:"input-auto-archive-delay",value:H,placeholder:"10",min:1,max:1440,suffix:"min",onChange:a=>{I(a)},onBlur:()=>{if(!z)return;let a=parseInt(H,10),b=Number.isNaN(a)?10:Math.min(1440,Math.max(1,a));I(String(b)),L(Z(J(),{autoArchiveDelay:String(b)}))}})})]})}function _(a){if(""===a)return;let b=parseInt(a,10);return Number.isNaN(b)||b<=0?void 0:b}function aa({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,h]=(0,c.useState)(null!=a.workflow.ciMaxFixAttempts?String(a.workflow.ciMaxFixAttempts):""),[i,j]=(0,c.useState)(null!=a.workflow.ciWatchTimeoutMs?String(Math.round(a.workflow.ciWatchTimeoutMs/1e3)):""),[k,l]=(0,c.useState)(null!=a.workflow.ciLogMaxChars?String(a.workflow.ciLogMaxChars):""),[m,n]=(0,c.useState)(null!=a.workflow.ciWatchPollIntervalSeconds?String(a.workflow.ciWatchPollIntervalSeconds):""),[o,p]=(0,c.useState)(!1!==a.workflow.hideCiStatus),r=null!=a.workflow.ciMaxFixAttempts?String(a.workflow.ciMaxFixAttempts):"",s=null!=a.workflow.ciWatchTimeoutMs?String(Math.round(a.workflow.ciWatchTimeoutMs/1e3)):"",t=null!=a.workflow.ciLogMaxChars?String(a.workflow.ciLogMaxChars):"",u=null!=a.workflow.ciWatchPollIntervalSeconds?String(a.workflow.ciWatchPollIntervalSeconds):"";function v(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function w(a){let b=_(a.ciTimeout??i);return{workflow:{ciMaxFixAttempts:_(a.ciMaxFix??f),ciWatchTimeoutMs:null!=b?1e3*b:void 0,ciLogMaxChars:_(a.ciLogMax??k),ciWatchPollIntervalSeconds:_(a.ciPollInterval??m),hideCiStatus:a.hideCiStatus??o}}}return(0,b.jsxs)(C,{icon:g.Activity,title:d("settings.ci.title"),description:d("settings.ci.description"),testId:"ci-settings-section",tooltip:d("settings.ci.hint"),tooltipLinks:[{label:d("settings.ci.links.cicdPipeline"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/development/cicd.md"},{label:d("settings.ci.links.ciSecurityGates"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/003-cicd-security-gates/spec.md"}],children:[(0,b.jsx)(A,{label:d("settings.ci.maxFixAttempts"),description:d("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,b.jsx)(D,{id:"ci-max-fix",testId:"ci-max-fix-input",placeholder:"3",value:f,onChange:h,onBlur:()=>{f!==r&&v(w({ciMaxFix:f}))},min:1,max:10})}),(0,b.jsx)(A,{label:d("settings.ci.watchTimeout"),description:d("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,b.jsx)(D,{id:"ci-timeout",testId:"ci-timeout-input",placeholder:"300",value:i,onChange:j,onBlur:()=>{i!==s&&v(w({ciTimeout:i}))},min:30,step:30,suffix:"sec"})}),(0,b.jsx)(A,{label:d("settings.ci.maxLogSize"),description:d("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,b.jsx)(D,{id:"ci-log-max",testId:"ci-log-max-input",placeholder:"50000",value:k,onChange:l,onBlur:()=>{k!==t&&v(w({ciLogMax:k}))},min:1e3,step:5e3,suffix:"chars"})}),(0,b.jsx)(A,{label:d("settings.ci.pollInterval"),description:d("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,b.jsx)(D,{id:"ci-poll-interval",testId:"ci-poll-interval-input",placeholder:"30",value:m,onChange:n,onBlur:()=>{m!==u&&v(w({ciPollInterval:m}))},min:5,step:5,suffix:"sec"})}),(0,b.jsx)(B,{label:d("settings.ci.hideCiStatus"),description:d("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:o,onChange:a=>{p(a),v(w({hideCiStatus:a}))}})]})}var ab=a.i(48972),ac=a.i(59653),ad=a.i(80303),ae=a.i(95819),af=a.i(47427),ag=a.i(60380),ah=a.i(41387),ai=a.i(97045),aj=a.i(30419),ak=a.i(69471),al=["PageUp","PageDown"],am=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],an={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},ao="Slider",[ap,aq,ar]=(0,ak.createCollection)(ao),[as,at]=(0,ae.createContextScope)(ao,[ar]),[au,av]=as(ao),aw=c.forwardRef((a,d)=>{let{name:e,min:f=0,max:g=100,step:h=1,orientation:i="horizontal",disabled:j=!1,minStepsBetweenThumbs:k=0,defaultValue:l=[f],value:m,onValueChange:n=()=>{},onValueCommit:o=()=>{},inverted:p=!1,form:q,...r}=a,s=c.useRef(new Set),t=c.useRef(0),u="horizontal"===i,[v=[],w]=(0,af.useControllableState)({prop:m,defaultProp:l,onChange:a=>{let b=[...s.current];b[t.current]?.focus(),n(a)}}),x=c.useRef(v);function y(a,b,{commit:c}={commit:!1}){let d,e=(String(h).split(".")[1]||"").length,i=Math.round((Math.round((a-f)/h)*h+f)*(d=Math.pow(10,e)))/d,j=(0,ab.clamp)(i,[f,g]);w((a=[])=>{let d=function(a=[],b,c){let d=[...a];return d[c]=b,d.sort((a,b)=>a-b)}(a,j,b);if(!function(a,b){if(b>0)return Math.min(...a.slice(0,-1).map((b,c)=>a[c+1]-b))>=b;return!0}(d,k*h))return a;{t.current=d.indexOf(j);let b=String(d)!==String(a);return b&&c&&o(d),b?d:a}})}return(0,b.jsx)(au,{scope:a.__scopeSlider,name:e,disabled:j,min:f,max:g,valueIndexToChangeRef:t,thumbs:s.current,values:v,orientation:i,form:q,children:(0,b.jsx)(ap.Provider,{scope:a.__scopeSlider,children:(0,b.jsx)(ap.Slot,{scope:a.__scopeSlider,children:(0,b.jsx)(u?az:aA,{"aria-disabled":j,"data-disabled":j?"":void 0,...r,ref:d,onPointerDown:(0,ac.composeEventHandlers)(r.onPointerDown,()=>{j||(x.current=v)}),min:f,max:g,inverted:p,onSlideStart:j?void 0:function(a){let b=function(a,b){if(1===a.length)return 0;let c=a.map(a=>Math.abs(a-b)),d=Math.min(...c);return c.indexOf(d)}(v,a);y(a,b)},onSlideMove:j?void 0:function(a){y(a,t.current)},onSlideEnd:j?void 0:function(){let a=x.current[t.current];v[t.current]!==a&&o(v)},onHomeKeyDown:()=>!j&&y(f,0,{commit:!0}),onEndKeyDown:()=>!j&&y(g,v.length-1,{commit:!0}),onStepKeyDown:({event:a,direction:b})=>{if(!j){let c=al.includes(a.key)||a.shiftKey&&am.includes(a.key),d=t.current;y(v[d]+h*(c?10:1)*b,d,{commit:!0})}}})})})})});aw.displayName=ao;var[ax,ay]=as(ao,{startEdge:"left",endEdge:"right",size:"width",direction:1}),az=c.forwardRef((a,d)=>{let{min:e,max:f,dir:g,inverted:h,onSlideStart:i,onSlideMove:j,onSlideEnd:k,onStepKeyDown:l,...m}=a,[n,o]=c.useState(null),p=(0,ad.useComposedRefs)(d,a=>o(a)),q=c.useRef(void 0),r=(0,ag.useDirection)(g),s="ltr"===r,t=s&&!h||!s&&h;function u(a){let b=q.current||n.getBoundingClientRect(),c=aL([0,b.width],t?[e,f]:[f,e]);return q.current=b,c(a-b.left)}return(0,b.jsx)(ax,{scope:a.__scopeSlider,startEdge:t?"left":"right",endEdge:t?"right":"left",direction:t?1:-1,size:"width",children:(0,b.jsx)(aB,{dir:r,"data-orientation":"horizontal",...m,ref:p,style:{...m.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:a=>{let b=u(a.clientX);i?.(b)},onSlideMove:a=>{let b=u(a.clientX);j?.(b)},onSlideEnd:()=>{q.current=void 0,k?.()},onStepKeyDown:a=>{let b=an[t?"from-left":"from-right"].includes(a.key);l?.({event:a,direction:b?-1:1})}})})}),aA=c.forwardRef((a,d)=>{let{min:e,max:f,inverted:g,onSlideStart:h,onSlideMove:i,onSlideEnd:j,onStepKeyDown:k,...l}=a,m=c.useRef(null),n=(0,ad.useComposedRefs)(d,m),o=c.useRef(void 0),p=!g;function q(a){let b=o.current||m.current.getBoundingClientRect(),c=aL([0,b.height],p?[f,e]:[e,f]);return o.current=b,c(a-b.top)}return(0,b.jsx)(ax,{scope:a.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:(0,b.jsx)(aB,{"data-orientation":"vertical",...l,ref:n,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:a=>{let b=q(a.clientY);h?.(b)},onSlideMove:a=>{let b=q(a.clientY);i?.(b)},onSlideEnd:()=>{o.current=void 0,j?.()},onStepKeyDown:a=>{let b=an[p?"from-bottom":"from-top"].includes(a.key);k?.({event:a,direction:b?-1:1})}})})}),aB=c.forwardRef((a,c)=>{let{__scopeSlider:d,onSlideStart:e,onSlideMove:f,onSlideEnd:g,onHomeKeyDown:h,onEndKeyDown:i,onStepKeyDown:j,...k}=a,l=av(ao,d);return(0,b.jsx)(aj.Primitive.span,{...k,ref:c,onKeyDown:(0,ac.composeEventHandlers)(a.onKeyDown,a=>{"Home"===a.key?(h(a),a.preventDefault()):"End"===a.key?(i(a),a.preventDefault()):al.concat(am).includes(a.key)&&(j(a),a.preventDefault())}),onPointerDown:(0,ac.composeEventHandlers)(a.onPointerDown,a=>{let b=a.target;b.setPointerCapture(a.pointerId),a.preventDefault(),l.thumbs.has(b)?b.focus():e(a)}),onPointerMove:(0,ac.composeEventHandlers)(a.onPointerMove,a=>{a.target.hasPointerCapture(a.pointerId)&&f(a)}),onPointerUp:(0,ac.composeEventHandlers)(a.onPointerUp,a=>{let b=a.target;b.hasPointerCapture(a.pointerId)&&(b.releasePointerCapture(a.pointerId),g(a))})})}),aC="SliderTrack",aD=c.forwardRef((a,c)=>{let{__scopeSlider:d,...e}=a,f=av(aC,d);return(0,b.jsx)(aj.Primitive.span,{"data-disabled":f.disabled?"":void 0,"data-orientation":f.orientation,...e,ref:c})});aD.displayName=aC;var aE="SliderRange",aF=c.forwardRef((a,d)=>{let{__scopeSlider:e,...f}=a,g=av(aE,e),h=ay(aE,e),i=c.useRef(null),j=(0,ad.useComposedRefs)(d,i),k=g.values.length,l=g.values.map(a=>aK(a,g.min,g.max)),m=k>1?Math.min(...l):0,n=100-Math.max(...l);return(0,b.jsx)(aj.Primitive.span,{"data-orientation":g.orientation,"data-disabled":g.disabled?"":void 0,...f,ref:j,style:{...a.style,[h.startEdge]:m+"%",[h.endEdge]:n+"%"}})});aF.displayName=aE;var aG="SliderThumb",aH=c.forwardRef((a,d)=>{let e=aq(a.__scopeSlider),[f,g]=c.useState(null),h=(0,ad.useComposedRefs)(d,a=>g(a)),i=c.useMemo(()=>f?e().findIndex(a=>a.ref.current===f):-1,[e,f]);return(0,b.jsx)(aI,{...a,ref:h,index:i})}),aI=c.forwardRef((a,d)=>{var e,f,g,h,i;let j,k,{__scopeSlider:l,index:m,name:n,...o}=a,p=av(aG,l),q=ay(aG,l),[r,s]=c.useState(null),t=(0,ad.useComposedRefs)(d,a=>s(a)),u=!r||p.form||!!r.closest("form"),v=(0,ai.useSize)(r),w=p.values[m],x=void 0===w?0:aK(w,p.min,p.max),y=(e=m,(f=p.values.length)>2?`Value ${e+1} of ${f}`:2===f?["Minimum","Maximum"][e]:void 0),z=v?.[q.size],A=z?(g=z,h=x,i=q.direction,k=aL([0,50],[0,j=g/2]),(j-k(h)*i)*i):0;return c.useEffect(()=>{if(r)return p.thumbs.add(r),()=>{p.thumbs.delete(r)}},[r,p.thumbs]),(0,b.jsxs)("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[q.startEdge]:`calc(${x}% + ${A}px)`},children:[(0,b.jsx)(ap.ItemSlot,{scope:a.__scopeSlider,children:(0,b.jsx)(aj.Primitive.span,{role:"slider","aria-label":a["aria-label"]||y,"aria-valuemin":p.min,"aria-valuenow":w,"aria-valuemax":p.max,"aria-orientation":p.orientation,"data-orientation":p.orientation,"data-disabled":p.disabled?"":void 0,tabIndex:p.disabled?void 0:0,...o,ref:t,style:void 0===w?{display:"none"}:a.style,onFocus:(0,ac.composeEventHandlers)(a.onFocus,()=>{p.valueIndexToChangeRef.current=m})})}),u&&(0,b.jsx)(aJ,{name:n??(p.name?p.name+(p.values.length>1?"[]":""):void 0),form:p.form,value:w},m)]})});aH.displayName=aG;var aJ=c.forwardRef(({__scopeSlider:a,value:d,...e},f)=>{let g=c.useRef(null),h=(0,ad.useComposedRefs)(g,f),i=(0,ah.usePrevious)(d);return c.useEffect(()=>{let a=g.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value").set;if(i!==d&&b){let c=new Event("input",{bubbles:!0});b.call(a,d),a.dispatchEvent(c)}},[i,d]),(0,b.jsx)(aj.Primitive.input,{style:{display:"none"},...e,ref:h,defaultValue:d})});function aK(a,b,c){return(0,ab.clamp)(100/(c-b)*(a-b),[0,100])}function aL(a,b){return c=>{if(a[0]===a[1]||b[0]===b[1])return b[0];let d=(b[1]-b[0])/(a[1]-a[0]);return b[0]+d*(c-a[0])}}aJ.displayName="RadioBubbleInput",a.s(["Range",0,aF,"Root",0,aw,"Slider",0,aw,"SliderRange",0,aF,"SliderThumb",0,aH,"SliderTrack",0,aD,"Thumb",0,aH,"Track",0,aD,"createSliderScope",0,at],40432);var aM=a.i(40432),aM=aM;function aN({className:a,defaultValue:d,value:e,min:f=0,max:g=100,...h}){let i=c.useMemo(()=>Array.isArray(e)?e:Array.isArray(d)?d:[f,g],[e,d,f,g]);return(0,b.jsxs)(aM.Root,{"data-slot":"slider",defaultValue:d,value:e,min:f,max:g,className:(0,r.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",a),...h,children:[(0,b.jsx)(aM.Track,{"data-slot":"slider-track",className:(0,r.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,b.jsx)(aM.Range,{"data-slot":"slider-range",className:(0,r.cn)("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:i.length},(a,c)=>(0,b.jsx)(aM.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"},c))]})}let aO=[60,120,300,600,900,1800,2700,3600,7200,10800,14400,21600,28800,43200,86400],aP=aO.length-1;function aQ(a){let b=0,c=Math.abs(a-aO[0]);for(let d=1;d<aO.length;d++){let e=Math.abs(a-aO[d]);e<c&&(c=e,b=d)}return b}function aR({id:a,testId:d,value:e,onChange:f,onBlur:g,defaultSeconds:h=1800}){var i;let j,k,l=(""===e?h:parseInt(e,10))||h,[m,n]=(0,c.useState)(()=>aQ(l)),o=aQ(l);o!==m&&aO[m]!==l&&n(o);let p=(0,c.useCallback)(([a])=>{n(a),f(String(aO[a]))},[f]);return(0,b.jsxs)("div",{className:"flex w-55 items-center gap-2",children:[(0,b.jsx)(aN,{id:a,"data-testid":d,min:0,max:aP,step:1,value:[m],onValueChange:p,onValueCommit:()=>g(),className:"min-w-0 flex-1"}),(0,b.jsx)("span",{className:"text-muted-foreground shrink-0 text-end text-xs tabular-nums",children:(j=Math.floor((i=aO[m])/3600),k=Math.round(i%3600/60),0===j?`${k}m`:0===k?`${j}h`:`${j}h ${k}m`)})]})}function aS(a){if(void 0===a)return;let b=function(a){if(""===a)return;let b=parseInt(a,10);return Number.isNaN(b)||b<=0?void 0:b}(a);return null!=b?1e3*b:void 0}function aT({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.workflow.stageTimeouts,g=a.workflow.analyzeRepoTimeouts,[h,i]=(0,c.useState)(String(Math.round((f?.analyzeMs??18e5)/1e3))),[j,k]=(0,c.useState)(String(Math.round((f?.requirementsMs??18e5)/1e3))),[m,n]=(0,c.useState)(String(Math.round((f?.researchMs??18e5)/1e3))),[o,p]=(0,c.useState)(String(Math.round((f?.planMs??18e5)/1e3))),[r,s]=(0,c.useState)(String(Math.round((f?.implementMs??18e5)/1e3))),[t,u]=(0,c.useState)(String(Math.round((f?.mergeMs??18e5)/1e3))),[v,w]=(0,c.useState)(String(Math.round((g?.analyzeMs??6e5)/1e3))),x=f?.analyzeMs!=null?String(Math.round(f.analyzeMs/1e3)):"",y=f?.requirementsMs!=null?String(Math.round(f.requirementsMs/1e3)):"",z=f?.researchMs!=null?String(Math.round(f.researchMs/1e3)):"",B=f?.planMs!=null?String(Math.round(f.planMs/1e3)):"",D=f?.implementMs!=null?String(Math.round(f.implementMs/1e3)):"",F=f?.mergeMs!=null?String(Math.round(f.mergeMs/1e3)):"",H=g?.analyzeMs!=null?String(Math.round(g.analyzeMs/1e3)):"";function I(a){return{workflow:{stageTimeouts:{analyzeMs:aS(a.analyzeTimeout??h),requirementsMs:aS(a.requirementsTimeout??j),researchMs:aS(a.researchTimeout??m),planMs:aS(a.planTimeout??o),implementMs:aS(a.implementTimeout??r),mergeMs:aS(a.mergeTimeout??t)},analyzeRepoTimeouts:{analyzeMs:aS(a.analyzeRepoTimeout??v)}}}}function J(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:l.Timer,title:d("settings.stageTimeouts.title"),description:d("settings.stageTimeouts.description"),testId:"stage-timeouts-settings-section",tooltip:d("settings.stageTimeouts.hint"),children:[(0,b.jsx)(E,{children:d("settings.stageTimeouts.subsections.featureAgent")}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.analyze"),description:d("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze",children:(0,b.jsx)(aR,{id:"timeout-analyze",testId:"timeout-analyze-input",value:h,onChange:i,onBlur:()=>{h!==x&&J(I({analyzeTimeout:h}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.requirements"),description:d("settings.stageTimeouts.requirementsDescription"),htmlFor:"timeout-requirements",children:(0,b.jsx)(aR,{id:"timeout-requirements",testId:"timeout-requirements-input",value:j,onChange:k,onBlur:()=>{j!==y&&J(I({requirementsTimeout:j}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.research"),description:d("settings.stageTimeouts.researchDescription"),htmlFor:"timeout-research",children:(0,b.jsx)(aR,{id:"timeout-research",testId:"timeout-research-input",value:m,onChange:n,onBlur:()=>{m!==z&&J(I({researchTimeout:m}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.plan"),description:d("settings.stageTimeouts.planDescription"),htmlFor:"timeout-plan",children:(0,b.jsx)(aR,{id:"timeout-plan",testId:"timeout-plan-input",value:o,onChange:p,onBlur:()=>{o!==B&&J(I({planTimeout:o}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.implement"),description:d("settings.stageTimeouts.implementDescription"),htmlFor:"timeout-implement",children:(0,b.jsx)(aR,{id:"timeout-implement",testId:"timeout-implement-input",value:r,onChange:s,onBlur:()=>{r!==D&&J(I({implementTimeout:r}))},defaultSeconds:1800})}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.merge"),description:d("settings.stageTimeouts.mergeDescription"),htmlFor:"timeout-merge",children:(0,b.jsx)(aR,{id:"timeout-merge",testId:"timeout-merge-input",value:t,onChange:u,onBlur:()=>{t!==F&&J(I({mergeTimeout:t}))},defaultSeconds:1800})}),(0,b.jsx)(E,{children:d("settings.stageTimeouts.subsections.analyzeRepoAgent")}),(0,b.jsx)(A,{label:d("settings.stageTimeouts.analyze"),description:d("settings.stageTimeouts.analyzeDescription"),htmlFor:"timeout-analyze-repo",children:(0,b.jsx)(aR,{id:"timeout-analyze-repo",testId:"timeout-analyze-repo-input",value:v,onChange:w,onBlur:()=>{v!==H&&J(I({analyzeRepoTimeout:v}))},defaultSeconds:600})})]})}function aU({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,g]=(0,c.useState)(a.notifications.inApp.enabled),[h,j]=(0,c.useState)({...a.notifications.events});function k(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function l(a={}){return{notifications:{inApp:{enabled:a.inApp??f},events:a.events??h}}}return(0,b.jsxs)(C,{icon:i,title:d("settings.notifications.title"),description:d("settings.notifications.sectionDescription"),testId:"notification-settings-section",tooltip:d("settings.notifications.hint"),tooltipLinks:[{label:d("settings.notifications.links.notificationSystem"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/021-agent-notifications/spec.yaml"}],children:[(0,b.jsx)(E,{children:d("settings.notifications.channels")}),(0,b.jsx)(B,{label:d("settings.notifications.inAppLabel"),description:d("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:f,onChange:a=>{g(a),k(l({inApp:a}))}}),(0,b.jsx)(E,{children:d("settings.notifications.subsections.agentEvents")}),(0,b.jsx)(B,{label:d("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:h.agentStarted,onChange:a=>{let b={...h,agentStarted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.phaseCompleted,onChange:a=>{let b={...h,phaseCompleted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.waitingApproval,onChange:a=>{let b={...h,waitingApproval:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.agentCompleted,onChange:a=>{let b={...h,agentCompleted:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.agentFailed,onChange:a=>{let b={...h,agentFailed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(E,{children:d("settings.notifications.subsections.pullRequestEvents")}),(0,b.jsx)(B,{label:d("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:h.prMerged,onChange:a=>{let b={...h,prMerged:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.prClosed,onChange:a=>{let b={...h,prClosed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.prChecksPassed,onChange:a=>{let b={...h,prChecksPassed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.prChecksFailed,onChange:a=>{let b={...h,prChecksFailed:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.prBlocked,onChange:a=>{let b={...h,prBlocked:a};j(b),k(l({events:b}))}}),(0,b.jsx)(B,{label:d("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:h.mergeReviewReady,onChange:a=>{let b={...h,mergeReviewReady:a};j(b),k(l({events:b}))}})]})}function aV({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.featureFlags??{skills:!1,envDeploy:!1,debug:!1,githubImport:!1,adoptBranch:!1,gitRebaseSync:!1,reactFileManager:!1,plugins:!1,mcpServers:!1},[g,h]=(0,c.useState)({...f});function i(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:j,title:d("settings.featureFlags.title"),description:d("settings.featureFlags.sectionDescription"),badge:d("settings.featureFlags.badge"),testId:"feature-flags-settings-section",tooltip:d("settings.featureFlags.hint"),children:[(0,b.jsx)(B,{label:d("settings.featureFlags.skills"),description:d("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:g.skills,onChange:a=>{let b={...g,skills:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.deployments"),description:d("settings.featureFlags.deploymentsDescription"),tooltip:"Enables experimental deployment features for environment management.",id:"flag-envDeploy",testId:"switch-flag-envDeploy",checked:g.envDeploy,onChange:a=>{let b={...g,envDeploy:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.debug"),description:d("settings.featureFlags.debugDescription"),tooltip:"Shows additional debugging information in the UI for troubleshooting.",id:"flag-debug",testId:"switch-flag-debug",checked:g.debug,onChange:a=>{let b={...g,debug:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.githubImport"),description:d("settings.featureFlags.githubImportDescription"),tooltip:"Enables importing repositories directly from GitHub.",id:"flag-githubImport",testId:"switch-flag-githubImport",checked:g.githubImport,onChange:a=>{let b={...g,githubImport:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.adoptBranch"),description:d("settings.featureFlags.adoptBranchDescription"),tooltip:"Enables adopting existing git branches as ShipIT features.",id:"flag-adoptBranch",testId:"switch-flag-adoptBranch",checked:g.adoptBranch,onChange:a=>{let b={...g,adoptBranch:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.gitRebaseSync"),description:d("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:g.gitRebaseSync,onChange:a=>{let b={...g,gitRebaseSync:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.reactFileManager"),description:d("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:g.reactFileManager,onChange:a=>{let b={...g,reactFileManager:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.plugins"),description:a.litellmProxy?.baseUrl?d("settings.featureFlags.pluginsDescription"):`${d("settings.featureFlags.pluginsDescription")} — ${d("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:g.plugins,disabled:!a.litellmProxy?.baseUrl,onChange:a=>{let b={...g,plugins:a};h(b),i({featureFlags:b})}}),(0,b.jsx)(B,{label:d("settings.featureFlags.mcpServers"),description:a.litellmProxy?.baseUrl?d("settings.featureFlags.mcpServersDescription"):`${d("settings.featureFlags.mcpServersDescription")} — ${d("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:g.mcpServers,disabled:!a.litellmProxy?.baseUrl,onChange:a=>{let b={...g,mcpServers:a};h(b),i({featureFlags:b})}})]})}function aW({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.interactiveAgent??{enabled:!0,autoTimeoutMinutes:15,maxConcurrentSessions:3},[g,h]=(0,c.useState)(f.enabled),[i,j]=(0,c.useState)(String(f.autoTimeoutMinutes)),[k,l]=(0,c.useState)(String(f.maxConcurrentSessions));function n(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}return(0,b.jsxs)(C,{icon:m.MessageSquare,title:d("settings.interactiveAgent.title"),description:d("settings.interactiveAgent.description"),testId:"interactive-agent-settings-section",tooltip:d("settings.interactiveAgent.hint"),children:[(0,b.jsx)(B,{label:d("settings.interactiveAgent.enableChatTab"),description:d("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:g,onChange:a=>{h(a),n({interactiveAgent:{enabled:a,autoTimeoutMinutes:parseInt(i,10)||15,maxConcurrentSessions:parseInt(k,10)||3}})}}),(0,b.jsx)(A,{label:d("settings.interactiveAgent.autoTimeout"),description:d("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,b.jsx)(D,{id:"interactive-agent-timeout",testId:"input-interactive-agent-timeout",value:i,placeholder:"15",min:1,max:120,suffix:"min",onChange:j,onBlur:()=>{let a=parseInt(i,10),b=Number.isNaN(a)?15:Math.min(120,Math.max(1,a));j(String(b)),n({interactiveAgent:{enabled:g,autoTimeoutMinutes:b,maxConcurrentSessions:parseInt(k,10)||3}})}})}),(0,b.jsx)(A,{label:d("settings.interactiveAgent.maxConcurrentSessions"),description:d("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,b.jsx)(D,{id:"interactive-agent-sessions",testId:"input-interactive-agent-sessions",value:k,placeholder:"3",min:1,max:10,onChange:l,onBlur:()=>{let a=parseInt(k,10),b=Number.isNaN(a)?3:Math.min(10,Math.max(1,a));l(String(b)),n({interactiveAgent:{enabled:g,autoTimeoutMinutes:parseInt(i,10)||15,maxConcurrentSessions:b}})}})})]})}function aX({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.fabLayout??{swapPosition:!1},[g,h]=(0,c.useState)(f.swapPosition);return(0,b.jsx)(C,{icon:n,title:d("settings.fabLayout.title"),description:d("settings.fabLayout.description"),testId:"fab-layout-settings-section",tooltip:d("settings.fabLayout.hint"),children:(0,b.jsx)(B,{label:d("settings.fabLayout.swapPosition"),description:d("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:g,onChange:a=>{var b;h(a),b={fabLayout:{swapPosition:a}},e(async()=>{let a=await K(b);a.success||G.toast.error(a.error??d("settings.failedToSave"))})}})})}function aY({shipitAiHome:a,dbFileSize:c}){let{t:d}=(0,q.useTranslation)("web");return(0,b.jsxs)(C,{icon:k,title:d("settings.database.title"),description:d("settings.database.sectionDescription"),testId:"database-settings-section",tooltip:d("settings.database.hint"),tooltipLinks:[{label:d("settings.database.links.settingsService"),href:"https://github.com/jrmatherly/shipit/blob/main/docs/architecture/settings-service.md"},{label:d("settings.database.links.settingsSpec"),href:"https://github.com/jrmatherly/shipit/blob/main/specs/005-global-settings-service/spec.md"}],children:[(0,b.jsx)(A,{label:d("settings.database.location"),description:d("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,b.jsx)("span",{className:"text-muted-foreground max-w-50 truncate font-mono text-xs","data-testid":"shipit-ai-home-path",children:a})}),(0,b.jsx)(A,{label:d("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,b.jsx)("span",{className:"text-muted-foreground text-xs","data-testid":"db-file-size",children:c})})]})}var aZ=a.i(98680),aZ=aZ,a$=a.i(74605),a$=a$;let a_=(0,J.createServerReference)("40fd64c4bf0dcdef52a9cf199b2f48110acd18fd8b",J.callServer,void 0,J.findSourceMapURL,"addMarketplaceAction");var a0=a.i(90920),a1=a.i(18948);function a2({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),[f,g]=(0,c.useState)(a.litellmProxy?.baseUrl??""),[h,i]=(0,c.useState)(a.litellmProxy?.apiKey??""),[j,k]=(0,c.useState)("idle"),[l,m]=(0,c.useState)(!1),n=a.litellmProxy?.baseUrl??"",o=a.litellmProxy?.apiKey??"";function r(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function s(a){let b=a?.baseUrl??f;return{litellmProxy:{baseUrl:b,apiKey:a?.apiKey??h,marketplaceEnabled:!!b}}}async function t(){if(f){m(!0),k("idle");try{let a=`${f.replace(/\/+$/,"")}/claude-code/marketplace.json`,b=await a_(a);k(b.success?"success":"failed"),b.success?G.toast.success(d("settings.litellmProxy.testSuccess")):G.toast.error(d("settings.litellmProxy.testFailed"))}catch{k("failed"),G.toast.error(d("settings.litellmProxy.testFailed"))}finally{m(!1)}}}return(0,b.jsxs)(C,{icon:p.Server,title:d("settings.litellmProxy.title"),description:d("settings.litellmProxy.description"),testId:"litellm-proxy-settings-section",tooltip:d("settings.litellmProxy.hint"),children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.baseUrl"),description:d("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,b.jsx)(a0.Input,{id:"litellm-proxy-url","data-testid":"litellm-proxy-url-input",type:"text",placeholder:"http://localhost:4000",value:f,onChange:a=>{g(a.target.value),k("idle")},onBlur:()=>{f!==n&&r(s({baseUrl:f}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.apiKey"),description:d("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,b.jsx)(a0.Input,{id:"litellm-api-key","data-testid":"litellm-api-key-input",type:"password",placeholder:"sk-...",value:h,onChange:a=>i(a.target.value),onBlur:()=>{h!==o&&r(s({apiKey:h}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.testConnection"),tooltip:"Attempt to connect to the proxy and fetch the marketplace catalog to verify the configuration is correct.",children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(a1.Button,{variant:"outline",size:"sm","data-testid":"litellm-test-connection-btn",disabled:!f||l,onClick:t,className:"cursor-pointer text-xs",children:l?d("settings.saving"):d("settings.litellmProxy.testConnection")}),"success"===j&&(0,b.jsx)(aZ.default,{className:"h-4 w-4 text-emerald-500","data-testid":"litellm-test-success"}),"failed"===j&&(0,b.jsx)(a$.default,{className:"text-destructive h-4 w-4","data-testid":"litellm-test-failed"})]})})]})}let a3=(0,h.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 a4=a.i(79620);let a5=new Set(["claude-code","gemini-cli","codex-cli"]),a6=new Set(["cursor","copilot-cli"]);function a7({settings:a}){let{t:d}=(0,q.useTranslation)("web"),[,e]=(0,c.useTransition)(),f=a.agent.type,g=a.litellmProxy?.claudeCode,[h,i]=(0,c.useState)(function(a){switch(a.agent.type){case"claude-code":return a.litellmProxy?.claudeCode?.routingMode??L.LiteLLMProxyRoutingMode.direct;case"gemini-cli":return a.litellmProxy?.geminiCli?.routingMode??L.LiteLLMProxyRoutingMode.direct;case"codex-cli":return a.litellmProxy?.codexCli?.routingMode??L.LiteLLMProxyRoutingMode.direct;default:return L.LiteLLMProxyRoutingMode.direct}}(a)),[j,k]=(0,c.useState)(g?.customHeaders??""),[l,m]=(0,c.useState)(g?.sonnetModel??""),[n,o]=(0,c.useState)(g?.haikuModel??""),[p,r]=(0,c.useState)(g?.opusModel??""),s=g?.customHeaders??"",t=g?.sonnetModel??"",u=g?.haikuModel??"",v=g?.opusModel??"",w=h!==L.LiteLLMProxyRoutingMode.direct,x=a5.has(f),y=a6.has(f),z=a.litellmProxy?.baseUrl??"",B=a.litellmProxy?.apiKey??"";function D(a){e(async()=>{let b=await K(a);b.success||G.toast.error(b.error??d("settings.failedToSave"))})}function E(a){let b=function(a){switch(a){case"claude-code":return"claudeCode";case"gemini-cli":return"geminiCli";case"codex-cli":return"codexCli";default:return null}}(f);return b?"claude-code"===f?{litellmProxy:{claudeCode:{routingMode:a?.routingMode??h,customHeaders:a?.customHeaders??j,sonnetModel:a?.sonnetModel??l,haikuModel:a?.haikuModel??n,opusModel:a?.opusModel??p}}}:{litellmProxy:{[b]:{routingMode:a?.routingMode??h}}}:{}}if(!x&&!y)return(0,b.jsx)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:(0,b.jsx)(A,{label:"",description:d("settings.litellmProxy.routing.notSupported"),children:(0,b.jsx)("span",{})})});if(y){let a="cursor"===f,c=z?a?`${z.replace(/\/+$/,"")}/cursor`:z:"";return(0,b.jsx)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:(0,b.jsx)(A,{label:a?d("settings.litellmProxy.routing.cursorInstructions"):d("settings.litellmProxy.routing.copilotInstructions"),description:a?d("settings.litellmProxy.routing.cursorDescription"):d("settings.litellmProxy.routing.copilotDescription"),children:(0,b.jsxs)("div",{className:"w-64 space-y-2",children:[(0,b.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:c}),a&&B?(0,b.jsx)("code",{className:"bg-muted block rounded px-2 py-1 text-xs break-all",children:B}):null]})})})}return(0,b.jsxs)(C,{icon:a3,title:d("settings.litellmProxy.routing.title"),description:d("settings.litellmProxy.routing.description"),testId:"litellm-proxy-routing-section",tooltip:d("settings.litellmProxy.routing.hint"),children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.mode"),description:d("settings.litellmProxy.routing.modeDescription"),htmlFor:"litellm-routing-mode",children:(0,b.jsxs)(H.Select,{value:h,onValueChange:function(a){i(a),D(E({routingMode:a}))},children:[(0,b.jsx)(H.SelectTrigger,{id:"litellm-routing-mode","data-testid":"litellm-routing-mode-select",className:"w-48 text-xs",children:(0,b.jsx)(H.SelectValue,{})}),(0,b.jsxs)(H.SelectContent,{children:[(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.direct,children:d("settings.litellmProxy.routing.modeDirect")}),(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.proxy,children:d("settings.litellmProxy.routing.modeProxy")}),"claude-code"===f&&(0,b.jsx)(H.SelectItem,{value:L.LiteLLMProxyRoutingMode.passthrough,children:d("settings.litellmProxy.routing.modePassthrough")})]})]})}),h===L.LiteLLMProxyRoutingMode.passthrough&&(0,b.jsx)(A,{label:"",description:d("settings.litellmProxy.routing.passthroughHelp"),children:(0,b.jsx)("span",{})}),w&&"claude-code"===f?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.customHeaders"),description:d("settings.litellmProxy.routing.customHeadersDescription"),htmlFor:"litellm-custom-headers",children:(0,b.jsx)(a4.Textarea,{id:"litellm-custom-headers","data-testid":"litellm-custom-headers-input",placeholder:"x-litellm-customer-id: my-user\nx-litellm-tags: project:acme",value:j,onChange:a=>k(a.target.value),onBlur:()=>{j!==s&&D(E({customHeaders:j}))},rows:3,className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.sonnetModel"),description:d("settings.litellmProxy.routing.modelOverrideDescription"),htmlFor:"litellm-sonnet-model",children:(0,b.jsx)(a0.Input,{id:"litellm-sonnet-model","data-testid":"litellm-sonnet-model-input",type:"text",placeholder:"claude-sonnet-4-6",value:l,onChange:a=>m(a.target.value),onBlur:()=>{l!==t&&D(E({sonnetModel:l}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.haikuModel"),htmlFor:"litellm-haiku-model",children:(0,b.jsx)(a0.Input,{id:"litellm-haiku-model","data-testid":"litellm-haiku-model-input",type:"text",placeholder:"claude-haiku-4-5",value:n,onChange:a=>o(a.target.value),onBlur:()=>{n!==u&&D(E({haikuModel:n}))},className:"w-64 text-xs"})}),(0,b.jsx)(A,{label:d("settings.litellmProxy.routing.opusModel"),htmlFor:"litellm-opus-model",children:(0,b.jsx)(a0.Input,{id:"litellm-opus-model","data-testid":"litellm-opus-model-input",type:"text",placeholder:"claude-opus-4-6",value:p,onChange:a=>r(a.target.value),onBlur:()=>{p!==v&&D(E({opusModel:p}))},className:"w-64 text-xs"})})]}):null]})}let a8=[{id:"agent",labelKey:"settings.sections.agent",icon:d.Bot},{id:"environment",labelKey:"settings.sections.environment",icon:e.Terminal},{id:"workflow",labelKey:"settings.sections.workflow",icon:f.GitBranch},{id:"ci",labelKey:"settings.sections.ci",icon:g.Activity},{id:"stage-timeouts",labelKey:"settings.sections.timeouts",icon:l.Timer},{id:"notifications",labelKey:"settings.sections.notifications",icon:i},{id:"feature-flags",labelKey:"settings.sections.flags",icon:j},{id:"interactive-agent",labelKey:"settings.sections.chat",icon:m.MessageSquare},{id:"fab-layout",labelKey:"settings.sections.layout",icon:n},{id:"database",labelKey:"settings.sections.database",icon:k},{id:"litellm-proxy",labelKey:"settings.sections.proxy",icon:p.Server}],a9=[{id:"all",labelKey:"settings.sections.all",icon:o},...a8];a.s(["SettingsPageClient",0,function({settings:a,shipitAiHome:d,dbFileSize:e,availableTerminals:f,availableEditors:g,availableShells:h}){let{t:i}=(0,q.useTranslation)("web"),[j,k]=(0,c.useState)("all"),[l,m]=(0,c.useState)("agent");return(0,c.useEffect)(()=>{if("all"!==j)return;let a=a8.map(a=>document.getElementById(`section-${a.id}`)).filter(Boolean);if(0===a.length)return;let b=new IntersectionObserver(a=>{for(let b of a)b.isIntersecting&&m(b.target.id.replace("section-",""))},{rootMargin:"-65px 0px -60% 0px",threshold:0});for(let c of a)b.observe(c);return()=>b.disconnect()},[j]),(0,b.jsxs)("div",{"data-testid":"settings-page-client",className:"max-w-5xl px-8 pt-8",children:[(0,b.jsxs)("div",{className:"bg-background/95 supports-backdrop-filter:bg-background/80 sticky top-0 z-10 pb-4 backdrop-blur",children:[(0,b.jsxs)("div",{className:"mb-4 space-y-1.5",children:[(0,b.jsx)("span",{className:"text-[10px] font-bold tracking-[0.2em] text-slate-400 uppercase",children:"Developer Portal"}),(0,b.jsx)("div",{className:"flex items-baseline gap-3",children:(0,b.jsx)("h1",{className:"text-foreground text-3xl font-black tracking-tight",children:i("settings.title")})})]}),(0,b.jsx)("nav",{className:"bg-card editorial-shadow flex flex-wrap items-center gap-0.5 rounded-lg p-1",children:a9.map(a=>{let c=a.icon,d=j===a.id||"all"===j&&"all"!==a.id&&l===a.id;return(0,b.jsxs)("button",{type:"button",onClick:()=>k(a.id),className:(0,r.cn)("flex cursor-pointer items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-bold transition-all",d?"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,b.jsx)(c,{className:"h-3 w-3"}),(0,b.jsx)("span",{className:"hidden sm:inline",children:i(a.labelKey)})]},a.id)})})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-3",children:[("all"===j||"agent"===j)&&(0,b.jsx)("div",{id:"section-agent",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(F,{settings:a})}),("all"===j||"environment"===j)&&(0,b.jsx)("div",{id:"section-environment",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(Y,{settings:a,availableEditors:g,availableShells:h,availableTerminals:f})}),("all"===j||"workflow"===j)&&(0,b.jsx)("div",{id:"section-workflow",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)($,{settings:a})}),("all"===j||"ci"===j)&&(0,b.jsx)("div",{id:"section-ci",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aa,{settings:a})}),("all"===j||"stage-timeouts"===j)&&(0,b.jsx)("div",{id:"section-stage-timeouts",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aT,{settings:a})}),("all"===j||"notifications"===j)&&(0,b.jsx)("div",{id:"section-notifications",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aU,{settings:a})}),("all"===j||"feature-flags"===j)&&(0,b.jsx)("div",{id:"section-feature-flags",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aV,{settings:a})}),("all"===j||"interactive-agent"===j)&&(0,b.jsx)("div",{id:"section-interactive-agent",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aW,{settings:a})}),("all"===j||"fab-layout"===j)&&(0,b.jsx)("div",{id:"section-fab-layout",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aX,{settings:a})}),("all"===j||"database"===j)&&(0,b.jsx)("div",{id:"section-database",className:"scroll-mt-18 rounded-lg",children:(0,b.jsx)(aY,{shipitAiHome:d,dbFileSize:e})}),("all"===j||"litellm-proxy"===j)&&(0,b.jsxs)("div",{id:"section-litellm-proxy",className:"scroll-mt-18 rounded-lg",children:[(0,b.jsx)(a2,{settings:a}),a.litellmProxy?.baseUrl?(0,b.jsx)(a7,{settings:a}):null]})]})]})}],79020)}];
2
2
 
3
3
  //# sourceMappingURL=0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map