@shipit-ai/cli 1.168.0 → 1.169.0-pr12.6d78faf

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 (428) hide show
  1. package/apis/json-schema/FeatureFlags.yaml +5 -0
  2. package/apis/json-schema/LiteLLMProxyConfig.yaml +14 -0
  3. package/apis/json-schema/Settings.yaml +3 -0
  4. package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -0
  5. package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
  6. package/dist/packages/core/src/application/ports/output/services/plugin-marketplace.interface.d.ts +46 -0
  7. package/dist/packages/core/src/application/ports/output/services/plugin-marketplace.interface.d.ts.map +1 -0
  8. package/dist/packages/core/src/application/ports/output/services/plugin-marketplace.interface.js +12 -0
  9. package/dist/packages/core/src/application/use-cases/plugins/add-marketplace.use-case.d.ts +16 -0
  10. package/dist/packages/core/src/application/use-cases/plugins/add-marketplace.use-case.d.ts.map +1 -0
  11. package/dist/packages/core/src/application/use-cases/plugins/add-marketplace.use-case.js +34 -0
  12. package/dist/packages/core/src/application/use-cases/plugins/fetch-plugin-catalog.use-case.d.ts +24 -0
  13. package/dist/packages/core/src/application/use-cases/plugins/fetch-plugin-catalog.use-case.d.ts.map +1 -0
  14. package/dist/packages/core/src/application/use-cases/plugins/fetch-plugin-catalog.use-case.js +52 -0
  15. package/dist/packages/core/src/application/use-cases/plugins/install-plugin.use-case.d.ts +17 -0
  16. package/dist/packages/core/src/application/use-cases/plugins/install-plugin.use-case.d.ts.map +1 -0
  17. package/dist/packages/core/src/application/use-cases/plugins/install-plugin.use-case.js +33 -0
  18. package/dist/packages/core/src/application/use-cases/plugins/toggle-plugin.use-case.d.ts +17 -0
  19. package/dist/packages/core/src/application/use-cases/plugins/toggle-plugin.use-case.d.ts.map +1 -0
  20. package/dist/packages/core/src/application/use-cases/plugins/toggle-plugin.use-case.js +33 -0
  21. package/dist/packages/core/src/application/use-cases/plugins/uninstall-plugin.use-case.d.ts +16 -0
  22. package/dist/packages/core/src/application/use-cases/plugins/uninstall-plugin.use-case.d.ts.map +1 -0
  23. package/dist/packages/core/src/application/use-cases/plugins/uninstall-plugin.use-case.js +33 -0
  24. package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
  25. package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +1 -0
  26. package/dist/packages/core/src/domain/generated/output.d.ts +25 -0
  27. package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
  28. package/dist/packages/core/src/infrastructure/di/modules/services.module.d.ts.map +1 -1
  29. package/dist/packages/core/src/infrastructure/di/modules/services.module.js +13 -0
  30. package/dist/packages/core/src/infrastructure/di/modules/use-cases.module.d.ts.map +1 -1
  31. package/dist/packages/core/src/infrastructure/di/modules/use-cases.module.js +12 -0
  32. package/dist/packages/core/src/infrastructure/di/modules/web-tokens.module.d.ts.map +1 -1
  33. package/dist/packages/core/src/infrastructure/di/modules/web-tokens.module.js +22 -0
  34. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +4 -0
  35. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
  36. package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +18 -0
  37. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-litellm-proxy.d.ts +14 -0
  38. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-litellm-proxy.d.ts.map +1 -0
  39. package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/054-add-litellm-proxy.js +28 -0
  40. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/index.d.ts +4 -0
  41. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/index.d.ts.map +1 -0
  42. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/index.js +3 -0
  43. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.schema.d.ts +78 -0
  44. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.schema.d.ts.map +1 -0
  45. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.schema.js +46 -0
  46. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.service.d.ts +29 -0
  47. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.service.d.ts.map +1 -0
  48. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.service.js +147 -0
  49. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.validators.d.ts +11 -0
  50. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.validators.d.ts.map +1 -0
  51. package/dist/packages/core/src/infrastructure/services/plugin-marketplace/plugin-marketplace.validators.js +47 -0
  52. package/dist/src/presentation/web/app/actions/add-marketplace.d.ts +5 -0
  53. package/dist/src/presentation/web/app/actions/add-marketplace.d.ts.map +1 -0
  54. package/dist/src/presentation/web/app/actions/add-marketplace.js +11 -0
  55. package/dist/src/presentation/web/app/actions/fetch-plugin-catalog.d.ts +5 -0
  56. package/dist/src/presentation/web/app/actions/fetch-plugin-catalog.d.ts.map +1 -0
  57. package/dist/src/presentation/web/app/actions/fetch-plugin-catalog.js +11 -0
  58. package/dist/src/presentation/web/app/actions/install-plugin.d.ts +5 -0
  59. package/dist/src/presentation/web/app/actions/install-plugin.d.ts.map +1 -0
  60. package/dist/src/presentation/web/app/actions/install-plugin.js +11 -0
  61. package/dist/src/presentation/web/app/actions/toggle-plugin.d.ts +5 -0
  62. package/dist/src/presentation/web/app/actions/toggle-plugin.d.ts.map +1 -0
  63. package/dist/src/presentation/web/app/actions/toggle-plugin.js +11 -0
  64. package/dist/src/presentation/web/app/actions/uninstall-plugin.d.ts +5 -0
  65. package/dist/src/presentation/web/app/actions/uninstall-plugin.d.ts.map +1 -0
  66. package/dist/src/presentation/web/app/actions/uninstall-plugin.js +11 -0
  67. package/dist/src/presentation/web/app/plugins/page.d.ts +2 -0
  68. package/dist/src/presentation/web/app/plugins/page.d.ts.map +1 -0
  69. package/dist/src/presentation/web/app/plugins/page.js +23 -0
  70. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.d.ts.map +1 -1
  71. package/dist/src/presentation/web/components/common/repository-node/repository-drawer.stories.js +1 -0
  72. package/dist/src/presentation/web/components/features/plugins/plugin-card.d.ts +9 -0
  73. package/dist/src/presentation/web/components/features/plugins/plugin-card.d.ts.map +1 -0
  74. package/dist/src/presentation/web/components/features/plugins/plugin-card.js +15 -0
  75. package/dist/src/presentation/web/components/features/plugins/plugin-card.stories.d.ts +17 -0
  76. package/dist/src/presentation/web/components/features/plugins/plugin-card.stories.d.ts.map +1 -0
  77. package/dist/src/presentation/web/components/features/plugins/plugin-card.stories.js +60 -0
  78. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.d.ts +11 -0
  79. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.d.ts.map +1 -0
  80. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.js +33 -0
  81. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.stories.d.ts +18 -0
  82. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.stories.d.ts.map +1 -0
  83. package/dist/src/presentation/web/components/features/plugins/plugin-detail-drawer.stories.js +51 -0
  84. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.d.ts +6 -0
  85. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.d.ts.map +1 -0
  86. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.js +115 -0
  87. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.stories.d.ts +12 -0
  88. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.stories.d.ts.map +1 -0
  89. package/dist/src/presentation/web/components/features/plugins/plugins-page-client.stories.js +24 -0
  90. package/dist/src/presentation/web/components/features/settings/agent-settings-section.d.ts +3 -3
  91. package/dist/src/presentation/web/components/features/settings/agent-settings-section.d.ts.map +1 -1
  92. package/dist/src/presentation/web/components/features/settings/agent-settings-section.js +23 -102
  93. package/dist/src/presentation/web/components/features/settings/agent-settings-section.stories.d.ts +2 -3
  94. package/dist/src/presentation/web/components/features/settings/agent-settings-section.stories.d.ts.map +1 -1
  95. package/dist/src/presentation/web/components/features/settings/agent-settings-section.stories.js +18 -22
  96. package/dist/src/presentation/web/components/features/settings/ci-settings-section.d.ts.map +1 -1
  97. package/dist/src/presentation/web/components/features/settings/ci-settings-section.js +14 -5
  98. package/dist/src/presentation/web/components/features/settings/database-settings-section.d.ts.map +1 -1
  99. package/dist/src/presentation/web/components/features/settings/database-settings-section.js +14 -4
  100. package/dist/src/presentation/web/components/features/settings/environment-settings-section.d.ts +9 -3
  101. package/dist/src/presentation/web/components/features/settings/environment-settings-section.d.ts.map +1 -1
  102. package/dist/src/presentation/web/components/features/settings/environment-settings-section.js +75 -65
  103. package/dist/src/presentation/web/components/features/settings/environment-settings-section.stories.d.ts.map +1 -1
  104. package/dist/src/presentation/web/components/features/settings/environment-settings-section.stories.js +20 -18
  105. package/dist/src/presentation/web/components/features/settings/fab-layout-settings-section.d.ts.map +1 -1
  106. package/dist/src/presentation/web/components/features/settings/fab-layout-settings-section.js +1 -1
  107. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts +3 -3
  108. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
  109. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +53 -50
  110. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
  111. package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +27 -25
  112. package/dist/src/presentation/web/components/features/settings/interactive-agent-settings-section.d.ts.map +1 -1
  113. package/dist/src/presentation/web/components/features/settings/interactive-agent-settings-section.js +3 -3
  114. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.d.ts +6 -0
  115. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.d.ts.map +1 -0
  116. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.js +76 -0
  117. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.stories.d.ts +15 -0
  118. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.stories.d.ts.map +1 -0
  119. package/dist/src/presentation/web/components/features/settings/litellm-proxy-settings-section.stories.js +29 -0
  120. package/dist/src/presentation/web/components/features/settings/notification-settings-section.d.ts +3 -3
  121. package/dist/src/presentation/web/components/features/settings/notification-settings-section.d.ts.map +1 -1
  122. package/dist/src/presentation/web/components/features/settings/notification-settings-section.js +64 -47
  123. package/dist/src/presentation/web/components/features/settings/notification-settings-section.stories.d.ts.map +1 -1
  124. package/dist/src/presentation/web/components/features/settings/notification-settings-section.stories.js +32 -24
  125. package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
  126. package/dist/src/presentation/web/components/features/settings/settings-page-client.js +29 -378
  127. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts +2 -0
  128. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
  129. package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +14 -0
  130. package/dist/src/presentation/web/components/features/settings/settings-section-utils.d.ts +8 -8
  131. package/dist/src/presentation/web/components/features/settings/settings-section-utils.d.ts.map +1 -1
  132. package/dist/src/presentation/web/components/features/settings/settings-section-utils.js +3 -6
  133. package/dist/src/presentation/web/components/features/settings/settings-section-utils.stories.d.ts +1 -1
  134. package/dist/src/presentation/web/components/features/settings/settings-section-utils.stories.d.ts.map +1 -1
  135. package/dist/src/presentation/web/components/features/settings/settings-section-utils.stories.js +7 -7
  136. package/dist/src/presentation/web/components/features/settings/stage-timeouts-settings-section.d.ts.map +1 -1
  137. package/dist/src/presentation/web/components/features/settings/stage-timeouts-settings-section.js +1 -1
  138. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.d.ts +3 -3
  139. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.d.ts.map +1 -1
  140. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.js +118 -165
  141. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.d.ts +1 -1
  142. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.d.ts.map +1 -1
  143. package/dist/src/presentation/web/components/features/settings/workflow-settings-section.stories.js +26 -64
  144. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
  145. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +2 -2
  146. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
  147. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +1 -0
  148. package/dist/src/presentation/web/components/ui/tooltip.d.ts.map +1 -1
  149. package/dist/src/presentation/web/components/ui/tooltip.js +3 -3
  150. package/dist/src/presentation/web/hooks/feature-flags-context.d.ts.map +1 -1
  151. package/dist/src/presentation/web/hooks/feature-flags-context.js +1 -0
  152. package/dist/src/presentation/web/lib/feature-flags.d.ts +2 -0
  153. package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
  154. package/dist/src/presentation/web/lib/feature-flags.js +6 -0
  155. package/dist/translations/ar/web.json +40 -2
  156. package/dist/translations/de/web.json +40 -2
  157. package/dist/translations/en/web.json +40 -2
  158. package/dist/translations/es/web.json +40 -2
  159. package/dist/translations/fr/web.json +40 -2
  160. package/dist/translations/he/web.json +40 -2
  161. package/dist/translations/pt/web.json +40 -2
  162. package/dist/translations/ru/web.json +40 -2
  163. package/dist/tsconfig.build.tsbuildinfo +1 -1
  164. package/package.json +1 -1
  165. package/web/.next/BUILD_ID +1 -1
  166. package/web/.next/app-path-routes-manifest.json +1 -0
  167. package/web/.next/build-manifest.json +3 -3
  168. package/web/.next/fallback-build-manifest.json +3 -3
  169. package/web/.next/prerender-manifest.json +3 -3
  170. package/web/.next/required-server-files.js +3 -3
  171. package/web/.next/required-server-files.json +3 -3
  172. package/web/.next/routes-manifest.json +6 -0
  173. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
  174. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  175. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  176. package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +27 -27
  177. package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
  178. package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
  179. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +31 -31
  180. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  181. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  182. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  183. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  184. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  185. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +37 -37
  186. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  187. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  188. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  189. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  190. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  191. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  192. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  193. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  194. package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +27 -27
  195. package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
  196. package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
  197. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +31 -31
  198. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  199. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  200. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +37 -37
  201. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  202. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  203. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +37 -37
  204. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  205. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  206. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +27 -27
  207. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  208. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  209. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +28 -28
  210. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
  211. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
  212. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +28 -28
  213. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  214. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  215. package/web/.next/server/app/_global-error.html +1 -1
  216. package/web/.next/server/app/_global-error.rsc +1 -1
  217. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  218. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  219. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  220. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  221. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  222. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +6 -6
  223. package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
  224. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  225. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  226. package/web/.next/server/app/api/dialog/pick-files/route.js.nft.json +1 -1
  227. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  228. package/web/.next/server/app/api/graph-data/route.js +1 -1
  229. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  230. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js +1 -1
  231. package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
  232. package/web/.next/server/app/api/sessions-batch/route.js +1 -1
  233. package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -1
  234. package/web/.next/server/app/plugins/page/app-paths-manifest.json +3 -0
  235. package/web/.next/server/app/plugins/page/build-manifest.json +18 -0
  236. package/web/.next/server/app/plugins/page/next-font-manifest.json +10 -0
  237. package/web/.next/server/app/plugins/page/react-loadable-manifest.json +8 -0
  238. package/web/.next/server/app/plugins/page/server-reference-manifest.json +185 -0
  239. package/web/.next/server/app/plugins/page.js +17 -0
  240. package/web/.next/server/app/plugins/page.js.map +5 -0
  241. package/web/.next/server/app/plugins/page.js.nft.json +1 -0
  242. package/web/.next/server/app/plugins/page_client-reference-manifest.js +3 -0
  243. package/web/.next/server/app/settings/page/server-reference-manifest.json +34 -22
  244. package/web/.next/server/app/settings/page.js +1 -1
  245. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  246. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  247. package/web/.next/server/app/skills/page/server-reference-manifest.json +11 -11
  248. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  249. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  250. package/web/.next/server/app/tools/page/server-reference-manifest.json +11 -11
  251. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  252. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  253. package/web/.next/server/app/version/page/server-reference-manifest.json +6 -6
  254. package/web/.next/server/app/version/page.js.nft.json +1 -1
  255. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  256. package/web/.next/server/app-paths-manifest.json +1 -0
  257. package/web/.next/server/chunks/11es_next_dist_esm_build_templates_app-route_067cwst.js.map +1 -1
  258. package/web/.next/server/chunks/{[root-of-the-server]__0zu_byw._.js → [root-of-the-server]__07suer1._.js} +2 -2
  259. package/web/.next/server/chunks/{[root-of-the-server]__0u1jyv9._.js → [root-of-the-server]__0sgzo7y._.js} +2 -2
  260. package/web/.next/server/chunks/[root-of-the-server]__0tb~wwk._.js +1 -1
  261. package/web/.next/server/chunks/{[root-of-the-server]__08cpfre._.js → [root-of-the-server]__0uxlr84._.js} +2 -2
  262. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js +1 -1
  263. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_create-drawer-client_tsx_0g70fc5._.js.map +1 -1
  264. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js +2 -2
  265. package/web/.next/server/chunks/ssr/0j.8_web_components_common_control-center-drawer_feature-drawer-client_tsx_104cna.._.js.map +1 -1
  266. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js +1 -1
  267. package/web/.next/server/chunks/ssr/0ukq_presentation_web_components_features_settings_settings-page-client_tsx_0j1uius._.js.map +1 -1
  268. package/web/.next/server/chunks/ssr/11es_next_dist_esm_build_templates_app-page_0y6lfp8.js +4 -0
  269. package/web/.next/server/chunks/ssr/11es_next_dist_esm_build_templates_app-page_0y6lfp8.js.map +1 -0
  270. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js +1 -1
  271. package/web/.next/server/chunks/ssr/11y9_components_common_control-center-drawer_repository-drawer-client_tsx_09z.znp._.js.map +1 -1
  272. package/web/.next/server/chunks/ssr/{_04s_q5r._.js → 12k._sonner_dist_index_mjs_0-vmpk5._.js} +2 -2
  273. package/web/.next/server/chunks/ssr/12k._sonner_dist_index_mjs_0-vmpk5._.js.map +1 -0
  274. package/web/.next/server/chunks/ssr/{[root-of-the-server]__0rvrr1j._.js → [root-of-the-server]__0.5ojmt._.js} +2 -2
  275. package/web/.next/server/chunks/ssr/[root-of-the-server]__0.5ojmt._.js.map +1 -0
  276. package/web/.next/server/chunks/ssr/[root-of-the-server]__04h~gav._.js +3 -0
  277. package/web/.next/server/chunks/ssr/[root-of-the-server]__04h~gav._.js.map +1 -0
  278. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js +1 -1
  279. package/web/.next/server/chunks/ssr/[root-of-the-server]__05_qc0n._.js.map +1 -1
  280. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js +1 -1
  281. package/web/.next/server/chunks/ssr/[root-of-the-server]__0ge~xny._.js.map +1 -1
  282. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js +1 -1
  283. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qda~yi._.js.map +1 -1
  284. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rv1gci._.js +1 -1
  285. package/web/.next/server/chunks/ssr/[root-of-the-server]__0tq2syh._.js +1 -1
  286. package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js +1 -1
  287. package/web/.next/server/chunks/ssr/[root-of-the-server]__0t~u8sd._.js.map +1 -1
  288. package/web/.next/server/chunks/ssr/[root-of-the-server]__0~v1~b9._.js +3 -0
  289. package/web/.next/server/chunks/ssr/[root-of-the-server]__0~v1~b9._.js.map +1 -0
  290. package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js +1 -1
  291. package/web/.next/server/chunks/ssr/[root-of-the-server]__10tll_l._.js.map +1 -1
  292. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js +1 -1
  293. package/web/.next/server/chunks/ssr/[root-of-the-server]__12j29w-._.js.map +1 -1
  294. package/web/.next/server/chunks/ssr/_01sesw0._.js +1 -1
  295. package/web/.next/server/chunks/ssr/_01sesw0._.js.map +1 -1
  296. package/web/.next/server/chunks/ssr/{_00u~.41._.js → _03x4h9e._.js} +2 -2
  297. package/web/.next/server/chunks/ssr/_03x4h9e._.js.map +1 -0
  298. package/web/.next/server/chunks/ssr/{_0~0jkp_._.js → _05fk0a4._.js} +2 -2
  299. package/web/.next/server/chunks/ssr/_05fk0a4._.js.map +1 -0
  300. package/web/.next/server/chunks/ssr/_069y.js._.js +2 -2
  301. package/web/.next/server/chunks/ssr/_069y.js._.js.map +1 -1
  302. package/web/.next/server/chunks/ssr/{_0r04xhw._.js → _07u.4jr._.js} +2 -2
  303. package/web/.next/server/chunks/ssr/{_0r04xhw._.js.map → _07u.4jr._.js.map} +1 -1
  304. package/web/.next/server/chunks/ssr/_083k45~._.js +3 -0
  305. package/web/.next/server/chunks/ssr/_083k45~._.js.map +1 -0
  306. package/web/.next/server/chunks/ssr/_0__4si~._.js +1 -1
  307. package/web/.next/server/chunks/ssr/_0__4si~._.js.map +1 -1
  308. package/web/.next/server/chunks/ssr/_0_m17kl._.js +1 -1
  309. package/web/.next/server/chunks/ssr/_0_m17kl._.js.map +1 -1
  310. package/web/.next/server/chunks/ssr/_0d4miu.._.js +1 -1
  311. package/web/.next/server/chunks/ssr/_0d4miu.._.js.map +1 -1
  312. package/web/.next/server/chunks/ssr/_0e8ern9._.js +1 -1
  313. package/web/.next/server/chunks/ssr/_0e8ern9._.js.map +1 -1
  314. package/web/.next/server/chunks/ssr/_0i~-084._.js +3 -0
  315. package/web/.next/server/chunks/ssr/_0i~-084._.js.map +1 -0
  316. package/web/.next/server/chunks/ssr/_0kt18~b._.js +3 -0
  317. package/web/.next/server/chunks/ssr/_0kt18~b._.js.map +1 -0
  318. package/web/.next/server/chunks/ssr/{_08_079y._.js → _0mj-tmi._.js} +2 -2
  319. package/web/.next/server/chunks/ssr/{_08_079y._.js.map → _0mj-tmi._.js.map} +1 -1
  320. package/web/.next/server/chunks/ssr/{_0hw~zvl._.js → _0o_oaao._.js} +2 -2
  321. package/web/.next/server/chunks/ssr/_0o_oaao._.js.map +1 -0
  322. package/web/.next/server/chunks/ssr/_0p3~u8u._.js +2 -2
  323. package/web/.next/server/chunks/ssr/_0p3~u8u._.js.map +1 -1
  324. package/web/.next/server/chunks/ssr/_0r.3n~3._.js +1 -1
  325. package/web/.next/server/chunks/ssr/_0r.3n~3._.js.map +1 -1
  326. package/web/.next/server/chunks/ssr/_0rcx2-c._.js +9 -0
  327. package/web/.next/server/chunks/ssr/_0rcx2-c._.js.map +1 -0
  328. package/web/.next/server/chunks/ssr/_0t59q8r._.js +1 -1
  329. package/web/.next/server/chunks/ssr/_0t59q8r._.js.map +1 -1
  330. package/web/.next/server/chunks/ssr/_0tcccbb._.js +1 -1
  331. package/web/.next/server/chunks/ssr/_0tcccbb._.js.map +1 -1
  332. package/web/.next/server/chunks/ssr/_0tfz1v_._.js +3 -0
  333. package/web/.next/server/chunks/ssr/_0tfz1v_._.js.map +1 -0
  334. package/web/.next/server/chunks/ssr/{_0txr945._.js → _0u3d8.n._.js} +2 -2
  335. package/web/.next/server/chunks/ssr/_0u3d8.n._.js.map +1 -0
  336. package/web/.next/server/chunks/ssr/_0vyfc4b._.js +1 -1
  337. package/web/.next/server/chunks/ssr/_0vyfc4b._.js.map +1 -1
  338. package/web/.next/server/chunks/ssr/_0w-_hww._.js +1 -1
  339. package/web/.next/server/chunks/ssr/_0w-_hww._.js.map +1 -1
  340. package/web/.next/server/chunks/ssr/{_09r54oy._.js → _0ygafoy._.js} +2 -2
  341. package/web/.next/server/chunks/ssr/{_09r54oy._.js.map → _0ygafoy._.js.map} +1 -1
  342. package/web/.next/server/chunks/ssr/_0zk-h5w._.js +1 -1
  343. package/web/.next/server/chunks/ssr/_0zk-h5w._.js.map +1 -1
  344. package/web/.next/server/chunks/ssr/_0~7lwu_._.js +1 -1
  345. package/web/.next/server/chunks/ssr/_0~7lwu_._.js.map +1 -1
  346. package/web/.next/server/chunks/ssr/_10joy2y._.js +3 -0
  347. package/web/.next/server/chunks/ssr/_10joy2y._.js.map +1 -0
  348. package/web/.next/server/chunks/ssr/_1161g9x._.js +1 -1
  349. package/web/.next/server/chunks/ssr/_1161g9x._.js.map +1 -1
  350. package/web/.next/server/chunks/ssr/_12uy.45._.js +3 -0
  351. package/web/.next/server/chunks/ssr/_12uy.45._.js.map +1 -0
  352. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js +3 -0
  353. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_plugins_page_actions_0rdndum.js.map +1 -0
  354. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js +1 -1
  355. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_05m2q~u.js.map +1 -1
  356. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js +1 -1
  357. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_0.6zk.t.js.map +1 -1
  358. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_approve-feature_ts_0pjb_re._.js +1 -1
  359. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_0w2wqvu._.js +1 -1
  360. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js +1 -1
  361. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_0l3oxx9._.js.map +1 -1
  362. package/web/.next/server/middleware-build-manifest.js +3 -3
  363. package/web/.next/server/next-font-manifest.js +1 -1
  364. package/web/.next/server/next-font-manifest.json +3 -0
  365. package/web/.next/server/pages/500.html +1 -1
  366. package/web/.next/server/server-reference-manifest.js +1 -1
  367. package/web/.next/server/server-reference-manifest.json +187 -61
  368. package/web/.next/static/chunks/{0_xww9bsde~1x.js → 01~u_q8i2zgcl.js} +2 -2
  369. package/web/.next/static/chunks/{06nsv-_ec9ehn.js → 025ml1.quzhqf.js} +1 -1
  370. package/web/.next/static/chunks/{0fg~vc93spa9c.js → 07gal-~-zwagj.js} +1 -1
  371. package/web/.next/static/chunks/07le1mov593z9.js +1 -0
  372. package/web/.next/static/chunks/09ungqk9~va40.js +1 -0
  373. package/web/.next/static/chunks/0ab36sfvo.9ai.js +1 -0
  374. package/web/.next/static/chunks/0aq9-lg.5r.nk.js +5 -0
  375. package/web/.next/static/chunks/{0in4l8mne5y~_.js → 0b2pi58fg3lt3.js} +1 -1
  376. package/web/.next/static/chunks/{0cv09-g0prv4o.js → 0cvyulutrctst.js} +1 -1
  377. package/web/.next/static/chunks/0eqi_uuiepxhf.js +1 -0
  378. package/web/.next/static/chunks/{0v~n9z6b639zm.js → 0jwq.mr-.ltps.js} +1 -1
  379. package/web/.next/static/chunks/0k8m.qcahm63g.js +1 -0
  380. package/web/.next/static/chunks/0lc0x8kcu46ae.js +1 -0
  381. package/web/.next/static/chunks/0lz-oq74e_ciu.js +1 -0
  382. package/web/.next/static/chunks/0nkujbu62z1jl.js +7 -0
  383. package/web/.next/static/chunks/0oadtfnesfdqc.js +1 -0
  384. package/web/.next/static/chunks/{0ygtupas8pxdi.js → 0uryz2ek77e2a.js} +1 -1
  385. package/web/.next/static/chunks/0v7r7y~3e~oo6.css +1 -0
  386. package/web/.next/static/chunks/{0hg8qgtv~kuys.js → 0xo.hi4px83w2.js} +1 -1
  387. package/web/.next/static/chunks/{0_v4t6gzx.332.js → 0xr0p_ynap2~d.js} +1 -1
  388. package/web/.next/static/chunks/0xtzpbc5mm5z7.js +5 -0
  389. package/web/.next/static/chunks/{133q8d69p6cl0.js → 0~-kk8o121_13.js} +1 -1
  390. package/web/.next/static/chunks/{078lp287u~c~b.js → 16k169s1a_8ru.js} +1 -1
  391. package/web/.next/static/chunks/{17c31c1biwfyi.js → 17dp77weos4ao.js} +1 -1
  392. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qxd563._.js +0 -3
  393. package/web/.next/server/chunks/ssr/[root-of-the-server]__0qxd563._.js.map +0 -1
  394. package/web/.next/server/chunks/ssr/[root-of-the-server]__0rvrr1j._.js.map +0 -1
  395. package/web/.next/server/chunks/ssr/_00u~.41._.js.map +0 -1
  396. package/web/.next/server/chunks/ssr/_04s_q5r._.js.map +0 -1
  397. package/web/.next/server/chunks/ssr/_0dy8.0k._.js +0 -3
  398. package/web/.next/server/chunks/ssr/_0dy8.0k._.js.map +0 -1
  399. package/web/.next/server/chunks/ssr/_0gdghcr._.js +0 -3
  400. package/web/.next/server/chunks/ssr/_0gdghcr._.js.map +0 -1
  401. package/web/.next/server/chunks/ssr/_0hw~zvl._.js.map +0 -1
  402. package/web/.next/server/chunks/ssr/_0l2~~pi._.js +0 -3
  403. package/web/.next/server/chunks/ssr/_0l2~~pi._.js.map +0 -1
  404. package/web/.next/server/chunks/ssr/_0mi5qj~._.js +0 -3
  405. package/web/.next/server/chunks/ssr/_0mi5qj~._.js.map +0 -1
  406. package/web/.next/server/chunks/ssr/_0n.magx._.js +0 -3
  407. package/web/.next/server/chunks/ssr/_0n.magx._.js.map +0 -1
  408. package/web/.next/server/chunks/ssr/_0txr945._.js.map +0 -1
  409. package/web/.next/server/chunks/ssr/_0y8u4.e._.js +0 -9
  410. package/web/.next/server/chunks/ssr/_0y8u4.e._.js.map +0 -1
  411. package/web/.next/server/chunks/ssr/_0~0jkp_._.js.map +0 -1
  412. package/web/.next/static/chunks/0-ud~1jj7chzu.js +0 -7
  413. package/web/.next/static/chunks/01znjuvi5t9~q.js +0 -5
  414. package/web/.next/static/chunks/033sl_l5o3uo8.css +0 -1
  415. package/web/.next/static/chunks/04r9m_5p953mf.js +0 -1
  416. package/web/.next/static/chunks/07i3-aamszsoh.js +0 -1
  417. package/web/.next/static/chunks/0ee1d3_y40g9f.js +0 -1
  418. package/web/.next/static/chunks/0n3kuj7t_-jzp.js +0 -1
  419. package/web/.next/static/chunks/0pt-d18f7zxvv.js +0 -1
  420. package/web/.next/static/chunks/12pd180jp8zu..js +0 -5
  421. package/web/.next/static/chunks/13fcwhkw7dle2.js +0 -1
  422. package/web/.next/static/chunks/15mks7_3venc1.js +0 -1
  423. /package/web/.next/server/chunks/{[root-of-the-server]__0zu_byw._.js.map → [root-of-the-server]__07suer1._.js.map} +0 -0
  424. /package/web/.next/server/chunks/{[root-of-the-server]__0u1jyv9._.js.map → [root-of-the-server]__0sgzo7y._.js.map} +0 -0
  425. /package/web/.next/server/chunks/{[root-of-the-server]__08cpfre._.js.map → [root-of-the-server]__0uxlr84._.js.map} +0 -0
  426. /package/web/.next/static/{LQMB6QAutWzPQnLUZG96y → vD7xT4_iwKDhgj4-rr637}/_buildManifest.js +0 -0
  427. /package/web/.next/static/{LQMB6QAutWzPQnLUZG96y → vD7xT4_iwKDhgj4-rr637}/_clientMiddlewareManifest.js +0 -0
  428. /package/web/.next/static/{LQMB6QAutWzPQnLUZG96y → vD7xT4_iwKDhgj4-rr637}/_ssgManifest.js +0 -0
