@shepai/cli 1.148.0 → 1.149.0-pr463.3fd9e4e

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 (200) hide show
  1. package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.d.ts.map +1 -1
  2. package/dist/packages/core/src/application/use-cases/features/get-branch-sync-status.use-case.js +4 -0
  3. package/dist/src/presentation/web/app/api/agent-events/route.js +1 -1
  4. package/dist/src/presentation/web/app/api/sessions/route.d.ts.map +1 -1
  5. package/dist/src/presentation/web/app/api/sessions/route.js +2 -268
  6. package/dist/src/presentation/web/app/api/sessions-batch/route.d.ts +17 -0
  7. package/dist/src/presentation/web/app/api/sessions-batch/route.d.ts.map +1 -0
  8. package/dist/src/presentation/web/app/api/sessions-batch/route.js +61 -0
  9. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
  10. package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +6 -3
  11. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.d.ts +1 -1
  12. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.d.ts.map +1 -1
  13. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.js +15 -73
  14. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.stories.d.ts.map +1 -1
  15. package/dist/src/presentation/web/components/common/feature-node/feature-sessions-dropdown.stories.js +18 -17
  16. package/dist/src/presentation/web/components/features/control-center/control-center.d.ts.map +1 -1
  17. package/dist/src/presentation/web/components/features/control-center/control-center.js +2 -1
  18. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
  19. package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +4 -1
  20. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
  21. package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +32 -33
  22. package/dist/src/presentation/web/hooks/sessions-provider.d.ts +12 -0
  23. package/dist/src/presentation/web/hooks/sessions-provider.d.ts.map +1 -0
  24. package/dist/src/presentation/web/hooks/sessions-provider.js +57 -0
  25. package/dist/src/presentation/web/hooks/use-deploy-action.d.ts.map +1 -1
  26. package/dist/src/presentation/web/hooks/use-deploy-action.js +8 -54
  27. package/dist/src/presentation/web/lib/session-scanner.d.ts +27 -0
  28. package/dist/src/presentation/web/lib/session-scanner.d.ts.map +1 -0
  29. package/dist/src/presentation/web/lib/session-scanner.js +255 -0
  30. package/dist/tsconfig.build.tsbuildinfo +1 -1
  31. package/package.json +1 -1
  32. package/web/.next/BUILD_ID +1 -1
  33. package/web/.next/app-path-routes-manifest.json +1 -0
  34. package/web/.next/build-manifest.json +2 -2
  35. package/web/.next/fallback-build-manifest.json +2 -2
  36. package/web/.next/prerender-manifest.json +3 -3
  37. package/web/.next/required-server-files.js +3 -3
  38. package/web/.next/required-server-files.json +3 -3
  39. package/web/.next/routes-manifest.json +6 -0
  40. package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +28 -28
  41. package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
  42. package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
  43. package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +28 -28
  44. package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
  45. package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
  46. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  47. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  48. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  49. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +36 -36
  50. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
  51. package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
  52. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  53. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
  54. package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  55. package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +28 -28
  56. package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
  57. package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
  58. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +36 -36
  59. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
  60. package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
  61. package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +36 -36
  62. package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
  63. package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
  64. package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +26 -26
  65. package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
  66. package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
  67. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +26 -26
  68. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
  69. package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
  70. package/web/.next/server/app/_global-error.html +2 -2
  71. package/web/.next/server/app/_global-error.rsc +1 -1
  72. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  73. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  74. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  75. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  76. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  77. package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
  78. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  79. package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
  80. package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
  81. package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
  82. package/web/.next/server/app/api/sessions/route.js +2 -3
  83. package/web/.next/server/app/api/sessions/route.js.nft.json +1 -1
  84. package/web/.next/server/app/api/sessions-batch/route/app-paths-manifest.json +3 -0
  85. package/web/.next/server/app/api/sessions-batch/route/build-manifest.json +11 -0
  86. package/web/.next/server/app/api/sessions-batch/route/server-reference-manifest.json +4 -0
  87. package/web/.next/server/app/api/sessions-batch/route.js +7 -0
  88. package/web/.next/server/app/api/sessions-batch/route.js.map +5 -0
  89. package/web/.next/server/app/api/sessions-batch/route.js.nft.json +1 -0
  90. package/web/.next/server/app/api/sessions-batch/route_client-reference-manifest.js +2 -0
  91. package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
  92. package/web/.next/server/app/settings/page.js.nft.json +1 -1
  93. package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  94. package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
  95. package/web/.next/server/app/skills/page.js.nft.json +1 -1
  96. package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
  97. package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
  98. package/web/.next/server/app/tools/page.js.nft.json +1 -1
  99. package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
  100. package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
  101. package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
  102. package/web/.next/server/app-paths-manifest.json +1 -0
  103. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js +1 -1
  104. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
  105. package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_sessions-batch_route_actions_4859f283.js +3 -0
  106. package/web/.next/server/chunks/[root-of-the-server]__0d33c29e._.js +3 -0
  107. package/web/.next/server/chunks/[root-of-the-server]__0d33c29e._.js.map +1 -0
  108. package/web/.next/server/chunks/[root-of-the-server]__2f61738a._.js +3 -0
  109. package/web/.next/server/chunks/[root-of-the-server]__2f61738a._.js.map +1 -0
  110. package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
  111. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
  112. package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
  113. package/web/.next/server/chunks/ssr/[root-of-the-server]__2138fa7e._.js +2 -2
  114. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js +1 -1
  115. package/web/.next/server/chunks/ssr/[root-of-the-server]__29580090._.js.map +1 -1
  116. package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
  117. package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js +1 -1
  118. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
  119. package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
  120. package/web/.next/server/chunks/ssr/[root-of-the-server]__684a868c._.js +1 -1
  121. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
  122. package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
  123. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +3 -3
  124. package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
  125. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js +1 -1
  126. package/web/.next/server/chunks/ssr/[root-of-the-server]__c094882b._.js.map +1 -1
  127. package/web/.next/server/chunks/ssr/[root-of-the-server]__c16bf5de._.js +1 -1
  128. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +1 -1
  129. package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +1 -1
  130. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js +1 -1
  131. package/web/.next/server/chunks/ssr/[root-of-the-server]__dac5dbf1._.js.map +1 -1
  132. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js +1 -1
  133. package/web/.next/server/chunks/ssr/[root-of-the-server]__fae8b355._.js.map +1 -1
  134. package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
  135. package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
  136. package/web/.next/server/chunks/ssr/_0c5f56e3._.js +2 -2
  137. package/web/.next/server/chunks/ssr/_0c5f56e3._.js.map +1 -1
  138. package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
  139. package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
  140. package/web/.next/server/chunks/ssr/_1b719e7f._.js +1 -1
  141. package/web/.next/server/chunks/ssr/_1b719e7f._.js.map +1 -1
  142. package/web/.next/server/chunks/ssr/_37e8548b._.js +1 -1
  143. package/web/.next/server/chunks/ssr/_37e8548b._.js.map +1 -1
  144. package/web/.next/server/chunks/ssr/_55d763e2._.js +1 -1
  145. package/web/.next/server/chunks/ssr/_55d763e2._.js.map +1 -1
  146. package/web/.next/server/chunks/ssr/_6256a985._.js +1 -1
  147. package/web/.next/server/chunks/ssr/_6256a985._.js.map +1 -1
  148. package/web/.next/server/chunks/ssr/_64bdfc6f._.js +2 -2
  149. package/web/.next/server/chunks/ssr/_64bdfc6f._.js.map +1 -1
  150. package/web/.next/server/chunks/ssr/_8fcc39d4._.js +1 -1
  151. package/web/.next/server/chunks/ssr/_b71645b4._.js +1 -1
  152. package/web/.next/server/chunks/ssr/_b71645b4._.js.map +1 -1
  153. package/web/.next/server/chunks/ssr/_cd7fb17f._.js +4 -0
  154. package/web/.next/server/chunks/ssr/_cd7fb17f._.js.map +1 -0
  155. package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
  156. package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
  157. package/web/.next/server/chunks/ssr/{_fe63a7f9._.js → _fff03050._.js} +2 -2
  158. package/web/.next/server/chunks/ssr/{_fe63a7f9._.js.map → _fff03050._.js.map} +1 -1
  159. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
  160. package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
  161. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
  162. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
  163. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
  164. package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
  165. package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
  166. package/web/.next/server/chunks/ssr/{src_presentation_web_7b2fda40._.js → src_presentation_web_bc27a88f._.js} +2 -2
  167. package/web/.next/server/chunks/ssr/{src_presentation_web_7b2fda40._.js.map → src_presentation_web_bc27a88f._.js.map} +1 -1
  168. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
  169. package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
  170. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
  171. package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
  172. package/web/.next/server/pages/500.html +2 -2
  173. package/web/.next/server/server-reference-manifest.js +1 -1
  174. package/web/.next/server/server-reference-manifest.json +44 -44
  175. package/web/.next/static/chunks/{6f76e63ead3fac2e.js → 121c2afa739794c8.js} +1 -1
  176. package/web/.next/static/chunks/3fc3c48d5fc1d34b.js +1 -0
  177. package/web/.next/static/chunks/6fb988bb7502376a.js +1 -0
  178. package/web/.next/static/chunks/7510c0f6c2e3f7ed.js +1 -0
  179. package/web/.next/static/chunks/{c731682077fbac4f.js → 768af4e247048769.js} +1 -1
  180. package/web/.next/static/chunks/834e374897ece7a3.js +1 -0
  181. package/web/.next/static/chunks/{7c5131e33516a325.js → 9d71dd508eeb2a7b.js} +1 -1
  182. package/web/.next/static/chunks/{48850e202dd814ac.js → ab62defde8095aaf.js} +1 -1
  183. package/web/.next/static/chunks/{9dad6769d10a32df.js → b2e8d1bb057a5233.js} +1 -1
  184. package/web/.next/static/chunks/{04869f1d3f5d9071.js → b9170990200dc7f7.js} +1 -1
  185. package/web/.next/static/chunks/{0137d4850cab3c45.js → ca75d824df20fe75.js} +3 -3
  186. package/web/.next/static/chunks/fdebfc97662845ff.js +2 -0
  187. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_ff60e4a5.js +0 -3
  188. package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_ff60e4a5.js.map +0 -1
  189. package/web/.next/server/chunks/[externals]__448264a3._.js +0 -3
  190. package/web/.next/server/chunks/ssr/_4533d6f8._.js +0 -4
  191. package/web/.next/server/chunks/ssr/_4533d6f8._.js.map +0 -1
  192. package/web/.next/static/chunks/063a24b49d9818a0.js +0 -1
  193. package/web/.next/static/chunks/21e82fee1a7e1668.js +0 -1
  194. package/web/.next/static/chunks/682563e4503cbd58.js +0 -1
  195. package/web/.next/static/chunks/683b1d85e789c2eb.js +0 -2
  196. package/web/.next/static/chunks/d62ae5e449d87057.js +0 -1
  197. /package/web/.next/server/chunks/{[externals]__448264a3._.js.map → 744ca_web__next-internal_server_app_api_sessions-batch_route_actions_4859f283.js.map} +0 -0
  198. /package/web/.next/static/{zYKuE1zbe1UWwAJv5EVwg → uf467r-P2iBzLS8YsN7j2}/_buildManifest.js +0 -0
  199. /package/web/.next/static/{zYKuE1zbe1UWwAJv5EVwg → uf467r-P2iBzLS8YsN7j2}/_clientMiddlewareManifest.json +0 -0
  200. /package/web/.next/static/{zYKuE1zbe1UWwAJv5EVwg → uf467r-P2iBzLS8YsN7j2}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[30174,a=>{"use strict";var b=a.i(12513),c=a.i(73101),d=a.i(65324),e=a.i(94691),f=a.i(33841),g=a.i(46646),h=a.i(68670),i=a.i(85321);a.s([],81053),a.i(81053),a.s(["0078a6c4a94b6c11932d9891cb3e033b153e53f741",()=>b.pickFolder,"40237402f3f2a85c176c04f885084c9ff898610bbd",()=>g.deployRepository,"40603b438aa2d73733da93cc89bef3927e865462b3",()=>f.deployFeature,"4084085a8c1d27d8a025fbda2a970ed8d82df53d27",()=>i.getDeploymentStatus,"408a911977ed31ce34aebc3a067ec3329e22bc458c",()=>d.importGitHubRepository,"40a678a82c8c190d95d1c90190f5b9ef3e2ceba155",()=>h.stopDeployment,"40c8daccf6fd712e278ed7a2b897db0b52697e11a7",()=>c.listGitHubRepositories,"40f1ed7792629c8ac17281ec35c2d6e91fe84739d7",()=>e.getDeploymentLogs],30174)}];
