@shipit-ai/cli 1.173.1 → 1.174.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) 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 +96 -14
  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 +106 -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-card.d.ts.map +1 -1
  26. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-card.js +2 -8
  27. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.d.ts +2 -2
  28. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.d.ts.map +1 -1
  29. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.js +26 -9
  30. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.stories.d.ts +1 -1
  31. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.stories.js +1 -1
  32. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-icon.d.ts +45 -0
  33. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-icon.d.ts.map +1 -0
  34. package/dist/src/presentation/web/components/features/mcp-servers/mcp-server-icon.js +138 -0
  35. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.d.ts +2 -1
  36. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.d.ts.map +1 -1
  37. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.js +8 -8
  38. package/dist/src/presentation/web/components/features/mcp-servers/mcp-servers-page-client.stories.js +2 -2
  39. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.d.ts +17 -13
  40. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.d.ts.map +1 -1
  41. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.js +21 -34
  42. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.stories.d.ts +1 -1
  43. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.stories.d.ts.map +1 -1
  44. package/dist/src/presentation/web/components/features/mcp-servers/mcp-tool-list.stories.js +7 -8
  45. package/dist/src/presentation/web/components/features/mcp-servers/vendor-brand-icons.d.ts +29 -0
  46. package/dist/src/presentation/web/components/features/mcp-servers/vendor-brand-icons.d.ts.map +1 -0
  47. package/dist/src/presentation/web/components/features/mcp-servers/vendor-brand-icons.js +25 -0
  48. package/dist/translations/ar/web.json +8 -2
  49. package/dist/translations/de/web.json +8 -2
  50. package/dist/translations/en/web.json +8 -2
  51. package/dist/translations/es/web.json +8 -2
  52. package/dist/translations/fr/web.json +8 -2
  53. package/dist/translations/he/web.json +8 -2
  54. package/dist/translations/pt/web.json +8 -2
  55. package/dist/translations/ru/web.json +8 -2
  56. package/dist/tsconfig.build.tsbuildinfo +1 -1
  57. package/package.json +1 -1
  58. package/web/.next/BUILD_ID +1 -1
  59. package/web/.next/build-manifest.json +3 -3
  60. package/web/.next/fallback-build-manifest.json +3 -3
  61. package/web/.next/prerender-manifest.json +3 -3
  62. package/web/.next/required-server-files.js +2 -2
  63. package/web/.next/required-server-files.json +2 -2
  64. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  65. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  68. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  69. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  70. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +31 -31
  71. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  72. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  73. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  74. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  75. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  76. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
  77. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  78. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  79. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  80. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  81. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  82. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  83. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  84. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  85. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  86. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  87. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  88. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +31 -31
  89. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  90. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  91. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  92. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  93. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  94. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
  95. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  96. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  97. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  98. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  99. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  100. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  101. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  102. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  103. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  104. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  105. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  106. package/web/.next/server/app/_global-error.html +1 -1
  107. package/web/.next/server/app/_global-error.rsc +1 -1
  108. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  109. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  110. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  111. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  112. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  113. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  114. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  115. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  116. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  117. package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
  118. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  119. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  120. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  121. package/web/.next/server/app/mcp-servers/page/server-reference-manifest.json +13 -13
  122. package/web/.next/server/app/mcp-servers/page.js.nft.json +1 -1
  123. package/web/.next/server/app/mcp-servers/page_client-reference-manifest.js +1 -1
  124. package/web/.next/server/app/plugins/page/server-reference-manifest.json +15 -15
  125. package/web/.next/server/app/plugins/page.js.nft.json +1 -1
  126. package/web/.next/server/app/plugins/page_client-reference-manifest.js +1 -1
  127. package/web/.next/server/app/settings/page/server-reference-manifest.json +12 -12
  128. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  129. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  130. package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
  131. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  132. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  133. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  134. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  135. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  136. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  137. package/web/.next/server/app/version/page.js.nft.json +1 -1
  138. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  139. package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
  140. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
  141. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +2 -2
  143. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
  144. package/web/.next/server/chunks/ssr/0j.8_web_components_features_mcp-servers_mcp-servers-page-client_tsx_0dda8ih._.js +10 -0
  145. package/web/.next/server/chunks/ssr/0j.8_web_components_features_mcp-servers_mcp-servers-page-client_tsx_0dda8ih._.js.map +1 -0
  146. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
  147. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
  148. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
  149. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
  150. package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js +1 -1
  151. package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js.map +1 -1
  152. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js +1 -1
  153. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js.map +1 -1
  154. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js +1 -1
  155. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js.map +1 -1
  156. package/web/.next/server/chunks/ssr/[root-of-the-server]__0mwao26._.js +3 -0
  157. package/web/.next/server/chunks/ssr/[root-of-the-server]__0mwao26._.js.map +1 -0
  158. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js +1 -1
  159. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js.map +1 -1
  160. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
  161. package/web/.next/server/chunks/ssr/[root-of-the-server]__0tq2syh._.js +1 -1
  162. package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js +1 -1
  163. package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js.map +1 -1
  164. package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js +1 -1
  165. package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js.map +1 -1
  166. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js +1 -1
  167. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js.map +1 -1
  168. package/web/.next/server/chunks/ssr/[root-of-the-server]__13pshs0._.js +1 -1
  169. package/web/.next/server/chunks/ssr/[root-of-the-server]__13pshs0._.js.map +1 -1
  170. package/web/.next/server/chunks/ssr/_01sesw0._.js +1 -1
  171. package/web/.next/server/chunks/ssr/_01sesw0._.js.map +1 -1
  172. package/web/.next/server/chunks/ssr/_069y.js._.js +2 -2
  173. package/web/.next/server/chunks/ssr/_069y.js._.js.map +1 -1
  174. package/web/.next/server/chunks/ssr/{_1031n_-._.js → _083k45~._.js} +2 -2
  175. package/web/.next/server/chunks/ssr/{_1031n_-._.js.map → _083k45~._.js.map} +1 -1
  176. package/web/.next/server/chunks/ssr/{_12i_bjl._.js → _087x~el._.js} +2 -2
  177. package/web/.next/server/chunks/ssr/{_12i_bjl._.js.map → _087x~el._.js.map} +1 -1
  178. package/web/.next/server/chunks/ssr/_0__4si~._.js +1 -1
  179. package/web/.next/server/chunks/ssr/_0__4si~._.js.map +1 -1
  180. package/web/.next/server/chunks/ssr/_0_m17kl._.js +1 -1
  181. package/web/.next/server/chunks/ssr/_0_m17kl._.js.map +1 -1
  182. package/web/.next/server/chunks/ssr/{_0xn_dfh._.js → _0bknjp-._.js} +2 -2
  183. package/web/.next/server/chunks/ssr/{_0xn_dfh._.js.map → _0bknjp-._.js.map} +1 -1
  184. package/web/.next/server/chunks/ssr/_0d4miu.._.js +1 -1
  185. package/web/.next/server/chunks/ssr/_0d4miu.._.js.map +1 -1
  186. package/web/.next/server/chunks/ssr/_0e8ern9._.js +1 -1
  187. package/web/.next/server/chunks/ssr/_0e8ern9._.js.map +1 -1
  188. package/web/.next/server/chunks/ssr/_0fswe4r._.js +3 -0
  189. package/web/.next/server/chunks/ssr/_0fswe4r._.js.map +1 -0
  190. package/web/.next/server/chunks/ssr/{_0z6p8yi._.js → _0glox21._.js} +2 -2
  191. package/web/.next/server/chunks/ssr/{_0z6p8yi._.js.map → _0glox21._.js.map} +1 -1
  192. package/web/.next/server/chunks/ssr/_0p3~u8u._.js +2 -2
  193. package/web/.next/server/chunks/ssr/_0p3~u8u._.js.map +1 -1
  194. package/web/.next/server/chunks/ssr/_0r.3n~3._.js +1 -1
  195. package/web/.next/server/chunks/ssr/_0r.3n~3._.js.map +1 -1
  196. package/web/.next/server/chunks/ssr/_0t59q8r._.js +1 -1
  197. package/web/.next/server/chunks/ssr/_0t59q8r._.js.map +1 -1
  198. package/web/.next/server/chunks/ssr/{_096x3u~._.js → _0vq0c0x._.js} +2 -2
  199. package/web/.next/server/chunks/ssr/{_096x3u~._.js.map → _0vq0c0x._.js.map} +1 -1
  200. package/web/.next/server/chunks/ssr/_0vyfc4b._.js +1 -1
  201. package/web/.next/server/chunks/ssr/_0vyfc4b._.js.map +1 -1
  202. package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
  203. package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
  204. package/web/.next/server/chunks/ssr/_0zk-h5w._.js +1 -1
  205. package/web/.next/server/chunks/ssr/_0zk-h5w._.js.map +1 -1
  206. package/web/.next/server/chunks/ssr/_0~7lwu_._.js +1 -1
  207. package/web/.next/server/chunks/ssr/_0~7lwu_._.js.map +1 -1
  208. package/web/.next/server/chunks/ssr/_0~g5-.e._.js +3 -0
  209. package/web/.next/server/chunks/ssr/_0~g5-.e._.js.map +1 -0
  210. package/web/.next/server/chunks/ssr/_1161g9x._.js +1 -1
  211. package/web/.next/server/chunks/ssr/_1161g9x._.js.map +1 -1
  212. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_mcp-servers_page_actions_0d.r4q..js +1 -1
  213. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_mcp-servers_page_actions_0d.r4q..js.map +1 -1
  214. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js +1 -1
  215. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js.map +1 -1
  216. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js +1 -1
  217. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js.map +1 -1
  218. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js +1 -1
  219. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js.map +1 -1
  220. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_0pjb_re._.js +1 -1
  221. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
  222. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
  223. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
  224. package/web/.next/server/middleware-build-manifest.js +3 -3
  225. package/web/.next/server/pages/500.html +1 -1
  226. package/web/.next/server/server-reference-manifest.js +1 -1
  227. package/web/.next/server/server-reference-manifest.json +57 -57
  228. package/web/.next/static/chunks/{07c0dde.-8.3e.js → 030tqac1cx-fj.js} +1 -1
  229. package/web/.next/static/chunks/{0242vp5_56bjp.js → 093...bdsa2vi.js} +1 -1
  230. package/web/.next/static/chunks/0a~-dbzk6tkpw.css +1 -0
  231. package/web/.next/static/chunks/{0j~279np0vu13.js → 0c.5-5ohi38wu.js} +1 -1
  232. package/web/.next/static/chunks/{0k3fxd~lsx6h_.js → 0djvgyu139qht.js} +1 -1
  233. package/web/.next/static/chunks/{084nyl7us-xbo.js → 0etn4uwpbu0p..js} +1 -1
  234. package/web/.next/static/chunks/0fzx4yzxqtc6v.js +1 -0
  235. package/web/.next/static/chunks/{0sgbbtfp4hspl.js → 0gz0lgz7pvrb5.js} +1 -1
  236. package/web/.next/static/chunks/0iey6w_th4w6t.js +1 -0
  237. package/web/.next/static/chunks/{15lkkh2eg.w0h.js → 0mukkm1m79wpt.js} +1 -1
  238. package/web/.next/static/chunks/{0cgfywkcky60_.js → 0ou6vmrmvv4.f.js} +1 -1
  239. package/web/.next/static/chunks/{15zjq.s38l64~.js → 0q1rh6cwq8q~e.js} +1 -1
  240. package/web/.next/static/chunks/{0xjj0-wsaziot.js → 0w9~abfpfmxwe.js} +1 -1
  241. package/web/.next/static/chunks/{0vscxcwhltksg.js → 0zwhmf.myybu0.js} +3 -3
  242. package/web/.next/static/chunks/{10j-adknfho63.js → 10rtagfoabp3b.js} +1 -1
  243. package/web/.next/static/chunks/{11rfk7fre_6t2.js → 113fyg.4c74k~.js} +1 -1
  244. package/web/.next/static/chunks/{16nbcfv~__pas.js → 11n8b8mq7xbv9.js} +1 -1
  245. package/web/.next/static/chunks/11v7w0zh-u9s8.js +8 -0
  246. package/web/.next/static/chunks/{0kv2-9owuv51~.js → 164.6ma3h~kkp.js} +1 -1
  247. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b~nfa6._.js +0 -3
  248. package/web/.next/server/chunks/ssr/[root-of-the-server]__0b~nfa6._.js.map +0 -1
  249. package/web/.next/server/chunks/ssr/_0ia4o6_._.js +0 -3
  250. package/web/.next/server/chunks/ssr/_0ia4o6_._.js.map +0 -1
  251. package/web/.next/server/chunks/ssr/_0o.xc6x._.js +0 -3
  252. package/web/.next/server/chunks/ssr/_0o.xc6x._.js.map +0 -1
  253. package/web/.next/static/chunks/00h433i5-1v_-.css +0 -1
  254. package/web/.next/static/chunks/0jl9-2_wjbofj.js +0 -1
  255. package/web/.next/static/chunks/0r9cddoy0xkhk.js +0 -1
  256. package/web/.next/static/chunks/123j391jw_zg4.js +0 -1
  257. /package/web/.next/static/{soqWMnDMQRLxRyIj13kVU → G6UvAet1r3tmTZHz91Byx}/_buildManifest.js +0 -0
  258. /package/web/.next/static/{soqWMnDMQRLxRyIj13kVU → G6UvAet1r3tmTZHz91Byx}/_clientMiddlewareManifest.js +0 -0
  259. /package/web/.next/static/{soqWMnDMQRLxRyIj13kVU → G6UvAet1r3tmTZHz91Byx}/_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(18948);a.i(38702);var j=a.i(16223);a.i(55135);var k=a.i(75550),l=a.i(84117),m=a.i(58339);let n=(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 o=a.i(8685);function p({className:a,size:c=20}){return(0,b.jsxs)("svg",{className:a,width:c,height:c,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M12 4L2 20h7l3-5 3 5h7L12 4Z",fill:"#0089D6"}),(0,b.jsx)("path",{d:"M12 4l-3 5h6l-3-5Z",fill:"#54AEF0"})]})}let q=[{match:/microsoft[_-]?learn|learn\.microsoft/,inlineIcon:function({className:a,size:c=20}){return(0,b.jsxs)("svg",{className:a,width:c,height:c,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M3 6a1 1 0 0 1 1-1h6a2 2 0 0 1 2 2v13a1 1 0 0 1-1.447.894L6 18.618V7H4a1 1 0 0 1-1-1Z",fill:"#0078D4"}),(0,b.jsx)("path",{d:"M21 6a1 1 0 0 0-1-1h-6a2 2 0 0 0-2 2v13a1 1 0 0 0 1.447.894L18 18.618V7h2a1 1 0 0 0 1-1Z",fill:"#50E6FF"})]})}},{match:/foundry|ai\.azure|azure[_-]?foundry|bedrock[_-]?agentcore/,inlineIcon:p},{match:/\bazure\b/,inlineIcon:p},{match:/microsoft|\.microsoft\./,inlineIcon:function({className:a,size:c=20}){return(0,b.jsxs)("svg",{className:a,width:c,height:c,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,b.jsx)("rect",{x:"2",y:"2",width:"9",height:"9",fill:"#F25022"}),(0,b.jsx)("rect",{x:"13",y:"2",width:"9",height:"9",fill:"#7FBA00"}),(0,b.jsx)("rect",{x:"2",y:"13",width:"9",height:"9",fill:"#00A4EF"}),(0,b.jsx)("rect",{x:"13",y:"13",width:"9",height:"9",fill:"#FFB900"})]})}},{match:/github[_-]?copilot|\bcopilot\b/,simpleIconSlug:"githubcopilot"},{match:/github|api\.github/,simpleIconSlug:"github"},{match:/gitlab/,simpleIconSlug:"gitlab"},{match:/bitbucket/,simpleIconSlug:"bitbucket"},{match:/anthropic|\bclaude\b/,simpleIconSlug:"anthropic"},{match:/gemini|google[_-]?ai/,simpleIconSlug:"googlegemini"},{match:/perplexity/,simpleIconSlug:"perplexity"},{match:/deepwiki|deep[_-]?wiki/,inlineIcon:function({className:a,size:c=20}){return(0,b.jsxs)("svg",{className:a,width:c,height:c,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,b.jsx)("rect",{x:"4",y:"3",width:"13",height:"16",rx:"1.5",fill:"#6366F1"}),(0,b.jsx)("rect",{x:"7",y:"6",width:"7",height:"1.5",rx:"0.5",fill:"#E0E7FF"}),(0,b.jsx)("rect",{x:"7",y:"9",width:"7",height:"1.5",rx:"0.5",fill:"#E0E7FF"}),(0,b.jsx)("rect",{x:"7",y:"12",width:"4",height:"1.5",rx:"0.5",fill:"#E0E7FF"}),(0,b.jsx)("circle",{cx:"17",cy:"17",r:"4",fill:"none",stroke:"#F59E0B",strokeWidth:"2"}),(0,b.jsx)("line",{x1:"20",y1:"20",x2:"22",y2:"22",stroke:"#F59E0B",strokeWidth:"2",strokeLinecap:"round"})]})}},{match:/notion/,simpleIconSlug:"notion"},{match:/confluence/,simpleIconSlug:"confluence"},{match:/readthedocs/,simpleIconSlug:"readthedocs"},{match:/mintlify/,simpleIconSlug:"mintlify"},{match:/firecrawl/,inlineIcon:function({className:a,size:c=20}){return(0,b.jsxs)("svg",{className:a,width:c,height:c,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M12 2C12 2 6 8 6 13a6 6 0 0 0 12 0c0-2-1-4-2-5 0 2-1 3-2 3 0-3-2-6-2-9Z",fill:"#F26B21"}),(0,b.jsx)("path",{d:"M12 11c0 2-1.5 3-1.5 5a1.5 1.5 0 0 0 3 0c0-1.5-1.5-2.5-1.5-5Z",fill:"#FFD166"})]})}},{match:/\baws\b|amazon[_-]?web|bedrock/,inlineIcon:function({className:a,size:c=20}){return(0,b.jsxs)("svg",{className:a,width:c,height:c,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[(0,b.jsx)("path",{d:"M6 14.5c0 1 .5 1.8 1.3 2.2L12 19l4.7-2.3c.8-.4 1.3-1.2 1.3-2.2v-5c0-1-.5-1.8-1.3-2.2L12 5 7.3 7.3C6.5 7.7 6 8.5 6 9.5v5Z",fill:"#FF9900"}),(0,b.jsx)("path",{d:"M12 5v14M6 9.5l6 3 6-3",stroke:"#232F3E",strokeWidth:"1.2",fill:"none"})]})}},{match:/cloudflare/,simpleIconSlug:"cloudflare"},{match:/vercel/,simpleIconSlug:"vercel"},{match:/netlify/,simpleIconSlug:"netlify"},{match:/digitalocean/,simpleIconSlug:"digitalocean"},{match:/railway/,simpleIconSlug:"railway"},{match:/postgres/,simpleIconSlug:"postgresql"},{match:/mongodb/,simpleIconSlug:"mongodb"},{match:/\bredis\b/,simpleIconSlug:"redis"},{match:/mysql/,simpleIconSlug:"mysql"},{match:/sqlite/,simpleIconSlug:"sqlite"},{match:/supabase/,simpleIconSlug:"supabase"},{match:/planetscale/,simpleIconSlug:"planetscale"},{match:/slack/,simpleIconSlug:"slack"},{match:/discord/,simpleIconSlug:"discord"},{match:/linear/,simpleIconSlug:"linear"},{match:/jira|atlassian/,simpleIconSlug:"jira"},{match:/asana/,simpleIconSlug:"asana"},{match:/zapier/,simpleIconSlug:"zapier"},{match:/datadog/,simpleIconSlug:"datadog"},{match:/sentry/,simpleIconSlug:"sentry"},{match:/grafana/,simpleIconSlug:"grafana"},{match:/newrelic/,simpleIconSlug:"newrelic"},{match:/stripe/,simpleIconSlug:"stripe"},{match:/shopify/,simpleIconSlug:"shopify"}],r={http:g.Server,sse:n,stdio:o.Terminal},s={sm:"size-4",md:"size-5",lg:"size-6"},t={sm:16,md:20,lg:24};function u({serverName:a,url:d,transport:e,className:f,size:h="sm"}){let[i,j]=(0,c.useState)(!1),k=function(a,b){let c=`${a} ${b??""}`.toLowerCase();for(let a of q)if(a.match.test(c)){if(a.inlineIcon)return{kind:"inline",component:a.inlineIcon};if(a.simpleIconSlug)return{kind:"simpleicons",slug:a.simpleIconSlug}}return{kind:"none"}}(a,d),l=r[e]??g.Server,m=s[h],n=t[h];if("inline"===k.kind){let a=k.component;return(0,b.jsx)(a,{className:`${m} shrink-0 ${f??""}`,size:n})}return"simpleicons"!==k.kind||i?(0,b.jsx)(l,{className:`text-muted-foreground ${m} shrink-0 ${f??""}`}):(0,b.jsx)("img",{src:`https://cdn.simpleicons.org/${k.slug}`,alt:"",width:n,height:n,className:`${m} shrink-0 ${f??""}`,onError:()=>j(!0)})}function v({server:a,onSelect:c}){let{t:e}=(0,d.useTranslation)("web"),f=a.mcp_info?.description??"";return(0,b.jsxs)(l.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))},"data-testid":`mcp-server-card-${a.server_name}`,children:[(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"flex size-11 shrink-0 items-center justify-center rounded-lg bg-slate-100 ring-1 ring-slate-200/50 dark:bg-slate-800 dark:ring-slate-700/50",children:(0,b.jsx)(u,{serverName:a.server_name,url:a.url,transport:a.transport,size:"md"})}),(0,b.jsx)("h3",{className:"text-foreground mt-2 min-w-0 flex-1 truncate text-sm leading-tight font-bold tracking-tight",children:a.name})]}),f?(0,b.jsx)("p",{className:"text-muted-foreground mt-3 line-clamp-2 text-xs leading-relaxed",children:f}):null,(0,b.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-1.5",children:[(0,b.jsx)(m.Badge,{variant:"outline",children:e(`mcpServers.transport.${a.transport}`,a.transport.toUpperCase())}),a.auth_type&&"none"!==a.auth_type?(0,b.jsx)(m.Badge,{variant:"secondary",children:e(`mcpServers.authType.${a.auth_type}`,a.auth_type)}):null]})]})}a.i(78454);var w=a.i(24255),x=a.i(2824),y=a.i(13126),z=a.i(67664);function A({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)(m.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 B=a.i(60197),C=a.i(34948);let D=[{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 E({proxyBaseUrl:a,serverName:e}){let{t:f}=(0,d.useTranslation)("web"),[g,h]=(0,c.useState)("claude-code"),[j,k]=(0,c.useState)(!1),l=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),m=async()=>{try{await navigator.clipboard.writeText(l),k(!0),setTimeout(()=>k(!1),2e3)}catch{}};return(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5 rounded-lg border border-slate-200/60 bg-slate-50/50 p-1 dark:border-slate-700/50 dark:bg-slate-900/40",role:"tablist","aria-label":f("mcpServers.connect.title"),children:D.map(a=>(0,b.jsx)("button",{type:"button",role:"tab","aria-selected":g===a.id,onClick:()=>h(a.id),"data-state":g===a.id?"active":"inactive",className:"data-[state=active]:bg-card data-[state=active]:text-primary text-muted-foreground hover:text-foreground rounded-md px-2.5 py-1 text-xs font-medium transition-all data-[state=active]:shadow-sm data-[state=active]:ring-1 data-[state=active]:ring-slate-200/70 dark:data-[state=active]:ring-slate-700/50",children:a.label},a.id))}),(0,b.jsxs)("div",{className:"editorial-shadow group relative overflow-hidden rounded-xl border border-slate-200/60 bg-slate-50/60 dark:border-slate-700/50 dark:bg-slate-900/60",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between border-b border-slate-200/60 bg-slate-100/40 px-3 py-2 dark:border-slate-700/50 dark:bg-slate-900/40",children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("span",{className:"size-2 rounded-full bg-slate-300 dark:bg-slate-600","aria-hidden":!0}),(0,b.jsx)("span",{className:"size-2 rounded-full bg-slate-300 dark:bg-slate-600","aria-hidden":!0}),(0,b.jsx)("span",{className:"size-2 rounded-full bg-slate-300 dark:bg-slate-600","aria-hidden":!0})]}),(0,b.jsx)(i.Button,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:m,"aria-label":f("mcpServers.connect.copy"),children:j?(0,b.jsx)(B.Check,{className:"text-primary size-3"}):(0,b.jsx)(C.Copy,{className:"size-3"})})]}),(0,b.jsx)("pre",{className:"max-h-64 overflow-auto p-3 font-mono text-[11px] leading-relaxed",children:(0,b.jsx)("code",{children:l})})]}),(0,b.jsx)("p",{className:"text-muted-foreground text-xs",children:f("mcpServers.connect.replaceKey")})]})}var F=a.i(6120);let G=(0,F.createServerReference)("40b8c8b3465bde89ddd23df1c2c896fe7e43e5ba22",F.callServer,void 0,F.findSourceMapURL,"fetchMcpServerToolsAction");function H({server:a,proxyBaseUrl:e,open:f,onClose:g}){let{t:h}=(0,d.useTranslation)("web"),[j,k]=(0,c.useState)([]),[l,n]=(0,c.useState)(!1),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(null),s=(0,c.useCallback)(async a=>{n(!0),p(null);try{let b=await G(a);k(b.tools),b.error&&p(b.error),r(a)}catch{p("Failed to load tools")}finally{n(!1)}},[]);(0,c.useEffect)(()=>{f&&a&&q!==a.server_name&&s(a.server_name)},[f,a,q,s]);let t=(0,c.useCallback)(()=>{a&&(r(null),s(a.server_name))},[a,s]);if(!a)return null;let v=a.mcp_info?.description??"";return(0,b.jsx)(w.BaseDrawer,{open:f,onClose:g,"data-testid":"mcp-server-detail-drawer",children:(0,b.jsxs)("div",{className:"flex flex-col gap-6 overflow-y-auto p-6",children:[(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("span",{className:"text-[10px] font-bold tracking-[0.2em] text-slate-400 uppercase",children:[h(`mcpServers.transport.${a.transport}`,a.transport.toUpperCase()),"· MCP Server"]}),(0,b.jsxs)("div",{className:"flex items-start gap-3",children:[(0,b.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg bg-slate-100 ring-1 ring-slate-200/50 dark:bg-slate-800 dark:ring-slate-700/50",children:(0,b.jsx)(u,{serverName:a.server_name,url:a.url,transport:a.transport,size:"lg"})}),(0,b.jsx)(x.DrawerTitle,{className:"text-foreground mt-2 text-lg font-bold tracking-tight",children:a.name})]}),v?(0,b.jsx)(x.DrawerDescription,{className:"text-muted-foreground text-sm leading-relaxed",children:v}):null]}),(0,b.jsx)(y.Separator,{}),(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 font-medium",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 gap-4",children:[(0,b.jsx)("span",{className:"text-muted-foreground shrink-0 text-xs font-medium",children:h("mcpServers.detail.url")}),(0,b.jsx)("span",{className:"truncate font-mono text-xs",title:a.url,children:a.url})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs font-medium",children:h("mcpServers.detail.transport")}),(0,b.jsx)(m.Badge,{variant:"outline",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 font-medium",children:h("mcpServers.detail.authType")}),(0,b.jsx)(m.Badge,{variant:"secondary",children:h(`mcpServers.authType.${a.auth_type}`,a.auth_type)})]}):null]}),(0,b.jsx)(y.Separator,{}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("h3",{className:"text-foreground text-sm font-bold tracking-tight",children:h("mcpServers.tools.title")}),(0,b.jsx)(i.Button,{type:"button",variant:"ghost",size:"icon",className:"size-7",onClick:t,disabled:l,"aria-label":h("mcpServers.tools.refresh"),"data-testid":"mcp-tools-refresh",children:(0,b.jsx)(z.RefreshCw,{className:`size-3.5 ${l?"animate-spin":""}`})})]}),l?(0,b.jsxs)("p",{className:"text-muted-foreground text-sm",children:[h("accessibility.loading"),"..."]}):o?(0,b.jsx)("p",{className:"text-destructive text-sm",children:o}):(0,b.jsx)(A,{tools:j,serverName:a.server_name})]}),(0,b.jsx)(y.Separator,{}),(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)("h3",{className:"text-foreground text-sm font-bold tracking-tight",children:h("mcpServers.connect.title")}),(0,b.jsx)(E,{proxyBaseUrl:e,serverName:a.server_name})]})]})})}let I=(0,F.createServerReference)("00b4aa2f2237a33bea82972983cf57ee4b3b15b8bc",F.callServer,void 0,F.findSourceMapURL,"fetchMcpServersAction"),J=["all","http","sse","stdio"];a.s(["McpServersPageClient",0,function({proxyConfigured:a,proxyBaseUrl:l}){let{t:m}=(0,d.useTranslation)("web"),[n,o]=(0,c.useState)(""),[p,q]=(0,c.useState)("all"),[r,s]=(0,c.useState)(null),[t,u]=(0,c.useState)([]),[w,x]=(0,c.useState)(!0),[y,z]=(0,c.useState)(null);(0,c.useEffect)(()=>{a?I().then(a=>{u(a.servers),a.error&&z(a.error)}).catch(()=>{z(m("mcpServers.fetchError"))}).finally(()=>{x(!1)}):x(!1)},[a,m]);let A=(0,c.useMemo)(()=>t.filter(a=>{let b=n.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,n,p]);return a?w?(0,b.jsxs)("div",{className:"flex flex-col gap-8 p-8",children:[(0,b.jsx)(k.PageHeader,{eyebrow:"Developer Portal",title:m("mcpServers.title"),description:m("mcpServers.subtitle")}),(0,b.jsxs)("div",{className:"text-muted-foreground text-center text-sm",children:[m("accessibility.loading"),"..."]})]}):(0,b.jsxs)("div",{className:"flex flex-col gap-8 p-8",children:[(0,b.jsx)(k.PageHeader,{eyebrow:"Developer Portal",title:m("mcpServers.title"),description:m("mcpServers.subtitle")}),y?(0,b.jsxs)("div",{role:"alert",className:"border-destructive/40 bg-destructive/10 editorial-shadow flex items-center gap-2 rounded-xl border px-4 py-3",children:[(0,b.jsx)(e.AlertCircle,{className:"text-destructive size-4 shrink-0"}),(0,b.jsx)("p",{className:"text-destructive text-sm font-medium",children:y})]}):null,(0,b.jsxs)("div",{className:"relative",children:[(0,b.jsx)(f.Search,{className:"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2"}),(0,b.jsx)(h.Input,{placeholder:m("mcpServers.searchPlaceholder"),value:n,onChange:a=>o(a.target.value),className:"ps-9","data-testid":"mcp-servers-search"})]}),(0,b.jsx)("div",{className:"flex flex-wrap gap-2",children:J.map(a=>(0,b.jsx)(i.Button,{variant:p===a?"default":"outline",size:"sm",onClick:()=>q(a),"data-testid":`mcp-servers-filter-${a}`,children:"all"===a?m("mcpServers.filter.all"):m(`mcpServers.transport.${a}`,a.toUpperCase())},a))}),0===A.length?(0,b.jsx)(j.EmptyState,{icon:0===t.length?(0,b.jsx)(g.Server,{className:"size-10"}):(0,b.jsx)(f.Search,{className:"size-10"}),title:0===t.length?m("mcpServers.noServers"):m("mcpServers.noResults")}):(0,b.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:A.map(a=>(0,b.jsx)(v,{server:a,onSelect:s},a.server_id))}),(0,b.jsx)(H,{server:r,proxyBaseUrl:l,open:!!r,onClose:()=>s(null)})]}):(0,b.jsxs)("div",{className:"flex flex-col gap-8 p-8",children:[(0,b.jsx)(k.PageHeader,{eyebrow:"Developer Portal",title:m("mcpServers.title"),description:m("mcpServers.subtitle")}),(0,b.jsx)(j.EmptyState,{icon:(0,b.jsx)(e.AlertCircle,{className:"size-10"}),title:m("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-icon.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%3A0619c2%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/components/features/mcp-servers/mcp-server-detail-drawer.tsx","../../../../../../../src/presentation/web/app/actions/data%3Af7eea3%20%3Ctext/javascript%3E","../../../../../../../node_modules/.pnpm/lucide-react%401.7.0_react%4019.2.4/node_modules/lucide-react/src/icons/wifi.ts","../../../../../../../src/presentation/web/components/features/mcp-servers/vendor-brand-icons.tsx"],"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 { Button } from '@/components/ui/button';\nimport { EmptyState } from '@/components/common/empty-state';\nimport { PageHeader } from '@/components/common/page-header';\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<(typeof TRANSPORT_FILTERS)[number]>('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 flex-col gap-8 p-8\">\n <PageHeader\n eyebrow=\"Developer Portal\"\n title={t('mcpServers.title')}\n description={t('mcpServers.subtitle')}\n />\n <EmptyState icon={<AlertCircle className=\"size-10\" />} title={t('mcpServers.noProxy')} />\n </div>\n );\n }\n\n if (loading) {\n return (\n <div className=\"flex flex-col gap-8 p-8\">\n <PageHeader\n eyebrow=\"Developer Portal\"\n title={t('mcpServers.title')}\n description={t('mcpServers.subtitle')}\n />\n <div className=\"text-muted-foreground text-center text-sm\">\n {t('accessibility.loading')}...\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex flex-col gap-8 p-8\">\n <PageHeader\n eyebrow=\"Developer Portal\"\n title={t('mcpServers.title')}\n description={t('mcpServers.subtitle')}\n />\n\n {error ? (\n <div\n role=\"alert\"\n className=\"border-destructive/40 bg-destructive/10 editorial-shadow flex items-center gap-2 rounded-xl border px-4 py-3\"\n >\n <AlertCircle className=\"text-destructive size-4 shrink-0\" />\n <p className=\"text-destructive text-sm font-medium\">{error}</p>\n </div>\n ) : null}\n\n {/* Search */}\n <div className=\"relative\">\n <Search className=\"text-muted-foreground absolute top-1/2 left-3 size-4 -translate-y-1/2\" />\n <Input\n placeholder={t('mcpServers.searchPlaceholder')}\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"ps-9\"\n data-testid=\"mcp-servers-search\"\n />\n </div>\n\n {/* Transport filter */}\n <div className=\"flex flex-wrap gap-2\">\n {TRANSPORT_FILTERS.map((filter) => (\n <Button\n key={filter}\n variant={transportFilter === filter ? 'default' : 'outline'}\n size=\"sm\"\n onClick={() => setTransportFilter(filter)}\n data-testid={`mcp-servers-filter-${filter}`}\n >\n {filter === 'all'\n ? t('mcpServers.filter.all')\n : t(`mcpServers.transport.${filter}`, filter.toUpperCase())}\n </Button>\n ))}\n </div>\n\n {filtered.length === 0 ? (\n <EmptyState\n icon={\n servers.length === 0 ? <Server className=\"size-10\" /> : <Search className=\"size-10\" />\n }\n title={servers.length === 0 ? t('mcpServers.noServers') : t('mcpServers.noResults')}\n />\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 { useState, type ComponentType } from 'react';\nimport { Server, Wifi, Terminal } from 'lucide-react';\nimport type { LucideIcon } from 'lucide-react';\nimport {\n MicrosoftIcon,\n MicrosoftLearnIcon,\n AzureIcon,\n FirecrawlIcon,\n DeepWikiIcon,\n AwsIcon,\n} from './vendor-brand-icons';\n\ninterface McpServerIconProps {\n serverName: string;\n url?: string;\n transport: string;\n className?: string;\n size?: 'sm' | 'md' | 'lg';\n}\n\ntype BrandIconComponent = ComponentType<{ className?: string; size?: number }>;\n\ninterface VendorMapping {\n /** Regex pattern matched against lowercased `server_name + \" \" + url`. */\n match: RegExp;\n /** SimpleIcons slug (for brands that exist on cdn.simpleicons.org). */\n simpleIconSlug?: string;\n /** Inline brand component (for brands SimpleIcons doesn't serve). */\n inlineIcon?: BrandIconComponent;\n}\n\n/**\n * Vendor icon resolution map.\n *\n * Priority rules:\n * 1. More-specific patterns FIRST (e.g. `microsoft_learn` before `microsoft`,\n * `github_copilot` before plain `github`).\n * 2. Inline SVG brand icons take priority over SimpleIcons when both are\n * available — inline icons are guaranteed to render and have no CDN\n * dependency.\n * 3. Verified slugs only. Every SimpleIcons slug in this file must return\n * HTTP 200 from https://cdn.simpleicons.org/{slug} as of the last audit.\n *\n * When no vendor matches, the `McpServerIcon` component falls back to the\n * transport-type Lucide icon (Server/Wifi/Terminal).\n *\n * Exported `resolveVendorMapping` is the source of truth for tests.\n */\nconst VENDOR_MAP: VendorMapping[] = [\n // Microsoft (SimpleIcons removed all MS icons for legal reasons — use inline)\n { match: /microsoft[_-]?learn|learn\\.microsoft/, inlineIcon: MicrosoftLearnIcon },\n { match: /foundry|ai\\.azure|azure[_-]?foundry|bedrock[_-]?agentcore/, inlineIcon: AzureIcon },\n { match: /\\bazure\\b/, inlineIcon: AzureIcon },\n { match: /microsoft|\\.microsoft\\./, inlineIcon: MicrosoftIcon },\n\n // GitHub / Copilot (SimpleIcons has these)\n { match: /github[_-]?copilot|\\bcopilot\\b/, simpleIconSlug: 'githubcopilot' },\n { match: /github|api\\.github/, simpleIconSlug: 'github' },\n { match: /gitlab/, simpleIconSlug: 'gitlab' },\n { match: /bitbucket/, simpleIconSlug: 'bitbucket' },\n\n // AI / LLM vendors\n { match: /anthropic|\\bclaude\\b/, simpleIconSlug: 'anthropic' },\n { match: /gemini|google[_-]?ai/, simpleIconSlug: 'googlegemini' },\n { match: /perplexity/, simpleIconSlug: 'perplexity' },\n\n // Documentation / knowledge (DeepWiki gets its own distinct mark)\n { match: /deepwiki|deep[_-]?wiki/, inlineIcon: DeepWikiIcon },\n { match: /notion/, simpleIconSlug: 'notion' },\n { match: /confluence/, simpleIconSlug: 'confluence' },\n { match: /readthedocs/, simpleIconSlug: 'readthedocs' },\n { match: /mintlify/, simpleIconSlug: 'mintlify' },\n\n // Web scraping / crawling (inline for Firecrawl — no SimpleIcons)\n { match: /firecrawl/, inlineIcon: FirecrawlIcon },\n\n // Cloud / infra\n { match: /\\baws\\b|amazon[_-]?web|bedrock/, inlineIcon: AwsIcon },\n { match: /cloudflare/, simpleIconSlug: 'cloudflare' },\n { match: /vercel/, simpleIconSlug: 'vercel' },\n { match: /netlify/, simpleIconSlug: 'netlify' },\n { match: /digitalocean/, simpleIconSlug: 'digitalocean' },\n { match: /railway/, simpleIconSlug: 'railway' },\n\n // Databases\n { match: /postgres/, simpleIconSlug: 'postgresql' },\n { match: /mongodb/, simpleIconSlug: 'mongodb' },\n { match: /\\bredis\\b/, simpleIconSlug: 'redis' },\n { match: /mysql/, simpleIconSlug: 'mysql' },\n { match: /sqlite/, simpleIconSlug: 'sqlite' },\n { match: /supabase/, simpleIconSlug: 'supabase' },\n { match: /planetscale/, simpleIconSlug: 'planetscale' },\n\n // Productivity / collaboration\n { match: /slack/, simpleIconSlug: 'slack' },\n { match: /discord/, simpleIconSlug: 'discord' },\n { match: /linear/, simpleIconSlug: 'linear' },\n { match: /jira|atlassian/, simpleIconSlug: 'jira' },\n { match: /asana/, simpleIconSlug: 'asana' },\n { match: /zapier/, simpleIconSlug: 'zapier' },\n\n // Observability\n { match: /datadog/, simpleIconSlug: 'datadog' },\n { match: /sentry/, simpleIconSlug: 'sentry' },\n { match: /grafana/, simpleIconSlug: 'grafana' },\n { match: /newrelic/, simpleIconSlug: 'newrelic' },\n\n // Payments / commerce\n { match: /stripe/, simpleIconSlug: 'stripe' },\n { match: /shopify/, simpleIconSlug: 'shopify' },\n];\n\nexport type VendorResolution =\n | { kind: 'inline'; component: BrandIconComponent }\n | { kind: 'simpleicons'; slug: string }\n | { kind: 'none' };\n\n/**\n * Resolve a vendor icon for an MCP server by matching name and URL against\n * the VENDOR_MAP patterns. Returns an inline component, a SimpleIcons slug,\n * or 'none' (caller falls back to transport icon).\n *\n * Exported for unit testing.\n */\nexport function resolveVendorMapping(serverName: string, url?: string): VendorResolution {\n const haystack = `${serverName} ${url ?? ''}`.toLowerCase();\n for (const entry of VENDOR_MAP) {\n if (entry.match.test(haystack)) {\n if (entry.inlineIcon) return { kind: 'inline', component: entry.inlineIcon };\n if (entry.simpleIconSlug) return { kind: 'simpleicons', slug: entry.simpleIconSlug };\n }\n }\n return { kind: 'none' };\n}\n\nconst TRANSPORT_FALLBACKS: Record<string, LucideIcon> = {\n http: Server,\n sse: Wifi,\n stdio: Terminal,\n};\n\nconst SIZE_CLASSES: Record<NonNullable<McpServerIconProps['size']>, string> = {\n sm: 'size-4',\n md: 'size-5',\n lg: 'size-6',\n};\n\nconst SIZE_PIXELS: Record<NonNullable<McpServerIconProps['size']>, number> = {\n sm: 16,\n md: 20,\n lg: 24,\n};\n\n/**\n * Renders an MCP server's brand icon when recognizable, falling back to the\n * transport-type icon otherwise.\n *\n * Resolution order:\n * 1. Inline brand SVG (Microsoft, Azure, DeepWiki, Firecrawl, AWS)\n * 2. SimpleIcons CDN image (GitHub, Stripe, Postgres, etc.)\n * 3. Transport fallback (Server/Wifi/Terminal from lucide-react)\n *\n * For SimpleIcons images, we handle `onError` by swapping to the transport\n * fallback — this protects against SimpleIcons slug changes without breaking\n * the UI.\n */\nexport function McpServerIcon({\n serverName,\n url,\n transport,\n className,\n size = 'sm',\n}: McpServerIconProps) {\n const [imageFailed, setImageFailed] = useState(false);\n const resolution = resolveVendorMapping(serverName, url);\n const FallbackIcon = TRANSPORT_FALLBACKS[transport] ?? Server;\n const sizeClass = SIZE_CLASSES[size];\n const sizePx = SIZE_PIXELS[size];\n\n if (resolution.kind === 'inline') {\n const Brand = resolution.component;\n return <Brand className={`${sizeClass} shrink-0 ${className ?? ''}`} size={sizePx} />;\n }\n\n if (resolution.kind === 'simpleicons' && !imageFailed) {\n return (\n /* eslint-disable-next-line @next/next/no-img-element */\n <img\n src={`https://cdn.simpleicons.org/${resolution.slug}`}\n alt=\"\"\n width={sizePx}\n height={sizePx}\n className={`${sizeClass} shrink-0 ${className ?? ''}`}\n onError={() => setImageFailed(true)}\n />\n );\n }\n\n return (\n <FallbackIcon className={`text-muted-foreground ${sizeClass} shrink-0 ${className ?? ''}`} />\n );\n}\n","'use client';\n\nimport { useTranslation } from 'react-i18next';\nimport { Card } from '@/components/ui/card';\nimport { Badge } from '@/components/ui/badge';\nimport { McpServerIcon } from './mcp-server-icon';\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\nexport function McpServerCard({ server, onSelect }: McpServerCardProps) {\n const { t } = useTranslation('web');\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 data-testid={`mcp-server-card-${server.server_name}`}\n >\n <div className=\"flex items-start gap-3\">\n <div className=\"flex size-11 shrink-0 items-center justify-center rounded-lg bg-slate-100 ring-1 ring-slate-200/50 dark:bg-slate-800 dark:ring-slate-700/50\">\n <McpServerIcon\n serverName={server.server_name}\n url={server.url}\n transport={server.transport}\n size=\"md\"\n />\n </div>\n <h3 className=\"text-foreground mt-2 min-w-0 flex-1 truncate text-sm leading-tight font-bold tracking-tight\">\n {server.name}\n </h3>\n </div>\n\n {description ? (\n <p className=\"text-muted-foreground mt-3 line-clamp-2 text-xs leading-relaxed\">\n {description}\n </p>\n ) : null}\n\n <div className=\"mt-4 flex flex-wrap items-center gap-1.5\">\n <Badge variant=\"outline\">\n {t(`mcpServers.transport.${server.transport}`, server.transport.toUpperCase())}\n </Badge>\n {server.auth_type && server.auth_type !== 'none' ? (\n <Badge variant=\"secondary\">\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\n className=\"flex flex-wrap gap-1.5 rounded-lg border border-slate-200/60 bg-slate-50/50 p-1 dark:border-slate-700/50 dark:bg-slate-900/40\"\n role=\"tablist\"\n aria-label={t('mcpServers.connect.title')}\n >\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 data-state={activeClient === client.id ? 'active' : 'inactive'}\n className=\"data-[state=active]:bg-card data-[state=active]:text-primary text-muted-foreground hover:text-foreground rounded-md px-2.5 py-1 text-xs font-medium transition-all data-[state=active]:shadow-sm data-[state=active]:ring-1 data-[state=active]:ring-slate-200/70 dark:data-[state=active]:ring-slate-700/50\"\n >\n {client.label}\n </button>\n ))}\n </div>\n\n <div className=\"editorial-shadow group relative overflow-hidden rounded-xl border border-slate-200/60 bg-slate-50/60 dark:border-slate-700/50 dark:bg-slate-900/60\">\n {/* Terminal-style header bar with dots */}\n <div className=\"flex items-center justify-between border-b border-slate-200/60 bg-slate-100/40 px-3 py-2 dark:border-slate-700/50 dark:bg-slate-900/40\">\n <div className=\"flex items-center gap-1.5\">\n <span className=\"size-2 rounded-full bg-slate-300 dark:bg-slate-600\" aria-hidden />\n <span className=\"size-2 rounded-full bg-slate-300 dark:bg-slate-600\" aria-hidden />\n <span className=\"size-2 rounded-full bg-slate-300 dark:bg-slate-600\" aria-hidden />\n </div>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n className=\"size-6 shrink-0\"\n onClick={handleCopy}\n aria-label={t('mcpServers.connect.copy')}\n >\n {copied ? <Check className=\"text-primary size-3\" /> : <Copy className=\"size-3\" />}\n </Button>\n </div>\n <pre className=\"max-h-64 overflow-auto p-3 font-mono text-[11px] leading-relaxed\">\n <code>{snippet}</code>\n </pre>\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__ [{\"40b8c8b3465bde89ddd23df1c2c896fe7e43e5ba22\":{\"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(\"40b8c8b3465bde89ddd23df1c2c896fe7e43e5ba22\",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 { McpServerIcon } from './mcp-server-icon';\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 and call loadTools\n // 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} data-testid=\"mcp-server-detail-drawer\">\n <div className=\"flex flex-col gap-6 overflow-y-auto p-6\">\n {/* Header */}\n <div className=\"space-y-2\">\n <span className=\"text-[10px] font-bold tracking-[0.2em] text-slate-400 uppercase\">\n {t(`mcpServers.transport.${server.transport}`, server.transport.toUpperCase())} &middot;\n MCP Server\n </span>\n <div className=\"flex items-start gap-3\">\n <div className=\"flex size-12 shrink-0 items-center justify-center rounded-lg bg-slate-100 ring-1 ring-slate-200/50 dark:bg-slate-800 dark:ring-slate-700/50\">\n <McpServerIcon\n serverName={server.server_name}\n url={server.url}\n transport={server.transport}\n size=\"lg\"\n />\n </div>\n <DrawerTitle className=\"text-foreground mt-2 text-lg font-bold tracking-tight\">\n {server.name}\n </DrawerTitle>\n </div>\n {description ? (\n <DrawerDescription className=\"text-muted-foreground text-sm leading-relaxed\">\n {description}\n </DrawerDescription>\n ) : null}\n </div>\n\n <Separator />\n\n {/* Metadata */}\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <span className=\"text-muted-foreground text-xs font-medium\">\n {t('mcpServers.detail.serverName')}\n </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 gap-4\">\n <span className=\"text-muted-foreground shrink-0 text-xs font-medium\">\n {t('mcpServers.detail.url')}\n </span>\n <span className=\"truncate font-mono text-xs\" title={server.url}>\n {server.url}\n </span>\n </div>\n ) : null}\n\n <div className=\"flex items-center justify-between\">\n <span className=\"text-muted-foreground text-xs font-medium\">\n {t('mcpServers.detail.transport')}\n </span>\n <Badge variant=\"outline\">\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 font-medium\">\n {t('mcpServers.detail.authType')}\n </span>\n <Badge variant=\"secondary\">\n {t(`mcpServers.authType.${server.auth_type}`, server.auth_type)}\n </Badge>\n </div>\n ) : null}\n </div>\n\n <Separator />\n\n {/* Tools */}\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-foreground text-sm font-bold tracking-tight\">\n {t('mcpServers.tools.title')}\n </h3>\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"icon\"\n className=\"size-7\"\n onClick={handleRefresh}\n disabled={loadingTools}\n aria-label={t('mcpServers.tools.refresh')}\n data-testid=\"mcp-tools-refresh\"\n >\n <RefreshCw className={`size-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 </div>\n\n <Separator />\n\n {/* Connect instructions */}\n <div className=\"space-y-3\">\n <h3 className=\"text-foreground text-sm font-bold tracking-tight\">\n {t('mcpServers.connect.title')}\n </h3>\n <McpConnectInstructions proxyBaseUrl={proxyBaseUrl} serverName={server.server_name} />\n </div>\n </div>\n </BaseDrawer>\n );\n}\n","/* __next_internal_action_entry_do_not_use__ [{\"00b4aa2f2237a33bea82972983cf57ee4b3b15b8bc\":{\"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(\"00b4aa2f2237a33bea82972983cf57ee4b3b15b8bc\",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","/**\n * Inline brand icons for MCP server vendors that SimpleIcons either doesn't\n * serve (Microsoft — removed for legal reasons), hasn't added yet (Firecrawl,\n * DeepWiki), or where we want a project-specific treatment.\n *\n * Using inline SVG instead of remote image URLs because:\n * - No network request, no 404 risk, no CORS\n * - Uses `currentColor` where possible so brand marks adapt to dark mode\n * - All paths are public brand marks simplified to their geometric essentials\n * to avoid trademark ambiguity\n */\n\ninterface BrandIconProps {\n className?: string;\n size?: number;\n}\n\n/** Microsoft four-square window mark (simplified from public brand guidelines). */\nexport function MicrosoftIcon({ className, size = 20 }: BrandIconProps) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <rect x=\"2\" y=\"2\" width=\"9\" height=\"9\" fill=\"#F25022\" />\n <rect x=\"13\" y=\"2\" width=\"9\" height=\"9\" fill=\"#7FBA00\" />\n <rect x=\"2\" y=\"13\" width=\"9\" height=\"9\" fill=\"#00A4EF\" />\n <rect x=\"13\" y=\"13\" width=\"9\" height=\"9\" fill=\"#FFB900\" />\n </svg>\n );\n}\n\n/** Microsoft Learn — book + graduation cap motif. */\nexport function MicrosoftLearnIcon({ className, size = 20 }: BrandIconProps) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M3 6a1 1 0 0 1 1-1h6a2 2 0 0 1 2 2v13a1 1 0 0 1-1.447.894L6 18.618V7H4a1 1 0 0 1-1-1Z\"\n fill=\"#0078D4\"\n />\n <path\n d=\"M21 6a1 1 0 0 0-1-1h-6a2 2 0 0 0-2 2v13a1 1 0 0 0 1.447.894L18 18.618V7h2a1 1 0 0 0 1-1Z\"\n fill=\"#50E6FF\"\n />\n </svg>\n );\n}\n\n/** Azure / Foundry — stylized mountain triangles mark. */\nexport function AzureIcon({ className, size = 20 }: BrandIconProps) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <path d=\"M12 4L2 20h7l3-5 3 5h7L12 4Z\" fill=\"#0089D6\" />\n <path d=\"M12 4l-3 5h6l-3-5Z\" fill=\"#54AEF0\" />\n </svg>\n );\n}\n\n/** Firecrawl — flame mark. */\nexport function FirecrawlIcon({ className, size = 20 }: BrandIconProps) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M12 2C12 2 6 8 6 13a6 6 0 0 0 12 0c0-2-1-4-2-5 0 2-1 3-2 3 0-3-2-6-2-9Z\"\n fill=\"#F26B21\"\n />\n <path d=\"M12 11c0 2-1.5 3-1.5 5a1.5 1.5 0 0 0 3 0c0-1.5-1.5-2.5-1.5-5Z\" fill=\"#FFD166\" />\n </svg>\n );\n}\n\n/** DeepWiki — stacked pages with magnifying lens motif. */\nexport function DeepWikiIcon({ className, size = 20 }: BrandIconProps) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <rect x=\"4\" y=\"3\" width=\"13\" height=\"16\" rx=\"1.5\" fill=\"#6366F1\" />\n <rect x=\"7\" y=\"6\" width=\"7\" height=\"1.5\" rx=\"0.5\" fill=\"#E0E7FF\" />\n <rect x=\"7\" y=\"9\" width=\"7\" height=\"1.5\" rx=\"0.5\" fill=\"#E0E7FF\" />\n <rect x=\"7\" y=\"12\" width=\"4\" height=\"1.5\" rx=\"0.5\" fill=\"#E0E7FF\" />\n <circle cx=\"17\" cy=\"17\" r=\"4\" fill=\"none\" stroke=\"#F59E0B\" strokeWidth=\"2\" />\n <line\n x1=\"20\"\n y1=\"20\"\n x2=\"22\"\n y2=\"22\"\n stroke=\"#F59E0B\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\n/** AWS — orange cube mark. */\nexport function AwsIcon({ className, size = 20 }: BrandIconProps) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n <path\n d=\"M6 14.5c0 1 .5 1.8 1.3 2.2L12 19l4.7-2.3c.8-.4 1.3-1.2 1.3-2.2v-5c0-1-.5-1.8-1.3-2.2L12 5 7.3 7.3C6.5 7.7 6 8.5 6 9.5v5Z\"\n fill=\"#FF9900\"\n />\n <path d=\"M12 5v14M6 9.5l6 3 6-3\" stroke=\"#232F3E\" strokeWidth=\"1.2\" fill=\"none\" />\n </svg>\n );\n}\n"],"names":["d","key"],"mappings":"uDAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,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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)("40dd0e9a4486c4b055a0c816971cc6ca042b814b39",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)("404f44d7fe0e8c191245932d8a0bf4e33f231da34a",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