@@ -1,61 +1,64 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState, useTransition, useRef, useEffect } from 'react';
4
- import { Flag, Check } from 'lucide-react';
3
+ import { useState, useTransition } from 'react';
4
+ import { Flag } from 'lucide-react';
5
5
  import { toast } from 'sonner';
6
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../../ui/card.js';
7
- import { Label } from '../../ui/label.js';
8
- import { Switch } from '../../ui/switch.js';
6
+ import { useTranslation } from 'react-i18next';
9
7
  import { updateSettingsAction } from '../../../app/actions/update-settings.js';
10
- const FLAG_DESCRIPTIONS = {
11
- skills: 'Enable Skills navigation and functionality in the web UI',
12
- envDeploy: 'Enable environment deployment features in the web UI',
13
- debug: 'Enable debug UI elements and verbose client-side logging',
14
- githubImport: 'Enable GitHub repository import in the web UI',
15
- adoptBranch: 'Enable the ability to adopt existing branches as tracked features',
16
- gitRebaseSync: 'Enable git rebase-on-main and sync-main operations in the web UI',
17
- reactFileManager: 'Use the built-in React file manager instead of the native OS folder picker. Also serves as automatic fallback when the native picker is unavailable.',
18
- };
19
- const FLAG_LABELS = {
20
- skills: 'Skills',
21
- envDeploy: 'Deployments',
22
- debug: 'Debug',
23
- githubImport: 'GitHub Import',
24
- adoptBranch: 'Adopt Branch',
25
- gitRebaseSync: 'Git Rebase & Sync',
26
- reactFileManager: 'React File Manager',
27
- };
28
- const FLAG_KEYS = [
29
- 'skills',
30
- 'envDeploy',
31
- 'debug',
32
- 'githubImport',
33
- 'adoptBranch',
34
- 'gitRebaseSync',
35
- 'reactFileManager',
36
- ];
37
- export function FeatureFlagsSettingsSection({ featureFlags }) {
8
+ import { SettingsSection, SwitchRow } from './settings-section-utils.js';
9
+ export function FeatureFlagsSettingsSection({ settings }) {
10
+ const { t } = useTranslation('web');
11
+ const [, startTransition] = useTransition();
12
+ const featureFlags = settings.featureFlags ?? {
13
+ skills: false,
14
+ envDeploy: false,
15
+ debug: false,
16
+ githubImport: false,
17
+ adoptBranch: false,
18
+ gitRebaseSync: false,
19
+ reactFileManager: false,
20
+ plugins: false,
21
+ };
38
22
  const [flags, setFlags] = useState({ ...featureFlags });
39
- const [isPending, startTransition] = useTransition();
40
- const [showSaved, setShowSaved] = useState(false);
41
- const prevPendingRef = useRef(false);
42
- useEffect(() => {
43
- if (prevPendingRef.current && !isPending) {
44
- setShowSaved(true);
45
- const timer = setTimeout(() => setShowSaved(false), 2000);
46
- return () => clearTimeout(timer);
47
- }
48
- prevPendingRef.current = isPending;
49
- }, [isPending]);
50
- function handleFlagChange(key, value) {
51
- const newFlags = { ...flags, [key]: value };
52
- setFlags(newFlags);
23
+ function save(payload) {
53
24
  startTransition(async () => {
54
- const result = await updateSettingsAction({ featureFlags: newFlags });
25
+ const result = await updateSettingsAction(payload);
55
26
  if (!result.success) {
56
- toast.error(result.error ?? 'Failed to save feature flags');
27
+ toast.error(result.error ?? t('settings.failedToSave'));
57
28
  }
58
29
  });
59
30
  }
60
- return (_jsxs(Card, { id: "feature-flags", className: "scroll-mt-6", "data-testid": "feature-flags-settings-section", children: [_jsxs(CardHeader, { children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Flag, { className: "text-muted-foreground h-4 w-4" }), _jsx(CardTitle, { children: "Feature Flags" })] }), isPending ? _jsx("span", { className: "text-muted-foreground text-xs", children: "Saving..." }) : null, showSaved && !isPending ? (_jsxs("span", { className: "flex items-center gap-1 text-xs text-green-600", children: [_jsx(Check, { className: "h-3 w-3" }), "Saved"] })) : null] }), _jsx(CardDescription, { children: "Toggle experimental and optional features. Changes take effect after page navigation." })] }), _jsx(CardContent, { className: "space-y-4", children: FLAG_KEYS.map((key) => (_jsxs("div", { className: "flex items-center justify-between gap-4", children: [_jsxs("div", { className: "space-y-0.5", children: [_jsx(Label, { htmlFor: `flag-${key}`, children: FLAG_LABELS[key] }), _jsx("p", { className: "text-muted-foreground text-xs", children: FLAG_DESCRIPTIONS[key] })] }), _jsx(Switch, { id: `flag-${key}`, "data-testid": `switch-flag-${key}`, checked: flags[key], onCheckedChange: (v) => handleFlagChange(key, v) })] }, key))) })] }));
31
+ return (_jsxs(SettingsSection, { icon: Flag, title: t('settings.featureFlags.title'), description: t('settings.featureFlags.sectionDescription'), badge: t('settings.featureFlags.badge'), testId: "feature-flags-settings-section", tooltip: t('settings.featureFlags.hint'), children: [_jsx(SwitchRow, { label: t('settings.featureFlags.skills'), description: t('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: flags.skills, onChange: (v) => {
32
+ const newFlags = { ...flags, skills: v };
33
+ setFlags(newFlags);
34
+ save({ featureFlags: newFlags });
35
+ } }), _jsx(SwitchRow, { label: t('settings.featureFlags.deployments'), description: t('settings.featureFlags.deploymentsDescription'), tooltip: "Enables experimental deployment features for environment management.", id: "flag-envDeploy", testId: "switch-flag-envDeploy", checked: flags.envDeploy, onChange: (v) => {
36
+ const newFlags = { ...flags, envDeploy: v };
37
+ setFlags(newFlags);
38
+ save({ featureFlags: newFlags });
39
+ } }), _jsx(SwitchRow, { label: t('settings.featureFlags.debug'), description: t('settings.featureFlags.debugDescription'), tooltip: "Shows additional debugging information in the UI for troubleshooting.", id: "flag-debug", testId: "switch-flag-debug", checked: flags.debug, onChange: (v) => {
40
+ const newFlags = { ...flags, debug: v };
41
+ setFlags(newFlags);
42
+ save({ featureFlags: newFlags });
43
+ } }), _jsx(SwitchRow, { label: t('settings.featureFlags.githubImport'), description: t('settings.featureFlags.githubImportDescription'), tooltip: "Enables importing repositories directly from GitHub.", id: "flag-githubImport", testId: "switch-flag-githubImport", checked: flags.githubImport, onChange: (v) => {
44
+ const newFlags = { ...flags, githubImport: v };
45
+ setFlags(newFlags);
46
+ save({ featureFlags: newFlags });
47
+ } }), _jsx(SwitchRow, { label: t('settings.featureFlags.adoptBranch'), description: t('settings.featureFlags.adoptBranchDescription'), tooltip: "Enables adopting existing git branches as ShipIT features.", id: "flag-adoptBranch", testId: "switch-flag-adoptBranch", checked: flags.adoptBranch, onChange: (v) => {
48
+ const newFlags = { ...flags, adoptBranch: v };
49
+ setFlags(newFlags);
50
+ save({ featureFlags: newFlags });
51
+ } }), _jsx(SwitchRow, { label: t('settings.featureFlags.gitRebaseSync'), description: t('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: flags.gitRebaseSync, onChange: (v) => {
52
+ const newFlags = { ...flags, gitRebaseSync: v };
53
+ setFlags(newFlags);
54
+ save({ featureFlags: newFlags });
55
+ } }), _jsx(SwitchRow, { label: t('settings.featureFlags.reactFileManager'), description: t('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: flags.reactFileManager, onChange: (v) => {
56
+ const newFlags = { ...flags, reactFileManager: v };
57
+ setFlags(newFlags);
58
+ save({ featureFlags: newFlags });
59
+ } }), _jsx(SwitchRow, { label: t('settings.featureFlags.plugins'), description: t('settings.featureFlags.pluginsDescription'), tooltip: "Enables the Plugins page for browsing and managing Claude Code plugins from a LiteLLM marketplace.", id: "flag-plugins", testId: "switch-flag-plugins", checked: flags.plugins, onChange: (v) => {
60
+ const newFlags = { ...flags, plugins: v };
61
+ setFlags(newFlags);
62
+ save({ featureFlags: newFlags });
63
+ } })] }));
61
64
  }