1
+ module.exports=[30174,a=>{"use strict";var b=a.i(12513),c=a.i(73101),d=a.i(65324),e=a.i(94691),f=a.i(33841),g=a.i(46646),h=a.i(68670),i=a.i(85321);a.s([],81053),a.i(81053),a.s(["002fb504b58d1948672c52df00af379847885e1267",()=>b.pickFolder,"4037ab2488ff95e95bf6f7b07f5ebccef9a3d1e38a",()=>e.getDeploymentLogs,"405b3054deaf869b72efc9f8d3208df4947ed5bf4e",()=>g.deployRepository,"40a82c25707c49c9a0fa5267c1433ff177a439f572",()=>i.getDeploymentStatus,"40af8f5d6f923d30f5fe5911f73e1d18ec9f8954ff",()=>c.listGitHubRepositories,"40d325e9f717473328bd6af3c3604ad1e30eb94c40",()=>f.deployFeature,"40e89c37381b42d2c5244f966fc1ff4d9083640ed3",()=>d.importGitHubRepository,"40edffa13ecae63e8693368d27481630d9bb9b85f1",()=>h.stopDeployment],30174)}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/skills/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '0078a6c4a94b6c11932d9891cb3e033b153e53f741'} from 'ACTIONS_MODULE0'\nexport {listGitHubRepositories as '40c8daccf6fd712e278ed7a2b897db0b52697e11a7'} from 'ACTIONS_MODULE1'\nexport {importGitHubRepository as '408a911977ed31ce34aebc3a067ec3329e22bc458c'} from 'ACTIONS_MODULE2'\nexport {getDeploymentLogs as '40f1ed7792629c8ac17281ec35c2d6e91fe84739d7'} from 'ACTIONS_MODULE3'\nexport {deployFeature as '40603b438aa2d73733da93cc89bef3927e865462b3'} from 'ACTIONS_MODULE4'\nexport {deployRepository as '40237402f3f2a85c176c04f885084c9ff898610bbd'} from 'ACTIONS_MODULE5'\nexport {stopDeployment as '40a678a82c8c190d95d1c90190f5b9ef3e2ceba155'} from 'ACTIONS_MODULE6'\nexport {getDeploymentStatus as '4084085a8c1d27d8a025fbda2a970ed8d82df53d27'} from 'ACTIONS_MODULE7'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/skills/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '002fb504b58d1948672c52df00af379847885e1267'} from 'ACTIONS_MODULE0'\nexport {listGitHubRepositories as '40af8f5d6f923d30f5fe5911f73e1d18ec9f8954ff'} from 'ACTIONS_MODULE1'\nexport {importGitHubRepository as '40e89c37381b42d2c5244f966fc1ff4d9083640ed3'} from 'ACTIONS_MODULE2'\nexport {getDeploymentLogs as '4037ab2488ff95e95bf6f7b07f5ebccef9a3d1e38a'} from 'ACTIONS_MODULE3'\nexport {deployFeature as '40d325e9f717473328bd6af3c3604ad1e30eb94c40'} from 'ACTIONS_MODULE4'\nexport {deployRepository as '405b3054deaf869b72efc9f8d3208df4947ed5bf4e'} from 'ACTIONS_MODULE5'\nexport {stopDeployment as '40edffa13ecae63e8693368d27481630d9bb9b85f1'} from 'ACTIONS_MODULE6'\nexport {getDeploymentStatus as '40a82c25707c49c9a0fa5267c1433ff177a439f572'} from 'ACTIONS_MODULE7'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
@@ -1,3 +1,3 @@
1
- module.exports=[27435,a=>{"use strict";var b=a.i(12513),c=a.i(73101),d=a.i(65324),e=a.i(94691),f=a.i(33841),g=a.i(46646),h=a.i(68670),i=a.i(85321);a.s([],10119),a.i(10119),a.s(["0078a6c4a94b6c11932d9891cb3e033b153e53f741",()=>b.pickFolder,"40237402f3f2a85c176c04f885084c9ff898610bbd",()=>g.deployRepository,"40603b438aa2d73733da93cc89bef3927e865462b3",()=>f.deployFeature,"4084085a8c1d27d8a025fbda2a970ed8d82df53d27",()=>i.getDeploymentStatus,"408a911977ed31ce34aebc3a067ec3329e22bc458c",()=>d.importGitHubRepository,"40a678a82c8c190d95d1c90190f5b9ef3e2ceba155",()=>h.stopDeployment,"40c8daccf6fd712e278ed7a2b897db0b52697e11a7",()=>c.listGitHubRepositories,"40f1ed7792629c8ac17281ec35c2d6e91fe84739d7",()=>e.getDeploymentLogs],27435)}];
1
+ module.exports=[27435,a=>{"use strict";var b=a.i(12513),c=a.i(73101),d=a.i(65324),e=a.i(94691),f=a.i(33841),g=a.i(46646),h=a.i(68670),i=a.i(85321);a.s([],10119),a.i(10119),a.s(["002fb504b58d1948672c52df00af379847885e1267",()=>b.pickFolder,"4037ab2488ff95e95bf6f7b07f5ebccef9a3d1e38a",()=>e.getDeploymentLogs,"405b3054deaf869b72efc9f8d3208df4947ed5bf4e",()=>g.deployRepository,"40a82c25707c49c9a0fa5267c1433ff177a439f572",()=>i.getDeploymentStatus,"40af8f5d6f923d30f5fe5911f73e1d18ec9f8954ff",()=>c.listGitHubRepositories,"40d325e9f717473328bd6af3c3604ad1e30eb94c40",()=>f.deployFeature,"40e89c37381b42d2c5244f966fc1ff4d9083640ed3",()=>d.importGitHubRepository,"40edffa13ecae63e8693368d27481630d9bb9b85f1",()=>h.stopDeployment],27435)}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/tools/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '0078a6c4a94b6c11932d9891cb3e033b153e53f741'} from 'ACTIONS_MODULE0'\nexport {listGitHubRepositories as '40c8daccf6fd712e278ed7a2b897db0b52697e11a7'} from 'ACTIONS_MODULE1'\nexport {importGitHubRepository as '408a911977ed31ce34aebc3a067ec3329e22bc458c'} from 'ACTIONS_MODULE2'\nexport {getDeploymentLogs as '40f1ed7792629c8ac17281ec35c2d6e91fe84739d7'} from 'ACTIONS_MODULE3'\nexport {deployFeature as '40603b438aa2d73733da93cc89bef3927e865462b3'} from 'ACTIONS_MODULE4'\nexport {deployRepository as '40237402f3f2a85c176c04f885084c9ff898610bbd'} from 'ACTIONS_MODULE5'\nexport {stopDeployment as '40a678a82c8c190d95d1c90190f5b9ef3e2ceba155'} from 'ACTIONS_MODULE6'\nexport {getDeploymentStatus as '4084085a8c1d27d8a025fbda2a970ed8d82df53d27'} from 'ACTIONS_MODULE7'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"sources":["../../../../../../../src/presentation/web/.next-internal/server/app/tools/page/actions.js%20%28server%20actions%20loader%29"],"sourcesContent":["export {pickFolder as '002fb504b58d1948672c52df00af379847885e1267'} from 'ACTIONS_MODULE0'\nexport {listGitHubRepositories as '40af8f5d6f923d30f5fe5911f73e1d18ec9f8954ff'} from 'ACTIONS_MODULE1'\nexport {importGitHubRepository as '40e89c37381b42d2c5244f966fc1ff4d9083640ed3'} from 'ACTIONS_MODULE2'\nexport {getDeploymentLogs as '4037ab2488ff95e95bf6f7b07f5ebccef9a3d1e38a'} from 'ACTIONS_MODULE3'\nexport {deployFeature as '40d325e9f717473328bd6af3c3604ad1e30eb94c40'} from 'ACTIONS_MODULE4'\nexport {deployRepository as '405b3054deaf869b72efc9f8d3208df4947ed5bf4e'} from 'ACTIONS_MODULE5'\nexport {stopDeployment as '40edffa13ecae63e8693368d27481630d9bb9b85f1'} from 'ACTIONS_MODULE6'\nexport {getDeploymentStatus as '40a82c25707c49c9a0fa5267c1433ff177a439f572'} from 'ACTIONS_MODULE7'\n"],"names":[],"mappings":"uCAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA"}
@@ -1,3 +1,3 @@
1
- module.exports=[84095,56799,80496,93225,41872,9959,79124,10528,50845,26604,54723,18942,42886,49560,39353,29207,a=>{"use strict";var b=a.i(92658),c=a.i(50227),d=a.i(33244),e=a.i(96380),f=a.i(12581);async function g(a){let{repositoryPath:b,branch:f}=a;if(!b||!(0,c.isAbsolute)(b))return{success:!1,error:"repositoryPath must be an absolute path"};let g=(0,d.getSettings)().environment.defaultEditor,h=(0,e.resolve)("LaunchIdeUseCase"),i=await h.execute({editorId:g,repositoryPath:b,branch:f,checkAvailability:!0});return i.ok?{success:!0,editor:i.editorName,path:i.worktreePath}:{success:!1,error:i.message}}(0,f.ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"40f6557862958dcd251435d81526757429e7abde79",null),a.s(["openIde",()=>g],84095);var h=a.i(2157),i=a.i(60526),j=a.i(74533),k=a.i(29918);let l={darwin:{cmd:"open",args:a=>["-a","Terminal",a]},linux:{cmd:"x-terminal-emulator",args:a=>[`--working-directory=${a}`]},win32:{cmd:"cmd.exe",args:a=>["/c","start","powershell","-NoExit","-Command",`Set-Location "${a}"`]}};async function m(a){let{repositoryPath:b,branch:f}=a;if(!b||!(0,c.isAbsolute)(b))return{success:!1,error:"repositoryPath must be an absolute path"};try{let a=(0,d.getSettings)(),c=a.environment.shellPreference,g=a.environment.terminalPreference??"system",m=f?(0,k.computeWorktreePath)(b,f):b;if(!(0,h.existsSync)(m))return{success:!1,error:`Path does not exist: ${m}`};if("system"!==g)try{let a=(0,e.resolve)("IToolInstallerService").getTerminalOpenConfig(g);if(a?.openDirectory.includes("{dir}")){let b=a.openDirectory.replace("{dir}",m);if(a.shell){let a=(0,j.spawn)(b,[],{detached:!0,stdio:"ignore",shell:!0});a.on("error",()=>void 0),a.unref()}else{let[a,...c]=b.split(/\s+/),d=(0,j.spawn)(a,c,{detached:!0,stdio:"ignore"});d.on("error",()=>void 0),d.unref()}return{success:!0,path:m,shell:c}}}catch{}let n=l[(0,i.platform)()];if(!n)return{success:!1,error:`Unsupported platform: ${(0,i.platform)()}`};let o=(0,j.spawn)(n.cmd,n.args(m),{detached:!0,stdio:"ignore"});return o.on("error",()=>void 0),o.unref(),{success:!0,path:m,shell:c}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open shell"}}}(0,f.ensureServerEntryExports)([m]),(0,b.registerServerReference)(m,"40250297bcfddb1e2aaf117b7ec264d3338db5deaf",null),a.s(["openShell",()=>m],56799);let n={darwin:{cmd:"open",args:a=>[a]},linux:{cmd:"xdg-open",args:a=>[a]},win32:{cmd:"explorer",args:a=>[a]}};async function o(a){if(!a||!(0,c.isAbsolute)(a))return{success:!1,error:"repositoryPath must be an absolute path"};try{if(!(0,h.existsSync)(a))return{success:!1,error:"Directory not found"};let b=n[(0,i.platform)()];if(!b)return{success:!1,error:`Unsupported platform: ${(0,i.platform)()}`};let c=(0,j.spawn)(b.cmd,b.args(a),{detached:!0,stdio:"ignore"});return c.on("error",()=>void 0),c.unref(),{success:!0,path:a}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open folder"}}}async function p(a){if(!a?.trim())return{success:!1,error:"Repository id is required"};try{let b=(0,e.resolve)("SyncRepositoryMainUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to sync repository"}}}async function q(){try{return(0,d.getSettings)().onboardingComplete}catch{return!1}}(0,f.ensureServerEntryExports)([o]),(0,b.registerServerReference)(o,"40333744b7e2130bd1a90d73e2cb662ba0d2c191d7",null),a.s(["openFolder",()=>o],80496),(0,f.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"4022746422bfe7d50fed7aade198f285b4b4873e02",null),a.s(["syncRepository",()=>p],93225),(0,f.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"00f224525de7f231b627391cc2056d9afb17d60cd5",null),a.s(["isAgentSetupComplete",()=>q],41872);var r=a.i(76437);let s={"claude-code":"Claude Code",cursor:"Cursor Agent","gemini-cli":"Gemini CLI",aider:"Aider",continue:"Continue",dev:"Demo"},t={"claude-code":"claude-code",cursor:"cursor-cli","gemini-cli":"gemini-cli"},u={"claude-code":"claude",cursor:"cursor-agent","gemini-cli":"gemini"};async function v(){var a;let b;try{b=(0,d.getSettings)().agent.type}catch{return{agentType:"unknown",installed:!1,authenticated:!1,label:"Unknown",binaryName:null,installCommand:null,authCommand:null}}let f=s[b]??b,g=t[b]??null,k=u[b]??null;if(!g)return{agentType:b,installed:!0,authenticated:!0,label:f,binaryName:null,installCommand:null,authCommand:null};let l=!1,m=null;try{let a=(0,e.resolve)("ListToolsUseCase"),b=(await a.execute()).find(a=>a.id===g);l=b?.status.status==="available",m=b?.installCommand??null}catch{l=!1}if(!l)return{agentType:b,installed:!1,authenticated:!1,label:f,binaryName:k,installCommand:m,authCommand:k?`Install ${f} first`:null};if(!function(a){let b=(0,i.homedir)();switch(a){case"claude-code":{if(process.env.ANTHROPIC_API_KEY||process.env.CLAUDE_CODE_USE_BEDROCK||process.env.CLAUDE_CODE_USE_VERTEX||process.env.CLAUDE_CODE_OAUTH_TOKEN)return!0;let a=(0,c.join)(b,".claude",".credentials.json");return(0,h.existsSync)(a)}case"cursor":{if(process.env.CURSOR_API_KEY)return!0;let a=(0,c.join)(b,".cursor");return(0,h.existsSync)(a)}case"gemini-cli":{if(process.env.GEMINI_API_KEY||process.env.GOOGLE_API_KEY||process.env.GOOGLE_APPLICATION_CREDENTIALS)return!0;let a=(0,c.join)(b,".gemini","google_accounts.json");return(0,h.existsSync)(a)}default:return!0}}(b))return{agentType:b,installed:!0,authenticated:!1,label:f,binaryName:k,installCommand:m,authCommand:k};let n=!0;return k&&(n=await (a=b,new Promise(b=>{let c,d;switch(a){case"claude-code":c=k,d=["auth","status"];break;case"cursor":c=k,d=["status"];break;default:b(!0);return}try{let a=r.IS_WINDOWS?{timeout:5e3,windowsHide:!0}:{timeout:5e3};(0,j.execFile)(c,d,a,a=>{b(!a)})}catch{b(!1)}}))),{agentType:b,installed:!0,authenticated:n,label:f,binaryName:k,installCommand:m,authCommand:n?null:k}}function w(a,b){return new Promise(c=>{try{let d=r.IS_WINDOWS?{timeout:5e3,windowsHide:!0}:{timeout:5e3};(0,j.execFile)(a,b,d,(a,b)=>{if(a)return void c({installed:!1,version:null});let d=b.match(/(\d+\.\d+(?:\.\d+)?)/);c({installed:!0,version:d?.[1]??null})})}catch{c({installed:!1,version:null})}})}async function x(){let[a,b,c]=await Promise.all([w("git",["--version"]),w("gh",["--version"]),(async()=>{try{let a=(0,e.resolve)("ListToolsUseCase");return await a.execute()}catch{return[]}})()]),d=c.find(a=>"git"===a.id),f=c.find(a=>"gh"===a.id);return{git:{...a,installCommand:d?.installCommand??null,installUrl:d?.website??"https://git-scm.com"},gh:{...b,installCommand:f?.installCommand??null,installUrl:f?.website??"https://cli.github.com"}}}async function y(a){if(!a?.trim())return{error:"id is required"};try{let b=(0,e.resolve)("ArchiveFeatureUseCase");return{feature:await b.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to archive feature"}}}async function z(a,b,c,d){if(!a?.trim())return{error:"id is required"};try{let f=(0,e.resolve)("DeleteFeatureUseCase"),g={};return void 0!==b&&(g.cleanup=b),void 0!==c&&(g.cascadeDelete=c),void 0!==d&&(g.closePr=d),{feature:Object.keys(g).length>0?await f.execute(a,g):await f.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to delete feature"}}}async function A(a){if(!a.trim())return{resumed:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("ResumeFeatureUseCase");return await b.execute(a),{resumed:!0}}catch(a){return{resumed:!1,error:a instanceof Error?a.message:"Failed to resume feature"}}}async function B(a){if(!a.trim())return{started:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("StartFeatureUseCase");return await b.execute(a),{started:!0}}catch(a){return{started:!1,error:a instanceof Error?a.message:"Failed to start feature"}}}async function C(a){if(!a.trim())return{stopped:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("IAgentRunRepository"),c=(await b.list()).find(b=>b.featureId===a&&"completed"!==b.status&&"failed"!==b.status&&"interrupted"!==b.status&&"cancelled"!==b.status);if(!c)return{stopped:!1,error:"No active agent run found for this feature"};let d=(0,e.resolve)("StopAgentRunUseCase"),f=await d.execute(c.id);if(!f.stopped)return{stopped:!1,error:f.reason};return{stopped:!0}}catch(a){return{stopped:!1,error:a instanceof Error?a.message:"Failed to stop agent"}}}async function D(a){if(!a?.trim())return{error:"id is required"};try{let b=(0,e.resolve)("UnarchiveFeatureUseCase");return{feature:await b.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to unarchive feature"}}}async function E(a){let{path:b,name:c}=a;if(!b?.trim())return{error:"path is required"};try{let a=(0,e.resolve)("AddRepositoryUseCase");return{repository:await a.execute({path:b,name:c})}}catch(a){return{error:a instanceof Error?a.message:"Failed to add repository"}}}async function F(a){if(!a?.trim())return{success:!1,error:"id is required"};try{let b=(0,e.resolve)("DeleteRepositoryUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to delete repository"}}}async function G(a){let b=(0,e.resolve)("IFeatureRepository"),c=await b.findById(a);return c?{name:c.name,description:c.description}:null}(0,f.ensureServerEntryExports)([v]),(0,b.registerServerReference)(v,"006cfbf431186a10c2b253817642b66b5e73f00f4a",null),a.s(["checkAgentAuth",()=>v],9959),(0,f.ensureServerEntryExports)([x]),(0,b.registerServerReference)(x,"00851e3ac39675fcda8b8d9b8f997e230a6e5dace9",null),a.s(["checkToolStatus",()=>x],79124),(0,f.ensureServerEntryExports)([y]),(0,b.registerServerReference)(y,"406a301c92ece4fa7d5b23c75d513d6ae8d260f443",null),a.s(["archiveFeature",()=>y],10528),(0,f.ensureServerEntryExports)([z]),(0,b.registerServerReference)(z,"7820052e1eb1b7361f888f5aad7637d7bca77f83e1",null),a.s(["deleteFeature",()=>z],50845),(0,f.ensureServerEntryExports)([A]),(0,b.registerServerReference)(A,"402d6e615a4ba79c75ccfc5e9ed5f53983681707a1",null),a.s(["resumeFeature",()=>A],26604),(0,f.ensureServerEntryExports)([B]),(0,b.registerServerReference)(B,"4078f9d509a0ca17dfba75e8ff01d73ae043618a00",null),a.s(["startFeature",()=>B],54723),(0,f.ensureServerEntryExports)([C]),(0,b.registerServerReference)(C,"40072d87db816e1679db033d9fc8bd361cc665976f",null),a.s(["stopFeature",()=>C],18942),(0,f.ensureServerEntryExports)([D]),(0,b.registerServerReference)(D,"405ee01997eb4b6eaf52709119d57f6012f8683cd5",null),a.s(["unarchiveFeature",()=>D],42886),(0,f.ensureServerEntryExports)([E]),(0,b.registerServerReference)(E,"400dfc2bc0c7e200128abc275421da2c4b7737108e",null),a.s(["addRepository",()=>E],49560),(0,f.ensureServerEntryExports)([F]),(0,b.registerServerReference)(F,"40488b5050ee87b5f049f6629f00666422045e6e1e",null),a.s(["deleteRepository",()=>F],39353),(0,f.ensureServerEntryExports)([G]),(0,b.registerServerReference)(G,"40017b290b3678c89704799a03f282ab5603d4ec7e",null),a.s(["getFeatureMetadata",()=>G],29207)}];
1
+ module.exports=[84095,56799,80496,93225,41872,9959,79124,10528,50845,26604,54723,18942,42886,49560,39353,29207,a=>{"use strict";var b=a.i(92658),c=a.i(50227),d=a.i(33244),e=a.i(96380),f=a.i(12581);async function g(a){let{repositoryPath:b,branch:f}=a;if(!b||!(0,c.isAbsolute)(b))return{success:!1,error:"repositoryPath must be an absolute path"};let g=(0,d.getSettings)().environment.defaultEditor,h=(0,e.resolve)("LaunchIdeUseCase"),i=await h.execute({editorId:g,repositoryPath:b,branch:f,checkAvailability:!0});return i.ok?{success:!0,editor:i.editorName,path:i.worktreePath}:{success:!1,error:i.message}}(0,f.ensureServerEntryExports)([g]),(0,b.registerServerReference)(g,"4021325b78dc6d5974bb3a8be932da5aefb87543b9",null),a.s(["openIde",()=>g],84095);var h=a.i(2157),i=a.i(60526),j=a.i(74533),k=a.i(29918);let l={darwin:{cmd:"open",args:a=>["-a","Terminal",a]},linux:{cmd:"x-terminal-emulator",args:a=>[`--working-directory=${a}`]},win32:{cmd:"cmd.exe",args:a=>["/c","start","powershell","-NoExit","-Command",`Set-Location "${a}"`]}};async function m(a){let{repositoryPath:b,branch:f}=a;if(!b||!(0,c.isAbsolute)(b))return{success:!1,error:"repositoryPath must be an absolute path"};try{let a=(0,d.getSettings)(),c=a.environment.shellPreference,g=a.environment.terminalPreference??"system",m=f?(0,k.computeWorktreePath)(b,f):b;if(!(0,h.existsSync)(m))return{success:!1,error:`Path does not exist: ${m}`};if("system"!==g)try{let a=(0,e.resolve)("IToolInstallerService").getTerminalOpenConfig(g);if(a?.openDirectory.includes("{dir}")){let b=a.openDirectory.replace("{dir}",m);if(a.shell){let a=(0,j.spawn)(b,[],{detached:!0,stdio:"ignore",shell:!0});a.on("error",()=>void 0),a.unref()}else{let[a,...c]=b.split(/\s+/),d=(0,j.spawn)(a,c,{detached:!0,stdio:"ignore"});d.on("error",()=>void 0),d.unref()}return{success:!0,path:m,shell:c}}}catch{}let n=l[(0,i.platform)()];if(!n)return{success:!1,error:`Unsupported platform: ${(0,i.platform)()}`};let o=(0,j.spawn)(n.cmd,n.args(m),{detached:!0,stdio:"ignore"});return o.on("error",()=>void 0),o.unref(),{success:!0,path:m,shell:c}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open shell"}}}(0,f.ensureServerEntryExports)([m]),(0,b.registerServerReference)(m,"4082a9c366d6e4c21233287cacec148ba237f38ac9",null),a.s(["openShell",()=>m],56799);let n={darwin:{cmd:"open",args:a=>[a]},linux:{cmd:"xdg-open",args:a=>[a]},win32:{cmd:"explorer",args:a=>[a]}};async function o(a){if(!a||!(0,c.isAbsolute)(a))return{success:!1,error:"repositoryPath must be an absolute path"};try{if(!(0,h.existsSync)(a))return{success:!1,error:"Directory not found"};let b=n[(0,i.platform)()];if(!b)return{success:!1,error:`Unsupported platform: ${(0,i.platform)()}`};let c=(0,j.spawn)(b.cmd,b.args(a),{detached:!0,stdio:"ignore"});return c.on("error",()=>void 0),c.unref(),{success:!0,path:a}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to open folder"}}}async function p(a){if(!a?.trim())return{success:!1,error:"Repository id is required"};try{let b=(0,e.resolve)("SyncRepositoryMainUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to sync repository"}}}async function q(){try{return(0,d.getSettings)().onboardingComplete}catch{return!1}}(0,f.ensureServerEntryExports)([o]),(0,b.registerServerReference)(o,"4019a54d1520a4c66482b4eeb86ccafb0861933935",null),a.s(["openFolder",()=>o],80496),(0,f.ensureServerEntryExports)([p]),(0,b.registerServerReference)(p,"40014c6ae35270751f8bdf8258116c13a52f6bbaed",null),a.s(["syncRepository",()=>p],93225),(0,f.ensureServerEntryExports)([q]),(0,b.registerServerReference)(q,"00db5e91a1c5c32fd57da593c75f9784012801414f",null),a.s(["isAgentSetupComplete",()=>q],41872);var r=a.i(76437);let s={"claude-code":"Claude Code",cursor:"Cursor Agent","gemini-cli":"Gemini CLI",aider:"Aider",continue:"Continue",dev:"Demo"},t={"claude-code":"claude-code",cursor:"cursor-cli","gemini-cli":"gemini-cli"},u={"claude-code":"claude",cursor:"cursor-agent","gemini-cli":"gemini"};async function v(){var a;let b;try{b=(0,d.getSettings)().agent.type}catch{return{agentType:"unknown",installed:!1,authenticated:!1,label:"Unknown",binaryName:null,installCommand:null,authCommand:null}}let f=s[b]??b,g=t[b]??null,k=u[b]??null;if(!g)return{agentType:b,installed:!0,authenticated:!0,label:f,binaryName:null,installCommand:null,authCommand:null};let l=!1,m=null;try{let a=(0,e.resolve)("ListToolsUseCase"),b=(await a.execute()).find(a=>a.id===g);l=b?.status.status==="available",m=b?.installCommand??null}catch{l=!1}if(!l)return{agentType:b,installed:!1,authenticated:!1,label:f,binaryName:k,installCommand:m,authCommand:k?`Install ${f} first`:null};if(!function(a){let b=(0,i.homedir)();switch(a){case"claude-code":{if(process.env.ANTHROPIC_API_KEY||process.env.CLAUDE_CODE_USE_BEDROCK||process.env.CLAUDE_CODE_USE_VERTEX||process.env.CLAUDE_CODE_OAUTH_TOKEN)return!0;let a=(0,c.join)(b,".claude",".credentials.json");return(0,h.existsSync)(a)}case"cursor":{if(process.env.CURSOR_API_KEY)return!0;let a=(0,c.join)(b,".cursor");return(0,h.existsSync)(a)}case"gemini-cli":{if(process.env.GEMINI_API_KEY||process.env.GOOGLE_API_KEY||process.env.GOOGLE_APPLICATION_CREDENTIALS)return!0;let a=(0,c.join)(b,".gemini","google_accounts.json");return(0,h.existsSync)(a)}default:return!0}}(b))return{agentType:b,installed:!0,authenticated:!1,label:f,binaryName:k,installCommand:m,authCommand:k};let n=!0;return k&&(n=await (a=b,new Promise(b=>{let c,d;switch(a){case"claude-code":c=k,d=["auth","status"];break;case"cursor":c=k,d=["status"];break;default:b(!0);return}try{let a=r.IS_WINDOWS?{timeout:5e3,windowsHide:!0}:{timeout:5e3};(0,j.execFile)(c,d,a,a=>{b(!a)})}catch{b(!1)}}))),{agentType:b,installed:!0,authenticated:n,label:f,binaryName:k,installCommand:m,authCommand:n?null:k}}function w(a,b){return new Promise(c=>{try{let d=r.IS_WINDOWS?{timeout:5e3,windowsHide:!0}:{timeout:5e3};(0,j.execFile)(a,b,d,(a,b)=>{if(a)return void c({installed:!1,version:null});let d=b.match(/(\d+\.\d+(?:\.\d+)?)/);c({installed:!0,version:d?.[1]??null})})}catch{c({installed:!1,version:null})}})}async function x(){let[a,b,c]=await Promise.all([w("git",["--version"]),w("gh",["--version"]),(async()=>{try{let a=(0,e.resolve)("ListToolsUseCase");return await a.execute()}catch{return[]}})()]),d=c.find(a=>"git"===a.id),f=c.find(a=>"gh"===a.id);return{git:{...a,installCommand:d?.installCommand??null,installUrl:d?.website??"https://git-scm.com"},gh:{...b,installCommand:f?.installCommand??null,installUrl:f?.website??"https://cli.github.com"}}}async function y(a){if(!a?.trim())return{error:"id is required"};try{let b=(0,e.resolve)("ArchiveFeatureUseCase");return{feature:await b.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to archive feature"}}}async function z(a,b,c,d){if(!a?.trim())return{error:"id is required"};try{let f=(0,e.resolve)("DeleteFeatureUseCase"),g={};return void 0!==b&&(g.cleanup=b),void 0!==c&&(g.cascadeDelete=c),void 0!==d&&(g.closePr=d),{feature:Object.keys(g).length>0?await f.execute(a,g):await f.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to delete feature"}}}async function A(a){if(!a.trim())return{resumed:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("ResumeFeatureUseCase");return await b.execute(a),{resumed:!0}}catch(a){return{resumed:!1,error:a instanceof Error?a.message:"Failed to resume feature"}}}async function B(a){if(!a.trim())return{started:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("StartFeatureUseCase");return await b.execute(a),{started:!0}}catch(a){return{started:!1,error:a instanceof Error?a.message:"Failed to start feature"}}}async function C(a){if(!a.trim())return{stopped:!1,error:"Feature id is required"};try{let b=(0,e.resolve)("IAgentRunRepository"),c=(await b.list()).find(b=>b.featureId===a&&"completed"!==b.status&&"failed"!==b.status&&"interrupted"!==b.status&&"cancelled"!==b.status);if(!c)return{stopped:!1,error:"No active agent run found for this feature"};let d=(0,e.resolve)("StopAgentRunUseCase"),f=await d.execute(c.id);if(!f.stopped)return{stopped:!1,error:f.reason};return{stopped:!0}}catch(a){return{stopped:!1,error:a instanceof Error?a.message:"Failed to stop agent"}}}async function D(a){if(!a?.trim())return{error:"id is required"};try{let b=(0,e.resolve)("UnarchiveFeatureUseCase");return{feature:await b.execute(a)}}catch(a){return{error:a instanceof Error?a.message:"Failed to unarchive feature"}}}async function E(a){let{path:b,name:c}=a;if(!b?.trim())return{error:"path is required"};try{let a=(0,e.resolve)("AddRepositoryUseCase");return{repository:await a.execute({path:b,name:c})}}catch(a){return{error:a instanceof Error?a.message:"Failed to add repository"}}}async function F(a){if(!a?.trim())return{success:!1,error:"id is required"};try{let b=(0,e.resolve)("DeleteRepositoryUseCase");return await b.execute(a),{success:!0}}catch(a){return{success:!1,error:a instanceof Error?a.message:"Failed to delete repository"}}}async function G(a){let b=(0,e.resolve)("IFeatureRepository"),c=await b.findById(a);return c?{name:c.name,description:c.description}:null}(0,f.ensureServerEntryExports)([v]),(0,b.registerServerReference)(v,"00e8e6fd0a56121b7839f4f8516beaf3a546e4bae2",null),a.s(["checkAgentAuth",()=>v],9959),(0,f.ensureServerEntryExports)([x]),(0,b.registerServerReference)(x,"0098f29f445df3d265946c552079a26f6b3c357bbf",null),a.s(["checkToolStatus",()=>x],79124),(0,f.ensureServerEntryExports)([y]),(0,b.registerServerReference)(y,"40bf8f2a44da320185ffab3e9791c15c2cf7178fbf",null),a.s(["archiveFeature",()=>y],10528),(0,f.ensureServerEntryExports)([z]),(0,b.registerServerReference)(z,"787e04f7fcf6e478f1639e35e07490da9830afd7b8",null),a.s(["deleteFeature",()=>z],50845),(0,f.ensureServerEntryExports)([A]),(0,b.registerServerReference)(A,"40299a32fa0cd7fd71cdc5094d43d985086d8cea48",null),a.s(["resumeFeature",()=>A],26604),(0,f.ensureServerEntryExports)([B]),(0,b.registerServerReference)(B,"40d524493bff06205ed72effe2b114920484ed7bed",null),a.s(["startFeature",()=>B],54723),(0,f.ensureServerEntryExports)([C]),(0,b.registerServerReference)(C,"40d5617c2061746657f5b1cff7ef228fe9349fde21",null),a.s(["stopFeature",()=>C],18942),(0,f.ensureServerEntryExports)([D]),(0,b.registerServerReference)(D,"40534c43b1b643f11ee31156e58d45fb52c1fd3f23",null),a.s(["unarchiveFeature",()=>D],42886),(0,f.ensureServerEntryExports)([E]),(0,b.registerServerReference)(E,"40588d39f45e76dfda480dc381afecc88ca8e4ba93",null),a.s(["addRepository",()=>E],49560),(0,f.ensureServerEntryExports)([F]),(0,b.registerServerReference)(F,"40b5f9cfd47b2de515d25ddfe5b96c3a018373213c",null),a.s(["deleteRepository",()=>F],39353),(0,f.ensureServerEntryExports)([G]),(0,b.registerServerReference)(G,"4041a007aca53b47e8b408b9c5ee5f6af6a170fa3f",null),a.s(["getFeatureMetadata",()=>G],29207)}];
2
2
 
3
3
  //# sourceMappingURL=src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[80646,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(6175),f=a.i(7420),g=a.i(58761),h=a.i(51473),i=a.i(59675),j=a.i(5472),k=a.i(75988),l=a.i(80930),m=a.i(14272),n=a.i(66873),o=a.i(90986),p=a.i(17329),q=a.i(16164),r=a.i(45291),s="Popover",[t,u]=(0,f.createContextScope)(s,[k.createPopperScope]),v=(0,k.createPopperScope)(),[w,x]=t(s),y=a=>{let{__scopePopover:d,children:e,open:f,defaultOpen:g,onOpenChange:h,modal:i=!1}=a,l=v(d),m=c.useRef(null),[n,o]=c.useState(!1),[q,r]=(0,p.useControllableState)({prop:f,defaultProp:g??!1,onChange:h,caller:s});return(0,b.jsx)(k.Root,{...l,children:(0,b.jsx)(w,{scope:d,contentId:(0,j.useId)(),triggerRef:m,open:q,onOpenChange:r,onOpenToggle:c.useCallback(()=>r(a=>!a),[r]),hasCustomAnchor:n,onCustomAnchorAdd:c.useCallback(()=>o(!0),[]),onCustomAnchorRemove:c.useCallback(()=>o(!1),[]),modal:i,children:e})})};y.displayName=s;var z="PopoverAnchor",A=c.forwardRef((a,d)=>{let{__scopePopover:e,...f}=a,g=x(z,e),h=v(e),{onCustomAnchorAdd:i,onCustomAnchorRemove:j}=g;return c.useEffect(()=>(i(),()=>j()),[i,j]),(0,b.jsx)(k.Anchor,{...h,...f,ref:d})});A.displayName=z;var B="PopoverTrigger",C=c.forwardRef((a,c)=>{let{__scopePopover:f,...g}=a,h=x(B,f),i=v(f),j=(0,e.useComposedRefs)(c,h.triggerRef),l=(0,b.jsx)(n.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":h.open,"aria-controls":h.contentId,"data-state":Q(h.open),...g,ref:j,onClick:(0,d.composeEventHandlers)(a.onClick,h.onOpenToggle)});return h.hasCustomAnchor?l:(0,b.jsx)(k.Anchor,{asChild:!0,...i,children:l})});C.displayName=B;var D="PopoverPortal",[E,F]=t(D,{forceMount:void 0}),G=a=>{let{__scopePopover:c,forceMount:d,children:e,container:f}=a,g=x(D,c);return(0,b.jsx)(E,{scope:c,forceMount:d,children:(0,b.jsx)(m.Presence,{present:d||g.open,children:(0,b.jsx)(l.Portal,{asChild:!0,container:f,children:e})})})};G.displayName=D;var H="PopoverContent",I=c.forwardRef((a,c)=>{let d=F(H,a.__scopePopover),{forceMount:e=d.forceMount,...f}=a,g=x(H,a.__scopePopover);return(0,b.jsx)(m.Presence,{present:e||g.open,children:g.modal?(0,b.jsx)(K,{...f,ref:c}):(0,b.jsx)(L,{...f,ref:c})})});I.displayName=H;var J=(0,o.createSlot)("PopoverContent.RemoveScroll"),K=c.forwardRef((a,f)=>{let g=x(H,a.__scopePopover),h=c.useRef(null),i=(0,e.useComposedRefs)(f,h),j=c.useRef(!1);return c.useEffect(()=>{let a=h.current;if(a)return(0,q.hideOthers)(a)},[]),(0,b.jsx)(r.RemoveScroll,{as:J,allowPinchZoom:!0,children:(0,b.jsx)(M,{...a,ref:i,trapFocus:g.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,d.composeEventHandlers)(a.onCloseAutoFocus,a=>{a.preventDefault(),j.current||g.triggerRef.current?.focus()}),onPointerDownOutside:(0,d.composeEventHandlers)(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;j.current=2===b.button||c},{checkForDefaultPrevented:!1}),onFocusOutside:(0,d.composeEventHandlers)(a.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),L=c.forwardRef((a,d)=>{let e=x(H,a.__scopePopover),f=c.useRef(!1),g=c.useRef(!1);return(0,b.jsx)(M,{...a,ref:d,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(f.current||e.triggerRef.current?.focus(),b.preventDefault()),f.current=!1,g.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(f.current=!0,"pointerdown"===b.detail.originalEvent.type&&(g.current=!0));let c=b.target;e.triggerRef.current?.contains(c)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&g.current&&b.preventDefault()}})}),M=c.forwardRef((a,c)=>{let{__scopePopover:d,trapFocus:e,onOpenAutoFocus:f,onCloseAutoFocus:j,disableOutsidePointerEvents:l,onEscapeKeyDown:m,onPointerDownOutside:n,onFocusOutside:o,onInteractOutside:p,...q}=a,r=x(H,d),s=v(d);return(0,h.useFocusGuards)(),(0,b.jsx)(i.FocusScope,{asChild:!0,loop:!0,trapped:e,onMountAutoFocus:f,onUnmountAutoFocus:j,children:(0,b.jsx)(g.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:p,onEscapeKeyDown:m,onPointerDownOutside:n,onFocusOutside:o,onDismiss:()=>r.onOpenChange(!1),children:(0,b.jsx)(k.Content,{"data-state":Q(r.open),role:"dialog",id:r.contentId,...s,...q,ref:c,style:{...q.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),N="PopoverClose",O=c.forwardRef((a,c)=>{let{__scopePopover:e,...f}=a,g=x(N,e);return(0,b.jsx)(n.Primitive.button,{type:"button",...f,ref:c,onClick:(0,d.composeEventHandlers)(a.onClick,()=>g.onOpenChange(!1))})});O.displayName=N;var P=c.forwardRef((a,c)=>{let{__scopePopover:d,...e}=a,f=v(d);return(0,b.jsx)(k.Arrow,{...f,...e,ref:c})});function Q(a){return a?"open":"closed"}P.displayName="PopoverArrow",a.s(["Anchor",()=>A,"Arrow",()=>P,"Close",()=>O,"Content",()=>I,"Popover",()=>y,"PopoverAnchor",()=>A,"PopoverArrow",()=>P,"PopoverClose",()=>O,"PopoverContent",()=>I,"PopoverPortal",()=>G,"PopoverTrigger",()=>C,"Portal",()=>G,"Root",()=>y,"Trigger",()=>C,"createPopoverScope",()=>u],61452);var R=a.i(61452),R=R,S=a.i(85536);let T=R.Root,U=R.Trigger;R.Anchor;let V=c.forwardRef(({className:a,align:c="center",sideOffset:d=4,...e},f)=>(0,b.jsx)(R.Portal,{children:(0,b.jsx)(R.Content,{ref:f,align:c,sideOffset:d,className:(0,S.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",a),...e})}));V.displayName=R.Content.displayName,a.s(["Popover",()=>T,"PopoverContent",()=>V,"PopoverTrigger",()=>U],80646)},47810,53931,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("005405e33a575fd7fef0856afab08d6908b311c095",b.callServer,void 0,b.findSourceMapURL,"getAllAgentModels");a.s(["getAllAgentModels",()=>c],47810);let d=(0,b.createServerReference)("60010c6015fae17dab78f4eaedcd652d8a425311c4",b.callServer,void 0,b.findSourceMapURL,"updateAgentAndModel");a.s(["updateAgentAndModel",()=>d],53931)},96867,61781,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(6175),f=a.i(7420),g=a.i(17329),h=a.i(64005),i=a.i(74432),j=a.i(66873),k="Switch",[l,m]=(0,f.createContextScope)(k),[n,o]=l(k),p=c.forwardRef((a,f)=>{let{__scopeSwitch:h,name:i,checked:l,defaultChecked:m,required:o,disabled:p,value:q="on",onCheckedChange:r,form:u,...v}=a,[w,x]=c.useState(null),y=(0,e.useComposedRefs)(f,a=>x(a)),z=c.useRef(!1),A=!w||u||!!w.closest("form"),[B,C]=(0,g.useControllableState)({prop:l,defaultProp:m??!1,onChange:r,caller:k});return(0,b.jsxs)(n,{scope:h,checked:B,disabled:p,children:[(0,b.jsx)(j.Primitive.button,{type:"button",role:"switch","aria-checked":B,"aria-required":o,"data-state":t(B),"data-disabled":p?"":void 0,disabled:p,value:q,...v,ref:y,onClick:(0,d.composeEventHandlers)(a.onClick,a=>{C(a=>!a),A&&(z.current=a.isPropagationStopped(),z.current||a.stopPropagation())})}),A&&(0,b.jsx)(s,{control:w,bubbles:!z.current,name:i,value:q,checked:B,required:o,disabled:p,form:u,style:{transform:"translateX(-100%)"}})]})});p.displayName=k;var q="SwitchThumb",r=c.forwardRef((a,c)=>{let{__scopeSwitch:d,...e}=a,f=o(q,d);return(0,b.jsx)(j.Primitive.span,{"data-state":t(f.checked),"data-disabled":f.disabled?"":void 0,...e,ref:c})});r.displayName=q;var s=c.forwardRef(({__scopeSwitch:a,control:d,checked:f,bubbles:g=!0,...j},k)=>{let l=c.useRef(null),m=(0,e.useComposedRefs)(l,k),n=(0,h.usePrevious)(f),o=(0,i.useSize)(d);return c.useEffect(()=>{let a=l.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(n!==f&&b){let c=new Event("click",{bubbles:g});b.call(a,f),a.dispatchEvent(c)}},[n,f,g]),(0,b.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:f,...j,tabIndex:-1,ref:m,style:{...j.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function t(a){return a?"checked":"unchecked"}s.displayName="SwitchBubbleInput",a.s(["Root",()=>p,"Switch",()=>p,"SwitchThumb",()=>r,"Thumb",()=>r,"createSwitchScope",()=>m],91918);var u=a.i(91918),u=u,v=a.i(85536);function w({className:a,size:c="default",...d}){return(0,b.jsx)(u.Root,{"data-slot":"switch","data-size":c,className:(0,v.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",a),...d,children:(0,b.jsx)(u.Thumb,{"data-slot":"switch-thumb",className:(0,v.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}a.s(["Switch",()=>w],96867);var x=a.i(72016),y=a.i(94132),z=a.i(3410),A=a.i(47810),B=a.i(53931),C=a.i(17606),D=a.i(83852),E=a.i(18948),F=a.i(80646);function G({initialAgentType:a,initialModel:d,onAgentModelChange:e,disabled:f,className:g,mode:h}){let[i,j]=c.useState(!1),[k,l]=c.useState([]),[m,n]=c.useState(!0),[o,p]=c.useState(a),[q,r]=c.useState(d),[s,t]=c.useState(null),[u,w]=c.useState(0),[G,H]=c.useState(null);c.useEffect(()=>{(0,A.getAllAgentModels)().then(l).finally(()=>n(!1))},[]),c.useEffect(()=>{if(!i){let a=setTimeout(()=>{w(0),H(null)},150);return()=>clearTimeout(a)}},[i]);let I=async(a,b)=>{if(j(!1),a!==o||b!==q){if("override"===h){p(a),r(b),e?.(a,b);return}p(a),r(b),e?.(a,b),t(null);try{let c=await (0,B.updateAgentAndModel)(a,b||null);c.ok||(p(o),r(q),e?.(o,q),t(c.error??"Failed to save"))}catch{p(o),r(q),e?.(o,q),t("Failed to save")}}},J=(0,C.getAgentTypeIcon)(o),K=k.find(a=>a.agentType===o)?.label??o,L=q?(0,D.getModelMeta)(q).displayName||q:null,M=G?k.find(a=>a.agentType===G):null;return(0,b.jsxs)("div",{className:(0,v.cn)("flex flex-col gap-1",g),children:[(0,b.jsxs)(F.Popover,{open:i,onOpenChange:j,children:[(0,b.jsx)(F.PopoverTrigger,{asChild:!0,children:(0,b.jsx)(E.Button,{variant:"outline",role:"combobox","aria-expanded":i,disabled:(f??!1)||m,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,b.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,b.jsx)(J,{className:"h-4 w-4 shrink-0"}),m?"Loading…":(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:K}),L?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,b.jsx)("span",{className:"text-xs font-medium",children:L})]}):null]})]})})}),(0,b.jsx)(F.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,b.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===u?"-50%":"0%"})`,width:"200%"},children:[(0,b.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,b.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),k.map(a=>{let c=(0,C.getAgentTypeIcon)(a.agentType),d=o===a.agentType,e=a.models.length>0;return(0,b.jsxs)("button",{type:"button",className:(0,v.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",d&&"bg-accent/50"),onClick:()=>{e?(H(a.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>w(1))})):I(a.agentType,"")},children:[(0,b.jsx)(c,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"flex-1 text-left",children:a.label}),d&&!e?(0,b.jsx)(x.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,e?(0,b.jsx)(z.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},a.agentType)})]}),(0,b.jsx)("div",{className:"w-1/2 shrink-0",children:M?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{w(0),setTimeout(()=>H(null),220)},children:[(0,b.jsx)(y.ChevronLeft,{className:"h-3.5 w-3.5"}),M.label]}),M.models.map(a=>{let c=o===M.agentType&&q===a.id;return(0,b.jsxs)("button",{type:"button",className:(0,v.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",c&&"bg-accent/50"),onClick:()=>I(M.agentType,a.id),children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:a.displayName}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:a.description})]}),c?(0,b.jsx)(x.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},a.id)})]}):null})]})})]}),!!s&&(0,b.jsx)("p",{className:"text-destructive text-sm",children:s})]})}a.s(["AgentModelPicker",()=>G],61781)}];
1
+ module.exports=[80646,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(6175),f=a.i(7420),g=a.i(58761),h=a.i(51473),i=a.i(59675),j=a.i(5472),k=a.i(75988),l=a.i(80930),m=a.i(14272),n=a.i(66873),o=a.i(90986),p=a.i(17329),q=a.i(16164),r=a.i(45291),s="Popover",[t,u]=(0,f.createContextScope)(s,[k.createPopperScope]),v=(0,k.createPopperScope)(),[w,x]=t(s),y=a=>{let{__scopePopover:d,children:e,open:f,defaultOpen:g,onOpenChange:h,modal:i=!1}=a,l=v(d),m=c.useRef(null),[n,o]=c.useState(!1),[q,r]=(0,p.useControllableState)({prop:f,defaultProp:g??!1,onChange:h,caller:s});return(0,b.jsx)(k.Root,{...l,children:(0,b.jsx)(w,{scope:d,contentId:(0,j.useId)(),triggerRef:m,open:q,onOpenChange:r,onOpenToggle:c.useCallback(()=>r(a=>!a),[r]),hasCustomAnchor:n,onCustomAnchorAdd:c.useCallback(()=>o(!0),[]),onCustomAnchorRemove:c.useCallback(()=>o(!1),[]),modal:i,children:e})})};y.displayName=s;var z="PopoverAnchor",A=c.forwardRef((a,d)=>{let{__scopePopover:e,...f}=a,g=x(z,e),h=v(e),{onCustomAnchorAdd:i,onCustomAnchorRemove:j}=g;return c.useEffect(()=>(i(),()=>j()),[i,j]),(0,b.jsx)(k.Anchor,{...h,...f,ref:d})});A.displayName=z;var B="PopoverTrigger",C=c.forwardRef((a,c)=>{let{__scopePopover:f,...g}=a,h=x(B,f),i=v(f),j=(0,e.useComposedRefs)(c,h.triggerRef),l=(0,b.jsx)(n.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":h.open,"aria-controls":h.contentId,"data-state":Q(h.open),...g,ref:j,onClick:(0,d.composeEventHandlers)(a.onClick,h.onOpenToggle)});return h.hasCustomAnchor?l:(0,b.jsx)(k.Anchor,{asChild:!0,...i,children:l})});C.displayName=B;var D="PopoverPortal",[E,F]=t(D,{forceMount:void 0}),G=a=>{let{__scopePopover:c,forceMount:d,children:e,container:f}=a,g=x(D,c);return(0,b.jsx)(E,{scope:c,forceMount:d,children:(0,b.jsx)(m.Presence,{present:d||g.open,children:(0,b.jsx)(l.Portal,{asChild:!0,container:f,children:e})})})};G.displayName=D;var H="PopoverContent",I=c.forwardRef((a,c)=>{let d=F(H,a.__scopePopover),{forceMount:e=d.forceMount,...f}=a,g=x(H,a.__scopePopover);return(0,b.jsx)(m.Presence,{present:e||g.open,children:g.modal?(0,b.jsx)(K,{...f,ref:c}):(0,b.jsx)(L,{...f,ref:c})})});I.displayName=H;var J=(0,o.createSlot)("PopoverContent.RemoveScroll"),K=c.forwardRef((a,f)=>{let g=x(H,a.__scopePopover),h=c.useRef(null),i=(0,e.useComposedRefs)(f,h),j=c.useRef(!1);return c.useEffect(()=>{let a=h.current;if(a)return(0,q.hideOthers)(a)},[]),(0,b.jsx)(r.RemoveScroll,{as:J,allowPinchZoom:!0,children:(0,b.jsx)(M,{...a,ref:i,trapFocus:g.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,d.composeEventHandlers)(a.onCloseAutoFocus,a=>{a.preventDefault(),j.current||g.triggerRef.current?.focus()}),onPointerDownOutside:(0,d.composeEventHandlers)(a.onPointerDownOutside,a=>{let b=a.detail.originalEvent,c=0===b.button&&!0===b.ctrlKey;j.current=2===b.button||c},{checkForDefaultPrevented:!1}),onFocusOutside:(0,d.composeEventHandlers)(a.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),L=c.forwardRef((a,d)=>{let e=x(H,a.__scopePopover),f=c.useRef(!1),g=c.useRef(!1);return(0,b.jsx)(M,{...a,ref:d,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:b=>{a.onCloseAutoFocus?.(b),b.defaultPrevented||(f.current||e.triggerRef.current?.focus(),b.preventDefault()),f.current=!1,g.current=!1},onInteractOutside:b=>{a.onInteractOutside?.(b),b.defaultPrevented||(f.current=!0,"pointerdown"===b.detail.originalEvent.type&&(g.current=!0));let c=b.target;e.triggerRef.current?.contains(c)&&b.preventDefault(),"focusin"===b.detail.originalEvent.type&&g.current&&b.preventDefault()}})}),M=c.forwardRef((a,c)=>{let{__scopePopover:d,trapFocus:e,onOpenAutoFocus:f,onCloseAutoFocus:j,disableOutsidePointerEvents:l,onEscapeKeyDown:m,onPointerDownOutside:n,onFocusOutside:o,onInteractOutside:p,...q}=a,r=x(H,d),s=v(d);return(0,h.useFocusGuards)(),(0,b.jsx)(i.FocusScope,{asChild:!0,loop:!0,trapped:e,onMountAutoFocus:f,onUnmountAutoFocus:j,children:(0,b.jsx)(g.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:p,onEscapeKeyDown:m,onPointerDownOutside:n,onFocusOutside:o,onDismiss:()=>r.onOpenChange(!1),children:(0,b.jsx)(k.Content,{"data-state":Q(r.open),role:"dialog",id:r.contentId,...s,...q,ref:c,style:{...q.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),N="PopoverClose",O=c.forwardRef((a,c)=>{let{__scopePopover:e,...f}=a,g=x(N,e);return(0,b.jsx)(n.Primitive.button,{type:"button",...f,ref:c,onClick:(0,d.composeEventHandlers)(a.onClick,()=>g.onOpenChange(!1))})});O.displayName=N;var P=c.forwardRef((a,c)=>{let{__scopePopover:d,...e}=a,f=v(d);return(0,b.jsx)(k.Arrow,{...f,...e,ref:c})});function Q(a){return a?"open":"closed"}P.displayName="PopoverArrow",a.s(["Anchor",()=>A,"Arrow",()=>P,"Close",()=>O,"Content",()=>I,"Popover",()=>y,"PopoverAnchor",()=>A,"PopoverArrow",()=>P,"PopoverClose",()=>O,"PopoverContent",()=>I,"PopoverPortal",()=>G,"PopoverTrigger",()=>C,"Portal",()=>G,"Root",()=>y,"Trigger",()=>C,"createPopoverScope",()=>u],61452);var R=a.i(61452),R=R,S=a.i(85536);let T=R.Root,U=R.Trigger;R.Anchor;let V=c.forwardRef(({className:a,align:c="center",sideOffset:d=4,...e},f)=>(0,b.jsx)(R.Portal,{children:(0,b.jsx)(R.Content,{ref:f,align:c,sideOffset:d,className:(0,S.cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",a),...e})}));V.displayName=R.Content.displayName,a.s(["Popover",()=>T,"PopoverContent",()=>V,"PopoverTrigger",()=>U],80646)},10499,44815,a=>{"use strict";var b=a.i(25674);let c=(0,b.createServerReference)("0068bc9efcc5fd022c79ba7d9b17f42e0efbdba251",b.callServer,void 0,b.findSourceMapURL,"getAllAgentModels");a.s(["getAllAgentModels",()=>c],10499);let d=(0,b.createServerReference)("60e46a8ee51bbfbb8f759f6017815ff9d4e92d6925",b.callServer,void 0,b.findSourceMapURL,"updateAgentAndModel");a.s(["updateAgentAndModel",()=>d],44815)},96867,61781,a=>{"use strict";var b=a.i(10973),c=a.i(96960),d=a.i(59653),e=a.i(6175),f=a.i(7420),g=a.i(17329),h=a.i(64005),i=a.i(74432),j=a.i(66873),k="Switch",[l,m]=(0,f.createContextScope)(k),[n,o]=l(k),p=c.forwardRef((a,f)=>{let{__scopeSwitch:h,name:i,checked:l,defaultChecked:m,required:o,disabled:p,value:q="on",onCheckedChange:r,form:u,...v}=a,[w,x]=c.useState(null),y=(0,e.useComposedRefs)(f,a=>x(a)),z=c.useRef(!1),A=!w||u||!!w.closest("form"),[B,C]=(0,g.useControllableState)({prop:l,defaultProp:m??!1,onChange:r,caller:k});return(0,b.jsxs)(n,{scope:h,checked:B,disabled:p,children:[(0,b.jsx)(j.Primitive.button,{type:"button",role:"switch","aria-checked":B,"aria-required":o,"data-state":t(B),"data-disabled":p?"":void 0,disabled:p,value:q,...v,ref:y,onClick:(0,d.composeEventHandlers)(a.onClick,a=>{C(a=>!a),A&&(z.current=a.isPropagationStopped(),z.current||a.stopPropagation())})}),A&&(0,b.jsx)(s,{control:w,bubbles:!z.current,name:i,value:q,checked:B,required:o,disabled:p,form:u,style:{transform:"translateX(-100%)"}})]})});p.displayName=k;var q="SwitchThumb",r=c.forwardRef((a,c)=>{let{__scopeSwitch:d,...e}=a,f=o(q,d);return(0,b.jsx)(j.Primitive.span,{"data-state":t(f.checked),"data-disabled":f.disabled?"":void 0,...e,ref:c})});r.displayName=q;var s=c.forwardRef(({__scopeSwitch:a,control:d,checked:f,bubbles:g=!0,...j},k)=>{let l=c.useRef(null),m=(0,e.useComposedRefs)(l,k),n=(0,h.usePrevious)(f),o=(0,i.useSize)(d);return c.useEffect(()=>{let a=l.current;if(!a)return;let b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(n!==f&&b){let c=new Event("click",{bubbles:g});b.call(a,f),a.dispatchEvent(c)}},[n,f,g]),(0,b.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:f,...j,tabIndex:-1,ref:m,style:{...j.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function t(a){return a?"checked":"unchecked"}s.displayName="SwitchBubbleInput",a.s(["Root",()=>p,"Switch",()=>p,"SwitchThumb",()=>r,"Thumb",()=>r,"createSwitchScope",()=>m],91918);var u=a.i(91918),u=u,v=a.i(85536);function w({className:a,size:c="default",...d}){return(0,b.jsx)(u.Root,{"data-slot":"switch","data-size":c,className:(0,v.cn)("peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6",a),...d,children:(0,b.jsx)(u.Thumb,{"data-slot":"switch-thumb",className:(0,v.cn)("bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}a.s(["Switch",()=>w],96867);var x=a.i(72016),y=a.i(94132),z=a.i(3410),A=a.i(10499),B=a.i(44815),C=a.i(17606),D=a.i(83852),E=a.i(18948),F=a.i(80646);function G({initialAgentType:a,initialModel:d,onAgentModelChange:e,disabled:f,className:g,mode:h}){let[i,j]=c.useState(!1),[k,l]=c.useState([]),[m,n]=c.useState(!0),[o,p]=c.useState(a),[q,r]=c.useState(d),[s,t]=c.useState(null),[u,w]=c.useState(0),[G,H]=c.useState(null);c.useEffect(()=>{(0,A.getAllAgentModels)().then(l).finally(()=>n(!1))},[]),c.useEffect(()=>{if(!i){let a=setTimeout(()=>{w(0),H(null)},150);return()=>clearTimeout(a)}},[i]);let I=async(a,b)=>{if(j(!1),a!==o||b!==q){if("override"===h){p(a),r(b),e?.(a,b);return}p(a),r(b),e?.(a,b),t(null);try{let c=await (0,B.updateAgentAndModel)(a,b||null);c.ok||(p(o),r(q),e?.(o,q),t(c.error??"Failed to save"))}catch{p(o),r(q),e?.(o,q),t("Failed to save")}}},J=(0,C.getAgentTypeIcon)(o),K=k.find(a=>a.agentType===o)?.label??o,L=q?(0,D.getModelMeta)(q).displayName||q:null,M=G?k.find(a=>a.agentType===G):null;return(0,b.jsxs)("div",{className:(0,v.cn)("flex flex-col gap-1",g),children:[(0,b.jsxs)(F.Popover,{open:i,onOpenChange:j,children:[(0,b.jsx)(F.PopoverTrigger,{asChild:!0,children:(0,b.jsx)(E.Button,{variant:"outline",role:"combobox","aria-expanded":i,disabled:(f??!1)||m,className:"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30",children:(0,b.jsxs)("span",{className:"flex items-center gap-2 truncate",children:[(0,b.jsx)(J,{className:"h-4 w-4 shrink-0"}),m?"Loading…":(0,b.jsxs)("span",{className:"flex items-center gap-1",children:[(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:K}),L?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"text-muted-foreground/50 text-xs",children:"·"}),(0,b.jsx)("span",{className:"text-xs font-medium",children:L})]}):null]})]})})}),(0,b.jsx)(F.PopoverContent,{className:"w-(--radix-popover-trigger-width) overflow-hidden p-0",align:"start",children:(0,b.jsxs)("div",{className:"flex transition-transform duration-200 ease-in-out",style:{transform:`translateX(${1===u?"-50%":"0%"})`,width:"200%"},children:[(0,b.jsxs)("div",{className:"w-1/2 shrink-0",children:[(0,b.jsx)("div",{className:"text-muted-foreground border-b px-3 py-2 text-xs font-medium",children:"Select agent"}),k.map(a=>{let c=(0,C.getAgentTypeIcon)(a.agentType),d=o===a.agentType,e=a.models.length>0;return(0,b.jsxs)("button",{type:"button",className:(0,v.cn)("flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors","hover:bg-accent hover:text-accent-foreground",d&&"bg-accent/50"),onClick:()=>{e?(H(a.agentType),requestAnimationFrame(()=>{requestAnimationFrame(()=>w(1))})):I(a.agentType,"")},children:[(0,b.jsx)(c,{className:"h-4 w-4 shrink-0"}),(0,b.jsx)("span",{className:"flex-1 text-left",children:a.label}),d&&!e?(0,b.jsx)(x.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null,e?(0,b.jsx)(z.ChevronRight,{className:"text-muted-foreground h-3.5 w-3.5 shrink-0"}):null]},a.agentType)})]}),(0,b.jsx)("div",{className:"w-1/2 shrink-0",children:M?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors",onClick:()=>{w(0),setTimeout(()=>H(null),220)},children:[(0,b.jsx)(y.ChevronLeft,{className:"h-3.5 w-3.5"}),M.label]}),M.models.map(a=>{let c=o===M.agentType&&q===a.id;return(0,b.jsxs)("button",{type:"button",className:(0,v.cn)("flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors","hover:bg-accent hover:text-accent-foreground",c&&"bg-accent/50"),onClick:()=>I(M.agentType,a.id),children:[(0,b.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,b.jsx)("span",{className:"text-xs font-medium",children:a.displayName}),(0,b.jsx)("span",{className:"text-muted-foreground text-xs",children:a.description})]}),c?(0,b.jsx)(x.Check,{className:"text-primary h-3.5 w-3.5 shrink-0"}):null]},a.id)})]}):null})]})})]}),!!s&&(0,b.jsx)("p",{className:"text-destructive text-sm",children:s})]})}a.s(["AgentModelPicker",()=>G],61781)}];
2
2
 