@@ -1 +1 @@
1
- {"version":3,"file":"feature-flags-settings-section.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/feature-flags-settings-section.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAE/E,QAAA,MAAM,IAAI;;;;;;;CAO0C,CAAC;AAErD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAYxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAYzB,CAAC"}
1
+ {"version":3,"file":"feature-flags-settings-section.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/feature-flags-settings-section.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAK/E,QAAA,MAAM,IAAI;;;;;;;CAO0C,CAAC;AAErD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAgBxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAgBzB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { FeatureFlagsSettingsSection } from './feature-flags-settings-section.js';
2
+ import { createDefaultSettings } from '../../../../../../packages/core/src/domain/factories/settings-defaults.factory.js';
3
+ const baseSettings = createDefaultSettings();
2
4
  const meta = {
3
5
  title: 'Features/Settings/FeatureFlagsSettingsSection',
4
6
  component: FeatureFlagsSettingsSection,
@@ -10,40 +12,40 @@ const meta = {
10
12
  export default meta;
11
13
  export const Default = {
12
14
  args: {
13
- featureFlags: {
14
- skills: false,
15
- envDeploy: false,
16
- debug: false,
17
- githubImport: false,
18
- adoptBranch: false,
19
- gitRebaseSync: false,
20
- reactFileManager: false,
21
- },
15
+ settings: baseSettings,
22
16
  },
23
17
  };
24
18
  export const AllEnabled = {
25
19
  args: {
26
- featureFlags: {
27
- skills: true,
28
- envDeploy: true,
29
- debug: true,
30
- githubImport: true,
31
- adoptBranch: true,
32
- gitRebaseSync: true,
33
- reactFileManager: true,
20
+ settings: {
21
+ ...baseSettings,
22
+ featureFlags: {
23
+ skills: true,
24
+ envDeploy: true,
25
+ debug: true,
26
+ githubImport: true,
27
+ adoptBranch: true,
28
+ gitRebaseSync: true,
29
+ reactFileManager: true,
30
+ plugins: true,
31
+ },
34
32
  },
35
33
  },
36
34
  };
37
35
  export const AllDisabled = {
38
36
  args: {
39
- featureFlags: {
40
- skills: false,
41
- envDeploy: false,
42
- debug: false,
43
- githubImport: false,
44
- adoptBranch: false,
45
- gitRebaseSync: false,
46
- reactFileManager: false,
37
+ settings: {
38
+ ...baseSettings,
39
+ featureFlags: {
40
+ skills: false,
41
+ envDeploy: false,
42
+ debug: false,
43
+ githubImport: false,
44
+ adoptBranch: false,
45
+ gitRebaseSync: false,
46
+ reactFileManager: false,
47
+ plugins: false,
48
+ },
47
49
  },
48
50
  },
49
51
  };
@@ -1 +1 @@
1
- {"version":3,"file":"interactive-agent-settings-section.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/interactive-agent-settings-section.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAA0B,MAAM,yCAAyC,CAAC;AAGhG,MAAM,WAAW,oCAAoC;IACnD,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,QAAQ,GACT,EAAE,oCAAoC,2CA8GtC"}
1
+ {"version":3,"file":"interactive-agent-settings-section.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/interactive-agent-settings-section.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAA0B,MAAM,yCAAyC,CAAC;AAGhG,MAAM,WAAW,oCAAoC;IACnD,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,QAAQ,GACT,EAAE,oCAAoC,2CAkHtC"}
@@ -25,7 +25,7 @@ export function InteractiveAgentSettingsSection({ settings, }) {
25
25
  }
26
26
  });
27
27
  }
28
- return (_jsxs(SettingsSection, { icon: MessageSquare, title: t('settings.interactiveAgent.title'), description: t('settings.interactiveAgent.description'), testId: "interactive-agent-settings-section", children: [_jsx(SwitchRow, { label: t('settings.interactiveAgent.enableChatTab'), description: t('settings.interactiveAgent.enableChatTabDescription'), id: "interactive-agent-enabled", testId: "switch-interactive-agent-enabled", checked: interactiveEnabled, onChange: (v) => {
28
+ return (_jsxs(SettingsSection, { icon: MessageSquare, title: t('settings.interactiveAgent.title'), description: t('settings.interactiveAgent.description'), testId: "interactive-agent-settings-section", tooltip: t('settings.interactiveAgent.hint'), children: [_jsx(SwitchRow, { label: t('settings.interactiveAgent.enableChatTab'), description: t('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: interactiveEnabled, onChange: (v) => {
29
29
  setInteractiveEnabled(v);
30
30
  save({
31
31
  interactiveAgent: {
@@ -34,7 +34,7 @@ export function InteractiveAgentSettingsSection({ settings, }) {
34
34
  maxConcurrentSessions: parseInt(interactiveSessions, 10) || 3,
35
35
  },
36
36
  });
37
- } }), _jsx(SettingsRow, { label: t('settings.interactiveAgent.autoTimeout'), description: t('settings.interactiveAgent.autoTimeoutDescription'), htmlFor: "interactive-agent-timeout", children: _jsx(NumberStepper, { id: "interactive-agent-timeout", testId: "input-interactive-agent-timeout", value: interactiveTimeout, placeholder: "15", min: 1, max: 120, suffix: "min", onChange: setInteractiveTimeout, onBlur: () => {
37
+ } }), _jsx(SettingsRow, { label: t('settings.interactiveAgent.autoTimeout'), description: t('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: _jsx(NumberStepper, { id: "interactive-agent-timeout", testId: "input-interactive-agent-timeout", value: interactiveTimeout, placeholder: "15", min: 1, max: 120, suffix: "min", onChange: setInteractiveTimeout, onBlur: () => {
38
38
  const n = parseInt(interactiveTimeout, 10);
39
39
  const clamped = Number.isNaN(n) ? 15 : Math.min(120, Math.max(1, n));
40
40
  const clampedStr = String(clamped);
@@ -46,7 +46,7 @@ export function InteractiveAgentSettingsSection({ settings, }) {
46
46
  maxConcurrentSessions: parseInt(interactiveSessions, 10) || 3,
47
47
  },
48
48
  });
49
- } }) }), _jsx(SettingsRow, { label: t('settings.interactiveAgent.maxConcurrentSessions'), description: t('settings.interactiveAgent.maxConcurrentSessionsDescription'), htmlFor: "interactive-agent-sessions", children: _jsx(NumberStepper, { id: "interactive-agent-sessions", testId: "input-interactive-agent-sessions", value: interactiveSessions, placeholder: "3", min: 1, max: 10, onChange: setInteractiveSessions, onBlur: () => {
49
+ } }) }), _jsx(SettingsRow, { label: t('settings.interactiveAgent.maxConcurrentSessions'), description: t('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: _jsx(NumberStepper, { id: "interactive-agent-sessions", testId: "input-interactive-agent-sessions", value: interactiveSessions, placeholder: "3", min: 1, max: 10, onChange: setInteractiveSessions, onBlur: () => {
50
50
  const n = parseInt(interactiveSessions, 10);
51
51
  const clamped = Number.isNaN(n) ? 3 : Math.min(10, Math.max(1, n));
52
52
  const clampedStr = String(clamped);
@@ -0,0 +1,6 @@
1
+ import type { Settings } from '../../../../../../packages/core/src/domain/generated/output.js';
2
+ export interface LiteLLMProxySettingsSectionProps {
3
+ settings: Settings;
4
+ }
5
+ export declare function LiteLLMProxySettingsSection({ settings }: LiteLLMProxySettingsSectionProps): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=litellm-proxy-settings-section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"litellm-proxy-settings-section.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/litellm-proxy-settings-section.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AAKxE,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE,gCAAgC,2CAiJzF"}
@@ -0,0 +1,76 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState, useTransition } from 'react';
4
+ import { Server, CheckCircle2, XCircle } from 'lucide-react';
5
+ import { toast } from 'sonner';
6
+ import { useTranslation } from 'react-i18next';
7
+ import { updateSettingsAction } from '../../../app/actions/update-settings.js';
8
+ import { addMarketplaceAction } from '../../../app/actions/add-marketplace.js';
9
+ import { SettingsSection, SettingsRow, SwitchRow } from './settings-section-utils.js';
10
+ import { Input } from '../../ui/input.js';
11
+ import { Button } from '../../ui/button.js';
12
+ export function LiteLLMProxySettingsSection({ settings }) {
13
+ const { t } = useTranslation('web');
14
+ const [, startTransition] = useTransition();
15
+ const [baseUrl, setBaseUrl] = useState(settings.litellmProxy?.baseUrl ?? '');
16
+ const [apiKey, setApiKey] = useState(settings.litellmProxy?.apiKey ?? '');
17
+ const [marketplaceEnabled, setMarketplaceEnabled] = useState(settings.litellmProxy?.marketplaceEnabled ?? false);
18
+ const [testStatus, setTestStatus] = useState('idle');
19
+ const [isTesting, setIsTesting] = useState(false);
20
+ const originalBaseUrl = settings.litellmProxy?.baseUrl ?? '';
21
+ const originalApiKey = settings.litellmProxy?.apiKey ?? '';
22
+ function save(payload) {
23
+ startTransition(async () => {
24
+ const result = await updateSettingsAction(payload);
25
+ if (!result.success) {
26
+ toast.error(result.error ?? t('settings.failedToSave'));
27
+ }
28
+ });
29
+ }
30
+ function buildPayload(overrides) {
31
+ return {
32
+ litellmProxy: {
33
+ baseUrl: overrides?.baseUrl ?? baseUrl,
34
+ apiKey: overrides?.apiKey ?? apiKey,
35
+ marketplaceEnabled: overrides?.marketplaceEnabled ?? marketplaceEnabled,
36
+ },
37
+ };
38
+ }
39
+ async function handleTestConnection() {
40
+ if (!baseUrl)
41
+ return;
42
+ setIsTesting(true);
43
+ setTestStatus('idle');
44
+ try {
45
+ const marketplaceUrl = `${baseUrl.replace(/\/+$/, '')}/claude-code/marketplace.json`;
46
+ const result = await addMarketplaceAction(marketplaceUrl);
47
+ setTestStatus(result.success ? 'success' : 'failed');
48
+ if (result.success) {
49
+ toast.success(t('settings.litellmProxy.testSuccess'));
50
+ }
51
+ else {
52
+ toast.error(t('settings.litellmProxy.testFailed'));
53
+ }
54
+ }
55
+ catch {
56
+ setTestStatus('failed');
57
+ toast.error(t('settings.litellmProxy.testFailed'));
58
+ }
59
+ finally {
60
+ setIsTesting(false);
61
+ }
62
+ }
63
+ return (_jsxs(SettingsSection, { icon: Server, title: t('settings.litellmProxy.title'), description: t('settings.litellmProxy.description'), testId: "litellm-proxy-settings-section", tooltip: t('settings.litellmProxy.hint'), children: [_jsx(SettingsRow, { label: t('settings.litellmProxy.baseUrl'), description: t('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: _jsx(Input, { id: "litellm-proxy-url", "data-testid": "litellm-proxy-url-input", type: "text", placeholder: "http://localhost:4000", value: baseUrl, onChange: (e) => {
64
+ setBaseUrl(e.target.value);
65
+ setTestStatus('idle');
66
+ }, onBlur: () => {
67
+ if (baseUrl !== originalBaseUrl)
68
+ save(buildPayload({ baseUrl }));
69
+ }, className: "w-64 text-xs" }) }), _jsx(SettingsRow, { label: t('settings.litellmProxy.apiKey'), description: t('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: _jsx(Input, { id: "litellm-api-key", "data-testid": "litellm-api-key-input", type: "password", placeholder: "sk-...", value: apiKey, onChange: (e) => setApiKey(e.target.value), onBlur: () => {
70
+ if (apiKey !== originalApiKey)
71
+ save(buildPayload({ apiKey }));
72
+ }, className: "w-64 text-xs" }) }), _jsx(SwitchRow, { label: t('settings.litellmProxy.marketplaceEnabled'), description: t('settings.litellmProxy.marketplaceEnabledDescription'), tooltip: "When enabled, the plugin marketplace will fetch its catalog from this LiteLLM proxy instead of using built-in defaults.", id: "litellm-marketplace-enabled", testId: "switch-litellm-marketplace-enabled", checked: marketplaceEnabled, onChange: (v) => {
73
+ setMarketplaceEnabled(v);
74
+ save(buildPayload({ marketplaceEnabled: v }));
75
+ } }), _jsx(SettingsRow, { label: t('settings.litellmProxy.testConnection'), tooltip: "Attempt to connect to the proxy and fetch the marketplace catalog to verify the configuration is correct.", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { variant: "outline", size: "sm", "data-testid": "litellm-test-connection-btn", disabled: !baseUrl || isTesting, onClick: handleTestConnection, className: "cursor-pointer text-xs", children: isTesting ? t('settings.saving') : t('settings.litellmProxy.testConnection') }), testStatus === 'success' && (_jsx(CheckCircle2, { className: "h-4 w-4 text-emerald-500", "data-testid": "litellm-test-success" })), testStatus === 'failed' && (_jsx(XCircle, { className: "text-destructive h-4 w-4", "data-testid": "litellm-test-failed" }))] }) })] }));
76
+ }
@@ -0,0 +1,15 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import { LiteLLMProxySettingsSection } from './litellm-proxy-settings-section.js';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof LiteLLMProxySettingsSection;
6
+ tags: string[];
7
+ parameters: {
8
+ layout: string;
9
+ };
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
14
+ export declare const Configured: Story;
15
+ //# sourceMappingURL=litellm-proxy-settings-section.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"litellm-proxy-settings-section.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/litellm-proxy-settings-section.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAK/E,QAAA,MAAM,IAAI;;;;;;;CAO0C,CAAC;AAErD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { LiteLLMProxySettingsSection } from './litellm-proxy-settings-section.js';
2
+ import { createDefaultSettings } from '../../../../../../packages/core/src/domain/factories/settings-defaults.factory.js';
3
+ const baseSettings = createDefaultSettings();
4
+ const meta = {
5
+ title: 'Features/Settings/LiteLLMProxySettingsSection',
6
+ component: LiteLLMProxySettingsSection,
7
+ tags: ['autodocs'],
8
+ parameters: {
9
+ layout: 'padded',
10
+ },
11
+ };
12
+ export default meta;
13
+ export const Default = {
14
+ args: {
15
+ settings: baseSettings,
16
+ },
17
+ };
18
+ export const Configured = {
19
+ args: {
20
+ settings: {
21
+ ...baseSettings,
22
+ litellmProxy: {
23
+ baseUrl: 'http://localhost:4000',
24
+ apiKey: 'sk-litellm-proxy-key-1234',
25
+ marketplaceEnabled: true,
26
+ },
27
+ },
28
+ },
29
+ };
@@ -1,6 +1,6 @@
1
- import type { NotificationPreferences } from '../../../../../../packages/core/src/domain/generated/output.js';
1
+ import type { Settings } from '../../../../../../packages/core/src/domain/generated/output.js';
2
2
  export interface NotificationSettingsSectionProps {
3
- notifications: NotificationPreferences;
3
+ settings: Settings;
4
4
  }
5
- export declare function NotificationSettingsSection({ notifications }: NotificationSettingsSectionProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function NotificationSettingsSection({ settings }: NotificationSettingsSectionProps): import("react/jsx-runtime").JSX.Element;
6
6
  //# sourceMappingURL=notification-settings-section.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification-settings-section.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/notification-settings-section.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAmBvF,MAAM,WAAW,gCAAgC;IAC/C,aAAa,EAAE,uBAAuB,CAAC;CACxC;AAED,wBAAgB,2BAA2B,CAAC,EAAE,aAAa,EAAE,EAAE,gCAAgC,2CAsH9F"}
1
+ {"version":3,"file":"notification-settings-section.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/notification-settings-section.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,QAAQ,EAA2B,MAAM,yCAAyC,CAAC;AAGjG,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE,gCAAgC,2CAmMzF"}
@@ -1,51 +1,25 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState, useTransition, useRef, useEffect } from 'react';
4
- import { Bell, Check } from 'lucide-react';
3
+ import { useState, useTransition } from 'react';
4
+ import { Bell } from 'lucide-react';
5
5
  import { toast } from 'sonner';
6
- import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../../ui/card.js';
7
- import { Label } from '../../ui/label.js';
8
- import { Switch } from '../../ui/switch.js';
9
- import { Separator } from '../../ui/separator.js';
6
+ import { useTranslation } from 'react-i18next';
10
7
  import { updateSettingsAction } from '../../../app/actions/update-settings.js';
11
- const AGENT_EVENT_TOGGLES = [
12
- { key: 'agentStarted', label: 'Agent Started' },
13
- { key: 'phaseCompleted', label: 'Phase Completed' },
14
- { key: 'waitingApproval', label: 'Waiting Approval' },
15
- { key: 'agentCompleted', label: 'Agent Completed' },
16
- { key: 'agentFailed', label: 'Agent Failed' },
17
- ];
18
- const PR_EVENT_TOGGLES = [
19
- { key: 'mergeReviewReady', label: 'Merge Review Ready' },
20
- { key: 'prMerged', label: 'PR Merged' },
21
- { key: 'prClosed', label: 'PR Closed' },
22
- { key: 'prChecksPassed', label: 'PR Checks Passed' },
23
- { key: 'prChecksFailed', label: 'PR Checks Failed' },
24
- { key: 'prBlocked', label: 'PR Blocked' },
25
- ];
26
- export function NotificationSettingsSection({ notifications }) {
27
- const [inApp, setInApp] = useState(notifications.inApp.enabled);
28
- const [events, setEvents] = useState({ ...notifications.events });
29
- const [isPending, startTransition] = useTransition();
30
- const [showSaved, setShowSaved] = useState(false);
31
- const prevPendingRef = useRef(false);
32
- useEffect(() => {
33
- if (prevPendingRef.current && !isPending) {
34
- setShowSaved(true);
35
- const timer = setTimeout(() => setShowSaved(false), 2000);
36
- return () => clearTimeout(timer);
37
- }
38
- prevPendingRef.current = isPending;
39
- }, [isPending]);
8
+ import { SettingsSection, SwitchRow, SubsectionLabel } from './settings-section-utils.js';
9
+ export function NotificationSettingsSection({ settings }) {
10
+ const { t } = useTranslation('web');
11
+ const [, startTransition] = useTransition();
12
+ const [inApp, setInApp] = useState(settings.notifications.inApp.enabled);
13
+ const [events, setEvents] = useState({ ...settings.notifications.events });
40
14
  function save(payload) {
41
15
  startTransition(async () => {
42
16
  const result = await updateSettingsAction(payload);
43
17
  if (!result.success) {
44
- toast.error(result.error ?? 'Failed to save notification settings');
18
+ toast.error(result.error ?? t('settings.failedToSave'));
45
19
  }
46
20
  });
47
21
  }
48
- function buildFullPayload(overrides = {}) {
22
+ function buildNotificationPayload(overrides = {}) {
49
23
  return {
50
24
  notifications: {
51
25
  inApp: { enabled: overrides.inApp ?? inApp },
@@ -53,14 +27,57 @@ export function NotificationSettingsSection({ notifications }) {
53
27
  },
54
28
  };
55
29
  }
56
- function handleInAppChange(value) {
57
- setInApp(value);
58
- save(buildFullPayload({ inApp: value }));
59
- }
60
- function handleEventChange(key, value) {
61
- const newEvents = { ...events, [key]: value };
62
- setEvents(newEvents);
63
- save(buildFullPayload({ events: newEvents }));
64
- }
65
- return (_jsxs(Card, { id: "notifications", className: "scroll-mt-6", "data-testid": "notification-settings-section", children: [_jsxs(CardHeader, { children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Bell, { className: "text-muted-foreground h-4 w-4" }), _jsx(CardTitle, { children: "Notifications" })] }), isPending ? _jsx("span", { className: "text-muted-foreground text-xs", children: "Saving..." }) : null, showSaved && !isPending ? (_jsxs("span", { className: "flex items-center gap-1 text-xs text-green-600", children: [_jsx(Check, { className: "h-3 w-3" }), "Saved"] })) : null] }), _jsx(CardDescription, { children: "Configure notification channels and event preferences" })] }), _jsxs(CardContent, { className: "space-y-4", children: [_jsxs("div", { className: "space-y-3", children: [_jsx("h3", { className: "text-sm font-semibold", children: "Channels" }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Label, { htmlFor: "notif-in-app", children: "In-App" }), _jsx(Switch, { id: "notif-in-app", "data-testid": "switch-in-app", checked: inApp, onCheckedChange: handleInAppChange })] })] }), _jsx(Separator, {}), _jsxs("div", { className: "space-y-3", children: [_jsx("h3", { className: "text-sm font-semibold", children: "Agent Events" }), AGENT_EVENT_TOGGLES.map(({ key, label }) => (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Label, { htmlFor: `notif-event-${key}`, children: label }), _jsx(Switch, { id: `notif-event-${key}`, "data-testid": `switch-event-${key}`, checked: events[key], onCheckedChange: (v) => handleEventChange(key, v) })] }, key)))] }), _jsx(Separator, {}), _jsxs("div", { className: "space-y-3", children: [_jsx("h3", { className: "text-sm font-semibold", children: "PR Events" }), PR_EVENT_TOGGLES.map(({ key, label }) => (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Label, { htmlFor: `notif-event-${key}`, children: label }), _jsx(Switch, { id: `notif-event-${key}`, "data-testid": `switch-event-${key}`, checked: events[key], onCheckedChange: (v) => handleEventChange(key, v) })] }, key)))] })] })] }));
30
+ return (_jsxs(SettingsSection, { icon: Bell, title: t('settings.notifications.title'), description: t('settings.notifications.sectionDescription'), testId: "notification-settings-section", tooltip: t('settings.notifications.hint'), tooltipLinks: [
31
+ {
32
+ label: t('settings.notifications.links.notificationSystem'),
33
+ href: 'https://github.com/jrmatherly/shipit/blob/main/specs/021-agent-notifications/spec.yaml',
34
+ },
35
+ ], children: [_jsx(SubsectionLabel, { children: t('settings.notifications.channels') }), _jsx(SwitchRow, { label: t('settings.notifications.inAppLabel'), description: t('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: inApp, onChange: (v) => {
36
+ setInApp(v);
37
+ save(buildNotificationPayload({ inApp: v }));
38
+ } }), _jsx(SubsectionLabel, { children: t('settings.notifications.subsections.agentEvents') }), _jsx(SwitchRow, { label: t('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: events.agentStarted, onChange: (v) => {
39
+ const newEvents = { ...events, agentStarted: v };
40
+ setEvents(newEvents);
41
+ save(buildNotificationPayload({ events: newEvents }));
42
+ } }), _jsx(SwitchRow, { label: t('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: events.phaseCompleted, onChange: (v) => {
43
+ const newEvents = { ...events, phaseCompleted: v };
44
+ setEvents(newEvents);
45
+ save(buildNotificationPayload({ events: newEvents }));
46
+ } }), _jsx(SwitchRow, { label: t('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: events.waitingApproval, onChange: (v) => {
47
+ const newEvents = { ...events, waitingApproval: v };
48
+ setEvents(newEvents);
49
+ save(buildNotificationPayload({ events: newEvents }));
50
+ } }), _jsx(SwitchRow, { label: t('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: events.agentCompleted, onChange: (v) => {
51
+ const newEvents = { ...events, agentCompleted: v };
52
+ setEvents(newEvents);
53
+ save(buildNotificationPayload({ events: newEvents }));
54
+ } }), _jsx(SwitchRow, { label: t('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: events.agentFailed, onChange: (v) => {
55
+ const newEvents = { ...events, agentFailed: v };
56
+ setEvents(newEvents);
57
+ save(buildNotificationPayload({ events: newEvents }));
58
+ } }), _jsx(SubsectionLabel, { children: t('settings.notifications.subsections.pullRequestEvents') }), _jsx(SwitchRow, { label: t('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: events.prMerged, onChange: (v) => {
59
+ const newEvents = { ...events, prMerged: v };
60
+ setEvents(newEvents);
61
+ save(buildNotificationPayload({ events: newEvents }));
62
+ } }), _jsx(SwitchRow, { label: t('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: events.prClosed, onChange: (v) => {
63
+ const newEvents = { ...events, prClosed: v };
64
+ setEvents(newEvents);
65
+ save(buildNotificationPayload({ events: newEvents }));
66
+ } }), _jsx(SwitchRow, { label: t('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: events.prChecksPassed, onChange: (v) => {
67
+ const newEvents = { ...events, prChecksPassed: v };
68
+ setEvents(newEvents);
69
+ save(buildNotificationPayload({ events: newEvents }));
70
+ } }), _jsx(SwitchRow, { label: t('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: events.prChecksFailed, onChange: (v) => {
71
+ const newEvents = { ...events, prChecksFailed: v };
72
+ setEvents(newEvents);
73
+ save(buildNotificationPayload({ events: newEvents }));
74
+ } }), _jsx(SwitchRow, { label: t('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: events.prBlocked, onChange: (v) => {
75
+ const newEvents = { ...events, prBlocked: v };
76
+ setEvents(newEvents);
77
+ save(buildNotificationPayload({ events: newEvents }));
78
+ } }), _jsx(SwitchRow, { label: t('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: events.mergeReviewReady, onChange: (v) => {
79
+ const newEvents = { ...events, mergeReviewReady: v };
80
+ setEvents(newEvents);
81
+ save(buildNotificationPayload({ events: newEvents }));
82
+ } })] }));
66
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"notification-settings-section.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/notification-settings-section.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAE9E,QAAA,MAAM,IAAI;;;;;;;CAO0C,CAAC;AAErD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA8BnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KASxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KASzB,CAAC"}
1
+ {"version":3,"file":"notification-settings-section.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/settings/notification-settings-section.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAiC9E,QAAA,MAAM,IAAI;;;;;;;CAO0C,CAAC;AAErD,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAWrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAWzB,CAAC"}