3
- //# sourceMappingURL=src_presentation_web_7b2fda40._.js.map
3
+ //# sourceMappingURL=src_presentation_web_bc27a88f._.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-popover%401.1.15_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Brea_6845413866e39bfed03c608b19c71ed1/node_modules/%40radix-ui/react-popover/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/popover.tsx","../../../../../../../src/presentation/web/app/actions/data%3A95a233%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3Adce5d5%20%3Ctext/javascript%3E","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-switch%401.2.6_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Breact_82f001e3bde9922eaefd6f7b0722a9bb/node_modules/%40radix-ui/react-switch/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/switch.tsx","../../../../../../../src/presentation/web/components/features/settings/AgentModelPicker/index.tsx"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n","/* __next_internal_action_entry_do_not_use__ [{\"005405e33a575fd7fef0856afab08d6908b311c095\":\"getAllAgentModels\"},\"src/presentation/web/app/actions/get-all-agent-models.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"005405e33a575fd7fef0856afab08d6908b311c095\",callServer,void 0,findSourceMapURL,\"getAllAgentModels\");export{$$RSC_SERVER_ACTION_0 as getAllAgentModels};","/* __next_internal_action_entry_do_not_use__ [{\"60010c6015fae17dab78f4eaedcd652d8a425311c4\":\"updateAgentAndModel\"},\"src/presentation/web/app/actions/update-agent-and-model.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"60010c6015fae17dab78f4eaedcd652d8a425311c4\",callServer,void 0,findSourceMapURL,\"updateAgentAndModel\");export{$$RSC_SERVER_ACTION_0 as updateAgentAndModel};","\"use client\";\n\n// src/switch.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar SWITCH_NAME = \"Switch\";\nvar [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\nvar [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);\nvar Switch = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSwitch,\n name,\n checked: checkedProp,\n defaultChecked,\n required,\n disabled,\n value = \"on\",\n onCheckedChange,\n form,\n ...switchProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = button ? form || !!button.closest(\"form\") : true;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: SWITCH_NAME\n });\n return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [\n /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"switch\",\n \"aria-checked\": checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...switchProps,\n ref: composedRefs,\n onClick: composeEventHandlers(props.onClick, (event) => {\n setChecked((prevChecked) => !prevChecked);\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n SwitchBubbleInput,\n {\n control: button,\n bubbles: !hasConsumerStoppedPropagationRef.current,\n name,\n value,\n checked,\n required,\n disabled,\n form,\n style: { transform: \"translateX(-100%)\" }\n }\n )\n ] });\n }\n);\nSwitch.displayName = SWITCH_NAME;\nvar THUMB_NAME = \"SwitchThumb\";\nvar SwitchThumb = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...thumbProps,\n ref: forwardedRef\n }\n );\n }\n);\nSwitchThumb.displayName = THUMB_NAME;\nvar BUBBLE_INPUT_NAME = \"SwitchBubbleInput\";\nvar SwitchBubbleInput = React.forwardRef(\n ({\n __scopeSwitch,\n control,\n checked,\n bubbles = true,\n ...props\n }, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n return /* @__PURE__ */ jsx(\n \"input\",\n {\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: checked,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0\n }\n }\n );\n }\n);\nSwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\nvar Root = Switch;\nvar Thumb = SwitchThumb;\nexport {\n Root,\n Switch,\n SwitchThumb,\n Thumb,\n createSwitchScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { Switch as SwitchPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nfunction Switch({\n className,\n size = 'default',\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n size?: 'sm' | 'default';\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n 'peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6',\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n 'bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0'\n )}\n />\n </SwitchPrimitive.Root>\n );\n}\n\nexport { Switch };\n","'use client';\n\nimport * as React from 'react';\nimport { Check, ChevronLeft, ChevronRight } from 'lucide-react';\nimport { getAllAgentModels } from '@/app/actions/get-all-agent-models';\nimport type { AgentModelGroup } from '@/app/actions/get-all-agent-models';\nimport { updateAgentAndModel } from '@/app/actions/update-agent-and-model';\nimport { getAgentTypeIcon } from '@/components/common/feature-node/agent-type-icons';\nimport { getModelMeta } from '@/lib/model-metadata';\nimport { Button } from '@/components/ui/button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { cn } from '@/lib/utils';\n\nexport interface AgentModelPickerProps {\n initialAgentType: string;\n initialModel: string;\n onAgentModelChange?: (agentType: string, model: string) => void;\n disabled?: boolean;\n className?: string;\n /** 'settings' persists to DB; 'override' only calls onAgentModelChange */\n mode: 'settings' | 'override';\n}\n\nexport function AgentModelPicker({\n initialAgentType,\n initialModel,\n onAgentModelChange,\n disabled,\n className,\n mode,\n}: AgentModelPickerProps) {\n const [open, setOpen] = React.useState(false);\n const [groups, setGroups] = React.useState<AgentModelGroup[]>([]);\n const [loading, setLoading] = React.useState(true);\n const [agentType, setAgentType] = React.useState(initialAgentType);\n const [model, setModel] = React.useState(initialModel);\n const [error, setError] = React.useState<string | null>(null);\n\n // 0 = agent list visible, 1 = model list visible\n const [level, setLevel] = React.useState(0);\n // Which agent's models to show (kept separate from level for animation)\n const [drillAgent, setDrillAgent] = React.useState<string | null>(null);\n\n React.useEffect(() => {\n getAllAgentModels()\n .then(setGroups)\n .finally(() => setLoading(false));\n }, []);\n\n // Reset drill-down when popover closes\n React.useEffect(() => {\n if (!open) {\n const t = setTimeout(() => {\n setLevel(0);\n setDrillAgent(null);\n }, 150);\n return () => clearTimeout(t);\n }\n }, [open]);\n\n const drillInto = (agent: string) => {\n setDrillAgent(agent);\n requestAnimationFrame(() => {\n requestAnimationFrame(() => setLevel(1));\n });\n };\n\n const drillBack = () => {\n setLevel(0);\n setTimeout(() => setDrillAgent(null), 220);\n };\n\n const handleSelect = async (newAgentType: string, newModel: string) => {\n setOpen(false);\n\n if (newAgentType === agentType && newModel === model) return;\n\n if (mode === 'override') {\n setAgentType(newAgentType);\n setModel(newModel);\n onAgentModelChange?.(newAgentType, newModel);\n return;\n }\n\n // mode === 'settings' — optimistically update, then persist\n const prevAgent = agentType;\n const prevModel = model;\n setAgentType(newAgentType);\n setModel(newModel);\n onAgentModelChange?.(newAgentType, newModel);\n\n setError(null);\n try {\n const result = await updateAgentAndModel(newAgentType, newModel || null);\n if (!result.ok) {\n // Revert on failure\n setAgentType(prevAgent);\n setModel(prevModel);\n onAgentModelChange?.(prevAgent, prevModel);\n setError(result.error ?? 'Failed to save');\n }\n } catch {\n setAgentType(prevAgent);\n setModel(prevModel);\n onAgentModelChange?.(prevAgent, prevModel);\n setError('Failed to save');\n }\n };\n\n const isDisabled = (disabled ?? false) || loading;\n\n const AgentIcon = getAgentTypeIcon(agentType);\n const agentLabel = groups.find((g) => g.agentType === agentType)?.label ?? agentType;\n const modelName = model ? getModelMeta(model).displayName || model : null;\n\n const activeGroup = drillAgent ? groups.find((g) => g.agentType === drillAgent) : null;\n\n return (\n <div className={cn('flex flex-col gap-1', className)}>\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={isDisabled}\n className=\"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30\"\n >\n <span className=\"flex items-center gap-2 truncate\">\n <AgentIcon className=\"h-4 w-4 shrink-0\" />\n {loading ? (\n 'Loading…'\n ) : (\n <span className=\"flex items-center gap-1\">\n <span className=\"text-muted-foreground text-xs\">{agentLabel}</span>\n {modelName ? (\n <>\n <span className=\"text-muted-foreground/50 text-xs\">·</span>\n <span className=\"text-xs font-medium\">{modelName}</span>\n </>\n ) : null}\n </span>\n )}\n </span>\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-(--radix-popover-trigger-width) overflow-hidden p-0\"\n align=\"start\"\n >\n {/* Sliding container — both panels side by side, translateX controlled by level */}\n <div\n className=\"flex transition-transform duration-200 ease-in-out\"\n style={{ transform: `translateX(${level === 1 ? '-50%' : '0%'})`, width: '200%' }}\n >\n {/* ── Level 1: Agent list ── */}\n <div className=\"w-1/2 shrink-0\">\n <div className=\"text-muted-foreground border-b px-3 py-2 text-xs font-medium\">\n Select agent\n </div>\n {groups.map((group) => {\n const GroupIcon = getAgentTypeIcon(group.agentType);\n const isActive = agentType === group.agentType;\n const hasModels = group.models.length > 0;\n\n return (\n <button\n key={group.agentType}\n type=\"button\"\n className={cn(\n 'flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors',\n 'hover:bg-accent hover:text-accent-foreground',\n isActive && 'bg-accent/50'\n )}\n onClick={() => {\n if (hasModels) {\n drillInto(group.agentType);\n } else {\n handleSelect(group.agentType, '');\n }\n }}\n >\n <GroupIcon className=\"h-4 w-4 shrink-0\" />\n <span className=\"flex-1 text-left\">{group.label}</span>\n {isActive && !hasModels ? (\n <Check className=\"text-primary h-3.5 w-3.5 shrink-0\" />\n ) : null}\n {hasModels ? (\n <ChevronRight className=\"text-muted-foreground h-3.5 w-3.5 shrink-0\" />\n ) : null}\n </button>\n );\n })}\n </div>\n\n {/* ── Level 2: Model list for selected agent ── */}\n <div className=\"w-1/2 shrink-0\">\n {activeGroup ? (\n <>\n {/* Back header */}\n <button\n type=\"button\"\n className=\"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors\"\n onClick={drillBack}\n >\n <ChevronLeft className=\"h-3.5 w-3.5\" />\n {activeGroup.label}\n </button>\n\n {/* Model items */}\n {activeGroup.models.map((m) => {\n const isSelected = agentType === activeGroup.agentType && model === m.id;\n return (\n <button\n key={m.id}\n type=\"button\"\n className={cn(\n 'flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors',\n 'hover:bg-accent hover:text-accent-foreground',\n isSelected && 'bg-accent/50'\n )}\n onClick={() => handleSelect(activeGroup.agentType, m.id)}\n >\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"text-xs font-medium\">{m.displayName}</span>\n <span className=\"text-muted-foreground text-xs\">{m.description}</span>\n </div>\n {isSelected ? (\n <Check className=\"text-primary h-3.5 w-3.5 shrink-0\" />\n ) : null}\n </button>\n );\n })}\n </>\n ) : null}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n {Boolean(error) && <p className=\"text-destructive text-sm\">{error}</p>}\n </div>\n );\n}\n"],"names":[],"mappings":"wDCEA,EAAA,EAAA,CAAA,CAAA,ODEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OAEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAEI,EAAe,UACf,CAAC,EAAsB,EAAmB,CAAG,CAAA,EAAA,EAAA,kBAAA,AAAkB,EAAC,EAAc,CAChF,EAAA,iBAAiB,CAClB,EACG,EAAiB,CAAA,EAAA,EAAA,iBAAA,AAAiB,IAClC,CAAC,EAAiB,EAAkB,CAAG,EAAqB,GAC5D,EAAU,AAAC,IACb,GAAM,gBACJ,CAAc,CACd,UAAQ,CACR,KAAM,CAA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Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Brea_6845413866e39bfed03c608b19c71ed1/node_modules/%40radix-ui/react-popover/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/popover.tsx","../../../../../../../src/presentation/web/app/actions/data%3A2533de%20%3Ctext/javascript%3E","../../../../../../../src/presentation/web/app/actions/data%3A072720%20%3Ctext/javascript%3E","../../../../../../../node_modules/.pnpm/%40radix-ui%2Breact-switch%401.2.6_%40types%2Breact-dom%4019.2.3_%40types%2Breact%4019.2.10__%40types%2Breact_82f001e3bde9922eaefd6f7b0722a9bb/node_modules/%40radix-ui/react-switch/dist/index.mjs","../../../../../../../src/presentation/web/components/ui/switch.tsx","../../../../../../../src/presentation/web/components/features/settings/AgentModelPicker/index.tsx"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { Popover as PopoverPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n","/* __next_internal_action_entry_do_not_use__ [{\"0068bc9efcc5fd022c79ba7d9b17f42e0efbdba251\":\"getAllAgentModels\"},\"src/presentation/web/app/actions/get-all-agent-models.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"0068bc9efcc5fd022c79ba7d9b17f42e0efbdba251\",callServer,void 0,findSourceMapURL,\"getAllAgentModels\");export{$$RSC_SERVER_ACTION_0 as getAllAgentModels};","/* __next_internal_action_entry_do_not_use__ [{\"60e46a8ee51bbfbb8f759f6017815ff9d4e92d6925\":\"updateAgentAndModel\"},\"src/presentation/web/app/actions/update-agent-and-model.ts\",\"\"] */\"use turbopack no side effects\";import{createServerReference,callServer,findSourceMapURL}from\"private-next-rsc-action-client-wrapper\";const $$RSC_SERVER_ACTION_0=/*#__PURE__*/createServerReference(\"60e46a8ee51bbfbb8f759f6017815ff9d4e92d6925\",callServer,void 0,findSourceMapURL,\"updateAgentAndModel\");export{$$RSC_SERVER_ACTION_0 as updateAgentAndModel};","\"use client\";\n\n// src/switch.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { usePrevious } from \"@radix-ui/react-use-previous\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar SWITCH_NAME = \"Switch\";\nvar [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);\nvar [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);\nvar Switch = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeSwitch,\n name,\n checked: checkedProp,\n defaultChecked,\n required,\n disabled,\n value = \"on\",\n onCheckedChange,\n form,\n ...switchProps\n } = props;\n const [button, setButton] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));\n const hasConsumerStoppedPropagationRef = React.useRef(false);\n const isFormControl = button ? form || !!button.closest(\"form\") : true;\n const [checked, setChecked] = useControllableState({\n prop: checkedProp,\n defaultProp: defaultChecked ?? false,\n onChange: onCheckedChange,\n caller: SWITCH_NAME\n });\n return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [\n /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"switch\",\n \"aria-checked\": checked,\n \"aria-required\": required,\n \"data-state\": getState(checked),\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n value,\n ...switchProps,\n ref: composedRefs,\n onClick: composeEventHandlers(props.onClick, (event) => {\n setChecked((prevChecked) => !prevChecked);\n if (isFormControl) {\n hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();\n if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();\n }\n })\n }\n ),\n isFormControl && /* @__PURE__ */ jsx(\n SwitchBubbleInput,\n {\n control: button,\n bubbles: !hasConsumerStoppedPropagationRef.current,\n name,\n value,\n checked,\n required,\n disabled,\n form,\n style: { transform: \"translateX(-100%)\" }\n }\n )\n ] });\n }\n);\nSwitch.displayName = SWITCH_NAME;\nvar THUMB_NAME = \"SwitchThumb\";\nvar SwitchThumb = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeSwitch, ...thumbProps } = props;\n const context = useSwitchContext(THUMB_NAME, __scopeSwitch);\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n \"data-state\": getState(context.checked),\n \"data-disabled\": context.disabled ? \"\" : void 0,\n ...thumbProps,\n ref: forwardedRef\n }\n );\n }\n);\nSwitchThumb.displayName = THUMB_NAME;\nvar BUBBLE_INPUT_NAME = \"SwitchBubbleInput\";\nvar SwitchBubbleInput = React.forwardRef(\n ({\n __scopeSwitch,\n control,\n checked,\n bubbles = true,\n ...props\n }, forwardedRef) => {\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(ref, forwardedRef);\n const prevChecked = usePrevious(checked);\n const controlSize = useSize(control);\n React.useEffect(() => {\n const input = ref.current;\n if (!input) return;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(\n inputProto,\n \"checked\"\n );\n const setChecked = descriptor.set;\n if (prevChecked !== checked && setChecked) {\n const event = new Event(\"click\", { bubbles });\n setChecked.call(input, checked);\n input.dispatchEvent(event);\n }\n }, [prevChecked, checked, bubbles]);\n return /* @__PURE__ */ jsx(\n \"input\",\n {\n type: \"checkbox\",\n \"aria-hidden\": true,\n defaultChecked: checked,\n ...props,\n tabIndex: -1,\n ref: composedRefs,\n style: {\n ...props.style,\n ...controlSize,\n position: \"absolute\",\n pointerEvents: \"none\",\n opacity: 0,\n margin: 0\n }\n }\n );\n }\n);\nSwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;\nfunction getState(checked) {\n return checked ? \"checked\" : \"unchecked\";\n}\nvar Root = Switch;\nvar Thumb = SwitchThumb;\nexport {\n Root,\n Switch,\n SwitchThumb,\n Thumb,\n createSwitchScope\n};\n//# sourceMappingURL=index.mjs.map\n","'use client';\n\nimport * as React from 'react';\nimport { Switch as SwitchPrimitive } from 'radix-ui';\n\nimport { cn } from '@/lib/utils';\n\nfunction Switch({\n className,\n size = 'default',\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n size?: 'sm' | 'default';\n}) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n data-size={size}\n className={cn(\n 'peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80 inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6',\n className\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n 'bg-background dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground pointer-events-none block rounded-full ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0'\n )}\n />\n </SwitchPrimitive.Root>\n );\n}\n\nexport { Switch };\n","'use client';\n\nimport * as React from 'react';\nimport { Check, ChevronLeft, ChevronRight } from 'lucide-react';\nimport { getAllAgentModels } from '@/app/actions/get-all-agent-models';\nimport type { AgentModelGroup } from '@/app/actions/get-all-agent-models';\nimport { updateAgentAndModel } from '@/app/actions/update-agent-and-model';\nimport { getAgentTypeIcon } from '@/components/common/feature-node/agent-type-icons';\nimport { getModelMeta } from '@/lib/model-metadata';\nimport { Button } from '@/components/ui/button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';\nimport { cn } from '@/lib/utils';\n\nexport interface AgentModelPickerProps {\n initialAgentType: string;\n initialModel: string;\n onAgentModelChange?: (agentType: string, model: string) => void;\n disabled?: boolean;\n className?: string;\n /** 'settings' persists to DB; 'override' only calls onAgentModelChange */\n mode: 'settings' | 'override';\n}\n\nexport function AgentModelPicker({\n initialAgentType,\n initialModel,\n onAgentModelChange,\n disabled,\n className,\n mode,\n}: AgentModelPickerProps) {\n const [open, setOpen] = React.useState(false);\n const [groups, setGroups] = React.useState<AgentModelGroup[]>([]);\n const [loading, setLoading] = React.useState(true);\n const [agentType, setAgentType] = React.useState(initialAgentType);\n const [model, setModel] = React.useState(initialModel);\n const [error, setError] = React.useState<string | null>(null);\n\n // 0 = agent list visible, 1 = model list visible\n const [level, setLevel] = React.useState(0);\n // Which agent's models to show (kept separate from level for animation)\n const [drillAgent, setDrillAgent] = React.useState<string | null>(null);\n\n React.useEffect(() => {\n getAllAgentModels()\n .then(setGroups)\n .finally(() => setLoading(false));\n }, []);\n\n // Reset drill-down when popover closes\n React.useEffect(() => {\n if (!open) {\n const t = setTimeout(() => {\n setLevel(0);\n setDrillAgent(null);\n }, 150);\n return () => clearTimeout(t);\n }\n }, [open]);\n\n const drillInto = (agent: string) => {\n setDrillAgent(agent);\n requestAnimationFrame(() => {\n requestAnimationFrame(() => setLevel(1));\n });\n };\n\n const drillBack = () => {\n setLevel(0);\n setTimeout(() => setDrillAgent(null), 220);\n };\n\n const handleSelect = async (newAgentType: string, newModel: string) => {\n setOpen(false);\n\n if (newAgentType === agentType && newModel === model) return;\n\n if (mode === 'override') {\n setAgentType(newAgentType);\n setModel(newModel);\n onAgentModelChange?.(newAgentType, newModel);\n return;\n }\n\n // mode === 'settings' — optimistically update, then persist\n const prevAgent = agentType;\n const prevModel = model;\n setAgentType(newAgentType);\n setModel(newModel);\n onAgentModelChange?.(newAgentType, newModel);\n\n setError(null);\n try {\n const result = await updateAgentAndModel(newAgentType, newModel || null);\n if (!result.ok) {\n // Revert on failure\n setAgentType(prevAgent);\n setModel(prevModel);\n onAgentModelChange?.(prevAgent, prevModel);\n setError(result.error ?? 'Failed to save');\n }\n } catch {\n setAgentType(prevAgent);\n setModel(prevModel);\n onAgentModelChange?.(prevAgent, prevModel);\n setError('Failed to save');\n }\n };\n\n const isDisabled = (disabled ?? false) || loading;\n\n const AgentIcon = getAgentTypeIcon(agentType);\n const agentLabel = groups.find((g) => g.agentType === agentType)?.label ?? agentType;\n const modelName = model ? getModelMeta(model).displayName || model : null;\n\n const activeGroup = drillAgent ? groups.find((g) => g.agentType === drillAgent) : null;\n\n return (\n <div className={cn('flex flex-col gap-1', className)}>\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={isDisabled}\n className=\"w-auto cursor-pointer justify-start font-normal hover:border-violet-300 hover:bg-violet-50/50 dark:hover:border-violet-700 dark:hover:bg-violet-950/30\"\n >\n <span className=\"flex items-center gap-2 truncate\">\n <AgentIcon className=\"h-4 w-4 shrink-0\" />\n {loading ? (\n 'Loading…'\n ) : (\n <span className=\"flex items-center gap-1\">\n <span className=\"text-muted-foreground text-xs\">{agentLabel}</span>\n {modelName ? (\n <>\n <span className=\"text-muted-foreground/50 text-xs\">·</span>\n <span className=\"text-xs font-medium\">{modelName}</span>\n </>\n ) : null}\n </span>\n )}\n </span>\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-(--radix-popover-trigger-width) overflow-hidden p-0\"\n align=\"start\"\n >\n {/* Sliding container — both panels side by side, translateX controlled by level */}\n <div\n className=\"flex transition-transform duration-200 ease-in-out\"\n style={{ transform: `translateX(${level === 1 ? '-50%' : '0%'})`, width: '200%' }}\n >\n {/* ── Level 1: Agent list ── */}\n <div className=\"w-1/2 shrink-0\">\n <div className=\"text-muted-foreground border-b px-3 py-2 text-xs font-medium\">\n Select agent\n </div>\n {groups.map((group) => {\n const GroupIcon = getAgentTypeIcon(group.agentType);\n const isActive = agentType === group.agentType;\n const hasModels = group.models.length > 0;\n\n return (\n <button\n key={group.agentType}\n type=\"button\"\n className={cn(\n 'flex w-full cursor-pointer items-center gap-2.5 px-3 py-2 text-xs transition-colors',\n 'hover:bg-accent hover:text-accent-foreground',\n isActive && 'bg-accent/50'\n )}\n onClick={() => {\n if (hasModels) {\n drillInto(group.agentType);\n } else {\n handleSelect(group.agentType, '');\n }\n }}\n >\n <GroupIcon className=\"h-4 w-4 shrink-0\" />\n <span className=\"flex-1 text-left\">{group.label}</span>\n {isActive && !hasModels ? (\n <Check className=\"text-primary h-3.5 w-3.5 shrink-0\" />\n ) : null}\n {hasModels ? (\n <ChevronRight className=\"text-muted-foreground h-3.5 w-3.5 shrink-0\" />\n ) : null}\n </button>\n );\n })}\n </div>\n\n {/* ── Level 2: Model list for selected agent ── */}\n <div className=\"w-1/2 shrink-0\">\n {activeGroup ? (\n <>\n {/* Back header */}\n <button\n type=\"button\"\n className=\"text-muted-foreground hover:text-foreground flex w-full cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs font-medium transition-colors\"\n onClick={drillBack}\n >\n <ChevronLeft className=\"h-3.5 w-3.5\" />\n {activeGroup.label}\n </button>\n\n {/* Model items */}\n {activeGroup.models.map((m) => {\n const isSelected = agentType === activeGroup.agentType && model === m.id;\n return (\n <button\n key={m.id}\n type=\"button\"\n className={cn(\n 'flex w-full cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors',\n 'hover:bg-accent hover:text-accent-foreground',\n isSelected && 'bg-accent/50'\n )}\n onClick={() => handleSelect(activeGroup.agentType, m.id)}\n >\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <span className=\"text-xs font-medium\">{m.displayName}</span>\n <span className=\"text-muted-foreground text-xs\">{m.description}</span>\n </div>\n {isSelected ? (\n <Check className=\"text-primary h-3.5 w-3.5 shrink-0\" />\n ) : null}\n </button>\n );\n })}\n </>\n ) : null}\n </div>\n </div>\n </PopoverContent>\n </Popover>\n {Boolean(error) && <p className=\"text-destructive text-sm\">{error}</p>}\n </div>\n );\n}\n"],"names":[],"mappings":"wDCEA,EAAA,EAAA,CAAA,CAAA,ODEA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,MACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAC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